ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/Deliantra-Client/bin/deliantra
(Generate patch)

Comparing deliantra/Deliantra-Client/bin/deliantra (file contents):
Revision 1.77 by root, Fri Sep 26 04:45:48 2008 UTC vs.
Revision 1.79 by root, Fri Dec 19 22:06:53 2008 UTC

49 } 49 }
50 } 50 }
51 51
52 if ($^O eq "MSWin32") { 52 if ($^O eq "MSWin32") {
53 # pango is relocatable on win32 53 # pango is relocatable on win32
54 } elsif (-e "$root/pangoversion") {
55 open my $fh, "<:perlio", "$root/pangoversion"
56 or die "pangoversion: $!";
57 my $PANGO = <$fh>;
58 # unix, need to patch pango rc file
59 open my $fh, "<:perlio", "$root/usr/lib/pango/$PANGO/module-files.d/libpango1.0-0.modules"
60 or die "$root/usr/lib/$PANGO/module-files.d/libpango1.0-0.modules: $!";
61 local $/;
62 my $rc = <$fh>;
63 $rc =~ s/^\//$root\//gm; # replace abs paths by relative ones
64
65 mkdir "$root/pango-modules";
66 open my $fh, ">:perlio", "$root/pango-modules/pango.modules"
67 or die "$root/pango-modules/pango.modules: $!";
68 print $fh $rc;
69
70 $ENV{PANGO_RC_FILE} = "$root/pango.rc";
71 open my $fh, ">:perlio", $ENV{PANGO_RC_FILE}
72 or die "$ENV{PANGO_RC_FILE}: $!";
73 print $fh "[Pango]\nModuleFiles = $root/pango-modules\n";
74 } else { 54 } else {
75 # OS X 55 # OS X
76 $ENV{FC_CONFIG_FILE} = "$root/fonts.conf"; # no effect??!?! 56 $ENV{FONTCONFIG_FILE} = "$root/fonts.conf"; # no effect??!?!
77 $ENV{FC_CONFIG_DIR} = $root; # no effect??!?! 57 $ENV{FONTCONFIG_DIR} = $root; # no effect??!?!
78 $ENV{PANGO_RC_FILE} = "$root/pango.rc"; 58 $ENV{PANGO_RC_FILE} = "$root/pango.rc";
79 $ENV{DYLD_LIBRARY_PATH} = $root; 59 $ENV{DYLD_LIBRARY_PATH} = $root;
80 chdir $root; # for pango modules, maybe other things 60 chdir $root; # for pango modules, maybe other things
81 } 61 }
82 62
786} 766}
787 767
788sub dc_connect { 768sub dc_connect {
789 my ($host, $port) = @_; 769 my ($host, $port) = @_;
790 770
791 my $mapsize = List::Util::min 32, List::Util::max 11, int $WIDTH * $CFG->{mapsize} * 0.01 / 32; 771 my $mapw = List::Util::min 48, List::Util::max 11, int $WIDTH * $CFG->{mapsize} * 0.01 / 32;
772 my $maph = List::Util::min 48, List::Util::max 11, int $HEIGHT * $CFG->{mapsize} * 0.01 / 32;
792 773
793 $CONN = 774 $CONN =
794 new DC::Protocol 775 new DC::Protocol
795 host => $host, 776 host => $host,
796 port => $port, 777 port => $port,
797 user => $PROFILE->{user}, 778 user => $PROFILE->{user},
798 pass => $PROFILE->{password}, 779 pass => $PROFILE->{password},
799 mapw => $mapsize, 780 mapw => $mapw,
800 maph => $mapsize, 781 maph => $maph,
801 782
802 client => "$DC::VERSION $] $^O", 783 client => "$DC::VERSION $] $^O",
803 784
804 map_widget => $MAPWIDGET, 785 map_widget => $MAPWIDGET,
805 statusbox => $STATUSBOX, 786 statusbox => $STATUSBOX,

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines