Home

Awesome

Cruiser

FOSSA Status

Cruiser is a tool to package Pharo applications. The idea is to quickly convert an application in a development environment to a production one. A production environment means:

Slides from ESUG 18 there: https://www.slideshare.net/esug/cruiser-a-tool-to-package-pharo-applications

How to install

On a latest Pharo 7 image, clone the repository in Iceberg and load the baseline of Cruiser.

How to deploy you own application

Some default options are defined but you have to add some informations to deploy you own application. To do that, you first need to fill this code template with informations concerning you application:

openAppDeploymentSettingsOn: aBuilder
	<deploymentsettings>
	(aBuilder deployment: #gameCollectorApp)
		label: 'My App';
		description: 'My super cool app to deploy!';
		actionTarget: [ MyAppClass ];
		actionTargetSelector: #openMyApp;
		order: 100;
		parent: #finalizing 

actionTargetSelector is the selector that will be executed on the result of the actionTarget block. As the actions are made on a other image, it is important that the actionTarget block do not contains any reference to its outside context, e.g. self, temporary or instance variables, globals, etc....

Once your application configured to be used with Cruiser, open the GUI through the World menu, Tools >> Cruiser (Shortcut: CTRL + C + O). Then, configure the options you want for your deployed image, and click on execute. All the operations will be executed and you will be able to find the packaged image on the folder you indicated.

Features

The application packaging is highly customizable. The actions are split in 5 groups:

Any action or group of actions can be activated or deactivated by clicking on the associated checkbox.

The actions in the two first actions groups are executed in the current image. The others are executed remotely on the created deployment image.

Adding New Actions

You can define your own features for you project in creating a method with one parameter which is the deployment settings builder and with the pragma deploymentsettings. You can create groups of actions, e.g. (exhaustive examples):

	(aBuilder deploymentGroup: #readOnly)
		label: 'Make the image read only';
		description: 'Deactivate all the reads and writes on the disk';
		order: 100;
		parent: #cleaning.

or only one with some variables:

	(aBuilder deployment: #readOnlyCleaning)
		label: 'Clean the image folder';
		description: 'Remove the .changes, .sources, and the pharo-local folder';
		actionTarget: [ CRDeploymentSettings ];
		actionTargetSelector: #deploymentFolder:;
		order: 100;
		parent: #readOnly
		with: [ (aBuilder deploymentAttribute: #deploymentFolder)
			order: 0;
			type: #Directory;
			isRelative: false;
			label: 'Path':
			description: 'The path of the folder where the application will be deployed';
			default: #projectName;
			defaultIsDeploymentVariable: true;
		]

The parent action must be not empty and inherits of one of the 5 groups defined above.

Descriptions of the selectors (exhaustive list - mandatory item are bold):

Developement

Internals

Cruiser is based on the Pharo settings engine. It uses another pragma to defines the deployment actions. Some main class highlights:

New selectors should be implemented in SettingNodeBuilder and in CRDeploymentDeclaration, CRDeploymentGroupDeclaration, or CRDeploymentParameterDeclaration.

Features Ideas

Known issues

License

FOSSA Status