Add Win64 build
parent
7899e0ebbe
commit
5c5b36c384
|
@ -11,9 +11,9 @@ jobs:
|
|||
- name: Install deps
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y build-essential cmake libgl1-mesa-dev libglfw3-dev libglew-dev libsqlite3-dev zlib1g-dev lua5.3
|
||||
sudo apt-get install -y build-essential cmake lua5.3 xorg-dev libgl-dev
|
||||
- name: Build
|
||||
run: |
|
||||
cd src
|
||||
cmake .
|
||||
cmake -B build -S src
|
||||
cd build
|
||||
make -j$(nproc)
|
||||
|
|
|
@ -11,13 +11,16 @@ jobs:
|
|||
- name: Install deps
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y build-essential cmake lua5.3 curl zip
|
||||
- name: Build ubuntu snapshot
|
||||
sudo apt-get install -y build-essential cmake lua5.3 xorg-dev libgl-dev mingw-w64 curl zip
|
||||
- name: Build linux snapshot
|
||||
run: |
|
||||
./snapshot.sh
|
||||
- name: Build windows snapshot
|
||||
- name: Build win32 snapshot
|
||||
run: |
|
||||
./snapshot.sh mingw
|
||||
./snapshot.sh win32
|
||||
- name: Build win64 snapshot
|
||||
run: |
|
||||
./snapshot.sh win64
|
||||
- name: Upload snapshots
|
||||
env:
|
||||
SECRET: ${{ secrets.ELIDRAGON_UPLOAD_TOKEN }}
|
||||
|
|
20
BUILDING.md
20
BUILDING.md
|
@ -1,7 +1,8 @@
|
|||
# Building instructions
|
||||
|
||||
## Dependencies
|
||||
To build anything you need Git, CMake, Lua, Bash and GCC. Make sure these dependencies are installed on your system.
|
||||
You need Git, CMake, Lua, Bash and GCC. Make sure these dependencies are installed on your system. (on Debian based systems: `apt install git cmake build-essential`)
|
||||
|
||||
All other dependencies are included as submodules, compiled automatically and statically linked.
|
||||
Make sure to clone the repository recursively:
|
||||
|
||||
|
@ -9,6 +10,14 @@ Make sure to clone the repository recursively:
|
|||
git clone --recurse-submodules https://github.com/dragonblocks/dragonblocks_alpha.git
|
||||
```
|
||||
|
||||
## Client dependencies
|
||||
|
||||
If you want to build the client, it is required to install the build dependencies for GLEW and GLFW (on X11/Debian based systems: `apt install xorg-dev libgl-dev`).
|
||||
|
||||
Refer to:
|
||||
- https://www.glfw.org/docs/3.3/compile.html
|
||||
- http://glew.sourceforge.net/build.html
|
||||
|
||||
## Building a debug build
|
||||
By default CMake will make a debug build if nothing else is specified. Simply use
|
||||
|
||||
|
@ -27,8 +36,13 @@ If you use a debug build, the singleplayer script should be invoked from the bui
|
|||
# Native snapshot
|
||||
./snapshot.sh
|
||||
|
||||
# Crosscompiling for windows (requires i686-w64-mingw32-gcc-posix)
|
||||
./snapshot.sh mingw
|
||||
# Crosscompiling for windows
|
||||
|
||||
# win32 (requires i686-w64-mingw32-gcc-posix)
|
||||
./snapshot.sh win32
|
||||
|
||||
# win64 (requires x86_64-w64-mingw32-gcc-posix)
|
||||
./snapshot.sh win64
|
||||
```
|
||||
|
||||
Creates snapshot zipfiles.
|
||||
|
|
|
@ -9,12 +9,12 @@ Head to <https://www.elidragon.tk/dragonblocks_alpha/> for snapshot and release
|
|||
|
||||
```sh
|
||||
# on posix
|
||||
./dragonblocks_server "[<address>]:<port>"
|
||||
./dragonblocks_client "[<address>]:<port>"
|
||||
./dragonblocks_server "<address>:<port>"
|
||||
./dragonblocks_client "<address>:<port>"
|
||||
|
||||
# on windows
|
||||
dragonblocks_server.exe "[<address>]:<port>"
|
||||
dragonblocks_client.exe "[<address>]:<port>"
|
||||
dragonblocks_server.exe "<address>:<port>"
|
||||
dragonblocks_client.exe "<address>:<port>"
|
||||
```
|
||||
|
||||
or alternatively:
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 72fd472f45d9589269d7786877dff8d45586c006
|
||||
Subproject commit 356f2ea3acb517cca7007556074aa0ed94b48876
|
13
snapshot.sh
13
snapshot.sh
|
@ -11,12 +11,14 @@ SNAPSHOT=dragonblocks_alpha-$VERSION
|
|||
TOOLCHAIN=
|
||||
DOTEXE=
|
||||
DOTSH=".sh"
|
||||
if [[ "$1" == "mingw" ]]; then
|
||||
BUILD=build-mingw
|
||||
SNAPSHOT=dragonblocks_alpha-win64-$VERSION
|
||||
TOOLCHAIN=mingw.cmake
|
||||
FLAGS="-Ofast"
|
||||
if [[ "$1" != "" ]]; then
|
||||
BUILD=build-$1
|
||||
SNAPSHOT=dragonblocks_alpha-$1-$VERSION
|
||||
TOOLCHAIN=$1.cmake
|
||||
DOTEXE=".exe"
|
||||
DOTSH=".bat"
|
||||
FLAGS="$FLAGS -static"
|
||||
fi
|
||||
|
||||
mkdir -p $BUILD
|
||||
|
@ -24,7 +26,8 @@ mkdir -p $BUILD
|
|||
cmake -B $BUILD -S src \
|
||||
-DCMAKE_BUILD_TYPE="Release" \
|
||||
-DASSET_PATH="assets/" \
|
||||
-DCMAKE_C_FLAGS="-Ofast" \
|
||||
-DCMAKE_C_FLAGS="$FLAGS" \
|
||||
-DCMAKE_CXX_FLAGS="$FLAGS" \
|
||||
-DCMAKE_TOOLCHAIN_FILE="$TOOLCHAIN"
|
||||
|
||||
make --no-print-directory -C $BUILD -j$(nproc)
|
||||
|
|
|
@ -15,11 +15,13 @@ endif()
|
|||
|
||||
# Dependencies
|
||||
|
||||
cmake_policy(SET CMP0077 NEW)
|
||||
set(CMAKE_POLICY_DEFAULT_CMP0077 NEW)
|
||||
|
||||
set(SKIP_INSTALL_ALL ON)
|
||||
set(BUILD_SHARED_LIBS OFF)
|
||||
|
||||
set(ZLIB_LIBRARY zlibstatic)
|
||||
set(ZLIB_INCLUDE_DIR "${DEPS_DIR}/zlib")
|
||||
|
||||
set(FT_DISABLE_ZLIB OFF)
|
||||
set(FT_DISABLE_BZIP2 ON)
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
set(CMAKE_SYSTEM_NAME Windows)
|
||||
|
||||
set(CMAKE_C_COMPILER x86_64-w64-mingw32-gcc-posix)
|
||||
set(CMAKE_CXX_COMPILER x86_64-w64-mingw32-g++-posix)
|
|
@ -13,6 +13,7 @@ curl -f -i -X POST -H "Content-Type: multipart/form-data" \
|
|||
-F "secret=$SECRET" \
|
||||
-F "name=$VERSION" \
|
||||
-F "is_release=$IS_RELEASE" \
|
||||
-F "ubuntu=@dragonblocks_alpha-$VERSION.zip" \
|
||||
-F "windows=@dragonblocks_alpha-win64-$VERSION.zip" \
|
||||
-F "linux=@dragonblocks_alpha-$VERSION.zip" \
|
||||
-F "win32=@dragonblocks_alpha-win32-$VERSION.zip" \
|
||||
-F "win64=@dragonblocks_alpha-win64-$VERSION.zip" \
|
||||
https://elidragon.tk/dragonblocks_alpha/upload.php
|
||||
|
|
Loading…
Reference in New Issue