File tree Expand file tree Collapse file tree 4 files changed +82
-7
lines changed Expand file tree Collapse file tree 4 files changed +82
-7
lines changed Original file line number Diff line number Diff line change 1+ name : Build and Package AppImage
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ - master
8+ - appimage
9+ pull_request :
10+ branches :
11+ - main
12+ - master
13+ - appimage
14+
15+ jobs :
16+ build-appimage :
17+ runs-on : ubuntu-22.04
18+ env :
19+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
20+
21+ steps :
22+ # Checkout the repository
23+ - name : Checkout repository
24+ uses : actions/checkout@v3
25+
26+ # Set up dependencies
27+ - name : Install dependencies
28+ run : |
29+ sudo apt-get update
30+ sudo apt-get install -y build-essential cmake libgl1-mesa-dev libglu1-mesa-dev \
31+ libsdl2-dev libsdl2-net-dev zlib1g-dev
32+
33+ # Build Supermodel
34+ - name : Build Supermodel
35+ run : |
36+ cd ./AppImage
37+ ./build_app_image.sh
38+
39+ - name : Delete Existing latest Release
40+ run : |
41+ gh release delete latest -y || true
42+ gh api -X DELETE /repos/${{ github.repository }}/git/refs/tags/latest || true
43+
44+ - name : Check AppImage File
45+ run : ls -lah ./AppImage/
46+
47+ # Create release as the "latest" tag
48+ - name : Create Release
49+ id : create_release
50+ uses : actions/create-release@v1
51+ with :
52+ tag_name : latest
53+ release_name : " Supermodel Release latest"
54+ draft : false
55+ prerelease : false
56+
57+ - name : Upload AppImage
58+ uses : actions/upload-release-asset@v1
59+ with :
60+ upload_url : ${{ steps.create_release.outputs.upload_url }}
61+ # upload_url: ${{ github.event.release.upload_url }}
62+ asset_path : ./AppImage/Supermodel-x86_64.AppImage
63+ asset_name : Supermodel-x86_64.AppImage
64+ asset_content_type : application/octet-stream
Original file line number Diff line number Diff line change @@ -362,3 +362,5 @@ saves/
362362/AppImage /appimagetool-x86_64.AppImage
363363/AppImage /Supermodel.AppDir
364364/AppImage /Supermodel-x86_64.AppImage
365+ /AppImage /squashfs-root /
366+ /AppImage /appimagetool
Original file line number Diff line number Diff line change 11#! /bin/bash
2- HERE=" $( dirname " $( readlink -f " $0 " ) " ) "
2+ # HERE="$(dirname "$(readlink -f "$0")")"
3+ SELF=$( readlink -f " $0 " )
4+ HERE=${SELF%/* }
5+ # export LD_LIBRARY_PATH="${HERE}/usr/lib/:${HERE}/usr/lib/i386-linux-gnu/:${HERE}/usr/lib/x86_64-linux-gnu/:${HERE}/usr/lib32/:${HERE}/usr/lib64/:${HERE}/lib/:${HERE}/lib/i386-linux-gnu/:${HERE}/lib/x86_64-linux-gnu/:${HERE}/lib32/:${HERE}/lib64/${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
6+ export PATH=" ${HERE} /usr/bin/:${HERE} /usr/sbin/:${HERE} /usr/games/:${HERE} /bin/:${HERE} /sbin/${PATH: +: $PATH } "
7+ export LD_LIBRARY_PATH=" ${HERE} /usr/lib/:${HERE} /usr/lib/i386-linux-gnu/:${HERE} /usr/lib/x86_64-linux-gnu/:${HERE} /usr/lib32/:${HERE} /usr/lib64/:${HERE} /lib/:${HERE} /lib/i386-linux-gnu/:${HERE} /lib/x86_64-linux-gnu/:${HERE} /lib32/:${HERE} /lib64/${LD_LIBRARY_PATH: +: $LD_LIBRARY_PATH } "
38echo " Starting Supermodel"
49cd " $HERE /usr"
510exec " ./bin/Supermodel" " $@ "
Original file line number Diff line number Diff line change @@ -12,10 +12,6 @@ make -f Makefiles/Makefile.UNIX NET_BOARD=1 APP_IMAGE=1
1212cd ./AppImage
1313mkdir -p ./${APP_DIR}
1414
15- # Download appimagetool (for creating the image)
16- wget https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage -c
17- chmod +x appimagetool-x86_64.AppImage
18-
1915# Copy binary into folder
2016mkdir -p ./${APP_DIR} /usr/bin
2117cp ../bin/supermodel ./${APP_DIR} /usr/bin/Supermodel
@@ -54,5 +50,13 @@ cp /lib/x86_64-linux-gnu/libxcb-randr.so.0 ./${APP_DIR}/usr/lib/
5450cp /lib/x86_64-linux-gnu/libxcb.so.1 ./${APP_DIR} /usr/lib/
5551cp /lib/x86_64-linux-gnu/libxkbcommon.so.0 ./${APP_DIR} /usr/lib/
5652
57- # Build the app-image
58- ./appimagetool-x86_64.AppImage Supermodel.AppDir
53+ echo " Building appimage"
54+ # Download appimagetool (for creating the image)
55+ wget https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage -c
56+ chmod +x appimagetool-x86_64.AppImage
57+ # ./appimagetool-x86_64.AppImage Supermodel.AppDir
58+
59+ # Extract out the contents
60+ # NOTE: We do it this way so it can work without FUSE and also work via a github action
61+ ./appimagetool-x86_64.AppImage --appimage-extract
62+ ./squashfs-root/AppRun ./Supermodel.AppDir
You can’t perform that action at this time.
0 commit comments