Thank you for wanting to contribute to XBar.
-
Windows 10 64bit
you can use 32bit installation but some steps will be different, so... adapt!
-
CMake -
3.19.4
Minimum -
(optional) LLVM contains
clang-format
which theC/C++ vscode plugin
uses to format the code.
CMake and vcpkg must be included in the PATH.
VS Code extensions
- C/C++ (Required)
- CMake (Required)
- CMake Tools (Required)
- cmake-format (Optional)
- EditorConfig for VS Code (Required)
- Bracket Pair Colorizer 2 (Optional)
They should be recommended to you after opening the project folder in VS Code.
-
Clone the repo
git clone https://github.com/amrbashir/XBar cd XBar
-
Install the packages
vcpkg install --triplet x64-windows fmt nlohmann-json
and if you want to build/degbu the 32bit installer or the 32bit exe
vcpkg install --triplet x86-windows fmt nlohmann-json
-
Open
.vscode/c_cpp_properties.json
file and changecompilerPath
to match thecl.exe
compiler path on your system.Should be something like this
C:/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.28.29333/bin/Hostx64/x64/cl.exe
-
Open
.vscode/settings.json
file and in theCMAKE_TOOLCHAIN_FILE
field, change[vcpkg root]
with the path where you installed vcpkg.
-
Open command palette (ctrl+shift+p or F1) and select
CMake: Select a Kit
then selectVisual Studio Build Tools 2019 Release amd64
or if you want to build/debug 32bit exe, selectVisual Studio Build Tools 2019 Release amd64_x86
.Make sure to clean the cache after Selecting a different Kit by opening the command palette and selecting
CMake: Delete Cache and Reconfigure
-
Open command palette and select
CMake: Select Variant
then select what ever you want. -
Open command palette and select
CMake: Configure
and wait for it to finish. -
Open command palette and select
CMake: Set Build Target
then selectXBar
. -
Open command palette and select
CMake: Debug
orCMake: Run Without Debugging
orCMake: Build
.If you selected
CMake: Build
, You will find the exe in either.\build\Debug
or.\build\Release
depending on the variant you selected.
-
Open command palette and select
CMake: Select a Kit
then selectVisual Studio Build Tools 2019 Release amd64
or if you want to build 32bit installer, selectVisual Studio Build Tools 2019 Release amd64_x86
.Make sure to clean the cache after Selecting a different Kit by opening the command palette and selecting
CMake: Delete Cache and Reconfigure
-
Open command palette and select
CMake: Select Variant
then selectRelease
. -
Open command palette and select
CMake: Configure
and wait for it to finish. -
Open command palette and select
CMake: Build
and wait for it to finish. -
Open a terminal in the project root directory.
-
run this command:
cmake --build .\build\ --config Release --target PACKAGE
You will find the installer in
.\build
.