Changeset 20924


Ignore:
Timestamp:
2009-11-10T20:49:48+13:00 (14 years ago)
Author:
oranfry
Message:

Since we can now have a Perl installation inside Greenstone on linux as well, GLI code for Linux also launches perl with the -S flag.

Location:
gli/trunk/src/org/greenstone/gatherer
Files:
13 edited

Legend:

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

    r16464 r20924  
    222222            }
    223223            // Parse the path to PERL. If not provided it assumes
    224             // perl should be availble on the PATH.
     224            // perl should be available on the PATH.
    225225            else if(argument_name.equals(StaticStrings.PERL_ARGUMENT)) {
    226226            perl_path = argument_value;
  • gli/trunk/src/org/greenstone/gatherer/collection/CollectionManager.java

    r19780 r20924  
    164164    // Generate the buildcol.pl command
    165165    ArrayList command_parts_list = new ArrayList();
    166     if ((Utility.isWindows()) && (!Gatherer.isGsdlRemote)) {
     166    if (!Gatherer.isGsdlRemote) {
    167167        command_parts_list.add(Configuration.perl_path);
    168168        command_parts_list.add("-S");
  • gli/trunk/src/org/greenstone/gatherer/collection/ScriptOptions.java

    r19269 r20924  
    230230        else {
    231231        String args[];
    232         if(Utility.isWindows()) {
    233             args = new String[6];
    234             args[0] = Configuration.perl_path;
    235             args[1] = "-S";
    236             args[2] = LocalGreenstone.getBinScriptDirectoryPath() + filename;
    237             args[3] = "-xml";
    238             args[4] = "-language";
    239             args[5] = lang;
    240         }
    241         else {
    242             args = new String[4];
    243             args[0] = LocalGreenstone.getBinScriptDirectoryPath() + filename;
    244             args[1] = "-xml";
    245             args[2] = "-language";
    246             args[3] = lang;
    247         }
     232        args = new String[6];
     233        args[0] = Configuration.perl_path;
     234        args[1] = "-S";
     235        args[2] = LocalGreenstone.getBinScriptDirectoryPath() + filename;
     236        args[3] = "-xml";
     237        args[4] = "-language";
     238        args[5] = lang;
    248239
    249240
  • gli/trunk/src/org/greenstone/gatherer/download/DownloadJob.java

    r19313 r20924  
    232232
    233233    ArrayList command_list = new ArrayList();
    234         if (Utility.isWindows()) {
    235         command_list.add(Configuration.perl_path);
    236         command_list.add("-S");
    237     }
    238 
     234   
    239235    // the following also works for client-gli if downloading is enabled (when there's a gs2build directory inside gli)
     236    command_list.add(Configuration.perl_path);
     237    command_list.add("-S");
    240238    command_list.add(LocalGreenstone.getBinScriptDirectoryPath()+"downloadfrom.pl");
    241239    command_list.add("-download_mode");
  • gli/trunk/src/org/greenstone/gatherer/download/ServerInfoDialog.java

    r13594 r20924  
    8282    {
    8383    ArrayList commands = new ArrayList();
    84     if (Utility.isWindows()) {
    85         commands.add(Configuration.perl_path);
    86         commands.add("-S");
    87     }
     84    commands.add(Configuration.perl_path);
     85    commands.add("-S");
    8886    commands.add(LocalGreenstone.getBinScriptDirectoryPath()+"downloadfrom.pl");
    8987    commands.add("-info");
  • gli/trunk/src/org/greenstone/gatherer/greenstone/Classifiers.java

    r17612 r20924  
    138138        else {
    139139        ArrayList args = new ArrayList();
    140         if (Utility.isWindows()) {
    141             args.add(Configuration.perl_path);
    142             args.add("-S");
    143         }
     140        args.add(Configuration.perl_path);
     141        args.add("-S");     
    144142        args.add(LocalGreenstone.getBinScriptDirectoryPath() + "classinfo.pl");
    145143        if (collection_specific) {
     
    200198        else {
    201199        ArrayList args = new ArrayList();
    202         if (Utility.isWindows()) {
    203             args.add(Configuration.perl_path);
    204             args.add("-S");
    205         }
     200        args.add(Configuration.perl_path);
     201        args.add("-S");
    206202        args.add(LocalGreenstone.getBinScriptDirectoryPath() + "classinfo.pl");
    207203        if (collection_name != null) {
  • gli/trunk/src/org/greenstone/gatherer/greenstone/Plugins.java

    r17612 r20924  
    139139        else {
    140140        ArrayList args = new ArrayList();
    141         if (Utility.isWindows()) {
    142             args.add(Configuration.perl_path);
    143             args.add("-S");
    144         }
     141        args.add(Configuration.perl_path);
     142        args.add("-S");
    145143        args.add(LocalGreenstone.getBinScriptDirectoryPath() + "pluginfo.pl");
    146144        if (collection_specific) {
     
    203201        else {
    204202        ArrayList args = new ArrayList();
    205         if (Utility.isWindows()) {
    206             args.add(Configuration.perl_path);
    207             args.add("-S");
    208         }
     203        args.add(Configuration.perl_path);
     204        args.add("-S");     
    209205        args.add(LocalGreenstone.getBinScriptDirectoryPath() + "pluginfo.pl");
    210206        if (collection_name != null) {
  • gli/trunk/src/org/greenstone/gatherer/gui/DownloadPane.java

    r19188 r20924  
    238238        ArrayList args_list = new ArrayList();
    239239        String args[] = null;
    240         if(Utility.isWindows()) {
    241             if(Configuration.perl_path != null) {
    242             args_list.add(Configuration.perl_path);
    243             }
    244             else {
    245             args_list.add("Perl.exe");
    246             }
    247         }
     240        if(Configuration.perl_path != null) {
     241            args_list.add(Configuration.perl_path);
     242        } else if(Utility.isWindows()) {
     243            args_list.add("Perl.exe");
     244        } else {
     245            args_list.add("perl");
     246        }
     247        args_list.add("-S");
    248248        args_list.add(LocalGreenstone.getBinScriptDirectoryPath()+"downloadinfo.pl");
    249249        args_list.add("-xml");
  • gli/trunk/src/org/greenstone/gatherer/gui/ExplodeMetadataDatabasePrompt.java

    r20823 r20924  
    258258    // Generate the explode_metadata_database.pl command
    259259    ArrayList command_parts_list = new ArrayList();
    260     if (Utility.isWindows() && (!Gatherer.isGsdlRemote)) {
     260    if (!Gatherer.isGsdlRemote) {
    261261        command_parts_list.add(Configuration.perl_path);
    262262        command_parts_list.add("-S");
  • gli/trunk/src/org/greenstone/gatherer/gui/ExportAsPrompt.java

    r18412 r20924  
    440440    // Generate the export.pl command
    441441    ArrayList command_parts_list = new ArrayList();
    442     if (Utility.isWindows() && (!Gatherer.isGsdlRemote)) {
     442    if (!Gatherer.isGsdlRemote) {
    443443        command_parts_list.add(Configuration.perl_path);
    444444        command_parts_list.add("-S");
  • gli/trunk/src/org/greenstone/gatherer/gui/OpenCollectionDialog.java

    r19228 r20924  
    352352        // Generate the convert_coll_from_gs2.pl command
    353353        ArrayList command_parts_list = new ArrayList();
    354         if ((Utility.isWindows()) && (!Gatherer.isGsdlRemote)) {
     354        if (!Gatherer.isGsdlRemote) {
    355355            command_parts_list.add(Configuration.perl_path);
    356356            command_parts_list.add("-S");
  • gli/trunk/src/org/greenstone/gatherer/gui/ReplaceSrcDocWithHtmlPrompt.java

    r18645 r20924  
    260260    // Generate the replace_srcdoc_with_html.pl command
    261261    ArrayList command_parts_list = new ArrayList();
    262     if (Utility.isWindows() && (!Gatherer.isGsdlRemote)) {
     262    if (!Gatherer.isGsdlRemote) {
    263263        command_parts_list.add(Configuration.perl_path);
    264264        command_parts_list.add("-S");
  • gli/trunk/src/org/greenstone/gatherer/gui/WriteCDImagePrompt.java

    r18370 r20924  
    345345    // Generate the exportcol.pl command
    346346    ArrayList command_parts_list = new ArrayList();
    347     if (Utility.isWindows() && (!Gatherer.isGsdlRemote)) {
     347    if (!Gatherer.isGsdlRemote) {
    348348        command_parts_list.add(Configuration.perl_path);
    349349        command_parts_list.add("-S");
Note: See TracChangeset for help on using the changeset viewer.