aboutsummaryrefslogtreecommitdiffstats
path: root/code/unix/Conscript-pk3
diff options
context:
space:
mode:
authorzakk <zakk@edf5b092-35ff-0310-97b2-ce42778d08ea>2005-08-26 17:39:27 +0000
committerzakk <zakk@edf5b092-35ff-0310-97b2-ce42778d08ea>2005-08-26 17:39:27 +0000
commit6bf20c78f5b69d40bcc4931df93d29198435ab67 (patch)
treee3eda937a05d7db42de725b7013bd0344b987f34 /code/unix/Conscript-pk3
parent872d4d7f55af706737ffb361bb76ad13e7496770 (diff)
downloadioquake3-aero-6bf20c78f5b69d40bcc4931df93d29198435ab67.tar.gz
ioquake3-aero-6bf20c78f5b69d40bcc4931df93d29198435ab67.zip
newlines fixed
git-svn-id: svn://svn.icculus.org/quake3/trunk@6 edf5b092-35ff-0310-97b2-ce42778d08ea
Diffstat (limited to 'code/unix/Conscript-pk3')
-rwxr-xr-xcode/unix/Conscript-pk3270
1 files changed, 135 insertions, 135 deletions
diff --git a/code/unix/Conscript-pk3 b/code/unix/Conscript-pk3
index 9dcf691..9232ae4 100755
--- a/code/unix/Conscript-pk3
+++ b/code/unix/Conscript-pk3
@@ -1,135 +1,135 @@
-# build pk3 on the fly
-
-Import qw( INSTALL_DIR BUILD_DIR CONFIG_DIR CC CXX LINK );
-
-use Data::Dumper;
-
-$env = new cons(); # the env on which we will be working for all pk3s (NOTE: maybe we need several ctually)
-
-$hcf_do_exec = 1;
-sub do_command($)
-{
- printf("@_[0]\n");
- if ($hcf_do_exec)
- {
- system("@_[0]");
- }
-}
-
-sub build_pk3 {
-
- sub launch {
- #print "In launch\n";
- $Data::Dumper::Indent = 2;
- #print Dumper(@_);
- $tmpdir = "/tmp/pk3-builder$$";
- do_command("rm -rf $tmpdir");
-
- ($target, $sets) = @_;
- $base=`basename $target`; chomp($base);
- $dirname=`dirname $target`; chomp($dirname);
-
- foreach (@{$sets})
- {
- ($sourcepath, $destpath, $file) = @{$_};
- #print "source: $sourcepath dest: $destpath file: $file\n";
- do_command("mkdir -p $tmpdir/$destpath");
- if ($sourcepath =~ /#.*/)
- {
- #print "$sourcepath is absolute\n";
- $sourcepath =~ s/#//;
- if (ref($file))
- {
- foreach(@{$file})
- {
- do_command("cp $sourcepath/$_ $tmpdir/$destpath/$_");
- }
- }
- else
- {
- do_command("cp $sourcepath/$file $tmpdir/$destpath/$file");
- }
- }
- else
- {
- #print "$sourcepath in linked dir\n";
- if (ref($file))
- {
- foreach(@{$file})
- {
- do_command("cp $BUILD_DIR/$sourcepath/$_ $tmpdir/$destpath/$_");
- }
- }
- else
- {
- do_command("cp $BUILD_DIR/$sourcepath/$file $tmpdir/$destpath/$file");
- }
- }
- }
-
- do_command("cd $tmpdir ; zip -r $base *");
- do_command("mkdir -p $BUILD_DIR/$dirname");
- do_command("cp $tmpdir/$base $BUILD_DIR/$target");
- do_command("rm -rf $tmpdir");
-
- return 1;
- }
-
- # extract the parameters
- ($target, $sets) = @_;
-
- $base=`basename $target`; chomp($base);
- $dirname=`dirname $target`; chomp($dirname);
-
- # the build command is stored and called later on by cons
- # this makes it impossible to have several build_pk3 working together
- # there is probably a cleaner solution than this hack, but this works
- $target_uniquename="target_$base";
- $target_uniquename=~s/\.//g;
- eval("\$$target_uniquename=\$target");
- $sets_uniquename="sets_$base";
- $sets_uniquename=~s/\.//g;
- eval("\$$sets_uniquename=\$sets");
- #print "name: $target_uniquename after the hack: $target_pak8pk3";
-
- # don't pass @{@_} .. since this will be called during the process
- $command = "[perl] &launch( \$$target_uniquename, [ \@{\$$sets_uniquename} ] )";
- #print "$command\n";
-
- foreach(@{$sets})
- {
- ($sourcepath, $destpath, $file) = @{$_};
- if (ref($file))
- {
- foreach(@{$file})
- {
- Depends $env $target, $sourcepath . '/' . $_;
- }
- }
- else
- {
- Depends $env $target, $sourcepath . '/' . $file;
- }
- }
- Command $env $target, $command;
- Install $env $INSTALL_DIR . "/$dirname", $target;
-}
-
-# quick rundown on the syntax:
-# <target file>, [ <fileset1>, <fileset2>, ... ]
-# where <fileset>: [ <source directory>, <directory in zip>, <file1>, <file2>, .. ]
-
-build_pk3('baseq3/pak8.pk3',
- [ [ '#../../../media/Q3Media-1.32/baseq3/menu/art', 'menu/art', 'pblogo.tga' ],
- [ '../Q3/q3_ui/q3_ui', 'vm', 'ui.qvm' ],
- [ '../Q3/cgame/cgame', 'vm', 'cgame.qvm' ],
- [ '../Q3/game/game', 'vm', 'qagame.qvm' ] ]
-);
-
-build_pk3('missionpack/pak3.pk3',
- [ [ '#../ui', 'ui', [ 'createserver.menu', 'joinserver.menu', 'filter.menu', 'punkbuster.menu', 'menus.txt' ] ],
- [ '../TA/ui/ui', 'vm', 'ui.qvm' ],
- [ '../TA/cgame/cgame', 'vm', 'cgame.qvm' ],
- [ '../TA/game/game', 'vm', 'qagame.qvm' ],
- [ '#../../../media/Q3Media-1.32/missionpack/scripts', 'scripts', 'models2.shader' ] ]
-);
+# build pk3 on the fly
+
+Import qw( INSTALL_DIR BUILD_DIR CONFIG_DIR CC CXX LINK );
+
+use Data::Dumper;
+
+$env = new cons(); # the env on which we will be working for all pk3s (NOTE: maybe we need several ctually)
+
+$hcf_do_exec = 1;
+sub do_command($)
+{
+ printf("@_[0]\n");
+ if ($hcf_do_exec)
+ {
+ system("@_[0]");
+ }
+}
+
+sub build_pk3 {
+
+ sub launch {
+ #print "In launch\n";
+ $Data::Dumper::Indent = 2;
+ #print Dumper(@_);
+ $tmpdir = "/tmp/pk3-builder$$";
+ do_command("rm -rf $tmpdir");
+
+ ($target, $sets) = @_;
+ $base=`basename $target`; chomp($base);
+ $dirname=`dirname $target`; chomp($dirname);
+
+ foreach (@{$sets})
+ {
+ ($sourcepath, $destpath, $file) = @{$_};
+ #print "source: $sourcepath dest: $destpath file: $file\n";
+ do_command("mkdir -p $tmpdir/$destpath");
+ if ($sourcepath =~ /#.*/)
+ {
+ #print "$sourcepath is absolute\n";
+ $sourcepath =~ s/#//;
+ if (ref($file))
+ {
+ foreach(@{$file})
+ {
+ do_command("cp $sourcepath/$_ $tmpdir/$destpath/$_");
+ }
+ }
+ else
+ {
+ do_command("cp $sourcepath/$file $tmpdir/$destpath/$file");
+ }
+ }
+ else
+ {
+ #print "$sourcepath in linked dir\n";
+ if (ref($file))
+ {
+ foreach(@{$file})
+ {
+ do_command("cp $BUILD_DIR/$sourcepath/$_ $tmpdir/$destpath/$_");
+ }
+ }
+ else
+ {
+ do_command("cp $BUILD_DIR/$sourcepath/$file $tmpdir/$destpath/$file");
+ }
+ }
+ }
+
+ do_command("cd $tmpdir ; zip -r $base *");
+ do_command("mkdir -p $BUILD_DIR/$dirname");
+ do_command("cp $tmpdir/$base $BUILD_DIR/$target");
+ do_command("rm -rf $tmpdir");
+
+ return 1;
+ }
+
+ # extract the parameters
+ ($target, $sets) = @_;
+
+ $base=`basename $target`; chomp($base);
+ $dirname=`dirname $target`; chomp($dirname);
+
+ # the build command is stored and called later on by cons
+ # this makes it impossible to have several build_pk3 working together
+ # there is probably a cleaner solution than this hack, but this works
+ $target_uniquename="target_$base";
+ $target_uniquename=~s/\.//g;
+ eval("\$$target_uniquename=\$target");
+ $sets_uniquename="sets_$base";
+ $sets_uniquename=~s/\.//g;
+ eval("\$$sets_uniquename=\$sets");
+ #print "name: $target_uniquename after the hack: $target_pak8pk3";
+
+ # don't pass @{@_} .. since this will be called during the process
+ $command = "[perl] &launch( \$$target_uniquename, [ \@{\$$sets_uniquename} ] )";
+ #print "$command\n";
+
+ foreach(@{$sets})
+ {
+ ($sourcepath, $destpath, $file) = @{$_};
+ if (ref($file))
+ {
+ foreach(@{$file})
+ {
+ Depends $env $target, $sourcepath . '/' . $_;
+ }
+ }
+ else
+ {
+ Depends $env $target, $sourcepath . '/' . $file;
+ }
+ }
+ Command $env $target, $command;
+ Install $env $INSTALL_DIR . "/$dirname", $target;
+}
+
+# quick rundown on the syntax:
+# <target file>, [ <fileset1>, <fileset2>, ... ]
+# where <fileset>: [ <source directory>, <directory in zip>, <file1>, <file2>, .. ]
+
+build_pk3('baseq3/pak8.pk3',
+ [ [ '#../../../media/Q3Media-1.32/baseq3/menu/art', 'menu/art', 'pblogo.tga' ],
+ [ '../Q3/q3_ui/q3_ui', 'vm', 'ui.qvm' ],
+ [ '../Q3/cgame/cgame', 'vm', 'cgame.qvm' ],
+ [ '../Q3/game/game', 'vm', 'qagame.qvm' ] ]
+);
+
+build_pk3('missionpack/pak3.pk3',
+ [ [ '#../ui', 'ui', [ 'createserver.menu', 'joinserver.menu', 'filter.menu', 'punkbuster.menu', 'menus.txt' ] ],
+ [ '../TA/ui/ui', 'vm', 'ui.qvm' ],
+ [ '../TA/cgame/cgame', 'vm', 'cgame.qvm' ],
+ [ '../TA/game/game', 'vm', 'qagame.qvm' ],
+ [ '#../../../media/Q3Media-1.32/missionpack/scripts', 'scripts', 'models2.shader' ] ]
+);