Changeset 27674

Show
Ignore:
Timestamp:
20.06.2013 16:06:01 (6 years ago)
Author:
sjm84
Message:

Added the missing GSDL3SRCHOME enviroment variable into the Perl environment

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/build/GS2PerlConstructor.java

    r27107 r27674  
    150150        sendMessage(new ConstructionEvent(this, GSStatus.INFO, "Collection construction: import collection.")); 
    151151        Vector<String> command = new Vector<String>(); 
    152         command.add(GlobalProperties.getProperty("perl.path", "perl")); 
     152        command.add(GlobalProperties.getProperty("perl.path", "perl") + "perl"); 
    153153        command.add("-S"); 
    154154        command.add(GlobalProperties.getGS2Build() + File.separator + "bin" + File.separator + "script" + File.separator + "import.pl"); 
     
    212212        } 
    213213 
    214         /* 
     214        /* 
    215215 
    216216        // move building to index 
     
    235235        // success!!  - need to send the final completed message 
    236236        sendProcessComplete(new ConstructionEvent(this, GSStatus.COMPLETED, "")); 
    237         */ 
     237        */ 
    238238 
    239239        // Running activate.pl instead of making java move building to index as above 
     
    295295    protected boolean runPerlCommand(String[] command) 
    296296    { 
    297         String msg; 
    298         ConstructionEvent evt; 
     297        int sepIndex = this.gsdl3home.lastIndexOf(File.separator); 
     298        String srcHome = this.gsdl3home.substring(0, sepIndex); 
    299299 
    300300        ArrayList<String> args = new ArrayList<String>(); 
    301301        args.add("GSDLHOME=" + this.gsdl2home); 
    302302        args.add("GSDL3HOME=" + this.gsdl3home); 
     303        args.add("GSDL3SRCHOME=" + srcHome); 
    303304        args.add("GSDLOS=" + this.gsdlos); 
    304305        args.add("GSDL-RUN-SETUP=true"); 
     
    328329            // Captures the std err of a program and pipes it into 
    329330            // std in of java 
    330              
     331 
    331332            File logDir = new File(GSFile.collectDir(this.site_home) + File.separator + this.collection_name + File.separator + "log"); 
    332             if(!logDir.exists()) 
     333            if (!logDir.exists()) 
    333334            { 
    334335                logDir.mkdir(); 
     
    336337 
    337338            BufferedWriter bw = new BufferedWriter(new FileWriter(GSFile.collectDir(this.site_home) + File.separator + this.collection_name + File.separator + "log" + File.separator + "build_log." + (System.currentTimeMillis()) + ".txt")); 
    338             bw.write("Document Editor Build\n"); 
     339            bw.write("Document Editor Build \n"); 
    339340 
    340341            String eline = null; 
     
    386387                return false; 
    387388            } 
    388  
    389389        } 
    390390        catch (Exception e) 
    391391        { 
     392            e.printStackTrace(); 
    392393            sendProcessStatus(new ConstructionEvent(this, GSStatus.ERROR, "Exception occurred " + e.toString())); 
    393394        }