Skip to content

Commit c16a099

Browse files
committed
update .travis/osx_build_app.sh with git_cast_file2repos.py
1 parent 07e5d23 commit c16a099

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

.travis/osx_build_app.sh

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
#!/bin/bash
22
# Builds a macOS app in a DMG container using PyInstaller and an app launcher.
3-
# usage:
4-
# osx_build_app.sh AppName [AppVersion]
3+
# usage (append e.g. "App" to name to avoid naming conflicts with the library):
4+
#
5+
# osx_build_app.sh AppNameApp [AppVersion]
56
#
67
# Notes:
7-
# - AppVersion is optional (only used for name of DMG container)
8+
# - AppVersion is optional (used for name of DMG container)
89
# - This script must be called from the root directory of the repository
910
# - The file ./travis/AppNameApp.py [sic] must be present (relative
1011
# to root of the repository)
@@ -21,21 +22,29 @@ else
2122
NAMEVERSION=${1}_${2}
2223
fi
2324

24-
# append "App" to avoid naming conflicts with python library
2525
SCRIPT=".travis/${NAME}.py"
2626
APP="./dist_app/${NAME}.app"
2727
DMG="./dist_app/${NAMEVERSION}.dmg"
28+
PKG="./dist_app/${NAME}.pkg"
2829
TMP="./dist_app/pack.temp.dmg"
29-
pip install pyinstaller
3030

3131
# cleanup from previous builds
3232
rm -rf ./build
3333
rm -rf ./dist_app
3434

35+
pip install pyinstaller
36+
3537
# Work in a different directory (./dist_app instead of ./dist),
3638
# otherwise PyPI deployment on travis-CI tries to upload *.dmg files.
3739
pyinstaller -w -y --distpath="./dist_app" --additional-hooks-dir=".travis" $SCRIPT
3840

41+
# Create PKG (pkgbuild is for deployments in app stores)
42+
# https://www.manpagez.com/man/1/productbuild/
43+
#productbuild --install-location /Applications/ --component ${APP} ${PKG}
44+
# https://www.manpagez.com/man/1/pkgbuild/
45+
pkgbuild --install-location /Applications/ --component ${APP} ${PKG}
46+
47+
# Create DMG
3948
# add link to Applications
4049
mkdir ./dist_app/ui-release
4150
cd ./dist_app/ui-release
@@ -56,3 +65,4 @@ hdiutil convert "${TMP}" -format UDZO -imagekey zlib-level=9 -o "${DMG}"
5665
# remove temporary DMG
5766
rm $TMP
5867

68+

0 commit comments

Comments
 (0)