Skip to content

Release MacOS Quick

Tom Mitchell edited this page Mar 2, 2017 · 4 revisions

Building Omni Release for MacOS

This page documents building a MacOS release of Omni in an environment that has been set up to do so (per instructions here), as on the dedicated GCF release laptop.

Laptop Login Details

User: GENI

Password: geni

Ensure PATH and PYTHONPATH Are Set

(This is already done on the release Mac.)

See instructions

Have the Correct gcf Version

See instructions

Consider doing something like:

  • In Settings, turn on Sharing of folders
  • Copy a release Tarball over
  • tar xfz
  • rm gcf (a link)
  • ln -s gcf-xxx gcf
  • Then copy in ~/mac_install into the appropriate spot in that untarred release tarball
    • cd gcf/mac_install
    • cp ~/mac_install/*.png .
    • Make sure addAliases.command is executable: chmod a+x ./addAliases.command

Note: I have also turned on SSHing into that laptop for our convenience.

Create the omniTools/omniTools-2.6 Directory

See instructions

  • mkdir -p ~/omniTools/omniTools-2.6
  • Change the icon for the inner omniTools-2.6 to OmniGraphic.png per the instructions on the other page

Note that the top level directory should not have the name we want for the final release / volume name. Also note that makeMacdmg.sh encodes this directory name, and must match. To make it simple, we name the top-level directory simply omniTools

Run mac_install/makeMacdmg.sh from the gcf/src Directory

This builds the Applications.

  • cd gcf\src
  • Ensure the script is executable:chmod u+x ..\mac_install\makeMacdmg.sh
  • ..\mac_install\makeMacdmg.sh

Lots of stuff will print out.

Build the Disk Image

2 ways to do this:

  1. Use iDMG: Simpler, but seems to fail often
  2. Use Apple Disk Utility: More manual steps, but seems to work more reliably

Option 1: Do the iDMG steps

See instructions

It is important to name the Volume to be the final targeted name. This allows a simple renaming of the .dmg after the bundle has been verified as a valid release.

  • Open iDMG (under Applications)
  • Window -> Inspector
  • In 1st tab, click checkbox next to 'Volume Name' and enter a new name: "omniTools-2.7" (no RC)
  • Change Format to "Read and Write" (may already be set like that)
  • Close Inspector
  • Drag "~/omniTools" folder to iDMG. It will create omniTools-2.7.dmg file.
  • Open the .dmg to mount it. Open the mounted device in Finder.
  • It may be auto mounted
  • Cmd+J
  • Under 'Background', pick 'Picture'.
  • Browse to mac_install\background and drag it to the picture
  • Close the info window
  • Re-organize files in finder as you wish
    • Put .app to left of green arrow and Applications to right
    • Put INSTALL and LICENSE one above the other on right
    • Resize window
  • Hide window toolbar:
  • Note: This may already be done
  • Go to menu View → Hide Toolbar
  • Close your Finder
  • Find your mounted device at the desktop
  • Right click it and choose “Eject”.
  • Convert dmg to read-only
  • Open terminal
  • cd to folder containing the .dmg
  • hdiutil convert -format UDZO -o omniTools-2.5_ready.dmg omniTools-2.5.dmg

Option 2: Use Disk Utility

  • Applications -> Utilities -> Disk Utility
  • File -> New -> Disk Image from Folder
  • Select the top level omniTools folder
  • Save the image as omniTools-2.7-mac-rc1-try1 (or whatever)
  • Change "Image Format" to "read+write"
  • If it fails with "Resource Busy", try closing all other apps and windows, empty the trash, and try again
  • Double click the .dmg name to mount the disk
  • Rename the mounted volume to remove the "-rc1" bit
  • Open the volume in finder
  • Open a new finder window and navigate to the omniTools-2.7 folder within the mounted volume, so you can see background.png
  • Select the volume and hit Cmd-J
  • Towards the bottom of that window, change Background from White to Picture
  • Select background.png from the other finder window and drag that to the space shown
  • Close that info window
  • Re-organize the new finder window with a background, so omniTools-2.7 is to left of the arrow and Applications to the right, and the 2 .TXT files are one above the other. Then resize the window to fit well.
  • Close the finder and info windows
  • In Disk Utility, select the Dmg
  • Click 'Convert'
  • Image Format -> compressed
  • Click OK to replace the existing .dmg
  • Click the .dmg and select Open
  • Confirm it comes up with the background, re-organized. Confirm also the image is read-only by trying to change the layout of the icons
  • Close Disk Utility

Final Steps

  • Test dmg
  • Open
  • Test install by dragging !OmniTools to Applications
  • Follow the install instructions and confirm that stitcher -h works at the very least
  • Un-install
  • In finder, drag omniTools to the trash
  • Eject omniTools dmg
  • Rename dmg to something like omniTools-2.7-mac-rc1.dmg