Using Alternate Sites in Windows iHRIS: Difference between revisions
Line 10: | Line 10: | ||
==Making a Compatible Module== | ==Making a Compatible Module== | ||
We will look at the changes needed to make the [[http://bazaar.launchpad.net/~ihris%2Buganda/ihris-uganda/ug-manage/files/5?start_revid=5 Uganda customization ]] of iHRIS Manage compatible for the windows installer. Let us assume that you already have a copy of these files sitting at ''c:\manage_site''. | |||
===Adding Database Access=== | |||
Browse to the [[http://bazaar.launchpad.net/~intrahealth%2Binformatics/offline-ihris/3.1/files wamp installer]] on Launchpad, | |||
and download the file ''source/local_configs/config.values.php_ihris-manage.install. This file should be saved to ''C:\manage_site\pages\local\config.values.php.install''. You don't need to worry about editing this file, as the installer will substitute values as appropriate. | |||
===Changes to the site module file=== | ===Changes to the site module file=== | ||
The first thing we will need to do is to move the file ''c:\manage_site\iHRIS-Manage-UG.xml'' to ''c:\manage_site\ihris-manage-Wamp.xml.install``. Now, open the file ''c:\manage_site\ihris-manage-Wamp.xml.install'' with your favorite editor. | The first thing we will need to do is to move the file ''c:\manage_site\iHRIS-Manage-UG.xml'' to ''c:\manage_site\ihris-manage-Wamp.xml.install``. Now, open the file ''c:\manage_site\ihris-manage-Wamp.xml.install'' with your favorite editor. | ||
Line 62: | Line 66: | ||
</configuration> | </configuration> | ||
The ''WAMPPHPROOT'' will be replaced by the installer with the directory ih which the php executable resides, while ''WAMPAPACHEROOT'' will be replaced with directory in which the installer put Apache. | The ''WAMPPHPROOT'' will be replaced by the installer with the directory ih which the php executable resides, while ''WAMPAPACHEROOT'' will be replaced with directory in which the installer put Apache. | ||
Revision as of 12:46, 6 November 2008
Overview
Version 3.1 of Offline iHRIS installs the default sites, but there is a command line argument that lets you specify an alternate directory to use for your site. This was added so that a country can reuse the installer and just specify an alternate site for whatever component they want. The idea is that the administator at a central office will specify their site with all of its customizations. Then they can just distribute to district offices a CD or a USB key with our installer and their site and a windows batch file to run the installer with the appropriate command line option, e.g:
OfflineIHRIS-3.1.2 /components=ihrismanage /manageSITE=C:\manage_site /mysqlpass=something /silent
which will silently install the Offline iHRIS suite to C:\Program Files\ihris-suite and copy the contents of C:\manage_site to C:\Program Files\ihris-suite\sites\manage.
Since you are allowed to get as complicated as they want with your site module, the site can then load whatever data you need, e.g., all the positions, facilities, district information, etc. However, your site must be compatible with the standard wamp installation.
Making a Compatible Module
We will look at the changes needed to make the [Uganda customization ] of iHRIS Manage compatible for the windows installer. Let us assume that you already have a copy of these files sitting at c:\manage_site.
Adding Database Access
Browse to the [wamp installer] on Launchpad, and download the file source/local_configs/config.values.php_ihris-manage.install. This file should be saved to C:\manage_site\pages\local\config.values.php.install. You don't need to worry about editing this file, as the installer will substitute values as appropriate.
Changes to the site module file
The first thing we will need to do is to move the file c:\manage_site\iHRIS-Manage-UG.xml to c:\manage_site\ihris-manage-Wamp.xml.install``. Now, open the file c:\manage_site\ihris-manage-Wamp.xml.install with your favorite editor.
Change the site module name
We need to change the name of the site module to be the name of the site module that the WAMP install expects. We do this by changing the line:
<I2CEConfiguration name='ihris-manage-site-ug'>
to:
<I2CEConfiguration name='ihris-manage-site-wamp'>
and the line
<configurationGroup name='ihris-manage-site-ug'>
to:
<configurationGroup name='ihris-manage-site-wamp'>
Adding in paths
Now we need to add in a paths to point to the ihris installation. Look for the lines
<path name='modules'> <value>./modules</value> </path>
and change them to:
<path name='modules'> <value>./modules</value> <value>WAMPROOTREGULAR\lib\ihris</value> </path>
Note the WAMPROOTREGULAR will be changed to the installation directory (C:\Program Files\ihris by default) by the installer.
Adding in Configuration Data
Just after the lines (that you changed):
<configurationGroup name='ihris-manage-site-wamp'> <displayName>iHRIS Manage Uganda Site</displayName> <status>advanced:false</status>
We need to add in the following lines:
<status>overwrite:true</status> <configuration values='single' name='mime_types' path='/modules/FileDump/mime_types'> <displayName>The location of the mime.types file</displayName> <description>The mime.types file is a standard file on a unix system, usually located in /etc/mime.types, which describes the type of a file based on its extension. </description> <status>required:true</status> <value>WAMPAPACHEROOT\conf\mime.types</value> </configuration> <configuration name='php_executable' path='/modules/BackgroundProcess/php_executable/windows' values='single'> <displayName>Windows Binary</displayName> <description>The binary to use to execute a php script from the command line in windows</description> <value>WAMPPHPROOT\php.exe</value> </configuration> <configuration name='log_dir' values='single' path='/modules/BackgroundProcess/log_dir'> <displayName>Log Directory</displayName> <description>The directory that we attempt to ouput error messages from the background process to </description> <status>required:false</status> <value>WAMPROOTREGULAR\tmp\I2CE_BackgroundProcess</value> </configuration>
The WAMPPHPROOT will be replaced by the installer with the directory ih which the php executable resides, while WAMPAPACHEROOT will be replaced with directory in which the installer put Apache.