Skip to content

Commit 8fc21e3

Browse files
committed
Merge pull request #290 from sveinbjornt/5.5-release2
5.5 release2
2 parents a64c32f + 017d533 commit 8fc21e3

File tree

17 files changed

+305
-153
lines changed

17 files changed

+305
-153
lines changed

Application/PlatypusWindowController.m

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ - (BOOL)createApplication:(NSString *)destination {
417417

418418
// We set this specifically
419419
spec[AppSpecKey_DestinationPath] = appPath;
420-
spec[AppSpecKey_ExecutablePath] = [[NSBundle mainBundle] pathForResource:CMDLINE_SCRIPTEXEC_GZIP_NAME ofType:nil];
420+
spec[AppSpecKey_ExecutablePath] = [[NSBundle mainBundle] pathForResource:CMDLINE_SCRIPTEXEC_BIN_B64_NAME ofType:nil];
421421
spec[AppSpecKey_NibPath] = [[NSBundle mainBundle] pathForResource:CMDLINE_NIB_NAME ofType:nil];
422422
spec[AppSpecKey_SymlinkFiles] = @((BOOL)[createSymlinksCheckbox intValue]);
423423
spec[AppSpecKey_StripNib] = @((BOOL)[stripNibFileCheckbox intValue]);
@@ -869,7 +869,8 @@ - (NSString *)estimatedAppSizeString {
869869
estimatedAppSize += [WORKSPACE fileOrFolderSize:[iconController icnsFilePath]];
870870
estimatedAppSize += [WORKSPACE fileOrFolderSize:[dropSettingsController docIconPath]];
871871
estimatedAppSize += [WORKSPACE fileOrFolderSize:[scriptPathTextField stringValue]];
872-
estimatedAppSize += ([WORKSPACE fileOrFolderSize:[[NSBundle mainBundle] pathForResource:CMDLINE_SCRIPTEXEC_GZIP_NAME ofType:nil]] * 3.8);
872+
// base64 encoding expands data to ~1.33x, so estimate original size by mult. * 0.75
873+
estimatedAppSize += ([WORKSPACE fileOrFolderSize:[[NSBundle mainBundle] pathForResource:CMDLINE_SCRIPTEXEC_BIN_B64_NAME ofType:nil]] * 0.75);
873874

874875
// Nib size is much smaller if compiled with ibtool
875876
UInt64 nibSize = [WORKSPACE fileOrFolderSize:[[NSBundle mainBundle] pathForResource:@"MainMenu.nib" ofType:nil]];
@@ -878,8 +879,6 @@ - (NSString *)estimatedAppSizeString {
878879
}
879880
estimatedAppSize += nibSize;
880881

881-
estimatedAppSize -= 50 * 1024; // Just because it's more accurate!
882-
883882
// Bundled files altogether
884883
estimatedAppSize += [bundledFilesController totalSizeOfFiles];
885884

Application/Resources/InstallCommandLineTool.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ cd "$1"
1919

2020
echo "Copying resources to share directory"
2121
# ScriptExec binary
22-
gunzip -c ScriptExec.gz > "/usr/local/share/platypus/ScriptExec"
22+
base64 -d -i ScriptExec.b64 > "/usr/local/share/platypus/ScriptExec"
2323
# Nib
2424
cp -r MainMenu.nib "/usr/local/share/platypus/MainMenu.nib"
2525
# Set permissions

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>1316</string>
448+
<string>1326</string>
449449
<key>LSApplicationCategoryType</key>
450450
<string>public.app-category.developer-tools</string>
451451
<key>LSMinimumSystemVersion</key>

Application/Resources/UninstallPlatypus.sh

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,17 @@
33
# UninstallPlatypus.sh
44
# Platypus
55

6-
cd "$1"
7-
8-
if [ -e "%%APP_SUPPORT_FOLDER%%" ]
9-
then
6+
if [ -e "%%PROGRAM_APP_SUPPORT_PATH%%" ]; then
107
echo "Deleting application support folder..."
11-
mv "%%APP_SUPPORT_FOLDER%%" "~/.Trash/%%PROGRAM_NAME%%ApplicationSupport-TRASHED-$RANDOM"
8+
mv "%%PROGRAM_APP_SUPPORT_PATH%%" ~/.Trash/%%PROGRAM_NAME%%ApplicationSupport-TRASHED-$RANDOM
129
fi
1310

14-
if [ -e "~/Library/Preferences/%%PROGRAM_BUNDLE_IDENTIFIER%%.plist" ]
15-
then
11+
if [ -e ~/Library/Preferences/%%PROGRAM_BUNDLE_IDENTIFIER%%.plist ]; then
1612
echo "Deleting %%PROGRAM_NAME%% preferences..."
17-
mv "~/Library/Preferences/%%PROGRAM_BUNDLE_IDENTIFIER%%.plist" "~/.Trash/%%PROGRAM_BUNDLE_IDENTIFIER%%-TRASHED-$RANDOM.plist"
13+
mv ~/Library/Preferences/%%PROGRAM_BUNDLE_IDENTIFIER%%.plist ~/.Trash/%%PROGRAM_BUNDLE_IDENTIFIER%%-TRASHED-$RANDOM.plist
1814
fi
1915

20-
if [ -e "$1/../../../%%PROGRAM_NAME%%.app" ]
21-
then
16+
if [ -e "%%APP_BUNDLE_PATH%%" ]; then
2217
echo "Moving %%PROGRAM_NAME%%.app to Trash"
23-
mv "$1/../../../%%PROGRAM_NAME%%.app" "~/.Trash/%%PROGRAM_NAME%%-TRASHED-$RANDOM.app"
18+
mv "%%APP_BUNDLE_PATH%%" ~/.Trash/%%PROGRAM_NAME%%-TRASHED-$RANDOM.app
2419
fi

Application/SettingsController.m

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,10 +399,10 @@ - (NSDictionary *)commandEnvironmentDictionary {
399399
@"PROGRAM_MIN_SYS_VERSION": PROGRAM_MIN_SYS_VERSION,
400400
@"PROGRAM_BUNDLE_IDENTIFIER": PROGRAM_BUNDLE_IDENTIFIER,
401401
@"PROGRAM_AUTHOR": PROGRAM_AUTHOR,
402+
@"PROGRAM_APP_SUPPORT_PATH": PROGRAM_APP_SUPPORT_PATH,
402403
@"CMDLINE_PROGNAME_BUNDLE": CMDLINE_PROGNAME_BUNDLE,
403404
@"CMDLINE_PROGNAME": CMDLINE_PROGNAME,
404405
@"CMDLINE_SCRIPTEXEC_BIN_NAME": CMDLINE_SCRIPTEXEC_BIN_NAME,
405-
@"CMDLINE_SCRIPTEXEC_GZIP_NAME": CMDLINE_SCRIPTEXEC_GZIP_NAME,
406406
@"CMDLINE_MANPAGE_NAME": CMDLINE_MANPAGE_NAME,
407407
@"CMDLINE_DEFAULT_ICON_NAME": CMDLINE_DEFAULT_ICON_NAME,
408408
@"CMDLINE_NIB_NAME": CMDLINE_NIB_NAME,
@@ -413,6 +413,7 @@ - (NSDictionary *)commandEnvironmentDictionary {
413413
@"CMDLINE_MANDIR_PATH": CMDLINE_MANDIR_PATH,
414414
@"CMDLINE_MANPAGE_PATH": CMDLINE_MANPAGE_PATH,
415415
@"CMDLINE_NIB_PATH": CMDLINE_NIB_PATH,
416+
@"APP_BUNDLE_PATH": [[NSBundle mainBundle] bundlePath],
416417
@"CMDLINE_SCRIPT_EXEC_PATH": CMDLINE_SCRIPT_EXEC_PATH};
417418
}
418419

CHANGES.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
# Platypus Version History
22

3-
### For 5.5.0 - 17/11/2025
3+
### For 5.5.0 - 02/12/2025
44

5-
* Fixed bug where the argument settings window would lock up the interface
5+
* Platypus.app and the platypus command line tool are now notarized by Apple
6+
* Now requires macOS 11 "Big Sur" or later
7+
* Fixed bug where the Argument settings dialog could 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
9-
* Modernized codebase
10+
* Added `--executable-path` and `--nib-path` flags to command line tool to allow users to inject custom binaries or nib files
11+
* Improved install script for command line tool to ease installation in CI environments
12+
* Extensive modernization of codebase
13+
* Much-improved tests for command line tool
1014

1115
### For 5.4.1 - 22/10/2022
1216

Common.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@
6161
#define CMDLINE_PROGNAME_BUNDLE @"platypus_clt"
6262
#define CMDLINE_PROGNAME @"platypus"
6363
#define CMDLINE_SCRIPTEXEC_BIN_NAME @"ScriptExec"
64-
#define CMDLINE_SCRIPTEXEC_GZIP_NAME @"ScriptExec.gz"
64+
#define CMDLINE_SCRIPTEXEC_BIN_GZ_NAME @"ScriptExec.gz"
65+
#define CMDLINE_SCRIPTEXEC_BIN_B64_NAME @"ScriptExec.b64"
6566
#define CMDLINE_MANPAGE_NAME @"platypus.1.gz"
6667
#define CMDLINE_DEFAULT_ICON_NAME @"PlatypusDefault.icns"
6768
#define CMDLINE_NIB_NAME @"MainMenu.nib"
@@ -82,6 +83,7 @@
8283

8384
#define APPBUNDLE_SUFFIX @".app"
8485
#define GZIP_SUFFIX @".gz"
86+
#define B64_SUFFIX @".b64"
8587

8688
#define DEFAULT_TEXT_FONT_NAME @"Monaco"
8789
#define DEFAULT_TEXT_FONT_SIZE 13.0

0 commit comments

Comments
 (0)