This Howto will describe how to create packages with the Package Builder
Packages are zip files that contains a PHP application, with or without a 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 installation of Radria
You will need the following packages:
Once setup click on the Site Manager 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 step 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.
In the first step the wizard asks 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 and click Continue…
Skip this step if you don't 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.
Decide if you want to include the data in your package.
Then click Continue.
During the installation or transfer of a package you may need to install some configuration or setup files to enable an application run in the user project.
This is just an overview; for more details on the commands see radria_application_package.
You can run commands during 3 Events.
They are variables 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 useful the package manager provides access to environment variables:
http://www.yourdomain.com/webfusion/projectname//webfusion/projectname//home/sitecreator/projectname/ files. ../projectnameDuring the upload process a probe is sent to the live server to detect some of the remote server information.
All of the install variables are also available during the upload.
The installation commands are executed after the files are copied to the project folder.
For all the commands all the files path are relative to the project directory.
Will replace one string by another 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
Removes a file from the project
removefile phpwiki/config.php.dist
Creates a copy of an existing file
copyfile phpwiki/config.php.dist phpwiki/config.php
Merge 2 files into one, it concatenates the content of the first file and the second one into 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 that it makes it writable by everyone.
setwriteable imagegallery/uploads
From that package you can select which files should be uploaded when the project is uploaded to the production or testing server.
You can enter generic keywords like none that will not upload any files or all that will upload all the files. If only a set of files is relevant in the production application list the relative path of each of those files.
There is a special option in the FTP upload that will convert all the PHP files HTML files before uploading them. This is only for publishing basic web sites on web servers with no PHP capabilities.
To make your application appear in the SiteManager list of Tools (on the left box) you need to provide a relative URL. Optionally you can provide a label for the link and a second link if the application has a back end configuration area on a different URL.
If your application is a library or internal component you do not need to provide any URL.
Commands executed when the package is removed.
For now there are none.
If you want additional information on the packages you can check out the following articles: