Create a MacOS X App Bundle Using MacPorts: Difference between revisions

Line 57: Line 57:


===Create an Application Template for Octave===
===Create an Application Template for Octave===
Below, two methods are described for producing an application template for Octave. 
====Use Platypus to produce a template for the App bundle====
[[File:Platypus.png|350px|thumb|right|Initial Platypus Dialog (click to enlarge)]]
To creating an application bundle for MacOS X the utility, [http://sveinbjorn.org/platypus Platypus], is used.  Platypus is a developer tool for the Mac OS X operating system which is intended to create native Mac OS X applications from interpreted scripts such as shell scripts or Perl, Ruby and Python programs.
A shell script intended to launch a [http://en.wikipedia.org/wiki/Terminal_(OS_X) MacOS X Terminal] and run Octave will be used as the basis for the MacOS X App bundle.  The itemize list below describes how to produce an App bundle template for Octave.  Once this has been done, it the App bundle template must be populated with Octave and its dependencies.
* Run the Platypus application.
* Import Octave's [http://www.octave.org/wiki/index.php?title=File:Icon.png icon].
** The icon linked to above is a png with a transparent background.  This feature is needed to produce a MacOS X application icon.
** Using the icon linked to above the ''Icon Composer'' developers utility may be used to create a MacOS X icon. The Icon Composer is part of Xcode's developer's tools. Its home is {{Codeline|<nowiki>/Developer/Applications/Icon Composer.app</nowiki>}}
* Set the "Script Type" to "Shell"
* Specify the "Script Path".
** Click on the "Select" button and select the [[MacOS_X_App_Launcher_Script|App shell script]] used to launch the Terminal app.
* Set the "Output" to "None".
* Specify App Name (Octave-3.7.0+).
* Click the "Create" button.
* Save the App bundle template to the location of your choice.
====Use Apple's AppleScript Editor to produce a template for the App bundle====


[[File:AppleScriptEditor.png|350px|thumb|right|Initial Apple Script Editor Dialog (click to enlarge)]]
[[File:AppleScriptEditor.png|350px|thumb|right|Initial Apple Script Editor Dialog (click to enlarge)]]


The itemized instructions below describe how to create an application template
The itemized instructions below describe how to create an application template for Ocave using the AppleScript Editor.
for Ocave using an AppleScript.
* Run the "AppleScript Editor" and enter the script below.
* Run the "AppleScript Editor" and enter the script below.
  <nowiki># Run the octave shell script that has be bundled.
  <nowiki># Run the octave shell script that has be bundled.
364

edits