Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Annotation of /pages/trunk/local/osx-package-build.txt
ViewVC logotype

Annotation of /pages/trunk/local/osx-package-build.txt

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3785 - (view) (download)

1 : dbm 3701 Building OSX Installer Packages
2 :     -------------------------------
3 :    
4 : jhr 3785 These instructions should work for OS X 10.5 through 10.8, but have
5 : dbm 3701 only been tested on 10.7. Note that building on 10.7 requires that
6 :     /Developer/SDKs/MacOSX10.5.sdk be present, and this sdk is not present
7 : jhr 3785 by default in XCode 4.2+. (as of 110.75, we have removed this dependency).
8 : dbm 3701
9 :     Let $V be the version of SML/NJ for which we are creating a dmg file, let
10 :     $ROOT be the directory in which we start, and let $ARCH be the target
11 :     architecture (x86 or ppc).
12 :    
13 :     We also assume that a copy of the SML/NJ logo background image is
14 :     available (the file background.jpg). This file can be extracted from
15 :     an existing package, but in the future a copy will be found at
16 :     config/MacResources/background.jpg.]
17 :    
18 :     1) create a directory for the distribution
19 :    
20 :     mkdir smlnj-$V
21 :    
22 :     2) export the sources
23 :    
24 :     cd smlnj-$V
25 :     svn export https://smlnj-gforge.cs.uchicago.edu/svn/smlnj/config/trunk config
26 :    
27 :     3) build (this assumes that the tar files are already available for download)
28 :    
29 :     config/install.sh
30 :    
31 :     This will download the necessary compiler, library, and tools
32 :     sources (as determined by config/targets).and the boot.$ARCH-unix.tgz
33 :     tarball and build the bin and lib directories.
34 :    
35 : jhr 3785 [** as of 110.75, this paragraph no longer applies **]
36 : dbm 3701 Note that you may have to build the runtime by hand, depending on
37 :     where your version of the 10.5 SDK lives. Check if
38 :     /Developer/SDKs/MacOSX10.5.sdk exists; if necessary it can be
39 :     copied from an XCode 3.x directory if available. If building on
40 :     10.7 Lion, it is also possible to modify
41 :     base/runtime/objs/mk.x86-darwin to build a package that will only
42 :     work for Lion.
43 :    
44 :     4) Remove tar files
45 :    
46 :     rm *.tgz
47 :    
48 :     5) copy $V-README.html and license.html into smlnj-$V. The
49 :     $V-README.html file can be obtained from a working copy of
50 :     the $V files. license.html can be obtained from the smlnj.org
51 :     web site (or a working copy of the pages svn project).
52 :    
53 :    
54 :     5) Change owner and group of $V to root:wheel
55 :    
56 :     sudo chown -R root:wheel smlnj-$V
57 :    
58 :     This owner and group will be preserved by the installer.
59 :    
60 :    
61 :     PackageMaker Phase [assuming Version 3.0.5, included with XCode 4.2]
62 :     --------------------------------------------------------------------
63 :     [References: XCode internal documentation for PackageMaker, and a
64 :     legacy, out of date document titled "Software Delivery Guide".]
65 :    
66 :    
67 :     6) Launch the PackageMaker application
68 :     (/Developer/Applications/Utilities/PackageMaker).
69 :    
70 :     [Note: This procedure starts from scratch, not using an existing
71 :     PackageMaker document (e.g. smlnj-x86-110.73.pmdoc) from a previous
72 :     version.
73 :     It may be possible to automate steps 6, 7, and 8 as a shell
74 :     script. See the MLton distribution for an example.]
75 :    
76 :     a. Click the "Package" item at the top of the left-hand sidebar:
77 :     Configuration
78 :     Title Standard ML of New Jersey $V
79 :     User Sees Easy Install Only
80 :     Install Destination Volume selected by user
81 :     Certificate N/A
82 :     Description The Standard ML of New Jersey system for Mac OS X 10.5
83 :     or later, Intel [resp. PowerPC] architecture
84 :     Requirements - nothing
85 :     Actions - nothing
86 :    
87 :     b. Under the "Contents" header on the left-hand sidebar, click + at
88 :     the bottom of the side-bar. In the Open dialog window that pops
89 :     down, select the smlnj-$V directory, adding it to the
90 :     contents. The new item will be called "smlnj-110".
91 :    
92 :     * Select the outer item (probably named smlnj-110)
93 :     Choice:
94 :     Configuration
95 :     Choice Name smlnj-$V (modifies name of Contents item in
96 :     left side bar)
97 :     Identifier: org.smlnj.$V.$ARCH ($V = e.g. 110-74, not 110.74)
98 :     Initial State
99 :     Selected: checked (default)
100 :     Enabled: checked (default)
101 :     Hidden: not checked (default)
102 :     Destination /usr/local/smlnj-$V
103 :     Allow alternate volume: checked
104 :     Tooltip: SML/NJ 110.74 installer
105 :     Description: as above for "Package"
106 :     Requirements: empty (default)
107 :    
108 :     * Select the folder under the outer (smlnj-110.74) Contents item
109 :     Package: smlnj-110
110 :     Configuration
111 :     Install $ROOT/smlnj-$V
112 :     Destination /usr/local/smlnj-$V
113 :     Allow custom location checked
114 :     Package Identifier org.smlnj.$V.$ARCH.pkg
115 :     Package Version 1.0 [default]
116 :     Restart Action None [default]
117 :     Require admin authentication checked
118 :     Package Location Self-Contained [default]
119 :    
120 :     Contents: Verify that owner is set to root and group is wheel
121 :    
122 :     Components: Leave all unchecked.
123 :    
124 :     Scripts
125 :     Postinstall $ROOT/smlnj-$V/config/MacResources/postinstall
126 :     [Postupgrade $ROOT/smlnj-$V/config/MacResources/postupgrade]
127 :    
128 :     [Note: Postupgrade does not appear as an entry.]
129 :    
130 :    
131 :     7) Edit Interface: click on the Edit Interface icon in the upper right corner
132 :    
133 :     a) Drag background.jpg to first screen (or choose it by file name in Background
134 :     tap to the right). Unfortunately, there is not much control over scaling
135 :     and positioning of the image. Try Scaling: To-Fit.
136 :    
137 :     b) Click the Continue button to get to "Welcome Panel". Leave as Default.
138 :    
139 :     c) Click the Continue button to get to "Read Me". Select the readme file
140 :     $HOME/smlnj-$V/$V-README.html.
141 :    
142 :     d) Click the Continue button to get to "License". Select the license file
143 :     $HOME/smlnj-$V/license.html.
144 :    
145 :     e) Click the Continue button to get to "Conclusion". Leave as Default.
146 :     [Here we could add a notice about where the system has been installed.]
147 :    
148 :     f) Close the Interface Editor window.
149 :    
150 :    
151 :     8) Build the package by clicking the Build button in the tool bar at the top,
152 :     specifying the name (and location!) of the package file to be saved
153 :     (e.g. $ROOT/smlnj-$ARCH-$V.pkg).
154 :    
155 :    
156 :     9) Assuming that works, we can now build the DMG file
157 :    
158 :     hdiutil create -fs HFS+ -srcfolder smlnj-$ARCH-$V -volname smlnj-$V smlnj-$ARCH-$V.dmg
159 :     hdiutil internet-enable -yes smlnj-$ARCH-$V.dmg
160 :    
161 : jhr 3785 10) Pakage signing
162 :     http://developer.apple.com/library/mac/#documentation/ToolsLanguages/Conceptual/OSXWorkflowGuide/DistributingApplicationsOutside/DistributingApplicationsOutside.html
163 : dbm 3701
164 :     ----------------------------------------------------------------------
165 : jhr 3785 David MacQueen [02/01/12]
166 :     Updated by John Reppy [09/30/12]
167 :    

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0