-
-
Notifications
You must be signed in to change notification settings - Fork 71
Building Instructions
Below are the given instructions for people who are looking to manually build the game, whether their OS is not supported yet by CI or they are planning on contributing to the project.
MacOS Building Instructions coming soon.
For Windows, you will be using the MSYS2 environment. Previously we have used nuwen.net's library, but those files are outdated and is not being maintained.
-
Install the MSYS2 environment.
-
Open MSYS2's
MSYS
shell. -
Check to ensure everything is up to date with
pacman -Syu
. You may have to do this multiple times.a. Get the essential developer packages if you don't already have them:
pacman -S --needed base-devel mingw-w64-x86_64-toolchain
-
Get git and MinGW Cmake by typing
pacman -S git mingw-w64-x86_64-cmake
a. If you want to use Clang instead of GCC to compile, get the Clang libraries by typing
pacman -S mingw-w64-x86_64-llvm mingw-w64-x86_64-clang
-
Clone the git with the command
git clone --recurse-submodules https://github.com/vittorioromeo/SSVOpenHexagon.git
-
Close the
MSYS
shell and open up theMINGW64
variant of the shell. -
Navigate to the
build
directory of the cloned repository -
Generate the makefiles under the MinGW generator:
cmake .. -G"MinGW Makefiles"
a. If you are compiling with Clang add
-DCMAKE_CXX_COMPILER="clang++"
-
Run
cmake --build .
a. If you get errors on LuaJIT (especially math functions), redo step 7 and try again.
-
Run the
copyArtifacts.bash
script and supply a path to yourmsys64
folder (May be as simple as entering/
). -
(optional) If you want music, copy assets from the Steam version of the game into your build folder. E.g.
cp -r "~/.steam/steamapps/common/Open Hexagon/Packs" "./build/"
Users of Arch-based distros may use the unofficial AUR package open-hexagon-git.
(Tested on Linux Mint 20, Manjaro 21.1.6 and Ubuntu 20.04 LTS)
-
Install dependencies
sudo apt-get install git make cmake gcc g++
On Debian-based distros, SFML relies on you to install all the dependencies yourself, so execute the following command below to do so:
sudo apt-get install libxrandr-dev libopengl-dev libudev-dev libfreetype-dev libopenal-dev libvorbis-dev libflac-dev
Ensure you have the latest versions on all dependencies.
Tip: If your distribution is not able to find
libopengl-dev
, you can install two packages:libglm-dev
andlibglew-dev
. Install both of these and it should substitute for OpenGL.sudo pacman -S git make cmake gcc sfml
-
Clone this repository with submodules:
git clone --recurse-submodules https://github.com/vittorioromeo/SSVOpenHexagon.git cd SSVOpenHexagon
-
Navigate to the
buildlx
folder (Not thebuild
folder) -
Generate the Makefiles through CMake by typing
cmake ..
-
Run the Makefiles by executing
make
.a. If you're confident that your computer can handle a workload, feel free to add the flag
-jN
, with N being an integer of CPU threads you want to dedicate to compiling.b. Start here if you ever make changes to an existing C++ file. If you make or delete a new C++ file, start from step 2.
-
If you plan on only playing the compiled version of the game, simply copy over the
SSVOpenHexagon
application to_RELEASE
and run it with./SSVOpenHexagon
. It should be able to link to all of the needed libraries.a. If nothing's linking properly, try running
sudo make install
. -
(optional) If you want music, copy assets from the Steam version of the game into your build folder. E.g.
cp -r "~/.steam/steamapps/common/Open Hexagon/Packs" "./build/"