changeset 121:4dcbd2b6fae5

Mac: Add AdHoc code signing so system notifications work. Move the additional files into Contents/Resources so codesigning succeeds.
author Brian Smith <brian@dbsoft.org>
date Tue, 23 Jun 2020 21:34:05 -0500
parents f83fd89c0450
children f9502f068ac7
files src/handyftp.c src/mac/Info.plist src/mac/finishup.sh
diffstat 3 files changed, 16 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/src/handyftp.c	Wed Jun 17 12:35:12 2020 -0500
+++ b/src/handyftp.c	Tue Jun 23 21:34:05 2020 -0500
@@ -6968,7 +6968,7 @@
 	int cx, cy;
 
 	/* Set the application ID so notifications will work */
-	dw_app_id_set("org.dbsoft.handyftp", NULL);
+	dw_app_id_set("org.dbsoft.handyftp", "HandyFTP");
 
 	/* Then initialize Dynamic Windows */
 	dw_init(TRUE, argc, argv);
--- a/src/mac/Info.plist	Wed Jun 17 12:35:12 2020 -0500
+++ b/src/mac/Info.plist	Tue Jun 23 21:34:05 2020 -0500
@@ -5,25 +5,31 @@
 	<key>CFBundleDevelopmentRegion</key>
 	<string>English</string>
 	<key>CFBundleExecutable</key>
+	<string>handyftp</string>
+	<key>CFBundleIconFile</key>
 	<string>HandyFTP</string>
 	<key>CFBundleIdentifier</key>
 	<string>org.dbsoft.handyftp</string>
-	<key>CFBundleIconFile</key>
-	<string>HandyFTP</string>
 	<key>CFBundleInfoDictionaryVersion</key>
 	<string>6.0</string>
+	<key>CFBundleName</key>
+	<string>handyftp</string>
 	<key>CFBundlePackageType</key>
 	<string>APPL</string>
 	<key>CFBundleSignature</key>
 	<string>????</string>
 	<key>CFBundleVersion</key>
-	<string>0.1</string>
+	<string>1.0</string>
 	<key>CSResourcesFileMapped</key>
 	<true/>
+	<key>NSPrincipalClass</key>
+	<string>NSApplication</string>
 	<key>NSAppTransportSecurity</key>
 	<dict>
 	    <key>NSAllowsArbitraryLoadsInWebContent</key>
 	    <true/>
+		<key>NSAllowsArbitraryLoads</key>
+		<true/>
 	</dict>
 </dict>
 </plist>
--- a/src/mac/finishup.sh	Wed Jun 17 12:35:12 2020 -0500
+++ b/src/mac/finishup.sh	Tue Jun 23 21:34:05 2020 -0500
@@ -8,12 +8,12 @@
     rm -rf "$APPNAME.app"
     mkdir -p "$APPNAME.app/Contents/MacOS"
     mkdir -p "$APPNAME.app/Contents/Resources"
-    mkdir -p "$APPNAME.app/images"
+    mkdir -p "$APPNAME.app/Contents/Resources/images"
     
-    cp -f ../config/*.typ "$APPNAME.app"
-    cp -f ../config/handyftp.msg "$APPNAME.app"
-    cp -f ../help/*.html "$APPNAME.app"
-    cp -f ../help/images/*.gif "$APPNAME.app/images"
+    cp -f ../config/*.typ "$APPNAME.app/Contents/Resources"
+    cp -f ../config/handyftp.msg "$APPNAME.app/Contents/Resources"
+    cp -f ../help/*.html "$APPNAME.app/Contents/Resources"
+    cp -f ../help/images/*.gif "$APPNAME.app/Contents/Resources/images"
     cp -f mac/Info.plist "$APPNAME.app/Contents"
     cp -f mac/PkgInfo "$APPNAME.app/Contents"
     cp -f mac/logo.png "$APPNAME.app/Contents/Resources/1300.png"
@@ -38,4 +38,5 @@
     cp -f mac/LINK.png "$APPNAME.app/Contents/Resources/365.png"
     cp -f mac/*.icns "$APPNAME.app/Contents/Resources"
     cp -f $BINNAME "$APPNAME.app/Contents/MacOS"
+    codesign -s "-" "$APPNAME.app/Contents/MacOS/$BINNAME"
 fi