fix bugs, add no archive mode
This commit is contained in:
parent
897137a561
commit
e79f41c039
|
|
@ -10,6 +10,7 @@ $WIN_INSTALLDIR="\\\\cxgeorge-d01\\c\\pandabuilds\\win";
|
|||
# $DEBUG_TREECOPY = 1;
|
||||
|
||||
# $DEBUG_GENERATE_PYTHON_CODE_ONLY = 1;
|
||||
$DONT_ARCHIVE_OLD_BUILDS = 0;
|
||||
|
||||
$BLD_DTOOL_ONLY=0;
|
||||
$DIRPATH_SEPARATOR=':'; # set to ';' for non-cygwin NT perl
|
||||
|
|
@ -21,6 +22,7 @@ $ENV{'TCSH_NO_CSHRC_CHDIR'}='1';
|
|||
$ENV{'HOME'}="/home/builder";
|
||||
$ENV{'USER'}="builder";
|
||||
$ENV{'USERNAME'}=$ENV{'USER'};
|
||||
$DONT_ARCHIVE_OLD_BUILDS = (($ENV{'DONT_ARCHIVE_OLD_BUILDS'} ne "") || $DONT_ARCHIVE_OLD_BUILDS);
|
||||
|
||||
sub logmsg() {
|
||||
my $msg = shift;
|
||||
|
|
@ -209,7 +211,9 @@ sub gen_python_code() {
|
|||
$genpyth_str="python ";
|
||||
}
|
||||
|
||||
$outputdir = $WINBLDROOT."\\direct\\lib\\py\\Opt".$ENV{'PANDA_OPTIMIZE'}."-Win32";
|
||||
$outputdir = $WINBLDROOT."\\direct\\lib\\py";
|
||||
&mymkdir($outputdir);
|
||||
$outputdir.= "\\Opt".$ENV{'PANDA_OPTIMIZE'}."-Win32";
|
||||
&mymkdir($outputdir);
|
||||
|
||||
$genpyth_str.="generatePythonCode -v -d '".$outputdir."' -e '".$WINBLDROOT."\\direct\\src\\extensions' -i libdtool libpandaexpress libpanda libdirect";
|
||||
|
|
@ -262,6 +266,8 @@ sub buildall() {
|
|||
|
||||
&mychdir($CYGBLDROOT); # get out of src dirs to allow them to be moved/renamed
|
||||
unlink($CYGBLDROOT."/dtool/dtool_config.h"); # fix freakish NTFS bug, this file is regenerated by ppremake anyway
|
||||
|
||||
&gen_python_code();
|
||||
}
|
||||
|
||||
# assumes environment already attached to TOOL/PANDA/DIRECT/TOONTOWN
|
||||
|
|
@ -341,7 +347,8 @@ if($DEBUG_TREECOPY) {
|
|||
}
|
||||
|
||||
if($DEBUG_GENERATE_PYTHON_CODE_ONLY) {
|
||||
goto 'AFTER_DBGBUILD';
|
||||
&gen_python_code();
|
||||
exit(0);
|
||||
}
|
||||
|
||||
# goto 'SKIP_REMOVE';
|
||||
|
|
@ -404,12 +411,12 @@ if(-e $CYGBLDROOT."/debug") {
|
|||
"DO_LOG","NT cmd");
|
||||
}
|
||||
|
||||
BEFORE_DBGBUILD:
|
||||
|
||||
&buildall("*** Starting Debug Build (Opt=1) at ".&gettimestr()." ***");
|
||||
|
||||
AFTER_DBGBUILD:
|
||||
|
||||
&gen_python_code();
|
||||
|
||||
&myexecstr("cvs checkout -R ".$dirstodostr." |& egrep -v 'Updating|^\\?'",
|
||||
"cvs checkout failed!","DO_LOG","NO_PANDA_ATTACH");
|
||||
|
||||
|
|
@ -432,8 +439,6 @@ delete $ENV{'USE_BROWSEINFO'};
|
|||
$ENV{'PANDA_OPTIMIZE'}='2';
|
||||
&buildall("*** Starting Install Build (Opt=2) at ".&gettimestr()." ***");
|
||||
|
||||
&gen_python_code();
|
||||
|
||||
# opt2 creates .sbr files when it should not
|
||||
#foreach my $dir1 (@dirstodolist) {
|
||||
# &mychdir($CYGBLDROOT."/".$dir1);
|
||||
|
|
@ -446,8 +451,6 @@ $ENV{'PANDA_OPTIMIZE'}='2';
|
|||
$ENV{'PANDA_OPTIMIZE'}='4';
|
||||
&buildall("*** Starting Release Build (Opt=4) at ".&gettimestr()." ***");
|
||||
|
||||
&gen_python_code();
|
||||
|
||||
# opt2 creates .sbr files when it should not
|
||||
#foreach my $dir1 (@dirstodolist) {
|
||||
# &mychdir($CYGBLDROOT."/".$dir1);
|
||||
|
|
@ -493,14 +496,19 @@ sub archivetree() {
|
|||
|
||||
#goto 'StartTreeCopy'; #DBG
|
||||
|
||||
&logmsg("*** Archiving old builds on install server at ".&gettimestr()." ***");
|
||||
if($DONT_ARCHIVE_OLD_BUILDS) {
|
||||
&myexecstr("rd /s /q ".$opt1dir." ".$opt2dir,"","DO_LOG","NT cmd"); # dont bother checking errors here, probably just some shell has the dir cd'd to
|
||||
|
||||
if(-e $opt1dir) {
|
||||
&archivetree($opt1dir,$newdayarchivedirname."\\debug");
|
||||
}
|
||||
} elsif((-e $opt1dir) || (-e $opt2dir)) {
|
||||
&logmsg("*** Archiving old builds on install server at ".&gettimestr()." ***");
|
||||
|
||||
if(-e $opt2dir) {
|
||||
&archivetree($opt2dir,$newdayarchivedirname."\\install");
|
||||
if(-e $opt1dir) {
|
||||
&archivetree($opt1dir,$newdayarchivedirname."\\debug");
|
||||
}
|
||||
|
||||
if(-e $opt2dir) {
|
||||
&archivetree($opt2dir,$newdayarchivedirname."\\install");
|
||||
}
|
||||
}
|
||||
|
||||
StartTreeCopy:
|
||||
|
|
@ -538,7 +546,6 @@ exit(0);
|
|||
# TODO:
|
||||
# possibly auto delete or compress old archived blds
|
||||
# build DLLs with version stamp set by this script
|
||||
# implement no-archive mode
|
||||
# implement build-specific opttype mode
|
||||
# generate python code
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue