mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-07 12:21:52 +09:00
buildapp update
This commit is contained in:
@@ -9,8 +9,8 @@ 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
|
||||
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
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -27,11 +27,11 @@ chmod +x $DESTDIR/AppRun
|
||||
# Copy over a Java runtime
|
||||
mkdir $DESTDIR/out
|
||||
cp -r "../out/$RUNTIME" $DESTDIR/out/
|
||||
mv $DESTDIR/out/$RUNTIME/bin/java $DESTDIR/out/$RUNTIME/bin/Terrarum
|
||||
mv $DESTDIR/out/$RUNTIME/bin/java $DESTDIR/out/$RUNTIME/bin/java
|
||||
|
||||
# Copy over all the assets and a jarfile
|
||||
cp -r "../assets_release" $DESTDIR/
|
||||
mv $DESTDIR/assets_release $DESTDIR/assets
|
||||
# Copy over the asset archive, manifest, and jarfile
|
||||
cp "out/assets.tar.zst" $DESTDIR/
|
||||
cp "out/assets.manifest" $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 [ ! -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
|
||||
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
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -27,11 +27,11 @@ chmod +x $DESTDIR/AppRun
|
||||
# Copy over a Java runtime
|
||||
mkdir $DESTDIR/out
|
||||
cp -r "../out/$RUNTIME" $DESTDIR/out/
|
||||
mv $DESTDIR/out/$RUNTIME/bin/java $DESTDIR/out/$RUNTIME/bin/Terrarum
|
||||
mv $DESTDIR/out/$RUNTIME/bin/java $DESTDIR/out/$RUNTIME/bin/java
|
||||
|
||||
# Copy over all the assets and a jarfile
|
||||
cp -r "../assets_release" $DESTDIR/
|
||||
mv $DESTDIR/assets_release $DESTDIR/assets
|
||||
# Copy over the asset archive, manifest, and jarfile
|
||||
cp "out/assets.tar.zst" $DESTDIR/
|
||||
cp "out/assets.manifest" $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 [ ! -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
|
||||
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
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -30,11 +30,11 @@ cp $PLISTFILE $DESTDIR/Contents/Info.plist
|
||||
# Copy over a Java runtime
|
||||
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/Terrarum
|
||||
mv $DESTDIR/Contents/MacOS/out/$RUNTIME/bin/java $DESTDIR/Contents/MacOS/out/$RUNTIME/bin/java
|
||||
|
||||
# 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
|
||||
# Copy over the asset archive, manifest, and jarfile
|
||||
cp "out/assets.tar.zst" $DESTDIR/Contents/MacOS/
|
||||
cp "out/assets.manifest" $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 [ ! -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
|
||||
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
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -30,11 +30,11 @@ cp $PLISTFILE $DESTDIR/Contents/Info.plist
|
||||
# Copy over a Java runtime
|
||||
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/Terrarum
|
||||
mv $DESTDIR/Contents/MacOS/out/$RUNTIME/bin/java $DESTDIR/Contents/MacOS/out/$RUNTIME/bin/java
|
||||
|
||||
# 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
|
||||
# Copy over the asset archive, manifest, and jarfile
|
||||
cp "out/assets.tar.zst" $DESTDIR/Contents/MacOS/
|
||||
cp "out/assets.manifest" $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 [ ! -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
|
||||
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
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -32,12 +32,12 @@ x86_64-w64-mingw32-gcc -Os -s -o $DESTDIR/Terrarum.exe $SRCFILES/Terrarum.c $RCF
|
||||
# Copy over a Java runtime
|
||||
mkdir $DESTDIR/out
|
||||
cp -r "../out/$RUNTIME" $DESTDIR/out/
|
||||
mv $DESTDIR/out/$RUNTIME/bin/java.exe $DESTDIR/out/$RUNTIME/bin/Terrarum.exe
|
||||
mv $DESTDIR/out/$RUNTIME/bin/java.exe $DESTDIR/out/$RUNTIME/bin/java.exe
|
||||
|
||||
# Copy over all the assets and a jarfile
|
||||
cp -r "../assets_release" $DESTDIR/
|
||||
mv $DESTDIR/assets_release $DESTDIR/assets
|
||||
cp "../out/$JARNAME" $DESTDIR/out/
|
||||
# Copy over the asset archive, manifest, and jarfile
|
||||
cp "out/assets.tar.zst" $DESTDIR/
|
||||
cp "out/assets.manifest" $DESTDIR/
|
||||
cp "../out/$JARNAME" $DESTDIR/out/
|
||||
|
||||
# zip everything
|
||||
rm "out/$DESTDIR.zip"
|
||||
|
||||
10
buildapp/terrarum.manifest
Normal file
10
buildapp/terrarum.manifest
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
||||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<security>
|
||||
<requestedPrivileges>
|
||||
<requestedExecutionLevel level="asInvoker" uiAccess="false"/>
|
||||
</requestedPrivileges>
|
||||
</security>
|
||||
</trustInfo>
|
||||
</assembly>
|
||||
@@ -1,3 +1,3 @@
|
||||
#!/bin/bash
|
||||
cd "${0%/*}"
|
||||
./out/runtime-linux-arm/bin/Terrarum -Dswing.aatext=true -Dawt.useSystemAAFontSettings=lcd -jar ./out/TerrarumBuild.jar
|
||||
./out/runtime-linux-arm/bin/java -Dswing.aatext=true -Dawt.useSystemAAFontSettings=lcd -jar ./out/TerrarumBuild.jar
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
#!/bin/bash
|
||||
cd "${0%/*}"
|
||||
./out/runtime-linux-x86/bin/Terrarum -Dswing.aatext=true -Dawt.useSystemAAFontSettings=lcd -jar ./out/TerrarumBuild.jar
|
||||
./out/runtime-linux-x86/bin/java -Dswing.aatext=true -Dawt.useSystemAAFontSettings=lcd -jar ./out/TerrarumBuild.jar
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
#!/bin/bash
|
||||
cd "${0%/*}"
|
||||
./out/runtime-osx-arm/bin/Terrarum -jar ./out/TerrarumBuild.jar
|
||||
./out/runtime-osx-arm/bin/java -jar ./out/TerrarumBuild.jar
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
#!/bin/bash
|
||||
cd "${0%/*}"
|
||||
./out/runtime-osx-x86/bin/Terrarum -jar ./out/TerrarumBuild.jar
|
||||
./out/runtime-osx-x86/bin/java -jar ./out/TerrarumBuild.jar
|
||||
|
||||
@@ -1,11 +1,28 @@
|
||||
#include <windows.h>
|
||||
#include <stdio.h>
|
||||
#include <tchar.h>
|
||||
|
||||
int main() {
|
||||
STARTUPINFOA si = {0};
|
||||
PROCESS_INFORMATION pi = {0};
|
||||
si.cb = sizeof(si);
|
||||
si.dwFlags = STARTF_USESHOWWINDOW;
|
||||
si.wShowWindow = SW_HIDE;
|
||||
|
||||
ShellExecute(NULL, "open", "\".\\out\\runtime-windows-x86\\bin\\Terrarum.exe\"", "-jar \".\\out\\TerrarumBuild.jar\"", NULL, SW_HIDE);
|
||||
char cmd[] = "\".\\out\\runtime-windows-x86\\bin\\java.exe\" -jar \".\\out\\TerrarumBuild.jar\"";
|
||||
|
||||
CreateProcessA(
|
||||
NULL,
|
||||
cmd,
|
||||
NULL,
|
||||
NULL,
|
||||
FALSE,
|
||||
0,
|
||||
NULL,
|
||||
".\\out\\runtime-windows-x86\\bin",
|
||||
&si,
|
||||
&pi
|
||||
);
|
||||
|
||||
CloseHandle(pi.hProcess);
|
||||
CloseHandle(pi.hThread);
|
||||
return 0;
|
||||
|
||||
//return system(".\\out\\runtime-windows-x86\\bin\\Terrarum.exe -jar .\\out\\TerrarumBuild.jar");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@ import java.time.ZonedDateTime
|
||||
|
||||
private fun writeWindowsRC(major: Int, minor: Int, patch: Int) {
|
||||
val s = """1 ICON "icns.ico"
|
||||
1 RT_MANITEST "terrarum.manifest"
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION $major,$minor,$patch,0
|
||||
PRODUCTVERSION $major,$minor,$patch,0
|
||||
|
||||
@@ -96,7 +96,7 @@ public class Principii {
|
||||
extracmd0 += " -Dswing.aatext=true -Dawt.useSystemAAFontSettings=lcd";
|
||||
}
|
||||
|
||||
String runtime = new File("out/"+runtimeRoot+"/bin/Terrarum").getAbsolutePath(); // /bin/Terrarum is just a renamed version of /bin/java
|
||||
String runtime = new File("out/"+runtimeRoot+"/bin/java").getAbsolutePath();
|
||||
System.out.println("Runtime path: "+runtime);
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user