From f3c15b3143ce94bbd23bc019ea20261e4f9e60e9 Mon Sep 17 00:00:00 2001 From: kodjomoustapha <107993382+kodjodevf@users.noreply.github.com> Date: Thu, 14 Nov 2024 14:42:45 +0100 Subject: [PATCH] add linux build configs --- .github/workflows/release.yml | 253 ++++++++++------------ linux/appimage/AppRun.desktop | 8 - linux/appimage/AppRun.png | Bin 3122 -> 0 bytes linux/packaging/appimage/make_config.yaml | 17 ++ linux/packaging/deb/make_config.yaml | 34 +++ 5 files changed, 170 insertions(+), 142 deletions(-) delete mode 100644 linux/appimage/AppRun.desktop delete mode 100644 linux/appimage/AppRun.png create mode 100644 linux/packaging/appimage/make_config.yaml create mode 100644 linux/packaging/deb/make_config.yaml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6dc754b..9d670e4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -185,12 +185,7 @@ jobs: # - name: build windows # run: | - # flutter build windows --release - # $DestDir = "build\windows\Mangayomi-${{ github.ref_name }}-windows" - # $SrcDir = "build\windows\runner\Release" - # New-Item -Path $DestDir -ItemType Directory - # Copy-Item $SrcDir\* -Recurse $DestDir - # Copy-Item -Filter *.dll -Path windows\* -Destination $DestDir -Force + # flutter build windows # Compress-Archive $DestDir build\windows\Mangayomi-${{ github.ref_name }}-windows.zip # - name: upload artifact windows zip @@ -205,164 +200,154 @@ jobs: # allowUpdates: true - build-and-release-linux-zip: - permissions: - contents: write - runs-on: ubuntu-latest - steps: + # build-and-release-linux-zip: + # permissions: + # contents: write + # runs-on: ubuntu-latest + # steps: - - name: checkout branch - uses: actions/checkout@v4 + # - name: checkout branch + # uses: actions/checkout@v4 - - name: Install dependencies - run: | - sudo apt-get update - sudo apt-get install webkit2gtk-4.1 clang cmake ninja-build pkg-config libgtk-3-dev mpv libmpv-dev dpkg-dev + # - name: Install dependencies + # run: | + # sudo apt-get update + # sudo apt-get install webkit2gtk-4.1 clang cmake ninja-build pkg-config libgtk-3-dev mpv libmpv-dev dpkg-dev - - name: setup flutter - uses: subosito/flutter-action@v2 - with: - channel: 'stable' + # - name: setup flutter + # uses: subosito/flutter-action@v2 + # with: + # channel: 'stable' - - name: Setup Rust toolchain - uses: dtolnay/rust-toolchain@stable + # - name: Setup Rust toolchain + # uses: dtolnay/rust-toolchain@stable - - name: Install the CLI tool - run: cargo install 'flutter_rust_bridge_codegen' + # - name: Install the CLI tool + # run: cargo install 'flutter_rust_bridge_codegen' - - name: flutter pub get - run: flutter pub get + # - name: flutter pub get + # run: flutter pub get - - name: build linux - run: flutter build linux --verbose - - name: Zip - uses: thedoctor0/zip-release@master - with: - type: "zip" - filename: Mangayomi-${{ github.ref_name }}-linux.zip - directory: build/linux/x64/release/bundle + # - name: build linux + # run: flutter build linux --verbose + # - name: Zip + # uses: thedoctor0/zip-release@master + # with: + # type: "zip" + # filename: Mangayomi-${{ github.ref_name }}-linux.zip + # directory: build/linux/x64/release/bundle - - name: upload artifact linux zip - uses: actions/upload-artifact@v3 - with: - path: build/linux/x64/release/bundle/Mangayomi-*.zip - - name: release packages linux zip - uses: ncipollo/release-action@v1 - with: - artifacts: build/linux/x64/release/bundle/Mangayomi-*.zip - allowUpdates: true + # - name: upload artifact linux zip + # uses: actions/upload-artifact@v3 + # with: + # path: build/linux/x64/release/bundle/Mangayomi-*.zip + # - name: release packages linux zip + # uses: ncipollo/release-action@v1 + # with: + # artifacts: build/linux/x64/release/bundle/Mangayomi-*.zip + # allowUpdates: true - build-and-release-linux-appimage_libmpv_so: - permissions: - contents: write - runs-on: ubuntu-latest - steps: + # build-and-release-linux-deb: + # permissions: + # contents: write + # runs-on: ubuntu-latest + # steps: - - name: checkout branch - uses: actions/checkout@v4 + # - name: checkout branch + # uses: actions/checkout@v4 - - name: Install dependencies - run: | - sudo apt-get update - sudo apt-get install webkit2gtk-4.1 clang cmake ninja-build pkg-config libgtk-3-dev mpv libmpv-dev dpkg-dev + # - name: Install dependencies + # run: | + # sudo apt-get update + # sudo apt-get install webkit2gtk-4.1 clang cmake ninja-build pkg-config libgtk-3-dev mpv libmpv-dev dpkg-dev libfuse2 - - name: setup flutter - uses: subosito/flutter-action@v2 - with: - channel: 'stable' - - - name: Setup Rust toolchain - uses: dtolnay/rust-toolchain@stable + # - name: setup flutter + # uses: subosito/flutter-action@v2 + # with: + # channel: 'stable' - - name: Install the CLI tool - run: cargo install 'flutter_rust_bridge_codegen' + # - name: Setup Rust toolchain + # uses: dtolnay/rust-toolchain@stable + + # - name: Install the CLI tool + # run: cargo install 'flutter_rust_bridge_codegen' + # - name: flutter pub get + # run: flutter pub get - - name: flutter pub get - run: flutter pub get + # - name: Enable dart_distributor + # run: dart pub global activate flutter_distributor - - name: build linux - run: | + # - name: Update PATH + # run: echo 'export PATH="$PATH:$HOME/.pub-cache/bin"' >> ~/.bashrc - sudo apt install -y libfuse2 - - curl -JOL https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage - chmod a+x appimagetool-x86_64.AppImage - mv appimagetool-x86_64.AppImage appimagetool + # - name: Build deb package + # run: flutter_distributor package --platform linux --targets deb - flutter build linux --release + # - name: Move deb file + # run: mv $(find dist -type f -name "mangayomi*.deb") dist/Mangayomi-${{ github.ref_name }}-linux.deb - patchelf --replace-needed libmpv.so.1 libmpv.so build/linux/x64/release/bundle/lib/libmedia_kit_video_plugin.so - patchelf --replace-needed libmpv.so.1 libmpv.so build/linux/x64/release/bundle/lib/libmedia_kit_native_event_loop.so - - mv build/linux/x64/release/bundle/{mangayomi,AppRun} - cp linux/appimage/* build/linux/x64/release/bundle/ - ./appimagetool build/linux/x64/release/bundle/ - mv *.AppImage build/Mangayomi-${{ github.ref_name }}-linux_libmpv_so.AppImage + # - name: upload artifact linux deb + # uses: actions/upload-artifact@v3 + # with: + # path: dist/Mangayomi-*.deb - - name: upload artifact linux appimage - uses: actions/upload-artifact@v3 - with: - path: build/Mangayomi-*.AppImage - - name: Rrelease packages appimage - uses: ncipollo/release-action@v1 - with: - artifacts: build/Mangayomi-*.AppImage - allowUpdates: true + # - name: Release package deb + # uses: ncipollo/release-action@v1 + # with: + # artifacts: dist/Mangayomi-*.deb + # allowUpdates: true - build-and-release-linux-appimage_libmpv_so_1: - permissions: - contents: write - runs-on: ubuntu-latest - steps: + + # build-and-release-linux-appimage: + # permissions: + # contents: write + # runs-on: ubuntu-latest + # steps: - - name: checkout branch - uses: actions/checkout@v4 + # - name: checkout branch + # uses: actions/checkout@v4 - - name: Install dependencies - run: | - sudo apt-get update - sudo apt-get install webkit2gtk-4.1 clang cmake ninja-build pkg-config libgtk-3-dev mpv libmpv-dev dpkg-dev + # - name: Install dependencies + # run: | + # sudo apt-get update + # sudo apt-get install webkit2gtk-4.1 clang cmake ninja-build pkg-config libgtk-3-dev mpv libmpv-dev dpkg-dev libfuse2 - - name: setup flutter - uses: subosito/flutter-action@v2 - with: - channel: 'stable' - - - name: Setup Rust toolchain - uses: dtolnay/rust-toolchain@stable + # - name: setup flutter + # uses: subosito/flutter-action@v2 + # with: + # channel: 'stable' - - name: Install the CLI tool - run: cargo install 'flutter_rust_bridge_codegen' + # - name: Setup Rust toolchain + # uses: dtolnay/rust-toolchain@stable + + # - name: Install the CLI tool + # run: cargo install 'flutter_rust_bridge_codegen' + # - name: flutter pub get + # run: flutter pub get - - name: flutter pub get - run: flutter pub get + # - name: Enable dart_distributor + # run: dart pub global activate flutter_distributor - - name: build linux - run: | + # - name: Update PATH + # run: echo 'export PATH="$PATH:$HOME/.pub-cache/bin"' >> ~/.bashrc - sudo apt install -y libfuse2 - - curl -JOL https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage - chmod a+x appimagetool-x86_64.AppImage - mv appimagetool-x86_64.AppImage appimagetool + # - name: Build AppImage package + # run: flutter_distributor package --platform linux --targets deb - flutter build linux --release - - mv build/linux/x64/release/bundle/{mangayomi,AppRun} - cp linux/appimage/* build/linux/x64/release/bundle/ - ./appimagetool build/linux/x64/release/bundle/ - mv *.AppImage build/Mangayomi-${{ github.ref_name }}-linux_libmpv_so_1.AppImage + # - name: Move AppImage file + # run: mv $(find dist -type f -name "mangayomi*.AppImage") dist/Mangayomi-${{ github.ref_name }}-linux.AppImage - - name: upload artifact linux appimage - uses: actions/upload-artifact@v3 - with: - path: build/Mangayomi-*.AppImage - - name: Rrelease packages appimage - uses: ncipollo/release-action@v1 - with: - artifacts: build/Mangayomi-*.AppImage - allowUpdates: true + # - name: upload artifact linux AppImage + # uses: actions/upload-artifact@v3 + # with: + # path: dist/Mangayomi-*.AppImage + + # - name: Release package AppImage + # uses: ncipollo/release-action@v1 + # with: + # artifacts: dist/Mangayomi-*.AppImage + # allowUpdates: true \ No newline at end of file diff --git a/linux/appimage/AppRun.desktop b/linux/appimage/AppRun.desktop deleted file mode 100644 index b317df3..0000000 --- a/linux/appimage/AppRun.desktop +++ /dev/null @@ -1,8 +0,0 @@ -[Desktop Entry] -Version=1.0 -Type=Application -Terminal=false -Name=mangayomi -Exec=AppRun %u -Icon=AppRun -Categories=Utility; \ No newline at end of file diff --git a/linux/appimage/AppRun.png b/linux/appimage/AppRun.png deleted file mode 100644 index d423107a04f9dd423b8a41050d9a4140457591c8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3122 zcmV-249)Y2P)XOxjYWK}4PfCEw~ zyR5@HmH~#vvQ!EMq%~b=o1{%%*0<(u_g;VJd&z5F@{+uysdy%La@X&jbG~za=Xbt) zO~-K{;tZsGRyceObp1k2H(YP?TyY*UAVty(EI87;^QXuR&k6U;{|e|~o>68Alb)XVGO z`_7s0oJ2!hX8Fo!+G2AuXp`Hy3%ytV6q$F{4|za^h6<6vFmdR0jsNxfI#>fKSm_LO zH-Ccrf_R$bfyYBblF)0amFKNJdl9|mPPo^-fr_8~80O68a#eDdZEotdH_?0bwXi$G z`%W@Ekmcr>NHgFQRB(V^PV;|`UdOP6HM#HMwE$-&7zn^uAA*xf!|Lr-v!~b9!VY&K za{UdcxcV}9PB^|Sy~;9R;Q5!(f8B53^z|1hCD9Y-l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