1,852
edits
(→Homebrew: Strip outdated footnote.) |
|||
Line 93: | Line 93: | ||
== Create a launcher app with AppleScript == | == Create a launcher app with AppleScript == | ||
For example Homebrew installs Octave to {{Path|/usr/local/bin/octave}} by default. From the [https://support.apple.com/guide/terminal/open-or-quit-terminal-apd5265185d-f365-44cb-8b09-71a064a42125/mac Terminal] application you can enter the command <code>which octave</code> to find out the exact location. | |||
If you know the installation location, open the [https://support.apple.com/guide/script-editor Script Editor] application and write the following text in the editor window: | |||
do shell script "/usr/local/bin/octave --gui" | |||
if you wish to start the Octave GUI by default. If you want to start the Octave command-line interface (CLI), enter instead: | |||
tell application "Terminal" | tell application "Terminal" | ||
do script "/ | do script "/usr/local/bin/octave; exit" | ||
end tell | end tell | ||
or if Octave is in your default path: | |||
tell application "Terminal" | tell application "Terminal" | ||
Line 105: | Line 111: | ||
end tell | end tell | ||
Finally: | |||
* With a script open in the Script Editor app on your Mac, choose "File > Export". | |||
* In the menu that appears, select "Application" from the "File format" menu, then navigate to the "Applications" folder and save your script there as "Octave.app" | * In the menu that appears, select "Application" from the "File format" menu, then navigate to the "Applications" folder and save your script there as "Octave.app" | ||