Building a Luwow Project
Luwow gives full control to the user on how it should be built. Libraries can either be bound to the executable, or be their own dynamic link library files. In this page, we'll get into all of those details.
If you wish to build a Luwow project completely on your own, you can pull in the Core. It houses the engine, and sources for the binaries. However, in this page, we will be using the release repository, as it already contains everything we need for a working Luwow application. Let's begin.
Requirements
Supported Platforms
- Windows (Visual C++ compiler)
- Windows (MinGW C++ compiler)
- MacOS (Libc++ compiler)
- Linux (GNU compiler)
(Future OS plans include iPad and Android)
Setting Up
In a folder, run the commands below in your terminal:
1. Clone the Repository
If you forget the --recurse-submodules flag, you can follow up with:
2. Configure and Build the Project
By default, Luwow can be built on the supported platforms with:
Windows:
If using MinGW on Windows:
MacOS:
these commands. However, the Release repository comes with a variety of options to configure how the binaries and their libraries shall be built. Below is the list that describes almost all of them:
-D LUWOW_BUILD_EXECUTABLES:ONby default,ONbuilds the executable binaries,OFFdoes not.-D LUWOW_BUILD_LIBRARIES:ONby default,ONbuilds the libraries,OFFdoes not.-D LUWOW_LIBRARY_MODE:SHAREDby default,SHAREDbuilds the libraries as dynamic link libraries that can be loaded to the executable binary, whileSTATICbuilds the libraries and binds them to the executable binary.-D LUWOW_EXECUTABLE_TARGET:Luwow.RunScriptby default, the target name of the executable binary. This is used for dynamic link libraries to bind to the executable binary.
Luwow also supports 4 build type options:
ReleaseDebugMinSizeRelRelWithDebugInfo
While building, if a library supports it as an option, you can also specify which mode that library will be ran under. For more information, see native modules.
After the Build
If the build has been completed successfully, under the build/bin/Release (Windows) or build/bin (Mac) folder, you should see these binaries:
compilerunpackagerunscript
If LUWOW_BUILD_LIBRARIES is set to ON and LUWOW_LIBRARY_MODE is set to SHARED, a libraries folder will also be created alongside the binaries that contain the dynamic link libraries for each library.