diff --git a/.github/workflows/build-ci.yml b/.github/workflows/build-ci.yml index 0533aae..c7ceab6 100644 --- a/.github/workflows/build-ci.yml +++ b/.github/workflows/build-ci.yml @@ -1,6 +1,8 @@ name: Maxima Build -on: [push] +on: + workflow_dispatch: + push: concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} @@ -88,6 +90,13 @@ jobs: chmod +x target/x86_64-unknown-linux-musl/release/maxima-tui chmod +x target/x86_64-unknown-linux-musl/release/maxima + - name: AppImage + if: runner.os == 'Linux' + run: | + ls -l target/x86_64-unknown-linux-musl/release + chmod +x pkg/AppImage/AppImage.sh + ./pkg/AppImage/AppImage.sh + - uses: actions/upload-artifact@v4 if: runner.os == 'Linux' with: diff --git a/pkg/AppImage/AppImage.sh b/pkg/AppImage/AppImage.sh new file mode 100644 index 0000000..c731d8a --- /dev/null +++ b/pkg/AppImage/AppImage.sh @@ -0,0 +1,35 @@ +#!/bin/sh + +# You might need to restart your pc if sharun doesn't create `AppDir` in this directory (It should create dirs on its own) + +set -eu + +ARCH="$(uname -m)" +SHARUN="https://raw.githubusercontent.com/pkgforge-dev/Anylinux-AppImages/753b3ba3c77a573f8c2eeb0b397752df2d3235df/useful-tools/quick-sharun.sh" + +export ADD_HOOKS="self-updater.bg.hook" +#export UPINFO="gh-releases-zsync|${GITHUB_REPOSITORY%/*}|${GITHUB_REPOSITORY#*/}|latest|*$ARCH.AppImage.zsync" +export OUTNAME=maxima-anylinux-"$ARCH".AppImage +export DESKTOP=./pkg/AppImage/maxima.desktop +export ICON=./maxima-resources/assets/logo.png +export DEPLOY_OPENGL=0 +export DEPLOY_VULKAN=0 +export DEPLOY_DOTNET=0 + +#Remove leftovers +rm -rf AppDir dist appinfo + +# ADD LIBRARIES +wget --retry-connrefused --tries=30 "$SHARUN" -O ./quick-sharun +chmod +x ./quick-sharun + +# Point to binaries +./quick-sharun ./target/$(uname -m)-unknown-linux-musl/release/maxima-bootstrap ./target/$(uname -m)-unknown-linux-musl/release/maxima-cli ./target/$(uname -m)-unknown-linux-musl/release/maxima-tui ./target/$(uname -m)-unknown-linux-musl/release/maxima + +# Make AppImage +./quick-sharun --make-appimage + +mkdir -p ./dist +mv -v ./*.AppImage* ./dist + +echo "All Done!" \ No newline at end of file diff --git a/pkg/AppImage/maxima.desktop b/pkg/AppImage/maxima.desktop new file mode 100644 index 0000000..8fc3bca --- /dev/null +++ b/pkg/AppImage/maxima.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Name=maxima +Comment=A free and open-source replacement for the EA Desktop Launcher for Linux and Windows. +Exec=maxima +Icon=maxima +StartupWMClass=maxima +Terminal=false +Type=Application +Categories=Game; +Keywords=ea; diff --git a/pkg/flaptak/io.github.ArmchairDevelopers.maxima.metainfo.xml b/pkg/flaptak/io.github.ArmchairDevelopers.maxima.metainfo.xml new file mode 100644 index 0000000..e69de29 diff --git a/pkg/flaptak/io.github.ArmchairDevelopers.maxima.yml b/pkg/flaptak/io.github.ArmchairDevelopers.maxima.yml new file mode 100644 index 0000000..e69de29