diff --git a/.gitignore b/.gitignore index ff512f3..881257c 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ sources/zstd sources/webshims sources/minetest sources/irrlichtmt +sources/minetest_game diff --git a/build_all.sh b/build_all.sh index 24fed8a..f972263 100755 --- a/build_all.sh +++ b/build_all.sh @@ -26,8 +26,10 @@ emcc --clear-cache --clear-ports ./build_curl.sh # uses webshims, openssl, zlib # Minetest -./build_fsroot.sh ./build_minetest.sh +# Virtual file system +./build_fsroot.sh + # Finished product ./build_www.sh diff --git a/build_fsroot.sh b/build_fsroot.sh index 6b48fc7..333765b 100755 --- a/build_fsroot.sh +++ b/build_fsroot.sh @@ -8,43 +8,42 @@ source common.sh -# TODO: Use `make package` for this instead. -MTDIR="minetest-5.5.1-win64" -unpack_source $MTDIR - pushd "$BUILD_DIR" rm -rf fsroot mkdir fsroot +cp -a "minetest-install" fsroot/minetest -# Copy root certificates for OpenSSL -mkdir -p fsroot/etc/ssl/certs -# ca-certificates.crt may be a symlink -cat /etc/ssl/certs/ca-certificates.crt > fsroot/etc/ssl/certs/ca-certificates.crt - -mv $MTDIR fsroot/minetest +############################################# pushd fsroot/minetest -# Don't need the Windows exe/dlls -rm -rf bin - +rm -rf bin unix # Emscripten strips empty directories. But bin/ needs to be present so that # realpath() works on relative paths starting with bin/../ mkdir bin echo "This is here to ensure bin exists" > bin/readme.txt -# Replace these directories with the ones from the source directory -for I in client builtin clientmods games/devtest textures; do - rm -rf "$I" - cp -r "$MINETEST_REPO/$I" "$I" -done - # Copy the irrlicht shaders cp -r "$IRRLICHT_REPO/media/Shaders" client/shaders/Irrlicht +rm -rf games/minetest_game +cp -a "$SOURCES_DIR"/minetest_game games +cd games/minetest_game +rm -rf ".git" ".github" + popd + +############################################# +# Copy root certificates for OpenSSL +pushd fsroot +mkdir -p etc/ssl/certs +# May be a symlink, use cat to copy contents +cat /etc/ssl/certs/ca-certificates.crt > etc/ssl/certs/ca-certificates.crt +popd + + # Make fsroot.tar rm -f fsroot.tar pushd fsroot diff --git a/build_minetest.sh b/build_minetest.sh index 04e6554..cf8c71b 100755 --- a/build_minetest.sh +++ b/build_minetest.sh @@ -57,8 +57,10 @@ if ! $INCREMENTAL; then -DEGL_INCLUDE_DIR="$DUMMY_INCLUDE_DIR" \ -DCURL_LIBRARY="$INSTALL_DIR/lib/libcurl.a" \ -DCURL_INCLUDE_DIR="$INSTALL_DIR/include" \ + -DCMAKE_INSTALL_PREFIX="$BUILD_DIR/minetest-install" \ -G "Unix Makefiles" \ "$SOURCES_DIR/minetest" fi -emmake make +rm -rf "$BUILD_DIR/minetest-install" +emmake make install diff --git a/fetch_sources.sh b/fetch_sources.sh index 07e3414..9f1abe5 100755 --- a/fetch_sources.sh +++ b/fetch_sources.sh @@ -16,7 +16,6 @@ getsource "https://downloads.xiph.org/releases/vorbis/libvorbis-1.3.7.tar.gz" 0e getsource "https://www.sqlite.org/src/tarball/698edb77/SQLite-698edb77.tar.gz" b1568dc5d17788b9dd9575ecd224b3f7985b51764bc2f34f4808d851332840ef getsource "https://www.openssl.org/source/openssl-1.1.1n.tar.gz" 40dceb51a4f6a5275bde0e6bf20ef4b91bfc32ed57c0552e2e8e15463372b17a getsource "https://curl.se/download/curl-7.82.0.tar.bz2" 46d9a0400a33408fd992770b04a44a7434b3036f2e8089ac28b57573d59d371f -getsource "https://github.com/minetest/minetest/releases/download/5.5.1/minetest-5.5.1-win64.zip" 9be48fb4126312b0d8fd048d1ab06d59b3109f6fe037fcd5ab65b99507e68a5f getsource "https://www.libarchive.org/downloads/libarchive-3.6.1.tar.xz" 5a411aceb978f43e626f0c2d1812ddd8807b645ed892453acabd532376c148e6 # These are never checked into the repo, since they are separate git repos. @@ -27,6 +26,9 @@ getrepo libpng "https://git.code.sf.net/p/libpng/code" a37d4836519517bdce6cb9d95 getrepo freetype "https://gitlab.freedesktop.org/freetype/freetype.git" a8e4563c3418ed74d39019a6c5e2122d12c8f56f getrepo zstd "https://github.com/facebook/zstd.git" e47e674cd09583ff0503f0f6defd6d23d8b718d3 +# Minetest Game +getrepo minetest_game "https://github.com/minetest/minetest_game.git" 99a719309559b632af65756f380496aa269d4b4a + # These repos are part of the fork getrepo webshims "https://github.com/paradust7/webshims.git" 91c3fe85d2cb7f85cc8e19d3f53dc8f252a69ff7 getrepo minetest "https://github.com/paradust7/minetest.git" 4f32398cdf2b245bd8661f1ff8b0efc74c148cc9 diff --git a/sources/minetest-5.5.1-win64.zip b/sources/minetest-5.5.1-win64.zip deleted file mode 100644 index 2d57a61..0000000 Binary files a/sources/minetest-5.5.1-win64.zip and /dev/null differ