diff --git a/.drone.yml b/.drone.yml index f31522a4..6aa3d35d 100644 --- a/.drone.yml +++ b/.drone.yml @@ -300,7 +300,8 @@ steps: commands: - mkdir ~/.ssh - echo $buildbot_key_b64 > ~/.ssh/id_rsa.b64 - - base64 -d ~/.ssh/id_rsa.b64 > ~/.ssh/id_rsa + - ls -lh ~/.ssh/id_rsa.b64 + - base64 -d -i ~/.ssh/id_rsa.b64 -o ~/.ssh/id_rsa - chmod 400 ~/.ssh/id_rsa # force by pass of ssh host key check, less secure - ssh-keyscan -H git.openprivacy.ca >> ~/.ssh/known_hosts @@ -319,20 +320,21 @@ steps: - ./fetch-tor-macos.sh - echo `git describe --tags --abbrev=1` > VERSION - echo `git log -1 --format=%cd --date=format:%G-%m-%d-%H-%M` > COMMIT_DATE - - export PATH=$PATH:/Users/Dan/development/flutter/bin + - export PATH=$PATH:/Users/drone/development/flutter/bin - flutter pub get - mkdir deploy - ./fetch-libcwtch-go-macos.sh - - gem install --user-install cocoapods + # Drone builds in container directories and gem seems to have some weird side effects so have to manually re install these locally + - gem install --user-install ffi -v 1.15.5 -- --enable-libffi-alloc + # currently unneeded to reinstall but was, and may be again? so saving + #- gem install --user-install cocoapods -v 1.11.3 - name: build-macos commands: - - export PATH=$PATH:/Users/Dan/development/flutter/bin - - export GEM_HOME=$HOME/.gem + - export PATH=$PATH:/Users/drone/bin/flutter/bin - export PATH=$GEM_HOME/ruby/2.6.0/bin:$PATH - - flutter config --enable-macos-desktop - flutter build macos --dart-define BUILD_VER=`cat VERSION` --dart-define BUILD_DATE=`cat COMMIT_DATE` - - export PATH=$PATH:/usr/local/bin #create-dmg + - export PATH=$PATH:/opt/homebrew/bin/ #create-dmg - macos/package-release.sh - mkdir -p deploy - mv Cwtch.dmg deploy/Cwtch-`cat VERSION`.dmg diff --git a/macos/dmg/.VolumeIcon.icns b/macos/dmg/.VolumeIcon.icns new file mode 100644 index 00000000..e7493ffe Binary files /dev/null and b/macos/dmg/.VolumeIcon.icns differ diff --git a/macos/package-release.sh b/macos/package-release.sh index 2e244c0d..7d32a3c9 100755 --- a/macos/package-release.sh +++ b/macos/package-release.sh @@ -6,20 +6,28 @@ cp libCwtch.x64.dylib build/macos/Build/Products/Release/Cwtch.app/Contents/Fram cp libCwtch.arm64.dylib build/macos/Build/Products/Release/Cwtch.app/Contents/Frameworks/ cp -r macos/Tor build/macos/Build/Products/Release/Cwtch.app/Contents/MacOS/ + + rm Cwtch.dmg rm -r macos_dmg mkdir macos_dmg cp -r "build/macos/Build/Products/Release/Cwtch.app" macos_dmg/ +# prep DMG with pregenerated components from GUI supportred run of create-dmg +cp macos/dmg/.* macos_dmg/ +ln -s /Applications macos_dmg/Applications +hdiutil create -fs HFS+ -volname Cwtch -srcfolder macos_dmg Cwtch.dmg +# create-dmg requires GUI and is therefore less suited to automated builds, preserving here for +# manual runs to generate new .DS_Store and .VolumeIcon.icns for capture to the dmg dir for automated reuse # https://github.com/create-dmg/create-dmg -create-dmg \ - --volname "Cwtch" \ - --volicon "macos/cwtch.icns" \ - --window-pos 200 120 \ - --window-size 800 400 \ - --icon-size 100 \ - --icon "Cwtch.app" 200 190 \ - --hide-extension "Cwtch.app" \ - --app-drop-link 600 185 \ - "Cwtch.dmg" \ - macos_dmg +#create-dmg \ +# --volname "Cwtch" \ +# --volicon "macos/cwtch.icns" \ +# --window-pos 200 120 \ +# --window-size 800 400 \ +# --icon-size 100 \ +# --icon "Cwtch.app" 200 190 \ +# --hide-extension "Cwtch.app" \ +# --app-drop-link 600 185 \ +# "Cwtch.dmg" \ +# macos_dmg