Work on packages
This commit is contained in:
parent
0c5dbfc75a
commit
dff4a56301
@ -54,7 +54,7 @@ standalone software. Dolibarr is designed to provide simplicity to end-user.
|
||||
<!-- Application service (step 4) -->
|
||||
<service id="dolibarr">
|
||||
<!-- Service presentation properties (step 7) -->
|
||||
<license must-accept="true">
|
||||
<license must-accept="false">
|
||||
<text>
|
||||
<name>GPLv2</name>
|
||||
<file>COPYING</file>
|
||||
|
||||
@ -55,7 +55,7 @@ standalone software. Dolibarr is designed to provide simplicity to end-user.
|
||||
<!-- Application service (step 4) -->
|
||||
<service id="dolibarr">
|
||||
<!-- Service presentation properties (step 7) -->
|
||||
<license must-accept="true">
|
||||
<license must-accept="false">
|
||||
<text xml:lang="">
|
||||
<name>GPLv2</name>
|
||||
<file>COPYING</file>
|
||||
|
||||
@ -1,121 +0,0 @@
|
||||
<!-- Application namespaces and APS version (step 9) -->
|
||||
<application xmlns="http://apstandard.com/ns/1" version="1.1">
|
||||
<!-- Application common properties (step 9) -->
|
||||
<name>Dolibarr</name>
|
||||
<version>__VERSION__</version>
|
||||
<release>__RELEASE__</release>
|
||||
<homepage>http://www.dolibarr.org/</homepage>
|
||||
<vendor>
|
||||
<name>Dolibarr</name>
|
||||
<homepage>http://www.dolibarr.org/</homepage>
|
||||
<icon path="images/appicon_64.png" />
|
||||
</vendor>
|
||||
<packager>
|
||||
<name>Laurent Destailleur</name>
|
||||
<homepage>http://www.nltechno.com</homepage>
|
||||
<uri>uuid:714f0a7b-85d6-4eb8-b68e-40f9acbb3103</uri>
|
||||
</packager>
|
||||
<presentation>
|
||||
<summary>Dolibarr ERP - CRM, the easy to use software to manage small or medium companies, freelancers or foundations</summary>
|
||||
<description>
|
||||
Dolibarr is a free modular software (you see only
|
||||
features you need) to manage small and medium companies, freelancers
|
||||
or foundations.
|
||||
This OpenSource software is designed to provide all features you need to
|
||||
manage information on many aspects of your business
|
||||
into an intuitive and user-friendly graphical interface
|
||||
It's an OpenSource software you can install on a web server or as a
|
||||
standalone software. Dolibarr is designed to provide simplicity to end-user.
|
||||
</description>
|
||||
<icon path="images/appicon_64.png" />
|
||||
<screenshot path="images/dolibarr_screenshot1_640x480.png">
|
||||
<description>Screenshot 1</description>
|
||||
</screenshot>
|
||||
<changelog>
|
||||
<version version="3.1.0" release="0">
|
||||
<entry>See http://www.dolibarr.org/files/ChangeLog</entry>
|
||||
</version>
|
||||
</changelog>
|
||||
<categories>
|
||||
<category>Back office/Billing</category>
|
||||
<category>Back office/Accounting and Financial</category>
|
||||
<category>Back office/Customer Relationship Management</category>
|
||||
<category>Back office/Enterprise Resource Planning</category>
|
||||
</categories>
|
||||
<languages>
|
||||
<language>en</language>
|
||||
<language>fr</language>
|
||||
<language>es</language>
|
||||
<language>de</language>
|
||||
<language>pt</language>
|
||||
</languages>
|
||||
</presentation>
|
||||
<upgrade match="/application/version = '3.0'" />
|
||||
<!-- Application service (step 4) -->
|
||||
<service id="dolibarr">
|
||||
<!-- Service presentation properties (step 7) -->
|
||||
<license must-accept="true">
|
||||
<text>
|
||||
<name>GPLv2</name>
|
||||
<file>COPYING</file>
|
||||
</text>
|
||||
</license>
|
||||
<presentation>
|
||||
<name>Dolibarr instance</name>
|
||||
<summary>Dolibarr services</summary>
|
||||
<entry-points>
|
||||
<entry class="frontpage" dst="/">
|
||||
<label>Application entry point</label>
|
||||
</entry>
|
||||
</entry-points>
|
||||
</presentation>
|
||||
<!-- Service settings (step 7) -->
|
||||
<settings>
|
||||
<group>
|
||||
<name>Administrator's preferences</name>
|
||||
<setting id="admin_name" type="string" default-value="admin"
|
||||
min-length="1" max-length="32" regex="^[a-zA-Z][0-9a-zA-Z_\-]*">
|
||||
<name>Administrator's login</name>
|
||||
<error-message>
|
||||
Please make sure the text you entered starts with a letter and continues with either numbers, letters, underscores or hyphens.
|
||||
</error-message>
|
||||
</setting>
|
||||
<setting id="admin_password" type="password" min-length="1">
|
||||
<name>Password</name>
|
||||
</setting>
|
||||
</group>
|
||||
</settings>
|
||||
<!-- Service used technologies (step 6) -->
|
||||
<requirements xmlns:php="http://apstandard.com/ns/1/php"
|
||||
xmlns:db="http://apstandard.com/ns/1/db">
|
||||
<php:version min="4.2.0" />
|
||||
<php:extension>mysql</php:extension>
|
||||
<php:extension>mbstring</php:extension>
|
||||
<php:safe-mode>false</php:safe-mode>
|
||||
<db:db>
|
||||
<db:id>main</db:id>
|
||||
<db:default-name>dolibarr</db:default-name>
|
||||
<db:can-use-tables-prefix>false</db:can-use-tables-prefix>
|
||||
<db:server-type>mysql</db:server-type>
|
||||
<db:server-min-version>4.1.0</db:server-min-version>
|
||||
</db:db>
|
||||
</requirements>
|
||||
<!-- Content delivery settings (step 8) -->
|
||||
<provision>
|
||||
<url-mapping>
|
||||
<default-prefix>dolibarr</default-prefix>
|
||||
<installed-size>35000000</installed-size>
|
||||
<mapping url="/" path="htdocs" xmlns:php="http://apstandard.com/ns/1/php">
|
||||
<php:handler>
|
||||
<php:extension>php</php:extension>
|
||||
</php:handler>
|
||||
</mapping>
|
||||
</url-mapping>
|
||||
<!-- Service configuration script declaration (step 10) -->
|
||||
<configuration-script name="configure.php">
|
||||
<configuration-script-language>php</configuration-script-language>
|
||||
<status-control/>
|
||||
</configuration-script>
|
||||
</provision>
|
||||
</service>
|
||||
</application>
|
||||
1
build/aps/configure
vendored
1
build/aps/configure
vendored
@ -1 +0,0 @@
|
||||
# This script will be invoked when application instance is to be setup
|
||||
@ -3,29 +3,27 @@
|
||||
*
|
||||
*----------------------------------------------------- */
|
||||
|
||||
// This is list of predefined languages when script is ran:
|
||||
// getenv("SETTINGS_admin_name")
|
||||
// getenv("SETTINGS_admin_password")
|
||||
// getenv("BASE_URL_SCHEME")
|
||||
// getenv("BASE_URL_HOST")
|
||||
// getenv("BASE_URL_PORT")
|
||||
// getenv("BASE_URL_PATH")
|
||||
// getenv("DB_main_NAME")
|
||||
// getenv("DB_main_LOGIN")
|
||||
// getenv("DB_main_PASSWORD")
|
||||
// getenv("DB_main_HOST")
|
||||
// getenv("DB_main_PORT")
|
||||
// getenv("DB_main_HOST")
|
||||
// This is list of predefined languages when script is ran.
|
||||
// We set them manually for test purpose
|
||||
putenv("SETTINGS_admin_name")='admin';
|
||||
putenv("SETTINGS_admin_password")='admin-ad';
|
||||
putenv("BASE_URL_SCHEME")='http';
|
||||
putenv("BASE_URL_HOST")='localhost';
|
||||
putenv("BASE_URL_PORT")=80;
|
||||
putenv("BASE_URL_PATH")='/';
|
||||
putenv("WEB___DIR")='/var/wwww/dolibarr';
|
||||
putenv("DB_main_NAME")='dolibarr';
|
||||
putenv("DB_main_HOST")='localhost';
|
||||
putenv("DB_main_PORT")='3306';
|
||||
putenv("DB_main_LOGIN")='root';
|
||||
putenv("DB_main_PASSWORD")='root';
|
||||
|
||||
|
||||
|
||||
if(count($_SERVER['argv']) < 2)
|
||||
|
||||
{
|
||||
|
||||
print "Usage: configure (install | upgrade <version> | configure | remove)\n";
|
||||
|
||||
exit(1);
|
||||
|
||||
}
|
||||
|
||||
$command = $_SERVER['argv'][1];
|
||||
@ -34,68 +32,81 @@ $command = $_SERVER['argv'][1];
|
||||
|
||||
if($command == "install")
|
||||
{
|
||||
$db_id = 'main';
|
||||
|
||||
$db_id = 'main';
|
||||
$rootdir = getenv("WEB___DIR");
|
||||
$datadir = getenv("WEB___DIR").'/dolibarr_documents';
|
||||
|
||||
//List of database-related variables that are passed to the configuration
|
||||
//script. See the 6.3.1.1.1. Environment variables section of the
|
||||
//Specification for details.
|
||||
$db_address = getenv("DB_${db_id}_HOST");
|
||||
|
||||
/*if (fetch_env_var("DB_${db_id}_PORT") !== False)
|
||||
$db_address .= ':' . fetch_env_var("DB_${db_id}_PORT");
|
||||
*/
|
||||
|
||||
$dblogin = getenv("DB_${db_id}_LOGIN");
|
||||
$dbpassword = getenv("DB_${db_id}_PASSWORD");
|
||||
$dbname = getenv("DB_${db_id}_NAME");
|
||||
|
||||
//PHP functions for connecting to the mysql server and
|
||||
//executing SQL queries.
|
||||
//mysql_connect($dbaddress, $dblogin, $dbpassword);
|
||||
//mysql_select_db($dbname);
|
||||
|
||||
/*
|
||||
$sql_queries = file($query_file);
|
||||
foreach ($sql_queries as $query) mysql_query($query);
|
||||
*/
|
||||
|
||||
|
||||
//The database identifier value is to be substituted by the value
|
||||
//defined in the application requirements section of the
|
||||
//metadata file.For details, see the 6.3.1.1. Database requirement
|
||||
//type section of the Specification.
|
||||
//Other code to be executed on invoking configure with
|
||||
//the install argument.
|
||||
|
||||
$query_file = 'schema.sql'; //File containing list of SQL queries.
|
||||
// Create document directories
|
||||
print "Create directory ".$datadir.'/dolibarr_documents'."\n";
|
||||
mkdir($datadir.'/dolibarr_documents');
|
||||
|
||||
//List of database-related variables that are passed to the configuration
|
||||
//script. See the 6.3.1.1.1. Environment variables section of the
|
||||
//Specification for details.
|
||||
// Create install.forced.php
|
||||
print "Create file ".$rootdir.'/install/install.forced.php'."\n";
|
||||
$file_source='build/aps/install.forced.php.install';
|
||||
$file=$rootdir.'/install/install.forced.php';
|
||||
|
||||
$db_address = getenv("DB_${db_id}_HOST");
|
||||
$modify_hash=array(); // TODO Add substitution here
|
||||
|
||||
$file_content = read_file($file_source);
|
||||
foreach($modify_hash as $param => $val){
|
||||
$file_content = str_replace($param, php_quote($val), $file_content);
|
||||
}
|
||||
$fp = fopen($file, 'wb');
|
||||
if (!$fp)
|
||||
{
|
||||
print "Unable to write file $file.\n";
|
||||
exit(1);
|
||||
}
|
||||
fputs($fp, $content, strlen($content));
|
||||
fclose($fp);
|
||||
|
||||
/*if (fetch_env_var("DB_${db_id}_PORT") !== False)
|
||||
|
||||
$db_address .= ':' . fetch_env_var("DB_${db_id}_PORT");
|
||||
*/
|
||||
|
||||
|
||||
$dblogin = getenv("DB_${db_id}_LOGIN");
|
||||
$dbpassword = getenv("DB_${db_id}_PASSWORD");
|
||||
$dbname = getenv("DB_${db_id}_NAME");
|
||||
|
||||
|
||||
//PHP functions for connecting to the mysql server and
|
||||
//executing SQL queries.
|
||||
mysql_connect($dbaddress, $dblogin, $dbpassword);
|
||||
mysql_select_db($dbname);
|
||||
|
||||
/*
|
||||
$sql_queries = file($query_file);
|
||||
foreach ($sql_queries as $query) mysql_query($query);
|
||||
*/
|
||||
|
||||
|
||||
//Other code to be executed on invoking configure with
|
||||
//the install argument.
|
||||
|
||||
exit(0);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
if($command == "remove")
|
||||
{
|
||||
//Code to be executed on invoking configure with the remove argument
|
||||
exit(0);
|
||||
//Code to be executed on invoking configure with the remove argument
|
||||
exit(0);
|
||||
}
|
||||
|
||||
if($command == "upgrade")
|
||||
{
|
||||
//Code to be executed on invoking configure with the upgrade argument
|
||||
exit(0);
|
||||
//Code to be executed on invoking configure with the upgrade argument
|
||||
exit(0);
|
||||
}
|
||||
|
||||
if($command == "configure")
|
||||
{
|
||||
//Code to be executed on invoking configure with the configure argument
|
||||
exit(0);
|
||||
//Code to be executed on invoking configure with the configure argument
|
||||
exit(0);
|
||||
}
|
||||
|
||||
print "Error: unknown command $command.\n";
|
||||
|
||||
18
build/aps/install.forced.php.install
Executable file
18
build/aps/install.forced.php.install
Executable file
@ -0,0 +1,18 @@
|
||||
<?php
|
||||
$force_install_noedit=1;
|
||||
$force_install_message='KeepDefaultValuesDeb';
|
||||
$force_install_main_data_root='WEB___DIR/documents';
|
||||
$force_install_type='mysqli';
|
||||
$force_install_dbserver='DB_main_HOST';
|
||||
$force_install_port='DB_main_PORT';
|
||||
$force_install_database='DB_main_NAME';
|
||||
$force_install_createdatabase='0';
|
||||
$force_install_databaselogin='DB_main_LOGIN';
|
||||
$force_install_databasepass='DB_main_PASSWORD';
|
||||
$force_install_createuser='0';
|
||||
$force_install_databaserootlogin='';
|
||||
$force_install_databaserootpass='';
|
||||
$force_install_dolibarrlogin='admin';
|
||||
$force_install_nophpinfo='1';
|
||||
$force_install_lockinstall='444';
|
||||
?>
|
||||
@ -3,6 +3,7 @@ $force_install_noedit=1;
|
||||
$force_install_message='KeepDefaultValuesDeb';
|
||||
$force_install_main_data_root='/usr/share/dolibarr/documents';
|
||||
$force_install_type='mysqli';
|
||||
$force_install_dbserver='localhost';
|
||||
$force_install_port='3306';
|
||||
$force_install_database='dolibarr';
|
||||
$force_install_createdatabase='1';
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
$force_install_message='KeepDefaultValuesMamp';
|
||||
$force_install_main_data_root='/Applications/MAMP/dolibarr_documents';
|
||||
$force_install_type='mysqli';
|
||||
$force_install_dbserver='localhost';
|
||||
$force_install_port='8889';
|
||||
$force_install_database='dolibarr';
|
||||
$force_install_createdatabase='1';
|
||||
|
||||
@ -4,12 +4,13 @@
|
||||
// This file must be present into htdocs/install directory
|
||||
// during install process to be used.
|
||||
//
|
||||
// $Id$
|
||||
// $Id: install.forced.php.install,v 1.15 2011/06/26 01:52:59 eldy Exp $
|
||||
//
|
||||
$force_install_noedit=1;
|
||||
$force_install_message='KeepDefaultValuesWamp';
|
||||
$force_install_main_data_root='WAMPROOT/dolibarr_documents';
|
||||
$force_install_type='mysqli';
|
||||
$force_install_dbserver='localhost';
|
||||
$force_install_port='WAMPMYSQLPORT';
|
||||
$force_install_database='dolibarr';
|
||||
$force_install_createdatabase='1';
|
||||
|
||||
@ -24,7 +24,7 @@
|
||||
* \file htdocs/install/etape5.php
|
||||
* \ingroup install
|
||||
* \brief Last page of upgrade or install process
|
||||
* \version $Id$
|
||||
* \version $Id: etape5.php,v 1.100 2011/06/26 01:53:00 eldy Exp $
|
||||
*/
|
||||
|
||||
include_once("./inc.php");
|
||||
@ -54,6 +54,7 @@ $success=0;
|
||||
|
||||
// Init "forced values" to nothing. "forced values" are used after an doliwamp install wizard.
|
||||
if (! isset($force_install_type)) $force_install_type='';
|
||||
if (! isset($force_install_dbserver)) $force_install_dbserver='';
|
||||
if (! isset($force_install_port)) $force_install_port='';
|
||||
if (! isset($force_install_database)) $force_install_database='';
|
||||
if (! isset($force_install_createdatabase)) $force_install_createdatabase='';
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
* \file htdocs/install/fileconf.php
|
||||
* \ingroup install
|
||||
* \brief Ask all informations required to build Dolibarr htdocs/conf/conf.php file (will be wrote on disk on next page)
|
||||
* \version $Id$
|
||||
* \version $Id: fileconf.php,v 1.91 2011/06/26 01:52:59 eldy Exp $
|
||||
*/
|
||||
include_once("./inc.php");
|
||||
|
||||
@ -44,6 +44,7 @@ $langs->load("errors");
|
||||
// We first init "forced values" to nothing.
|
||||
if (! isset($force_install_noedit)) $force_install_noedit='';
|
||||
if (! isset($force_install_type)) $force_install_type='';
|
||||
if (! isset($force_install_dbserver)) $force_install_dbserver='';
|
||||
if (! isset($force_install_port)) $force_install_port='';
|
||||
if (! isset($force_install_database)) $force_install_database='';
|
||||
if (! isset($force_install_createdatabase)) $force_install_createdatabase='';
|
||||
@ -313,10 +314,10 @@ if (! empty($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == 'on') { // Enabled if t
|
||||
<tr>
|
||||
<td valign="top" class="label"><b> <?php echo $langs->trans("Server"); ?>
|
||||
</b></td>
|
||||
<td valign="top" class="label"><input type="text" name="db_host<?php print (!empty($force_install_noedit))?'_bis':''; ?>"
|
||||
<?php if (!empty($force_install_noedit)) print ' disabled="disabled"'; ?>
|
||||
value="<?php print (! empty($dolibarr_main_db_host))?$dolibarr_main_db_host:'localhost'; ?>">
|
||||
<?php if (!empty($force_install_noedit)) print '<input type="hidden" name="db_host" value="'.((! empty($dolibarr_main_db_host))?$dolibarr_main_db_host:'localhost').'">'; ?>
|
||||
<td valign="top" class="label"><input type="text" name="db_host<?php print (!empty($force_install_noedit) && $force_install_dbserver)?'_bis':''; ?>"
|
||||
<?php if (!empty($force_install_noedit) && $force_install_dbserver) print ' disabled="disabled"'; ?>
|
||||
value="<?php print (! empty($dolibarr_main_db_host))?$dolibarr_main_db_host:(empty($force_install_dbserver)?'localhost':$force_install_dbserver); ?>">
|
||||
<?php if (!empty($force_install_noedit) && $force_install_dbserver) print '<input type="hidden" name="db_host" value="'.((! empty($dolibarr_main_db_host))?$dolibarr_main_db_host:$force_install_dbserver).'">'; ?>
|
||||
</td>
|
||||
<td class="comment"><?php echo $langs->trans("ServerAddressDescription"); ?>
|
||||
</td>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user