… | |
… | |
29 | # do things only needed for single-binary version (par) |
29 | # do things only needed for single-binary version (par) |
30 | BEGIN { |
30 | BEGIN { |
31 | if (%PAR::LibCache) { |
31 | if (%PAR::LibCache) { |
32 | @INC = grep ref, @INC; # weed out all paths except pars loader refs |
32 | @INC = grep ref, @INC; # weed out all paths except pars loader refs |
33 | |
33 | |
|
|
34 | my $tmp = $ENV{PAR_TEMP}; |
|
|
35 | |
34 | while (my ($filename, $zip) = each %PAR::LibCache) { |
36 | while (my ($filename, $zip) = each %PAR::LibCache) { |
35 | for ($zip->memberNames) { |
37 | for ($zip->memberNames) { |
36 | next unless /^root\/(.*)/; |
38 | next unless /^root\/(.*)/; |
37 | $zip->extractMember ($_, "$ENV{PAR_TEMP}/$1") |
39 | $zip->extractMember ($_, "$tmp/$1") |
38 | unless -e "$ENV{PAR_TEMP}/$1"; |
40 | unless -e "$tmp/$1"; |
39 | } |
41 | } |
40 | } |
42 | } |
41 | |
43 | |
42 | # TODO: pango-rc file, anybody? |
44 | if ($^O eq "MSWin32") { |
|
|
45 | # relocatable |
|
|
46 | } else { |
|
|
47 | # unix, need to patch pango rc file |
|
|
48 | open my $fh, "<:perlio", "$tmp/usr/lib/pango/1.5.0/module-files.d/libpango1.0-0.modules" |
|
|
49 | or die "$tmp/usr/lib/1.5.0/module-files.d/libpango1.0-0.modules: $!"; |
|
|
50 | local $/; |
|
|
51 | my $rc = <$fh>; |
|
|
52 | $rc =~ s/^\//$tmp\//gm; # replace abs paths by relative ones |
43 | |
53 | |
44 | unshift @INC, $ENV{PAR_TEMP}; |
54 | mkdir "$tmp/pango-modules"; |
|
|
55 | open my $fh, ">:perlio", "$tmp/pango-modules/pango.modules" |
|
|
56 | or die "$tmp/pango-modules/pango.modules: $!"; |
|
|
57 | print $fh $rc; |
|
|
58 | |
|
|
59 | $ENV{PANGO_RC_FILE} = "$tmp/pango.rc"; |
|
|
60 | open my $fh, ">:perlio", $ENV{PANGO_RC_FILE} |
|
|
61 | or die "$ENV{PANGO_RC_FILE}: $!"; |
|
|
62 | print $fh "[Pango]\nModuleFiles = $tmp/pango-modules\n"; |
|
|
63 | } |
|
|
64 | |
|
|
65 | unshift @INC, $tmp; |
45 | } |
66 | } |
46 | } |
67 | } |
47 | |
68 | |
48 | # need to do it again because that pile of garbage called PAR nukes it before main |
69 | # need to do it again because that pile of garbage called PAR nukes it before main |
49 | unshift @INC, $ENV{PAR_TEMP} |
70 | unshift @INC, $ENV{PAR_TEMP} |
… | |
… | |
269 | ellipsise => 0, |
290 | ellipsise => 0, |
270 | markup => "<span foreground='#ccccff'>$conn->{chargen_race_description}</span>", |
291 | markup => "<span foreground='#ccccff'>$conn->{chargen_race_description}</span>", |
271 | ; |
292 | ; |
272 | } |
293 | } |
273 | |
294 | |
274 | if ($conn->{chargen_race_title}) { |
|
|
275 | unshift @dialog, new CFPlus::UI::Face |
295 | unshift @dialog, new CFPlus::UI::Face |
276 | face => $conn->{player}{face}, |
296 | face => $conn->{player}{face}, |
277 | bg => [.2, .2, .2, 1], |
297 | bg => [.2, .2, .2, 1], |
278 | min_w => 64, |
298 | min_w => 64, |
279 | min_h => 64, |
299 | min_h => 64, |
280 | ; |
|
|
281 | } |
300 | ; |
282 | |
301 | |
283 | if ($conn->{chargen_race_title}) { |
302 | if ($conn->{chargen_race_title}) { |
284 | unshift @dialog, new CFPlus::UI::Label |
303 | unshift @dialog, new CFPlus::UI::Label |
285 | allign => 1, |
304 | allign => 1, |
286 | ellipsise => 0, |
305 | ellipsise => 0, |