From c125fb82e3adbafa261a5e487043b0431d0a3caa Mon Sep 17 00:00:00 2001 From: Tact Yoshida Date: Feb 04 2020 01:57:13 +0000 Subject: Add portable artifact for Linux --- diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 23f8362..39b3d1c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,8 +19,8 @@ jobs: - uses: actions/checkout@v2 - name: Install libraries run: | - sudo apt update - sudo apt install build-essential cmake pkg-config ninja-build ccache libboost-all-dev qt5-default qtbase5-dev libqt5svg5-dev qtscript5-dev qttools5-dev qttools5-dev-tools libqt5opengl5-dev qtmultimedia5-dev libsuperlu-dev liblz4-dev libusb-1.0-0-dev liblzo2-dev libpng-dev libjpeg-dev libglew-dev freeglut3-dev libfreetype6-dev libjson-c-dev qtwayland5 libmypaint-dev + sudo apt-get update + sudo apt-get install build-essential cmake pkg-config ninja-build ccache libboost-all-dev qt5-default qtbase5-dev libqt5svg5-dev qtscript5-dev qttools5-dev qttools5-dev-tools libqt5opengl5-dev qtmultimedia5-dev libqt5multimedia5-plugins libsuperlu-dev liblz4-dev libusb-1.0-0-dev liblzo2-dev libpng-dev libjpeg-dev libglew-dev freeglut3-dev libfreetype6-dev libjson-c-dev qtwayland5 libmypaint-dev - uses: actions/cache@v1 with: @@ -42,6 +42,49 @@ jobs: cmake ../sources -G Ninja -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER=${{ matrix.cxx }} -DCMAKE_C_COMPILER=${{ matrix.cc }} ninja + - name: Create Artifact + run: | + cd toonz/build + sudo ninja install + + mkdir -p appdir/usr + cp -r /opt/opentoonz/* appdir/usr + cp appdir/usr/share/applications/*.desktop appdir + cp appdir/usr/share/icons/hicolor/*/apps/*.png appdir + + mkdir -p artifact/OpenToonzPortable + mv appdir/usr/share/opentoonz/stuff artifact/OpenToonzPortable/portablestuff + rmdir appdir/usr/share/opentoonz + + wget -q -c 'https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage' + wget -q -c 'https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage' + wget -q -c 'https://github.com/linuxdeploy/linuxdeploy-plugin-appimage/releases/download/continuous/linuxdeploy-plugin-appimage-x86_64.AppImage' + chmod 755 linuxdeploy-x86_64.AppImage + chmod 755 linuxdeploy-plugin-qt-x86_64.AppImage + chmod 755 linuxdeploy-plugin-appimage-x86_64.AppImage + + cat << EOF > apprun.sh + #!/usr/bin/env bash + exec "\${APPDIR}/usr/bin/OpenToonz" + EOF + chmod 755 apprun.sh + + export LD_LIBRARY_PATH='appdir/usr/lib/opentoonz' + ./linuxdeploy-x86_64.AppImage --appdir=appdir --plugin=qt --output=appimage --custom-apprun=apprun.sh \ + --executable=appdir/usr/bin/lzocompress \ + --executable=appdir/usr/bin/lzodecompress \ + --executable=appdir/usr/bin/tcleanup \ + --executable=appdir/usr/bin/tcomposer \ + --executable=appdir/usr/bin/tconverter \ + --executable=appdir/usr/bin/tfarmcontroller \ + --executable=appdir/usr/bin/tfarmserver + mv OpenToonz*.AppImage artifact/OpenToonzPortable/OpenToonz.AppImage + + - uses: actions/upload-artifact@v1 + with: + name: Opentoonz-${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }} + path: toonz/build/artifact + macOS: runs-on: macos-latest steps: