This page is in the 'old' namespace, and was imported from our previous wiki. We recommend checking for more up-to-date information using the search box.
Walkthrough: installing Greenstone3 from SVN source on Windows
You NEED Visual Studio C++. (We haven't tried it with Microsoft's free Visual Studio Express yet.)
Preparation: what you need
- Make sure you have Java 1.4 or higher. I tried it with Java 1.4.2_08.
Set the environmental variable JAVA_HOME to the full path of the Java installation directory. To set environmental variables on Windows, go to Start > Control Panel. Make sure you are in Classic View, if not, in the left-hand pane, press the Switch to Classic View link.
Now double click on the System icon. Select the Advanced tab, click the Environment Variables button. And create a new (System) variable called JAVA_HOME with the value set to the full path to the Java directory.
- Get Apache Ant, at least version 1.6.2. (I tried it with ant 1.6.5.)
- Create the ANT_HOME environment variable, and set its value to be the full path to the root directory of your ant installation.
- Then adjust the existing PATH variable to include the bin directory of ANT_HOME. I.e. append the following to your Windows Path variable:
- You need the SVN command-line client, because during the first phase of Greenstone 3 source code compilation (the "ant prepare" step) svn is used to download a great many other files that are necessary for compiling and building Greenstone 3.
- Get the SVN command-line client release for Windows, from http://subversion.tigris.org/project_packages.html
For example, I got svn-1.4.6-setup.exe from http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=91
- Once you've downloaded this, install it by doubleclicking on it and going through the installation wizard (carefully read the stuff in the wizard). See also the page https://www.projects.dev2dev.bea.com/Subversion%20Clients/CommandLineSVN.html for instructions on how to install and use the SVN command-line client.
- the README.txt file in the top-level of your greenstone3 installation folder.
- Now we can finally download Greenstone 3 source code from its SVN repository:
Open a command line prompt. Start > Run. Type: cmd. An msdos prompt will launch. Go (using cd) into the folder wherein you want to download greenstone 3 into. Then type:
svn checkout http://svn.greenstone.org/main/trunk/greenstone3
Depending on your Internet connection speed, the above may take a *long* time.
- When it has finished checking out Greenstone 3 code, type the following in the command prompt:
Troubleshooting: If the build fails in this step due to some directory being "locked" (it failed in my case), then it will give you the line number where it failed. Open build.xml in your greenstone3 installation folder and go to the line. If the section around the looks like this:
929 <target name="prepare-core" unless="nosvn.mode"> 930 <!-- just get rid of empty directories--> 931 <svn> 932 <update dir="."/> 933 </svn> 934 </target>
Then comment out <update dir="."/> to get:
929 <target name="prepare-core" unless="nosvn.mode"> 930 <!-- just get rid of empty directories--> 931 <svn> 932 <!-- <update dir="."/> --> 933 </svn> 934 </target>
Try the ant command again:
Depending on your internet speed, the above can also take a very long time (it took me over an hour), as it is further checking out files from Greenstone 3's SVN repository.
- Once it has finished, you need to do the special Windows step which involves Visual Studio (see Note 1 for the old instructions in case they work for you):
- Locate your Visual Studio's vcvars32.bat file. It may be located in C:\Program Files\Microsoft Visual Studio\VC98\Bin\
Just have a look to see where it is on your Visual Studio installation.
- Back in the command prompt go the location where your vcvars32.bat file is, and run it. Example:
cd C:\Program Files\Microsoft Visual Studio\VC98\Bin\ vcvars32.bat
It would now have set up the environment for you to be able to successfully compile greenstone3. Don't close the command prompt, because it's just been set for the next step.
- In the *same* prompt from which you ran vcvars32.bat, go back into your greenstone3 directory and type:
Hopefully, after some time, it will come back saying that your build was successful.
- Now you should be able to run the tomcat web server by typing
in the cmd prompt. Thereafter, open your web browser at http://localhost:8080/greenstone3/
You could also try the following (it did not work for me):
Go into your greenstone 3 folder–the one svn downloaded all the source into. I'm calling the full path to this $GSDLHOME. Now that you are in GSDLHOME, open build.properties. Make sure that the compile.windows.c++.setup is set to the full path location of your Visual Studio's "vcvars32.bat" file. For example, the default value given is:
compile.windows.c++.setup=C:/Program Files/Microsoft Visual Studio/VC98/Bin/VCVARS32.BAT
Go back to the MSDOS prompt, move into your greenstone3 folder and type the following:
For information on further configuration of the installation (such as changing the port number or host name of the web server), see Advanced, the Advanced section of the walkthrough of installing GS3 from SVN for Linux.