changeset 724:c59c17665162

Further macOS deployment fixes
author Chris Cannam <cannam@all-day-breakfast.com>
date Fri, 14 Dec 2018 17:28:31 +0000
parents c39a04fed8b2
children 48e746f45bde
files deploy/osx/Info.plist deploy/osx/copy-pyqt.sh deploy/osx/notarize.sh deploy/osx/sign.sh easyhg.py
diffstat 5 files changed, 27 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/deploy/osx/Info.plist	Fri Dec 14 14:58:58 2018 +0000
+++ b/deploy/osx/Info.plist	Fri Dec 14 17:28:31 2018 +0000
@@ -11,11 +11,9 @@
 	<key>CFBundleIconFile</key>
 	<string>easyhg-icon.icns</string>
 	<key>CFBundleIdentifier</key>
-	<string>org.easymercurial.EasyMercurial</string>
+	<string>org.easyhg.EasyMercurial</string>
 	<key>CFBundleShortVersionString</key>
 	<string>EASYHG_VERSION</string>
-
-	<!-- enable HiDPI -->
 	<key>NSPrincipalClass</key>
 	<string>NSApplication</string>
 	<key>NSHighResolutionCapable</key>
--- a/deploy/osx/copy-pyqt.sh	Fri Dec 14 14:58:58 2018 +0000
+++ b/deploy/osx/copy-pyqt.sh	Fri Dec 14 17:28:31 2018 +0000
@@ -28,7 +28,7 @@
     exit 2
 fi
 
-pydir="$app.app/Contents/MacOS/Py2.7"
+pydir="$app.app/Contents/MacOS/Py27"
 mkdir -p "$pydir/PyQt5"
 mkdir -p "$pydir/enum"
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/deploy/osx/notarize.sh	Fri Dec 14 17:28:31 2018 +0000
@@ -0,0 +1,20 @@
+## Before this, we need to open Application Loader and log in to the
+## right iTunes Connect account
+
+echo "Not running - read, review, and update script first"
+exit 1
+
+xcrun altool --notarize-app -f "EasyMercurial-1.4.dmg" --primary-bundle-id org.easyhg.EasyMercurial -u "cannam+apple@all-day-breakfast.com" -p @keychain:"Application Loader: cannam+apple@all-day-breakfast.com"
+
+## That churns for a while and then dumps out a UUID
+
+# xcrun altool --notarization-info UUID -u "cannam+apple@all-day-breakfast.com" -p @keychain:"Application Loader: cannam+apple@all-day-breakfast.com"
+
+## Returns "in progress" at first, then eventually a report with a URL
+## that can be retrieved as JSON payload using wget. An email is also
+## sent to the iTunes Connect account holder when it completes
+
+# xcrun stapler staple -v "EasyMercurial-1.4.dmg"
+
+# spctl -a -v "/Applications/EasyMercurial.app"
+
--- a/deploy/osx/sign.sh	Fri Dec 14 14:58:58 2018 +0000
+++ b/deploy/osx/sign.sh	Fri Dec 14 17:28:31 2018 +0000
@@ -15,17 +15,14 @@
 
 for app in "$dir"/*.app; do
     find "$app" -name Qt\* -print | while read fr; do
-	codesign -s "Developer ID Application: Chris Cannam" -fv --deep "$fr"
+	codesign -s "Developer ID Application: Chris Cannam" -fv --deep --options runtime "$fr"
     done
     find "$app" -name \*.dylib -print | while read fr; do
-	codesign -s "Developer ID Application: Chris Cannam" -fv --deep "$fr"
+	codesign -s "Developer ID Application: Chris Cannam" -fv --deep --options runtime "$fr"
     done
     find "$app" -name \*.so -print | while read fr; do
-	codesign -s "Developer ID Application: Chris Cannam" -fv --deep "$fr"
+	codesign -s "Developer ID Application: Chris Cannam" -fv --deep --options runtime "$fr"
     done
-    codesign -s "Developer ID Application: Chris Cannam" -fv --deep "$app"
-#    codesign -s "Developer ID Application: Chris Cannam" -fv \
-#         --requirements '=designated =>  identifier "org.easymercurial.EasyMercurial" and ( (anchor apple generic and    certificate leaf[field.1.2.840.113635.100.6.1.9] ) or (anchor apple generic and    certificate 1[field.1.2.840.113635.100.6.2.6]  and    certificate leaf[field.1.2.840.113635.100.6.1.13] and    certificate leaf[subject.OU] = "M2H8666U82"))' \
-#         "$app"
+    codesign -s "Developer ID Application: Chris Cannam" -fv --deep --options runtime "$app"
 done
 
--- a/easyhg.py	Fri Dec 14 14:58:58 2018 +0000
+++ b/easyhg.py	Fri Dec 14 17:28:31 2018 +0000
@@ -31,7 +31,7 @@
 if not easyhg_import_path.startswith('NO_'):
     # We have an installation path: append it twice, once with
     # the Python version suffixed
-    version_suffix = 'Py%d.%d' % (sys.version_info[0], sys.version_info[1])
+    version_suffix = 'Py%d%d' % (sys.version_info[0], sys.version_info[1])
     sys.path.append(easyhg_import_path + "/" + version_suffix)
     sys.path.append(easyhg_import_path)