-
Notifications
You must be signed in to change notification settings - Fork 140
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adding OpenPriv/flutter-desktop Dockerfiles for Linux and Windows des…
…ktop containers (#148)
- Loading branch information
Showing
3 changed files
with
56 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Docker containers for performing Flutter desktop builds | ||
|
||
These docker containers are built on containers from [cirrusci](https://hub.docker.com/u/cirrusci) ([cirruslabs](https://github.com/cirruslabs)). | ||
|
||
- linux-dev is just cirrusci/flutter:dev + apt installing the needed utils | ||
- windows-dev-sdk30-fdev2.2rc is cirrusci/android-sdk:30-windowsservercore-2019 with Visual Studio 16, and Flutter dev (2.2rc) | ||
|
||
These docker containers are both being used with Drone CI to build Flutter desktop apps for Linux and Windows. Simply run `flutter build` with the appropriate OS. These containers should work with any other Docker based automated build system such as Gitlab and others. | ||
|
||
Example [.drone.yml](https://git.openprivacy.ca/flutter/flutter_app/src/branch/trunk/.drone.yml) |
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,5 @@ | ||
FROM cirrusci/flutter:dev | ||
|
||
RUN apt-get update | ||
RUN apt-get install -y --no-install-recommends cmake ninja-build clang build-essential pkg-config libgtk-3-dev liblzma-dev lcov | ||
RUN flutter config --enable-linux-desktop |
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,41 @@ | ||
FROM cirrusci/android-sdk:30-windowsservercore-2019 | ||
|
||
# Install VS | ||
## https://docs.microsoft.com/en-us/visualstudio/install/build-tools-container?view=vs-2019 | ||
|
||
## Restore the default Windows shell for correct batch processing. | ||
SHELL ["cmd", "/S", "/C"] | ||
|
||
## Download the Build Tools bootstrapper. | ||
ADD https://aka.ms/vs/16/release/channel C:/TEMP/VisualStudio.chman | ||
|
||
ADD https://aka.ms/vs/16/release/vs_buildtools.exe C:/TEMP/vs_buildtools.exe | ||
## https://docs.microsoft.com/en-us/visualstudio/install/workload-component-id-vs-build-tools?view=vs-2019 | ||
RUN C:\TEMP\vs_buildtools.exe --quiet --wait --norestart --nocache \ | ||
--channelUri C:\TEMP\VisualStudio.chman \ | ||
--installChannelUri C:\TEMP\VisualStudio.chman \ | ||
--add Microsoft.VisualStudio.Component.Windows10SDK.19041 \ | ||
--add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 \ | ||
--add Microsoft.VisualStudio.Component.VC.CMake.Project \ | ||
--add Microsoft.VisualStudio.Workload.NativeDesktop \ | ||
--add Microsoft.VisualStudio.Workload.ManagedDesktopBuildTools \ | ||
--add Microsoft.VisualStudio.Workload.VCTools \ | ||
--add Microsoft.VisualStudio.Component.VC.CLI.Support \ | ||
--installPath C:\BuildTools \ | ||
|| IF "%ERRORLEVEL%"=="3010" EXIT 0 | ||
|
||
# Install Flutter | ||
|
||
RUN setx path "%path%;C:\flutter\bin;C:\flutter\bin\cache\dart-sdk\bin;" | ||
|
||
RUN git clone --branch dev https://github.com/flutter/flutter.git C:\flutter | ||
|
||
RUN flutter config --no-analytics | ||
|
||
RUN flutter config --enable-windows-desktop | ||
|
||
## Fix android sdk licenses (missing in cirruslabs container) | ||
RUN powershell.exe -Command \ | ||
Set-Content -Value "`n859f317696f67ef3d7f30a50a5560e7834b43903" -Path C:\Android\licenses\android-sdk-arm-dbt-license | ||
|
||
RUN flutter doctor -v |