Building a Release

In the discussion below, we use $VERSION to represent the release version in question (e.g., 110.82), $ARCH to represent the host architecture (e.g., x86), and $OS to represent the host operating system (e.g., unix).

The main steps in building a release are as follows:

Following are specific instructions for building a SML/NJ release, organized by operating system (Unix/Linux, macOS, Windows).

Building on Unix (including Linux)

Note: the script admin/prepare-release.sh will do steps 1–10.

  1. Update current copy, or check out a fresh copy:

  2. Compile to fixed point:

    This script will produce two directories: sml.boot.$ARCH-$OS and sml.bin.$ARCH-$OS.

    Note: prior to 110.79, the fixpt script left the result in directories that were indexed by iteration (e.g., sml2.bin.x86-unix). Use the "-save" option to the fixpt command to force the old behavior.

  3. Generate new library and heap files.

  4. Test the build.

  5. Install the new code (the "-clean flag removes the old libraies and heap images).

  6. Build a working installation.

  7. Update the version and releasedate files in the config directory.

  8. Build to another fixed point in base/system.

  9. Repeat steps 3 through 6 above.

  10. Cross compile and generate tarballs for the bin files:

    The allcross script will cross compile for all targets and produce gzipped tar files (e.g., boot.x86-uniz.tgz).

  11. Edit/update the history file.

  12. Tag the release.

  13. Update web pages.

  14. Create source tarballs:

  15. Copy documentation into the release directory.

    Note: an alternative approach is to copy these files into a working copy of the web-pages svn repository, add and commit them, and then do an svn update on linux.cs.uchicago.edu.

  16. Copy source tarballs into the release directory.

    Once the files have been copied, you should ssh into linux.cs.uchicago.edu and check the file permissions, which should be "rw-rw-r--."

  17. Create DMG files for Mac (See below).
  18. Create MSI files for Windows (See below).
  19. Sanity checks:
  20. Update links:

Building a OS X package and dmg

There is an automated script for building a signed installer for macOS (née Mac OS X). First check out from svn:

$ svn co https://smlnj-gforge.cs.uchicago.edu/svn/smlnj/osx-dist
$ cd osx-dist

The command

$ ./build-pkg.sh $VERSION

will build the signed installer package file smlnj-x86-$VERSION.pkg. To build the AMD64 installer (smlnj-amd64-$VERSION.pkg), use the -64 option when running build-pkg.sh. This script assumes that the distribution files have already been uploaded to the standard distribution site (Step 15 above) and that the targets file is initialized correctly.

The signing of the package depends on the user having the correct developer certificate. The script currently knows about John Reppy's cert, but the script can be generalized by adding other user IDs.

Instructions for older versions of the installation process can be found in the document osx-package-build.txt.

Once the installer is built, it needs to be copied to the release directory (do not forget to check permissions once the file is copied!).

where $ARCH is either x86 or amd64.

Building a Windows installer (MSI)

Steps preceded by [cygwin] are performed in the cygwin shell.
Steps preceded by [vc++] are performed in the Visual C++ command prompt.

  1. Install cygwin (32-bit version)

  2. Install Visual Studio (or Visual Studio Community)

  3. [cygwin] create a directory to build a release. This directory path must not contain a number or spaces.
    (in my case: /home/jhr/Work/smlnj/release or c:\cygwin\home\jhr\Work\smlnj\release)

  4. [cygwin] in /home/jhr/Work/smlnj directory,
    • $ mkdir gf
    • $ export gf=https://smlnj-gforge.cs.uchicago.edu/svn
    • $ export smlnj=$gf/smlnj
    • $ export VERSION=xxx.yy
    • $ export release_dir=linux.cs.uchicago.edu:/stage/web_static/smlnj/htdocs/dist/working/$VERSION

  5. [cygwin] Fetch and unbundle the config.tgz file.
    • $ curl -O https://smlnj.org/dist/working/$VERSION/config.tgz
    • $ tar -xzf config.tgz
  6. [cygwin] Prepare the files for building the Windows version.
    • $ config/prepare-win-install.sh
  7. [vs] set SMLNJ_HOME=C:\cygwin\home\jhr\Work\smlnj\release
    Define SMLNJ_HOME variable.

  8. [vs] chdir %SMLNJ_HOME%

  9. [vs] config\install.bat

  10. [vs] config\WinSetup\buildSetup.bat
    The file smlnj.msi produced is the final installer for Windows. This script uses the WiX Toolset for building the installer.
  11. [cygwin] $ scp smlnj.msi $release_dir/smlnj-$VERSION.msi
    Copy the MSI file to the distribution directory; we add a $VERSION tag so that folks can keep multiple downloads distinct.
    Remember to check the file permissions on the server after you copy the file.

Last modified: March 31, 2020