-
Notifications
You must be signed in to change notification settings - Fork 14
How to install Horizon on Windows 11
Sephus edited this page Sep 5, 2023
·
7 revisions
- Install Windows Visual Studio with "Desktop Development with C++" Enabled.
- Install vcpkg
- Install Dependencies Step 1 -
vcpkg install readline:x64-windows lua:x64-windows zlib:x64-windows sol2:x64-windows libmysql:x64-windows mysql-connector-cpp:x64-windows
- Install Dependencies Step 2 -
vcpkg install boost-log:x64-windows boost-filesystem:x64-windows boost-system:x64-windows boost-test:x64-windows boost-locale:x64-windows boost-crc:x64-windows boost-multi-array:x64-windows
- Add the following into your environment variables for swift command access - [code]
VCPKG Binary Installation Path -
C:\\vcpkg
- Find and add CMake to your environment variables -
C:\PROGRAM FILES\MICROSOFT VISUAL STUDIO\2022\COMMUNITY\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\CMake\bin
- Clone Horizon
git clone https://github.com/horizonxyz/horizon.git horizon
cd horizon; mkdir build; cd build;
- Run the configuration step for cmake. Replace
<path_to_installation_dir>
with the path to where you would want to have your binaries installed.
cmake .. -DCMAKE_TOOLCHAIN_FILE="C:/vcpkg/scripts/buildsystems/vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=x64-windows -DWITH_SOURCE_TREE=hierarchical-folders -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="<path-to-installation-dir>"
- Build Horizon
cmake --build . --config=Release
OR
cmake --build . --target=<target_name> (e.g. auth, char, zone, all tests etc...)
Your base project will deploy and create executables in the "CMAKE_INSTALL_PREFIX" directory path.
- Install MySQL by heading to the community installer web page and setup mysql. You need to setup a database and add a password. Issue a password and upload the sql file in the "sql-files" directory of the project.
Here is a post on the installation of MYSQL X-Protocol - a post on how it should be setup before running Horizon.
-
Once the sql files are uploaded, head on to copy the configuration of the auth, char, and zone servers into the installation directory as step
-
Keep in mind to rename the configuration files from -
<config file>.lua.dist
to
<config file>.lua
before starting the servers and add in the configurations such as passwords and IP addressing before moving on to the next step.
- Head on to cmd and get the following running -
auth.exe --with-config="config/auth-server.lua"
char.exe --with-config="config/char-server.lua"
zone.exe --with-config="config/zone-server.lua"