From: Michael S. <sta...@us...> - 2005-10-04 22:59:41
|
Update of /cvsroot/archive-access/archive-access/projects/wera/src/installer In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23369/wera/src/installer Added Files: README.txt antinstall-config.xml build-wera.xml build.xml install_info.txt Log Message: First time add of wera. Moved here from nwa.nb.no. --- NEW FILE: build-wera.xml --- <?xml version="1.0"?> <!-- $Id: build-wera.xml,v 1.1 2005/10/04 22:59:27 stack-sf Exp $ --> <project name="Create WERA Installer Zip Build" default="selfextract" basedir="."> <taskdef resource="net/sf/antcontrib/antcontrib.properties"/> <target name="selfextract" depends=""> <echo message="Starting the Wera installer build ... "/> <input message="Please enter sourceforge-username, hit enter for default [sverreb]:" addproperty="nwa.sfuser" defaultvalue="sverreb"/> <input message="Please enter CVS-TAG to build from. Note! The tag has to exist. Hit enter for default [head]:" addproperty="wera.cvstag" defaultvalue="head"/> <echo message="CVS-user: ${nwa.sfuser}"/> <!-- Properties for CVS --> <property name="cvsexport" location="${basedir}/cvsexport"/> <delete dir="${cvsexport}"/> <mkdir dir="${cvsexport}"/> <!-- Properties for generating documentation --> <property name="input.file" value="${cvsexport}/wera/doc/manual.xml"/> <property name="output.html" value="${cvsexport}/manual/manual.html"/> <property name="output.pdf" value="${cvsexport}/manual/manual.pdf"/> <property name="docbook.dir" value="/usr/share/xml/docbook" /> <property name="saxon.dir" value="/usr/share/saxon" /> <property name="fop.dir" value="/usr/share/fop/build" /> <property name="jimi.dir" value="/usr/share/fop/lib" /> <echo message="Fetching source code ... "/> <tstamp> <format property="werabuildtime" pattern="yyyyMMddHHmm"/> </tstamp> <if> <equals arg1="${wera.cvstag}" arg2="head" /> <then> <property name="werapack" value="wera-${werabuildtime}"/> <echo message="Package name: ${werapack}"/> <echo message="Retrieving most recent files from cvs"/> <cvs command="export" cvsRoot=":ext:${nwa.sfuser}@cvs.sf.net:/cvsroot/nwatoolset" package="retriever wera" date="tomorrow" dest="${cvsexport}" failonerror="true"/> </then> <elseif> <equals arg1="${wera.cvstag}" arg2="test" /> <then> <echo message="Using local files to build (TEST!)"/> <copy todir="${cvsexport}"> <fileset dir="cvslocal"/> </copy> <property name="werapack" value="wera-test-${werabuildtime}"/> </then> </elseif> <else> <echo message="Retrieving files with tag ${wera.cvstag} from cvs"/> <cvs command="export" cvsRoot=":ext:${nwa.sfuser}@cvs.sf.net:/cvsroot/nwatoolset" package="retriever wera" tag="${wera.cvstag}" dest="${cvsexport}" failonerror="true"/> <property name="werapack" value="${wera.cvstag}"/> <echo message="Package name: ${werapack}"/> </else> </if> <delete file="${cvsexport}/wera/gui/lib/config.inc"/> <echo message="Generating documentation"/> <mkdir dir="${cvsexport}/manual"/> <copy todir="${cvsexport}/manual"> <fileset dir="${cvsexport}/wera/doc"> <include name="images/*"/> <include name="RELEASE-NOTES"/> </fileset> </copy> <path id="fop.classpath"> <fileset dir="${fop.dir}"> <include name="**/*.jar"/> </fileset> <fileset dir="${jimi.dir}"> <include name="**/*.jar"/> </fileset> </path> <echo message="Creating manual.html"/> <java jar="${saxon.dir}/saxon.jar" fork="true" output="${output.html}"> <arg value="${input.file}"/> <arg value="${docbook.dir}/stylesheet/nwalsh/current/html/docbook.xsl"/> </java> <echo message="Creating manual.pdf"/> <java classname="org.apache.fop.apps.Fop" fork="true"> <classpath refid="fop.classpath"/> <arg line="-xml ${input.file}"/> <arg line="-xsl ${docbook.dir}/stylesheet/nwalsh/current/fo/docbook.xsl"/> <arg value="${output.pdf}"/> </java> <echo message="Building ARC Retriever"/> <ant dir="${cvsexport}/retriever/arcretriever"/> <zip file="./wera.zip"> <zipfileset dir="${cvsexport}"> <include name="manual/**/*"/> <include name="wera/gui/**/*"/> </zipfileset> <zipfileset dir="${cvsexport}/retriever/arcretriever"> <include name="ArcRetriever.war"/> </zipfileset> <!--<zipfileset dir="${cvsexport}/nutchwax"> <include name="archive-access-nutch.war"/> </zipfileset>--> </zip> <echo message="Building manual install package"/> <property name="manualinstalldir" location="${basedir}/manual-install"/> <delete dir="${manualinstalldir}"/> <mkdir dir="${manualinstalldir}"/> <mkdir dir="${manualinstalldir}"/> <copy todir="${manualinstalldir}/wera"> <fileset dir="${cvsexport}/wera/gui"/> </copy> <mkdir dir="${manualinstalldir}/wera/manual"/> <mkdir dir="${manualinstalldir}/wera/manual/images"/> <copy file="${cvsexport}/manual/manual.html" tofile="${manualinstalldir}/wera/manual/manual.html"/> <copy file="${cvsexport}/manual/manual.pdf" tofile="${manualinstalldir}/wera/manual/manual.pdf"/> <copy file="${cvsexport}/manual/RELEASE-NOTES" tofile="${manualinstalldir}/wera/RELEASE-NOTES"/> <copy todir="${manualinstalldir}/wera/manual/images"> <fileset dir="${cvsexport}/manual/images"/> </copy> <copy file="${cvsexport}/wera/gui/lib/config.inc.template" tofile="${manualinstalldir}/wera/lib/config.inc"/> <replace file="${manualinstalldir}/wera/lib/config.inc"> <replacefilter token="@aidPrefix@" value="/var/arcs"/> <replacefilter token="@aidSuffix@" value=".arc.gz"/> <replacefilter token="@guiInstallDir@" value="/opt/lampp/htdocs/wera"/> <replacefilter token="@hostName@" value="localhost"/> <replacefilter token="@retrieverUrl@" value="http://localhost:8080/ArcRetriever/ArcRetriever"/> <replacefilter token="@guiUrl@" value="http://localhost/wera"/> <!--<replacefilter token="@guiCollection@" value="${guiCollection}"/>--> <replacefilter token="@collection@" value="test"/> <replacefilter token="@searchEngine@" value="nutch"/> <replacefilter token="@searchEngineUrl@" value="http://localhost:8080/nutchwax/opensearch"/> </replace> <copy file="${cvsexport}/retriever/arcretriever/ArcRetriever.war" tofile="${manualinstalldir}/wera/ArcRetriever.war"/> <tar tarfile="${werapack}-manual-install.tar" basedir="${manualinstalldir}"/> <gzip zipfile="${werapack}-manual-install.tar.gz" src="${werapack}-manual-install.tar"/> <delete file="${werapack}-manual-install.tar"/> <echo message="Building Installer package"/> <mkdir dir="./selfextract"/> <unjar dest="./selfextract"> <fileset dir="installlib"> <include name="*.jar"></include> </fileset> </unjar> <copy todir="./selfextract"> <fileset dir="installclasspath"> <include name="resources/*"/> </fileset> </copy> <copy todir="./selfextract"> <fileset dir="."> <include name="build.xml"/> <include name="antinstall-config.xml"/> <include name="wera.zip"/> </fileset> </copy> <delete file="wera.zip"/> <copy todir="./selfextract"> <fileset dir="${cvsexport}/wera/installer"> <include name="install_info.txt"/> </fileset> </copy> <copy todir="./selfextract"> <fileset dir="${cvsexport}/wera/doc/images"> <include name="iipc.png"/> </fileset> </copy> <jar file="./${werapack}-installer.jar" compress="false"> <manifest> <attribute name="Manifest-Version" value="1.0"/> <attribute name="Main-Class" value="org.tp23.antinstaller.selfextract.SelfExtractor"/> <attribute name="Look-And-Feel" value="org.tp23.jgoodies.plaf.plastic.PlasticXPLookAndFeel"/> </manifest> <fileset dir="selfextract"> <include name="**/*"/> </fileset> </jar> </target> </project> --- NEW FILE: install_info.txt --- REQUIREMENTS ------------ * A JVM. * Apache http server w. PHP 4.3 or 4.4. (make sure that XML support is enabled, see end for details). WERA will NOT work properly with PHP 5, because of the new Object Model. If PHP not installed, the quickest solution may be to install XAMPP, http://www.apachefriends.org/en/xampp.html * Tomcat servlet container (http://jakarta.apache.org/tomcat/index.html). The ArcRetriever web app has been tested on v.5.0.27 and 5.0.28 * NutchWAX. A bundling of Nutch and extensions for searching Web Archive Collections (WACs) http://archive-access.sourceforge.net/projects/nutch/ THE NEXT STEPS -------------- This installer will install the following: * WERA (PHP) * The ARC Retriever (Java webapp) You will be asked to enter the directories in which to install the different components. For the installtion of the ARC retriever you need to enter the webapp directory of your Tomcat installation. You will also be asked where yuor ARC files recide. For the installation of WERA you need to enter the DocumentRoot directory of your Apache installation (e.g. /usr/local/apache/htdocs or /opt/lampp/htdocs). The installer will create the directory wera if you haven't created one on beforehand. The installer assumes that the wera directory is created in the web root and updates configuration files accordingly. If you decide to install the gui further down in the directory structure you will need to manually edit the parameter $conf_http_host in the file lib/config.inc in order to get wera to work. ADDITIONAL INFO --------------- * PHP XML support: XML support is needed by WERA to handle the search results returned from the nutchwax search engine. To verify that XML support is enabled in php simply store the following text in a php-file (e.g. info.php) and save it in the apache DocumentRoot directory <?php phpinfo(); ?> Open up http://<yourhost>/info.php in a browser and check that PHP has NOT been compiled with --disable-xml --- NEW FILE: build.xml --- <?xml version="1.0"?> <project name="Installation Build" default="" basedir="${basedir}"> <!-- $Id: build.xml,v 1.1 2005/10/04 22:59:27 stack-sf Exp $ --> <taskdef resource="net/sf/antcontrib/antcontrib.properties"/> <!-- Required to pick up the properties generated during the install pages: --> <property file="${basedir}/ant.install.properties"/> <target name="default" depends=""> <echo message="Basedir [${basedir}]"/> <mkdir dir="${basedir}/temp"/> <unzip src="wera.zip" dest="${basedir}/temp"/> </target> <target name="tginstall" depends=""> <if> <equals arg1="${apachePort}" arg2="80" /> <then> <property name="apacheHostPort" value="${hostName}"/> </then> <elseif> <equals arg1="${apachePort}" arg2="" /> <then> <property name="apacheHostPort" value="${hostName}"/> </then> </elseif> <else> <property name="apacheHostPort" value="${hostName}:${apachePort}"/> </else> </if> <echo message="Installing GUI"/> <mkdir dir="${apacheWebRootDir}/wera"/> <copy todir="${apacheWebRootDir}/wera"> <fileset dir="${basedir}/temp/wera/gui"/> </copy> <mkdir dir="${apacheWebRootDir}/wera/manual"/> <mkdir dir="${apacheWebRootDir}/wera/manual/images"/> <copy file="${basedir}/temp/manual/manual.html" tofile="${apacheWebRootDir}/wera/manual/manual.html"/> <copy file="${basedir}/temp/manual/manual.pdf" tofile="${apacheWebRootDir}/wera/manual/manual.pdf"/> <copy file="${basedir}/temp/manual/RELEASE-NOTES" tofile="${apacheWebRootDir}/wera/RELEASE-NOTES"/> <copy todir="${apacheWebRootDir}/wera/manual/images"> <fileset dir="${basedir}/temp/manual/images"/> </copy> <copy file="${basedir}/temp/wera/gui/lib/config.inc.template" tofile="${apacheWebRootDir}/wera/lib/config.inc"/> <replace file="${apacheWebRootDir}/wera/lib/config.inc"> <replacefilter token="@aidPrefix@" value="${arcDirectory}"/> <replacefilter token="@aidSuffix@" value=".arc.gz"/> <replacefilter token="@guiInstallDir@" value="${apacheWebRootDir}/wera"/> <replacefilter token="@hostName@" value="${hostName}"/> <replacefilter token="@retrieverUrl@" value="http://${hostName}:${tomcatPort}/ArcRetriever/ArcRetriever"/> <replacefilter token="@guiUrl@" value="http://${apacheHostPort}/wera"/> <!--<replacefilter token="@guiCollection@" value="${guiCollection}"/>--> <replacefilter token="@collection@" value="test"/> <replacefilter token="@searchEngine@" value="nutch"/> <replacefilter token="@searchEngineUrl@" value="http://${hostName}:${tomcatPort}/nutchwax/opensearch"/> </replace> <echo message="Installing wera ARC Retriever"/> <copy file="${basedir}/temp/ArcRetriever.war" tofile="${tomcatWebAppDir}/ArcRetriever.war"/> <!--<echo message="Installing Nutch ARC-indexer"/> <echo message="Installing Nutch Search Web Application"/> <copy file="${basedir}/temp/archive-access-nutch.war" tofile="${tomcatWebAppDir}/archive-access-nutch.war"/>--> </target> <target name="cleanuptarget" depends=""> <delete dir="${basedir}/temp"></delete> </target> </project> --- NEW FILE: README.txt --- NwaToolset installer building In order to generate WERA packages you need to have AntInstaller, a front-end for Ant installed on the machine where you are building the installer package. Pre-requisites: Install Ant, Ant-contrib and AntInstaller http://ant.apache.org/, http://ant-contrib.sourceforge.net/, http://antinstaller.sourceforge.net/, 1. Copy (or rename) the $ANTINSTALLERHOME/wera directory to $ANTINSTALLERHOME/wera. 2. Copy ant-contrib.jar into $ANTINSTALLERHOME/wera/installlib 3. Download build-nwatoolset.xml, antinstall-config.xml and build.xml from the installer directory at sourceforge and place them in $ANTINSTALLERHOME/wera 4. cd to $ANTINSTALLERHOME/wera and execute ant -buildfile build-wera.xml 5. The installer package, wera-<tag or date>-installer.jar and wera-<tag or date>-manual-install.tar.gz is created in $ANTINSTALLERHOME/wera 6. Installation testing: java -jar wera-<tag or date>-installer.jar --- NEW FILE: antinstall-config.xml --- <?xml version="1.0"?> <!DOCTYPE installer PUBLIC "-//tp23 //DTD Ant Installer Config//EN" "http://antinstaller.sf.net/dtd/antinstall-config-0.7.dtd"><!-- $Id: antinstall-config.xml,v 1.1 2005/10/04 22:59:27 stack-sf Exp $ --> <installer ui="swing,text" verbose="true" lookAndFeel="org.tp23.jgoodies.plaf.plastic.PlasticXPLookAndFeel" name="Wera Installer" windowIcon="/resources/gkmain_inv.png" defaultImageResource="/iipc.png" minJavaVersion="1.4"> <page type="input" name="intro" displayText="Welcome to the WERA installer program" imageResource="/iipc.png"> <comment displayText="" explanatoryText="Copyright (C) 2001-2005 Royal Library in Stockholm, Royal Library in Copenhagen, Helsinki University Library of Finland, National Library of Norway, National and University Library of Iceland."/> <comment displayText="http://nwatoolset.sourceforge.net/"/> <comment displayText="http://netpreserve.org/"/> </page> <page type="license" name="license" displayText="WERA license conditions" resource="/resources/GPL.txt"/> <page type="license" name="info" displayText="Install info" resource="/install_info.txt" target="default"/> <page type="input" name="directories" displayText="Install directories"> <directory property="apacheWebRootDir" defaultValue="/opt/lampp/htdocs" displayText="Apache Document Root dir" create="true"/> <directory property="tomcatWebAppDir" defaultValue="/usr/local/jakarta-tomcat/webapps" displayText="Tomcat web app dir" create="true"/> <comment displayText=""/> <directory property="arcDirectory" defaultValue="/var/arcs" displayText="ARC file directory:" explanatoryText="Please enter the directory where the ARC files you have indexed /plan to index with nutchwax. The ARC retriever in this release has no knowledge of where ARC files recide. When WERA retrieves a specific archived document from the retriever the request has to include the full path to the ARC file in question. This will change in later releases."/> <!--<directory property="nutchwaxDir" defaultValue="/usr/local/nutchwax" displayText="NutchWax install dir" create="true"/>--> <!--<text property="guiCollection" defaultValue="test" displayText="Collection name:"/>--> </page> <page type="input" name="settings" displayText="Verify settings" target="tginstall"> <text property="hostName" defaultValue="${env.HOSTNAME}" displayText="Host name:"/> <text property="tomcatPort" defaultValue="8080" displayText="Tomcat port number:"/> <text property="apachePort" defaultValue="80" displayText="Apache port number:"/> </page> <!-- <page type="input" name="searchengine" displayText="Nutch Search Engine" target="tginstall"> <text property="searchEngineUrl" defaultValue="http://${hostName}:${tomcatPort}/nutchwax/opensearch" displayText="Nutch A9 opensearch url:"/> </page> --> <page type="progress" name="progress" displayText="Installation progress" target="cleanuptarget"></page> </installer> |