364
edits
No edit summary |
(Switch to using Platypus to create the app bundle's template) |
||
Line 37: | Line 37: | ||
* {{Codeline|<nowiki>sudo port mdmg <portname> @<version>+variant1+variant2</nowiki>}} | * {{Codeline|<nowiki>sudo port mdmg <portname> @<version>+variant1+variant2</nowiki>}} | ||
The DMG will be placed in | The DMG will be placed in the port's work directory. If a local portfile is used, a symbolic link to the work directory will be placed in the directory containing the portfile. | ||
== | ==Down load the Boilerplate from Savannah== | ||
* | * Resources/Applications/AquaTerm.app | ||
* Resources/bin/octave | |||
* Resources/script | |||
==Use Platypus to produce a template for the App bundle== | |||
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 setup and run Octave will be used as the basis for the MacOS X App bundle. | |||
# Run Platypus | |||
# Import Octave's Icon | |||
# Set the "Script Type" to "Shell" | |||
# Specify Script Path | |||
#* Click on the "Select" button and select the shell script used to launch the Terminal app, {{Codeline|<nowiki>script</nowiki>}} | |||
# Set "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. | |||
*#* {{Codeline|<nowiki>sudo mv /opt-save /opt</nowiki>}} | ==Copy the contents of the MacPorts DMG to the App bundle Template== | ||
<nowiki>#!/bin/sh | # Save the original MacPorts installation. | ||
#* {{Codeline|<nowiki>sudo mv /opt /opt-save</nowiki>}} | |||
# Install the DMG. This will create a new {{Codeline|<nowiki>/opt</nowiki>}} directory. | |||
# Move the the {{Codeline|<nowiki>/opt</nowiki>}} directory to the same location where {{Codeline|<nowiki>Boilerplate</nowiki>}} directory was placed. | |||
# Restore the MacPorts installation | |||
#* {{Codeline|<nowiki>sudo rm -r /opt</nowiki>}} | |||
#* {{Codeline|<nowiki>sudo mv /opt-save /opt</nowiki>}} | |||
==Populate the App bundle== | |||
Use the script below to copy the contents of the Boilerplate and opt/local into the App bundle. This script assumes the App bundle is named {{Codeline|<nowiki>Octave-3.7.0.app</nowiki>}}. | |||
<nowiki>#! /bin/sh | |||
VERSION=3.7.0 | VERSION=3.7.0 | ||
APP=Octave | APP=Octave | ||
FULLAPP="${APP}-${VERSION}.app" | FULLAPP="${APP}-${VERSION}.app" | ||
MACPORTS_PREFIX="./opt/local" | MACPORTS_PREFIX="./opt/local/" | ||
cp -pRf ${MACPORTS_PREFIX} ${FULLAPP}/Contents/Resources/. | |||
rm ${FULLAPP}/Contents/Resources/bin/octave | |||
cp -pRf Boilerplate/bin/ ${FULLAPP}/Contents/Resources/bin/. | |||
cp -pRf Boilerplate/Applications ${FULLAPP}/Contents/Resources/.</nowiki> | |||
cp -pRf Boilerplate/ | |||
=Problems and Restrictions of the App Bundle= | =Problems and Restrictions of the App Bundle= |
edits