forked from minetest/minetest
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into gymnasium
- Loading branch information
Showing
17 changed files
with
201 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,9 @@ | |
[submodule "lib/zmqpp"] | ||
path = lib/zmqpp | ||
url = [email protected]:zeromq/zmqpp.git | ||
[submodule "games/minetest_game"] | ||
path = games/minetest_game | ||
url = [email protected]:minetest/minetest_game.git | ||
[submodule "lib/SDL"] | ||
path = lib/SDL | ||
url = [email protected]:libsdl-org/SDL.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
.PHONY: all deps repos sdl2 package zmqpp minetester minetest install demo proto clean | ||
|
||
MINETESTER_VERSION := 0.0.1 | ||
SDL2_CMAKE_FILE := lib/SDL/build/lib/cmake/SDL2/sdl2-config.cmake | ||
ZMQPP_LIB_FILE := lib/zmqpp/build/max-g++/libzmqpp.a | ||
MINETEST_BINARY := bin/minetest | ||
MINETESTER_WHEEL := build/package/wheel/minetester-$(MINETESTER_VERSION)-py3-none-manylinux_2_35_x86_64.whl | ||
|
||
default: minetest | ||
|
||
deb_deps: | ||
# Install debian dependencies | ||
util/minetester/install_deps.sh | ||
|
||
python_build_deps: | ||
# Install python build dependencies | ||
pip install -r build_requirements.txt | ||
|
||
repos: | ||
# Init all submodules | ||
git submodule update --init --recursive | ||
|
||
$(SDL2_CMAKE_FILE): | ||
# compile sdl2 | ||
util/minetester/build_sdl2.sh | ||
|
||
sdl2: $(SDL2_CMAKE_FILE) | ||
|
||
proto: | ||
#create protobuf c++ and python files | ||
util/minetester/compile_proto.sh | ||
|
||
$(ZMQPP_LIB_FILE): | ||
#compile zmqpp | ||
util/minetester/build_zmqpp.sh | ||
|
||
zmqpp: $(ZMQPP_LIB_FILE) | ||
|
||
|
||
$(MINETEST_BINARY): | ||
#build minetest binary | ||
util/minetester/build_minetest.sh | ||
|
||
minetest: $(MINETEST_BINARY) | ||
|
||
$(MINETESTER_WHEEL): | ||
#build minetester python library | ||
util/minetester/build_minetester.sh | ||
|
||
minetester: $(MINETESTER_WHEEL) | ||
|
||
install: | ||
#install python library | ||
pip install $(MINETESTER_WHEEL) | ||
|
||
demo: | ||
#install run demo script | ||
python -m minetester.scripts.test_loop | ||
|
||
clean: | ||
#clean up repo | ||
util/minetester/clean.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
setuptools | ||
build | ||
auditwheel |
Submodule minetest_game
added at
110c23
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
ROOT=$(pwd) | ||
|
||
mkdir -p build/normal | ||
mkdir -p build/headless | ||
|
||
cd build/headless | ||
|
||
|
||
SDL2_DIR=${ROOT}/lib/SDL/build/lib/cmake/SDL2/ | ||
|
||
echo ${SDL2_DIR} | ||
|
||
cmake ../.. -DRUN_IN_PLACE=TRUE -DBUILD_HEADLESS=1 -DSDL2_DIR=${SDL2_DIR} | ||
make -j$(( $(nproc) > 1 ? $(nproc) - 1 : 1 )) #use max(nproc - 1,1) threads | ||
|
||
cd ../.. | ||
|
||
mv bin/minetest bin/minetest_headless | ||
|
||
cd build/normal | ||
cmake ../.. -DRUN_IN_PLACE=TRUE -DBUILD_HEADLESS=0 -DSDL2_DIR= | ||
make -j$(( $(nproc) > 1 ? $(nproc) - 1 : 1 )) #use max(nproc - 1,1) threads | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
mkdir -p build/package | ||
cp setup.py build/package/ | ||
cp -r minetester build/package/ | ||
mkdir build/package/minetester/minetest | ||
|
||
#Copy minetest data | ||
cp -r bin build/package/minetester/minetest | ||
cp -r builtin build/package/minetester/minetest | ||
cp -r client build/package/minetester/minetest | ||
cp -r clientmods build/package/minetester/minetest | ||
cp -r cursors build/package/minetester/minetest | ||
cp -r fonts build/package/minetester/minetest | ||
cp -r games build/package/minetester/minetest | ||
cp -r misc build/package/minetester/minetest | ||
cp -r mods build/package/minetester/minetest | ||
cp -r po build/package/minetester/minetest | ||
cp -r textures build/package/minetester/minetest | ||
|
||
#Make wheel | ||
cd build/package | ||
python -m build | ||
|
||
#Update RPATHS and add relevant libraries to wheel | ||
cd dist | ||
auditwheel repair minetester-*.*.*-py3-none-any.whl --plat manylinux_2_35_x86_64 | ||
|
||
cd ../../.. | ||
|
||
mkdir build/package/wheel | ||
|
||
cp build/package/dist/wheelhouse/minetester-*.*.*-py3-none-manylinux_2_35_x86_64.whl build/package/wheel | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
cd lib/SDL | ||
mkdir build | ||
cd build | ||
../configure --prefix=`pwd` && make && make install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
cd lib/zmqpp | ||
make |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
rm -r build | ||
rm bin/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/bin/bash | ||
protoc -I=proto/ --python_out=minetester/proto --cpp_out=src proto/*.proto |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/bash | ||
|
||
# Get the operating system name | ||
OS=$(lsb_release -si) | ||
|
||
# Check if the OS is Ubuntu | ||
if [ "$OS" == "Ubuntu" ]; then | ||
# If it's Ubuntu, execute the command | ||
echo "You are running Ubuntu. Executing command..." | ||
sudo apt-get install xvfb g++ make libzmq3-dev libtool pkg-config build-essential autoconf automake libc6-dev cmake libpng-dev libjpeg-dev libxi-dev libgl1-mesa-dev libsqlite3-dev libogg-dev libvorbis-dev libopenal-dev libcurl4-gnutls-dev libfreetype6-dev zlib1g-dev libgmp-dev libjsoncpp-dev libzstd-dev libluajit-5.1-dev protobuf-compiler patchelf | ||
else | ||
# If it's not Ubuntu, print a message and exit | ||
echo "This script only works on Ubuntu. Exiting." | ||
exit 1 | ||
fi |