Ignore:
Timestamp:
2012-10-02T05:43:31+13:00 (12 years ago)
Author:
davidb
Message:

Some mods that resulted from testing under Cygwin

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gs2-extensions/music-ir-src/trunk/perllib/plugins/jAudioExtractor.pm

    r22439 r26276  
    102102    my $music_ir_home = $ENV{'GEXT_MUSICIR'};
    103103
    104     $self->{'ace_xml_output_directory'} = &util::filename_cat($gsdl_home,"tmp"); # Set the directory to save the the ACE XML output files in
     104    my $ace_xml_output_directory = &util::filename_cat($gsdl_home,"tmp"); # Set the directory to save the the ACE XML output files in
     105    if (!util::dir_exists($ace_xml_output_directory)) {
     106    util::mk_dir($ace_xml_output_directory);
     107    }
     108    $self->{'ace_xml_output_directory'} = $ace_xml_output_directory;
     109
    105110    $self->{'jmir_directory'} = &util::filename_cat($music_ir_home,"lib","java"); # Set the directory holding the jMIR .jar files
     111
    106112
    107113
     
    137143
    138144    # Set the input file name in the file tag in the temporary file
     145    if ($^O eq "cygwin") {
     146    $input_music_file_path = `cygpath -m "$input_music_file_path"`;
     147    $input_music_file_path=~ s/\s+$//;
     148    }
    139149    $batch_file_contents =~ s/<file><\/file>/<file>$input_music_file_path<\/file>/;
    140150
    141151    # Set the feature vales save path in the temporary file
     152    if ($^O eq "cygwin") {
     153    $feature_descriptions_file_path = `cygpath -m "$feature_descriptions_file_path"`;
     154    $feature_descriptions_file_path=~ s/\s+$//;
     155    }
     156
    142157    $batch_file_contents =~ s/<destination><\/destination>/<destination>$feature_descriptions_file_path<\/destination>/;
    143158
    144159    # Set the feature vales save path in the temporary file
     160    if ($^O eq "cygwin") {
     161    $feature_values_file_path = `cygpath -m "$feature_values_file_path"`;
     162    $feature_values_file_path=~ s/\s+$//;
     163    }
    145164    $batch_file_contents =~ s/<destination><\/destination>/<destination>$feature_values_file_path<\/destination>/;
    146165
     
    228247   
    229248    # Input and Output files to use are stored in the batch_file
    230     my $jaudio_cmd = "java -Xmx1024M -jar jAudio.jar $convert_options -b \"$batch_file_path\"";
     249    my $batch_file_path_os = $batch_file_path;
     250
     251    if ($^O eq "cygwin") {
     252        $batch_file_path_os = `cygpath -w "$batch_file_path"`;
     253        $batch_file_path_os =~ s/\s+$//;
     254    }
     255
     256    my $jaudio_cmd = "java -Xmx1024M -jar jAudio.jar $convert_options -b \"$batch_file_path_os\"";
    231257       
    232258    # Test the execution path
Note: See TracChangeset for help on using the changeset viewer.