This guide is how to install hikogui for developing hikogui itself. For installing the hikogui library as part of an application see the hikogui_hello_world example application.
Table of contents:
Windows 10
Install requirements:
Install vcpkg (optional)
HikoGUI will use the dependencies installed on the system, but it can use vcpkg to install the dependencies if available.
From the "Developer Command Prompt for VS 2019":
c:> cd c:\tools
c:\tools> git clone git@github.com:microsoft/vcpkg.git
Cloning into 'vcpkg'...
...
c:\tools\vcpkg> bootstrap-vcpkg.bat
Done.
...
c:\tools\vcpkg> vcpkg.exe integrate install --feature-flags=manifests
Applied user-wide integration for this vcpkg root.
CMake projects should use: "-DCMAKE_TOOLCHAIN_FILE=C:/tools/vcpkg/scripts/buildsystems/vcpkg.cmake"
...
Clone this project
Clone the hikogui repository on your machine:
c:\Users\Tjienta\Projects> git clone git@github.com:hikogui/hikogui.git
Cloning into 'hikogui'...
...
Building and running with "Microsoft Visual Studio"
You can then open the hikogui directory as a directory-based project inside visual studio.
To build:
- Select
x64-MSVC-Debug from the project Configuration pull down menu.
Project / Generate Cache menu option
Build / Build All menu option
- Select
hikogui_demo.exe from the Select Startup Item... pull-down menu.
Debug / Start Debugging
Note: A "Window Security Alert" may show up, this is due to the RenderDoc API creating a network server so that the RenderDoc application can remotely communicate to the hikogui_demo application.
Just-in-time debugging with Visual Studio
When a hikogui application hits a break-point while not running with a debugger the windows 10 CRT will try to start the just-in-time debugger as a fallback.
See Just in time debugging.
A common problem in Windows 10 is missing registry entries for the jit debugger to work, set the following two registry entries for 64 bit and 32 bit applications:
- HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug "Auto" DWORD (1)
- HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows NT\CurrentVersion\AeDebug "Auto" DWORD (1)
Building and running using the "Developer Command Prompt for VS"
c:\Users\Tjienta\Projects> cd hikogui
c:\Users\Tjienta\Projects\hikogui> mkdir build
c:\Users\Tjienta\Projects\hikogui\build> cmake .. -DCMAKE_VERBOSE_MAKEFILE=ON -DBUILD_SHARED_LIBS=OFF
c:\Users\Tjienta\Projects\hikogui\build> cmake --build . --config Debug
c:\Users\Tjienta\Projects\hikogui\build> cmake --install . --config Debug --prefix install
c:\Users\Tjienta\Projects\hikogui\build> install\tests\hikogui_tests.exe
c:\Users\Tjienta\Projects\hikogui\build> install\examples\hikogui_demo\hikogui_demo.exe
Building and running using the "Developer Command Prompt for VS" with vcpkg
c:\Users\Tjienta\Projects> cd hikogui
c:\Users\Tjienta\Projects\hikogui> mkdir build
c:\Users\Tjienta\Projects\hikogui\build> cmake .. -DCMAKE_VERBOSE_MAKEFILE=ON \
-DBUILD_SHARED_LIBS=OFF \
-DVCPKG_TARGET_TRIPLET=x64-windows-static \
-DCMAKE_TOOLCHAIN_FILE=C:/tools/vcpkg/scripts/buildsystems/vcpkg.cmake
c:\Users\Tjienta\Projects\hikogui\build> cmake --build . --config Debug
c:\Users\Tjienta\Projects\hikogui\build> cmake --install . --config Debug --prefix install
c:\Users\Tjienta\Projects\hikogui\build> install\tests\hikogui_tests.exe
c:\Users\Tjienta\Projects\hikogui\build> install\examples\hikogui_demo\hikogui_demo.exe