logo-radria.gif
   
Blog Download Documentation Forum Tasks Home
Blog Download Documentation Forum Tasks Home
barside-right.gif
barside-left.gif
logo-sql.gif





 

Package format

Packages are zip files containing all the files with an XML package description and install and uninstall .sql files with the SQL statements to setup and remove the database tables.

The information below is for reference only. If you want more specific information check the following articles:

Package description file

The package description file contains the following tags :

  • name: Full name of the package
  • version: Version of the package using the format : minorversion.majorversion, ex : 3.04
  • description: Text to describe the package and its uses.
  • depname: Names of other packages that this package depends on.
  • suggest_package: Packages that are suggested that you install with this one.
  • conflict_package: Packages that conflict with the current package.
  • files: List of all the files in the package, with one file per line. The files must include their directory from the root of the application.
  • sqlinstall:(optional) Name of a file with sql statements that need to be executed at time of installation of the package. All of the sql * statements must be separated with a double semi-colon : “;;”
  • sqlremove:(optional) Name of a file with sql statements to be executed when the package is removed. For example, you will want to drop any tables that the package created.
  • commandinstall: Shell commands that will be executed at installation.
  • commandremove: Shell commands that will be executed when the package is removed.
  • Parameter: Extra parameters for the package installer.
  • htmlupload: List of files to upload during the FTP transfer if the site is only an HTML site, also none and all keywords can be used.
  • phpupload: List of files to upload during the FTP transfer when the site is a PHP application or site. Keywords all and none to upload all the files or none of them.
  • starturl: Relative url of where to start using the application. Leave empty if none.
  • starturllabel: Label to display for the link to start the application.
  • startadminurl: Relative url to the administration or backend section of the application.
  • startadminurllabel: Label to display for the link to the admin url.

The start urls are used in the sitemanager and other applications to present user friendly links to the application installed by the package.

Sample Package description file:

<?xml version="1.0"?>
  <package>
  <name>package_builder</name>
  <version>1.15</version>
  <description><![CDATA[<H1>Wizard to create pas packages</H1>
 
  <h2>Introduction</h2>
This package will create new packages and packages based the installed package, to create a new version of the installed package.
]]></description>
  <date_created>2007-02-03</date_created>
  <time_created>07:04:02</time_created>
  <depname>contentadmin-1.7</depname>	
  <suggest_package>design_builder-1.4</suggest_package>    
  <conflict_package></conflict_package>    
<files>
adminpackagelist.sys.php
class/WizardZipFiles.class.php
class/ZibLib.class.php
docs/package_builder/index.html
docs/package_builder/package_builder_files/ajax.js
docs/package_builder/package_builder_files/tw-sack.js
events/wizard.enterCommands.inc.php
events/wizard.selectDb.inc.php
includes/adminmenucreatepackage.inc.php
report/wizard.downloadPkg.report.xml
report/wizard.selectPackage.report.xml
wizardCreatePackage.sys.php
wizardSelectDb.sys.php
wizardSelectFiles.sys.php
</files>
<sqlinstall></sqlinstall>
<sqlremove></sqlremove>
<commandinstall>
mkdir package_created
</commandinstall>
<commandupload></commandupload>
<commandremove></commandremove>
<htmlupload>
none
</htmlupload>
<phpupload>
none
</phpupload>
<parameter></parameter>
<starturl>
wizardCreatePackage.sys.php
</starturl>
<starturllabel>
Package builder
</starturllabel>
<startadminurl></startadminurl>
<startadminurllabel></startadminurllabel>
</package>

SQL statement for database setup

The sqlremove and sqlinstall tags are optional. If you don't provide file names it will automatically look for files with the following convention : <dbtype>_db_install.sql in the root directory of your package. For example for a package that supports 3 databases you will have :

  • mysql_db_install.sql
  • pgsql_db_install.sql
  • odbc_db_install.sql
  • mysql_db_upgrade.sql
  • pgsql_db_upgrade.sql
  • odbc_db_upgrade.sql
  • mysql_db_remove.sql
  • pgsql_db_remove.sql
  • odbc_db_remove.sql
 
core/package.txt · Last modified: 2007/10/22 19:13 by 76.169.240.49
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki