From ce6e4dc6777c36d7df073a677e9c2e655b4cf9e9 Mon Sep 17 00:00:00 2001 From: Kingkor Roy Tirtho Date: Sat, 23 Apr 2022 21:55:40 +0600 Subject: [PATCH] flutter_distributor configurations added --- .gitignore | 5 +- distribute_options.yaml | 27 +++++++++++ linux/packaging/appimage/AppImageBuilder.yml | 50 ++++++++++++++++++++ linux/packaging/appimage/make_config.yaml | 5 ++ linux/packaging/deb/DEBIAN/control | 11 +++++ linux/packaging/deb/DEBIAN/postinst | 8 ++++ linux/packaging/deb/DEBIAN/postrm | 7 +++ macos/packaging/dmg/make_config.yaml | 11 +++++ windows/packaging/exe/make_config.yaml | 8 ++++ 9 files changed, 131 insertions(+), 1 deletion(-) create mode 100644 distribute_options.yaml create mode 100644 linux/packaging/appimage/AppImageBuilder.yml create mode 100644 linux/packaging/appimage/make_config.yaml create mode 100644 linux/packaging/deb/DEBIAN/control create mode 100755 linux/packaging/deb/DEBIAN/postinst create mode 100755 linux/packaging/deb/DEBIAN/postrm create mode 100644 macos/packaging/dmg/make_config.yaml create mode 100644 windows/packaging/exe/make_config.yaml diff --git a/.gitignore b/.gitignore index 19b426ef..eec14970 100644 --- a/.gitignore +++ b/.gitignore @@ -52,6 +52,7 @@ app.*.map.json /aur-struct/pkg /deb-struct/usr +/linux/packaging/deb/usr /AppDir /appimage-builder-cache @@ -69,4 +70,6 @@ installer.exe *.env lib/models/generated_secrets.dart help.txt -secrets.json \ No newline at end of file +secrets.json + +dist \ No newline at end of file diff --git a/distribute_options.yaml b/distribute_options.yaml new file mode 100644 index 00000000..c8919523 --- /dev/null +++ b/distribute_options.yaml @@ -0,0 +1,27 @@ +output: dist/ + +releases: + - name: dev + jobs: + # Generating a debian binary + - name: release-dev-linux-zip + package: + platform: linux + target: zip + build_args: + dart-define: + APP_ENV: dev + - name: release-dev-linux-deb + package: + platform: linux + target: deb + build_args: + dart-define: + APP_ENV: dev + - name: release-dev-linux-appimage + package: + platform: linux + target: appimage + build_args: + dart-define: + APP_ENV: dev \ No newline at end of file diff --git a/linux/packaging/appimage/AppImageBuilder.yml b/linux/packaging/appimage/AppImageBuilder.yml new file mode 100644 index 00000000..0644d570 --- /dev/null +++ b/linux/packaging/appimage/AppImageBuilder.yml @@ -0,0 +1,50 @@ +# appimage-builder recipe see https://appimage-builder.readthedocs.io for details +version: 1 +script: + - rm -rf AppDir || true + - cp -r build/linux/x64/release/bundle AppDir + - mkdir -p AppDir/usr/share/icons/hicolor/64x64/apps/ + - cp assets/spotube-logo.png AppDir/usr/share/icons/hicolor/64x64/apps/ +AppDir: + path: ./AppDir + app_info: + id: oss.krtirtho.spotube + name: Spotube + icon: spotube-logo + version: 2.0.0 + exec: spotube + exec_args: $@ + apt: + arch: amd64 + allow_unauthenticated: true + sources: + - sourceline: deb http://bd.archive.ubuntu.com/ubuntu/ hirsute main restricted + - sourceline: deb http://bd.archive.ubuntu.com/ubuntu/ hirsute-updates main restricted + - sourceline: deb http://bd.archive.ubuntu.com/ubuntu/ hirsute universe + - sourceline: deb http://bd.archive.ubuntu.com/ubuntu/ hirsute-updates universe + - sourceline: deb http://bd.archive.ubuntu.com/ubuntu/ hirsute multiverse + - sourceline: deb http://bd.archive.ubuntu.com/ubuntu/ hirsute-updates multiverse + - sourceline: + deb http://bd.archive.ubuntu.com/ubuntu/ hirsute-backports main + restricted universe multiverse + - sourceline: deb http://security.ubuntu.com/ubuntu hirsute-security main restricted + - sourceline: deb http://security.ubuntu.com/ubuntu hirsute-security universe + - sourceline: deb http://security.ubuntu.com/ubuntu hirsute-security multiverse + include: + - libkeybinder-3.0-0 + exclude: + - libx11-6 + - libgtk-3-0 + - libglib2.0-0 + - libc6 + files: + include: [] + exclude: + - usr/share/man + - usr/share/doc/*/README.* + - usr/share/doc/*/changelog.* + - usr/share/doc/*/NEWS.* + - usr/share/doc/*/TODO.* +AppImage: + arch: x86_64 + update-information: guess diff --git a/linux/packaging/appimage/make_config.yaml b/linux/packaging/appimage/make_config.yaml new file mode 100644 index 00000000..33b6fae0 --- /dev/null +++ b/linux/packaging/appimage/make_config.yaml @@ -0,0 +1,5 @@ +appId: oss.krtirtho.spotube +icon: assets/spotube-logo.png + +include: + - libkeybinder-3.0-0 diff --git a/linux/packaging/deb/DEBIAN/control b/linux/packaging/deb/DEBIAN/control new file mode 100644 index 00000000..6bc82c11 --- /dev/null +++ b/linux/packaging/deb/DEBIAN/control @@ -0,0 +1,11 @@ +Package: Spotube +Version: 2.0.0 +Section: sound +Priority: optional +Architecture: all +Essential: no +Installed-Size: 24400 +Depends: libkeybinder-3.0-0 (>= 0.3.2) +Maintainer: Kingkor Roy Tirtho +Description: A lightweight free Spotify crossplatform-client which handles playback manually, streams music using Youtube & no Spotify premium account is needed +Homepage: https://github.com/KRTirtho/spotube diff --git a/linux/packaging/deb/DEBIAN/postinst b/linux/packaging/deb/DEBIAN/postinst new file mode 100755 index 00000000..3bb1bee0 --- /dev/null +++ b/linux/packaging/deb/DEBIAN/postinst @@ -0,0 +1,8 @@ +#!/usr/bin/env sh + +echo Creating symlink + +ln -s /usr/share/spotube/spotube /usr/bin +chmod +x /usr/bin/spotube + +exit 0 \ No newline at end of file diff --git a/linux/packaging/deb/DEBIAN/postrm b/linux/packaging/deb/DEBIAN/postrm new file mode 100755 index 00000000..6518efc3 --- /dev/null +++ b/linux/packaging/deb/DEBIAN/postrm @@ -0,0 +1,7 @@ +#!/usr/bin/env sh + +echo Removing symlink + +rm /usr/bin/spotube + +exit 0 \ No newline at end of file diff --git a/macos/packaging/dmg/make_config.yaml b/macos/packaging/dmg/make_config.yaml new file mode 100644 index 00000000..09b17d68 --- /dev/null +++ b/macos/packaging/dmg/make_config.yaml @@ -0,0 +1,11 @@ +title: Spotube +icon: assets/spotube-logo.png +contents: + - x: 448 + y: 344 + type: link + path: "/Applications" + - x: 192 + y: 344 + type: file + path: build/macos/Build/Products/Release/spotube.app diff --git a/windows/packaging/exe/make_config.yaml b/windows/packaging/exe/make_config.yaml new file mode 100644 index 00000000..2f6b352a --- /dev/null +++ b/windows/packaging/exe/make_config.yaml @@ -0,0 +1,8 @@ +app_id: 80B901C8-D6FE-494E-8AF7-A2BD440E8644 +publisher: KRTirtho, OSS +publisher_url: https://github.com/KRTirtho/spotube +display_name: Spotube +create_desktop_icon: true +install_dir_name: Spotube +locales: + - en