Changeset 21965 for main/trunk


Ignore:
Timestamp:
2010-04-27T14:38:46+12:00 (14 years ago)
Author:
ak19
Message:

Made changes to GLI and gs2-server.bat to allow GLI to deal with spaces in filepath (previously still a problem on Windows when GLI needed to launch gs2-server.bat). The issue was with the windows/batch start command: 1. the way it was launched in GLI and 2. the way windows deals with spaces in the PARAMETERS to the script launched with batch's start cmd. The corresponding changes that needed to be made to deal with these two aspects of the issue are in: gli's greenstone/LocalLibraryServer.java and gs2-sever.bat.

Location:
main/trunk/gli/src/org/greenstone/gatherer
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/gli/src/org/greenstone/gatherer/Gatherer.java

    r19862 r21965  
    836836    {
    837837    ExternalApplication app = new ExternalApplication(command, ID);
     838    apps.add(app);
     839    app.start();
     840    }
     841
     842    static public void spawnApplication(String[] commands, String ID)
     843    {
     844    ExternalApplication app = new ExternalApplication(commands, ID);
    838845    apps.add(app);
    839846    app.start();
     
    11311138        this.ID = ID;
    11321139    }
     1140
     1141    public ExternalApplication(String[] commands, String ID) {
     1142        this.commands = commands;
     1143        this.ID = ID;
     1144    }
    11331145   
    11341146    public String getID() {
  • main/trunk/gli/src/org/greenstone/gatherer/greenstone/LocalLibraryServer.java

    r20482 r21965  
    231231
    232232    // Spawn local library server process
    233     String local_library_server_command = local_library_server_file.getAbsolutePath() + getExtraLaunchArguments(llssite_cfg_file);
     233    String local_library_server_command = "\""+local_library_server_file.getAbsolutePath()+"\"" + getExtraLaunchArguments(llssite_cfg_file);
    234234    if(Utility.isWindows() && !isPersistentServer) { // launching gs2-server.bat (Windows) needs cmd start
    235235        local_library_server_command = "cmd.exe /c start \"GSI\" " + local_library_server_command;
     
    487487        // Spawn local library server process
    488488        running = false;
    489         String local_library_server_command = local_library_server_file.getAbsolutePath() + getExtraLaunchArguments(llssite_cfg_file);
     489        String local_library_server_command = "\""+local_library_server_file.getAbsolutePath()+"\"" + getExtraLaunchArguments(llssite_cfg_file);
    490490        if(Utility.isWindows() && !isPersistentServer) { // launching gs2-server.bat (Windows) needs cmd start
    491491            local_library_server_command = "cmd.exe /c start \"GSI\" " + local_library_server_command;
Note: See TracChangeset for help on using the changeset viewer.