--- deliantra/Deliantra-Client/bin/pclient 2006/04/24 06:57:39 1.175 +++ deliantra/Deliantra-Client/bin/pclient 2006/04/24 10:19:40 1.176 @@ -3,6 +3,29 @@ use strict; use utf8; +BEGIN { + if (%PAR::LibCache) { + @INC = grep ref, @INC; # weed out all paths except pars loader refs + + while (my ($filename, $zip) = each %PAR::LibCache) { + for ($zip->memberNames) { + next unless /^\/root\/(.*)/; + $zip->extractMember ($_, "$ENV{PAR_TEMP}/$1") + unless -e "$ENV{PAR_TEMP}/$1"; + } + } + + unshift @INC, $ENV{PAR_TEMP}; + + if ($^O eq "MSWin32") { + $ENV{GTK_RC_FILES} = "$ENV{PAR_TEMP}/share/themes/MS-Windows/gtk-2.0/gtkrc"; + } + } +} + +# need to do it again because that pile of garbage called PAR nukes it before main +unshift @INC, $ENV{PAR_TEMP}; + use Time::HiRes 'time'; use Event; @@ -15,6 +38,8 @@ use CFClient::UI; use CFClient::MapWidget; +$SIG{__DIE__} = sub { CFClient::fatal "$_[0]"; exit 1 }; + our $VERSION = '0.1'; my $MAX_FPS = 60;