9 # =====================================================================
13 # find out where a perforce file resides on the local machine
16 open(P4
, "p4 where $_[0] |");
32 die "usage: buildObjectTemplateCrcStringTables [--local|--all|--only <changelist#>] <current|test|live|x1|x2|ep3|demo|s#>\n" .
33 "\t--local : include pending files only from the local client\n" .
34 "\t--all : include pending files from all clients\n" .
35 "\t--only <changelist#> : include pending files only from <changelist#>\n" .
36 "\tif no option is provided, --local is assumed.\n";
39 # =====================================================================
41 sub perforceGatherAndPrune
48 open(P4
, "p4 files $spec/... |");
53 s
%//depot
/swg/$branch/data/sku\
.0/sys\.(shared|server)/compiled
/game/%%;
59 open(P4
, "p4 opened " . $all . " " . $only . " $spec/... |");
63 s
%//depot
/swg/$branch/data/sku\
.0/sys\.(shared|server)/compiled
/game/%%;
70 return sort keys %files;
73 # =====================================================================
75 if ($#ARGV == 1 || $#ARGV == 2)
77 if ($ARGV[0] eq "--local")
81 elsif ($ARGV[0] eq "--all")
85 elsif ($ARGV[0] eq "--only" && $#ARGV == 2)
88 $only = "-c " . $ARGV[1];
99 usage
() unless (defined($ARGV[0]) && $ARGV[0] =~ m
%^(current
|test
|stage
|live
|x1
|x2
|ep3
|demo
|s\d
+)$%);
103 my $buildCrcStringTable = perforceWhere
("//depot/swg/$branch/tools/buildCrcStringTable.pl");
105 my $tab = perforceWhere
("//depot/swg/$branch/dsrc/sku.0/sys.client/built/game/misc/object_template_crc_string_table.tab");
106 my $output = perforceWhere
("//depot/swg/$branch/data/sku.0/sys.client/built/game/misc/object_template_crc_string_table.iff");
107 print "building client object template strings:\n\t$tab\n\t$output\n";
108 system("p4 edit $tab $output");
110 my @files = perforceGatherAndPrune
(
111 "//depot/swg/$branch/data/sku.0/sys.shared/compiled/game/object",
112 "//depot/swg/$branch/data/sku.0/sys.server/compiled/game/object/creature/player");
114 open(B
, "| perl $buildCrcStringTable -t $tab $output");
123 my $tab = perforceWhere
("//depot/swg/$branch/dsrc/sku.0/sys.server/built/game/misc/object_template_crc_string_table.tab");
124 my $output = perforceWhere
("//depot/swg/$branch/data/sku.0/sys.server/built/game/misc/object_template_crc_string_table.iff");
125 print "building server object template strings:\n\t$tab\n\t$output\n";
126 system("p4 edit $tab $output");
128 my @files = perforceGatherAndPrune
(
129 "//depot/swg/$branch/data/sku.0/sys.shared/compiled/game/object",
130 "//depot/swg/$branch/data/sku.0/sys.server/compiled/game/object");
132 open(B
, "| perl $buildCrcStringTable -t $tab $output");