diff --git a/build/exe/doliwamp/doliwamp.iss b/build/exe/doliwamp/doliwamp.iss
index 1f6cd0b146c..51b466ad52c 100644
--- a/build/exe/doliwamp/doliwamp.iss
+++ b/build/exe/doliwamp/doliwamp.iss
@@ -65,6 +65,7 @@ Source: "build\exe\doliwamp\startdoliwamp.bat"; DestDir: "{app}\"; Flags: ignore
Source: "build\exe\doliwamp\removefiles.bat"; DestDir: "{app}\"; Flags: ignoreversion;
Source: "build\exe\doliwamp\rundoliwamp.bat.install"; DestDir: "{app}\"; Flags: ignoreversion;
Source: "build\exe\doliwamp\rundolihelp.bat.install"; DestDir: "{app}\"; Flags: ignoreversion;
+Source: "build\exe\doliwamp\rundoliadmin.bat.install"; DestDir: "{app}\"; Flags: ignoreversion;
Source: "build\exe\doliwamp\install_services.bat.install"; DestDir: "{app}\"; Flags: ignoreversion;
Source: "build\exe\doliwamp\uninstall_services.bat.install"; DestDir: "{app}\"; Flags: ignoreversion;
Source: "build\exe\doliwamp\mysqlinitpassword.bat.install"; DestDir: "{app}\"; Flags: ignoreversion;
@@ -105,6 +106,7 @@ Name: "{group}\Dolibarr ERP-CRM"; Filename: "{app}\rundoliwamp.bat"; WorkingDir:
Name: "{group}\Tools\Help center"; Filename: "{app}\rundolihelp.bat"; WorkingDir: "{app}"; IconFilename: {app}\www\dolibarr\doc\images\dolihelp.ico
Name: "{group}\Tools\Start DoliWamp server"; Filename: "{app}\startdoliwamp.bat"; WorkingDir: "{app}"; IconFilename: {app}\www\dolibarr\doc\images\doliwampon.ico
Name: "{group}\Tools\Stop DoliWamp server"; Filename: "{app}\stopdoliwamp.bat"; WorkingDir: "{app}"; IconFilename: {app}\www\dolibarr\doc\images\doliwampoff.ico
+Name: "{group}\Tools\Admin DoliWamp server"; Filename: "{app}\rundoliadmin.bat"; WorkingDir: "{app}"; IconFilename: {app}\www\dolibarr\doc\images\doliadmin.ico
Name: "{group}\Tools\Uninstall DoliWamp"; Filename: "{app}\unins000.exe"; WorkingDir: "{app}"; IconFilename: {app}\uninstall_services.bat
Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\Dolibarr"; WorkingDir: "{app}"; Filename: "{app}\rundoliwamp.bat"; Tasks: quicklaunchicon; IconFilename: {app}\www\dolibarr\doc\images\dolibarr.ico
Name: "{userdesktop}\Dolibarr ERP-CRM"; Filename: "{app}\rundoliwamp.bat"; WorkingDir: "{app}"; Tasks: desktopicon; IconFilename: {app}\www\dolibarr\doc\images\dolibarr.ico
@@ -303,7 +305,7 @@ begin
//----------------------------------------------
- // rundoliwamp.bat and rundolihelp.bat
+ // rundoliwamp.bat, rundolihelp.bat and rundoliadmin.bat
//----------------------------------------------
destFile := pathWithSlashes+'/rundoliwamp.bat';
@@ -312,7 +314,11 @@ begin
destFileH := pathWithSlashes+'/rundolihelp.bat';
srcFileH := pathWithSlashes+'/rundolihelp.bat.install';
- if (not FileExists (destFile) or not FileExists (destFileH)) and (FileExists(srcFile) and FileExists(srcFileH)) then
+ destFileA := pathWithSlashes+'/rundoliadmin.bat';
+ srcFileA := pathWithSlashes+'/rundoliadmin.bat.install';
+
+ if (not FileExists (destFile) or not FileExists (destFileH) or not FileExists (destFileA))
+ and (FileExists(srcFile) and FileExists(srcFileH) and FileExists(srcFileA)) then
begin
//navigateur
browser := 'explorer.exe';
@@ -337,6 +343,11 @@ begin
StringChange (srcContents, 'WAMPBROWSER', browser);
StringChange (srcContents, 'WAMPAPACHEPORT', myporta);
SaveStringToFile(destFileH,srcContents, False);
+
+ LoadStringFromFile (srcFileA, srcContents);
+ StringChange (srcContents, 'WAMPBROWSER', browser);
+ StringChange (srcContents, 'WAMPAPACHEPORT', myporta);
+ SaveStringToFile(destFileA,srcContents, False);
end
diff --git a/build/exe/doliwamp/index.php.install b/build/exe/doliwamp/index.php.install
index 9613d75dfe6..d2e53d6875e 100644
--- a/build/exe/doliwamp/index.php.install
+++ b/build/exe/doliwamp/index.php.install
@@ -18,10 +18,10 @@ $appDir = '../apps/';
// we set version of applications
-$phpVersion = '5.2.5';
-$apacheVersion = '2.2.6';
-$mysqlVersion = '5.0.45';
-
+$phpVersion = 'WAMPPHPVERSION';
+$apacheVersion = 'WAMPAPACHEVERSION';
+$mysqlVersion = 'WAMPMYSQLVERSION';
+$apachePort = 'WAMPAPACHEPORT';
// directories to ignore in project list
@@ -32,8 +32,10 @@ $projectsListIgnore = array ('.','..');
$langues = array(
'en' => array(
'langue' => 'English',
- 'autreLangue' => 'Version Française',
- 'autreLangueLien' => 'fr',
+ 'autreLangue1' => 'Español',
+ 'autreLangueLien1' => 'es',
+ 'autreLangue2' => 'Français',
+ 'autreLangueLien2' => 'fr',
'titreHtml' => 'DoliWamp Homepage',
'titreConf' => 'Server Configuration',
'versa' => 'Apache Version :',
@@ -46,14 +48,19 @@ $langues = array(
'txtProjet' => 'Your Softwares',
'txtNoProjet' => 'No other softwares. To create a new one, just create a directory in \'www\'.',
'txtApp' => 'Applications',
+ 'FromLocalNetwork' => 'URL for local access',
+ 'FromInternet' => 'URL for Internet',
+ 'NotAvailable' => 'Not available',
'faq' => 'http://www.en.wampserver.com/faq.php',
'ipserver' => 'Name/IP Server:',
- 'askhelp' => 'Request a help support'
+ 'askhelp' => 'Dolibarr Help center'
),
'fr' => array(
'langue' => 'Français',
- 'autreLangue' => 'Versión Español',
- 'autreLangueLien' => 'es',
+ 'autreLangue1' => 'Español',
+ 'autreLangueLien1' => 'es',
+ 'autreLangue2' => 'English',
+ 'autreLangueLien2' => 'en',
'titreHtml' => 'Accueil DoliWamp',
'titreConf' => 'Configuration Serveur',
'versa' => 'Version de Apache:',
@@ -66,14 +73,19 @@ $langues = array(
'txtProjet' => 'Autres applications (sans alias)',
'txtNoProjet' => 'Pas d\'autre application. Pour en ajouter une nouvelle, créez simplement un répertoire dans \'www\'.',
'txtApp' => 'Applications',
+ 'FromLocalNetwork' => 'URL accès local',
+ 'FromInternet' => 'URL accès par Internet',
+ 'NotAvailable' => 'Non disponible',
'faq' => 'http://www.wampserver.com/faq.php',
'ipserver' => 'Name/IP Serveur:',
- 'askhelp' => 'Demander une aide au support'
+ 'askhelp' => 'Centre d\'assistance Dolibarr'
),
'es' => array(
'langue' => 'Español',
- 'autreLangue' => 'English Version',
- 'autreLangueLien' => 'en',
+ 'autreLangue1' => 'English',
+ 'autreLangueLien1' => 'en',
+ 'autreLangue2' => 'Français',
+ 'autreLangueLien2' => 'fr',
'titreHtml' => 'Inicio DoliWamp',
'titreConf' => 'Configuración Servidor',
'versa' => 'Versión de Apache:',
@@ -86,6 +98,9 @@ $langues = array(
'txtProjet' => 'Otras aplicaciones (sin alias)',
'txtNoProjet' => 'Ninguna otra aplicación. Para añadir una nueva, simplemente cree una carpeta en \'www\'.',
'txtApp' => 'Aplicaciones',
+ 'FromLocalNetwork' => 'URL for local access',
+ 'FromInternet' => 'URL for Internet',
+ 'NotAvailable' => 'Not available',
'faq' => 'http://www.wampserver.com/faq.php',
'ipserver' => 'Nombre/IP Servidor',
'askhelp' => 'Pedir ayuda o soporte'
@@ -331,19 +346,22 @@ if (is_dir($aliasDir))
if (is_file($aliasDir.$file) && ereg('.conf',$file))
{
$msg = '';
+
+ $aliasContents.='
| http://localhost'.($apachePort != 80?':'.$apachePort:'').'/'.$file.'/ | http://ipofyourserver'.($apachePort != 80?':'.$apachePort:'').'/'.$file.'/ |
';
+ elseif (eregi('phpmyadmin',$file)) $aliasContents .= $file.'http://localhost'.($apachePort != 80?':'.$apachePort:'').'/'.$file.'/ | '.$langues[$langue]['NotAvailable'].' | ';
+ else $aliasContents .= $file.' | '.$langues[$langue]['NotAvailable'].' | ';
+
$aliasarray[]=$file;
}
}
closedir($handle);
}
if (!isset($aliasContents))
- $aliasContents = $langues[$langue]['txtNoAlias'];
+ $aliasContents = '| '.$langues[$langue]['txtNoAlias'].' |
';
// Read projects in www dir
@@ -359,14 +377,18 @@ foreach($listoffiles as $file)
{
if (is_dir($file) && !in_array($file,$projectsListIgnore) && !in_array($file,$aliasarray))
{
+ $projectContents .= '';
+
$projectContents .= '- ';
- $projectContents .= $file.' (URL: http://ipofyourserver:81/'.$file.'/)';
+ $projectContents .= $file.'';
$projectContents .= '
';
+
+ $projectContents .= ' | http://localhost'.($apachePort != 80?':'.$apachePort:'').'/'.$file.'/)'.' | '.$langues[$langue]['NotAvailable'].' |
';
}
}
if (!isset($projectContents))
- $projectContents = $langues[$langue]['txtNoProjet'];
+ $projectContents = '| '.$langues[$langue]['txtNoProjet'].' |
';
@@ -380,7 +402,7 @@ $pageContents = <<< EOPAGE
-
+
{$langues[$langue]['titreHtml']}
@@ -501,7 +523,8 @@ a:hover {
@@ -527,17 +550,23 @@ a:hover {
{$langues[$langue]['txtApp']}
-
+
+ |
+ {$langues[$langue]['txtApp']}
+ |
+ {$langues[$langue]['FromLocalNetwork']}
+ |
+ {$langues[$langue]['FromInternet']}
+ |
${aliasContents}
-
+ ${projectContents}
+
{$langues[$langue]['titrePage']}
diff --git a/build/exe/doliwamp/rundoliadmin.bat.install b/build/exe/doliwamp/rundoliadmin.bat.install
new file mode 100644
index 00000000000..dcd113f4ab5
--- /dev/null
+++ b/build/exe/doliwamp/rundoliadmin.bat.install
@@ -0,0 +1,6 @@
+@echo off
+REM Launch Dolibarr Admin center
+REM ----------------------------
+
+REM Go to admin center page
+start "WAMPBROWSER" http://localhost:WAMPAPACHEPORT/
diff --git a/doc/images/doliadmin.ico b/doc/images/doliadmin.ico
new file mode 100644
index 00000000000..060a6065ae3
Binary files /dev/null and b/doc/images/doliadmin.ico differ
diff --git a/htdocs/install/etape5.php b/htdocs/install/etape5.php
index 12244ec1921..b62ca7b08ea 100644
--- a/htdocs/install/etape5.php
+++ b/htdocs/install/etape5.php
@@ -33,6 +33,11 @@ include_once("./inc.php");
$setuplang=isset($_POST["selectlang"])?$_POST["selectlang"]:(isset($_GET["selectlang"])?$_GET["selectlang"]:'auto');
$langs->setDefaultLang($setuplang);
+// TODO Send value from migrate choice
+$targetversion=DOL_VERSION;
+if (isset($_REQUEST["targetversion"])) $targetversion=$_REQUEST["targetversion"];
+
+
$langs->load("admin");
$langs->load("install");
@@ -162,9 +167,10 @@ if ($_POST["action"] == "set" || $_POST["action"] == "upgrade")
{
$db->begin();
- dolibarr_install_syslog('install/etape5.php set MAIN_VERSION_LAST_INSTALL const to '.DOL_VERSION, LOG_DEBUG);
+ dolibarr_install_syslog('install/etape5.php set MAIN_VERSION_LAST_INSTALL const to '.$targetversion, LOG_DEBUG);
$db->query("DELETE FROM llx_const WHERE name='MAIN_VERSION_LAST_INSTALL'");
- $db->query("INSERT INTO llx_const(name,value,type,visible,note,entity) values('MAIN_VERSION_LAST_INSTALL','".DOL_VERSION."','chaine',0,'Dolibarr version when install',0)");
+ $db->query("INSERT INTO llx_const(name,value,type,visible,note,entity) values('MAIN_VERSION_LAST_INSTALL','".$targetversion."','chaine',0,'Dolibarr version when install',0)");
+ $conf->global->MAIN_VERSION_LAST_INSTALL=$targetversion;
dolibarr_install_syslog('install/etape5.php Remove MAIN_NOT_INSTALLED const', LOG_DEBUG);
$db->query("DELETE FROM llx_const WHERE name='MAIN_NOT_INSTALLED'");
@@ -177,13 +183,17 @@ if ($_POST["action"] == "set" || $_POST["action"] == "upgrade")
print $langs->trans("Error")." ";
}
}
-
// If upgrade
- if ($_POST["action"] == "upgrade")
+ elseif ($_POST["action"] == "upgrade")
{
- dolibarr_install_syslog('install/etape5.php set MAIN_VERSION_LAST_UPGRADE const to value '.DOL_VERSION, LOG_DEBUG);
+ dolibarr_install_syslog('install/etape5.php set MAIN_VERSION_LAST_UPGRADE const to value '.$targetversion, LOG_DEBUG);
$db->query("DELETE FROM llx_const WHERE name='MAIN_VERSION_LAST_UPGRADE'");
- $db->query("INSERT INTO llx_const(name,value,type,visible,note,entity) values('MAIN_VERSION_LAST_UPGRADE','".DOL_VERSION."','chaine',0,'Dolibarr version for last upgrade',0)");
+ $db->query("INSERT INTO llx_const(name,value,type,visible,note,entity) values('MAIN_VERSION_LAST_UPGRADE','".$targetversion."','chaine',0,'Dolibarr version for last upgrade',0)");
+ $conf->global->MAIN_VERSION_LAST_UPGRADE=$targetversion;
+ }
+ else
+ {
+ dol_print_error('','install/etape5.php Unknown choice of action');
}
// May fail if parameter already defined
@@ -197,68 +207,98 @@ if ($_POST["action"] == "set" || $_POST["action"] == "upgrade")
print " ";
+// Create lock file
+
// If first install
if ($_POST["action"] == "set")
{
- // Fin install
- print $langs->trans("SystemIsInstalled")." ";
- if (empty($force_install_lockinstall))
+ if (empty($conf->global->MAIN_VERSION_LAST_UPGRADE) || ($conf->global->MAIN_VERSION_LAST_UPGRADE == DOL_VERSION))
{
- print ''.$langs->trans("WarningRemoveInstallDir")." ";
+ // Install is finished
+ print $langs->trans("SystemIsInstalled")." ";
+ if (empty($force_install_lockinstall))
+ {
+ print ''.$langs->trans("WarningRemoveInstallDir")." ";
+ }
+ else
+ {
+ // Install is finished, we create the lock file
+ $fp = fopen("../../install.lock", "w");
+ fwrite($fp, "This is a lock file to prevent use of install pages");
+ fclose($fp);
+ }
+
+ print " ";
+
+ print $langs->trans("YouNeedToPersonalizeSetup")."
";
+
+ print '';
+ print $langs->trans("GoToSetupArea");
+ print '';
}
else
{
- // Open the file and erase the contents if any
- $fp = fopen("../../install.lock", "w");
- fwrite($fp, "This is a lock file to prevent use of install pages");
- fclose($fp);
+ // If here MAIN_VERSION_LAST_UPGRADE is not empty
+ print $langs->trans("VersionLastUpgrade").': '.$conf->global->MAIN_VERSION_LAST_UPGRADE.' ';
+ print $langs->trans("VersionProgram").': '.DOL_VERSION.'';
+
+ print " ";
+
+ print '';
+ print $langs->trans("GoToUpgradePage");
+ print '';
}
-
- print " ";
-
- print $langs->trans("YouNeedToPersonalizeSetup")."
";
}
-
// If upgrade
-if ($_POST["action"] == "upgrade")
+elseif ($_POST["action"] == "upgrade")
{
- // Fin install
- print $langs->trans("SystemIsUpgraded")." ";
- if (empty($force_install_lockinstall))
+ if (empty($conf->global->MAIN_VERSION_LAST_UPGRADE) || ($conf->global->MAIN_VERSION_LAST_UPGRADE == DOL_VERSION))
{
- print ''.$langs->trans("WarningRemoveInstallDir")." ";
+ // Upgrade is finished
+ print $langs->trans("SystemIsUpgraded")." ";
+ if (empty($force_install_lockinstall))
+ {
+ print ''.$langs->trans("WarningRemoveInstallDir")." ";
+ }
+ else
+ {
+ // Upgrade is finished, we create the lock file
+ $fp = fopen("../../install.lock", "w");
+ fwrite($fp, "This is a lock file to prevent use of install pages");
+ fclose($fp);
+ }
+
+ print " ";
+
+ print '';
+ print $langs->trans("GoToDolibarr");
+ print '';
}
else
{
- // Open the file and erase the contents if any
- $fp = fopen("../../install.lock", "w");
- fwrite($fp, "This is a lock file to prevent use of install pages");
- fclose($fp);
+ // If here MAIN_VERSION_LAST_UPGRADE is not empty
+ print $langs->trans("VersionLastUpgrade").': '.$conf->global->MAIN_VERSION_LAST_UPGRADE.' ';
+ print $langs->trans("VersionProgram").': '.DOL_VERSION.'';
+
+ print " ";
+
+ print '';
+ print $langs->trans("GoToUpgradePage");
+ print '';
}
-
- print " ";
-}
-
-
-if ($_POST["action"] == "upgrade")
-{
- print '';
- print $langs->trans("GoToDolibarr");
- print '';
}
else
{
- print '';
- print $langs->trans("GoToSetupArea");
- print '';
+ dol_print_error('','install/etape5.php Unknown choice of action');
}
+
// Clear cache files
clearstatcache();
-dolibarr_install_syslog("Dolibarr install/setup finished", LOG_INFO);
+dolibarr_install_syslog("install/etape5.php Dolibarr setup finished", LOG_INFO);
pFooter(1,$setuplang);
?>
\ No newline at end of file
|