Version references now automatically populated during package build workflow
[OSXPackageBuilder.git] / OS X Package Builder HOWTO.txt
1 INTRODUCTION
2
3 This document will guide you through the complete process necessary to create a Privoxy installer package (hereafter 'package') for any OS X version, starting from the Privoxy source code.
4
5
6 ASSUMPTIONS
7
8 1. That the Privoxy CVS project has been exported from Sourceforge to a folder named 'dist', pinned at whichever release you intend to build (as per the instructions in the developer manual).
9 2. That you have Xcode installed, including the SDKs for each OS X version you intend your package(s) to support.
10 3. That your build machine runs Snow Leopard (OS X 10.6). It will likely work equally well on Leopard or Lion (or later), but PackageMaker is substantially different in Tiger and earlier versions of OS X (even the project file format is different).
11 4. All references to files and folders in this document should be assumed to be within the OSXBuildSystem folder unless stated otherwise.
12
13
14 OVERVIEW OF STEPS
15
16 1. Build the privoxy binary
17 2. Construct the package contents hierarchy
18 3. Build the package
19
20
21 DETAILS
22
23 1. Build the privoxy binary
24
25 Use privoxy-create.sh (run via sudo) to create the privoxy group and user; these are a prerequisite for the build process.
26
27 Use build.sh to build a privoxy binary for the desired (range of) platform(s). The recommended usage is:
28
29 ./build.sh leopardupwards
30
31 which will build a Universal binary containing targets for PPC, i386 and x86_64 processor architectures that'll run on all Macintosh OS X versions from 10.5 (Leopard) and upwards.
32
33
34 2. Construct the package contents hierarchy
35
36 Use constructPkgContent.sh to build the hierarchy of folders and files necessary for building the package. This will construct a new folder named 'pkg content' and copy in the binary, documentation and supporting files.
37
38 Once this is done, the following file will need to be edited:
39
40 pkg resources/interface texts/ReadMe.txt
41 - this can be distilled from the README for the latest Privoxy project release
42
43
44 3. Build the package
45
46 Open OSX 10.5+.pmdoc in PackageMaker (OSX 10.4.pmdoc is supplied for Tiger since a different package format is required there). See the separate document "Packagemaker Instructions.txt" if you wish to create a package from scratch; otherwise only the following list of entries will need to be changed to match the Privoxy version you're working with (see Packagemaker Instructions.txt for more details about restrictions on the values you can set):
47
48 Distribution left-menu item>Configuration>Title
49 pkg content left-menu item>pkg content>Configuration>Package Identifier
50
51 You will then need to navigate to the following pane:
52
53 pkg content left-menu item>pkg content>Scripts
54
55 and drag and drop 'pkg resources/single-binary scripts' into the 'Scripts directory' entry box. This MUST be left as an 'absolute' path due to a bug in PackageMaker; if you select 'relative to project' then the scripts will not be found nor added to the package at build time.
56
57 Finally click the 'Build' button at screen top-left. The package filename is up to you but I recommend "Privoxy <version>.pkg", e.g. "Privoxy 3.0.19.pkg". For the down-level release I have used "Privoxy <version> OS X 10.4.mpkg"