-
Notifications
You must be signed in to change notification settings - Fork 18
Building psOff from scratch
Warning
This guide assuming that you have all the Vulkan/MSVC/Clang stuff installed. If you don't have it follow the first two steps here and then return to this guide.
When you open psOff repository with VSCode for the first time, it will show you the notification about installing recommended extensions. You should click Show Recommenadtions
there.
If you missed this notification, then press Ctrl+Shift+P
and type Focus on Workspace Recommendations View
and perss this button.
Now you'll see the sidebar with all the recommended extensions, you should install all of them. Or just press the Install Workspace Recommended Extensions
button above, the one with the cloud icon.
It is recommended to restart the VSCode after you finish installing all the recommended extensions.
All you have to do now is switch the default compiler to clang-cl
if it didn't set automatically and set build target to Release.
Make sure the CMake Extension uses it too:
Warning
You won't be able to build the Debug version of emulator, you should switch CMake target to Release. But worry not, this target already uses debug symbols the only thing you should do to improve your debugging experience - disable compiler optimizations, open the main CMakeLists.txt
file and change CMAKE_CXX_FLAGS_RELEASE
flag -Ofast
to -O0
.
If you reading this, it seems you all set! So now you can use VSCode to build psOff modules. Just press Ctrl+Shift+P
and type CMake Focus
and press CMake: Focus on Project Status View
then click on the Configure
button first:
Then the Build
one:
You can add these command to Pinned Commands
list and use them there:
In fact, the only button you need is Install
. When you press it, cmake will configure the project, build it and then copy ready to use files to _build/_Install
directory.