-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* cd: use docker buildx * cd: use linux host for linux arm instead of macos m1 m1 doesn't support nested virtualization. (Apple truly sucks) * cd: don't specify arch in Dockerfile * cd: use custom Dockerfile from ubuntu instead of flutter image * cd: add setup java for android * cd: add flutter distributor pre-built docker image for arm * cd: save me from this cursed arm build * cd: ?? * cd: ?? * cd: use docker build
- Loading branch information
Showing
4 changed files
with
83 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,5 @@ build | |
dist | ||
.dart_tool | ||
.idea | ||
.github | ||
.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,27 @@ | ||
ARG FLUTTER_VERSION | ||
ARG BUILD_VERSION | ||
|
||
FROM --platform=arm64 fischerscode/flutter-sudo:${FLUTTER_VERSION} | ||
FROM --platform=linux/arm64 krtirtho/flutter_distributor_arm64:${FLUTTER_VERSION} | ||
|
||
WORKDIR /app | ||
ARG BUILD_VERSION | ||
|
||
# Install dependencies | ||
RUN sudo apt-get update &&\ | ||
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 rpm &&\ | ||
sudo rm -rf /var/lib/apt/lists/* | ||
WORKDIR /app | ||
|
||
COPY . . | ||
|
||
RUN sudo chown -R $(whoami) /app | ||
RUN chown -R $(whoami) /app | ||
|
||
RUN flutter pub get &&\ | ||
flutter config --enable-linux-desktop &&\ | ||
flutter pub get &&\ | ||
dart run build_runner build --delete-conflicting-outputs | ||
|
||
RUN dart pub global activate flutter_distributor &&\ | ||
alias dpkg-deb="dpkg-deb --Zxz" &&\ | ||
flutter_distributor package --platform=linux --targets=deb &&\ | ||
flutter_distributor package --platform=linux --targets=rpm | ||
RUN alias dpkg-deb="dpkg-deb --Zxz" &&\ | ||
flutter_distributor package --platform=linux --targets=deb | ||
|
||
|
||
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 &&\ | ||
mv dist/**/spotube-*-linux.rpm dist/Spotube-linux-aarch64.rpm | ||
mv dist/**/spotube-*-linux.deb dist/Spotube-linux-aarch64.deb | ||
|
||
CMD [ "sleep", "5000000" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
FROM --platform=linux/arm64 ubuntu:22.04 | ||
|
||
ARG FLUTTER_VERSION | ||
|
||
RUN apt-get clean &&\ | ||
apt-get update &&\ | ||
apt-get install -y bash curl file git unzip xz-utils zip libglu1-mesa cmake tar clang 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 rpm && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
WORKDIR /home/flutter | ||
|
||
RUN git clone https://github.com/flutter/flutter.git -b ${FLUTTER_VERSION} --single-branch flutter-sdk | ||
|
||
RUN flutter-sdk/bin/flutter precache | ||
|
||
RUN flutter-sdk/bin/flutter config --no-analytics | ||
|
||
ENV PATH="$PATH:/home/flutter/flutter-sdk/bin" | ||
ENV PATH="$PATH:/home/flutter/flutter-sdk/bin/cache/dart-sdk/bin" | ||
ENV PATH="$PATH:/home/flutter/.pub-cache/bin" | ||
ENV PUB_CACHE="/home/flutter/.pub-cache" | ||
|
||
RUN dart pub global activate flutter_distributor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters