mirror of
https://github.com/KRTirtho/spotube.git
synced 2025-09-13 07:55:18 +00:00

* feat: add build dart script for windows * feat: add android build support * feat: add linux build support * feat: add macos build support * feat: add ios build support * feat: add deps install command and workflow file * cd: what? * cd: what? * cd: what? * cd: update workflow inputs * cd: replace release binary * cd: run flutter pub get * cd: use dpkg zstd instead of xz, windows disable innoInstall, fix channel enum.name and reset pubspec after changing build no for nightly * cd: fix tar copy path * cd: fix copy linux command * cd: fix windows inno depend and fix android aab path * cd: idk * cd: linux why??? * cd: windows choco copy failed * cd: use dart tar archive for creating tar file * cd: fix linux file copy error * cd: use tar command directly * feat: add linux_arm platform * cd: add linux_arm platform * cd: don't know what? * feat: notification about nightly channel update * chore: fix some errors parsing nightly version info
75 lines
2.0 KiB
Dart
75 lines
2.0 KiB
Dart
import 'dart:async';
|
|
|
|
import 'package:args/command_runner.dart';
|
|
import 'package:process_run/shell_run.dart';
|
|
|
|
class InstallDependenciesCommand extends Command {
|
|
@override
|
|
String get description => "Install platform dependencies";
|
|
|
|
@override
|
|
String get name => "install-dependencies";
|
|
|
|
InstallDependenciesCommand() {
|
|
argParser.addOption(
|
|
"platform",
|
|
abbr: "p",
|
|
allowed: [
|
|
"windows",
|
|
"linux",
|
|
"linux_arm",
|
|
"macos",
|
|
"ios",
|
|
"android",
|
|
],
|
|
mandatory: true,
|
|
);
|
|
}
|
|
|
|
@override
|
|
FutureOr? run() async {
|
|
final shell = Shell();
|
|
|
|
switch (argResults!.option("platform")) {
|
|
case "windows":
|
|
break;
|
|
case "linux":
|
|
await shell.run(
|
|
"""
|
|
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
|
|
""",
|
|
);
|
|
break;
|
|
case "linux_arm":
|
|
await shell.run(
|
|
"""
|
|
sudo apt-get update -y
|
|
sudo apt-get install -y pkg-config make python3-pip python3-setuptools
|
|
""",
|
|
);
|
|
break;
|
|
case "macos":
|
|
await shell.run(
|
|
"""
|
|
brew install python-setuptools
|
|
npm install -g appdmg
|
|
""",
|
|
);
|
|
break;
|
|
case "ios":
|
|
break;
|
|
case "android":
|
|
await shell.run(
|
|
"""
|
|
sudo apt-get update -y
|
|
sudo apt-get install -y clang cmake ninja-build pkg-config libgtk-3-dev make python3-pip python3-setuptools patchelf desktop-file-utils libgdk-pixbuf2.0-dev fakeroot strace fuse
|
|
""",
|
|
);
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
}
|