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 4184 - (view) (download)

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

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