Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add macos support #496

Merged
merged 6 commits into from
Sep 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
100 changes: 59 additions & 41 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -309,38 +309,56 @@ jobs:
with:
name: linux-alternative-portable
path: app/build/linux/x64/release/bundle
#build-macos:
# runs-on: macos-latest
# defaults:
# run:
# working-directory: app
# steps:
# - name: ⬆️ Checkout
# uses: actions/checkout@v4
# - name: Get flutter version
# run: |
# FLUTTER_VERSION=$(cat ../FLUTTER_VERSION)
# echo "FLUTTER_VERSION=${FLUTTER_VERSION}" >> $GITHUB_ENV
# - uses: subosito/flutter-action@v2
# with:
# flutter-version: ${{ env.FLUTTER_VERSION }}
# channel: 'any'
# - name: ✅ Enable platforms
# run: flutter config --enable-macos-desktop
# - name: 📦 Get dependencies
# run: |
# flutter clean
# flutter pub get
# flutter doctor -v
# - name: 🏭 Build
# run: |
# flutter build macos -v
# - name: Archive
# uses: actions/upload-artifact@v3
# with:
# name: macos-build
# path: |
# app/build/macos/Build/Products/Release/butterfly.app
build-macos:
runs-on: macos-latest
defaults:
run:
working-directory: app
steps:
- name: ⬆️ Checkout
uses: actions/checkout@v4
- name: Get flutter version
run: |
FLUTTER_VERSION=$(cat ../FLUTTER_VERSION)
echo "FLUTTER_VERSION=${FLUTTER_VERSION}" >> $GITHUB_ENV
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
channel: 'any'
- name: ✅ Enable platforms
run: flutter config --enable-macos-desktop
- name: 📦 Get dependencies
run: |
flutter clean
flutter pub get
flutter doctor -v
- name: 🏭 Build
run: |
flutter build macos -v --release
- name: Zip file
working-directory: app/build/macos/Build/Products/Release
run: zip --symlinks -qr linwood-butterfly-macos.zip butterfly.app
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: '18'
- name: Install appdmg
run: npm install -g appdmg
- name: Create dmg
run: |
appdmg DmgSetup.json linwood-butterfly-macos.dmg
- name: Archive
uses: actions/upload-artifact@v3
with:
name: macos-build
path: |
app/build/macos/Build/Products/Release/linwood-butterfly-macos.zip
- name: Archive
uses: actions/upload-artifact@v3
with:
name: macos-dmg
path: |
app/linwood-butterfly-macos.dmg
# build-snap:
# name: Build Snap
# runs-on: ubuntu-latest
Expand Down Expand Up @@ -372,7 +390,7 @@ jobs:
- build-windows
- build-linux
- build-flatpak
#- build-macos
- build-macos
steps:
- name: ⬆️ Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -413,20 +431,19 @@ jobs:
- uses: actions/download-artifact@v3
with:
name: linux-appimage
#- uses: actions/download-artifact@v3
# with:
# name: linux-flatpak
- uses: actions/download-artifact@v3
with:
name: linux-alternative-portable
path: linux-alternative-portable/
- uses: actions/download-artifact@v3
with:
name: windows-setup
#- uses: actions/download-artifact@v3
# with:
# name: macos-build
# path: macos-build/
- uses: actions/download-artifact@v3
with:
name: macos-build
- uses: actions/download-artifact@v3
with:
name: macos-dmg
- name: 📦 Zip artifacts
run: |
zip -r linwood-butterfly-windows.zip windows-build/*
Expand Down Expand Up @@ -455,7 +472,8 @@ jobs:
linwood-butterfly-linux-alternative.tar.gz
linwood-butterfly-linux.deb
linwood-butterfly-linux.AppImage
# linwood-butterfly-macos.tar.gz
linwood-butterfly-macos.zip
linwood-butterfly-macos.dmg
# linwood-butterfly-linux.flatpak
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
34 changes: 17 additions & 17 deletions app/.metadata
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
# This file tracks properties of this Flutter project.
# Used by Flutter tool to assess capabilities and perform upgrades etc.
#
# This file should be version controlled.
# This file should be version controlled and should not be manually edited.

version:
revision: 4b12645012342076800eb701bcdfe18f87da21cf
channel: stable
revision: "367f9ea16bfae1ca451b9cc27c1366870b187ae2"
channel: "stable"

project_type: app

# Tracks metadata for the flutter migrate command
migration:
platforms:
- platform: root
create_revision: 4b12645012342076800eb701bcdfe18f87da21cf
base_revision: 4b12645012342076800eb701bcdfe18f87da21cf
create_revision: 367f9ea16bfae1ca451b9cc27c1366870b187ae2
base_revision: 367f9ea16bfae1ca451b9cc27c1366870b187ae2
- platform: android
create_revision: 4b12645012342076800eb701bcdfe18f87da21cf
base_revision: 4b12645012342076800eb701bcdfe18f87da21cf
create_revision: 367f9ea16bfae1ca451b9cc27c1366870b187ae2
base_revision: 367f9ea16bfae1ca451b9cc27c1366870b187ae2
- platform: ios
create_revision: 4b12645012342076800eb701bcdfe18f87da21cf
base_revision: 4b12645012342076800eb701bcdfe18f87da21cf
create_revision: 367f9ea16bfae1ca451b9cc27c1366870b187ae2
base_revision: 367f9ea16bfae1ca451b9cc27c1366870b187ae2
- platform: linux
create_revision: 4b12645012342076800eb701bcdfe18f87da21cf
base_revision: 4b12645012342076800eb701bcdfe18f87da21cf
create_revision: 367f9ea16bfae1ca451b9cc27c1366870b187ae2
base_revision: 367f9ea16bfae1ca451b9cc27c1366870b187ae2
- platform: macos
create_revision: 4b12645012342076800eb701bcdfe18f87da21cf
base_revision: 4b12645012342076800eb701bcdfe18f87da21cf
create_revision: 367f9ea16bfae1ca451b9cc27c1366870b187ae2
base_revision: 367f9ea16bfae1ca451b9cc27c1366870b187ae2
- platform: web
create_revision: 4b12645012342076800eb701bcdfe18f87da21cf
base_revision: 4b12645012342076800eb701bcdfe18f87da21cf
create_revision: 367f9ea16bfae1ca451b9cc27c1366870b187ae2
base_revision: 367f9ea16bfae1ca451b9cc27c1366870b187ae2
- platform: windows
create_revision: 4b12645012342076800eb701bcdfe18f87da21cf
base_revision: 4b12645012342076800eb701bcdfe18f87da21cf
create_revision: 367f9ea16bfae1ca451b9cc27c1366870b187ae2
base_revision: 367f9ea16bfae1ca451b9cc27c1366870b187ae2

# User provided section

Expand Down
9 changes: 9 additions & 0 deletions app/DmgSetup.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"title": "Linwood Butterfly",
"icon": "build/macos/Build/Products/Release/butterfly.app/Contents/Resources/AppIcon.icns",
"background-color": "#1b1b1d",
"contents": [
{ "x": 448, "y": 344, "type": "link", "path": "/Applications" },
{ "x": 192, "y": 344, "type": "file", "path": "build/macos/Build/Products/Release/butterfly.app" }
]
}
2 changes: 2 additions & 0 deletions app/ios/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
**/dgph
*.mode1v3
*.mode2v3
*.moved-aside
Expand All @@ -18,6 +19,7 @@ Flutter/App.framework
Flutter/Flutter.framework
Flutter/Flutter.podspec
Flutter/Generated.xcconfig
Flutter/ephemeral/
Flutter/app.flx
Flutter/app.zip
Flutter/flutter_assets/
Expand Down
4 changes: 2 additions & 2 deletions app/ios/Flutter/AppFrameworkInfo.plist
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<string>en</string>
<key>CFBundleExecutable</key>
<string>App</string>
<key>CFBundleIdentifier</key>
Expand All @@ -21,6 +21,6 @@
<key>CFBundleVersion</key>
<string>1.0</string>
<key>MinimumOSVersion</key>
<string>8.0</string>
<string>11.0</string>
</dict>
</plist>
1 change: 0 additions & 1 deletion app/ios/Flutter/Debug.xcconfig
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
#include "Generated.xcconfig"
1 change: 0 additions & 1 deletion app/ios/Flutter/Release.xcconfig
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
#include "Generated.xcconfig"
Loading
Loading