This Howto will describe how to create packages. Packages are zip files that contains a PHP application, with or without database ( MySQL / PostgreSQL ) or a web site design.
Once built the package can be made available to others for download or you can publish it on a package repository for a 1 click installation.
To create packages you will need a working SiteManager. You can use DragDrop Sitecreator, WebFusion Studio or PAS, they all come with SiteManager.
You will need the following packages:
Once setup click on the Site Manager tab to open the SiteManager and create a new project or open the project where you have the application or web site design you want to package.
In the Package manager install the Content Administration and Package Builder package.
Click on the Options tab, then select Software install / upgrade .
In the Package manager install the Content Administration and Package Builder package.
The package builder is a 5 steps wizard in the Content Administration to create packages with no technical knowledge.
Log into the Content Admin, the default username / password is admin / sqlfusion. In the left menu, select Create Package.
The first step of the wizard will ask you the name of the package and its version.
_ are ok_. The Package version needs to be with Package Name: phpxplorer_0.9.32 Package Version: 0.5
Select the files you want to add to your package.
Check the check box on the left of each file you want to include in the package an click Continue...
This step will be skip if you dont have a database setup on your project.
Select the Tables you want to add in the Package. You may use CTRL to select multiple tables.
Then choose if you want to also include the data in your package.
Then click Continue
During installation or transfer of a package you may need to setup some configuration files or setup file to make an application run in the user project.
You can run commands during 3 Events.
They are variable taken from the PHP $_ENV or $_SERVER or from the setup. You can use them when executing the commands, to setup configuration files or setup default accounts.
To make the commands usefull the package manager as access to environmnet variables:
http://www.yourdomain.com/webfusion/projectname//webfusion/projectname//home/sitecreator/projectname/ files. ../projectname../projectnamewebfusion/projectname//webfusion/projectname/http://www.yourdomain.com/webfusion/projectname//home/sitecreator/projectname/During the upload process a prob is sent to the live server to detect some of the remote server informations. All the install variables are also available during the upload.
The installation commands are executed after the files are copied in the project folder.
For all the commands all the files path are relative to the project directory.
Will replace a string by an other in a file.
replace forums/config.php @databasehost [server]
This example will replace the string @databasehost with the database server hostname in the forums/config.php file.
Run an sql query in the project database.
sqlquery "UPDATE phpbb_config SET config_value = '[server_name]' WHERE config_name = 'server_name'"
This example will set the server name in the phpbb_config table using an sql query.
Creates a directory, the directory path is relative to the project directory.
mkdir dokuwiki/data/cache mkdir dokuwiki/data/meta
Will just remove a file from the project
removefile phpwiki/config.php.dist
will create a copy of an existing file
copyfile phpwiki/config.php.dist phpwiki/config.php
Merge 2 files in one, it concatenate the content of the first file and the second one in the third one.
mergefile file1 file2 finalfile3
When the web site or application is uploaded over FTP during the synchronization a set of commands can also be executed.
The sqlquery and replace work the same way as the Install commands.
This will set a chmod 0777 on the remote file, meaning making it writable by everyone.
setwriteable imagegallery/uploads
Commands executed when the package is removed. For now there is none.