Building a project is the operation that creates the distribution and/or raw packages on disk. Once you have properly configured your project, this is probably the operation you will perform most often later on.
When you build a project from the Packages application, you can follow the progression of the build operation through the build window.
The build window will let you know if a build is successful or failed. If the build fails, it will try to explain the origin of the failure.
Notes:
|
To build a project:
▪ | Choose Build > Build. |
To build a project and open it with Installer
:
▪ | Choose Build > Build and Run. |
To display or hide the build window:
▪ | Choose Build > Build Results. |
Sometimes you just need to quickly build a raw package to distribute a component through Apple Remote Desktop
. The Quick Build feature of Packages is made for that.
This feature supports the following types of components:
During the build phase of a Quick Build, the build window will not be displayed. A bezel window will inform you instead of the status of the build process.
Notes:
|
To build a raw package for a supported component with the Quick Build feature:
1 | Select the component in the Finder. |
2 | Drag and drop the component on the application icon in the Finder or in the Dock . |
The debug mode lets you build a distribution or raw package and disable bundle locators.
You may want to do that if your distribution or raw package contains bundles that have locators attached to them and you want to simulate a clean install.
Notes:
|
To build a project in debug mode and open it in Installer
:
▪ | Choose Build > Build and Debug. |
If you need to integrate the creation of a distribution or package into an automated workflow, you can use the packagesbuild
tool.
It is located in /usr/local/bin
and the only mandatory argument is the path of the Packages project to build. With the optional arguments, you can build a project in debug mode, change the reference folder or temporary build location.
packagesbuild
returns 0 if the project is built successfully, otherwise a non-zero value.
Notes:
|
To build a project with the command line tool:
1 | Open the Terminal application. | ||
2 | Type the following command and validate with Return:
|
To build a project in verbose mode:
1 | Open the Terminal application. | ||
2 | Type the following command and validate with Return:
|
To build a project in debug mode:
1 | Open the Terminal application. | ||
2 | Type the following command and validate with Return:
|
To build a project with a specific reference folder:
1 | Open the Terminal application. | ||
2 | Type the following command and validate with Return:
|
By default, Packages uses the /private/folder to build the various components of a project before assembling them in the build folder.
To build a project in a specific temporary build location:
1 | Open the Terminal application. | ||
2 | Type the following command and validate with Return:
|
Cleaning a build will remove the distribution and packages files and bundles built by Packages on disk. The difference between cleaning a build and deleting the build folder is that a cleaning will only remove the files and folders that are to be removed.
To clean a build:
1 | Choose Build > Clean |
2 | Click Clean. |
By default, when you try to build a project which has been modified but not saved yet, Packages will ask you whether you want to save the project before building.
To change the behavior upon building unsaved projects:
1 | Choose Packages > Preferences |
2 | Click Building. |
3 | Choose the behavior from the Unsaved project pop-up menu. |
By default, when you build a project, Packages always display the build window and it stays displayed after the build finished.
To change the build window behavior:
1 | Choose Packages > Preferences |
2 | Click Building. |
3 | Choose the behaviors from the Show during builds and Hide after builds pop-up menus. |
By default, when you build a project, the only feedback you get regarding the success of the operation is a visual one. Packages can also play a sound on success or failure of the build operation.
To change the sound played upon build success or failure:
1 | Choose Packages > Preferences |
2 | Click Building. |
3 | Choose the sound to play from the Play a sound on success and Play a sound on errors pop-up menus. |
By default, packages made through Quick Build have their version set to 1.0.
To set Quick Build packages to use the version of the bundle component in the payload:
1 | Choose Packages > Preferences |
2 | Click Building. |
3 | Click the Use bundle version checkbox. |
Packages made through Quick Build are saved in the same folder as the original bundle of their payload. If this folder is not writable by the current user, by default the package is created in the current user's home directory.
To change Quick Build failover folder:
1 | Choose Packages > Preferences |
2 | Click Building. |
3 | Choose Choose from the Failover folder pop-up menu. |
4 | Select the folder that should be used as a failover folder. |
5 | Click Choose. |
By default, projects are built in the /private/tmp/
folder.
To change the temporary build path:
1 | Choose Packages > Preferences |
2 | Click Building. |
3 | Click Choose |
4 | Select the folder that should be used for temporary build. |
5 | Click Choose. |
Revision History | ||||
|