dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #10958
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 3026: Added tests to see if all required files for the generic installer exist. Modified the restore_db...
------------------------------------------------------------
revno: 3026
committer: Bjørnar Valbø <heia@xxxxxxxx>
branch nick: dhis2
timestamp: Mon 2011-03-14 15:10:54 +0100
message:
Added tests to see if all required files for the generic installer exist. Modified the restore_db process so that the database dump doesn't need to have a specific name. Added a readme file that should go along with the compiled generic installer.
added:
installers/resources/files/README.html
modified:
installers/resources/postgres/restore_db_psql.bat
installers/src/bitrock/DHIS2_pginstaller_generic.xml
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== added file 'installers/resources/files/README.html'
--- installers/resources/files/README.html 1970-01-01 00:00:00 +0000
+++ installers/resources/files/README.html 2011-03-14 14:10:54 +0000
@@ -0,0 +1,79 @@
+<html>
+<head>
+<style type="text/css">
+ table,td,th
+ {
+ border:1px solid black;
+ }
+
+ th
+ {
+ height:50px;
+ }
+
+ th, td
+ {
+ width:200px;
+ padding:5px;
+ }
+</style>
+</head>
+
+<body>
+<h1>Installing DHIS 2</h1>
+
+<h2><u><i>Important note:</i></u></h2>
+<b>In the resources folder, make sure the following files are present
+before you start the installation:</b><br /><br />
+
+<table>
+ <tr>
+ <th align="left">File</th>
+ <th align="left">Description</th>
+ <th align="left">Source</th>
+ </tr>
+ <tr>
+ <td>dhis2db.zip</td>
+ <td>A zip file that contains a <b>plain text dump</b> of your database.</td>
+ <td>A <b>plain text dump</b> of your database.</td>
+ </tr>
+ <tr>
+ <td>dhis2_user_manual_en.pdf</td>
+ <td>The DHIS 2 user manual</td>
+ <td>Click to download:<br />
+ <a href="http://dhis2.org/doc/snapshot/en/pdf/dhis2_user_manual_en.pdf">
+ http://dhis2.org/doc/snapshot/en/pdf/dhis2_user_manual_en.pdf</a></td>
+ </tr>
+ <tr>
+ <td>dhis.war</td>
+ <td>The DHIS 2 war file</td>
+ <td>Download the latest release from: <br />
+ <a href="http://dhis2.org/downloads">
+ http://dhis2.org/downloads</a></td>
+ </tr>
+ <tr>
+ <td>ChromeStandaloneSetup.exe</td>
+ <td>Google Chrome web browser</td>
+ <td>Download the latest release from: <br />
+ <a href="http://www.google.com/chrome/eula.html?standalone=1">
+ http://www.google.com/chrome/eula.html?standalone=1</a></td>
+ </tr>
+ <tr>
+ <td>jre-<something>.exe</td>
+ <td>Java Runtime Environment</td>
+ <td>Download <b>Windows 7/XP/Vista/2000/2003/2008 <i><u>Offline</u></i></b> from:
+ <a href="http://www.java.com/en/download/manual.jsp">
+ http://www.java.com/en/download/manual.jsp</a></td>
+ </tr>
+ <tr>
+ <td>postgresql-<something>.exe</td>
+ <td>PostgreSQL database system</td>
+ <td>Download the newest <b>Win x86-<i><u>32</u></i></b> installer from:<br />
+ <a href="http://www.enterprisedb.com/products-services-training/pgdownload#windows">
+ http://www.enterprisedb.com/products-services-training/pgdownload#windows</a></td>
+ </tr>
+
+</table>
+
+</body>
+</html>
=== modified file 'installers/resources/postgres/restore_db_psql.bat'
--- installers/resources/postgres/restore_db_psql.bat 2011-03-09 20:21:25 +0000
+++ installers/resources/postgres/restore_db_psql.bat 2011-03-14 14:10:54 +0000
@@ -1,4 +1,4 @@
SET PGPASSWORD=PG_PASSWORD
"c:\Program Files\PostgreSQL\9.0\bin\psql.exe" -c "CREATE USER dhis CREATEDB LOGIN PASSWORD 'dhis';" -U postgres -w postgres
"c:\Program Files\Postgresql\9.0\bin\createdb.exe" -U postgres -w -O dhis dhis2db
-"c:\Program Files\Postgresql\9.0\bin\psql.exe" -U postgres -w -d dhis2db -f dhis2db.dump
\ No newline at end of file
+"c:\Program Files\Postgresql\9.0\bin\psql.exe" -U postgres -w -d dhis2db -f "DATABASE_FILE"
\ No newline at end of file
=== modified file 'installers/src/bitrock/DHIS2_pginstaller_generic.xml'
--- installers/src/bitrock/DHIS2_pginstaller_generic.xml 2011-03-09 21:57:58 +0000
+++ installers/src/bitrock/DHIS2_pginstaller_generic.xml 2011-03-14 14:10:54 +0000
@@ -3,7 +3,7 @@
<fullName>DHIS2</fullName>
<version>2.1</version>
<installerFilename>${product_shortname}-${product_version}-${platform_name}-live-generic-en.${platform_exec_suffix}</installerFilename>
- <readmeFile>../../resources/files/Readme.txt</readmeFile>
+ <readmeFile>../../resources/files/Readme_generic.txt</readmeFile>
<licenseFile>../../resources/files/Licence.txt</licenseFile>
<leftImage>../../resources/images/dhis2-logo-blue-rotated.png</leftImage>
<logoImage>../../resources/images/dhis2-logo-blue.png</logoImage>
@@ -170,6 +170,50 @@
<zipFile>${installer_directory}\resources\dhis.war</zipFile>
</unzip>
</postInstallationActionList>
+ <preInstallationActionList>
+ <setInstallerVariable>
+ <name>coreWarningIsShown</name>
+ <value>true</value>
+ <ruleList>
+ <fileExists>
+ <negate>1</negate>
+ <path>${installer_directory}\resources\dhis.war</path>
+ </fileExists>
+ </ruleList>
+ </setInstallerVariable>
+ <showWarning>
+ <text>Cannot find dhis.war in the resources folder. Place it there and press OK. If it is still not found, the installation process will be aborted.</text>
+ <title>dhis.war is missing</title>
+ <ruleList>
+ <fileExists>
+ <negate>1</negate>
+ <path>${installer_directory}\resources\dhis.war</path>
+ </fileExists>
+ </ruleList>
+ </showWarning>
+ <throwError>
+ <customErrorMessage>Could not find dhis.war in the resources folder.</customErrorMessage>
+ <text>Could not find dhis.war in the resources folder.</text>
+ <ruleList>
+ <fileExists>
+ <negate>1</negate>
+ <path>${installer_directory}\resources\dhis.war</path>
+ </fileExists>
+ </ruleList>
+ </throwError>
+ <showInfo>
+ <text>Thank you! dhis.war was located. The installation process will continue.</text>
+ <title>Thank you!</title>
+ <ruleList>
+ <fileExists>
+ <path>${installer_directory}\resources\dhis.war</path>
+ </fileExists>
+ <isTrue>
+ <value>${coreWarningIsShown}</value>
+ </isTrue>
+ </ruleList>
+ </showInfo>
+ </preInstallationActionList>
</component>
<component>
<name>Java</name>
@@ -186,6 +230,50 @@
<workingDirectory>${installer_directory}\resources</workingDirectory>
</runProgram>
</postInstallationActionList>
+ <readyToInstallActionList>
+ <setInstallerVariable>
+ <name>jreWarningIsShown</name>
+ <value>true</value>
+ <ruleList>
+ <fileExists>
+ <negate>1</negate>
+ <path>${installer_directory}\resources\jre*.exe</path>
+ </fileExists>
+ </ruleList>
+ </setInstallerVariable>
+ <showWarning>
+ <text>Cannot find jre*.exe in the resources folder. Place it there and press OK. If it is still not found, the installation process will be aborted.</text>
+ <title>JRE is missing</title>
+ <ruleList>
+ <fileExists>
+ <negate>1</negate>
+ <path>${installer_directory}\resources\jre*.exe</path>
+ </fileExists>
+ </ruleList>
+ </showWarning>
+ <throwError>
+ <customErrorMessage>Could not find jre*.exe in the resources folder.</customErrorMessage>
+ <text>Could not find jre*.exe in the resources folder.</text>
+ <ruleList>
+ <fileExists>
+ <negate>1</negate>
+ <path>${installer_directory}\resources\jre*.exe</path>
+ </fileExists>
+ </ruleList>
+ </throwError>
+ <showInfo>
+ <text>Thank you! The JRE file was located. The installation process will continue.</text>
+ <title>Thank you!</title>
+ <ruleList>
+ <fileExists>
+ <path>${installer_directory}\resources\jre*.exe</path>
+ </fileExists>
+ <isTrue>
+ <value>${jreWarningIsShown}</value>
+ </isTrue>
+ </ruleList>
+ </showInfo>
+ </readyToInstallActionList>
</component>
<component>
<name>postgres</name>
@@ -226,6 +314,50 @@
<workingDirectory>${installer_directory}\resources</workingDirectory>
</runProgram>
</postInstallationActionList>
+ <readyToInstallActionList>
+ <setInstallerVariable>
+ <name>postgresWarningIsShown</name>
+ <value>true</value>
+ <ruleList>
+ <fileExists>
+ <negate>1</negate>
+ <path>${installer_directory}\resources\postgresql*.exe</path>
+ </fileExists>
+ </ruleList>
+ </setInstallerVariable>
+ <showWarning>
+ <text>Cannot find postgresql*.exe in the resources folder. Place it there and press OK. If it is still not found, the installation process will be aborted.</text>
+ <title>postgresql*.exe is missing</title>
+ <ruleList>
+ <fileExists>
+ <negate>1</negate>
+ <path>${installer_directory}\resources\postgresql*.exe</path>
+ </fileExists>
+ </ruleList>
+ </showWarning>
+ <throwError>
+ <customErrorMessage>Could not find postgresql*.exe in the resources folder.</customErrorMessage>
+ <text>Could not find postgresql*.exe in the resources folder.</text>
+ <ruleList>
+ <fileExists>
+ <negate>1</negate>
+ <path>${installer_directory}\resources\postgresql*.exe</path>
+ </fileExists>
+ </ruleList>
+ </throwError>
+ <showInfo>
+ <text>Thank you! The PostgreSQL setup file was located. The installation process will continue.</text>
+ <title>Thank you!</title>
+ <ruleList>
+ <fileExists>
+ <path>${installer_directory}\resources\postgresql*.exe</path>
+ </fileExists>
+ <isTrue>
+ <value>${postgresWarningIsShown}</value>
+ </isTrue>
+ </ruleList>
+ </showInfo>
+ </readyToInstallActionList>
</component>
<component>
<name>dhis2db</name>
@@ -247,10 +379,18 @@
</folder>
</folderList>
<postInstallationActionList>
+ <createDirectory>
+ <path>${installdir}\tmp\dhis2db</path>
+ </createDirectory>
<unzip>
- <destinationDirectory>${installdir}\tmp\</destinationDirectory>
+ <destinationDirectory>${installdir}\tmp\dhis2db\</destinationDirectory>
<zipFile>${installer_directory}\resources\dhis2db.zip</zipFile>
</unzip>
+ <findFile>
+ <baseDirectory>${installdir}\tmp\dhis2db</baseDirectory>
+ <pattern>*dhis*</pattern>
+ <variable>databaseFile</variable>
+ </findFile>
<substitute>
<files>${installdir}\tmp\restore_db_psql.bat</files>
<type>regexp</type>
@@ -259,6 +399,10 @@
<pattern>PG_PASSWORD</pattern>
<value>${pg_password}</value>
</substitution>
+ <substitution>
+ <pattern>DATABASE_FILE</pattern>
+ <value>${databaseFile}</value>
+ </substitution>
</substitutionList>
</substitute>
<runProgram>
@@ -275,6 +419,50 @@
<path>${installdir}\tmp\restore_db_psql.bat</path>
</deleteFile>
</postInstallationActionList>
+ <readyToInstallActionList>
+ <setInstallerVariable>
+ <name>dhis2dbWarningIsShown</name>
+ <value>true</value>
+ <ruleList>
+ <fileExists>
+ <negate>1</negate>
+ <path>${installer_directory}\resources\dhis2db.zip</path>
+ </fileExists>
+ </ruleList>
+ </setInstallerVariable>
+ <showWarning>
+ <text>Cannot find dhis2db.zip in the resources folder. Place it there and press OK. If it is still not found, the installation process will be aborted.</text>
+ <title>dhis2db.zip is missing</title>
+ <ruleList>
+ <fileExists>
+ <negate>1</negate>
+ <path>${installer_directory}\resources\dhis2db.zip</path>
+ </fileExists>
+ </ruleList>
+ </showWarning>
+ <throwError>
+ <customErrorMessage>Could not find dhis2db.zip in the resources folder.</customErrorMessage>
+ <text>Could not find dhis2db.zip in the resources folder.</text>
+ <ruleList>
+ <fileExists>
+ <negate>1</negate>
+ <path>${installer_directory}\resources\dhis2db.zip</path>
+ </fileExists>
+ </ruleList>
+ </throwError>
+ <showInfo>
+ <text>Thank you! dhis2db.zip was located. The installation process will continue.</text>
+ <title>Thank you!</title>
+ <ruleList>
+ <fileExists>
+ <path>${installer_directory}\resources\dhis2db.zip</path>
+ </fileExists>
+ <isTrue>
+ <value>${dhis2dbWarningIsShown}</value>
+ </isTrue>
+ </ruleList>
+ </showInfo>
+ </readyToInstallActionList>
</component>
<component>
<name>dhis2docs</name>
@@ -292,6 +480,50 @@
<progressText>Adding DHIS 2 documentation</progressText>
</copyFile>
</postInstallationActionList>
+ <readyToInstallActionList>
+ <setInstallerVariable>
+ <name>docsWarningIsShown</name>
+ <value>true</value>
+ <ruleList>
+ <fileExists>
+ <negate>1</negate>
+ <path>${installer_directory}\resources\dhis2_user_manual_en.pdf</path>
+ </fileExists>
+ </ruleList>
+ </setInstallerVariable>
+ <showWarning>
+ <text>Cannot find dhis2_user_manual_en.pdf in the resources folder. Place it there and press OK. If it is still not found, the installation process will be aborted.</text>
+ <title>dhis2_user_manual_en.pdf is missing</title>
+ <ruleList>
+ <fileExists>
+ <negate>1</negate>
+ <path>${installer_directory}\resources\dhis2_user_manual_en.pdf</path>
+ </fileExists>
+ </ruleList>
+ </showWarning>
+ <throwError>
+ <customErrorMessage>Could not find dhis2_user_manual_en.pdf in the resources folder.</customErrorMessage>
+ <text>Could not find dhis2_user_manual_en.pdf in the resources folder.</text>
+ <ruleList>
+ <fileExists>
+ <negate>1</negate>
+ <path>${installer_directory}\resources\dhis2_user_manual_en.pdf</path>
+ </fileExists>
+ </ruleList>
+ </throwError>
+ <showInfo>
+ <text>Thank you! dhis2_user_manual_en.pdf was located. The installation process will continue.</text>
+ <title>Thank you!</title>
+ <ruleList>
+ <fileExists>
+ <path>${installer_directory}\resources\dhis2_user_manual_en.pdf</path>
+ </fileExists>
+ <isTrue>
+ <value>${docsWarningIsShown}</value>
+ </isTrue>
+ </ruleList>
+ </showInfo>
+ </readyToInstallActionList>
</component>
<component>
<name>Chrome</name>
@@ -308,6 +540,50 @@
<workingDirectory>${installer_directory}\resources</workingDirectory>
</runProgram>
</postInstallationActionList>
+ <readyToInstallActionList>
+ <setInstallerVariable>
+ <name>chromeWarningIsShown</name>
+ <value>true</value>
+ <ruleList>
+ <fileExists>
+ <negate>1</negate>
+ <path>${installer_directory}\resources\ChromeStandaloneSetup.exe</path>
+ </fileExists>
+ </ruleList>
+ </setInstallerVariable>
+ <showWarning>
+ <text>Cannot find ChromeStandaloneSetup.exe in the resources folder. Place it there and press OK. If it is still not found, the installation process will be aborted.</text>
+ <title>ChromeStandaloneSetup.exe is missing</title>
+ <ruleList>
+ <fileExists>
+ <negate>1</negate>
+ <path>${installer_directory}\resources\ChromeStandaloneSetup.exe</path>
+ </fileExists>
+ </ruleList>
+ </showWarning>
+ <throwError>
+ <customErrorMessage>Could not find ChromeStandaloneSetup.exe in the resources folder.</customErrorMessage>
+ <text>Could not find ChromeStandaloneSetup.exe in the resources folder.</text>
+ <ruleList>
+ <fileExists>
+ <negate>1</negate>
+ <path>${installer_directory}\resources\ChromeStandaloneSetup.exe</path>
+ </fileExists>
+ </ruleList>
+ </throwError>
+ <showInfo>
+ <text>Thank you! ChromeStandaloneSetup.exe was located. The installation process will continue.</text>
+ <title>Thank you!</title>
+ <ruleList>
+ <fileExists>
+ <path>${installer_directory}\resources\ChromeStandaloneSetup.exe</path>
+ </fileExists>
+ <isTrue>
+ <value>${chromeWarningIsShown}</value>
+ </isTrue>
+ </ruleList>
+ </showInfo>
+ </readyToInstallActionList>
</component>
</componentList>
<finalPageActionList>