User Tools

Site Tools


en:user_advanced:installation

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
en:user_advanced:installation [2023/03/19 21:15] – [Uptodate source code from SVN] kjdonen:user_advanced:installation [2023/07/29 08:34] – [Windows] anupama
Line 1: Line 1:
- 
 Updated on 30 Sep 2021, with changes that do not apply for Greenstone 3.10 and earlier. Updated on 30 Sep 2021, with changes that do not apply for Greenstone 3.10 and earlier.
 For instructions related to compiling GS3.10 from source distribution or with source component, or with source code from before September 2021, refer to the now [[old:user_advanced:installation|older version of this Advanced Installation page]]. For instructions related to compiling GS3.10 from source distribution or with source component, or with source code from before September 2021, refer to the now [[old:user_advanced:installation|older version of this Advanced Installation page]].
Line 29: Line 28:
  
 Prerequisites for compiling the source component and source distribution on Windows: Prerequisites for compiling the source component and source distribution on Windows:
-  * Java JDK 6.x or later. For compiling on Windows 64 bit, need the 64 bit version of JDK. For compiling Greenstone 3.06 and onwards, need JDK 7.x or later.+  * For compiling on Windows 64 bit, need the 64 bit version of JDK. For 3.11 and onwards, JDK 8 is needed. For compiling Greenstone 3.06 and onwards, need JDK 7.x or later. For old versions of Greenstone: Java JDK 6.x or later. 
 +C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvarsall.bat
   * PERL: if you're using GS3.07 or earlier, get ActivePerl for Windows. From GS3.08 onwards, binaries and source distributions come with a [[http://trac.greenstone.org/browser/main/trunk/release-kits/shared/windows/perl.zip|Strawberry Perl]] located in the GS3's ''gs2build\bin\windows\perl'' folder.   * PERL: if you're using GS3.07 or earlier, get ActivePerl for Windows. From GS3.08 onwards, binaries and source distributions come with a [[http://trac.greenstone.org/browser/main/trunk/release-kits/shared/windows/perl.zip|Strawberry Perl]] located in the GS3's ''gs2build\bin\windows\perl'' folder.
   * Visual Studio 8 or later (Visual Studio 12 on 64 bit Windows 10 worked too.)   * Visual Studio 8 or later (Visual Studio 12 on 64 bit Windows 10 worked too.)
Line 47: Line 47:
 :: For this, need to cd into the folder where this script lives using the short filename path to this folder :: For this, need to cd into the folder where this script lives using the short filename path to this folder
 :: %0 is this script :: %0 is this script
-:: %~dp gives the full path to the folder containing this script. +:: For the following 2 lines, the spaces between percent sign, tilde and what follows after need to be removed 
-:: %~s gives the windows short filename version+:: when writing the active command based on those lines. Spaces have been inserted in the following 
 +:: to prevent this script from causing errors about these commented out lines when running. 
 +:: % ~ dp gives the full path to the folder containing this script. 
 +:: % ~ s gives the windows short filename version
 :: Combine to get what we want. :: Combine to get what we want.
 :: Note that this will leave the DOS prompt pointing to short filename of the folder :: Note that this will leave the DOS prompt pointing to short filename of the folder
Line 80: Line 83:
 :: (It may be apache httpd that needs 32 bit mode to compile.) :: (It may be apache httpd that needs 32 bit mode to compile.)
 :: For now only VS9.0 (VS2008) works :: For now only VS9.0 (VS2008) works
 +
  
 :: FOR COMPILING GS2 on WINDOWS: :: FOR COMPILING GS2 on WINDOWS:
Line 91: Line 95:
 :: (if using 64 bit windows, uncomment the following line by removing the two colons at its start) :: (if using 64 bit windows, uncomment the following line by removing the two colons at its start)
 :: call "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\vcvarsall.bat" amd64 :: call "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\vcvarsall.bat" amd64
 +
 +
 +
 +:: TO LOCATE YOUR vcvars32.bat (GS2/GS3) OR vcvarsall.bat (GS3) IN YOUR VISUAL STUDIO INSTALLATION:
 +:: Different Visual Studio installations can contain the vcvars32.bat and/or vcvarsall.bat in locations
 +:: different to the above examples. To locate your installation's instances of these scripts:
 +:: Open a DOS prompt and cd/change directory into your Visual Studio folder. Then use the command: dir /b /s "*search-term*"
 +:: and specify find the vcvars script by name, e.g.
 +:: C:\Program Files (x86)\Microsoft Visual Studio>dir /b /s "*vcvarsall.bat*"
 +:: If such a file exists within your Visual Studio installation, the prompt will return the location, e.g.
 +::    C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvarsall.bat
 +:: Use this result in the "call" command above
 +:: (and further, only for vcvarsall.bat, but not for vcvars32.bat, pass in: amd64), e.g.
 +:: call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" amd64
 +
  
 :done :done
Line 116: Line 135:
 **Note if you want to use the bundled JRE for Windows 64 bit:** **Note if you want to use the bundled JRE for Windows 64 bit:**
  
-To run GLI after recompiling your binary on a 64 bit Windows machine, you need JDK 7 (or JRE 7) for 64 bit set up in your environment, since the JRE included with the Greenstone Windows binary is for 32 bit, as the Greenstone Windows binary itself is 32 bit. Otherwise, the problem seen when running the 64-bit recompiled GS3 server with the 32-bit JRE included in GS3 binaries is a tomcat error explaining the discrepancy between the two architectures.+To run GLI after recompiling your binary on a 64 bit Windows machine, you need JDK or JRE 8 (for pre-GS3.11 you'd need JDK 7 else JRE 7) for 64 bit set up in your environment, since the JRE included with the Greenstone Windows binary is for 32 bit, as the Greenstone Windows binary itself is 32 bit. Otherwise, the problem seen when running the 64-bit recompiled GS3 server with the 32-bit JRE included in GS3 binaries is a tomcat error explaining the discrepancy between the two architectures.
  
-Therefore, to run GLI after compiling GS3 for 64 bit, add the bin folder of JRE for 64 bit to the PATH, or set JAVA_HOME to JDK 64 bit and add its bin folder to the PATH. Then run GLI in this environment.+Therefore, to run GLI after compiling GS3 for 64 bit, add the bin folder of JRE for 64 bit to the PATH, or set JAVA_HOME to JDK 64 bit and add its bin folder to the PATH. Then run GLI in this environment.
 <tabbox Greenstone2> <tabbox Greenstone2>
   - Get the source component zip file from the downloads page.   - Get the source component zip file from the downloads page.
Line 146: Line 165:
 **Notes for Windows 64 bit:** **Notes for Windows 64 bit:**
  
-To run GLI or the gs3-server after compiling the source code on a 64 bit Windows machine, you need your environment to be set up with JDK 7+ (or JRE 7+) for 64-bit and Ant: set the JAVA_HOME environment variable to your 64 bit JDK and add the JDK's ''bin'' folder to the PATH. Also set the ANT_HOME environment variable and add its ''bin'' folder to the PATH. Then run GLI or gs2-server in this environment using the gli.bat and gs2-server.bat scripts. +To run GLI or the gs3-server after compiling the source code on a 64 bit Windows machine, you need your environment to be set up with JDK 8 or JRE 8 (or JDK 7+ else JRE 7+ for Greenstone versions prior to GS3.11) for 64-bit and Ant: set the JAVA_HOME environment variable to your 64 bit JDK and add the JDK's ''bin'' folder to the PATH. Also set the ANT_HOME environment variable and add its ''bin'' folder to the PATH. Then run GLI or gs2-server in this environment using the gli.bat and gs2-server.bat scripts. 
 <tabbox Greenstone2> <tabbox Greenstone2>
   - Get the source distribution zip file from the downloads page.   - Get the source distribution zip file from the downloads page.
Line 167: Line 186:
  
 Prerequisites for compiling on Windows: Prerequisites for compiling on Windows:
-  * Java JDK 6.x or later+  * Java JDK 6.x or later, JDK 7+ for GS3.06 onwards, and JDK 8 for GS3.11 onwards
   * PERL (ActivePerl for Windows   * PERL (ActivePerl for Windows
   * Visual Studio 8 or later   * Visual Studio 8 or later
en/user_advanced/installation.txt · Last modified: 2023/08/03 03:07 by anupama