-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Appimage #221
Open
dafrenchyman
wants to merge
3
commits into
trzy:master
Choose a base branch
from
dafrenchyman:appimage
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+165
−5
Open
Appimage #221
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
name: Build and Package AppImage | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- master | ||
- appimage | ||
pull_request: | ||
branches: | ||
- main | ||
- master | ||
- appimage | ||
|
||
jobs: | ||
build-appimage: | ||
runs-on: ubuntu-22.04 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
steps: | ||
# Checkout the repository | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
# Set up dependencies | ||
- name: Install dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y build-essential cmake libgl1-mesa-dev libglu1-mesa-dev \ | ||
libsdl2-dev libsdl2-net-dev zlib1g-dev | ||
|
||
# Build Supermodel | ||
- name: Build Supermodel | ||
run: | | ||
cd ./AppImage | ||
./build_app_image.sh | ||
|
||
- name: Delete Existing latest Release | ||
run: | | ||
gh release delete latest -y || true | ||
gh api -X DELETE /repos/${{ github.repository }}/git/refs/tags/latest || true | ||
|
||
- name: Check AppImage File | ||
run: ls -lah ./AppImage/ | ||
|
||
# Create release as the "latest" tag | ||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
with: | ||
tag_name: latest | ||
release_name: "Supermodel Release latest" | ||
draft: false | ||
prerelease: false | ||
|
||
- name: Upload AppImage | ||
uses: actions/upload-release-asset@v1 | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
# upload_url: ${{ github.event.release.upload_url }} | ||
asset_path: ./AppImage/Supermodel-x86_64.AppImage | ||
asset_name: Supermodel-x86_64.AppImage | ||
asset_content_type: application/octet-stream |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/bash | ||
#HERE="$(dirname "$(readlink -f "$0")")" | ||
SELF=$(readlink -f "$0") | ||
HERE=${SELF%/*} | ||
#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}" | ||
export PATH="${HERE}/usr/bin/:${HERE}/usr/sbin/:${HERE}/usr/games/:${HERE}/bin/:${HERE}/sbin/${PATH:+:$PATH}" | ||
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}" | ||
echo "Starting Supermodel" | ||
cd "$HERE/usr" | ||
exec "./bin/Supermodel" "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[Desktop Entry] | ||
Name=Supermodel | ||
Exec=Supermodel | ||
Icon=Supermodel | ||
Type=Application | ||
Categories=Game;Emulator; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
#!/bin/bash | ||
# Script ran on "22.04.1-Ubuntu" | ||
|
||
# Globals | ||
APP_DIR=Supermodel.AppDir | ||
|
||
# Build Supermodel (NOTE: only seems to work if we enable NET_BOARD) | ||
cd .. | ||
make -f Makefiles/Makefile.UNIX NET_BOARD=1 APP_IMAGE=1 | ||
|
||
# Move back to the AppImage folder | ||
cd ./AppImage | ||
mkdir -p ./${APP_DIR} | ||
|
||
# Copy binary into folder | ||
mkdir -p ./${APP_DIR}/usr/bin | ||
cp ../bin/supermodel ./${APP_DIR}/usr/bin/Supermodel | ||
|
||
# Copy AppImage assets into the folder | ||
cp ./AppRun ./${APP_DIR}/AppRun | ||
cp ./Supermodel.desktop ./${APP_DIR}/Supermodel.desktop | ||
cp ./Supermodel.png ./${APP_DIR}/Supermodel.png | ||
|
||
# Copy Supermodel assets | ||
mkdir -p ./${APP_DIR}/usr/Assets | ||
cp ../Assets/* ./${APP_DIR}/usr/Assets/ | ||
|
||
# Copy Config | ||
mkdir -p ./${APP_DIR}/usr/Config | ||
cp ../Config/* ./${APP_DIR}/usr/Config/ | ||
|
||
# Copy required libraries | ||
# NOTE: There may be some unnecessary libraries in here | ||
mkdir -p ./${APP_DIR}/usr/lib | ||
cp /lib/x86_64-linux-gnu/libbsd.so.0 ./${APP_DIR}/usr/lib/ | ||
cp /lib/x86_64-linux-gnu/libdrm.so.2 ./${APP_DIR}/usr/lib/ | ||
cp /lib/x86_64-linux-gnu/libffi.so.8 ./${APP_DIR}/usr/lib/ | ||
cp /lib/x86_64-linux-gnu/libFLAC.so.8 ./${APP_DIR}/usr/lib/ | ||
cp /lib/x86_64-linux-gnu/libGLX.so.0 ./${APP_DIR}/usr/lib/ | ||
cp /lib/x86_64-linux-gnu/liblz4.so.1 ./${APP_DIR}/usr/lib/ | ||
cp /lib/x86_64-linux-gnu/liblzma.so.5 ./${APP_DIR}/usr/lib/ | ||
cp /lib/x86_64-linux-gnu/libmd.so.0 ./${APP_DIR}/usr/lib/ | ||
cp /lib/x86_64-linux-gnu/libogg.so.0 ./${APP_DIR}/usr/lib/ | ||
cp /lib/x86_64-linux-gnu/libopus.so.0 ./${APP_DIR}/usr/lib/ | ||
cp /lib/x86_64-linux-gnu/libSDL2-2.0.so.0 ./${APP_DIR}/usr/lib/ | ||
cp /lib/x86_64-linux-gnu/libSDL2_net-2.0.so.0 ./${APP_DIR}/usr/lib/ | ||
cp /lib/x86_64-linux-gnu/libvorbisenc.so.2 ./${APP_DIR}/usr/lib/ | ||
cp /lib/x86_64-linux-gnu/libvorbis.so.0 ./${APP_DIR}/usr/lib/ | ||
cp /lib/x86_64-linux-gnu/libxcb-randr.so.0 ./${APP_DIR}/usr/lib/ | ||
cp /lib/x86_64-linux-gnu/libxcb.so.1 ./${APP_DIR}/usr/lib/ | ||
cp /lib/x86_64-linux-gnu/libxkbcommon.so.0 ./${APP_DIR}/usr/lib/ | ||
|
||
echo "Building appimage" | ||
# Download appimagetool (for creating the image) | ||
wget https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage -c | ||
chmod +x appimagetool-x86_64.AppImage | ||
# ./appimagetool-x86_64.AppImage Supermodel.AppDir | ||
|
||
# Extract out the contents | ||
# NOTE: We do it this way so it can work without FUSE and also work via a github action | ||
./appimagetool-x86_64.AppImage --appimage-extract | ||
./squashfs-root/AppRun ./Supermodel.AppDir |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to add this or it wouldn't compile on linux