Add WindowsApp
* Fix compiling/crash for Windows * Windows build scripts * Use existing files for buildmaster
parent
567db6b2b0
commit
7041241bd5
|
@ -111,3 +111,6 @@ build/iOS/deps/*
|
|||
build/iOS/assets.zip
|
||||
build/iOS/worlds.zip
|
||||
build/iOS/Ads
|
||||
|
||||
## WindowsApp files
|
||||
build/WindowsApp/multicraft-windows.zip
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
Instructions:
|
||||
1) on Linux: sudo apt install unzip zip gettext cmake p7zip-full
|
||||
2) on Windows: install DesktopAppConverter and the Windows SDK
|
||||
3) Run build.sh to create the ZIP file
|
||||
4) Transfer multicraft-windows.zip to Windows and extract it
|
||||
5) Edit the settings in the .bat file
|
||||
6) Run the .bat file as Administrator to generate an Appx package
|
|
@ -0,0 +1,32 @@
|
|||
#!/bin/bash -e
|
||||
|
||||
bit=32
|
||||
#bit=64
|
||||
|
||||
mingw=/tmp/mingw${bit}
|
||||
if [ ! -d $mingw ]; then
|
||||
if [ $bit -eq 64 ]; then
|
||||
wget http://minetest.kitsunemimi.pw/mingw-w64-x86_64_7.1.1_ubuntu14.04.7z -O mingw.7z
|
||||
else
|
||||
wget http://minetest.kitsunemimi.pw/mingw-w64-i686_7.1.1_ubuntu14.04.7z -O mingw.7z
|
||||
fi
|
||||
7z x -y -o$mingw mingw.7z
|
||||
rm mingw.7z
|
||||
fi
|
||||
export PATH="$mingw/bin:$PATH"
|
||||
|
||||
EXISTING_DIR=$PWD/../.. \
|
||||
./buildwin${bit}.sh /tmp/build${bit}
|
||||
|
||||
cd /tmp/build${bit}/MultiCraft/_build/_CPack_Packages/*/ZIP/
|
||||
rm *.zip; dir=$(echo *)
|
||||
if [ $bit -eq 64 ]; then
|
||||
base=$mingw/x86_64-w64-mingw32/bin
|
||||
else
|
||||
base=$mingw/i686-w64-mingw32/bin
|
||||
fi
|
||||
cp -pv $base/lib{gcc,stdc++,winpthread}*.dll $dir/bin/
|
||||
|
||||
rm -f $OLDPWD/multicraft-windows.zip
|
||||
zip -r $OLDPWD/multicraft-windows.zip $dir
|
||||
echo "Done"
|
|
@ -67,37 +67,25 @@ cd $libdir
|
|||
[ -d luajit ] || unzip -o $packagedir/luajit-$luajit_version.zip -d luajit
|
||||
[ -d leveldb ] || unzip -o $packagedir/libleveldb-$leveldb_version.zip -d leveldb
|
||||
|
||||
# Get minetest
|
||||
# Get the source
|
||||
cd $builddir
|
||||
if [ ! "x$EXISTING_MINETEST_DIR" = "x" ]; then
|
||||
ln -s $EXISTING_MINETEST_DIR minetest
|
||||
else
|
||||
[ -d minetest ] && (cd minetest && git pull) || (git clone https://github.com/minetest/minetest)
|
||||
fi
|
||||
cd minetest
|
||||
git_hash=$(git rev-parse --short HEAD)
|
||||
|
||||
# Get minetest_game
|
||||
cd games
|
||||
if [ "x$NO_MINETEST_GAME" = "x" ]; then
|
||||
[ -d minetest_game ] && (cd minetest_game && git pull) || (git clone https://github.com/minetest/minetest_game)
|
||||
fi
|
||||
cd ../..
|
||||
[ -d MultiCraft ] || ln -s "$EXISTING_DIR" MultiCraft
|
||||
|
||||
# Build the thing
|
||||
cd minetest
|
||||
cd MultiCraft
|
||||
[ -d _build ] && rm -Rf _build/
|
||||
mkdir _build
|
||||
cd _build
|
||||
# TODO: gettext is currently disabled
|
||||
cmake .. \
|
||||
-DCMAKE_INSTALL_PREFIX=/tmp \
|
||||
-DVERSION_EXTRA=$git_hash \
|
||||
-DBUILD_CLIENT=1 -DBUILD_SERVER=0 \
|
||||
-DCMAKE_TOOLCHAIN_FILE=$toolchain_file \
|
||||
-DRUN_IN_PLACE=0 \
|
||||
\
|
||||
-DENABLE_SOUND=1 \
|
||||
-DENABLE_CURL=1 \
|
||||
-DENABLE_GETTEXT=1 \
|
||||
-DENABLE_GETTEXT=0 \
|
||||
-DENABLE_FREETYPE=1 \
|
||||
-DENABLE_LEVELDB=1 \
|
||||
\
|
|
@ -1,7 +1,14 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
builddir="$( pwd )"
|
||||
dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
if [ $# -ne 1 ]; then
|
||||
echo "Usage: $0 <build directory>"
|
||||
exit 1
|
||||
fi
|
||||
builddir=$1
|
||||
mkdir -p $builddir
|
||||
builddir="$( cd "$builddir" && pwd )"
|
||||
packagedir=$builddir/packages
|
||||
libdir=$builddir/libs
|
||||
|
||||
|
@ -61,18 +68,20 @@ cd $libdir
|
|||
[ -d luajit ] || unzip -o $packagedir/luajit-$luajit_version.zip -d luajit
|
||||
[ -d leveldb ] || unzip -o $packagedir/libleveldb-$leveldb_version.zip -d leveldb
|
||||
|
||||
# Get MultiCraft
|
||||
# Get the source
|
||||
cd $builddir
|
||||
[ -d MultiCraft ] || ln -s "$EXISTING_DIR" MultiCraft
|
||||
|
||||
# Build the thing
|
||||
cd MultiCraft
|
||||
[ -d _build ] && rm -Rf _build/
|
||||
mkdir _build
|
||||
cd _build
|
||||
cmake .. \
|
||||
-DCMAKE_TOOLCHAIN_FILE=$toolchain_file \
|
||||
-DCMAKE_INSTALL_PREFIX=/tmp \
|
||||
-DVERSION_EXTRA=$git_hash \
|
||||
-DBUILD_CLIENT=1 -DBUILD_SERVER=0 \
|
||||
-DCMAKE_TOOLCHAIN_FILE=$toolchain_file \
|
||||
-DRUN_IN_PLACE=0 \
|
||||
\
|
||||
-DENABLE_SOUND=1 \
|
||||
-DENABLE_CURL=1 \
|
||||
|
@ -128,6 +137,6 @@ cmake .. \
|
|||
-DLEVELDB_LIBRARY=$libdir/leveldb/lib/libleveldb.dll.a \
|
||||
-DLEVELDB_DLL=$libdir/leveldb/bin/libleveldb.dll
|
||||
|
||||
make package -j8
|
||||
make package -j2
|
||||
|
||||
# EOF
|
|
@ -0,0 +1,23 @@
|
|||
@echo off
|
||||
|
||||
REM ---- change these ----
|
||||
SET folderpath=C:\Users\Doge\Desktop\MultiCraft-1.1.8-dev-win32
|
||||
SET outputpath=C:\Users\Doge\Desktop
|
||||
SET version=1.1.8.0
|
||||
SET publisher=example text
|
||||
REM ----------------------
|
||||
|
||||
rem Find path to DesktopAppConverter
|
||||
pushd "%ProgramFiles%\WindowsApps"
|
||||
set cmd="dir /b Microsoft.DesktopAppConverter_*"
|
||||
for /f "tokens=*" %%i in (' %cmd% ') do set appname=%%i
|
||||
popd
|
||||
|
||||
echo Please wait...
|
||||
powershell -NoProfile -NoLogo -ExecutionPolicy Bypass^
|
||||
-File "%ProgramFiles%\WindowsApps\%appname%\DesktopAppConverter.ps1"^
|
||||
-Installer "%folderpath%" -AppExecutable MultiCraft.exe^
|
||||
-Destination "%outputpath%" -PackageName MultiCraft^
|
||||
-Publisher "CN=%publisher%" -Version %version%
|
||||
|
||||
pause
|
|
@ -2,12 +2,12 @@
|
|||
SET(CMAKE_SYSTEM_NAME Windows)
|
||||
|
||||
# which compilers to use for C and C++
|
||||
SET(CMAKE_C_COMPILER i586-mingw32msvc-gcc)
|
||||
SET(CMAKE_CXX_COMPILER i586-mingw32msvc-g++)
|
||||
SET(CMAKE_RC_COMPILER i586-mingw32msvc-windres)
|
||||
SET(CMAKE_C_COMPILER i686-w64-mingw32-gcc)
|
||||
SET(CMAKE_CXX_COMPILER i686-w64-mingw32-g++)
|
||||
SET(CMAKE_RC_COMPILER i686-w64-mingw32-windres)
|
||||
|
||||
# here is the target environment located
|
||||
SET(CMAKE_FIND_ROOT_PATH /usr/i586-mingw32msvc)
|
||||
SET(CMAKE_FIND_ROOT_PATH /tmp/mingw32/i686-w64-mingw32)
|
||||
|
||||
# adjust the default behaviour of the FIND_XXX() commands:
|
||||
# search headers and libraries in the target environment, search
|
|
@ -7,7 +7,7 @@ SET(CMAKE_CXX_COMPILER x86_64-w64-mingw32-g++)
|
|||
SET(CMAKE_RC_COMPILER x86_64-w64-mingw32-windres)
|
||||
|
||||
# here is the target environment located
|
||||
SET(CMAKE_FIND_ROOT_PATH /usr/x86_64-w64-mingw32)
|
||||
SET(CMAKE_FIND_ROOT_PATH /tmp/mingw64/x86_64-w64-mingw32)
|
||||
|
||||
# adjust the default behaviour of the FIND_XXX() commands:
|
||||
# search headers and libraries in the target environment, search
|
Binary file not shown.
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 66 KiB |
|
@ -431,7 +431,8 @@ void set_default_settings(Settings *settings)
|
|||
if (!lang[0])
|
||||
errorstream << "Language auto-detection failed!" << std::endl;
|
||||
settings->setDefault("language", lang);
|
||||
|
||||
#else
|
||||
settings->setDefault("screen_dpi", "72");
|
||||
#endif
|
||||
|
||||
#ifdef __IOS__
|
||||
|
|
Loading…
Reference in New Issue