c0fc034c01570f77ef6d7cce103e3f09e71b7e14
[devwiki.git] / design / librarymacinstallerplan.mdwn
1 ##Plan Mac Installer for GSS EAP and SASL GS2 libraries
2 ###Introduction:
3 This document describes the intended behaviour of a Mac installer for the Moonshot GSS EAP and SASL GS2 libraries for Mac OS 10.6 (“Snow Leopard”) and 10.7 (“Lion”). It describes the intended locations of all installed files, system configuration modifications and any other pertinent information. It explains how it conforms to Apple’s relevant guidelines to developers.
4
5 ###Installer functionality:
6 Apple's Developer documentation (Ref. 1) states
7 > public frameworks should be installed at the local level in /Library/Frameworks.
8 Frameworks installed here are available to all users of the machine.
9
10 The installer will install the libraries listed below in a directory named Moonshot, a sub-directory of /Library/Frameworks on the main drive of the machine. The installer will create the Moonshot directory if it is not already present. (It may already be present because any shared libraries developed as part of the Moonshot UI / Identity Selector software will also be installed to this directory). The structure of the Moonshot directory is described below.
11  
12 If an installation with a lower version number is present, the new installation will be installed, and the /Versions/Current alias changed to refer to the new installation.
13
14 If an installation with a lower version number is present, the new installation will terminate with a message explaining why.
15
16 If an installation with the same version number as version being installed is present, a message is displayed to the User asking them to confirm whether the existing installation should be overwritten?
17
18 The User will not be able to configure the installation to install only some of the components.
19
20 The exact text to be used in messages displayed to the user will be specified as part of the implementation of the installer.
21
22 The appearance of the installer will not be customized to use special icons and window backgrounds.
23
24 ###Structure of the Moonshot directory tree.
25 The Moonshot directory will have the following sub-directory structure, allowing future versions to be installed without breaking applications that rely on an earlier version:
26
27     /Commands -> (alias to Versions/Current/bin)
28     /Headers -> (alias to Versions/Current/include)
29     /Home -> (alias to Versions/Current)
30     /Libraries -> (alias to Versions/Current/lib)
31     /Versions
32       /1.0.1
33       /1.0.2
34       ...
35       /3.1.2
36       /Current --> (alias to most recently installed version e.g /Versions/3.1.2)
37 Each numbered version sub-directory will have the necessary directories from the file system hierarchy e.g.
38
39     /bin
40     /etc
41     /include
42     /man
43     /etc
44     /lib
45     /sbin
46     /share
47       /doc
48       /xml
49     /var
50       /log
51
52 ###Deliverables:
53 An installer package (or packages) that, when run, will install the necessary files to the required places in the files system. (See Outstanding questions/issues 1)
54
55 A compressed disk image file containing the installer package(s), which can be mounted to run the installer package. (See Outstanding questions/issues 2)
56
57 Instructions and scripts for creating the installers and disk images from source. PackageMaker, (the tool provided by Apple to build installer packages - see Ref. 2) does not have a command line interface, and there do not appear to be any freely available alternatives which do, so it will probably not be possibly to automate the production of the installer package(s). 
58
59 ###Package and Component Properties
60 The Package properties will be 
61
62     Provider Identifier (Organization): org.janet.moonshot
63     Target OS (Minimum Target): Mac OS 10.6 Snow Leopard
64
65 For each component in the package, properties will be
66
67     Destination (To): The appropriate subdirectory of the /Library/Frameworks/Moonshot directory tree
68     Custom destination consent (Allow custom location): False.
69     Package identifier: org.janet.moonshot.xxxx (where xxx identifies the individual library)
70     Package version number: 1 for first release, incremented in future releases
71     Finalization action (Post-install): None
72     Administrator-authentication requirement (Require admin authorization): True
73     Relocatable: False
74     Downgradeable: False
75     No pre- or post-installation scripts are planned (but this may change during implementation)
76     The owner will be root and the group admin. The owner, group, and access permissions of the component files will be determined during implementation.
77 (See Ref.2 for an explanation of these properties)
78
79 ####Delivered components and files
80 The installer will install the following libraries  (See Outstanding questions/issues 3):
81
82 #####lib???
83 The lib??? component consists of the following files installed in the following locations:
84
85 <table border="0">
86 <tr>
87 <td>/bin</td> <td>list of files in /bin</td>
88 </tr>
89 <tr>
90 <td>/include</td> <td>list of files in /include</td>
91 </tr>
92 <tr>
93 <td>/lib</td><td>list of files in /lib</td>
94 </tr>
95 </table>
96
97 #####Dependencies
98 The installer will not include any dependencies which are present by default in the installed version Mac OS X.
99
100 For any dependencies which are not present by default in the installed version Mac OS X, the installer will install the needed versions in the /Library/Frameworks/Moonshot directory tree. It will not attempt to locate or use existing installations of these dependencies. This means that if such existing implementations are uninstalled in the future, the Moonshot libraries will not be broken. This decision has a cost in terms of disk space, but is justified because it a: decreases the complexity of the installation and b: protects the installation from potential failure.
101
102 ###Outstanding questions/issues:
103 1. One package each for "Snow Leopard" and "Lion", or a single package that works for both?
104 2. One disk image each for "Snow Leopard" and "Lion", or a single disk image containing both packages?
105 3. Which libraries, consisting of which files in which sub directories?
106
107 ###References:
108 1. [Mac OS X Developer Library, Framework Programming Guide, Installing Your Framework](https://developer.apple.com/library/mac/#documentation/MacOSX/Conceptual/BPFrameworks/Tasks/InstallingFrameworks.html#//apple_ref/doc/uid/20002261-BBCCFBJA)
109 2. [Mac OS X Developer Library, PackageMaker User Guide](https://developer.apple.com/library/mac/#documentation/DeveloperTools/Conceptual/PackageMakerUserGuide/)