Packaging Mac

From emergent
Jump to: navigation, search
Emergent Logo
Installing and Building Emergent
  • Build from source (expert)

Steps for Packaging on Mac.

Making the core emergent package

There are two separate packaging steps: emergent itself, and then all the dependencies. Try to keep the depends the same!

Before packaging:

  • update and run the script to generate change logs from svn commit messages.
  • if the year has changed, run emergent --copyrightify in a src directory (cd src/temt/ta_core first)

very important: need to build with proper command flags for given OSX version, and remove the "native" options that may not work for all CPU's

export CXXFLAGS=-mmacosx-version-min=10.10
export CFLAGS=-mmacosx-version-min=10.10
./configure qt5 webkit not-native
cd build
sudo /bin/rm -rf /usr/local/share/Emergent
sudo make install
sudo chown oreilly install_manifest.txt   # this gets owned by root during install
make package

It makes a full dmg with the version name. Typically need to add the cpu version (64), in copying up to grey ftp.

Also, don't forget to make a tag of the release (see Subversion admin):

svn copy -r REVISION

Packaging dependencies

All the code is in Subversion under install_mac_app, using pkgbuild tool in bash scripts:         # makes a .dmg file from a directory     # makes a .dmg file from a .pkg file

# specific packages:       # we make our own because the current package is just a "copy to Applications" kind of thing   # includes ode, gsl, jpeg, sndfile         # don't use regularly -- misc_libs instead          # we make our to put in a specific, known dir (qt installer defaults to home, and requries reg)

The magic install script is in emergent_install_mac_deps -- edit the .sh file in there to specify the proper names of the .dmg files on the ftp site to download.

To package the install script, just do: emergent_install_mac_deps
cp emergent_install_mac_deps.dmg emergent_install_mac_deps-<version>.dmg

and then copy that up to grey

use /Applications/Utilities/ScriptEditor to edit the .app itself

OLD packaging script

OLD: This is when everything was one big package -- could potentially revive that script tho..

Run the following commands to make the packages:

svn co ~/package
cd ~/package
  • The script does all the compilation and packaging and scp's the packages to your home directory on grey.
  • It also creates an svn tag linking the svn revision to the build version number.
  • To make a 32-bit build, a 32-bit VM is necessary. Follow all above steps, and make sure to enter 32 instead of the default 64 when the build script prompts.