From b4c7812c0d093dec186aa473e8f80e182d9997d4 Mon Sep 17 00:00:00 2001 From: Dagen Brock Date: Sun, 17 May 2020 21:25:22 -0500 Subject: [PATCH] appimage style ubuntu build --- .github/workflows/release.yml | 36 +++++++++++++++++++++++++++----- README.md | 4 ++++ assets/buckshot.desktop | 9 ++++++++ package_linux.sh | 39 +++++++++++++++++++++++++++++++++++ package_mac.sh | 6 ++++-- 5 files changed, 87 insertions(+), 7 deletions(-) create mode 100644 assets/buckshot.desktop create mode 100755 package_linux.sh diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c3cd7e6..175afa6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,8 +9,8 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - #os: [ windows-latest, ubuntu-latest, macos-latest ] - os: [ macos-latest ] + #os: [ windows-latest, ubuntu-16.04, macos-latest ] + os: [ ubuntu-16.04 ] steps: - uses: actions/checkout@v1 - uses: ilammy/msvc-dev-cmd@v1 @@ -34,14 +34,28 @@ jobs: dir dir release - - name: Package OSX Test + - name: Package Linux Test + if: matrix.os == 'ubuntu-16.04' + run: | + echo "== pwd" + pwd + echo "== ls -al" + ls -al + echo "== ls -al buckshot" + ls -al buckshot + echo " ++ GO TIME ++" + ./package_linux.sh + ls -al buckshot-package-ubuntu + + # EVERYTHING BELOW IS ONLY WHEN VERSION TAGS PUSHED (i.e. tag like "v0.1") + # Good + - name: Package OSX if: matrix.os == 'macos-latest' run: | ./package_mac.sh pip3 install dmgbuild dmgbuild -s dmg-settings.json "buckshot" buckshot.dmg - - # EVERYTHING BELOW IS ONLY WHEN VERSION TAGS PUSHED (i.e. tag like "v0.1") + - name: Create Release id: create_release if: startsWith(github.ref, 'refs/tags/v') @@ -52,6 +66,7 @@ jobs: tag_name: ${{ github.ref }} release_name: Release ${{ github.ref }} + - name: Upload Mac Release if: startsWith(github.ref, 'refs/tags/v') && matrix.os == 'macos-latest' uses: actions/upload-release-asset@v1.0.1 @@ -62,3 +77,14 @@ jobs: asset_path: ./buckshot.dmg asset_name: buckshot.dmg asset_content_type: application/octet-stream + + - name: Upload Ubuntu Latest Release + if: startsWith(github.ref, 'refs/tags/v') && matrix.os == 'ubuntu-16.04' + uses: actions/upload-release-asset@v1.0.1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./buckshot-linux.zip + asset_name: buckshot-linux.zip + asset_content_type: application/octet-stream diff --git a/README.md b/README.md index df96bf7..68cbb87 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,10 @@ This project is written in C++ using the Qt framework. It calls out to two exte You can build and run the project without it, but it won't be able to generate previews or save to ProDOS volumes without those 3rd-party binaries. The authors of those projects are not involved with this project, but have graciously encouraged my integration attempts with this software. +sudo apt-get update +sudo apt-get install build-essential +sudo apt-get install qt5 + You will need to copy the binaries of those two programs for your platform to the build directory you are running. Example for Mac OSX "Release" build: diff --git a/assets/buckshot.desktop b/assets/buckshot.desktop new file mode 100644 index 0000000..49c36ba --- /dev/null +++ b/assets/buckshot.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Version=1.0 +Type=Application +Name=buckshot +Comment=Convert modern image formats to Apple II formats +Terminal=false +Categories=Utility; +Exec=AppRun %F +Icon=buckshot diff --git a/package_linux.sh b/package_linux.sh new file mode 100755 index 0000000..0b770a8 --- /dev/null +++ b/package_linux.sh @@ -0,0 +1,39 @@ +PACKAGEDIR=buckshot-package-ubuntu +APP=buckshot/buckshot +CONTENTDIR=${PACKAGEDIR}/buckshot.app/Contents +ASSETDIR=assets + +ID=${0##*/} + +echo "${ID}: MKDIR PACKAGEDIR" +mkdir -p $PACKAGEDIR + +echo "${ID}: COPY APP -> PACKAGEDIR" +cp -r $APP $PACKAGEDIR + +echo "${ID}: COPY EXTRA COMMON FILES" +cp README.md $PACKAGEDIR/README.txt +cp LICENSE.txt $PACKAGEDIR +cp assets/buckshot.desktop $PACKAGEDIR +cp assets/icon256.png $PACKAGEDIR/buckshot.png + + +echo "${ID}: DOWNLOAD UTILITY BINARIES" +curl -s -L -o cadius.zip https://github.com/digarok/cadius/releases/download/0.0.0/cadius-ubuntu-latest-0.0.0.zip +curl -s -L -o b2d.zip https://github.com/digarok/b2d/releases/download/v1.3/b2d-ubuntu-latest-v1.3.zip +unzip -o cadius.zip -d cadius +unzip -o b2d.zip -d b2d +echo "${ID}: COPY UTILITY BINARIES" +chmod +x b2d/b2d # @TODO: Fix me +cp b2d/b2d $PACKAGEDIR +cp cadius/cadius $PACKAGEDIR + +echo "${ID}: INSTALL EXTRA DEV PACKAGES" +sudo apt-get install -y libxkbcommon-x11-0 + +echo "${ID}: RUN DEPLOY BUILD" +wget -nv https://github.com/probonopd/linuxdeployqt/releases/download/5/linuxdeployqt-5-x86_64.AppImage +chmod +x linuxdeployqt-5-x86_64.AppImage +./linuxdeployqt-5-x86_64.AppImage $PACKAGEDIR/buckshot -appimage -bundle-non-qt-libs -verbose=2 + +zip -r buckshot-linux.zip $PACKAGEDIR \ No newline at end of file diff --git a/package_mac.sh b/package_mac.sh index 2278a95..69f5965 100755 --- a/package_mac.sh +++ b/package_mac.sh @@ -11,6 +11,8 @@ ID=${0##*/} echo "${ID}: RUN macdeployqt" macdeployqt $APPBUILDDIR + +echo "${ID}: COPY APPBUILDDIR -> PACKAGEDIR" cp -r $APPBUILDDIR $PACKAGEDIR echo "${ID}: COPY EXTRA FILES" @@ -22,8 +24,8 @@ cp README.md $PACKAGEDIR/README.txt cp LICENSE.txt $PACKAGEDIR echo "${ID}: DOWNLOAD UTILITY BINARIES" -curl -L -o cadius.zip https://github.com/digarok/cadius/releases/download/0.0.0/cadius-macos-latest-0.0.0.zip -curl -L -o b2d.zip https://github.com/digarok/b2d/releases/download/v1.3/b2d-macos-latest-v1.3.zip +curl -s -L -o cadius.zip https://github.com/digarok/cadius/releases/download/0.0.0/cadius-macos-latest-0.0.0.zip +curl -s -L -o b2d.zip https://github.com/digarok/b2d/releases/download/v1.3/b2d-macos-latest-v1.3.zip unzip -o cadius.zip -d cadius unzip -o b2d.zip -d b2d