2
0
Эх сурвалжийг харах

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

rdb 12 жил өмнө
parent
commit
330a9c7b87

+ 1 - 2
makepanda/makepanda.py

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

+ 6 - 14
makepanda/makepandacore.py

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