<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE installer PUBLIC "-//tp23 //DTD Ant Installer Config//EN" "http://antinstaller.sf.net/dtd/antinstall-config-0.8.dtd">
<installer
			ui="swing,text"
			verbose="true"
			debug="false"
			lookAndFeel="org.tp23.jgoodies.plaf.plastic.PlasticXPLookAndFeel"
			name="Greenstone@version@ Installer"
			windowIcon="/resources/icon.png"
			defaultImageResource="/resources/header.png"
			minJavaVersion="1.4">

	<!-- select language page -->
	<page type="input" name="language-selector" displayText="">
		<comment name="language-selector-explanation"/>
		<select property="language" defaultValue="en" displayText="" useAsLocale="true">
			<option value="en" text="English"/>
			<option value="fr" text="Français (French)"/>
			<option value="es" text="Español (Spanish)"/>
			<option value="de" text="Deutsch (German)"/>
			<option value="ru" text="русский язык (Russian)"/>
			<option value="zh" text="中文 (Chinese)"/>
			<option value="ar" text="Arabic"/>
			<option value="gu" text="ગુજરાતી (Gujarati)"/>
			<option value="ja" text="日本語 (Japanese)"/>
			<option value="kk" text="Қазақ (Kazakh)"/>
			<option value="pl" text="Polski (Polish)"/>
			<option value="ka" text="Georgian"/>
			<option value="hy" text="Armenian"/>
			<option value="it" text="Italiano (Italian)"/>
		</select>
	</page>

	<!-- intro page -->
	<page type="input" name="intro" displayText="">
		<comment name="welcome"/>
	</page>

	<!-- licence page -->
	<page type="license" name="license" resource="/LICENSE.txt"  displayText="" />

	<!--  install destination page -->
	<page type="input" name="destination" displayText="">

		<!-- if linux|mac -->
		<directory property="installDir"
			defaultValue="/usr/local/Greenstone,${env.HOME}/Greenstone"
			create="true"
			displayText=""
			flagFile="_uninst"
			flagFileExistsProperty="ISInstallDetected"
			/>
		<!-- /if -->
		<!-- if windows -->
		<directory property="installDir"
			defaultValue="C:\Program Files\Greenstone,${env.HOMEDRIVE}\${env.HOMEPATH}\Greenstone"
			create="true"
			displayText=""
			flagFile="_uninst"
			flagFileExistsProperty="ISInstallDetected"
			/>
		<!-- /if -->

	</page>

	<!-- don't budge if installshield installation found -->
	<page type="input" name="dontBudge" displayText="" ifProperty="(${ISInstallDetected}==true)" showNextButton="false">
		<comment name="is-install-detected"/>
	</page>

	<!-- components -->
	<page type="input" name="selector" displayText="">
		<comment name="choose-components"/>

		<!-- if linux|windows|mac -->
		<target
			target="Initialising"
			diskRequirement="x"
			defaultValue="true"
			displayText="x"
			force="true"
			hidden="true"/>
		<!-- /if -->

		<target
			target="Installing Core System"
			diskRequirement="@component.size.core@"
			displayText=""
			defaultValue="true"
			force="true"/>

		<target
		        target="Installing Apache Web Server"
			diskRequirement="@component.size.httpd@"
			displayText=""
			defaultValue="true"/>

		<target
			target="Installing ImageMagick"
			diskRequirement="@component.size.imagemagick@"
			defaultValue="true" 
			displayText=""/>

		<!-- if windows|mac -->
		<target
			target="Installing Ghostscript"
			diskRequirement="@component.size.ghostscript@"
			defaultValue="true" 
			displayText=""/>
		<!-- /if -->


		<!-- start cdrom -->
		<!-- the size of this component has to be maintained manually as we can't
			know at compile time how big the documented examples are -->
		<target
			target="Installing Documented Examples"
			diskRequirement="108 MB"
			defaultValue="true" 
			displayText=""/>
		<!-- end cdrom -->

		<!-- if windows -->
		<target
			target="Installing Start Menu Shortcuts"
			diskRequirement="~10 KB"
			defaultValue="true"
			displayText=""/>
		<!-- /if -->

	</page>

	<!-- page to ask if we should enable admin pages -->
	<page type="input" name="admin-pages" displayText="">
		<comment name="admin-expl"/>
		<comment name="admin-expl-2"/>
		<comment name="admin-expl-3"/>
		<checkbox property="enable.admin.pages" displayText="" defaultValue="false"/>
	</page>

	<!-- only if they said yes above, set a password -->
	<page type="input" name="admin-password" displayText="" ifProperty="(${enable.admin.pages}==true)" target="Configuring Administration Pages">
		<comment name="admin-password-expl"/>
		<validated property="admin.password" defaultValue="" displayText="" regex="^.{3,20}$"/>
	</page>

	<!-- progress page -->
	<page type="progress" name="progress" showTargets="true" displayText=""/>

</installer>
