mirror of
https://github.com/KRTirtho/spotube.git
synced 2025-12-06 07:29:42 +00:00
cd: add appimage support and use fastforge
This commit is contained in:
parent
11866d532b
commit
a452122302
25
.github/Dockerfile
vendored
25
.github/Dockerfile
vendored
@ -1,25 +0,0 @@
|
|||||||
ARG FLUTTER_VERSION
|
|
||||||
|
|
||||||
FROM --platform=linux/arm64 krtirtho/flutter_distributor:${FLUTTER_VERSION}
|
|
||||||
|
|
||||||
ARG BUILD_VERSION
|
|
||||||
|
|
||||||
WORKDIR /app
|
|
||||||
|
|
||||||
COPY . .
|
|
||||||
|
|
||||||
RUN chown -R $(whoami) /app
|
|
||||||
|
|
||||||
RUN rustup target add aarch64-unknown-linux-gnu
|
|
||||||
|
|
||||||
RUN flutter pub get
|
|
||||||
|
|
||||||
RUN alias dpkg-deb="dpkg-deb --Zxz" &&\
|
|
||||||
flutter_distributor package --platform=linux --targets=deb --skip-clean
|
|
||||||
|
|
||||||
RUN make tar VERSION=${BUILD_VERSION} ARCH=arm64 PKG_ARCH=aarch64
|
|
||||||
|
|
||||||
RUN mv build/spotube-linux-*-aarch64.tar.xz dist/ &&\
|
|
||||||
mv dist/**/spotube-*-linux.deb dist/Spotube-linux-aarch64.deb
|
|
||||||
|
|
||||||
CMD [ "sleep", "5000000" ]
|
|
||||||
3
.github/workflows/spotube-release-binary.yml
vendored
3
.github/workflows/spotube-release-binary.yml
vendored
@ -36,13 +36,14 @@ jobs:
|
|||||||
arch: x86
|
arch: x86
|
||||||
files: |
|
files: |
|
||||||
dist/Spotube-linux-x86_64.deb
|
dist/Spotube-linux-x86_64.deb
|
||||||
dist/Spotube-linux-x86_64.rpm
|
dist/Spotube-linux-x86_64.AppImage
|
||||||
dist/spotube-linux-*-x86_64.tar.xz
|
dist/spotube-linux-*-x86_64.tar.xz
|
||||||
- os: ubuntu-22.04-arm
|
- os: ubuntu-22.04-arm
|
||||||
platform: linux
|
platform: linux
|
||||||
arch: arm64
|
arch: arm64
|
||||||
files: |
|
files: |
|
||||||
dist/Spotube-linux-aarch64.deb
|
dist/Spotube-linux-aarch64.deb
|
||||||
|
dist/Spotube-linux-aarch64.AppImage
|
||||||
dist/spotube-linux-*-aarch64.tar.xz
|
dist/spotube-linux-*-aarch64.tar.xz
|
||||||
- os: ubuntu-22.04
|
- os: ubuntu-22.04
|
||||||
platform: android
|
platform: android
|
||||||
|
|||||||
@ -59,7 +59,7 @@ mixin BuildCommandCommonSteps on Command {
|
|||||||
"""
|
"""
|
||||||
flutter pub get
|
flutter pub get
|
||||||
dart run build_runner build --delete-conflicting-outputs
|
dart run build_runner build --delete-conflicting-outputs
|
||||||
dart pub global activate flutter_distributor
|
dart pub global activate fastforge
|
||||||
""",
|
""",
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -37,15 +37,9 @@ class LinuxBuildCommand extends Command with BuildCommandCommonSteps {
|
|||||||
await bootstrap();
|
await bootstrap();
|
||||||
|
|
||||||
await shell.run(
|
await shell.run(
|
||||||
"flutter_distributor package --platform=linux --targets=deb",
|
"fastforge package --platform=linux --targets=deb,appimage",
|
||||||
);
|
);
|
||||||
|
|
||||||
if (architecture == "x86") {
|
|
||||||
await shell.run(
|
|
||||||
"flutter_distributor package --platform=linux --targets=rpm",
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
final tempDir = join(Directory.systemTemp.path, "spotube-tar");
|
final tempDir = join(Directory.systemTemp.path, "spotube-tar");
|
||||||
final bundleArchName = architecture == "x86" ? "x86_64" : "aarch64";
|
final bundleArchName = architecture == "x86" ? "x86_64" : "aarch64";
|
||||||
final bundleDirPath = join(
|
final bundleDirPath = join(
|
||||||
@ -99,22 +93,22 @@ class LinuxBuildCommand extends Command with BuildCommandCommonSteps {
|
|||||||
);
|
);
|
||||||
await ogDeb.delete();
|
await ogDeb.delete();
|
||||||
|
|
||||||
if (architecture == "x86") {
|
final ogAppImage = File(
|
||||||
final ogRpm = File(
|
|
||||||
join(
|
join(
|
||||||
cwd.path,
|
cwd.path,
|
||||||
"dist",
|
"dist",
|
||||||
pubspec.version.toString(),
|
pubspec.version.toString(),
|
||||||
"spotube-${pubspec.version}-linux.rpm",
|
"spotube-${pubspec.version}-linux.AppImage",
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
await ogAppImage.copy(
|
||||||
await ogRpm.copy(
|
join(
|
||||||
join(cwd.path, "dist", "Spotube-linux-$bundleArchName.rpm"),
|
cwd.path,
|
||||||
|
"dist",
|
||||||
|
"Spotube-linux-$bundleArchName.AppImage",
|
||||||
|
),
|
||||||
);
|
);
|
||||||
|
await ogAppImage.delete();
|
||||||
await ogRpm.delete();
|
|
||||||
}
|
|
||||||
|
|
||||||
stdout.writeln("✅ Linux building done");
|
stdout.writeln("✅ Linux building done");
|
||||||
}
|
}
|
||||||
|
|||||||
@ -21,7 +21,7 @@ class MacosBuildCommand extends Command with BuildCommandCommonSteps {
|
|||||||
"""
|
"""
|
||||||
flutter build macos
|
flutter build macos
|
||||||
appdmg appdmg.json ${join(cwd.path, "build", "Spotube-macos-universal.dmg")}
|
appdmg appdmg.json ${join(cwd.path, "build", "Spotube-macos-universal.dmg")}
|
||||||
flutter_distributor package --platform=macos --targets pkg --skip-clean
|
fastforge package --platform=macos --targets pkg --skip-clean
|
||||||
""",
|
""",
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -61,7 +61,7 @@ class WindowsBuildCommand extends Command with BuildCommandCommonSteps {
|
|||||||
);
|
);
|
||||||
|
|
||||||
await shell.run(
|
await shell.run(
|
||||||
"flutter_distributor package --platform=windows --targets=exe --skip-clean",
|
"fastforge package --platform=windows --targets=exe --skip-clean",
|
||||||
);
|
);
|
||||||
|
|
||||||
final ogExe = File(
|
final ogExe = File(
|
||||||
|
|||||||
@ -37,6 +37,8 @@ class InstallDependenciesCommand extends Command {
|
|||||||
FutureOr? run() async {
|
FutureOr? run() async {
|
||||||
final shell = Shell();
|
final shell = Shell();
|
||||||
|
|
||||||
|
final arch = argResults?.option("arch") == "x86" ? "x86_64" : "aarch64";
|
||||||
|
|
||||||
switch (argResults!.option("platform")) {
|
switch (argResults!.option("platform")) {
|
||||||
case "windows":
|
case "windows":
|
||||||
await shell.run(
|
await shell.run(
|
||||||
@ -49,7 +51,10 @@ class InstallDependenciesCommand extends Command {
|
|||||||
await shell.run(
|
await shell.run(
|
||||||
"""
|
"""
|
||||||
sudo apt-get update -y
|
sudo apt-get update -y
|
||||||
sudo apt-get install -y tar clang cmake ninja-build pkg-config libgtk-3-dev make python3-pip python3-setuptools desktop-file-utils libgdk-pixbuf2.0-dev fakeroot strace fuse libunwind-dev locate patchelf gir1.2-appindicator3-0.1 libappindicator3-1 libappindicator3-dev libsecret-1-0 libjsoncpp25 libsecret-1-dev libjsoncpp-dev libnotify-bin libnotify-dev mpv libmpv-dev libwebkit2gtk-4.1-0 libwebkit2gtk-4.1-dev libsoup-3.0-0 libsoup-3.0-dev
|
sudo apt-get install -y wget tar clang cmake ninja-build pkg-config libgtk-3-dev make python3-pip python3-setuptools desktop-file-utils libgdk-pixbuf2.0-dev fakeroot strace fuse libunwind-dev locate patchelf gir1.2-appindicator3-0.1 libappindicator3-1 libappindicator3-dev libsecret-1-0 libjsoncpp25 libsecret-1-dev libjsoncpp-dev libnotify-bin libnotify-dev mpv libmpv-dev libwebkit2gtk-4.1-0 libwebkit2gtk-4.1-dev libsoup-3.0-0 libsoup-3.0-dev
|
||||||
|
wget -O appimagetool "https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-$arch.AppImage"
|
||||||
|
chmod +x appimagetool
|
||||||
|
sudo mv appimagetool /usr/local/bin/
|
||||||
""",
|
""",
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user