ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/Deliantra-Client/bin/deliantra
Revision: 1.120
Committed: Tue Dec 27 07:23:33 2011 UTC (12 years, 5 months ago) by root
Branch: MAIN
Changes since 1.119: +8 -2874 lines
Log Message:
*** empty log message ***

File Contents

# Content
1 #!/opt/bin/perl
2
3 our @STARTUP_DONE;
4
5 # do splash-screen thingy on win32
6 BEGIN {
7 if (%PAR::LibCache && $^O eq "MSWin32") {
8 while (my ($filename, $zip) = each %PAR::LibCache) {
9 $zip->extractMember ("SPLASH.bmp", "$ENV{PAR_TEMP}/SPLASH.bmp");
10 }
11
12 require Win32::GUI::SplashScreen;
13
14 Win32::GUI::SplashScreen::Show (
15 -file => "$ENV{PAR_TEMP}/SPLASH.bmp",
16 );
17
18 push @STARTUP_DONE, sub {
19 Win32::GUI::SplashScreen::Done (1);
20 };
21 }
22 }
23
24 # TODO: find most recent .par
25
26 use common::sense;
27
28 use Carp 'verbose';
29
30 # do things only needed for single-binary version (par)
31 BEGIN {
32 if (%PAR::LibCache) {
33 @INC = grep ref, @INC; # weed out all paths except PAR's loader refs
34
35 my $root = $ENV{PAR_TEMP};
36
37 while (my ($filename, $zip) = each %PAR::LibCache) {
38 for ($zip->memberNames) {
39 next unless /^root\/(.*)/;
40 $zip->extractMember ($_, "$root/$1")
41 unless -e "$root/$1";
42 }
43 }
44
45 if ($^O eq "MSWin32") {
46 # pango is relocatable on win32
47 } else {
48 # OS X
49 $ENV{PANGO_RC_FILE} = "$root/pango.rc";
50 $ENV{DYLD_LIBRARY_PATH} = $root;
51 chdir $root; # for pango modules, maybe other things
52 }
53
54 unshift @INC, $root;
55 }
56 }
57
58 # prepend private library directory and prepare env
59 BEGIN {
60 for (grep !ref, @INC) {
61 my $path = "$_/Deliantra/Client/private";
62 if (-d $path) {
63 unshift @INC, $path;
64 last;
65 }
66 }
67 }
68
69 use DC::Main ();
70
71 # need to do it again because that pile of garbage called PAR nukes it before main
72 unshift @INC, $ENV{PAR_TEMP}
73 if %PAR::LibCache;
74
75 DC::Main::run;
76
77 =head1 NAME
78
79 deliantra - A Deliantra MORPG game client
80
81 =head1 SYNOPSIS
82
83 deliantra [--profile name] [host [user [password]]]
84 deliantra --help
85
86 =head1 USAGE
87
88 The deliantra client utilises OpenGL for all UI elements and the game. It
89 is supposed to be used in fullscreen mode and interactively.
90
91 =head1 DEBUGGING
92
93 DELIANTRA_DEBUG - environment variable
94
95 1 draw borders around widgets
96 2 add low-level widget info to tooltips
97 4 show fps
98 8 suppress tooltips
99 16 show bandwidth downstream
100
101 =head1 AUTHOR
102
103 Marc Lehmann <deliantra@schmorp.de>, Robin Redeker <elmex@ta-sa.org>
104
105
106