Suitcase alpha 4 has three changes, compatible version, improved parameter replacement and interpreter mode. It was also compiled with Xcode 11.5 GM and not the beta seeds.
Token Replacement in Parameter Arguments
Starting in alpha 4 --control-action-parameter
arguments can take control identifier tokens that are replaced with the controls value when the action is triggered. This lets you build up paths or combine multiple control values and use them as a single argument.
--control-title="Sign"
--control-type="button"
--control-group-identifier="sign.group"
--control-action="/usr/bin/codesign"
--control-action-parameter="-s,BD_SIGN_CREDS,-f,--options,runtime,{{BD_BUILD_DIR}}/{{BD_BUILD_CONFIG}}/Suitcase"
Added --compatibleVersion
Argument
This new argument allows a command to specify what version of Suitcase can run it. The compatible version arguments takes a string in the Semantic Versioning format.
Interpreter Mode 🥳
This is a big one. Suitcase can now be called from a script in a similar way to bash
or python
. Just start you script with this hash-bang,
#! /usr/local/bin/Suitcase interpreter
All arguments need to be on a single line and it supports comments using #
.
Here is the YouTube-DL Example using interpreter mode,
#! /usr/local/bin/Suitcase interpreter
# Drag and drop URLs to the floating window
# and download the embedded video stream using
# `youtube-dl`.
# Application
--name="Download YouTube"
--window-floating # The window will be infront of all others
# Dropped URL Control
--control-type="dropped-urls-label"
--control-title="## Drop Your URLs Here! ##"
# Download Button & Action
--control-title="Download"
--control-type="button"
--control-action="/usr/local/bin/youtube-dl"
--control-action-parameter="-o,~/Downloads/video.mp4,SUITCASE_DROPPED_URLS"