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 09:09] – [Source Distribution] 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 106: Line 125:
   - The Java Runtime (JRE) included with Greenstone 3 binaries is a 32 bit Java 7 runtime. This means that //if the Windows machine that you're recompiling the binary with the source component on is not 32 bit Java 7 too//, then you will need to do the following before compiling \\   - The Java Runtime (JRE) included with Greenstone 3 binaries is a 32 bit Java 7 runtime. This means that //if the Windows machine that you're recompiling the binary with the source component on is not 32 bit Java 7 too//, then you will need to do the following before compiling \\
      * rename ''packages\jre'' to something else, so that when Greenstone runs after compiling, it uses your system Java rather than the old 32 bit JRE v7.      * rename ''packages\jre'' to something else, so that when Greenstone runs after compiling, it uses your system Java rather than the old 32 bit JRE v7.
-     * run ''ant distclean'' from the toplevel Greenstone installation folder, to clear all the older compile products created by compiling with 32 bit Java 7.\\ If you see a failure message about being unable to delete a file called 'cp.jar', run ''del \path\to\cp.jar'' manually from the command line for the exact file path listed. Then re-run ''ant distclean''. There are several cp.jar files in different locations of the GS3 installation, any or all of which can cause this failure message. So keep repeating the cycle of re-running ''ant distclean'' then manually running ''del'' on any cp.jar file listed in any failure message, until the ''ant distclean'' step finally succeeds (so without failure messages). This issue may be due to Windows having filelocks on the ''cp.jar'' files.+     * run ''ant distclean'' from the toplevel Greenstone installation folder, to clear all the older compile products created by compiling with 32 bit Java 7.\\ If you see the following error message <code>     [exec] Could Not Find GS3\gs2build\common-src\src\gdbmedit\gdbmdel\*.obj 
 +     [exec] Could Not Find GS3\gs2build\common-src\src\gdbmedit\gdbmdel\gdbmdel.exe 
 +     [exec]     cd "GS3\gs2build\common-src" 
 +     [exec]     cd src\gdbmedit\gdbmdel 
 +     [exec]     "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.11.25503\bin\HostX64\x6 
 +4\nmake.exe" /f win32.mak GSDLHOME="GS3\gs2build" clean 
 +     [exec]     del *.obj 
 +     [exec]     del gdbmdel.exe 
 +     [exec]     cd "GS3\gs2build\common-src" 
 +     [exec]     cd indexers 
 +     [exec]     set DEBUG=0 
 +     [exec]     set VISUAL_STUDIO_MAJORVERSION= 
 +     [exec]     set ENABLE_MG=1 
 +     [exec]     set ENABLE_MGPP=1 
 +     [exec]     set ENABLE_LUCENE=1 
 +     [exec]     call winMake.bat clean 
 +     [exec] GS3\gs2build\common-src\indexers\bin\*, Are you sure (Y/N)? 
 +>>>>     [exec] 14 was unexpected at this time. <<<<<<<<<<<<<<<<<<<< 
 +     [exec] NMAKE : fatal error U1077: 'call' : return code '0xff' 
 +     [exec] Stop. 
 + 
 +BUILD FAILED 
 +GS3\build.xml:4104: exec returned: 2</code>Edit your GS3\gs2build\common-src\indexers\winMake.bat script by commenting out the following line in it<code>::if %VISUAL_STUDIO_MAJORVERSION% LSS 14 set ICONVZIP=iconv-PRE-VS14.zip</code>\\ If you see a failure message about being unable to delete a file called 'cp.jar', run ''del \path\to\cp.jar'' manually from the command line for the exact file path listed. Then re-run ''ant distclean''. There are several cp.jar files in different locations of the GS3 installation, any or all of which can cause this failure message. So keep repeating the cycle of re-running ''ant distclean'' then manually running ''del'' on any cp.jar file listed in any failure message, until the ''ant distclean'' step finally succeeds (so without failure messages). This issue may be due to Windows having filelocks on the ''cp.jar'' files.
      * you may also want to want to delete ''gli\jar'' and ''gli\classes\org'', if they exist, to clear up GLI before recompiling.           * you may also want to want to delete ''gli\jar'' and ''gli\classes\org'', if they exist, to clear up GLI before recompiling.     
   - Finally, you can compile Greenstone 3. Still in your Greenstone installation folder, run ''ant install''.   - Finally, you can compile Greenstone 3. Still in your Greenstone installation folder, run ''ant install''.
Line 116: Line 157:
 **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 143: Line 184:
   - Now you can finally compile Greenstone 3. Still in your Greenstone installation folder, run ''ant install''.   - Now you can finally compile Greenstone 3. Still in your Greenstone installation folder, run ''ant install''.
   - It can take several minutes to compile up.   - It can take several minutes to compile up.
 +
 +Once compiled up, you may want imagemagick in your installation as the source distribution does not come with one nor built it for windows.
 +To grab an imagemagick for windows,
 +  - visit https://trac.greenstone.org/browser/gs2-extensions/imagemagick/trunk/imagemagick-windows.zip
 +  - click the "downloading" link to download the zip file
 +  - move the downloaded zip file into your compiled up GS3 source distribution folder's ''gs2build\bin\windows'' subfolder
 +  - extract the ''imagemagick'' folder of the zip file directly into this location (so you end up with ''your-GS3-src-dist\gs2build\bin\windows\imagemagick'')
 +
  
 **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 216:
  
 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