10 # =====================================================================
14 # find out where a perforce file resides on the local machine
17 open(P4
, "p4 where $_[0] |");
33 die "usage: buildQuestCrcStringTables [--local|--all|--only <changelist#>] <current|stage|test|live|x1|x2|ep3|demo|s#>\n" .
34 "\t--local : include pending files only from the local client\n" .
35 "\t--all : include pending files from all clients\n" .
36 "\t--only <changelist#> : include pending files only from <changelist#>\n" .
37 "\tif no option is provided, --local is assumed.\n";
40 # =====================================================================
42 sub perforceGatherAndPrune
49 open(P4
, "p4 files $spec/... |");
54 s
%//depot
/swg/$branch/data/sku\
.0/sys\.(shared|server)/compiled
/game/datatables
/questlist/%%;
61 open(P4
, "p4 opened " . $all . " " . $only . " $spec/... |");
65 s
%//depot
/swg/$branch/data/sku\
.0/sys\.(shared|server)/compiled
/game/datatables
/questlist/%%;
73 return sort keys %files;
76 # =====================================================================
78 if ($#ARGV == 1 || $#ARGV == 2)
80 if ($ARGV[0] eq "--local")
84 elsif ($ARGV[0] eq "--all")
88 elsif ($ARGV[0] eq "--only" && $#ARGV == 2)
91 $only = "-c " . $ARGV[1];
102 usage
() unless (defined($ARGV[0]) && $ARGV[0] =~ m
%^(current
|stage
|test
|live
|x1
|x2
|ep3
|demo
|s\d
+)$%);
107 my $tab = perforceWhere
("//depot/swg/$branch/dsrc/sku.0/sys.shared/built/game/misc/quest_crc_string_table.tab");
108 my $output = perforceWhere
("//depot/swg/$branch/data/sku.0/sys.shared/built/game/misc/quest_crc_string_table.iff");
109 print "building quest template strings:\n\t$tab\n\t$output\n";
110 system("p4 edit $tab $output");
112 my @files = perforceGatherAndPrune
("//depot/swg/$branch/data/sku.0/sys.shared/compiled/game/datatables/questlist");
114 open(B
, "| perl buildCrcStringTable.pl -t $tab $output");