Total Pageviews

Tuesday, 22 March 2022

利用platypus从命令行脚本创建mac程序

Platypus is a developer tool that creates native Mac applications from command line scripts such as shell scripts or Python, Perl, Ruby, Tcl, JavaScript and PHP programs. This is done by wrapping the script in a macOS application bundle along with an app binary that runs the script.

Platypus makes it easy to share scripts and programs with people who are unfamiliar with the command line interface. Native, user-friendly 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.

Features

  • Supports shell scripts, Python, Perl, Ruby, PHP, Swift, Expect, Tcl, AWK, JavaScript, AppleScript or any other user-specified interpreter
  • Apps can display graphical feedback of script execution as progress bar, text window with script output, droplet, WebKit HTML rendering or status item menu
  • Apps support receiving dragged and dropped files or text snippets, which are then passed to the script as arguments
  • Apps can execute scripts with root privileges via the macOS Security Framework
  • Apps can register as handlers for URI schemes and send user notifications
  • Apps can be configured to run in the background (LSUIElement)
  • Set own application icon or select from presets
  • Set app's associated file types, identifier, version, author, etc.
  • Graphical interface for bundling support files with the script
  • Command line tool for automation and build process integration
  • "Profiles" can be used to save app configurations
  • Built-in script editor, or linking with external editor of choice
  • Extensive documentation and many built-in examples to help you get started
  • Fast, responsive native app written in Objective-C/Cocoa

Download

The latest version is Platypus 5.3, released on November 25th, 2018. Platypus and Platypus-generated applications require macOS 10.8 or later, and are 64-bit Intel binaries. The main Platypus application is Apple Developer ID signed.

Platypus can also be installed via Homebrew (may not be latest version):

$ brew install --cask platypus

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 PowerPC, you can use version 4.4.


Screenshots

Platypus Window

Platypus lets you select one of several different user interfaces for your script.

from http://www.sveinbjorn.org/platypus

No comments:

Post a Comment