From f1cc718c7ece45c46742548e2b22e66dbc47f0d1 Mon Sep 17 00:00:00 2001 From: Sveinbjorn Thordarson Date: Sun, 25 Nov 2018 16:25:42 +0000 Subject: [PATCH] Release 5.3 prepped --- CHANGES.txt | 19 ++++++----- Documentation/Documentation.html | 40 ++++++++++++---------- README.md | 4 +-- Sparkle/PlatypusAppcast.xml | 57 ++++++++++++++------------------ 4 files changed, 58 insertions(+), 62 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 776eda8e..443aefe2 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -25,24 +25,25 @@ For future versions... TODO: Fix icon drag and drop For 5.3 - - * First facelift in a decade: New application icons. + * First facelift in a decade: New application icons created by Drífa Líftóra * Updated to support Mojave Dark Mode * Added AWK, JavaScript and Node interpreter presets - * Added a "REFRESH" command that clears text output buffer + * Added "REFRESH" command that clears text output buffer * Added "DISABLED" menu item syntax for status menu interface - * Platypus and its command line tool binary are now code-signed. Generated applications remain unsigned, for obvious reasons. + * Platypus and its command line tool binary are now code-signed. Generated applications remain unsigned, for obvious reasons * Windows of generated applications are now larger, and centered on first launch - * Apps now try to make script executable (+x) on launch This may resolve certain issues with launching Platypus-generated apps stored on network-mounted volumes. - * Added Open With menu for items in bundled files list - * Fixed bug where Platypus would generate broken custom icns from images + * Apps now try to make script executable (+x) on launch This may resolve certain issues with launching generated apps stored on network-mounted volumes + * Added Open With menu for items in Bundled Files list + * Fixed bug where Platypus would generate broken custom icns files from images * Fixed buggy Uniform Type Identifier validation in command line tool * Platypus now validates default bundle identifier in Preferences * Removed broken System Profiler example - * Removed XML plist feature + * Removed XML plist format feature * Documentation overhauled, partially rewritten and moved to Markdown format - * Various minor bug fixes + * An assortment of minor bug fixes * Various minor interface improvements + * Reduced size of generated app binaries + * Now requires macOS 10.8 or later 5.2 * Platypus apps can now register as URL scheme handlers and receive opened URLs as arguments to script diff --git a/Documentation/Documentation.html b/Documentation/Documentation.html index 1d63fd1c..4297770b 100644 --- a/Documentation/Documentation.html +++ b/Documentation/Documentation.html @@ -325,13 +325,13 @@
-

Documentation for Platypus 5.3

-

Last updated on November 17th, 2018. The latest version of this document can be found here.

+

+

Documentation for Platypus 5.3

+

Last updated on November 25th, 2018. The latest version of this document can be found here.

Introduction

What is Platypus?

-

Platypus is a developer tool that creates native macOS application wrappers around scripts. Scripts are thus transformed into regular applications that can be launched from the window environment – e.g. the Finder or the Dock – without requiring use of the command line interface.

-

Platypus was first conceived in 2003 and has since gone through many significant updates. It is written in Objective-C/Cocoa and is free, open-source software distributed under a BSD license. This means the source code is freely available and you are free to modify and distribute it as you see fit.

+

Platypus was first released in 2003 and has since gone through many significant updates. It is written in Objective-C/Cocoa and is free, open-source software distributed under a BSD license. This means the source code is freely available and you are free to modify and distribute it as you see fit.

@@ -350,7 +350,7 @@

What Platypus is NOT

System Requirements

Both Platypus and the applications it generates require macOS 10.8 or later and are provided as 64-bit Intel binaries. If you want to target 10.6 and/or 32-bit systems, version 4.9 continues to work just fine. If you want to target 10.4 and the PowerPC users of yore, you can use version 4.4.

Credits

-

Platypus was conceived and created by me, Sveinbjorn Thordarson. The Platypus application icon was created by Drífa Líftóra.

+

Platypus was conceived and created by me, Sveinbjorn Thordarson. The application icon was created by Drífa Líftóra.

Thanks go to Troy Stephens, the original author of the IconFamily class used for icon handling in Platypus, Bryan D K Jones, author of VDKQueue, Gianni Ceccarelli for contributing code on authenticated script execution, Matt Gallagher for secure temp file code, and Andy Matuschak for the Sparkle update framework. Stack Overflow and the OmniGroup Mac development mailing list and have also been invaluable over the years.

Finally, I am much indebted to Wilfredo Sanchez, author of DropScript, the proof-of-concept project which inspired me to create Platypus in the first place.

The Basics

@@ -368,7 +368,7 @@

Interpreter

Use Script Type to specify an interpreter for your script. Either select one of the predefined scripting languages from the the pop-up menu or type in the path to an interpreter binary.

Most of the time, you do not need to specify this manually. Whenever you open a script file, Platypus automatically tries to determine its type based on the file suffix and shebang line (#!). If you have specified this meta-data in the script file itself, Platypus is usually smart enough to figure it out.

-

Please note that the interpreter must exist on the system where the application is run. All the preset scripting language interpreters (e.g. Python, Perl, Ruby, PHP, Tcl, etc.) are a standard part of all macOS installations.

+

Please note that the interpreter must exist on the system where the application is run. All the preset scripting language interpreters (except Node.js) are a standard part of all macOS installations.

Args let you add arguments to the script and/or its interpreter.

Interface

@@ -390,12 +390,12 @@

Web View

Status Menu

Creates a Status Item in the menu bar when the app is launched. Every time the status item is clicked, the script is executed and its text output shown line for line in a menu. If a menu item is selected, the script is executed again with the title of the selected item passed as an argument to the script.

The properties of the Status Item (icon, title, etc.) can be configured under Status Item Settings button.

-

+

Droplet

Creates a square window instructing the user to drop files on it for processing. While processing, script output is displayed line for line along with an indeterminate circular progress indicator.

Setting the Icon

-

+

Platypus lets you set an icon for your application. You can pick from the icon presets, paste your own image or select an image or icns file.

Please note that having Platypus create the icon from an ordinary image file will typically not result in an icon that looks good in smaller sizes. For best results, use professional icon-editing software and import a carefully crafted .icns file using the Select .icns file option.

Identifier, Author and Version

@@ -407,7 +407,7 @@

Special Options

Run with root privileges: If selected, the application prompts for an Administrator password and executes the script with escalated (root) privileges using Apple's Security Framework. This is not strictly equivalent to running the script as the root user. For details, see the documentation for the Mac OS Security Framework.

Platypus scripts must not use the 'sudo' command. This causes the script to prompt for input via STDIN, and since no input is forthcoming, the application will hang indefinitely.

-

Please note that if this option is selected, STDERR output cannot be captured due to limitations in the Security APIs. This can be circumvented by using a shell script to execute another script while piping STDERR into STDOUT (e.g. perl myScript.pl 2>&1).

+

Please note that if this option is selected, STDERR output cannot be captured due to limitations in the Security APIs. This can be circumvented by using a shell script to execute another script while piping STDERR into STDOUT (e.g. perl myScript.pl 2>&1).

Runs in background: If selected, the application registers itself as a User Interface Element (LSUIElement) and will not appear in the Dock when launched.

Remain running after completion: This option tells the application to remain open after the script has executed.

Bundled Files

@@ -417,7 +417,7 @@

Bundled Files

Advanced Options

Accepting files and dragged items

Checking Accept dropped items makes the application bundle accept dragged and dropped files, or dragged text snippets. You can specify which file types and draggable data the application should accept under Drop Settings.

-

+

Accept Dropped Files means the paths of dropped or opened files are passed to the script as arguments. You can specify which file types to accept either using UTIs (recommended) or filename suffixes.

To accept dragged folders, add the UTI public.folder. HINT: You can drag files from the Finder into the suffix or UTI list to add their respective suffix/UTI.

Optionally, select a document icon (.icns file) for the files "owned" by your app.

@@ -426,7 +426,7 @@

Accepting files and dragged items

Register as URI scheme handler makes the app register as a handler for URI schemes. These can be either standard URI schemes such as http or a custom URI schemes of your choice (e.g. myscheme://). If your app is the default handler for a URI scheme, it will launch open every time a URL matching the scheme is opened. The URL is then passed to the script as an argument.

Build-Time Options

Platypus allows you to create development versions of your script application. Ordinarily, the script and any bundled files are copied into the resulting application. If Development Version is selected in the Create app dialog, a symlink to the original script and bundled files is created instead. This allows you to edit your script file while simultaneously testing it as a Platypus app.

-

+

Optimize Application: Strip and compile the nib file in the application in order to reduce its size. This makes the nib uneditable. Only works if Xcode is installed.

Built-In Editor

Platypus includes a very basic built-in text editor for editing scripts. Press the Edit button to bring it up.

@@ -439,7 +439,7 @@

Syntax Checking

Show Shell Command

Platypus includes a command line tool counterpart to the Platypus.app application, platypus,which can be installed into /usr/local/bin/ via Preferences. The man page for this tool is available from the Help menu, and via the command line. There is also an online version available.

The command line tool does not in any way depend on the Platypus application once it has been installed.

-

+

Show Shell Command in the Action menu displays the command required to execute the platypus command line tool using all the options selected in the graphical interface. This can be helpful if you have the command line tool installed and want to automate the creation of script apps within a larger build process.

Preferences

The Platypus Preferences should be pretty self-explanatory. You can select an editor of choice, set the default author and bundle identifier settings, set the behaviour of Platypus on app creation, and install/uninstall the platypus command line tool.

@@ -513,6 +513,8 @@

Creating a Status Menu app

----\n
 

Creating a submenu named "Title" with three menu items:

SUBMENU|Title|Item1|Item2|Item3\n
+

Showing a disabled menu item:

+
DISABLED|Name of item\n
 

Prompting for input via osascript/AppleScript

Scripts can also prompt for input by running AppleScript code via the /usr/bin/osascript program. See an example in Perl below:

#!/usr/bin/perl
@@ -575,7 +577,7 @@ 

Built-In Examples

Updates

Updating Platypus

Platypus uses Sparkle for updates. You can update to the latest version by selecting Check for updates... in the application menu. Future releases may or may not break your saved profiles. Consult the version change log for details.

-

An Appcast RSS XML file is available here.

+

An AppCast XML file is available here.

To get the absolutely latest development version of Platypus, you can check out the source repository on GitHub.

Frequently Asked Questions

Can I use Platypus to create proprietary software?

@@ -591,7 +593,9 @@

Does Platypus support localization

No. But if you uncheck "Optimize nib file" in the save dialog when creating an app, the resulting nib in the application bundle can be edited using Xcode. You can thus localize your app manually if you want to. Support for localization is not on the feature roadmap.

How does my script access the user's environment (e.g. PATH)?

Assuming that you're using bash, you can set the interpreter to /bin/bash and add the -l flag as an argument under "Args". This makes bash act as if it had been invoked as a login shell. See man bash for details.

-

How can I pass specific arguments to my script?

+

Another alternative is to manually load the user's shell configuration file in your script:

+
source ~/.bashrc
+

How can I pass specific arguments to my script?

You can edit arguments to both the script interpreter and the script itself by pressing the Args button next to the Interpreter controls.

How do I uninstall Platypus?

Platypus only uses about 5MB of disk space, but if you want to remove it entirely, along with support files, profiles, etc., you can select Uninstall Platypus from the Platypus application menu. This will uninstall the command line tool (if previously installed), and move Platypus.app and all its supporting files – including saved Profiles – to the Trash.

@@ -624,14 +628,14 @@

Can I change the dimens

If you want to keep your own modified nib for repeated use, you can simply save a copy, edit it and add it to Bundled Files when you create an app. It will then overwrite the default MainMenu.nib file:

The Platypus command line tool also allows you to specify an alternate nib file using the -H flag. See the man page for details.

Can I prompt for user input (STDIN) in my Platypus-wrapped scripts?

-

No. Platypus applications do not present the user with an interactive shell, and therefore no bidirectional communication can take place using standard input. Platypus apps can only capture and display the text output of your script. They cannot prompt for input via STDIN, and will not be able to do so in the foreseeable future. This means that any script commands that require input via STDIN, such as sudo, will not work from within a Platypus application.

+

No. Platypus applications do not present the user with an interactive shell, and therefore no bidirectional communication can take place using standard input. Platypus apps can only capture and display the text output of your script. They cannot prompt for input via STDIN, and will not be able to do so in the foreseeable future. This means that any commands that require input via STDIN, such as sudo, or Python's input() will not work from within a Platypus application.

Is there a way to sign Platypus-generated apps so they don't require GateKeeper approval?

-

Neither Platypus nor Platypus-generated apps are signed. Due to GateKeeper, this means they will not run on macOS without prompting the user for approval. There are no plans to change this in the future. Apple developer accounts cost money and I have no intention of paying Apple for the privilege of developing free software for their operating system.

+

Platypus-generated apps are not signed. Due to GateKeeper, this means they will not run on macOS without prompting the user for approval. There are no plans to change this in the future.

You could always sign the Platypus binaries yourself, but it's a pain in the ass and beyond the scope of this document.

Can I pass arguments to a Platypus-generated app via the command line?

Yes. You can execute a Platypus-generated binary via the command line. Any arguments you provide will be passed on to your script. Take the following example:

# ./MyApp.app/Contents/MacOS/MyApp -arg1 -arg2
-

In this case, both -arg1 and -arg2 will be passed on as arguments to your script. This feature makes it possible to create protocol handlers for Firefox and other programs that invoke macOS application binaries directly.

+

In this case, both -arg1 and -arg2 will be passed on as arguments to your script. This feature makes it possible to create protocol handlers for Firefox and other programs that directly invoke macOS application binaries.

Where is the command line tool installed?

The Platypus command line tool install script creates the following files on your system:

/usr/local/bin/platypus                         Program binary
@@ -647,4 +651,4 @@ 

Can I cus

- + \ No newline at end of file diff --git a/README.md b/README.md index 57bf0218..7f7e2527 100644 --- a/README.md +++ b/README.md @@ -14,8 +14,8 @@ applications can be created with a few clicks. It is very easy to create installers, droplets, administrative applications, login items, status menu items, launchers and automations using Platypus. -* **[⇩ Download Platypus 5.2](http://sveinbjorn.org/files/software/platypus.zip)** -(Intel 64-bit, 10.8 or later, ~3.5 MB) +* **[⇩ Download Platypus 5.3](http://sveinbjorn.org/files/software/platypus.zip)** +(Intel 64-bit, 10.8 or later, ~3.3 MB) ## Features diff --git a/Sparkle/PlatypusAppcast.xml b/Sparkle/PlatypusAppcast.xml index 5c62d440..abdfae58 100644 --- a/Sparkle/PlatypusAppcast.xml +++ b/Sparkle/PlatypusAppcast.xml @@ -6,41 +6,32 @@ Most recent release list for Platypus, with links to updates. en - Version 5.2 - Fri, 03 Mar 2017 00:37:00 +0000 - - 10.7.0 + Version 5.3 + Sun, 25 Nov 2018 16:22:00 +0000 + + 10.8.0 Version 5.2 Changes +

Version 5.3

    -
  • Platypus apps can now register as URL scheme handlers and receive opened URLs as arguments to script
  • -
  • Platypus apps can now accept dragged URLs
  • -
  • Platypus apps that accept dropped files now have an Open Recent menu
  • -
  • New syntax to create submenus in Status Menu interface type
  • -
  • Relative paths are now supported in Platypus Profiles, but only through manual editing. Platypus app and CLT still generate Profiles with absolute paths.
  • -
  • Platypus now warns about about identical file names in bundled files
  • -
  • Droplet apps now quit when their window is closed
  • -
  • Updated and improved example profiles demonstrating new features
  • -
  • Text in Platypus apps now has a minimum font size
  • -
  • The Platypus Profile format has changed slightly in this version, but old formats can still be read
  • -
  • Fixed annoying issue where status menu would render before receiving all script output
  • -
  • Fixed performance issue with printing many lines to text window. It is now very fast again.
  • -
  • Fixed issue where loading certain Example profiles would cause Platypus to crash
  • -
  • Fixed bug where "Use as template" was shown when Status Item mode was "Text"
  • -
  • Fixed bug where command line tool failed to infer app name from script filename, resulting in "(null).app"
  • -
  • Fixed bug where files that had been moved were not colored red in Bundled Files list
  • -
  • Fixed bug where valid menu items were disabled in Action menu
  • -
  • Fixed issue with console spamming due to missing CFBundleTypeRole. Now always "Viewer".
  • -
  • Fixed bug where text settings were not properly loaded by the GUI
  • -
  • Fixed bug where bundling files with the -f flag didn't work in the command line tool
  • -
  • Fixed issue where status menu settings would not be restored to defaults on clear
  • -
  • Fixed bug where the command line tool would erroneously try to validate whole argument strings instead of individual UTI strings
  • -
  • Fixed bug where suffix editing buttons remained enabled when they shouldn't be
  • -
  • Got rid of text encoding settings. Platypus now uses UTF8 for everything, and you should too.
  • -
  • Got rid of "Secure bundled script" option, which was useless bullshit anyway
  • -
  • Fixed issue where main application window would not remember its last position
  • -
  • Updated documentation & man page
  • -
  • Various minor interface refinements
  • +
  • First facelift in a decade: New application icons created by Drífa Líftóra
  • +
  • Updated to support Mojave Dark Mode
  • +
  • Added AWK, JavaScript and Node interpreter presets
  • +
  • Added "REFRESH" command that clears text output buffer
  • +
  • Added "DISABLED" menu item syntax for status menu interface
  • +
  • Platypus and its command line tool binary are now code-signed. Generated applications remain unsigned, for obvious reasons
  • +
  • Windows of generated applications are now larger, and centered on first launch
  • +
  • Apps now try to make script executable (+x) on launch This may resolve certain issues with launching generated apps stored on network-mounted volumes
  • +
  • Added Open With menu for items in Bundled Files list
  • +
  • Fixed bug where Platypus would generate broken custom icns files from images
  • +
  • Fixed buggy Uniform Type Identifier validation in command line tool
  • +
  • Platypus now validates default bundle identifier in Preferences
  • +
  • Removed broken System Profiler example
  • +
  • Removed XML plist format feature
  • +
  • Documentation overhauled, partially rewritten and moved to Markdown format
  • +
  • An assortment of minor bug fixes
  • +
  • Various minor interface improvements
  • +
  • Reduced size of generated app binaries
  • +
  • Now requires macOS 10.8 or later
]]>