mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-07 12:21:52 +09:00
build script update
This commit is contained in:
@@ -6,6 +6,8 @@ APPIMAGETOOL="appimagetool-x86_64.AppImage"
|
||||
SRCFILES="terrarumlinux_arm"
|
||||
DESTDIR="TerrarumLinux.arm"
|
||||
RUNTIME="runtime-linux-arm"
|
||||
DESKTOPFILE="../out/build_autogen_linux.desktop"
|
||||
JARNAME="TerrarumBuild.jar"
|
||||
|
||||
if [ ! -d "../assets_release" ]; then
|
||||
echo "'assets_release' does not exist; prepare the assets for the release and put them into the assets_release directory, exiting now." >&2
|
||||
@@ -18,7 +20,7 @@ mkdir $DESTDIR
|
||||
|
||||
# Prepare an application
|
||||
cp icns.png $DESTDIR/icns.png
|
||||
cp $SRCFILES/Terrarum.desktop $DESTDIR/
|
||||
cp $DESKTOPFILE $DESTDIR/
|
||||
cp $SRCFILES/AppRun $DESTDIR/AppRun
|
||||
chmod +x $DESTDIR/AppRun
|
||||
|
||||
@@ -30,7 +32,7 @@ mv $DESTDIR/out/$RUNTIME/bin/java $DESTDIR/out/$RUNTIME/bin/Terrarum
|
||||
# Copy over all the assets and a jarfile
|
||||
cp -r "../assets_release" $DESTDIR/
|
||||
mv $DESTDIR/assets_release $DESTDIR/assets
|
||||
cp "../out/TerrarumBuild.jar" $DESTDIR/out/
|
||||
cp "../out/$JARNAME" $DESTDIR/out/
|
||||
|
||||
# Pack everything to AppImage
|
||||
ARCH=arm_aarch64 "./$APPIMAGETOOL" $DESTDIR "out/$DESTDIR.AppImage" || { echo 'Building AppImage failed' >&2; exit 1; }
|
||||
|
||||
@@ -6,6 +6,8 @@ APPIMAGETOOL="appimagetool-x86_64.AppImage"
|
||||
SRCFILES="terrarumlinux_x86"
|
||||
DESTDIR="TerrarumLinux.x86"
|
||||
RUNTIME="runtime-linux-x86"
|
||||
DESKTOPFILE="../out/build_autogen_linux.desktop"
|
||||
JARNAME="TerrarumBuild.jar"
|
||||
|
||||
if [ ! -d "../assets_release" ]; then
|
||||
echo "'assets_release' does not exist; prepare the assets for the release and put them into the assets_release directory, exiting now." >&2
|
||||
@@ -18,7 +20,7 @@ mkdir $DESTDIR
|
||||
|
||||
# Prepare an application
|
||||
cp icns.png $DESTDIR/icns.png
|
||||
cp $SRCFILES/Terrarum.desktop $DESTDIR/
|
||||
cp $DESKTOPFILE $DESTDIR/
|
||||
cp $SRCFILES/AppRun $DESTDIR/AppRun
|
||||
chmod +x $DESTDIR/AppRun
|
||||
|
||||
@@ -30,7 +32,7 @@ mv $DESTDIR/out/$RUNTIME/bin/java $DESTDIR/out/$RUNTIME/bin/Terrarum
|
||||
# Copy over all the assets and a jarfile
|
||||
cp -r "../assets_release" $DESTDIR/
|
||||
mv $DESTDIR/assets_release $DESTDIR/assets
|
||||
cp "../out/TerrarumBuild.jar" $DESTDIR/out/
|
||||
cp "../out/$JARNAME" $DESTDIR/out/
|
||||
|
||||
# Pack everything to AppImage
|
||||
"./$APPIMAGETOOL" $DESTDIR "out/$DESTDIR.AppImage" || { echo 'Building AppImage failed' >&2; exit 1; }
|
||||
|
||||
@@ -6,7 +6,8 @@ SRCFILES="terrarummac_arm"
|
||||
APPDIR="./TerrarumMac.arm.app"
|
||||
DESTDIR="out/$APPDIR"
|
||||
RUNTIME="runtime-osx-arm"
|
||||
VERSIONNUMFILE="../out/build_version_string.autogen"
|
||||
PLISTFILE="../out/build_autogen_macos_Info.plist"
|
||||
JARNAME="TerrarumBuild.jar"
|
||||
|
||||
if [ ! -d "../assets_release" ]; then
|
||||
echo "'assets_release' does not exist; prepare the assets for the release and put them into the assets_release directory, exiting now." >&2
|
||||
@@ -24,12 +25,7 @@ mkdir $DESTDIR/Contents/Resources
|
||||
cp AppIcon.icns $DESTDIR/Contents/Resources/AppIcon.icns
|
||||
cp $SRCFILES/Terrarum.sh $DESTDIR/Contents/MacOS/
|
||||
chmod +x $DESTDIR/Contents/MacOS/Terrarum.sh
|
||||
|
||||
# Prepare an plist
|
||||
cp $SRCFILES/Info.plist $DESTDIR/Contents/
|
||||
printf "\n<key>CFBundleVersion</key><string>" >> $DESTDIR/Contents/Info.plist
|
||||
cat $VERSIONNUMFILE >> $DESTDIR/Contents/Info.plist
|
||||
printf "</string>\n</dict></plist>" >> $DESTDIR/Contents/Info.plist
|
||||
cp $PLISTFILE $DESTDIR/Contents/Info.plist
|
||||
|
||||
# Copy over a Java runtime
|
||||
mkdir $DESTDIR/Contents/MacOS/out
|
||||
@@ -39,8 +35,9 @@ mv $DESTDIR/Contents/MacOS/out/$RUNTIME/bin/java $DESTDIR/Contents/MacOS/out/$RU
|
||||
# Copy over all the assets and a jarfile
|
||||
cp -r "../assets_release" $DESTDIR/Contents/MacOS/
|
||||
mv $DESTDIR/Contents/MacOS/assets_release $DESTDIR/Contents/MacOS/assets
|
||||
cp "../out/TerrarumBuild.jar" $DESTDIR/Contents/MacOS/out/
|
||||
cp "../out/$JARNAME" $DESTDIR/Contents/MacOS/out/
|
||||
|
||||
# zip everything
|
||||
cd "out"
|
||||
rm $APPDIR.zip
|
||||
7z a -tzip $APPDIR.zip $APPDIR
|
||||
|
||||
@@ -6,7 +6,8 @@ SRCFILES="terrarummac_x86"
|
||||
APPDIR="./TerrarumMac.x86.app"
|
||||
DESTDIR="out/$APPDIR"
|
||||
RUNTIME="runtime-osx-x86"
|
||||
VERSIONNUMFILE="../out/build_version_string.autogen"
|
||||
PLISTFILE="../out/build_autogen_macos_Info.plist"
|
||||
JARNAME="TerrarumBuild.jar"
|
||||
|
||||
if [ ! -d "../assets_release" ]; then
|
||||
echo "'assets_release' does not exist; prepare the assets for the release and put them into the assets_release directory, exiting now." >&2
|
||||
@@ -24,12 +25,7 @@ mkdir $DESTDIR/Contents/Resources
|
||||
cp AppIcon.icns $DESTDIR/Contents/Resources/AppIcon.icns
|
||||
cp $SRCFILES/Terrarum.sh $DESTDIR/Contents/MacOS/
|
||||
chmod +x $DESTDIR/Contents/MacOS/Terrarum.sh
|
||||
|
||||
# Prepare an plist
|
||||
cp $SRCFILES/Info.plist $DESTDIR/Contents/
|
||||
printf "\n<key>CFBundleVersion</key><string>" >> $DESTDIR/Contents/Info.plist
|
||||
cat $VERSIONNUMFILE >> $DESTDIR/Contents/Info.plist
|
||||
printf "</string>\n</dict></plist>" >> $DESTDIR/Contents/Info.plist
|
||||
cp $PLISTFILE $DESTDIR/Contents/Info.plist
|
||||
|
||||
# Copy over a Java runtime
|
||||
mkdir $DESTDIR/Contents/MacOS/out
|
||||
@@ -39,8 +35,9 @@ mv $DESTDIR/Contents/MacOS/out/$RUNTIME/bin/java $DESTDIR/Contents/MacOS/out/$RU
|
||||
# Copy over all the assets and a jarfile
|
||||
cp -r "../assets_release" $DESTDIR/Contents/MacOS/
|
||||
mv $DESTDIR/Contents/MacOS/assets_release $DESTDIR/Contents/MacOS/assets
|
||||
cp "../out/TerrarumBuild.jar" $DESTDIR/Contents/MacOS/out/
|
||||
cp "../out/$JARNAME" $DESTDIR/Contents/MacOS/out/
|
||||
|
||||
# zip everything
|
||||
cd "out"
|
||||
rm $APPDIR.zip
|
||||
7z a -tzip $APPDIR.zip $APPDIR
|
||||
|
||||
@@ -5,6 +5,8 @@ cd "${0%/*}"
|
||||
SRCFILES="terrarumwindows_x86"
|
||||
DESTDIR="TerrarumWindows.x86"
|
||||
RUNTIME="runtime-windows-x86"
|
||||
RCFILE="../out/build_autogen_windows.rc"
|
||||
JARNAME="TerrarumBuild.jar"
|
||||
|
||||
if [ ! -d "../assets_release" ]; then
|
||||
echo "'assets_release' does not exist; prepare the assets for the release and put them into the assets_release directory, exiting now." >&2
|
||||
@@ -21,8 +23,11 @@ then
|
||||
echo 'Mingw32 not found; please install mingw64-cross-gcc (or similar) to your system' >&2; exit 1;
|
||||
fi
|
||||
|
||||
x86_64-w64-mingw32-gcc -Os -s -o $DESTDIR/Terrarum.exe $SRCFILES/Terrarum.c || { echo 'Building EXE failed' >&2; exit 1; }
|
||||
# TODO add icon to the exe (use x86_64-w64-mingw32-windres?)
|
||||
# Compile .rc
|
||||
x86_64-w64-mingw32-windres $RCFILE -O coff -o $RCFILE.res
|
||||
|
||||
# compile exe
|
||||
x86_64-w64-mingw32-gcc -Os -s -o $DESTDIR/Terrarum.exe $SRCFILES/Terrarum.c $RCFILE.res || { echo 'Building EXE failed' >&2; exit 1; }
|
||||
|
||||
# Copy over a Java runtime
|
||||
mkdir $DESTDIR/out
|
||||
@@ -32,10 +37,10 @@ mv $DESTDIR/out/$RUNTIME/bin/java.exe $DESTDIR/out/$RUNTIME/bin/Terrarum.exe
|
||||
# Copy over all the assets and a jarfile
|
||||
cp -r "../assets_release" $DESTDIR/
|
||||
mv $DESTDIR/assets_release $DESTDIR/assets
|
||||
cp "../out/TerrarumBuild.jar" $DESTDIR/out/
|
||||
cp "../out/$JARNAME" $DESTDIR/out/
|
||||
|
||||
# Temporary solution: zip everything
|
||||
rm "out/TerrarumWindows.x86.zip"
|
||||
zip -r -9 -l "out/TerrarumWindows.x86.zip" $DESTDIR
|
||||
# zip everything
|
||||
rm "out/$DESTDIR.zip"
|
||||
zip -r -9 -l "out/$DESTDIR.zip" $DESTDIR
|
||||
rm -rf $DESTDIR || true
|
||||
echo "Build successful: $DESTDIR"
|
||||
|
||||
BIN
buildapp/icns.ico
Normal file
BIN
buildapp/icns.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.5 KiB |
@@ -1,6 +0,0 @@
|
||||
[Desktop Entry]
|
||||
Name=Terrarum
|
||||
Exec=AppRun
|
||||
Icon=icns
|
||||
Type=Application
|
||||
Categories=Game;
|
||||
@@ -1,6 +0,0 @@
|
||||
[Desktop Entry]
|
||||
Name=Terrarum
|
||||
Exec=AppRun
|
||||
Icon=icns
|
||||
Type=Application
|
||||
Categories=Game;
|
||||
1
buildapp/terrarumwindows_x86/terrarum.rc
Normal file
1
buildapp/terrarumwindows_x86/terrarum.rc
Normal file
@@ -0,0 +1 @@
|
||||
1 ICON "icns.ico"
|
||||
Reference in New Issue
Block a user