MoveAway/MoveBackConflictingFiles is a bad idea, let's just WarnConflictingFiles

This commit is contained in:
rdb 2013-08-22 18:30:29 +00:00
parent 03e96d8c4a
commit 330a9c7b87
2 changed files with 7 additions and 16 deletions

View File

@ -2144,7 +2144,7 @@ def WriteConfigSettings():
WriteConfigSettings() WriteConfigSettings()
MoveAwayConflictingFiles() WarnConflictingFiles()
if SystemLibraryExists("dtoolbase"): if SystemLibraryExists("dtoolbase"):
print("%sWARNING:%s Found conflicting Panda3D libraries from other ppremake build!" % (GetColor("red"), GetColor())) print("%sWARNING:%s Found conflicting Panda3D libraries from other ppremake build!" % (GetColor("red"), GetColor()))
if SystemLibraryExists("p3dtoolconfig"): if SystemLibraryExists("p3dtoolconfig"):
@ -6423,7 +6423,6 @@ if (INSTALLER != 0):
########################################################################################## ##########################################################################################
SaveDependencyCache() SaveDependencyCache()
MoveBackConflictingFiles()
WARNINGS.append("Elapsed Time: "+PrettyTime(time.time() - STARTTIME)) WARNINGS.append("Elapsed Time: "+PrettyTime(time.time() - STARTTIME))

View File

@ -96,10 +96,8 @@ for (ver,key1,key2,subdir) in MAXVERSIONINFO:
## ##
## Potentially Conflicting Files ## Potentially Conflicting Files
## ##
## The next few functions can automatically move away files that ## The next function can warn about the existence of files that are
## are commonly generated by ppremake that may conflict with the ## commonly generated by ppremake that may conflict with the build.
## build. When makepanda exits, those files will automatically be
## put back to their original location.
## ##
######################################################################## ########################################################################
@ -113,15 +111,10 @@ CONFLICTING_FILES=["dtool/src/dtoolutil/pandaVersion.h",
"direct/src/plugin_npapi/nppanda3d.rc", "direct/src/plugin_npapi/nppanda3d.rc",
"direct/src/plugin_standalone/panda3d.rc"] "direct/src/plugin_standalone/panda3d.rc"]
def MoveAwayConflictingFiles(): def WarnConflictingFiles():
for cfile in CONFLICTING_FILES: for cfile in CONFLICTING_FILES:
if os.path.exists(cfile): if os.path.exists(cfile):
os.rename(cfile, cfile + ".moved") print("%sWARNING:%s file may conflict with build: %s%s%s" % (GetColor("red"), GetColor(), GetColor("green"), cfile, GetColor()))
def MoveBackConflictingFiles():
for cfile in CONFLICTING_FILES:
if os.path.exists(cfile + ".moved"):
os.rename(cfile + ".moved", cfile)
######################################################################## ########################################################################
## ##
@ -226,7 +219,6 @@ def exit(msg = ""):
sys.stderr.flush() sys.stderr.flush()
if (threading.currentThread() == MAINTHREAD): if (threading.currentThread() == MAINTHREAD):
SaveDependencyCache() SaveDependencyCache()
MoveBackConflictingFiles()
print("Elapsed Time: " + PrettyTime(time.time() - STARTTIME)) print("Elapsed Time: " + PrettyTime(time.time() - STARTTIME))
print(msg) print(msg)
print(ColorText("red", "Build terminated.")) print(ColorText("red", "Build terminated."))
@ -636,7 +628,7 @@ def NeedsBuild(files,others):
else: else:
oldothers = BUILTFROMCACHE[key][0] oldothers = BUILTFROMCACHE[key][0]
if (oldothers != others and VERBOSE): if (oldothers != others and VERBOSE):
print("%sWARNING:%s file dependencies changed: %s%s%s" % (GetColor("red"), GetColor(), GetColor("green"), str(files), GetColor())) print("%sWARNING:%s file dependencies changed: %s%s%s" % (GetColor("red"), GetColor(), GetColor("green"), files, GetColor()))
return 1 return 1
######################################################################## ########################################################################
@ -2145,7 +2137,7 @@ def SetupVisualStudioEnviron():
AddToPathEnv("INCLUDE", SDK["VISUALSTUDIO"] + "VC\\include") AddToPathEnv("INCLUDE", SDK["VISUALSTUDIO"] + "VC\\include")
AddToPathEnv("INCLUDE", SDK["VISUALSTUDIO"] + "VC\\atlmfc\\include") AddToPathEnv("INCLUDE", SDK["VISUALSTUDIO"] + "VC\\atlmfc\\include")
AddToPathEnv("LIB", SDK["VISUALSTUDIO"] + "VC\\lib"+suffix) AddToPathEnv("LIB", SDK["VISUALSTUDIO"] + "VC\\lib"+suffix)
AddToPathEnv("LIB", SDK["VISUALSTUDIO"] + "VC\\atlmfc\\lib") AddToPathEnv("LIB", SDK["VISUALSTUDIO"] + "VC\\atlmfc\\lib"+suffix)
AddToPathEnv("PATH", SDK["MSPLATFORM"] + "bin") AddToPathEnv("PATH", SDK["MSPLATFORM"] + "bin")
AddToPathEnv("INCLUDE", SDK["MSPLATFORM"] + "include") AddToPathEnv("INCLUDE", SDK["MSPLATFORM"] + "include")
AddToPathEnv("INCLUDE", SDK["MSPLATFORM"] + "include\\atl") AddToPathEnv("INCLUDE", SDK["MSPLATFORM"] + "include\\atl")