en:user_advanced:installation_312
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
en:user_advanced:installation_312 [2025/07/14 22:05] – [Advanced Installation: 3.12] kjdon | en:user_advanced:installation_312 [2025/07/16 01:04] (current) – [Check developer tools and set up environment] kjdon | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | |||
====== Advanced Installation: | ====== Advanced Installation: | ||
//TODO: currently just copied from 3.11 version. update for 3.12// | //TODO: currently just copied from 3.11 version. update for 3.12// | ||
- | // For installation instructions for older versions of Greenstone, please see the [[en: | + | // For installation instructions for older versions of Greenstone, please see the [[en: |
For most users, the main Greenstone download (also called the " | For most users, the main Greenstone download (also called the " | ||
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: | ||
- | * 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:// | ||
- | * Visual Studio 8 or later (Visual Studio 12 on 64 bit Windows 10 worked too.) | ||
- | * (If you want to compile GS2 or GS3 with debugging on, you will need Microsoft SDK) | ||
- | * Additionally //for Greenstone3//: | ||
- | You will need to set up your environment to locate and use the above. For this purpose, it's handy to create | + | * **Microsoft Visual Studio** (8 or later) - for C++ compiling. You can download |
- | <!-- TODO: add in line for Microsoft | + | (TODO - test whether buildtools is enough) |
+ | |||
+ | * **Apache Ant:** Version?? | ||
+ | * If you don't already have Ant installed, please | ||
+ | * **Perl:** From 3.12 you need to use a Greenstone provided Perl which comes with all the necessary cpan libraries installed. This is supplied in a binary release but not in the source distribution. | ||
+ | | ||
+ | | ||
+ | | ||
+ | * (If you want to compile GS3 with debugging on, you will need Microsoft SDK) | ||
+ | * ?? add this to gs3-devel.bat?? | ||
- | < | + | Note: the bundled tar.exe (for unzipping) doesn' |
- | @echo off | + | |
- | :: Script to set up Java, ant, perl | + | * **Java:** JDK 8 is the minimum version needed. JDK 8 or 11 are recommended. GS hasn't been tested yet on higher |
- | :: And set up Visual Studio for compiling | + | * If you have a JDK already installed, please |
+ | * If you don't have a JDK, please run get-selfcontained-jdk.bat | ||
- | :: First: change to using Windows short filenames to allow spaces in the filepath when compiling | ||
- | :: For this, need to cd into the folder where this script lives using the short filename path to this folder | ||
- | :: %0 is this script | ||
- | :: For the following 2 lines, the spaces between percent sign, tilde and what follows after need to be removed | ||
- | :: 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. | ||
- | :: Note that this will leave the DOS prompt pointing to short filename of the folder | ||
- | cd " | ||
- | set JAVA_HOME=C: | ||
- | if not exist " | ||
- | echo %JAVA_HOME% not found. Exiting... | ||
- | goto done | ||
- | ) | ||
- | |||
- | :: From GS3.08 onwards, a Strawberry Perl is included with binaries and source distributions | ||
- | :: in your GS3's gs2build\bin\windows\perl folder | ||
- | set PERLPATH=C: | ||
- | |||
- | :: If you're compiling Greenstone 3, you'll also need ANT | ||
- | :: Note that GS3 binaries ship with Ant, located in '' | ||
- | :: For GS3 source distributions, | ||
- | :: the environment variable below and adjust the PATH. | ||
- | set ANT_HOME=C: | ||
- | |||
- | :: Add the bin folders of Perl and Java (and Ant for GS3) to your PATH | ||
- | set PATH=%PERLPATH%\bin; | ||
- | |||
- | :: If you want to compile GS2 with debugging on, you also need MS SDK and the following line: | ||
- | :: call " | ||
- | |||
- | :: Set up Visual studio environment. vcvars< | ||
- | :: Running VS in 64 bit mode doesn' | ||
- | :: (It may be apache httpd that needs 32 bit mode to compile.) | ||
- | :: For now only VS9.0 (VS2008) works | ||
- | |||
- | |||
- | :: FOR COMPILING GS2 on WINDOWS: | ||
- | :: OR FOR COMPILING GS3 ON 32 BIT WINDOWS: | ||
- | :: (if using 64 bit windows to compile GS3, comment out the following line by prefixing with two colons) | ||
- | call " | ||
- | |||
- | |||
- | :: FOR COMPILING GS3 ON 64 BIT WINDOWS, | ||
- | :: only confirmed to work with MS Visual Studio versions 9.0 and 12 so far: | ||
- | :: (if using 64 bit windows, uncomment the following line by removing the two colons at its start) | ||
- | :: call " | ||
- | |||
- | |||
- | |||
- | :: 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' | ||
- | :: Open a DOS prompt and cd/change directory into your Visual Studio folder. Then use the command: dir /b /s " | ||
- | :: and specify find the vcvars script by name, e.g. | ||
- | :: C:\Program Files (x86)\Microsoft Visual Studio> | ||
- | :: If such a file exists within your Visual Studio installation, | ||
- | :: C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvarsall.bat | ||
- | :: Use this result in the " | ||
- | :: (and further, only for vcvarsall.bat, | ||
- | :: call " | ||
- | |||
- | |||
- | :done | ||
- | </ | ||
- | To make it easier for developers, a batch file containing placeholders you can adjust is already prepared and discussed at [[http:// | ||
==== Source Component ==== | ==== Source Component ==== | ||
- | |||
- | **Note:** Greenstone 3 does not at present compile successfully if it was installed in a place containing spaces. The solution is to move the installed GS3 folder out into a different location, one without spaces in the filepath, //before// compiling. Once compiling is done, you can move your installed GS3 folder back to its original location. | ||
- Get the source component zip file from the downloads page. | - Get the source component zip file from the downloads page. | ||
- Unzip it directly into your Greenstone installation folder, make sure not to create intermediary folders. If Windows prompts you about whether you want existing folders merged (and existing files replaced), tick the box to confirm for all and click in the affirmative. | - Unzip it directly into your Greenstone installation folder, make sure not to create intermediary folders. If Windows prompts you about whether you want existing folders merged (and existing files replaced), tick the box to confirm for all and click in the affirmative. | ||
+ | |||
+ | === Check developer tools and set up environment === | ||
- Open a DOS prompt to run the following scripts and commands: | - Open a DOS prompt to run the following scripts and commands: | ||
- | | + | - Go into your Greenstone installation folder, '' |
- | | + | - ** Visual Studio** |
- | - 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 \\ | + | - ** Java ** - the binary release only comes with a JRE, compiling needs a JDK. Greenstone |
+ | * If you have a suitable Java already installed, please edit local/ | ||
+ | * If you don't have a JDK, please run get-selfcontained-jdk.bat in the ext-cli folder - this will download a JDK 11. | ||
+ | - ** Ant ** - Ant is bundled in the binary | ||
+ | - ** Perl ** - Perl is also bundled in the binary release. | ||
+ | - In the greenstone3 folder, run '' | ||
+ | |||
+ | - The Java Runtime (JRE) included with Greenstone 3 binaries is a 32 bit Java 8 runtime. This means that //if the Windows machine that you're recompiling the binary with the source component on is not 32 bit Java 8 too//, then you will need to do the following before compiling \\ | ||
* rename '' | * rename '' | ||
* run '' | * run '' | ||
Line 148: | Line 89: | ||
BUILD FAILED | BUILD FAILED | ||
- | GS3\build.xml: | + | GS3\build.xml: |
- | * you may also want to want to delete '' | + | |
- Finally, you can compile Greenstone 3. Still in your Greenstone installation folder, run '' | - Finally, you can compile Greenstone 3. Still in your Greenstone installation folder, run '' | ||
+ | - Grab the strawberry perl-with-cpan for Windows from https:// | ||
**To run GS3 after re-compiling: | **To run GS3 after re-compiling: | ||
Line 216: | Line 158: | ||
* [[en: | * [[en: | ||
* ANT | * ANT | ||
- | * Java JDK. JDK 7 for Greenstone 3.06 and onwards. \\ **WARNING: | + | * Java JDK. JDK 8 is the minimum version required. \\ **WARNING: |
* C/C++ compiler: XCode on Mac, gcc/g++ on Linux | * C/C++ compiler: XCode on Mac, gcc/g++ on Linux | ||
en/user_advanced/installation_312.1752530758.txt.gz · Last modified: 2025/07/14 22:05 by kjdon