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

Comparing deliantra/Deliantra-Client/util/gatherer (file contents):
Revision 1.10 by root, Wed Jan 4 11:41:25 2012 UTC vs.
Revision 1.15 by root, Sat Jan 28 00:03:31 2012 UTC

10SO=so 10SO=so
11SYSLIB=/usr/lib 11SYSLIB=/usr/lib
12MAKE=make 12MAKE=make
13ARCHNAME=x86 13ARCHNAME=x86
14GENPACK_ENVVARS="LD_LIBRARY_PATH=." 14GENPACK_ENVVARS="LD_LIBRARY_PATH=."
15EXTRA_EXTRACT=
15 16
16umask 022 17umask 022
17 18
18if [ "$(uname -s)" = CYGWIN_NT-5.0 ]; then 19if [ "$(uname -s)" = CYGWIN_NT-5.0 ]; then
19 . ~/.setenv 20 . ~/.setenv
26 SYSLIB=/c/gtk/bin 27 SYSLIB=/c/gtk/bin
27 LIBEXT=dll 28 LIBEXT=dll
28 LIB0=dll 29 LIB0=dll
29 SO=dll 30 SO=dll
30 STRIP=":" # stripping the perl library kills it, and apparently, everythignis always stripped 31 STRIP=":" # stripping the perl library kills it, and apparently, everythignis always stripped
32 EXTRA_EXTRACT="-MWin32::GUI::SplashScreen"
31 33
32 # fontconfig apparently ignores env vars and always looks at ./etc/fonts/fonts.conf, 34 # fontconfig apparently ignores env vars and always looks at ./etc/fonts/fonts.conf,
33 # but only if . isn't actually called bin or lib. hope for the best. 35 # but only if . isn't actually called bin or lib. hope for the best.
34 GENPACK_ENVVARS="FONTCONFIG_PATH=pm/Deliantra/Client/private/resources/fonts FONTCONFIG_FILE=fonts.conf" 36 GENPACK_ENVVARS="FONTCONFIG_PATH=pm/Deliantra/Client/private/resources/fonts FONTCONFIG_FILE=fonts.conf"
35 37
59 PANGO=1.5.0 61 PANGO=1.5.0
60 PERL=/usr/bin/perl 62 PERL=/usr/bin/perl
61 ARCHNAME=amd64 63 ARCHNAME=amd64
62fi 64fi
63 65
64export DIST="$(pwd)/dist/$OS-$ARCHNAME" 66DISTf="dist/$OS-$ARCHNAME"
67export DIST="$(pwd)/$DISTf"
65 68
66rm -rf "$DIST" 69eval $("$PERL" -V:sitebinexp:)
67mkdir -p "$DIST"
68 70
69#PERL=/opt/perl 71"$PERL" "$sitebinexp"/perl-libextractor \
70#PANGO=1.6.0 72 --perl --core-support --script deliantra $EXTRA_EXTRACT \
71 73 --runtime-only \
72export EV_EVENTFD=0 74 --copy "$DISTf" --exedir . --dlldir . --bindir pm/bin --libdir pm
73export EV_INOTIFY=0
74export EV_SIGNALFD=0
75 75
76cat <<EOF >"$DIST"/pango.rc 76cat <<EOF >"$DIST"/pango.rc
77[Pango] 77[Pango]
78ModuleFiles = pango.modules 78ModuleFiles = pango.modules
79EOF 79EOF
95eval $($PERL -V:sitebinexp -V:sitearchexp -V:sitelib -V:vendorarchexp -V:vendorlibexp -V:archlibexp -V:privlibexp) 95eval $($PERL -V:sitebinexp -V:sitearchexp -V:sitelib -V:vendorarchexp -V:vendorlibexp -V:archlibexp -V:privlibexp)
96 96
97mkdir -p "$DIST"/pm/bin 97mkdir -p "$DIST"/pm/bin
98cp "$sitebinexp"/deliantra "$DIST"/pm/bin/ 98cp "$sitebinexp"/deliantra "$DIST"/pm/bin/
99cp -p util/run "$DIST" 99cp -p util/run "$DIST"
100
101(
102 exec <util/modules.dep
103
104# while read type name; do
105# if [ "$type" = d ]; then
106# # not implemented
107# dir=$(echo "$name" | sed -e s%::%/%g)
108# for lib in "$sitearchexp" "$sitelib" "$vendorarchexp" "$vendorlibexp" "$archlibexp" "$privlibexp"; do
109# if [ -e "$lib/auto/$dir/.packlist" ]; then
110# cat "$lib/auto/$dir/.packlist"
111# fi
112# echo "x $lib $dir"
113# done
114# elif [ $type = m ]; then
115# :
116# else
117# echo "unknown type $type ($name)"
118# exit 1
119# fi
120# done
121 mkdir -p "$DIST"/pm
122
123 export OSDIST="$DIST"
124 [ "$OS" = windows ] && OSDIST=$(cygpath -w "$OSDIST")
125
126 $PERL -e '
127 use Config;
128 use File::Glob qw(:glob);
129 use File::Copy;
130 use File::Path;
131 use File::Basename;
132
133 my @path = do {
134 my %seen;
135 grep !$seen{$_}++, grep length, map $Config{$_}, qw(
136 sitearchexp
137 sitelib
138 vendorarchexp
139 vendorlibexp
140 archlibexp
141 privlibexp
142 )
143 };
144
145 while (<>) {
146 s/\015?\012$//;
147 next if /^(#|$)/;
148 s/\.dynob$/.'$SO'/;
149
150 my $found;
151 for my $lib (@path) {
152 chdir $lib || next;
153
154 my @glob = File::Glob::bsd_glob $_, 0; # explicit 0 needed
155
156 if (@glob) {
157 ++$found;
158
159 for (@glob) {
160 if (-d $_) {
161 system "rsync", "-aR", $_, "$ENV{DIST}/pm/.";
162 } else {
163 File::Path::mkpath "$ENV{OSDIST}/pm/" . dirname $_;
164 File::Copy::syscopy "$_", "$ENV{OSDIST}/pm/$_"
165 or die "$ENV{OSDIST}/pm/$_: $!";
166
167 if (s/\.pm$//) {
168 $auto = "auto/$_";
169
170 for my $glob ("*.'$SO'", "autosplit.ix", "*.al") {
171 for (bsd_glob "$auto/$glob", 0) {
172 File::Path::mkpath "$ENV{OSDIST}/pm/" . dirname $_;
173 File::Copy::syscopy "$_", "$ENV{OSDIST}/pm/$_";
174 }
175 }
176 }
177 }
178 }
179
180 last;
181 }
182 }
183
184 warn "$_: not found\n"
185 unless $found;
186 }
187 '
188) || exit
189 100
190############################################################################# 101#############################################################################
191 102
192if [ "$OS" = windows ]; then 103if [ "$OS" = windows ]; then
193 libdeps() { 104 libdeps() {
225} 136}
226 137
227( 138(
228 cd "$DIST" 139 cd "$DIST"
229 140
230 cp -p "$PERL" . 141 case "$OS" in
231 142 windows )
232 if [ "$OS" = windows ]; then
233 cp -p $SYSLIB/libvorbisfile-3.dll $SYSLIB/mikmod.dll $SYSLIB/libpng12-0.dll . 143 cp -p $SYSLIB/libvorbisfile-3.dll $SYSLIB/mikmod.dll $SYSLIB/libpng12-0.dll $SYSLIB/jpeg.dll .
144 cp -p $SYSLIB/jpeg.dll .
234 cp /root/src/CFPlus/util/splash.bmp . 145 cp /root/src/CFPlus/util/splash.bmp .
235 chmod -R u+rwX pm/auto 146 chmod -R u+rwX pm/auto
236 147
237 # convert perl to a non-console-app 148 # convert perl to a non-console-app
238 $PERL -MWin32::Exe -e '$e = new Win32::Exe"perl.exe"; $e->set_subsystem_windows; $e->write' 149 $PERL -MWin32::Exe -e '$e = new Win32::Exe"perl.exe"; $e->set_subsystem_windows; $e->write'
150 ;;
151 linux )
152 cp -p $SYSLIB/libjpeg.so.62 .
153 ;;
154 esac
239 155
240 else 156 if [ "$OS" != windows ]; then
241 for lib in mikmod vorbisfile; do 157 for lib in mikmod vorbisfile; do
242 cp -p $SYSLIB/lib$lib.$LIB0 . 158 cp -p $SYSLIB/lib$lib.$LIB0 .
243 chmod 755 lib$lib.$LIB0 159 chmod 755 lib$lib.$LIB0
244 done 160 done
245 fi 161 fi

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines