Use portable config directory for AppImage

This commit is contained in:
ReenigneArcher 2022-06-07 18:32:28 -04:00
parent 0f3eaf0f84
commit e7ec6050d9

View File

@ -65,9 +65,9 @@ jobs:
SUNSHINE_ASSETS_DIR: 'assets' SUNSHINE_ASSETS_DIR: 'assets'
SUNSHINE_CONFIG_DIR: 'config' SUNSHINE_CONFIG_DIR: 'config'
- type: appimage - type: appimage
CMAKE_INSTALL_PREFIX: '.' CMAKE_INSTALL_PREFIX: '/usr'
SUNSHINE_ASSETS_DIR: 'usr/local/sunshine/assets' SUNSHINE_ASSETS_DIR: 'sunshine.AppImage.config'
SUNSHINE_CONFIG_DIR: 'usr/local/sunshine/config' SUNSHINE_CONFIG_DIR: 'sunshine.AppImage.home'
steps: steps:
- name: Checkout - name: Checkout
@ -172,8 +172,11 @@ jobs:
# install sunshine to the DESTDIR # install sunshine to the DESTDIR
make install DESTDIR=AppDir make install DESTDIR=AppDir
# testing only # portable home and config
ls AppDir # todo - this is ugly... we should use a custom AppRun script to take care of this
mv ./AppDir${{ matrix.CMAKE_INSTALL_PREFIX }}/sunshine.AppImage.* ../artifacts/
mkdir -p ../artifacts/${{ matrix.SUNSHINE_CONFIG_DIR }}/.config/sunshine/${{ matrix.SUNSHINE_CONFIG_DIR }}
cp ../artifacts/${{ matrix.SUNSHINE_CONFIG_DIR }}/apps.json ../artifacts/${{ matrix.SUNSHINE_CONFIG_DIR }}/.config/sunshine/${{ matrix.SUNSHINE_CONFIG_DIR }}/
# variables # variables
DESKTOP_FILE="${DESKTOP_FILE:-sunshine.desktop}" DESKTOP_FILE="${DESKTOP_FILE:-sunshine.desktop}"
@ -205,6 +208,9 @@ jobs:
# move # move
mv Sunshine*.AppImage ../artifacts/sunshine.AppImage mv Sunshine*.AppImage ../artifacts/sunshine.AppImage
# permissions
chmod +x ../artifacts/sunshine.AppImage
- name: Verify AppImage - name: Verify AppImage
if: ${{ matrix.type == 'appimage' }} if: ${{ matrix.type == 'appimage' }}
run: | run: |
@ -215,6 +221,17 @@ jobs:
./appimagelint-x86_64.AppImage ./artifacts/sunshine.AppImage ./appimagelint-x86_64.AppImage ./artifacts/sunshine.AppImage
- name: Archive AppImage
if: ${{ matrix.type == 'appimage' }}
working-directory: artifacts
run: |
chmod +x ./sunshine.AppImage
zip --recurse-paths --move --test ./sunshine-appimage.zip ./*
# testing
ls
- name: Upload Artifacts - name: Upload Artifacts
if: ${{ github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' }} if: ${{ github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' }}
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3