summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorth-2021 <90853655+th-2021@users.noreply.github.com>2022-08-05 07:59:19 +0200
committerGitHub <noreply@github.com>2022-08-05 07:59:19 +0200
commit1ebca42f46712293a38a571ab46285a23e9fc2e6 (patch)
tree2ab9388eec98c6c4e1dbcc9f51ce47d62597b8ce /scripts
parent93d0d7443a3443905a31556a28f060d885ee22dd (diff)
Move to cmake across all platforms (#363)
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/linux/appimage/build.sh7
-rw-r--r--scripts/linux/appimage/soh.desktop (renamed from scripts/linux/soh.desktop)4
-rw-r--r--scripts/linux/appimage/soh.sh (renamed from scripts/linux/soh.sh)0
-rwxr-xr-xscripts/linux/build-appimage.sh34
-rwxr-xr-xscripts/linux/build.sh11
-rwxr-xr-xscripts/switch/build.sh7
6 files changed, 14 insertions, 49 deletions
diff --git a/scripts/linux/appimage/build.sh b/scripts/linux/appimage/build.sh
new file mode 100755
index 000000000..bad6b00c5
--- /dev/null
+++ b/scripts/linux/appimage/build.sh
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+cmake --no-warn-unused-cli -H. -Bbuild-cmake -GNinja -DCMAKE_BUILD_TYPE:STRING=Release
+cmake --build build-cmake --target ExtractAssets --
+cmake --build build-cmake --config Release --
+
+(cd build-cmake && cpack -G External)
diff --git a/scripts/linux/soh.desktop b/scripts/linux/appimage/soh.desktop
index a637d03c3..b1fc2696b 100644
--- a/scripts/linux/soh.desktop
+++ b/scripts/linux/appimage/soh.desktop
@@ -1,9 +1,9 @@
[Desktop Entry]
Version=1.0
Name=SOH
-Exec=AppRun
+Exec=soh.sh
Terminal=false
-Icon=soh
+Icon=sohIcon
Type=Application
Categories=Game;
Name[en_US]=
diff --git a/scripts/linux/soh.sh b/scripts/linux/appimage/soh.sh
index f3b563cc7..f3b563cc7 100644
--- a/scripts/linux/soh.sh
+++ b/scripts/linux/appimage/soh.sh
diff --git a/scripts/linux/build-appimage.sh b/scripts/linux/build-appimage.sh
deleted file mode 100755
index 053ce580a..000000000
--- a/scripts/linux/build-appimage.sh
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/bin/bash
-
-curl -sSfLO "https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage"
-chmod a+x linuxdeploy*.AppImage
-curl -sSfL https://github.com$(curl https://github.com/probonopd/go-appimage/releases | grep "mkappimage-.*-x86_64.AppImage" | head -n 1 | cut -d '"' -f 2) -o mkappimage.AppImage
-chmod a+x mkappimage.AppImage
-
-mkdir -p AppDir/usr/bin
-cp scripts/linux/{soh.desktop,soh.sh} AppDir/
-cp soh/macosx/sohIcon.png AppDir/soh.png
-curl -sSfL https://raw.githubusercontent.com/gabomdq/SDL_GameControllerDB/master/gamecontrollerdb.txt -o AppDir/usr/bin/gamecontrollerdb.txt
-
-mkdir -p AppDir/usr/share/applications
-mkdir -p AppDir/usr/share/icons/hicolor/scalable/apps
-mkdir -p AppDir/usr/lib
-
-mv AppDir/soh.sh AppDir/usr/bin
-cp -r build/* AppDir/usr/bin
-
-chmod +x AppDir/usr/bin/{soh.elf,OTRGui,soh.sh}
-
-cd AppDir && ln -s ./usr/bin/soh.sh ./AppRun && cd ..
-
-export UPD_INFO="gh-releases-zsync|HarbourMasters|Shipwright-linux|develop|SOH-Linux.AppImage.zsync"
-./linuxdeploy-x86_64.AppImage --appimage-extract-and-run \
- --appdir=./AppDir/ \
- -d ./AppDir/soh.desktop \
- -i ./AppDir/soh.png \
- -e ./AppDir/usr/bin/soh.elf
-
-cd /soh
-
-VERSION=Linux ./mkappimage.AppImage --appimage-extract-and-run ./AppDir # "SOH-Linux-x86_64.AppImage"
-mv SOH-Linux-x86_64.AppImage SOH-Linux.AppImage # Keep Original Name
diff --git a/scripts/linux/build.sh b/scripts/linux/build.sh
deleted file mode 100755
index f9d1f9e2c..000000000
--- a/scripts/linux/build.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/bash
-
-cd soh
-make setup -j$(nproc) OPTFLAGS=-O2 DEBUG=0
-make -j$(nproc) OPTFLAGS=-O2 DEBUG=0
-
-cd ../OTRGui
-mkdir build
-cd build
-cmake ..
-cmake --build . --config Release
diff --git a/scripts/switch/build.sh b/scripts/switch/build.sh
index e5d65d99d..b5b137652 100755
--- a/scripts/switch/build.sh
+++ b/scripts/switch/build.sh
@@ -1,4 +1,7 @@
#!/bin/bash
-make setup -C soh -j$(nproc) OPTFLAGS=-O2 DEBUG=0
-make -f Makefile.switch -j$(nproc)
+cmake --no-warn-unused-cli -H. -Bbuild-linux -GNinja
+cmake --build build-linux --target ExtractAssets
+
+cmake -H. -Bbuild-switch -GNinja -DCMAKE_TOOLCHAIN_FILE=/opt/devkitpro/cmake/Switch.cmake
+cmake --build build-switch --target soh_nro