Where does the Mac stub installer code reside?
The mac stub installer project resides at: <http://lxr.mozilla.org/seamonkey/sou...ll/wizard/mac/>
The mac stub installer source code resides at: <http://lxr.mozilla.org/seamonkey/sou...izard/mac/src/>
How do we get setup to debug the Mac installer?
- Build the mac installer (debug or non-debug target) using MIW.mcp
- Grab a nightly build, say from <http://ftp.mozilla.org/pub/mozilla/n...taller.sea.bin>
- Drop in the installer binary next to the "Mozilla Installer" in the "Mozilla Installer" folder created by unstuffing the opt build.
- Run the installer from the opt "Mozilla Installer" folder.
- Alternative to steps 3 and 4 copy the "Installer Modules" folder from the "Mozilla Installer" folder into the "macbuild" folder that contains the build debug or non-debug installer binary next to MIW.mcp. Copy the License and Readme from the "Mozilla Installer" folder" to the "macbuild" folder itself. Now run the built installer from the "macbuild" itself or by running it from the MIW.mcp CodeWarrior project.
How we get setup to debug the XPInstall engine from the mac installer?
Once you have the mac installer built and ready to debug you may want to debug the XPInstall engine in the context of the installer rather than in the context of the browser. To do this, in addition to the above steps to set up the mac installer to debug you will need to do the following:
- Create a file named xpcom.xpi with the shared libraries in the structure described under the [xpcom] section in: <http://lxr.mozilla.org/seamonkey/sou...ackages-mac#33>
- Note that if you are using the debug target of the installer binary all shared libraries are expected to have the name format
<libName>Debug.shlb
- Now set a break point at XPI_Init() in the mac installer code and step into xpistub and eventually the XPInstall engine will load including symbols so you can set a break point in the XPInstall engine itself.
How do I add an installer package to the Mac installer?
Adding a package involves a few steps:
- Add a section named for your <component> to the packages-mac manifest that describes which files from dist belong to which module. For example, see the xpcom section that lists all the shared libraries as seen in dist. These are eventually zipped with the directory structure preserved. Read the top of the packages-mac file for it's simple syntax and semantics.
- Add an <component>.jst install script template file (the jst extension stands for javascript template indicating this is a template for the final install.js for the <component>.xpi. Checkin the <component>.jst to the: <http://lxr.mozilla.org/seamonkey/sou.../packager/mac/> directory. Note that there are two macro strings in the .jsts:
-
$Version$
which is replaced at packages time with the browser version. -
$SpaceRequired$
which is replaced at package time with the amount of space in KB required for the package when it is fully extracted.
-
- Add a [ComponentX] section to the config.ini template file named config.ini_tmpl found at: <http://lxr.mozilla.org/seamonkey/sou...onfig.ini_tmpl>. Then add the ComponentX into the appropriate Setup Types so the installer module installs when users select the Setup Types you choose it to be in.
- Once you add the section to the packages-mac file the release automation will automatically generate an xpi for your module with a dummy install.js. If it finds your module's jst file it will substitute that for the install.js. And finally it will do the copying of files from dist per the directives in packages-mac if your module's section has some file entries. Unfortunately, at the time of this writing there is no convenient way to test an installer build like there is on unix (deliver.pl) and windows (build.pl).
Original Document Information
- Author(s): Samir Gehani
- Other Contributors: Curt Patrick
- Last Updated Date: March 12, 2003
- Copyright Information: Copyright (C) Samir Gehani, Curt Patrick