-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Setup your PC for YimMenu Development
This guide is made for beginners advanced users won't really have a lot of to learn from here but it might be a good idea to read through it at least once.
- C++ Desktop Development
- Cloning YimMenu
- Choose your preferred IDE
- After setting up your IDE
- Making changes to the source code
- Issues with compiling
I use winget because it makes everything easier without having to provide any screenshots.
Install Winget from the Windows store.
Because we installed winget in the previous step we can very easily install it with the below command.
winget install Git.Git
The below command will do everything for you and won't require any intervention from the you.
winget install Microsoft.VisualStudio.2022.Community --silent --override "--wait --quiet --add ProductLang En-us --add Microsoft.VisualStudio.Workload.NativeDesktop --includeRecommended"
MAKE SURE YOU HAVE Visual Studio Community 2022 OR LATER installed.
Open Visual Studio Installer in there click the Modify
button for Visual Studio Community 2022.
This will open a screen asking you to select what packages you want to install.
In there select Desktop development with C++
, after that click the button at the botton right that says Install while downloading
.
Cloning YimMenu will download the code to your local drive. Open a command prompt somewhere you wish to download YimMenu to and then run the below command.
git clone https://github.com/YimMenu/YimMenu.git
cd YimMenu
Visual Studio Community 2022 should already be installed if you followed the above steps correctly.
If your preferred IDE is Visual Studio Code then click here.
This is for advanced users only!
cmake -D CMAKE_BUILD_TYPE=Release -S. -Bbuild -G Ninja
cmake --build ./build --config Release --target YimMenu --
After this you should find YimMenu.dll in the build/
directory.
If you only use Visual Studio and don't want to mess with command lines, Visual Studio has a CMake extension that does all the work.
Make sure it is installed.
Then, just open Visual Studio, open a local folder, and select the YimMenu
folder that the git clone
command just created.
Let the CMake extension generate the needed files for building, you can follow the progress in the Output tab of Visual Studio.
Then, you can just build by using the Build menu at the top and clicking Build All.
Or alternatively press F7
or CTRL + B
on your keyboard and YimMenu should start building.
You should be able to find the YimMenu.dll in the out/build/x64-Release/
folder.
Open Visual Studio Code and open the local folder to which you cloned YimMenu
.
Visual Studio Code should then prompt you to generate the CMake project, allow it to generate the project this might take a while depending on the performance of your computer.
After that has finished you should be good to go and start compiling YimMenu.
At the bottom of your IDE you should have the following things:
Try match your IDE with what you see in the above screenshot after which you can press the Build button.
Or alternatively you can also press F7
to start a build in Visual Studio Code.
If you want to speed up compilation of YimMenu in Visual Studio code you'll have to change a setting in VS Code.
Open settings and search for cmake.generator
, change the value of that input field to Ninja
.
Afterwards you'll have to remove the build/
folder and regenerate the project by pressing CTRL + S in the CMakeLists.txt file.
If you wish to make changes to the source code and add new file you'll need to open the CMakeLists.txt file and press CTRL + S. This will trigger a reconfigure for your project and include the new files in your build, both Visual Studio and Visual Studio Code should do this automatically.
If you're having issues with compiling YimMenu you'll probably find the answer here.
If for some reason cURL is giving you issues when compiling you can manually install it.
Make sure your installation of Visual Studio is up-to-date (Visual Studio Community 2022 or later).