Text rewritten for better clarity
[OSXPackageBuilder.git] / Packagemaker Instructions.txt
1 Packagemaker instructions
2
3 The following gives raw information on what settings need to be edited when creating a new Privoxy package when starting from a new project in Packagemaker.
4
5 At the end of the document are some additional (very) useful notes.
6
7
8 Package Properties
9
10 Organisation is: org.ijbswa.privoxy
11 Minimum target depends on which release is being built.
12
13
14 Distribution Configuration
15
16 Title is, for example, Privoxy 3.0.19
17 User sees easy install only
18 Untick all 'Installation Destination' checkboxes to ensure root volume is selected by default (this will result in a warning when building package).
19 No Description (apparently this is only displayed on the Custom Install page)
20
21 N.B. I have chosen not to enforce installation to the boot volume only so as to allow more savvy users to install to a remote-connected Mac's root volume. If you'd prefer to enforce installation only to the target machine boot volume (thereby removing one installation step) you can check the 'System Volume' Installation Destination tickbox.
22
23
24 Distribution Requirements
25
26 Add a Target OS Version check, pass is true, OS X version depends on release being built. Make sure your target version is complete down to the minor version (e.g. 10.5.8 or 10.4.11).
27
28
29 Distibution Actions
30
31 Empty.
32
33
34 Edit Interface
35
36 Background is empty.
37 Copy and paste texts from file 'pkg texts' to the relevant entry box on the left (having selected the 'embedded' radio button on the right). The license can be a File reference to the file LICENSE in the directory containing Privoxy's source code (likely ../current or ../dist).
38
39
40 Pkg Content
41
42 Once the Privoxy build instructions have been completed and the 'prepare package content.sh' script has been run successfully, drag and drop the folder 'pkg content' into the Contents pane of Packagemaker.
43
44 No changes need be made to the Choice: pkg content Configuration or Requirements.
45
46 Click the pkg content folder icon on the left.
47
48 Package: pkg content Configuration
49
50 Destination is /
51 No custom location
52 The Package Identifier _MUST_ be in the form: 'org.ijbswa.privoxyX.Y.ZZ.pkg' where X.Y.ZZ is the release version (e.g. 3.0.19). This is important since the uninstall.command script is populated with this name by a separate process.
53 Package Version is irrelevant.
54 Restart Action: None
55 Require admin authentication should be ticked.
56 Open the Package Flags window (Package>Package Flags...) and tick Discard Resource Forks.
57
58 Package: pkg content Content
59
60 Highlight 'pkg content' then change the owner to 'root' and the group to 'wheel'. Click 'Apply Recommendations' to set the owner, group and perms of all the files within. The folders and files within /Library need to be manually tweaked to remove the group write permission.
61
62 Package: pkg content Scripts
63
64 Drag and drop the scripts folder to the 'Scripts directory' entry field and set 'absolute' in the cog drop-down to the right of the entry field. Note that there is a bug in PackageMaker such that if you select 'relative to project' then the scripts will not be found nor added to your package at build time.
65
66
67
68 Useful Notes about PackageMaker
69
70 The scripts directory contains two scripts (pre- and post- install), each of which do all that is necessary regardless of whether Privoxy is being installed fresh or over the top of an existing installation.
71
72 Each script has an additional hard link (pre- and post- upgrade). In 10.5+ the upgrade scripts are unused, but for 10.4- the existing installation may be detected and in this case the Installer will look for pre- and post- upgrade scripts in the installation package.
73
74 PackageMaker will bundle _all_ files in your 'pkg content' folder regardless of whether they are listed in your PackageMaker project's Contents pane or not. It is however mandatory that you set the intended ownership and permissions of the installation files, which means that whenever you wish to add or remove a file from the 'pkg content' folder you are forced to delete and re-drag-drop the pkg content element inside your PackageMaker project. Each time you do this you must re-correct the Package Identifier (hence copy it before deleting the element), re-tick 'Discard Resource Forks' in the Package Flags window, then reset the owner and group and Apply Recommendations.
75
76 Apply Recommendations can make mistakes - most notably it will incorrectly give group write permission to LaunchDaemon and StartupItem files and folders. You must untick this box on all those items or else Privoxy will not start when the target machine is booted (and a scary-sounding warning message is displayed). It will however only make these mistakes if the items are NOT present on your build machine when the button is clicked.