How to Create a Mac OS Disk Image (*.dmg) SeaDAS Installer File - seadas/seadas-toolbox GitHub Wiki
These are instructions on how to create a Mac OS disk image '.dmg' file which will run the SeaDAS installer script file.
1. Create Empty 'installer' Directory
In a terminal window, create an empty directory. For this example, we'll call the directory 'installer', but the actual name doesn't matter.
mkdir installer
2. Put SeaDAS Installer Script File into 'installer' Directory
Put the installer 'seadas_[VERSION]_mac_aarch64_installer.sh' file inside the empty 'installer' directory.
Note: the 'installer' directory needs to contain only the installer file 'seadas_[VERSION]_mac_aarch64_installer.sh' and no other files.
3. Go to 'installer' Directory
At terminal window, 'cd' into the empty directory which contains the installer 'seadas_[VERSION]_mac_aarch64_installer.sh' file.
cd installer
4. Remove Installer Script File's Extension
Rename 'seadas_[VERSION]_mac_aarch64_installer.sh' file removing the 'sh' extension.
mv seadas_11.0.0_mac_aarch64_installer.sh seadas_11.0.0_mac_aarch64_installer
5. Make Installer Script File Executable
Change permissions on the installer to make it executable.
chmod +x seadas_11.0.0_mac_aarch64_installer
6. Create Application '.app' Directory
Create directory for the Mac app. This directory name must precisely match the installer script file name with the extension '.app' added to it.
mkdir seadas_11.0.0_mac_aarch64_installer.app
7. Move Installer Executable into App Directory
Move the intaller executable file into the '.app' directory. This should now be a working SeaDAS application.
mv seadas_11.0.0_mac_aarch64_installer seadas_11.0.0_mac_aarch64_installer.app
8. Download the SeaDAS Icon Image to App Directory
Download the SeaDAS 'seadas_icon.icns' icon image file. Place it anywhere on your computer, but NOT in the directories created in this example.
SeaDAS application image file is available here: seadas_icon.icns
9. Copy SeaDAS Icon Image to Clipboard
In a Finder window, left-click on the downloaded file 'seadas_icon.icns' and with keyboard do 'control-C' to copy it to the clipboard.
10. Paste SeaDAS Icon Image onto Application File
Still in a Finder window, right-click on the 'seadas_[VERSION]_mac_aarch64_installer.app' file, then select "Get Info". In the window which opens, at the top left, left-click on default icon. Then do 'control-V' to paste the SeaDAS icon.
It should now look like this:
11.0 Create the Disk Image '*.dmg' File
In the terminal, still in the 'installer' directory run:
hdiutil create -volname seadas_10.0.0_mac_aarch64_installer.app -srcfolder . -ov -format UDZO seadas_10.0.0_mac_aarch64_installer.dmg
12.0 Test the Disk Image File
The SeaDAS '.dmg' is now created. Test the disk image installer file by double-clicking on it to make sure it works correctly.