Skip to content
Merged
Show file tree
Hide file tree
Changes from 22 commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
0f57a25
Optimized icns icons using createicns instead of Apple's iconutil
sveinbjornt May 22, 2025
6291050
Bumped version to 5.5.0, updated file copyright headers, project tweaks
sveinbjornt May 24, 2025
33a7648
Updated project to build without precompiled header, fixed broken bui…
sveinbjornt May 24, 2025
dd9dca0
Modernized project further, silenced compiler complaints
sveinbjornt May 24, 2025
47c32fa
Preferences/Prefs -- to Settings, as per new macOS convention + platy…
sveinbjornt May 24, 2025
814e474
Modernized imports, enums, NSArray mutable copying
sveinbjornt May 25, 2025
1c16c3b
Merge branch 'master' into 5.5-release
sveinbjornt May 25, 2025
98b5213
Verify that icns file is icns file and that CLT binary is executable
sveinbjornt Jun 27, 2025
6459f59
Got rid of old custom document icons, now letting macOS generate thes…
sveinbjornt Jun 27, 2025
d89635d
Added support for applicationSupportsSecureRestorableState
sveinbjornt Jun 27, 2025
c7d7482
NSInteger instead of NSUInteger, docIcon.icns to DocIcon.icns, CLT in…
sveinbjornt Jun 27, 2025
b305592
Replaced Sparkle with the stripped down version used in Sloth (versio…
sveinbjornt Jun 27, 2025
1730bfa
CI tweak
sveinbjornt Jun 28, 2025
c600f6e
Minor stuff
sveinbjornt Jun 28, 2025
f8b5ae6
Added informational dialog when command line is installed, informing …
sveinbjornt Jun 28, 2025
e4ec240
Fixed sparkle code signing
sveinbjornt Jun 28, 2025
f35855a
More modernization and tweaks
sveinbjornt Nov 8, 2025
7648567
Including cat2html universal binary directly
sveinbjornt Nov 16, 2025
99cb829
Bumped minimum macOS version to 11 "Big Sur"
sveinbjornt Nov 16, 2025
91c5a10
Silenced some compiler deprecation warnings by using more modern cons…
sveinbjornt Nov 16, 2025
25ed6e9
Rm unneeded imports
sveinbjornt Nov 16, 2025
99c03bf
Moved todo list from CHANGES.md to new TODO.md file
sveinbjornt Nov 17, 2025
2bf66d7
Refactored Python testing code
sveinbjornt Nov 23, 2025
2171466
Rm old build_release.sh script
sveinbjornt Nov 25, 2025
a98f153
Removed old, outdated support for Sparkle DSA signatures, updated ins…
sveinbjornt Nov 26, 2025
5f04b90
Updated CI and updated Makefile to use new Sparkle signature generation
sveinbjornt Nov 26, 2025
a59314b
Added Help menu item icons
sveinbjornt Nov 26, 2025
445c76f
Merge branch 'testfix' into 5.5-release
sveinbjornt Nov 27, 2025
174fdfe
Enabling CLT tests in CI
sveinbjornt Nov 27, 2025
a0b8420
Added '-e' (--executable-path) and '-E' (--nib-path) flags to command…
sveinbjornt Nov 27, 2025
5b35891
Fixed tests
sveinbjornt Nov 27, 2025
fc52566
Updated documentation
sveinbjornt Nov 27, 2025
b28ab97
CI fix
sveinbjornt Nov 27, 2025
da8a88c
Minor tests cleanup
sveinbjornt Nov 27, 2025
c46e854
Updated Makefile
sveinbjornt Nov 27, 2025
a1cafe0
Added Homebrew formula for command line tool
sveinbjornt Nov 27, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/macos.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# GitHub Actions CI build

name: build

on:
Expand All @@ -18,7 +20,8 @@ jobs:
uses: actions/checkout@v4
- run: gem install xcpretty
- name: Build app
run: make build_unsigned | xcpretty -c && exit ${PIPESTATUS[0]}
run: |
make build_unsigned | xcpretty -c && exit ${PIPESTATUS[0]}
# Tests require GUI environment, disabled in CI
#- name: Run tests
# run: make clt_tests
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,5 @@ dsa_priv.pem
Tests/platypus
Tests/*.app
Tests/args.txt
Platypus-*
.claude
5 changes: 3 additions & 2 deletions Application/ArgsController.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright (c) 2003-2024, Sveinbjorn Thordarson <sveinbjorn@sveinbjorn.org>
Copyright (c) 2003-2025, Sveinbjorn Thordarson <sveinbjorn@sveinbjorn.org>
All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
Expand Down Expand Up @@ -28,7 +28,8 @@
POSSIBILITY OF SUCH DAMAGE.
*/

#import <Cocoa/Cocoa.h>
@import Cocoa;

#import "NSResponderNotifyingTableView.h"

@interface ArgsController : NSWindowController <NSTableViewDataSource, NSTableViewDelegate, NSTableViewFirstResponderDelegate, NSMenuItemValidation>
Expand Down
8 changes: 4 additions & 4 deletions Application/ArgsController.m
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright (c) 2003-2024, Sveinbjorn Thordarson <sveinbjorn@sveinbjorn.org>
Copyright (c) 2003-2025, Sveinbjorn Thordarson <sveinbjorn@sveinbjorn.org>
All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
Expand Down Expand Up @@ -141,7 +141,7 @@ - (void)constructCommandString {
NSMutableAttributedString *cmdString = [[NSMutableAttributedString alloc] initWithString:[interpreterTextField stringValue] attributes:defaultAttrs];

// Interpreter args
for (int i = 0; i < [interpreterArgs count]; i++)
for (NSInteger i = 0; i < [interpreterArgs count]; i++)
{
NSString *a = [NSString stringWithFormat:@" %@", interpreterArgs[i]];
NSMutableDictionary *attrs = [defaultAttrs mutableCopy];
Expand Down Expand Up @@ -175,7 +175,7 @@ - (void)constructCommandString {
[cmdString appendAttributedString:scriptString];

// Script args
for (int i = 0; i < [scriptArgs count]; i++)
for (NSInteger i = 0; i < [scriptArgs count]; i++)
{
NSString *a = [NSString stringWithFormat:@"%@ ", scriptArgs[i]];
NSMutableDictionary *attrs = [defaultAttrs mutableCopy];
Expand All @@ -196,7 +196,7 @@ - (void)constructCommandString {
}

// File args
if ([isDroppableCheckbox state] == NSOnState) {
if ([isDroppableCheckbox state] == NSControlStateValueOn) {
NSAttributedString *attrStr = [[NSAttributedString alloc] initWithString:@" [files ...]" attributes:defaultAttrs];
[cmdString appendAttributedString:attrStr];
}
Expand Down
4 changes: 2 additions & 2 deletions Application/BundledFilesController.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright (c) 2003-2024, Sveinbjorn Thordarson <sveinbjorn@sveinbjorn.org>
Copyright (c) 2003-2025, Sveinbjorn Thordarson <sveinbjorn@sveinbjorn.org>
All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
Expand Down Expand Up @@ -31,7 +31,7 @@
// This is a controller class around the Bundled Files list in the Platypus
// window. It is the data source and delegate of the tableview with the files.

#import <Cocoa/Cocoa.h>
@import Cocoa;

@interface BundledFilesController : NSObject <NSTableViewDataSource, NSTableViewDelegate, NSMenuDelegate, NSMenuItemValidation>

Expand Down
12 changes: 6 additions & 6 deletions Application/BundledFilesController.m
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright (c) 2003-2024, Sveinbjorn Thordarson <sveinbjorn@sveinbjorn.org>
Copyright (c) 2003-2025, Sveinbjorn Thordarson <sveinbjorn@sveinbjorn.org>
All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
Expand Down Expand Up @@ -133,15 +133,15 @@ - (void)updateButtonStatus {
}

- (void)updateFileSizeField {
//if there are no items
// If there are no items
if ([files count] == 0) {
_totalSizeOfFiles = 0;
[bundleSizeTextField setStringValue:@""];
[[NSNotificationCenter defaultCenter] postNotificationName:PLATYPUS_APP_SIZE_CHANGED_NOTIFICATION object:nil];
return;
}

//otherwise, loop through all files, calculate size in a separate queue
// Otherwise, loop through all files, calculate size in a separate queue
[bundleSizeTextField setStringValue:@"Calculating size..."];

dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_LOW, 0), ^(void){
Expand Down Expand Up @@ -300,8 +300,8 @@ - (void)copyFilenamesToPasteboard:(BOOL)basenameOnly {
}
}

[[NSPasteboard generalPasteboard] declareTypes:@[NSStringPboardType] owner:self];
[[NSPasteboard generalPasteboard] setString:copyStr forType:NSStringPboardType];
[[NSPasteboard generalPasteboard] declareTypes:@[NSPasteboardTypeString] owner:self];
[[NSPasteboard generalPasteboard] setString:copyStr forType:NSPasteboardTypeString];
}

- (IBAction)addFilesToList:(id)sender {
Expand Down Expand Up @@ -373,7 +373,7 @@ - (IBAction)removeSelectedFiles:(id)sender {
}
}
if ([tableView numberOfRows]) {
NSUInteger rowToSelect = [selectedItems firstIndex] - 1;
NSInteger rowToSelect = [selectedItems firstIndex] - 1;
[tableView selectRowIndexes:[NSIndexSet indexSetWithIndex:rowToSelect] byExtendingSelection:NO];
}

Expand Down
5 changes: 3 additions & 2 deletions Application/DropSettingsController.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright (c) 2003-2024, Sveinbjorn Thordarson <sveinbjorn@sveinbjorn.org>
Copyright (c) 2003-2025, Sveinbjorn Thordarson <sveinbjorn@sveinbjorn.org>
All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
Expand Down Expand Up @@ -28,7 +28,8 @@
POSSIBILITY OF SUCH DAMAGE.
*/

#import <Cocoa/Cocoa.h>
@import Cocoa;

#import "NSResponderNotifyingTableView.h"

@class SuffixTypeListController, UniformTypeListController;
Expand Down
2 changes: 1 addition & 1 deletion Application/DropSettingsController.m
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright (c) 2003-2024, Sveinbjorn Thordarson <sveinbjorn@sveinbjorn.org>
Copyright (c) 2003-2025, Sveinbjorn Thordarson <sveinbjorn@sveinbjorn.org>
All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
Expand Down
4 changes: 2 additions & 2 deletions Application/EditorController.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright (c) 2003-2024, Sveinbjorn Thordarson <sveinbjorn@sveinbjorn.org>
Copyright (c) 2003-2025, Sveinbjorn Thordarson <sveinbjorn@sveinbjorn.org>
All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
Expand Down Expand Up @@ -28,7 +28,7 @@
POSSIBILITY OF SUCH DAMAGE.
*/

#import <Cocoa/Cocoa.h>
@import Cocoa;

@interface EditorController : NSWindowController

Expand Down
2 changes: 1 addition & 1 deletion Application/EditorController.m
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright (c) 2003-2024, Sveinbjorn Thordarson <sveinbjorn@sveinbjorn.org>
Copyright (c) 2003-2025, Sveinbjorn Thordarson <sveinbjorn@sveinbjorn.org>
All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
Expand Down
5 changes: 3 additions & 2 deletions Application/IconController.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright (c) 2003-2024, Sveinbjorn Thordarson <sveinbjorn@sveinbjorn.org>
Copyright (c) 2003-2025, Sveinbjorn Thordarson <sveinbjorn@sveinbjorn.org>
All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
Expand Down Expand Up @@ -28,7 +28,8 @@
POSSIBILITY OF SUCH DAMAGE.
*/

#import <Cocoa/Cocoa.h>
@import Cocoa;

#import "STDragImageView.h"

@interface IconController : NSObject <STDragImageViewDragDelegate, NSMenuItemValidation>
Expand Down
10 changes: 5 additions & 5 deletions Application/IconController.m
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright (c) 2003-2024, Sveinbjorn Thordarson <sveinbjorn@sveinbjorn.org>
Copyright (c) 2003-2025, Sveinbjorn Thordarson <sveinbjorn@sveinbjorn.org>
All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
Expand Down Expand Up @@ -84,13 +84,13 @@ - (void)awakeFromNib {

- (IBAction)copyIconPath:(id)sender {

[[NSPasteboard generalPasteboard] declareTypes:@[NSStringPboardType] owner:self];
[[NSPasteboard generalPasteboard] setString:[self icnsFilePath] forType:NSStringPboardType];
[[NSPasteboard generalPasteboard] declareTypes:@[NSPasteboardTypeString] owner:self];
[[NSPasteboard generalPasteboard] setString:[self icnsFilePath] forType:NSPasteboardTypeString];
}

- (IBAction)copyIcon:(id)sender {
[[NSPasteboard generalPasteboard] declareTypes:@[NSTIFFPboardType] owner:self];
[[NSPasteboard generalPasteboard] setData:[[iconImageView image] TIFFRepresentation] forType:NSTIFFPboardType];
[[NSPasteboard generalPasteboard] declareTypes:@[NSPasteboardTypeTIFF] owner:self];
[[NSPasteboard generalPasteboard] setData:[[iconImageView image] TIFFRepresentation] forType:NSPasteboardTypeTIFF];
}

- (IBAction)pasteIcon:(id)sender {
Expand Down
2 changes: 1 addition & 1 deletion Application/InterpreterTextField.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright (c) 2003-2024, Sveinbjorn Thordarson <sveinbjorn@sveinbjorn.org>
Copyright (c) 2003-2025, Sveinbjorn Thordarson <sveinbjorn@sveinbjorn.org>
All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
Expand Down
2 changes: 1 addition & 1 deletion Application/InterpreterTextField.m
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright (c) 2003-2024, Sveinbjorn Thordarson <sveinbjorn@sveinbjorn.org>
Copyright (c) 2003-2025, Sveinbjorn Thordarson <sveinbjorn@sveinbjorn.org>
All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
Expand Down
14 changes: 7 additions & 7 deletions Application/PlatypusWindowController.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright (c) 2003-2024, Sveinbjorn Thordarson <sveinbjorn@sveinbjorn.org>
Copyright (c) 2003-2025, Sveinbjorn Thordarson <sveinbjorn@sveinbjorn.org>
All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
Expand Down Expand Up @@ -28,14 +28,14 @@
POSSIBILITY OF SUCH DAMAGE.
*/

#import <Cocoa/Cocoa.h>
@import Cocoa;

@class PlatypusAppSpec;
@interface PlatypusWindowController : NSWindowController < NSApplicationDelegate,
NSMenuDelegate,
NSMenuItemValidation,
NSWindowDelegate,
NSOpenSavePanelDelegate >
@interface PlatypusWindowController : NSWindowController <NSApplicationDelegate,
NSMenuDelegate,
NSMenuItemValidation,
NSWindowDelegate,
NSOpenSavePanelDelegate>

- (BOOL)verifyFieldContents;
- (PlatypusAppSpec *)appSpecFromControls;
Expand Down
24 changes: 13 additions & 11 deletions Application/PlatypusWindowController.m
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright (c) 2003-2024, Sveinbjorn Thordarson <sveinbjorn@sveinbjorn.org>
Copyright (c) 2003-2025, Sveinbjorn Thordarson <sveinbjorn@sveinbjorn.org>
All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
Expand Down Expand Up @@ -28,8 +28,8 @@
POSSIBILITY OF SUCH DAMAGE.
*/

#import "PlatypusWindowController.h"
#import "Common.h"
#import "PlatypusWindowController.h"
#import "PlatypusAppSpec.h"
#import "PlatypusScriptUtils.h"
#import "IconController.h"
Expand All @@ -44,7 +44,7 @@
#import "DropSettingsController.h"
#import "SyntaxCheckerController.h"
#import "BundledFilesController.h"
#import "PrefsController.h"
#import "SettingsController.h"
#import "NSWorkspace+Additions.h"
#import "Alerts.h"
#import "NSColor+HexTools.h"
Expand Down Expand Up @@ -94,7 +94,7 @@ @interface PlatypusWindowController()
IBOutlet ProfilesController *profilesController;
IBOutlet TextSettingsController *textSettingsController;
IBOutlet StatusItemSettingsController *statusItemSettingsController;
IBOutlet PrefsController *prefsController;
IBOutlet SettingsController *settingsController;
IBOutlet BundledFilesController *bundledFilesController;

VDKQueue *fileWatcherQueue;
Expand All @@ -114,7 +114,7 @@ - (instancetype)init {

+ (void)initialize {
// Register the dictionary of defaults
[DEFAULTS registerDefaults:[PrefsController defaultsDictionary]];
[DEFAULTS registerDefaults:[SettingsController defaultsDictionary]];
}

- (void)awakeFromNib {
Expand Down Expand Up @@ -170,7 +170,7 @@ - (void)awakeFromNib {
[self updateInterfaceTypeMenu:NSMakeSize(16, 16)];

// Main window accepts dragged text and dragged files
[[self window] registerForDraggedTypes:@[NSFilenamesPboardType, NSStringPboardType]];
[[self window] registerForDraggedTypes:@[NSFilenamesPboardType, NSPasteboardTypeString]];

// If we haven't already loaded a profile via openfile delegate method
// we set all fields to their defaults. Any profile must contain a name
Expand Down Expand Up @@ -202,7 +202,7 @@ - (BOOL)application:(NSApplication *)theApplication openFile:(NSString *)filenam
}

- (BOOL)applicationSupportsSecureRestorableState:(NSApplication *)app {
return NO;
return YES;
}

#pragma mark - NSWindowDelegate
Expand Down Expand Up @@ -878,6 +878,8 @@ - (NSString *)estimatedAppSizeString {
}
estimatedAppSize += nibSize;

estimatedAppSize -= 50 * 1024; // Just because it's more accurate!

// Bundled files altogether
estimatedAppSize += [bundledFilesController totalSizeOfFiles];

Expand Down Expand Up @@ -954,9 +956,9 @@ - (BOOL)performDragOperation:(id <NSDraggingInfo> )sender {
return YES;
}
// String
else if ([[pboard types] containsObject:NSStringPboardType]) {
else if ([[pboard types] containsObject:NSPasteboardTypeString]) {
// Create a new script file with the dropped string, load it
NSString *draggedString = [pboard stringForType:NSStringPboardType];
NSString *draggedString = [pboard stringForType:NSPasteboardTypeString];
NSString *newScriptPath = [self createNewScript:draggedString];
if (newScriptPath) {
[self loadScript:newScriptPath];
Expand All @@ -971,7 +973,7 @@ - (NSDragOperation)draggingEntered:(id <NSDraggingInfo> )sender {

if ([[[sender draggingPasteboard] types] containsObject:NSFilenamesPboardType]) {
return NSDragOperationLink;
} else if ([[[sender draggingPasteboard] types] containsObject:NSStringPboardType]) {
} else if ([[[sender draggingPasteboard] types] containsObject:NSPasteboardTypeString]) {
return NSDragOperationCopy;
}

Expand All @@ -980,7 +982,7 @@ - (NSDragOperation)draggingEntered:(id <NSDraggingInfo> )sender {

// If we just created a file with a dragged string, we open it in default editor
- (void)concludeDragOperation:(id <NSDraggingInfo> )sender {
if ([[[sender draggingPasteboard] types] containsObject:NSStringPboardType]) {
if ([[[sender draggingPasteboard] types] containsObject:NSPasteboardTypeString]) {
[self editScript:self];
}
}
Expand Down
4 changes: 2 additions & 2 deletions Application/ProfilesController.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright (c) 2003-2024, Sveinbjorn Thordarson <sveinbjorn@sveinbjorn.org>
Copyright (c) 2003-2025, Sveinbjorn Thordarson <sveinbjorn@sveinbjorn.org>
All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
Expand Down Expand Up @@ -28,7 +28,7 @@
POSSIBILITY OF SUCH DAMAGE.
*/

#import <Cocoa/Cocoa.h>
@import Cocoa;

@interface ProfilesController : NSObject <NSMenuItemValidation>

Expand Down
Loading
Loading