aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/configure_ubuntu.sh38
-rw-r--r--scripts/fix_dynamic_linking_macos.sh16
2 files changed, 54 insertions, 0 deletions
diff --git a/scripts/configure_ubuntu.sh b/scripts/configure_ubuntu.sh
new file mode 100755
index 0000000..3817997
--- /dev/null
+++ b/scripts/configure_ubuntu.sh
@@ -0,0 +1,38 @@
+#!/bin/bash
+
+#assumes a somewhat recent 64-bit ubuntu
+
+#need some openGL stuff
+sudo apt install libgl1-mesa-dev
+
+mkdir tmp
+
+cd tmp
+
+#get the bass prebuilt
+curl http://www.un4seen.com/files/bass24-linux.zip -o bass_linux.zip
+
+unzip bass_linux.zip
+
+cp x64/libbass.so ../../lib
+
+#get the discord-rpc prebuilt
+curl -L https://github.com/discordapp/discord-rpc/releases/download/v3.4.0/discord-rpc-linux.zip -o discord_rpc_linux.zip
+
+unzip discord_rpc_linux.zip
+
+cp discord-rpc/linux-dynamic/lib/libdiscord-rpc.so ../../lib/
+
+#get libqtapng plugin prebuilt
+curl -L https://github.com/Skycoder42/QtApng/releases/download/1.1.0-5/build_gcc_64_5.12.0.tar.xz -o apng.tar.xz
+
+tar -xvf apng.tar.xz
+
+cp gcc_64/plugins/imageformats/libqapng.so ../../lib
+
+cd ..
+
+rm -rf tmp
+
+#during runtime, the program expects the libraries to exist in the root folder
+cp ../lib/* ..
diff --git a/scripts/fix_dynamic_linking_macos.sh b/scripts/fix_dynamic_linking_macos.sh
new file mode 100644
index 0000000..a786a55
--- /dev/null
+++ b/scripts/fix_dynamic_linking_macos.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+#this script relinks dynamic libraries so the .app file can be distributed as standalone
+
+install_name_tool -id @executable_path/../Frameworks/libbass.dylib ../bin/Attorney_Online.app/Contents/Frameworks/libbass.dylib
+
+install_name_tool -id @executable_path/../Frameworks/libbassopus.dylib ../bin/Attorney_Online.app/Contents/Frameworks/libbassopus.dylib
+
+install_name_tool -id @executable_path/../Frameworks/libdiscord-rpc.dylib ../bin/Attorney_Online.app/Contents/Frameworks/libdiscord-rpc.dylib
+
+install_name_tool -id @executable_path/../Frameworks/libqapng.dylib ../bin/Attorney_Online.app/Contents/Frameworks/libqapng.dylib
+
+install_name_tool -change @loader_path/libbass.dylib @executable_path/../Frameworks/libbass.dylib ../bin/Attorney_Online.app/Contents/MacOS/Attorney_Online
+
+install_name_tool -change @rpath/libdiscord-rpc.dylib @executable_path/../Frameworks/libdiscord-rpc.dylib ../bin/Attorney_Online.app/Contents/MacOS/Attorney_Online
+