From 175a00726f82e7a1fd27978bb010eaea3775d507 Mon Sep 17 00:00:00 2001 From: Manu Date: Wed, 21 Nov 2018 16:22:33 +0800 Subject: [PATCH] Add Makefile to enable building macOS app package. --- .gitignore | 1 - Makefile | 29 +++++++++++++++++++++++++++++ README.md | 10 +++++----- 3 files changed, 34 insertions(+), 6 deletions(-) create mode 100644 Makefile diff --git a/.gitignore b/.gitignore index 5064e8e9..5b96e4ca 100644 --- a/.gitignore +++ b/.gitignore @@ -7,7 +7,6 @@ docs/ bin/macosx64/Sparkle.framework bin/macosx64/borg __pycache__ -Makefile .eggs vorta.egg-info .coverage diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..f4ff4535 --- /dev/null +++ b/Makefile @@ -0,0 +1,29 @@ + +Vorta.app: + #pyrcc5 -o src/vorta/views/collection_rc.py src/vorta/assets/icons/collection.qrc + pyinstaller --clean --noconfirm vorta.spec + cp -R bin/macosx64/Sparkle.framework dist/Vorta.app/Contents/Frameworks/ + cd dist; codesign --deep --sign 'Developer ID Application: Manuel Riel (CNMSCAXT48)' Vorta.app + +Vorta.dmg: Vorta.app + # sleep 2; cd dist; zip -9rq vorta-0.4.1.zip Vorta.app + rm -rf dist/vorta-0.4.1.dmg + sleep 2; appdmg appdmg.json dist/vorta-0.4.1.dmg + +github-release: Vorta.dmg + pytest + hub release create --prerelease --attach=dist/vorta-0.4.1.dmg v0.4.1 + +pypi-release: + pytest + python setup.py sdist + twine upload dist/vorta-0.4.1.tar.gz + +travis-debug: + curl -s -X POST \ + -H "Content-Type: application/json" \ + -H "Accept: application/json" \ + -H "Travis-API-Version: 3" \ + -H "Authorization: token ${TRAVIS_TOKEN}" \ + -d '{ "quiet": true }' \ + https://api.travis-ci.org/job/${TRAVIS_JOB_ID}/debug diff --git a/README.md b/README.md index 77a3daf4..5f9836e4 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,7 @@ Install in development/editable mode while in the repo: $ pip install -e . ``` -Then run via +Then run as Python script: ``` $ vorta ``` @@ -64,10 +64,10 @@ $ brew cask install qt-creator $ brew install qt ``` -To build a binary package: -``` -$ pyinstaller --clean --noconfirm vorta.spec -``` +To build a macOS app package: +- add `Sparkle.framework` from [here](https://github.com/sparkle-project/Sparkle) and `borg` from [here](https://github.com/borgbackup/borg/releases) in `bin/macosx64` +- then uncomment or change the Apple signing profile to be used in `Makefile` +- finally run to `$ make Vorta.app` to build the app into the `dist` folder. ### Testing (work in progress)