mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-07 12:21:52 +09:00
asset archiving wip, font update
This commit is contained in:
@@ -5,6 +5,7 @@ what:
|
||||
|
||||
assets:
|
||||
./make_assets_release.sh || true
|
||||
./make_assets_archive.sh
|
||||
|
||||
linux_x86:
|
||||
./build_app_linux_x86.sh
|
||||
|
||||
@@ -9,8 +9,8 @@ RUNTIME="runtime-linux-arm"
|
||||
DESKTOPFILE="../out/build_autogen_linux.desktop"
|
||||
JARNAME="TerrarumBuild.jar"
|
||||
|
||||
if [ ! -f "out/assets.tar.zst" ] || [ ! -f "out/assets.manifest" ]; then
|
||||
echo "'assets.tar.zst' or 'assets.manifest' not found in out/; run 'make assets' first." >&2
|
||||
if [ ! -f "out/assets.tevd" ]; then
|
||||
echo "'assets.tevd' not found in out/; run 'make assets' first." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -29,9 +29,8 @@ mkdir $DESTDIR/out
|
||||
cp -r "../out/$RUNTIME" $DESTDIR/out/
|
||||
mv $DESTDIR/out/$RUNTIME/bin/java $DESTDIR/out/$RUNTIME/bin/java
|
||||
|
||||
# Copy over the asset archive, manifest, and jarfile
|
||||
cp "out/assets.tar.zst" $DESTDIR/
|
||||
cp "out/assets.manifest" $DESTDIR/
|
||||
# Copy over the asset archive and jarfile
|
||||
cp "out/assets.tevd" $DESTDIR/
|
||||
cp "../out/$JARNAME" $DESTDIR/out/
|
||||
|
||||
# Pack everything to AppImage
|
||||
|
||||
@@ -9,8 +9,8 @@ RUNTIME="runtime-linux-x86"
|
||||
DESKTOPFILE="../out/build_autogen_linux.desktop"
|
||||
JARNAME="TerrarumBuild.jar"
|
||||
|
||||
if [ ! -f "out/assets.tar.zst" ] || [ ! -f "out/assets.manifest" ]; then
|
||||
echo "'assets.tar.zst' or 'assets.manifest' not found in out/; run 'make assets' first." >&2
|
||||
if [ ! -f "out/assets.tevd" ]; then
|
||||
echo "'assets.tevd' not found in out/; run 'make assets' first." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -29,9 +29,8 @@ mkdir $DESTDIR/out
|
||||
cp -r "../out/$RUNTIME" $DESTDIR/out/
|
||||
mv $DESTDIR/out/$RUNTIME/bin/java $DESTDIR/out/$RUNTIME/bin/java
|
||||
|
||||
# Copy over the asset archive, manifest, and jarfile
|
||||
cp "out/assets.tar.zst" $DESTDIR/
|
||||
cp "out/assets.manifest" $DESTDIR/
|
||||
# Copy over the asset archive and jarfile
|
||||
cp "out/assets.tevd" $DESTDIR/
|
||||
cp "../out/$JARNAME" $DESTDIR/out/
|
||||
|
||||
# Pack everything to AppImage
|
||||
|
||||
@@ -9,8 +9,8 @@ RUNTIME="runtime-osx-arm"
|
||||
PLISTFILE="../out/build_autogen_macos_Info.plist"
|
||||
JARNAME="TerrarumBuild.jar"
|
||||
|
||||
if [ ! -f "out/assets.tar.zst" ] || [ ! -f "out/assets.manifest" ]; then
|
||||
echo "'assets.tar.zst' or 'assets.manifest' not found in out/; run 'make assets' first." >&2
|
||||
if [ ! -f "out/assets.tevd" ]; then
|
||||
echo "'assets.tevd' not found in out/; run 'make assets' first." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -32,9 +32,8 @@ mkdir $DESTDIR/Contents/MacOS/out
|
||||
cp -r "../out/$RUNTIME" $DESTDIR/Contents/MacOS/out/
|
||||
mv $DESTDIR/Contents/MacOS/out/$RUNTIME/bin/java $DESTDIR/Contents/MacOS/out/$RUNTIME/bin/java
|
||||
|
||||
# Copy over the asset archive, manifest, and jarfile
|
||||
cp "out/assets.tar.zst" $DESTDIR/Contents/MacOS/
|
||||
cp "out/assets.manifest" $DESTDIR/Contents/MacOS/
|
||||
# Copy over the asset archive and jarfile
|
||||
cp "out/assets.tevd" $DESTDIR/Contents/MacOS/
|
||||
cp "../out/$JARNAME" $DESTDIR/Contents/MacOS/out/
|
||||
|
||||
# zip everything
|
||||
|
||||
@@ -9,8 +9,8 @@ RUNTIME="runtime-osx-x86"
|
||||
PLISTFILE="../out/build_autogen_macos_Info.plist"
|
||||
JARNAME="TerrarumBuild.jar"
|
||||
|
||||
if [ ! -f "out/assets.tar.zst" ] || [ ! -f "out/assets.manifest" ]; then
|
||||
echo "'assets.tar.zst' or 'assets.manifest' not found in out/; run 'make assets' first." >&2
|
||||
if [ ! -f "out/assets.tevd" ]; then
|
||||
echo "'assets.tevd' not found in out/; run 'make assets' first." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -32,9 +32,8 @@ mkdir $DESTDIR/Contents/MacOS/out
|
||||
cp -r "../out/$RUNTIME" $DESTDIR/Contents/MacOS/out/
|
||||
mv $DESTDIR/Contents/MacOS/out/$RUNTIME/bin/java $DESTDIR/Contents/MacOS/out/$RUNTIME/bin/java
|
||||
|
||||
# Copy over the asset archive, manifest, and jarfile
|
||||
cp "out/assets.tar.zst" $DESTDIR/Contents/MacOS/
|
||||
cp "out/assets.manifest" $DESTDIR/Contents/MacOS/
|
||||
# Copy over the asset archive and jarfile
|
||||
cp "out/assets.tevd" $DESTDIR/Contents/MacOS/
|
||||
cp "../out/$JARNAME" $DESTDIR/Contents/MacOS/out/
|
||||
|
||||
# zip everything
|
||||
|
||||
@@ -8,8 +8,8 @@ RUNTIME="runtime-windows-x86"
|
||||
RCFILE="../out/build_autogen_windows.rc"
|
||||
JARNAME="TerrarumBuild.jar"
|
||||
|
||||
if [ ! -f "out/assets.tar.zst" ] || [ ! -f "out/assets.manifest" ]; then
|
||||
echo "'assets.tar.zst' or 'assets.manifest' not found in out/; run 'make assets' first." >&2
|
||||
if [ ! -f "out/assets.tevd" ]; then
|
||||
echo "'assets.tevd' not found in out/; run 'make assets' first." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -34,9 +34,8 @@ mkdir $DESTDIR/out
|
||||
cp -r "../out/$RUNTIME" $DESTDIR/out/
|
||||
mv $DESTDIR/out/$RUNTIME/bin/java.exe $DESTDIR/out/$RUNTIME/bin/java.exe
|
||||
|
||||
# Copy over the asset archive, manifest, and jarfile
|
||||
cp "out/assets.tar.zst" $DESTDIR/
|
||||
cp "out/assets.manifest" $DESTDIR/
|
||||
# Copy over the asset archive and jarfile
|
||||
cp "out/assets.tevd" $DESTDIR/
|
||||
cp "../out/$JARNAME" $DESTDIR/out/
|
||||
|
||||
# zip everything
|
||||
|
||||
43
buildapp/make_assets_archive.sh
Normal file
43
buildapp/make_assets_archive.sh
Normal file
@@ -0,0 +1,43 @@
|
||||
#!/bin/bash
|
||||
if (( $EUID == 0 )); then echo "The build process is not meant to be run with root privilege, exiting now." >&2; exit 1; fi
|
||||
|
||||
cd "${0%/*}"
|
||||
SRCDIR="../assets_release"
|
||||
OUTDIR="out"
|
||||
JARNAME="TerrarumBuild.jar"
|
||||
TVDJAR="../lib/TerranVirtualDisk.jar"
|
||||
|
||||
if [ ! -d "$SRCDIR" ]; then
|
||||
echo "Error: $SRCDIR does not exist. Run make_assets_release.sh first." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -f "../out/$JARNAME" ]; then
|
||||
echo "Error: ../out/$JARNAME not found. Build the project first." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -f "$TVDJAR" ]; then
|
||||
echo "Error: $TVDJAR not found." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
mkdir -p "$OUTDIR"
|
||||
|
||||
echo "Creating assets.tevd from $SRCDIR..."
|
||||
|
||||
# Build classpath from project JAR and all library JARs
|
||||
CP="../out/$JARNAME"
|
||||
for jar in ../lib/*.jar; do
|
||||
CP="$CP:$jar"
|
||||
done
|
||||
|
||||
java -cp "$CP" net.torvald.terrarum.AssetArchiveBuilderKt "$SRCDIR" "$OUTDIR/assets.tevd"
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Error: Failed to create assets.tevd" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Done. Output:"
|
||||
echo " $OUTDIR/assets.tevd ($(du -h "$OUTDIR/assets.tevd" | cut -f1))"
|
||||
Reference in New Issue
Block a user