Changeset 2829
- Timestamp:
- 2001-11-08T21:02:15+13:00 (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/bin/script/extract_text.pl
r2821 r2829 14 14 my $installsh = "$ENV{'GSDLHOME'}/Install.sh"; 15 15 my $macrosdir = "$ENV{'GSDLHOME'}/macros"; 16 my $installshield = 'C:/My Installations/is_gsdl_cdrom/String Tables/0009-English/value.shl'; 16 17 17 18 my $texthash = {}; … … 43 44 # english2.dm 44 45 &grab_macros("$macrosdir/english2.dm"); 46 47 48 # text from installshield installation 49 $texthash->{'installshield'} = {}; 50 open (ISHIELD, $installshield) || die; 51 my $line = ""; 52 my $textserver = {}; 53 while (defined ($line = <ISHIELD>)) { 54 next unless ($line =~ /\w/); 55 last if $line =~ /^\[General\]/; 56 next if $line =~ /^\[/; 57 58 if ($line =~ /^(TEXT_SERVERTXT_\d+)=(.*)$/) { 59 $textserver->{$1} = $2; 60 } else { 61 $line =~ /^([^=]+)=(.*)$/; 62 $texthash->{'installshield'}->{$1} = $2; 63 } 64 } 65 close ISHIELD; 66 my $tserver = ""; 67 foreach my $stext (sort keys %{$textserver}) { 68 $tserver .= '\n' unless $tserver eq ""; 69 $tserver .= $textserver->{$stext}; 70 } 71 $texthash->{'installshield'}->{'TEXT_SERVERTXT'} = $tserver; 45 72 46 73 # print out the result
Note:
See TracChangeset
for help on using the changeset viewer.