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/16 00:00] – [Windows] kjdon | en:user_advanced:installation_312 [2025/07/18 05:36] (current) – anupama | ||
---|---|---|---|
Line 29: | Line 29: | ||
Prerequisites for compiling the source component and source distribution on Windows: | Prerequisites for compiling the source component and source distribution on Windows: | ||
- | * **Microsoft Visual Studio** (8 or later) - for C++ compiling. | + | * **Microsoft Visual Studio** (8 or later) - for C++ compiling. |
- | * Please edit local/gs3-devel.bat and check that the paths to Visual Studio and the vcvars script are correct | + | (TODO - test whether buildtools is enough) |
+ | | ||
* **Apache Ant:** Version?? | * **Apache Ant:** Version?? | ||
* If you don't already have Ant installed, please run get-selfcontained-ant.bat in the ext-cli folder | * If you don't already have Ant installed, please run get-selfcontained-ant.bat in the ext-cli folder | ||
Line 40: | Line 41: | ||
* ?? add this to gs3-devel.bat?? | * ?? add this to gs3-devel.bat?? | ||
+ | Note: the bundled tar.exe (for unzipping) doesn' | ||
* **Java:** JDK 8 is the minimum version needed. JDK 8 or 11 are recommended. GS hasn't been tested yet on higher Java versions. For compiling on Windows 64 bit, you will need the 64 bit version of JDK. | * **Java:** JDK 8 is the minimum version needed. JDK 8 or 11 are recommended. GS hasn't been tested yet on higher Java versions. For compiling on Windows 64 bit, you will need the 64 bit version of JDK. | ||
Line 51: | Line 53: | ||
- 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. | ||
- | - Open a DOS prompt to run the following scripts and commands: | ||
- | - Go into your Greenstone installation folder, '' | ||
- | - 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 7 too//, then you will need to do the following before compiling \\ | ||
- | * rename '' | ||
- | * run '' | ||
- | | ||
- | | ||
- | | ||
- | | ||
- | 4\nmake.exe" | ||
- | | ||
- | | ||
- | | ||
- | | ||
- | | ||
- | | ||
- | | ||
- | | ||
- | | ||
- | | ||
- | | ||
- | >>>> | ||
- | | ||
- | | ||
- | BUILD FAILED | + | === Check developer tools and set up environment === |
- | GS3\build.xml:4104: exec returned: 2</ | + | - Open a DOS prompt to run the following scripts and commands: |
- | * you may also want to want to delete '' | + | - Go into your Greenstone installation folder, '' |
+ | - ** Visual Studio** | ||
+ | - ** Java ** - the binary release only comes with a JRE, compiling needs a JDK. Greenstone needs Java 8 or 11 (its untested on higher versions). | ||
+ | * 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 release | ||
+ | - ** 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 \\ | ||
+ | * < | ||
- 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:// | + | - Grab the strawberry perl-with-cpan for Windows from https:// |
**To run GS3 after re-compiling: | **To run GS3 after re-compiling: | ||
Line 99: | Line 86: | ||
- Set up the environment for compiling Greenstone by running the setupenv.bat script described above: '' | - Set up the environment for compiling Greenstone by running the setupenv.bat script described above: '' | ||
- Go into your Greenstone 3 installation folder, '' | - Go into your Greenstone 3 installation folder, '' | ||
- | - Edit your '' | ||
- Now you can finally compile Greenstone 3. Still in your Greenstone installation folder, run '' | - Now you can finally compile Greenstone 3. Still in your Greenstone installation folder, run '' | ||
- It can take several minutes to compile up. | - It can take several minutes to compile up. | ||
- If you don't already have an imagemagick installed on your system and want to have // | - If you don't already have an imagemagick installed on your system and want to have // | ||
+ | - Grab the strawberry perl-with-cpan for Windows from https:// | ||
**Notes for Windows 64 bit:** | **Notes for Windows 64 bit:** | ||
Line 144: | Line 130: | ||
===== Linux/Mac ===== | ===== Linux/Mac ===== | ||
In order to install Greenstone from source on Linux, you need to have the following installed: | In order to install Greenstone from source on Linux, you need to have the following installed: | ||
- | * [[en: | + | * [[en: |
* ANT | * ANT | ||
- | * Java JDK. JDK 8 is the minimum version required. | + | * Java JDK. JDK 8 is the minimum version required. |
* C/C++ compiler: XCode on Mac, gcc/g++ on Linux | * C/C++ compiler: XCode on Mac, gcc/g++ on Linux | ||
Line 156: | Line 142: | ||
export ANT_HOME=/ | export ANT_HOME=/ | ||
export PATH=$JAVA_HOME/ | export PATH=$JAVA_HOME/ | ||
- | </ | + | </ |
- | export CXXFLAGS=" | + | |
- | export JNICFLAGS=" | + | |
- | export CXXFLAGS=" | + | |
- The Java Runtime (JRE) included in binaries from Greenstone 3.07 onward is version 7 and version 8 for Greenstone 3.11 onward. For 32 bit linux binaries, the included JRE is 32 bit and for 64 bit linux binaries the JRE is 64 bit. //If you have set up a system Java of a version different from the JRE included//, then \\ | - The Java Runtime (JRE) included in binaries from Greenstone 3.07 onward is version 7 and version 8 for Greenstone 3.11 onward. For 32 bit linux binaries, the included JRE is 32 bit and for 64 bit linux binaries the JRE is 64 bit. //If you have set up a system Java of a version different from the JRE included//, then \\ | ||
- | * rename the '' | + | * <!--* rename the '' |
- | | + | - Most of the linux and mac machines we tested require the gnome-lib extension. Without it, if compilation fails with an error message about '' |
- | * you may also want to want to delete '' | + | |
- | - Most of the linux and mac machines we tested require the gnome-lib extension. Without it, if compilation fails with an error message about '' | + | |
- Use the terminal to extract the downloaded gnome-lib-minimal extension and set up the gnome-lib environment for compiling as follows:\\ < | - Use the terminal to extract the downloaded gnome-lib-minimal extension and set up the gnome-lib environment for compiling as follows:\\ < | ||
cd gs2build/ | cd gs2build/ | ||
Line 172: | Line 153: | ||
cd ../../.. | cd ../../.. | ||
</ | </ | ||
- | - In the same terminal, you can now finally run '' | + | - In the same terminal, you can now finally run '' |
> env | grep INSTALL | > env | grep INSTALL | ||
PERL_MM_OPT=INSTALL_BASE=/ | PERL_MM_OPT=INSTALL_BASE=/ | ||
Line 178: | Line 159: | ||
> export PERL_MM_OPT= | > export PERL_MM_OPT= | ||
> ant install</ | > ant install</ | ||
+ | --> | ||
**Note:** | **Note:** | ||
Line 187: | Line 168: | ||
==== Source Distribution ==== | ==== Source Distribution ==== | ||
+ | You need a JDK8. We recommend Oracle' | ||
+ | * Furthermore, | ||
In the terminal: | In the terminal: | ||
- | * set JAVA_HOME. For GS3, also set ANT_HOME \\ To set these, you can find out where java is installed on your unix system by first running '' | + | * You can find out where java is installed on your Unix system by first running '' |
* Add svn/bin to PATH | * Add svn/bin to PATH | ||
* Add JAVA_HOME/ | * Add JAVA_HOME/ | ||
Line 204: | Line 186: | ||
- Download the Source Distribution for your Operating System and extract it into the location where you want Greenstone installed. For Linux/Mac, download the tar.gz version as zip doesn' | - Download the Source Distribution for your Operating System and extract it into the location where you want Greenstone installed. For Linux/Mac, download the tar.gz version as zip doesn' | ||
- | - Go into your extracted source distribution' | + | - Go into your extracted source distribution' |
- | - Make sure JAVA_HOME is set (to JDK 7 for Greenstone 3.06, JDK 8 from Greenstone 3.11 onwards) and that its '' | + | - LINUX 64: '' |
- Most of the linux and mac machines we tested require the gnome-lib extension. Without it, if compiling fails with an error message about '' | - Most of the linux and mac machines we tested require the gnome-lib extension. Without it, if compiling fails with an error message about '' | ||
- Use the terminal to extract the downloaded gnome-lib-minimal extension and set up the gnome-lib environment for compiling as follows:\\ < | - Use the terminal to extract the downloaded gnome-lib-minimal extension and set up the gnome-lib environment for compiling as follows:\\ < | ||
cd gs2build/ | cd gs2build/ | ||
- | cd gnome-lib | + | tar -xvzf gnome-lib-minimal-< |
- | # gnome-lib can take longer to compile. | + | cd gnome-lib-minimal |
- | # Alternatively, | + | |
- | # as per instructions above, then run the following commands: | + | |
- | #mv gnome-lib gnome-lib.orig | + | |
- | #tar -xvzf gnome-lib-minimal-< | + | |
- | #cd gnome-lib-minimal | + | |
source ./ | source ./ | ||
cd ../../.. | cd ../../.. | ||
</ | </ | ||
- | | + | - In the same terminal, you can now finally run '' |
- | export CXXFLAGS=" | + | |
- | export JNICFLAGS=" | + | |
- | export CXXFLAGS=" | + | |
- | | + | |
> env | grep INSTALL | > env | grep INSTALL | ||
PERL_MM_OPT=INSTALL_BASE=/ | PERL_MM_OPT=INSTALL_BASE=/ | ||
> export INSTALL_BASE= | > export INSTALL_BASE= | ||
> export PERL_MM_OPT= | > export PERL_MM_OPT= | ||
- | > ant install</ | + | > ant install</ |
- **For Mac OS, from El Capitan onwards:** If you don't already have an imagemagick installed on your system and want to have // | - **For Mac OS, from El Capitan onwards:** If you don't already have an imagemagick installed on your system and want to have // | ||
en/user_advanced/installation_312.1752624014.txt.gz · Last modified: 2025/07/16 00:00 by kjdon