mirror of
https://github.com/curioustorvald/tsvm.git
synced 2026-06-07 05:54:06 +09:00
29 lines
1.1 KiB
Bash
Executable File
29 lines
1.1 KiB
Bash
Executable File
#!/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%/*}"
|
|
SRCFILES="tbasmac_x86"
|
|
DESTDIR="out/TerranBASIC_macOS.x86.app"
|
|
RUNTIME="runtime-osx-x86"
|
|
# Cleanup
|
|
rm -rf $DESTDIR || true
|
|
mkdir $DESTDIR
|
|
mkdir $DESTDIR/Contents
|
|
mkdir $DESTDIR/Contents/MacOS
|
|
mkdir $DESTDIR/Contents/Resources
|
|
|
|
# Prepare an application
|
|
cp AppIcon.icns $DESTDIR/Contents/Resources/AppIcon.icns
|
|
cp $SRCFILES/Info.plist $DESTDIR/Contents/
|
|
cp $SRCFILES/TerranBASIC.sh $DESTDIR/Contents/MacOS/
|
|
chmod +x $DESTDIR/Contents/MacOS/TerranBASIC.sh
|
|
|
|
# Copy over a Java runtime
|
|
cp -r "../out/$RUNTIME" $DESTDIR/Contents/MacOS/
|
|
|
|
# Copy over all the assets and a jarfile
|
|
cp -r "../out/TerranBASIC.jar" $DESTDIR/Contents/MacOS/
|
|
cp "../lib/compiler-23.1.10.jar" "../lib/compiler-management-23.1.10.jar" "../lib/truffle-compiler-23.1.10.jar" "../lib/truffle-api-23.1.10.jar" "../lib/truffle-runtime-23.1.10.jar" "../lib/polyglot-23.1.10.jar" "../lib/collections-23.1.10.jar" "../lib/word-23.1.10.jar" "../lib/nativeimage-23.1.10.jar" "../lib/jniutils-23.1.10.jar" $DESTDIR/Contents/MacOS/
|
|
|
|
echo "Build successful: $DESTDIR"
|