diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2a075af..6882459 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,15 +6,17 @@ on: branches: [main] jobs: - macos_big_sur: - runs-on: macos-11 + macos_sonoma: + # check https://github.com/actions/runner-images for available versions + runs-on: macos-14 strategy: matrix: xcode: - - "13.2" # Swift 5.5 + # https://github.com/actions/runner-images/blob/main/images/macos/macos-14-Readme.md + - "15.4" - name: "macOS Big Sur (Xcode ${{ matrix.xcode }})" + name: "macOS 14 Sonoma ARM (Xcode ${{ matrix.xcode }})" steps: - name: Checkout @@ -33,7 +35,41 @@ jobs: run: | make txz - name: Upload artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: - name: allapps.tar.xz + name: macpin-allapps-arm64.tar.xz path: ${{ steps.getpaths.outputs.TXZ_PATH }} + +##macos_sonoma_x86: +## # check https://github.com/actions/runner-images for available versions +## runs-on: macos-14-large + +## strategy: +## matrix: +## xcode: +## # https://github.com/actions/runner-images/blob/main/images/macos/macos-14-Readme.md +## - "15.4" + +## name: "macOS 14 Sonoma x86 (Xcode ${{ matrix.xcode }})" + +## steps: +## - name: Checkout +## uses: actions/checkout@v1 +## - name: Get build paths +## id: getpaths +## run: | +## echo ::set-output name=OUT_PATH::$(make where-out 2>/dev/null | tail -n1) +## echo ::set-output name=TXZ_PATH::$(make where-txz 2>/dev/null | tail -n1) +## - name: Build All Apps +## run: | +## make allapps +## env: +## DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer +## - name: Create Package +## run: | +## make txz +## - name: Upload artifact +## uses: actions/upload-artifact@v4 +## with: +## name: macpin-allapps-x86.tar.xz +## path: ${{ steps.getpaths.outputs.TXZ_PATH }} diff --git a/Makefile b/Makefile index aec08b2..5fee099 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ export #^ export all the variables builddir ?= build -VERSION := 2022.0.0 +VERSION := 2026.0.0 macpin := MacPin macpin_sites ?= sites @@ -219,6 +219,7 @@ $(outdir)/Frameworks/%.framework: $(jumbody) $(jumbody).dSYM $(outdir)/Framework @cp -RL $(jumbody) $@/Versions/A/$* @cp -RL $(jumbody).dSYM $@/Versions/A/$*.dSYM # need a Resources/Info-macos.plist & version.plist + touch $@/Versions/A/Resources/stamp.file -[ ! -n "$(codesign)" ] || codesign --verbose=4 --sign '$(appsig)' --timestamp --options runtime --force --deep --ignore-resources --strict --entitlements $(outdir)/$*.entitlements.plist $@ #build the app bundle @@ -229,7 +230,7 @@ $(appdir)/%.app: $(macpin_sites)/% $(macpin_sites)/%/* $(appdir)/%.app/Contents/ COMMAND_MODE=legacy cp -fRL templates/Resources $@/Contents #git ls-files -zc $(bundle_untracked) $(macpin_sites)/$* | xargs -0 -J % install -DT % $@/Contents/Resources/ (($(bundle_untracked))) || git archive HEAD $(macpin_sites)/$*/ | tar -xv --strip-components 2 -C $@/Contents/Resources - (($(bundle_untracked))) && COMMAND_MODE=legacy cp -fRL $(macpin_sites)/$*/* $@/Contents/Resources/ || true + (($(bundle_untracked))) && COMMAND_MODE=legacy cp -lfRL $(macpin_sites)/$*/* $@/Contents/Resources/ || true [ ! -d $@/Contents/Resources/Library ] || ln -sfh Resources/Library $@/Contents/Library plutil -replace NSHumanReadableCopyright -string "built $(shell date) by $(shell id -F)" $@/Contents/Info.plist >/dev/null [ ! -f "$(macpin_sites)/$*/Makefile" ] || $(MAKE) -C $@/Contents/Resources @@ -237,7 +238,7 @@ $(appdir)/%.app: $(macpin_sites)/% $(macpin_sites)/%/* $(appdir)/%.app/Contents/ [ ! -n "$(codesign)" ] || codesign --verbose=4 --sign '$(appsig)' --timestamp --force --ignore-resources --entitlements $(outdir)/$*.entitlements.plist $@ -codesign --display -r- --verbose=4 --deep --entitlements :- $@ -spctl -vvvv --assess --type execute $@ # App Store-ability - [ ! -n "$(codesign)" ] || codesign --verbose=4 --deep --verify --strict $@ + [ ! -n "$(codesign)" ] || codesign --verbose=4 --verify --strict $@ -[ ! -z "$(codesign)" ] || codesign --verbose=4 --remove-signature $@ @touch $@ #xattr -w com.apple.application-instance $(shell echo uuidgen) $@ diff --git a/Package.swift b/Package.swift index cebaa78..9856e8e 100644 --- a/Package.swift +++ b/Package.swift @@ -1,11 +1,9 @@ -// swift-tools-version:5.4 +// swift-tools-version:5.7 import PackageDescription import Foundation let package = Package( name: "MacPin", - //platforms: [.macOS(.v10_15)], - // whines about a lot of unguarded calls to 10.15.4 apis - platforms: [.macOS(.v11)], + platforms: [.macOS(.v13)], products: [ .library(name: "MacPin", type: .dynamic, targets: ["MacPin"]), .executable(name: "MacPin_static", targets: ["MacPin_static"]), @@ -60,7 +58,10 @@ if let iosvar = ProcessInfo.processInfo.environment["MACPIN_IOS"], !iosvar.isEmp dependencies: [ .product(name: "ArgumentParser", package: "swift-argument-parser"), ], - path: "Tools/iconify" + path: "Tools/iconify", + swiftSettings: [ + //.swiftLanguageMode(.v5) + ] ), .target(name: "MacPin", dependencies: [ @@ -71,17 +72,29 @@ if let iosvar = ProcessInfo.processInfo.environment["MACPIN_IOS"], !iosvar.isEmp "Linenoise", "UTIKit", ], - path: "Sources/MacPinOSX" + path: "Sources/MacPinOSX", + swiftSettings: [ + //.swiftLanguageMode(.v5), + //.interoperabilityMode(.Cxx) + ] ), .executableTarget( name: "MacPin_static", dependencies: [ .target(name: "MacPin") + ], + swiftSettings: [ + //.swiftLanguageMode(.v5), + //.interoperabilityMode(.Cxx) ] ), .executableTarget( name: "MacPin_stub", dependencies: [], + swiftSettings: [ + //.swiftLanguageMode(.v5), + //.interoperabilityMode(.Cxx) + ], linkerSettings: [ .unsafeFlags(["-Xlinker", "-rpath", "-Xlinker", "@loader_path:@loader_path/../Frameworks"]) ] diff --git a/README.md b/README.md index 03ff2c3..9e956c0 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ $ du -hs build/macosx-x86_64-apple-macosx10.13/apps/{Slack,MacPin}.app/ ``` ## Project Status -Uses swift 5.4 & WKWebView. +Uses swift 5.7 & WKWebView. `sites/**/main.js` tries to support some Electron idioms. * federation of the applet packaging using ES6 modules [is being explored](https://github.com/kfix/MacPin/issues/31) @@ -74,8 +74,7 @@ Work is ongoing to make editing and creating app scripts easier, without requiri ## App porting issues -* DRM: Many sites (Spotify, Netflix) are using Chrome/FF only DRMs (Widevine) but Apple-built WebKit only supports FairPlay DRM. -* WebRTC: WebKit is compatible with [H264 & VP8 codecs](https://webkit.org/blog/8672/on-the-road-to-webrtc-1-0-including-vp8/), but Google Chrome is pushing hardware-unaccelerated VP9 on all fronts (incl. general `