Add AppImage Support

This commit is contained in:
Ben Longman 2023-02-26 22:12:50 -08:00
parent 8b9332e150
commit 924467cc57
3 changed files with 29 additions and 2 deletions

View File

@ -89,7 +89,7 @@ jobs:
if: runner.os == 'macOS'
- name: Install linux dependencies
run: |
sudo apt-get install pkg-config libicu-dev libqt5gui5
sudo apt-get install pkg-config libicu-dev libqt5gui5 libfuse2
export PKG_CONFIG_PATH="/usr/local/opt/icu4c/lib/pkgconfig";
export PATH="/usr/local/opt/icu4c/bin:/usr/local/opt/icu4c/sbin:$PATH"
python -m pip install --no-binary=pyicu pyicu
@ -104,6 +104,11 @@ jobs:
run: |
make dist
- name: build appimage
run: |
make appimage
if: runner.os == 'Linux'
- name: Archive production artifacts
uses: actions/upload-artifact@v2
with:
@ -111,6 +116,13 @@ jobs:
path: |
dist/*.zip
- name: Archive production artifacts - appimage
uses: actions/upload-artifact@v2
with:
name: "${{ format('ComicTagger-{0}', runner.os) }}"
path: |
dist/*.AppImage
- name: PyTest
run: |
python -m pytest

View File

@ -74,6 +74,11 @@ jobs:
run: |
make dist
- name: Build AppImage package
run: |
make appimage
if: runner.os == 'Linux'
- name: Get release name
if: startsWith(github.ref, 'refs/tags/')
shell: bash
@ -92,3 +97,5 @@ jobs:
files: |
dist/*.zip
dist/*${{ fromJSON('["never", ""]')[runner.os == 'Linux'] }}.whl
dist/*.AppImage

View File

@ -61,4 +61,12 @@ $(INSTALL_STAMP): $(PYTHON_VENV) requirements.txt requirements_dev.txt
dist:
pyinstaller -y comictagger.spec
cd dist && zip -m -r $(FINAL_NAME).zip $(APP_NAME)
cd dist && zip -r $(FINAL_NAME).zip $(APP_NAME)
appimage: dist
cp -a dist/comictagger dist/appimage
curl -L https://github.com/AppImage/AppImageKit/releases/latest/download/appimagetool-x86_64.AppImage > dist/appimagetool
chmod +x dist/appimagetool
cd dist/appimage/ && ln -s comictaggerlib/graphics/app.png app.png && ln -s comictagger AppRun
sed -e 's|/usr/local/share/comictagger/app.png|app|g' -e 's|%%CTSCRIPT%% %F|./comictagger|g' desktop-integration/linux/ComicTagger.desktop > dist/appimage/AppRun.desktop
cd dist && ./appimagetool appimage