[greenstone-users] Hello. I'm connecting from Mongolia.

From Greenstone Team
DateMon Aug 22 17:27:18 2011
Subject [greenstone-users] Hello. I'm connecting from Mongolia.
In-Reply-To (CAH9rP-YbpscVCG03p-qvhRPHkP3p=ECGrazi1cBuXvYfMaFUyA-mail-gmail-com)
Hi again,

Also see the previous email I just sent, which contains answers to your
other questions.

> Now, I wish it is developer's environment. What do i install on my
PC? please.

(1) On Linux (and Mac):
- You need to install SVN. See instructions at
- You need Perl. Check if this is already installed by typing "perl -v"
in a command-line. Else get perl and install it.
- You need to install Java 1.5.*
- Next, create the JAVA_HOME environment variable and set this to your
Java installation folder.
- Add Java's bin, svn's bin, and perl's bin folders to your PATH
environment variable.
- Having set up the environment as above, try running the following in
your x-term to get the Greenstone 2 code:

> svn co http://svn.greenstone.org/main/trunk/greenstone2 greenstone2-svn

This will check out all the Greenstone 2 code into a new folder called
"greenstone2-svn in the current location.

- Next, to configure and compile, run the following commands (each step
can take some minutes):
> ./configure --enable-apache-httpd
> make
> make install

(2) On Windows, you will additionally need Visual Studio and Microsoft
SDK (1 Gb download).
So, for Windows:

- You need to install an SVN command-line client for Windows. Get the
latest version.
- You need to install ActivePerl. Get the latest version.
- You need to install Java 1.5.*
- You will need to install Microsoft SDK
- You need to have Visual Studio

- Create a batch script, called setupenv.bat that will set the
environment to what is necessary to compile Greenstone. Paste the
following into your setupenv.bat file. Then adjust the file's contents
to point to where your Java, Perl, SVN, Microsoft SDK and Visual Studio
are installed.


@echo off

set JAVA_HOME=C:Program FilesJavajdk1.6.0_22

:: If you're compiling GS2, edit these next lines to contain the paths for
:: 1. Microsoft SDK's "setenv.cmd" file and
:: 2. Visual Studio's "vcvars.bat" file
:: make sure to call them in the given order
call "C:Program FilesMicrosoft SDKsWindowsv6.1BinSetEnv.cmd"
call "C:Program FilesMicrosoft Visual Studio 9.0VCbinvcvars32.bat"



- Now that you have the file setupenv.bat, open a DOS prompt and call it:
> setupenv.bat

- Now that running setupenv.bat has set up your DOS prompt's environment
for compiling Greenstone 2, use that DOS window to go into your
Greenstone 2's installation folder and run the Greenstone compilation

> nmake /f win32.mak DEBUG=1
> nmake /f win32.mak DEBUG=1 LOCAL_LIBRARY=1
> nmake /f win32.mak DEBUG=1 APACHE_HTTPD=1

Each of the 3 commands above can take some time. Alternatively, you can
try running them all in one step:
> nmake /f win32.mak DEBUG=1 && nmake /f win32.mak DEBUG=1
LOCAL_LIBRARY=1 && nmake /f win32.mak DEBUG=1 APACHE_HTTPD=1

(You can remove the "DEBUG=1" from ALL the commands if you don't plan on
ever debugging the code. Otherwise, it's not a bad idea to leave the
debug flag in.)