Skip to content

Commit 34562bb

Browse files
committed
Stripping ScriptExec binary in deployment build phase, no longer generating PkgInfo files, updaated docs
1 parent d26a29d commit 34562bb

File tree

4 files changed

+60
-8
lines changed

4 files changed

+60
-8
lines changed

Application/Resources/Platypus-Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@
445445
<key>CFBundleSignature</key>
446446
<string>????</string>
447447
<key>CFBundleVersion</key>
448-
<string>1321</string>
448+
<string>1322</string>
449449
<key>LSApplicationCategoryType</key>
450450
<string>public.app-category.developer-tools</string>
451451
<key>LSMinimumSystemVersion</key>

CHANGES.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@
22

33
### For 5.5.0 - 17/11/2025
44

5+
* Platypus.app and the platypus command line tool are now notarized by Apple
6+
* Now requires macOS 11 "Big Sur" or later
57
* Fixed bug where the argument settings window would lock up the interface
68
* Better support for Dark Mode
7-
* Platypus now requires macOS 11 "Big Sur" or later
89
* Preferences now named Settings according to new macOS convention
910
* Modernized codebase
11+
* Improved tests
1012

1113
### For 5.4.1 - 22/10/2022
1214

Platypus.xcodeproj/project.pbxproj

Lines changed: 55 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -927,7 +927,8 @@
927927
F48B773D11F7661C00351575 /* Resources */,
928928
F48B773E11F7661C00351575 /* Sources */,
929929
F48B773F11F7661C00351575 /* Frameworks */,
930-
F4302B7B21C5A04A001C8BEC /* ShellScript */,
930+
F4302B7B21C5A04A001C8BEC /* Update interpreter from script's shebang line */,
931+
F469CB382EDF0E2100B72BC9 /* Strip binary aggressively */,
931932
);
932933
buildRules = (
933934
);
@@ -944,6 +945,7 @@
944945
buildPhases = (
945946
F4E1F6F911F758FB007EE2E3 /* Sources */,
946947
F4E1F6FA11F758FB007EE2E3 /* Frameworks */,
948+
F469CB392EDF121500B72BC9 /* Strip Binary Aggressively */,
947949
F4FB337514FBDAD500BAECEB /* Run Script to Create Man Page HTML document */,
948950
);
949951
buildRules = (
@@ -1074,7 +1076,7 @@
10741076
);
10751077
runOnlyForDeploymentPostprocessing = 0;
10761078
shellPath = /bin/sh;
1077-
shellScript = "#/bin/sh\n#\n\nRESOURCES_DIR=\"${TARGET_BUILD_DIR}/Platypus.app/Contents/Resources\"\n\necho \"Copying ScriptExec binary to application bundle\"\nSCRIPT_EXEC_APP_PATH=\"${BUILT_PRODUCTS_DIR}/ScriptExec.app\"\nSCRIPT_EXEC_BIN_PATH=\"${SCRIPT_EXEC_APP_PATH}/Contents/MacOS/ScriptExec\"\nBIN_DEST=\"${RESOURCES_DIR}/ScriptExec\"\nrm \"${BIN_DEST}\" &> /dev/null\n# cp \"${SCRIPT_EXEC_BIN_PATH}\" \"${BIN_DEST}\"\n# strip -x \"${BIN_DEST}\"\nbase64 -i \"${SCRIPT_EXEC_BIN_PATH}\" -o \"${BIN_DEST}.b64\"\n\necho \"Copying ScriptExec's MainMenu.nib to application bundle\"\nSCRIPT_EXEC_NIB_PATH=\"${SCRIPT_EXEC_APP_PATH}/Contents/Resources/MainMenu.nib\"\nrm -r \"${RESOURCES_DIR}/MainMenu.nib\" &> /dev/null\ncp -r \"${SCRIPT_EXEC_NIB_PATH}\" \"${RESOURCES_DIR}/MainMenu.nib\"\n\n# echo \"Copying ScriptExec's optimized MainMenu.nib to application bundle\"\n# OPT_NIB=\"${RESOURCES_DIR}/MainMenu-optimized.nib\"\n# cp -r \"${SCRIPT_EXEC_NIB_PATH}\" \"${OPT_NIB}\"\n# ibtool \"${OPT_NIB}\" --strip \"${OPT_NIB}\"\n\n# Copy CLT binary\necho \"Copying command line tool binary to application bundle\"\nCLT_PATH=\"${BUILT_PRODUCTS_DIR}/platypus_clt\"\ncp \"${CLT_PATH}\" \"${RESOURCES_DIR}/platypus_clt\"\n\n# Gzip man page\necho \"Gzipping man page\"\nrm \"${RESOURCES_DIR}/platypus.1.gz\" &> /dev/null\ngzip \"${RESOURCES_DIR}/platypus.1\"\n";
1079+
shellScript = "#/bin/sh\n#\n\nRESOURCES_DIR=\"${TARGET_BUILD_DIR}/Platypus.app/Contents/Resources\"\n\necho \"Copying ScriptExec binary to application bundle\"\nSCRIPT_EXEC_APP_PATH=\"${BUILT_PRODUCTS_DIR}/ScriptExec.app\"\nSCRIPT_EXEC_BIN_PATH=\"${SCRIPT_EXEC_APP_PATH}/Contents/MacOS/ScriptExec\"\nBIN_DEST=\"${RESOURCES_DIR}/ScriptExec\"\nrm \"${BIN_DEST}\" &> /dev/null\n# cp \"${SCRIPT_EXEC_BIN_PATH}\" \"${BIN_DEST}\"\nbase64 -i \"${SCRIPT_EXEC_BIN_PATH}\" -o \"${BIN_DEST}.b64\"\n\necho \"Copying ScriptExec's MainMenu.nib to application bundle\"\nSCRIPT_EXEC_NIB_PATH=\"${SCRIPT_EXEC_APP_PATH}/Contents/Resources/MainMenu.nib\"\nrm -r \"${RESOURCES_DIR}/MainMenu.nib\" &> /dev/null\ncp -r \"${SCRIPT_EXEC_NIB_PATH}\" \"${RESOURCES_DIR}/MainMenu.nib\"\n\n# echo \"Copying ScriptExec's optimized MainMenu.nib to application bundle\"\n# OPT_NIB=\"${RESOURCES_DIR}/MainMenu-optimized.nib\"\n# cp -r \"${SCRIPT_EXEC_NIB_PATH}\" \"${OPT_NIB}\"\n# ibtool \"${OPT_NIB}\" --strip \"${OPT_NIB}\"\n\n# Copy CLT binary\necho \"Copying command line tool binary to application bundle\"\nCLT_PATH=\"${BUILT_PRODUCTS_DIR}/platypus_clt\"\ncp \"${CLT_PATH}\" \"${RESOURCES_DIR}/platypus_clt\"\n\n# Gzip man page\necho \"Gzipping man page\"\nrm \"${RESOURCES_DIR}/platypus.1.gz\" &> /dev/null\ngzip \"${RESOURCES_DIR}/platypus.1\"\n";
10781080
};
10791081
F42622251C03B0DD0052BA33 /* Run Script To Set CFBundleVersion to Build Number */ = {
10801082
isa = PBXShellScriptBuildPhase;
@@ -1091,7 +1093,7 @@
10911093
shellPath = /bin/sh;
10921094
shellScript = "#!/bin/sh\nBUILD_NUMBER=`git rev-list HEAD | wc -l`\n/usr/libexec/PlistBuddy -c \"Set :CFBundleVersion $BUILD_NUMBER\" \"${INFOPLIST_FILE}\"\nif [ \"$?\" -ne 0 ] ; then\n echo \"warning:Error incrementing CFBundleVersion\"\nfi\n";
10931095
};
1094-
F4302B7B21C5A04A001C8BEC /* ShellScript */ = {
1096+
F4302B7B21C5A04A001C8BEC /* Update interpreter from script's shebang line */ = {
10951097
isa = PBXShellScriptBuildPhase;
10961098
alwaysOutOfDate = 1;
10971099
buildActionMask = 2147483647;
@@ -1101,6 +1103,7 @@
11011103
);
11021104
inputPaths = (
11031105
);
1106+
name = "Update interpreter from script's shebang line";
11041107
outputFileListPaths = (
11051108
);
11061109
outputPaths = (
@@ -1109,6 +1112,44 @@
11091112
shellPath = /bin/sh;
11101113
shellScript = "#!/bin/sh\n# Read interpreter path from the script's shebang line\n# and set it as interpreter in AppSettings.plist\n# This is just for convenience when debugging and switching\n# often between interpreters. Better to control it via shebang.\nAPPSETTINGS=\"${TARGET_BUILD_DIR}/ScriptExec.app/Contents/Resources/AppSettings.plist\"\nSCRIPT=\"${TARGET_BUILD_DIR}/ScriptExec.app/Contents/Resources/script\"\nINTERPRETER=$(head -n 1 $SCRIPT | cut -b 3-300 | tr -d '\\n')\n/usr/libexec/PlistBuddy -c \"Set :InterpreterPath ${INTERPRETER}\" \"${APPSETTINGS}\"\n\n\n\n\n\n\n\n\n\n\n\n\n";
11111114
};
1115+
F469CB382EDF0E2100B72BC9 /* Strip binary aggressively */ = {
1116+
isa = PBXShellScriptBuildPhase;
1117+
alwaysOutOfDate = 1;
1118+
buildActionMask = 2147483647;
1119+
files = (
1120+
);
1121+
inputFileListPaths = (
1122+
);
1123+
inputPaths = (
1124+
);
1125+
name = "Strip binary aggressively";
1126+
outputFileListPaths = (
1127+
);
1128+
outputPaths = (
1129+
);
1130+
runOnlyForDeploymentPostprocessing = 0;
1131+
shellPath = /bin/sh;
1132+
shellScript = "if [ \"${CONFIGURATION}\" = \"Deployment\" ]; then\n echo \"Stripping binary....\"\n strip -Sx \"${BUILT_PRODUCTS_DIR}/ScriptExec.app/Contents/MacOS/ScriptExec\"\nfi\n";
1133+
};
1134+
F469CB392EDF121500B72BC9 /* Strip Binary Aggressively */ = {
1135+
isa = PBXShellScriptBuildPhase;
1136+
alwaysOutOfDate = 1;
1137+
buildActionMask = 2147483647;
1138+
files = (
1139+
);
1140+
inputFileListPaths = (
1141+
);
1142+
inputPaths = (
1143+
);
1144+
name = "Strip Binary Aggressively";
1145+
outputFileListPaths = (
1146+
);
1147+
outputPaths = (
1148+
);
1149+
runOnlyForDeploymentPostprocessing = 0;
1150+
shellPath = /bin/sh;
1151+
shellScript = "if [ \"${CONFIGURATION}\" = \"Deployment\" ]; then\n echo \"Stripping binary....\"\n strip -Sx \"${BUILT_PRODUCTS_DIR}/platypus_clt\"\nfi\n";
1152+
};
11121153
F49DB7A925727F65009B6257 /* Sign All Binaries */ = {
11131154
isa = PBXShellScriptBuildPhase;
11141155
alwaysOutOfDate = 1;
@@ -1126,7 +1167,7 @@
11261167
);
11271168
runOnlyForDeploymentPostprocessing = 0;
11281169
shellPath = /bin/sh;
1129-
shellScript = "# exit 0\n# We need to sign all binaries within Sparkle framework for update installation to work\n# Only do this for release builds so CI testing works\nif [ \"${CODE_SIGNING_REQUIRED}\" != \"YES\" ]; then\n exit 0\nfi\n\n\nLOCATION1=\"${BUILT_PRODUCTS_DIR}/Platypus.app/Contents/Frameworks/Sparkle.framework/Versions/B/Updater.app/Contents/MacOS/Updater\"\nLOCATION2=\"${BUILT_PRODUCTS_DIR}/Platypus.app/Contents/Frameworks/Sparkle.framework/Versions/B/Autoupdate\"\nLOCATION3=\"${BUILT_PRODUCTS_DIR}/Platypus.app/Contents/Frameworks/Sparkle.framework/Versions/B/XPCServices/Downloader.xpc/Contents/MacOS/Downloader\"\nLOCATION4=\"${BUILT_PRODUCTS_DIR}/Platypus.app/Contents/Frameworks/Sparkle.framework\"\nLOCATION5=\"${BUILT_PRODUCTS_DIR}/Platypus.app\"\n# LOCATION6=\"${BUILT_PRODUCTS_DIR}/Platypus.app/Contents/Resources/ScriptExec\"\n\nIDENTITY=\"16A0188A9D74911B21953A33684437F70902BC30\"\n#${EXPANDED_CODE_SIGN_IDENTITY_NAME}\n\n#echo $IDENTITY\n\n\ncodesign --verbose --force -o runtime --deep --sign \"$IDENTITY\" \"$LOCATION1\"\ncodesign --verbose --force -o runtime --deep --sign \"$IDENTITY\" \"$LOCATION2\"\ncodesign --verbose --force -o runtime --deep --sign \"$IDENTITY\" \"$LOCATION3\"\ncodesign --verbose --force -o runtime --deep --sign \"$IDENTITY\" \"$LOCATION4\"\ncodesign --verbose --force -o runtime --deep --sign \"$IDENTITY\" \"$LOCATION5\"\n# codesign --verbose --force -o runtime --deep --sign \"$IDENTITY\" \"$LOCATION6\"\n";
1170+
shellScript = "# exit 0\n# We need to sign all binaries within Sparkle framework for update installation to work\n# Only do this for release builds so CI testing works\nif [ \"${CODE_SIGNING_REQUIRED}\" != \"YES\" ]; then\n exit 0\nfi\n\n\nLOCATION1=\"${BUILT_PRODUCTS_DIR}/Platypus.app/Contents/Frameworks/Sparkle.framework/Versions/B/Updater.app/Contents/MacOS/Updater\"\nLOCATION2=\"${BUILT_PRODUCTS_DIR}/Platypus.app/Contents/Frameworks/Sparkle.framework/Versions/B/Autoupdate\"\nLOCATION3=\"${BUILT_PRODUCTS_DIR}/Platypus.app/Contents/Frameworks/Sparkle.framework/Versions/B/XPCServices/Downloader.xpc/Contents/MacOS/Downloader\"\nLOCATION4=\"${BUILT_PRODUCTS_DIR}/Platypus.app/Contents/Frameworks/Sparkle.framework\"\nLOCATION5=\"${BUILT_PRODUCTS_DIR}/Platypus.app\"\n# LOCATION6=\"${BUILT_PRODUCTS_DIR}/Platypus.app/Contents/Resources/ScriptExec\"\n\nIDENTITY=\"16A0188A9D74911B21953A33684437F70902BC30\"\n#${EXPANDED_CODE_SIGN_IDENTITY_NAME}\n\n#echo $IDENTITY\n\nstrip -xS\ncodesign --verbose --force -o runtime --deep --sign \"$IDENTITY\" \"$LOCATION1\"\ncodesign --verbose --force -o runtime --deep --sign \"$IDENTITY\" \"$LOCATION2\"\ncodesign --verbose --force -o runtime --deep --sign \"$IDENTITY\" \"$LOCATION3\"\ncodesign --verbose --force -o runtime --deep --sign \"$IDENTITY\" \"$LOCATION4\"\ncodesign --verbose --force -o runtime --deep --sign \"$IDENTITY\" \"$LOCATION5\"\n# codesign --verbose --force -o runtime --deep --sign \"$IDENTITY\" \"$LOCATION6\"\n";
11301171
};
11311172
F4DC737D21644E0400D79823 /* ShellScript */ = {
11321173
isa = PBXShellScriptBuildPhase;
@@ -1307,6 +1348,7 @@
13071348
);
13081349
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
13091350
GCC_OPTIMIZATION_LEVEL = 0;
1351+
GENERATE_PKGINFO_FILE = NO;
13101352
INFOPLIST_FILE = "Application/Resources/Platypus-Info.plist";
13111353
INFOPLIST_KEY_CFBundleDisplayName = Platypus;
13121354
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.developer-tools";
@@ -1329,6 +1371,7 @@
13291371
PRODUCT_BUNDLE_IDENTIFIER = org.sveinbjorn.Platypus;
13301372
PRODUCT_NAME = Platypus;
13311373
PROVISIONING_PROFILE_SPECIFIER = "";
1374+
STRIPFLAGS = "-xS";
13321375
VALIDATE_PRODUCT = NO;
13331376
WARNING_CFLAGS = (
13341377
"-Wno-gnu",
@@ -1373,6 +1416,7 @@
13731416
);
13741417
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
13751418
GCC_OPTIMIZATION_LEVEL = s;
1419+
GENERATE_PKGINFO_FILE = NO;
13761420
INFOPLIST_FILE = "Application/Resources/Platypus-Info.plist";
13771421
INFOPLIST_KEY_CFBundleDisplayName = Platypus;
13781422
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.developer-tools";
@@ -1395,6 +1439,7 @@
13951439
PRODUCT_BUNDLE_IDENTIFIER = org.sveinbjorn.Platypus;
13961440
PRODUCT_NAME = Platypus;
13971441
PROVISIONING_PROFILE_SPECIFIER = "";
1442+
STRIPFLAGS = "-xS";
13981443
VALIDATE_PRODUCT = YES;
13991444
WARNING_CFLAGS = (
14001445
"-Wno-gnu",
@@ -1571,6 +1616,7 @@
15711616
ENABLE_NS_ASSERTIONS = YES;
15721617
ENABLE_STRICT_OBJC_MSGSEND = YES;
15731618
GCC_OPTIMIZATION_LEVEL = 0;
1619+
GENERATE_PKGINFO_FILE = NO;
15741620
IBC_FLATTEN_NIBS = NO;
15751621
INFOPLIST_FILE = "ScriptExec/Resources/ScriptExec-Info.plist";
15761622
MACOSX_DEPLOYMENT_TARGET = 10.13;
@@ -1579,6 +1625,7 @@
15791625
ONLY_ACTIVE_ARCH = YES;
15801626
PRODUCT_BUNDLE_IDENTIFIER = org.sveinbjorn.ScriptExec;
15811627
PRODUCT_NAME = ScriptExec;
1628+
STRIPFLAGS = "-xS";
15821629
WARNING_CFLAGS = "-Wpartial-availability";
15831630
};
15841631
name = Development;
@@ -1605,13 +1652,15 @@
16051652
ENABLE_HARDENED_RUNTIME = YES;
16061653
ENABLE_NS_ASSERTIONS = YES;
16071654
ENABLE_STRICT_OBJC_MSGSEND = YES;
1655+
GENERATE_PKGINFO_FILE = NO;
16081656
IBC_FLATTEN_NIBS = NO;
16091657
INFOPLIST_FILE = "ScriptExec/Resources/ScriptExec-Info.plist";
16101658
MACOSX_DEPLOYMENT_TARGET = 10.13;
16111659
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
16121660
MTL_FAST_MATH = YES;
16131661
PRODUCT_BUNDLE_IDENTIFIER = org.sveinbjorn.ScriptExec;
16141662
PRODUCT_NAME = ScriptExec;
1663+
STRIPFLAGS = "-xS";
16151664
WARNING_CFLAGS = "-Wpartial-availability";
16161665
};
16171666
name = Deployment;
@@ -1691,6 +1740,7 @@
16911740
PRODUCT_BUNDLE_IDENTIFIER = "org.sveinbjorn.platypus-clt";
16921741
PRODUCT_NAME = platypus_clt;
16931742
PROVISIONING_PROFILE_SPECIFIER = "";
1743+
STRIPFLAGS = "-xS";
16941744
};
16951745
name = Development;
16961746
};
@@ -1726,6 +1776,7 @@
17261776
PRODUCT_BUNDLE_IDENTIFIER = "org.sveinbjorn.platypus-clt";
17271777
PRODUCT_NAME = platypus_clt;
17281778
PROVISIONING_PROFILE_SPECIFIER = "";
1779+
STRIPFLAGS = "-xS";
17291780
};
17301781
name = Deployment;
17311782
};

TODO.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@
2727
DONE * Harden CI testing for this old project
2828
DONE * Create more automated tests for command line tool and document existing tests
2929
DONE * Add GitHub action to test install of platypus command line tool
30+
DONE * Base64-encode ScriptExec binary to ensure that Apple's annoying notarization works.
3031

3132
* Update FAQ to answer question wrt relative interpreter path / bundling own interpreter
32-
* Base64-encode ScriptExec binary to ensure that Apple's annoying notarization works.
33-
* Release as an Apple-notarized app
3433
* Update Uninstall Platypus shell script so it works

0 commit comments

Comments
 (0)