From bc1c4825ff91ee72c4c8be83e6107d52e6f889b3 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Wed, 4 Aug 2010 18:49:46 +0200 Subject: [PATCH] Fixed: Added hack to handle badly exported FO_S2_big_tree in build_gamedata, and cleaned up some stuff. --- code/nel/tools/build_gamedata/0_setup.py | 8 ++---- code/nel/tools/build_gamedata/1_export.py | 8 ++---- code/nel/tools/build_gamedata/2_build.py | 8 ++---- code/nel/tools/build_gamedata/3_install.py | 9 +++---- .../build_gamedata/configuration/scripts.py | 3 +++ .../tools/build_gamedata/processes/0_setup.py | 1 - .../build_gamedata/processes/1_export.py | 2 +- .../tools/build_gamedata/processes/2_build.py | 2 +- .../build_gamedata/processes/3_install.py | 2 +- .../build_gamedata/processes/anim/0_setup.py | 2 +- .../build_gamedata/processes/anim/1_export.py | 2 +- .../build_gamedata/processes/anim/2_build.py | 2 +- .../processes/anim/3_install.py | 2 +- .../build_gamedata/processes/cegui/0_setup.py | 2 +- .../processes/cegui/1_export.py | 2 +- .../build_gamedata/processes/cegui/2_build.py | 2 +- .../processes/cegui/3_install.py | 2 +- .../processes/displace/0_setup.py | 2 +- .../processes/displace/1_export.py | 2 +- .../processes/displace/2_build.py | 2 +- .../processes/displace/3_install.py | 2 +- .../processes/farbank/0_setup.py | 2 +- .../processes/farbank/1_export.py | 2 +- .../processes/farbank/2_build.py | 2 +- .../processes/farbank/3_install.py | 2 +- .../build_gamedata/processes/font/0_setup.py | 2 +- .../build_gamedata/processes/font/1_export.py | 2 +- .../build_gamedata/processes/font/2_build.py | 2 +- .../processes/font/3_install.py | 2 +- .../processes/ig_light/0_setup.py | 2 +- .../processes/ig_light/1_export.py | 2 +- .../processes/ig_light/2_build.py | 2 +- .../processes/ig_light/3_install.py | 2 +- .../processes/interface/0_setup.py | 2 +- .../processes/interface/1_export.py | 2 +- .../processes/interface/2_build.py | 2 +- .../processes/interface/3_install.py | 2 +- .../build_gamedata/processes/ligo/0_setup.py | 6 ++--- .../build_gamedata/processes/ligo/1_export.py | 2 +- .../build_gamedata/processes/ligo/2_build.py | 4 +-- .../processes/ligo/3_install.py | 2 +- .../build_gamedata/processes/map/0_setup.py | 2 +- .../build_gamedata/processes/map/1_export.py | 2 +- .../build_gamedata/processes/map/2_build.py | 2 +- .../build_gamedata/processes/map/3_install.py | 2 +- .../build_gamedata/processes/rbank/0_setup.py | 2 +- .../processes/rbank/1_export.py | 2 +- .../build_gamedata/processes/rbank/2_build.py | 2 +- .../processes/rbank/3_install.py | 2 +- .../build_gamedata/processes/shape/0_setup.py | 2 +- .../processes/shape/1_export.py | 27 ++++++++++++++++++- .../build_gamedata/processes/shape/2_build.py | 2 +- .../processes/shape/3_install.py | 2 +- .../processes/sheet_id/0_setup.py | 2 +- .../processes/sheet_id/1_export.py | 2 +- .../processes/sheet_id/2_build.py | 2 +- .../processes/sheet_id/3_install.py | 2 +- .../processes/sheets/0_setup.py | 2 +- .../processes/sheets/1_export.py | 2 +- .../processes/sheets/2_build.py | 2 +- .../processes/sheets/3_install.py | 2 +- .../build_gamedata/processes/skel/0_setup.py | 2 +- .../build_gamedata/processes/skel/1_export.py | 2 +- .../build_gamedata/processes/skel/2_build.py | 2 +- .../processes/skel/3_install.py | 2 +- .../processes/smallbank/0_setup.py | 2 +- .../processes/smallbank/1_export.py | 2 +- .../processes/smallbank/2_build.py | 2 +- .../processes/smallbank/3_install.py | 2 +- .../build_gamedata/processes/sound/0_setup.py | 2 +- .../processes/sound/1_export.py | 2 +- .../build_gamedata/processes/sound/2_build.py | 2 +- .../processes/sound/3_install.py | 2 +- .../build_gamedata/processes/swt/0_setup.py | 2 +- .../build_gamedata/processes/swt/1_export.py | 2 +- .../build_gamedata/processes/swt/2_build.py | 2 +- .../build_gamedata/processes/swt/3_install.py | 2 +- .../build_gamedata/processes/tiles/0_setup.py | 2 +- .../processes/tiles/1_export.py | 2 +- .../build_gamedata/processes/tiles/2_build.py | 2 +- .../processes/tiles/3_install.py | 2 +- .../build_gamedata/processes/veget/0_setup.py | 2 +- .../processes/veget/1_export.py | 2 +- .../build_gamedata/processes/veget/2_build.py | 2 +- .../processes/veget/3_install.py | 2 +- .../processes/vegetset/0_setup.py | 2 +- .../processes/vegetset/1_export.py | 2 +- .../processes/vegetset/2_build.py | 2 +- .../processes/vegetset/3_install.py | 2 +- .../build_gamedata/processes/zone/0_setup.py | 2 +- .../build_gamedata/processes/zone/1_export.py | 2 +- .../build_gamedata/processes/zone/2_build.py | 2 +- .../processes/zone/3_install.py | 2 +- .../processes/zone_light/0_setup.py | 12 ++++----- .../processes/zone_light/1_export.py | 2 +- .../processes/zone_light/2_build.py | 6 ++--- .../processes/zone_light/3_install.py | 2 +- 97 files changed, 138 insertions(+), 126 deletions(-) diff --git a/code/nel/tools/build_gamedata/0_setup.py b/code/nel/tools/build_gamedata/0_setup.py index cb90e1cd5..9aa00a685 100644 --- a/code/nel/tools/build_gamedata/0_setup.py +++ b/code/nel/tools/build_gamedata/0_setup.py @@ -26,6 +26,7 @@ import time, sys, os, shutil, subprocess, distutils.dir_util sys.path.append("configuration") + if os.path.isfile("log.log"): os.remove("log.log") log = open("log.log", "w") @@ -139,11 +140,9 @@ printLog(log, "--- Run the setup projects") printLog(log, "-------") printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) printLog(log, "") -mkPath(log, "configuration/project") -removeFilesRecursive(log, "configuration/project") # For each project for projectName in ProjectsToProcess: - copyFilesRecursive(log, WorkspaceDirectory + "/" + projectName, "configuration/project") + os.putenv("NELBUILDACTIVEPROJECT", os.path.abspath(WorkspaceDirectory + "/" + projectName)) os.chdir("processes") try: subprocess.call([ "python", "0_setup.py" ]) @@ -157,9 +156,6 @@ for projectName in ProjectsToProcess: log.write(projectLogData) except Exception, e: printLog(log, "<" + projectName + "> " + str(e)) - removeFilesRecursive(log, WorkspaceDirectory + "/" + projectName) - copyFilesRecursive(log, "configuration/project", WorkspaceDirectory + "/" + projectName) - removeFilesRecursive(log, "configuration/project") printLog(log, "") log.close() diff --git a/code/nel/tools/build_gamedata/1_export.py b/code/nel/tools/build_gamedata/1_export.py index 697e175dd..0fb684592 100644 --- a/code/nel/tools/build_gamedata/1_export.py +++ b/code/nel/tools/build_gamedata/1_export.py @@ -26,6 +26,7 @@ import time, sys, os, shutil, subprocess, distutils.dir_util sys.path.append("configuration") + if os.path.isfile("log.log"): os.remove("log.log") log = open("log.log", "w") @@ -43,11 +44,9 @@ printLog(log, "--- Run the export processes") printLog(log, "-------") printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) printLog(log, "") -mkPath(log, "configuration/project") -removeFilesRecursive(log, "configuration/project") # For each project for projectName in ProjectsToProcess: - copyFilesRecursive(log, WorkspaceDirectory + "/" + projectName, "configuration/project") + os.putenv("NELBUILDACTIVEPROJECT", os.path.abspath(WorkspaceDirectory + "/" + projectName)) os.chdir("processes") try: subprocess.call([ "python", "1_export.py" ]) @@ -61,9 +60,6 @@ for projectName in ProjectsToProcess: log.write(projectLogData) except Exception, e: printLog(log, "<" + projectName + "> " + str(e)) - removeFilesRecursive(log, WorkspaceDirectory + "/" + projectName) - copyFilesRecursive(log, "configuration/project", WorkspaceDirectory + "/" + projectName) - removeFilesRecursive(log, "configuration/project") printLog(log, "") log.close() diff --git a/code/nel/tools/build_gamedata/2_build.py b/code/nel/tools/build_gamedata/2_build.py index 914ccf522..a6229c29c 100644 --- a/code/nel/tools/build_gamedata/2_build.py +++ b/code/nel/tools/build_gamedata/2_build.py @@ -26,6 +26,7 @@ import time, sys, os, shutil, subprocess, distutils.dir_util sys.path.append("configuration") + if os.path.isfile("log.log"): os.remove("log.log") log = open("log.log", "w") @@ -43,11 +44,9 @@ printLog(log, "--- Run the build processes") printLog(log, "-------") printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) printLog(log, "") -mkPath(log, "configuration/project") -removeFilesRecursive(log, "configuration/project") # For each project for projectName in ProjectsToProcess: - copyFilesRecursive(log, WorkspaceDirectory + "/" + projectName, "configuration/project") + os.putenv("NELBUILDACTIVEPROJECT", os.path.abspath(WorkspaceDirectory + "/" + projectName)) os.chdir("processes") try: subprocess.call([ "python", "2_build.py" ]) @@ -61,9 +60,6 @@ for projectName in ProjectsToProcess: log.write(projectLogData) except Exception, e: printLog(log, "<" + projectName + "> " + str(e)) - removeFilesRecursive(log, WorkspaceDirectory + "/" + projectName) - copyFilesRecursive(log, "configuration/project", WorkspaceDirectory + "/" + projectName) - removeFilesRecursive(log, "configuration/project") printLog(log, "") log.close() diff --git a/code/nel/tools/build_gamedata/3_install.py b/code/nel/tools/build_gamedata/3_install.py index 6a2a3f3ac..70ece522b 100644 --- a/code/nel/tools/build_gamedata/3_install.py +++ b/code/nel/tools/build_gamedata/3_install.py @@ -26,6 +26,7 @@ import time, sys, os, shutil, subprocess, distutils.dir_util sys.path.append("configuration") + if os.path.isfile("log.log"): os.remove("log.log") log = open("log.log", "w") @@ -36,17 +37,16 @@ from tools import * sys.path.append(WorkspaceDirectory) from projects import * +# Log error printLog(log, "") printLog(log, "-------") printLog(log, "--- Run the install processes") printLog(log, "-------") printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) printLog(log, "") -mkPath(log, "configuration/project") -removeFilesRecursive(log, "configuration/project") # For each project for projectName in ProjectsToProcess: - copyFilesRecursive(log, WorkspaceDirectory + "/" + projectName, "configuration/project") + os.putenv("NELBUILDACTIVEPROJECT", os.path.abspath(WorkspaceDirectory + "/" + projectName)) os.chdir("processes") try: subprocess.call([ "python", "3_install.py" ]) @@ -60,9 +60,6 @@ for projectName in ProjectsToProcess: log.write(projectLogData) except Exception, e: printLog(log, "<" + projectName + "> " + str(e)) - removeFilesRecursive(log, WorkspaceDirectory + "/" + projectName) - copyFilesRecursive(log, "configuration/project", WorkspaceDirectory + "/" + projectName) - removeFilesRecursive(log, "configuration/project") printLog(log, "") log.close() diff --git a/code/nel/tools/build_gamedata/configuration/scripts.py b/code/nel/tools/build_gamedata/configuration/scripts.py index f07a94839..c217d6001 100644 --- a/code/nel/tools/build_gamedata/configuration/scripts.py +++ b/code/nel/tools/build_gamedata/configuration/scripts.py @@ -25,6 +25,9 @@ import time, sys, os, shutil, subprocess, distutils.dir_util +ActiveProjectDirectory = os.getenv("NELBUILDACTIVEPROJECT", "configuration/project") +sys.path.append(ActiveProjectDirectory) + def printLog(log, text): log.write(text + "\n") print text diff --git a/code/nel/tools/build_gamedata/processes/0_setup.py b/code/nel/tools/build_gamedata/processes/0_setup.py index e973547f5..8a853bb50 100644 --- a/code/nel/tools/build_gamedata/processes/0_setup.py +++ b/code/nel/tools/build_gamedata/processes/0_setup.py @@ -26,7 +26,6 @@ import time, sys, os, shutil, subprocess, distutils.dir_util sys.path.append("../configuration") -sys.path.append("../configuration/project") if os.path.isfile("log.log"): os.remove("log.log") log = open("log.log", "w") diff --git a/code/nel/tools/build_gamedata/processes/1_export.py b/code/nel/tools/build_gamedata/processes/1_export.py index 2730b560a..fdd497720 100644 --- a/code/nel/tools/build_gamedata/processes/1_export.py +++ b/code/nel/tools/build_gamedata/processes/1_export.py @@ -26,7 +26,7 @@ import time, sys, os, shutil, subprocess, distutils.dir_util sys.path.append("../configuration") -sys.path.append("../configuration/project") + if os.path.isfile("log.log"): os.remove("log.log") log = open("log.log", "w") diff --git a/code/nel/tools/build_gamedata/processes/2_build.py b/code/nel/tools/build_gamedata/processes/2_build.py index 3952074b5..28ee3147c 100644 --- a/code/nel/tools/build_gamedata/processes/2_build.py +++ b/code/nel/tools/build_gamedata/processes/2_build.py @@ -26,7 +26,7 @@ import time, sys, os, shutil, subprocess, distutils.dir_util sys.path.append("../configuration") -sys.path.append("../configuration/project") + if os.path.isfile("log.log"): os.remove("log.log") log = open("log.log", "w") diff --git a/code/nel/tools/build_gamedata/processes/3_install.py b/code/nel/tools/build_gamedata/processes/3_install.py index 5b2464e27..fe51c0772 100644 --- a/code/nel/tools/build_gamedata/processes/3_install.py +++ b/code/nel/tools/build_gamedata/processes/3_install.py @@ -26,7 +26,7 @@ import time, sys, os, shutil, subprocess, distutils.dir_util sys.path.append("../configuration") -sys.path.append("../configuration/project") + if os.path.isfile("log.log"): os.remove("log.log") log = open("log.log", "w") diff --git a/code/nel/tools/build_gamedata/processes/anim/0_setup.py b/code/nel/tools/build_gamedata/processes/anim/0_setup.py index fc26202e6..5722b4238 100644 --- a/code/nel/tools/build_gamedata/processes/anim/0_setup.py +++ b/code/nel/tools/build_gamedata/processes/anim/0_setup.py @@ -26,7 +26,7 @@ import time, sys, os, shutil, subprocess, distutils.dir_util sys.path.append("../../configuration") -sys.path.append("../../configuration/project") + if os.path.isfile("log.log"): os.remove("log.log") log = open("log.log", "w") diff --git a/code/nel/tools/build_gamedata/processes/anim/1_export.py b/code/nel/tools/build_gamedata/processes/anim/1_export.py index fd95fe95b..fe6770ced 100644 --- a/code/nel/tools/build_gamedata/processes/anim/1_export.py +++ b/code/nel/tools/build_gamedata/processes/anim/1_export.py @@ -26,7 +26,7 @@ import time, sys, os, shutil, subprocess, distutils.dir_util sys.path.append("../../configuration") -sys.path.append("../../configuration/project") + if os.path.isfile("log.log"): os.remove("log.log") log = open("log.log", "w") diff --git a/code/nel/tools/build_gamedata/processes/anim/2_build.py b/code/nel/tools/build_gamedata/processes/anim/2_build.py index 8d07a3993..3cd6ead71 100644 --- a/code/nel/tools/build_gamedata/processes/anim/2_build.py +++ b/code/nel/tools/build_gamedata/processes/anim/2_build.py @@ -26,7 +26,7 @@ import time, sys, os, shutil, subprocess, distutils.dir_util sys.path.append("../../configuration") -sys.path.append("../../configuration/project") + if os.path.isfile("log.log"): os.remove("log.log") log = open("log.log", "w") diff --git a/code/nel/tools/build_gamedata/processes/anim/3_install.py b/code/nel/tools/build_gamedata/processes/anim/3_install.py index ebf40642e..c9b3c6875 100644 --- a/code/nel/tools/build_gamedata/processes/anim/3_install.py +++ b/code/nel/tools/build_gamedata/processes/anim/3_install.py @@ -26,7 +26,7 @@ import time, sys, os, shutil, subprocess, distutils.dir_util sys.path.append("../../configuration") -sys.path.append("../../configuration/project") + if os.path.isfile("log.log"): os.remove("log.log") log = open("log.log", "w") diff --git a/code/nel/tools/build_gamedata/processes/cegui/0_setup.py b/code/nel/tools/build_gamedata/processes/cegui/0_setup.py index 429063d3b..94b227869 100644 --- a/code/nel/tools/build_gamedata/processes/cegui/0_setup.py +++ b/code/nel/tools/build_gamedata/processes/cegui/0_setup.py @@ -25,7 +25,7 @@ import time, sys, os, shutil, subprocess, distutils.dir_util sys.path.append("../../configuration") -sys.path.append("../../configuration/project") + if os.path.isfile("log.log"): os.remove("log.log") log = open("log.log", "w") diff --git a/code/nel/tools/build_gamedata/processes/cegui/1_export.py b/code/nel/tools/build_gamedata/processes/cegui/1_export.py index 329a27dbb..3ebf1aa9b 100644 --- a/code/nel/tools/build_gamedata/processes/cegui/1_export.py +++ b/code/nel/tools/build_gamedata/processes/cegui/1_export.py @@ -25,7 +25,7 @@ import time, sys, os, shutil, subprocess, distutils.dir_util sys.path.append("../../configuration") -sys.path.append("../../configuration/project") + if os.path.isfile("log.log"): os.remove("log.log") log = open("log.log", "w") diff --git a/code/nel/tools/build_gamedata/processes/cegui/2_build.py b/code/nel/tools/build_gamedata/processes/cegui/2_build.py index 0f4653d0e..25499c329 100644 --- a/code/nel/tools/build_gamedata/processes/cegui/2_build.py +++ b/code/nel/tools/build_gamedata/processes/cegui/2_build.py @@ -25,7 +25,7 @@ import time, sys, os, shutil, subprocess, distutils.dir_util sys.path.append("../../configuration") -sys.path.append("../../configuration/project") + if os.path.isfile("log.log"): os.remove("log.log") log = open("log.log", "w") diff --git a/code/nel/tools/build_gamedata/processes/cegui/3_install.py b/code/nel/tools/build_gamedata/processes/cegui/3_install.py index 7d458dced..02ffe9a27 100644 --- a/code/nel/tools/build_gamedata/processes/cegui/3_install.py +++ b/code/nel/tools/build_gamedata/processes/cegui/3_install.py @@ -25,7 +25,7 @@ import time, sys, os, shutil, subprocess, distutils.dir_util sys.path.append("../../configuration") -sys.path.append("../../configuration/project") + if os.path.isfile("log.log"): os.remove("log.log") log = open("log.log", "w") diff --git a/code/nel/tools/build_gamedata/processes/displace/0_setup.py b/code/nel/tools/build_gamedata/processes/displace/0_setup.py index e84c6d787..27ba463ef 100644 --- a/code/nel/tools/build_gamedata/processes/displace/0_setup.py +++ b/code/nel/tools/build_gamedata/processes/displace/0_setup.py @@ -26,7 +26,7 @@ import time, sys, os, shutil, subprocess, distutils.dir_util sys.path.append("../../configuration") -sys.path.append("../../configuration/project") + if os.path.isfile("log.log"): os.remove("log.log") log = open("log.log", "w") diff --git a/code/nel/tools/build_gamedata/processes/displace/1_export.py b/code/nel/tools/build_gamedata/processes/displace/1_export.py index ba7b29708..59f360e14 100644 --- a/code/nel/tools/build_gamedata/processes/displace/1_export.py +++ b/code/nel/tools/build_gamedata/processes/displace/1_export.py @@ -26,7 +26,7 @@ import time, sys, os, shutil, subprocess, distutils.dir_util sys.path.append("../../configuration") -sys.path.append("../../configuration/project") + if os.path.isfile("log.log"): os.remove("log.log") log = open("log.log", "w") diff --git a/code/nel/tools/build_gamedata/processes/displace/2_build.py b/code/nel/tools/build_gamedata/processes/displace/2_build.py index caa094059..48bb342bf 100644 --- a/code/nel/tools/build_gamedata/processes/displace/2_build.py +++ b/code/nel/tools/build_gamedata/processes/displace/2_build.py @@ -26,7 +26,7 @@ import time, sys, os, shutil, subprocess, distutils.dir_util sys.path.append("../../configuration") -sys.path.append("../../configuration/project") + if os.path.isfile("log.log"): os.remove("log.log") log = open("log.log", "w") diff --git a/code/nel/tools/build_gamedata/processes/displace/3_install.py b/code/nel/tools/build_gamedata/processes/displace/3_install.py index de5b34a9e..2e6fb48f7 100644 --- a/code/nel/tools/build_gamedata/processes/displace/3_install.py +++ b/code/nel/tools/build_gamedata/processes/displace/3_install.py @@ -26,7 +26,7 @@ import time, sys, os, shutil, subprocess, distutils.dir_util sys.path.append("../../configuration") -sys.path.append("../../configuration/project") + if os.path.isfile("log.log"): os.remove("log.log") log = open("log.log", "w") diff --git a/code/nel/tools/build_gamedata/processes/farbank/0_setup.py b/code/nel/tools/build_gamedata/processes/farbank/0_setup.py index d3786d179..8f160a579 100644 --- a/code/nel/tools/build_gamedata/processes/farbank/0_setup.py +++ b/code/nel/tools/build_gamedata/processes/farbank/0_setup.py @@ -26,7 +26,7 @@ import time, sys, os, shutil, subprocess, distutils.dir_util sys.path.append("../../configuration") -sys.path.append("../../configuration/project") + if os.path.isfile("log.log"): os.remove("log.log") log = open("log.log", "w") diff --git a/code/nel/tools/build_gamedata/processes/farbank/1_export.py b/code/nel/tools/build_gamedata/processes/farbank/1_export.py index cbe55ea11..2fa644fa7 100644 --- a/code/nel/tools/build_gamedata/processes/farbank/1_export.py +++ b/code/nel/tools/build_gamedata/processes/farbank/1_export.py @@ -26,7 +26,7 @@ import time, sys, os, shutil, subprocess, distutils.dir_util sys.path.append("../../configuration") -sys.path.append("../../configuration/project") + if os.path.isfile("log.log"): os.remove("log.log") log = open("log.log", "w") diff --git a/code/nel/tools/build_gamedata/processes/farbank/2_build.py b/code/nel/tools/build_gamedata/processes/farbank/2_build.py index cc62bc0a0..711df0168 100644 --- a/code/nel/tools/build_gamedata/processes/farbank/2_build.py +++ b/code/nel/tools/build_gamedata/processes/farbank/2_build.py @@ -26,7 +26,7 @@ import time, sys, os, shutil, subprocess, distutils.dir_util sys.path.append("../../configuration") -sys.path.append("../../configuration/project") + if os.path.isfile("log.log"): os.remove("log.log") log = open("log.log", "w") diff --git a/code/nel/tools/build_gamedata/processes/farbank/3_install.py b/code/nel/tools/build_gamedata/processes/farbank/3_install.py index debd350e6..334c165c4 100644 --- a/code/nel/tools/build_gamedata/processes/farbank/3_install.py +++ b/code/nel/tools/build_gamedata/processes/farbank/3_install.py @@ -26,7 +26,7 @@ import time, sys, os, shutil, subprocess, distutils.dir_util sys.path.append("../../configuration") -sys.path.append("../../configuration/project") + if os.path.isfile("log.log"): os.remove("log.log") log = open("log.log", "w") diff --git a/code/nel/tools/build_gamedata/processes/font/0_setup.py b/code/nel/tools/build_gamedata/processes/font/0_setup.py index 466444bd6..bf61fce0e 100644 --- a/code/nel/tools/build_gamedata/processes/font/0_setup.py +++ b/code/nel/tools/build_gamedata/processes/font/0_setup.py @@ -26,7 +26,7 @@ import time, sys, os, shutil, subprocess, distutils.dir_util sys.path.append("../../configuration") -sys.path.append("../../configuration/project") + if os.path.isfile("log.log"): os.remove("log.log") log = open("log.log", "w") diff --git a/code/nel/tools/build_gamedata/processes/font/1_export.py b/code/nel/tools/build_gamedata/processes/font/1_export.py index a44ae3bbb..54292bec5 100644 --- a/code/nel/tools/build_gamedata/processes/font/1_export.py +++ b/code/nel/tools/build_gamedata/processes/font/1_export.py @@ -26,7 +26,7 @@ import time, sys, os, shutil, subprocess, distutils.dir_util sys.path.append("../../configuration") -sys.path.append("../../configuration/project") + if os.path.isfile("log.log"): os.remove("log.log") log = open("log.log", "w") diff --git a/code/nel/tools/build_gamedata/processes/font/2_build.py b/code/nel/tools/build_gamedata/processes/font/2_build.py index bdc823e81..5d8f5faa7 100644 --- a/code/nel/tools/build_gamedata/processes/font/2_build.py +++ b/code/nel/tools/build_gamedata/processes/font/2_build.py @@ -26,7 +26,7 @@ import time, sys, os, shutil, subprocess, distutils.dir_util sys.path.append("../../configuration") -sys.path.append("../../configuration/project") + if os.path.isfile("log.log"): os.remove("log.log") log = open("log.log", "w") diff --git a/code/nel/tools/build_gamedata/processes/font/3_install.py b/code/nel/tools/build_gamedata/processes/font/3_install.py index b56978ff1..55da60bed 100644 --- a/code/nel/tools/build_gamedata/processes/font/3_install.py +++ b/code/nel/tools/build_gamedata/processes/font/3_install.py @@ -26,7 +26,7 @@ import time, sys, os, shutil, subprocess, distutils.dir_util sys.path.append("../../configuration") -sys.path.append("../../configuration/project") + if os.path.isfile("log.log"): os.remove("log.log") log = open("log.log", "w") diff --git a/code/nel/tools/build_gamedata/processes/ig_light/0_setup.py b/code/nel/tools/build_gamedata/processes/ig_light/0_setup.py index 27f875bab..5269231a8 100644 --- a/code/nel/tools/build_gamedata/processes/ig_light/0_setup.py +++ b/code/nel/tools/build_gamedata/processes/ig_light/0_setup.py @@ -26,7 +26,7 @@ import time, sys, os, shutil, subprocess, distutils.dir_util sys.path.append("../../configuration") -sys.path.append("../../configuration/project") + if os.path.isfile("log.log"): os.remove("log.log") log = open("log.log", "w") diff --git a/code/nel/tools/build_gamedata/processes/ig_light/1_export.py b/code/nel/tools/build_gamedata/processes/ig_light/1_export.py index c3229ca85..ac5c8a7f4 100644 --- a/code/nel/tools/build_gamedata/processes/ig_light/1_export.py +++ b/code/nel/tools/build_gamedata/processes/ig_light/1_export.py @@ -26,7 +26,7 @@ import time, sys, os, shutil, subprocess, distutils.dir_util sys.path.append("../../configuration") -sys.path.append("../../configuration/project") + if os.path.isfile("log.log"): os.remove("log.log") log = open("log.log", "w") diff --git a/code/nel/tools/build_gamedata/processes/ig_light/2_build.py b/code/nel/tools/build_gamedata/processes/ig_light/2_build.py index 0dac110d3..107461eae 100644 --- a/code/nel/tools/build_gamedata/processes/ig_light/2_build.py +++ b/code/nel/tools/build_gamedata/processes/ig_light/2_build.py @@ -26,7 +26,7 @@ import time, sys, os, shutil, subprocess, distutils.dir_util sys.path.append("../../configuration") -sys.path.append("../../configuration/project") + if os.path.isfile("log.log"): os.remove("log.log") log = open("log.log", "w") diff --git a/code/nel/tools/build_gamedata/processes/ig_light/3_install.py b/code/nel/tools/build_gamedata/processes/ig_light/3_install.py index 2406ab170..4ddf832f5 100644 --- a/code/nel/tools/build_gamedata/processes/ig_light/3_install.py +++ b/code/nel/tools/build_gamedata/processes/ig_light/3_install.py @@ -26,7 +26,7 @@ import time, sys, os, shutil, subprocess, distutils.dir_util sys.path.append("../../configuration") -sys.path.append("../../configuration/project") + if os.path.isfile("log.log"): os.remove("log.log") log = open("log.log", "w") diff --git a/code/nel/tools/build_gamedata/processes/interface/0_setup.py b/code/nel/tools/build_gamedata/processes/interface/0_setup.py index 49de11f0d..64fdee329 100644 --- a/code/nel/tools/build_gamedata/processes/interface/0_setup.py +++ b/code/nel/tools/build_gamedata/processes/interface/0_setup.py @@ -26,7 +26,7 @@ import time, sys, os, shutil, subprocess, distutils.dir_util sys.path.append("../../configuration") -sys.path.append("../../configuration/project") + if os.path.isfile("log.log"): os.remove("log.log") log = open("log.log", "w") diff --git a/code/nel/tools/build_gamedata/processes/interface/1_export.py b/code/nel/tools/build_gamedata/processes/interface/1_export.py index a5eef4d0c..d7ba086ac 100644 --- a/code/nel/tools/build_gamedata/processes/interface/1_export.py +++ b/code/nel/tools/build_gamedata/processes/interface/1_export.py @@ -26,7 +26,7 @@ import time, sys, os, shutil, subprocess, distutils.dir_util sys.path.append("../../configuration") -sys.path.append("../../configuration/project") + if os.path.isfile("log.log"): os.remove("log.log") log = open("log.log", "w") diff --git a/code/nel/tools/build_gamedata/processes/interface/2_build.py b/code/nel/tools/build_gamedata/processes/interface/2_build.py index 2b17b7a54..141eb3fcf 100644 --- a/code/nel/tools/build_gamedata/processes/interface/2_build.py +++ b/code/nel/tools/build_gamedata/processes/interface/2_build.py @@ -26,7 +26,7 @@ import time, sys, os, shutil, subprocess, distutils.dir_util sys.path.append("../../configuration") -sys.path.append("../../configuration/project") + if os.path.isfile("log.log"): os.remove("log.log") log = open("log.log", "w") diff --git a/code/nel/tools/build_gamedata/processes/interface/3_install.py b/code/nel/tools/build_gamedata/processes/interface/3_install.py index a727b0afc..e8b6ef832 100644 --- a/code/nel/tools/build_gamedata/processes/interface/3_install.py +++ b/code/nel/tools/build_gamedata/processes/interface/3_install.py @@ -26,7 +26,7 @@ import time, sys, os, shutil, subprocess, distutils.dir_util sys.path.append("../../configuration") -sys.path.append("../../configuration/project") + if os.path.isfile("log.log"): os.remove("log.log") log = open("log.log", "w") diff --git a/code/nel/tools/build_gamedata/processes/ligo/0_setup.py b/code/nel/tools/build_gamedata/processes/ligo/0_setup.py index 53def09da..10951702b 100644 --- a/code/nel/tools/build_gamedata/processes/ligo/0_setup.py +++ b/code/nel/tools/build_gamedata/processes/ligo/0_setup.py @@ -26,7 +26,7 @@ import time, sys, os, shutil, subprocess, distutils.dir_util sys.path.append("../../configuration") -sys.path.append("../../configuration/project") + if os.path.isfile("log.log"): os.remove("log.log") log = open("log.log", "w") @@ -73,8 +73,8 @@ printLog(log, ">>> Setup client directories <<<") # Setup land exporter cfg if LigoExportLand != "": printLog(log, ">>> Setup land exporter cfg <<<") - mkPath(log, ScriptDirectory + "/configuration/project/generated") - cf = open(ScriptDirectory + "/configuration/project/generated/land_exporter.cfg", "w") + mkPath(log, ActiveProjectDirectory + "/generated") + cf = open(ActiveProjectDirectory + "/generated/land_exporter.cfg", "w") cf.write("\n") cf.write("// Ligo settings\n") cf.write("\n") diff --git a/code/nel/tools/build_gamedata/processes/ligo/1_export.py b/code/nel/tools/build_gamedata/processes/ligo/1_export.py index 77c3c9bff..4ae323c43 100644 --- a/code/nel/tools/build_gamedata/processes/ligo/1_export.py +++ b/code/nel/tools/build_gamedata/processes/ligo/1_export.py @@ -26,7 +26,7 @@ import time, sys, os, shutil, subprocess, distutils.dir_util sys.path.append("../../configuration") -sys.path.append("../../configuration/project") + if os.path.isfile("log.log"): os.remove("log.log") log = open("log.log", "w") diff --git a/code/nel/tools/build_gamedata/processes/ligo/2_build.py b/code/nel/tools/build_gamedata/processes/ligo/2_build.py index 6ec37813c..5edf6519c 100644 --- a/code/nel/tools/build_gamedata/processes/ligo/2_build.py +++ b/code/nel/tools/build_gamedata/processes/ligo/2_build.py @@ -26,7 +26,7 @@ import time, sys, os, shutil, subprocess, distutils.dir_util sys.path.append("../../configuration") -sys.path.append("../../configuration/project") + if os.path.isfile("log.log"): os.remove("log.log") log = open("log.log", "w") @@ -53,7 +53,7 @@ if LigoExportLand != "": elif ExecTimeout == "": toolLogfail(log, ExecTimeoutTool, ToolSuffix) else: - subprocess.call([ ExecTimeout, str(LigoExportTimeout), LandExport, ScriptDirectory + "/configuration/project/generated/land_exporter.cfg" ]) + subprocess.call([ ExecTimeout, str(LigoExportTimeout), LandExport, ActiveProjectDirectory + "/generated/land_exporter.cfg" ]) printLog(log, ">>> Copy to zone builder <<<") dirSource = ExportBuildDirectory + "/" + LigoZoneBuildDirectory diff --git a/code/nel/tools/build_gamedata/processes/ligo/3_install.py b/code/nel/tools/build_gamedata/processes/ligo/3_install.py index d4bbc433c..18a8b3f2a 100644 --- a/code/nel/tools/build_gamedata/processes/ligo/3_install.py +++ b/code/nel/tools/build_gamedata/processes/ligo/3_install.py @@ -26,7 +26,7 @@ import time, sys, os, shutil, subprocess, distutils.dir_util sys.path.append("../../configuration") -sys.path.append("../../configuration/project") + if os.path.isfile("log.log"): os.remove("log.log") log = open("log.log", "w") diff --git a/code/nel/tools/build_gamedata/processes/map/0_setup.py b/code/nel/tools/build_gamedata/processes/map/0_setup.py index a1e6dc63f..85590d99c 100644 --- a/code/nel/tools/build_gamedata/processes/map/0_setup.py +++ b/code/nel/tools/build_gamedata/processes/map/0_setup.py @@ -26,7 +26,7 @@ import time, sys, os, shutil, subprocess, distutils.dir_util sys.path.append("../../configuration") -sys.path.append("../../configuration/project") + if os.path.isfile("log.log"): os.remove("log.log") log = open("log.log", "w") diff --git a/code/nel/tools/build_gamedata/processes/map/1_export.py b/code/nel/tools/build_gamedata/processes/map/1_export.py index e8c3004c9..88beb948e 100644 --- a/code/nel/tools/build_gamedata/processes/map/1_export.py +++ b/code/nel/tools/build_gamedata/processes/map/1_export.py @@ -26,7 +26,7 @@ import time, sys, os, shutil, subprocess, distutils.dir_util sys.path.append("../../configuration") -sys.path.append("../../configuration/project") + if os.path.isfile("log.log"): os.remove("log.log") log = open("log.log", "w") diff --git a/code/nel/tools/build_gamedata/processes/map/2_build.py b/code/nel/tools/build_gamedata/processes/map/2_build.py index 275cc1303..abff9ec7a 100644 --- a/code/nel/tools/build_gamedata/processes/map/2_build.py +++ b/code/nel/tools/build_gamedata/processes/map/2_build.py @@ -26,7 +26,7 @@ import time, sys, os, shutil, subprocess, distutils.dir_util sys.path.append("../../configuration") -sys.path.append("../../configuration/project") + if os.path.isfile("log.log"): os.remove("log.log") log = open("log.log", "w") diff --git a/code/nel/tools/build_gamedata/processes/map/3_install.py b/code/nel/tools/build_gamedata/processes/map/3_install.py index f69df3db2..2acb33bf3 100644 --- a/code/nel/tools/build_gamedata/processes/map/3_install.py +++ b/code/nel/tools/build_gamedata/processes/map/3_install.py @@ -26,7 +26,7 @@ import time, sys, os, shutil, subprocess, distutils.dir_util sys.path.append("../../configuration") -sys.path.append("../../configuration/project") + if os.path.isfile("log.log"): os.remove("log.log") log = open("log.log", "w") diff --git a/code/nel/tools/build_gamedata/processes/rbank/0_setup.py b/code/nel/tools/build_gamedata/processes/rbank/0_setup.py index 793a369ba..a5860cbad 100644 --- a/code/nel/tools/build_gamedata/processes/rbank/0_setup.py +++ b/code/nel/tools/build_gamedata/processes/rbank/0_setup.py @@ -26,7 +26,7 @@ import time, sys, os, shutil, subprocess, distutils.dir_util sys.path.append("../../configuration") -sys.path.append("../../configuration/project") + if os.path.isfile("log.log"): os.remove("log.log") log = open("log.log", "w") diff --git a/code/nel/tools/build_gamedata/processes/rbank/1_export.py b/code/nel/tools/build_gamedata/processes/rbank/1_export.py index 49ca653a9..89b38beac 100644 --- a/code/nel/tools/build_gamedata/processes/rbank/1_export.py +++ b/code/nel/tools/build_gamedata/processes/rbank/1_export.py @@ -26,7 +26,7 @@ import time, sys, os, shutil, subprocess, distutils.dir_util sys.path.append("../../configuration") -sys.path.append("../../configuration/project") + if os.path.isfile("log.log"): os.remove("log.log") log = open("log.log", "w") diff --git a/code/nel/tools/build_gamedata/processes/rbank/2_build.py b/code/nel/tools/build_gamedata/processes/rbank/2_build.py index 7020d7b09..02afbf142 100644 --- a/code/nel/tools/build_gamedata/processes/rbank/2_build.py +++ b/code/nel/tools/build_gamedata/processes/rbank/2_build.py @@ -26,7 +26,7 @@ import time, sys, os, shutil, subprocess, distutils.dir_util sys.path.append("../../configuration") -sys.path.append("../../configuration/project") + if os.path.isfile("log.log"): os.remove("log.log") log = open("log.log", "w") diff --git a/code/nel/tools/build_gamedata/processes/rbank/3_install.py b/code/nel/tools/build_gamedata/processes/rbank/3_install.py index c929820cd..363afc3b2 100644 --- a/code/nel/tools/build_gamedata/processes/rbank/3_install.py +++ b/code/nel/tools/build_gamedata/processes/rbank/3_install.py @@ -26,7 +26,7 @@ import time, sys, os, shutil, subprocess, distutils.dir_util sys.path.append("../../configuration") -sys.path.append("../../configuration/project") + if os.path.isfile("log.log"): os.remove("log.log") log = open("log.log", "w") diff --git a/code/nel/tools/build_gamedata/processes/shape/0_setup.py b/code/nel/tools/build_gamedata/processes/shape/0_setup.py index d3674c746..54c53826c 100644 --- a/code/nel/tools/build_gamedata/processes/shape/0_setup.py +++ b/code/nel/tools/build_gamedata/processes/shape/0_setup.py @@ -26,7 +26,7 @@ import time, sys, os, shutil, subprocess, distutils.dir_util sys.path.append("../../configuration") -sys.path.append("../../configuration/project") + if os.path.isfile("log.log"): os.remove("log.log") log = open("log.log", "w") diff --git a/code/nel/tools/build_gamedata/processes/shape/1_export.py b/code/nel/tools/build_gamedata/processes/shape/1_export.py index 362af5ed8..432511d30 100644 --- a/code/nel/tools/build_gamedata/processes/shape/1_export.py +++ b/code/nel/tools/build_gamedata/processes/shape/1_export.py @@ -26,7 +26,7 @@ import time, sys, os, shutil, subprocess, distutils.dir_util sys.path.append("../../configuration") -sys.path.append("../../configuration/project") + if os.path.isfile("log.log"): os.remove("log.log") log = open("log.log", "w") @@ -36,6 +36,30 @@ from process import * from tools import * from directories import * +def hackBigTree(): + # FO_S2_big_tree is corrupt on first export... + outDirTag = ExportBuildDirectory + "/" + ShapeTagExportDirectory + outDirWithCoarse = ExportBuildDirectory + "/" + ShapeWithCoarseMeshExportDirectory + shapeName = "FO_S2_big_tree.shape" + tagName = "FO_S2_big_tree.max.tag" + hackName = "FO_S2_big_tree_hack.tag" + if os.path.exists(outDirWithCoarse + "/" + shapeName) and os.path.exists(outDirTag + "/" + tagName) and not os.path.exists(outDirTag + "/" + hackName): + printLog(log, "Removing bad export of FO_S2_big_tree") + printLog(log, "RM " + outDirWithCoarse + "/" + shapeName) + os.remove(outDirWithCoarse + "/" + shapeName) + printLog(log, "RM " + outDirTag + "/" + tagName) + os.remove(outDirTag + "/" + tagName) + printLog(log, "TAG " + outDirTag + "/" + hackName) + hackTagFile = open(outDirTag + "/" + hackName, "w") + hackTagFile.write("FO_S2_big_tree") + hackTagFile.close() + return 1 + elif os.path.exists(outDirTag + "/" + hackName) and not os.path.exists(outDirWithCoarse + "/" + shapeName) and not os.path.exists(outDirTag + "/" + tagName): + printLog(log, "Missing export of FO_S2_big_tree") + return 0 + else: + return 0 + printLog(log, "") printLog(log, "-------") printLog(log, "--- Export shape") @@ -113,6 +137,7 @@ if MaxAvailable: tagDiff = newTagLen - tagLen tagLen = newTagLen printLog(log, "Exported " + str(tagDiff) + " .max files!") + tagDiff += hackBigTree() # force rerun also when big tree deleted os.remove(scriptDst) # Export clod 3dsmax diff --git a/code/nel/tools/build_gamedata/processes/shape/2_build.py b/code/nel/tools/build_gamedata/processes/shape/2_build.py index 10f52735f..c0e158918 100644 --- a/code/nel/tools/build_gamedata/processes/shape/2_build.py +++ b/code/nel/tools/build_gamedata/processes/shape/2_build.py @@ -26,7 +26,7 @@ import time, sys, os, shutil, subprocess, distutils.dir_util sys.path.append("../../configuration") -sys.path.append("../../configuration/project") + if os.path.isfile("log.log"): os.remove("log.log") log = open("log.log", "w") diff --git a/code/nel/tools/build_gamedata/processes/shape/3_install.py b/code/nel/tools/build_gamedata/processes/shape/3_install.py index de352fcab..3253a46fc 100644 --- a/code/nel/tools/build_gamedata/processes/shape/3_install.py +++ b/code/nel/tools/build_gamedata/processes/shape/3_install.py @@ -26,7 +26,7 @@ import time, sys, os, shutil, subprocess, distutils.dir_util sys.path.append("../../configuration") -sys.path.append("../../configuration/project") + if os.path.isfile("log.log"): os.remove("log.log") log = open("log.log", "w") diff --git a/code/nel/tools/build_gamedata/processes/sheet_id/0_setup.py b/code/nel/tools/build_gamedata/processes/sheet_id/0_setup.py index 93b8d3d7c..e72948c6f 100644 --- a/code/nel/tools/build_gamedata/processes/sheet_id/0_setup.py +++ b/code/nel/tools/build_gamedata/processes/sheet_id/0_setup.py @@ -26,7 +26,7 @@ import time, sys, os, shutil, subprocess, distutils.dir_util sys.path.append("../../configuration") -sys.path.append("../../configuration/project") + if os.path.isfile("log.log"): os.remove("log.log") log = open("log.log", "w") diff --git a/code/nel/tools/build_gamedata/processes/sheet_id/1_export.py b/code/nel/tools/build_gamedata/processes/sheet_id/1_export.py index 183664f26..39507587f 100644 --- a/code/nel/tools/build_gamedata/processes/sheet_id/1_export.py +++ b/code/nel/tools/build_gamedata/processes/sheet_id/1_export.py @@ -26,7 +26,7 @@ import time, sys, os, shutil, subprocess, distutils.dir_util sys.path.append("../../configuration") -sys.path.append("../../configuration/project") + if os.path.isfile("log.log"): os.remove("log.log") log = open("log.log", "w") diff --git a/code/nel/tools/build_gamedata/processes/sheet_id/2_build.py b/code/nel/tools/build_gamedata/processes/sheet_id/2_build.py index f2f210b99..aebadb110 100644 --- a/code/nel/tools/build_gamedata/processes/sheet_id/2_build.py +++ b/code/nel/tools/build_gamedata/processes/sheet_id/2_build.py @@ -26,7 +26,7 @@ import time, sys, os, shutil, subprocess, distutils.dir_util sys.path.append("../../configuration") -sys.path.append("../../configuration/project") + if os.path.isfile("log.log"): os.remove("log.log") log = open("log.log", "w") diff --git a/code/nel/tools/build_gamedata/processes/sheet_id/3_install.py b/code/nel/tools/build_gamedata/processes/sheet_id/3_install.py index e79124c61..72ef526aa 100644 --- a/code/nel/tools/build_gamedata/processes/sheet_id/3_install.py +++ b/code/nel/tools/build_gamedata/processes/sheet_id/3_install.py @@ -26,7 +26,7 @@ import time, sys, os, shutil, subprocess, distutils.dir_util sys.path.append("../../configuration") -sys.path.append("../../configuration/project") + if os.path.isfile("log.log"): os.remove("log.log") log = open("log.log", "w") diff --git a/code/nel/tools/build_gamedata/processes/sheets/0_setup.py b/code/nel/tools/build_gamedata/processes/sheets/0_setup.py index 4151a89ee..3f13ff715 100644 --- a/code/nel/tools/build_gamedata/processes/sheets/0_setup.py +++ b/code/nel/tools/build_gamedata/processes/sheets/0_setup.py @@ -26,7 +26,7 @@ import time, sys, os, shutil, subprocess, distutils.dir_util sys.path.append("../../configuration") -sys.path.append("../../configuration/project") + if os.path.isfile("log.log"): os.remove("log.log") log = open("log.log", "w") diff --git a/code/nel/tools/build_gamedata/processes/sheets/1_export.py b/code/nel/tools/build_gamedata/processes/sheets/1_export.py index 22c067ae3..dbf724906 100644 --- a/code/nel/tools/build_gamedata/processes/sheets/1_export.py +++ b/code/nel/tools/build_gamedata/processes/sheets/1_export.py @@ -26,7 +26,7 @@ import time, sys, os, shutil, subprocess, distutils.dir_util sys.path.append("../../configuration") -sys.path.append("../../configuration/project") + if os.path.isfile("log.log"): os.remove("log.log") log = open("log.log", "w") diff --git a/code/nel/tools/build_gamedata/processes/sheets/2_build.py b/code/nel/tools/build_gamedata/processes/sheets/2_build.py index 8530d8604..0b439ab4b 100644 --- a/code/nel/tools/build_gamedata/processes/sheets/2_build.py +++ b/code/nel/tools/build_gamedata/processes/sheets/2_build.py @@ -26,7 +26,7 @@ import time, sys, os, shutil, subprocess, distutils.dir_util sys.path.append("../../configuration") -sys.path.append("../../configuration/project") + if os.path.isfile("log.log"): os.remove("log.log") log = open("log.log", "w") diff --git a/code/nel/tools/build_gamedata/processes/sheets/3_install.py b/code/nel/tools/build_gamedata/processes/sheets/3_install.py index 326af190a..9ea39b797 100644 --- a/code/nel/tools/build_gamedata/processes/sheets/3_install.py +++ b/code/nel/tools/build_gamedata/processes/sheets/3_install.py @@ -26,7 +26,7 @@ import time, sys, os, shutil, subprocess, distutils.dir_util sys.path.append("../../configuration") -sys.path.append("../../configuration/project") + if os.path.isfile("log.log"): os.remove("log.log") log = open("log.log", "w") diff --git a/code/nel/tools/build_gamedata/processes/skel/0_setup.py b/code/nel/tools/build_gamedata/processes/skel/0_setup.py index 43de0b7ca..c45805523 100644 --- a/code/nel/tools/build_gamedata/processes/skel/0_setup.py +++ b/code/nel/tools/build_gamedata/processes/skel/0_setup.py @@ -26,7 +26,7 @@ import time, sys, os, shutil, subprocess, distutils.dir_util sys.path.append("../../configuration") -sys.path.append("../../configuration/project") + if os.path.isfile("log.log"): os.remove("log.log") log = open("log.log", "w") diff --git a/code/nel/tools/build_gamedata/processes/skel/1_export.py b/code/nel/tools/build_gamedata/processes/skel/1_export.py index 643bfc556..32744a224 100644 --- a/code/nel/tools/build_gamedata/processes/skel/1_export.py +++ b/code/nel/tools/build_gamedata/processes/skel/1_export.py @@ -26,7 +26,7 @@ import time, sys, os, shutil, subprocess, distutils.dir_util sys.path.append("../../configuration") -sys.path.append("../../configuration/project") + if os.path.isfile("log.log"): os.remove("log.log") log = open("log.log", "w") diff --git a/code/nel/tools/build_gamedata/processes/skel/2_build.py b/code/nel/tools/build_gamedata/processes/skel/2_build.py index 9557f3b29..f40203d5d 100644 --- a/code/nel/tools/build_gamedata/processes/skel/2_build.py +++ b/code/nel/tools/build_gamedata/processes/skel/2_build.py @@ -26,7 +26,7 @@ import time, sys, os, shutil, subprocess, distutils.dir_util sys.path.append("../../configuration") -sys.path.append("../../configuration/project") + if os.path.isfile("log.log"): os.remove("log.log") log = open("log.log", "w") diff --git a/code/nel/tools/build_gamedata/processes/skel/3_install.py b/code/nel/tools/build_gamedata/processes/skel/3_install.py index d96b7d5e0..a3b2c874d 100644 --- a/code/nel/tools/build_gamedata/processes/skel/3_install.py +++ b/code/nel/tools/build_gamedata/processes/skel/3_install.py @@ -26,7 +26,7 @@ import time, sys, os, shutil, subprocess, distutils.dir_util sys.path.append("../../configuration") -sys.path.append("../../configuration/project") + if os.path.isfile("log.log"): os.remove("log.log") log = open("log.log", "w") diff --git a/code/nel/tools/build_gamedata/processes/smallbank/0_setup.py b/code/nel/tools/build_gamedata/processes/smallbank/0_setup.py index d68485a6d..9ed9ad5a0 100644 --- a/code/nel/tools/build_gamedata/processes/smallbank/0_setup.py +++ b/code/nel/tools/build_gamedata/processes/smallbank/0_setup.py @@ -26,7 +26,7 @@ import time, sys, os, shutil, subprocess, distutils.dir_util sys.path.append("../../configuration") -sys.path.append("../../configuration/project") + if os.path.isfile("log.log"): os.remove("log.log") log = open("log.log", "w") diff --git a/code/nel/tools/build_gamedata/processes/smallbank/1_export.py b/code/nel/tools/build_gamedata/processes/smallbank/1_export.py index 5598dab23..17e3dff8d 100644 --- a/code/nel/tools/build_gamedata/processes/smallbank/1_export.py +++ b/code/nel/tools/build_gamedata/processes/smallbank/1_export.py @@ -26,7 +26,7 @@ import time, sys, os, shutil, subprocess, distutils.dir_util sys.path.append("../../configuration") -sys.path.append("../../configuration/project") + if os.path.isfile("log.log"): os.remove("log.log") log = open("log.log", "w") diff --git a/code/nel/tools/build_gamedata/processes/smallbank/2_build.py b/code/nel/tools/build_gamedata/processes/smallbank/2_build.py index a158ada96..282269255 100644 --- a/code/nel/tools/build_gamedata/processes/smallbank/2_build.py +++ b/code/nel/tools/build_gamedata/processes/smallbank/2_build.py @@ -26,7 +26,7 @@ import time, sys, os, shutil, subprocess, distutils.dir_util sys.path.append("../../configuration") -sys.path.append("../../configuration/project") + if os.path.isfile("log.log"): os.remove("log.log") log = open("log.log", "w") diff --git a/code/nel/tools/build_gamedata/processes/smallbank/3_install.py b/code/nel/tools/build_gamedata/processes/smallbank/3_install.py index 84b30b47d..b1093c043 100644 --- a/code/nel/tools/build_gamedata/processes/smallbank/3_install.py +++ b/code/nel/tools/build_gamedata/processes/smallbank/3_install.py @@ -26,7 +26,7 @@ import time, sys, os, shutil, subprocess, distutils.dir_util sys.path.append("../../configuration") -sys.path.append("../../configuration/project") + if os.path.isfile("log.log"): os.remove("log.log") log = open("log.log", "w") diff --git a/code/nel/tools/build_gamedata/processes/sound/0_setup.py b/code/nel/tools/build_gamedata/processes/sound/0_setup.py index b9e467725..ec039517a 100644 --- a/code/nel/tools/build_gamedata/processes/sound/0_setup.py +++ b/code/nel/tools/build_gamedata/processes/sound/0_setup.py @@ -26,7 +26,7 @@ import time, sys, os, shutil, subprocess, distutils.dir_util sys.path.append("../../configuration") -sys.path.append("../../configuration/project") + if os.path.isfile("log.log"): os.remove("log.log") log = open("log.log", "w") diff --git a/code/nel/tools/build_gamedata/processes/sound/1_export.py b/code/nel/tools/build_gamedata/processes/sound/1_export.py index 60193669e..d65156dc1 100644 --- a/code/nel/tools/build_gamedata/processes/sound/1_export.py +++ b/code/nel/tools/build_gamedata/processes/sound/1_export.py @@ -26,7 +26,7 @@ import time, sys, os, shutil, subprocess, distutils.dir_util sys.path.append("../../configuration") -sys.path.append("../../configuration/project") + if os.path.isfile("log.log"): os.remove("log.log") log = open("log.log", "w") diff --git a/code/nel/tools/build_gamedata/processes/sound/2_build.py b/code/nel/tools/build_gamedata/processes/sound/2_build.py index 95aa0e9e4..b430107a2 100644 --- a/code/nel/tools/build_gamedata/processes/sound/2_build.py +++ b/code/nel/tools/build_gamedata/processes/sound/2_build.py @@ -26,7 +26,7 @@ import time, sys, os, shutil, subprocess, distutils.dir_util sys.path.append("../../configuration") -sys.path.append("../../configuration/project") + if os.path.isfile("log.log"): os.remove("log.log") log = open("log.log", "w") diff --git a/code/nel/tools/build_gamedata/processes/sound/3_install.py b/code/nel/tools/build_gamedata/processes/sound/3_install.py index c32415bd7..90bd31d42 100644 --- a/code/nel/tools/build_gamedata/processes/sound/3_install.py +++ b/code/nel/tools/build_gamedata/processes/sound/3_install.py @@ -26,7 +26,7 @@ import time, sys, os, shutil, subprocess, distutils.dir_util sys.path.append("../../configuration") -sys.path.append("../../configuration/project") + if os.path.isfile("log.log"): os.remove("log.log") log = open("log.log", "w") diff --git a/code/nel/tools/build_gamedata/processes/swt/0_setup.py b/code/nel/tools/build_gamedata/processes/swt/0_setup.py index 6f67165f3..28da85a07 100644 --- a/code/nel/tools/build_gamedata/processes/swt/0_setup.py +++ b/code/nel/tools/build_gamedata/processes/swt/0_setup.py @@ -26,7 +26,7 @@ import time, sys, os, shutil, subprocess, distutils.dir_util sys.path.append("../../configuration") -sys.path.append("../../configuration/project") + if os.path.isfile("log.log"): os.remove("log.log") log = open("log.log", "w") diff --git a/code/nel/tools/build_gamedata/processes/swt/1_export.py b/code/nel/tools/build_gamedata/processes/swt/1_export.py index cb5a5b162..924ba2a6d 100644 --- a/code/nel/tools/build_gamedata/processes/swt/1_export.py +++ b/code/nel/tools/build_gamedata/processes/swt/1_export.py @@ -26,7 +26,7 @@ import time, sys, os, shutil, subprocess, distutils.dir_util sys.path.append("../../configuration") -sys.path.append("../../configuration/project") + if os.path.isfile("log.log"): os.remove("log.log") log = open("log.log", "w") diff --git a/code/nel/tools/build_gamedata/processes/swt/2_build.py b/code/nel/tools/build_gamedata/processes/swt/2_build.py index c2b2e7d9c..f0aa1eda0 100644 --- a/code/nel/tools/build_gamedata/processes/swt/2_build.py +++ b/code/nel/tools/build_gamedata/processes/swt/2_build.py @@ -26,7 +26,7 @@ import time, sys, os, shutil, subprocess, distutils.dir_util sys.path.append("../../configuration") -sys.path.append("../../configuration/project") + if os.path.isfile("log.log"): os.remove("log.log") log = open("log.log", "w") diff --git a/code/nel/tools/build_gamedata/processes/swt/3_install.py b/code/nel/tools/build_gamedata/processes/swt/3_install.py index 7d1f0c779..76ce2edaf 100644 --- a/code/nel/tools/build_gamedata/processes/swt/3_install.py +++ b/code/nel/tools/build_gamedata/processes/swt/3_install.py @@ -26,7 +26,7 @@ import time, sys, os, shutil, subprocess, distutils.dir_util sys.path.append("../../configuration") -sys.path.append("../../configuration/project") + if os.path.isfile("log.log"): os.remove("log.log") log = open("log.log", "w") diff --git a/code/nel/tools/build_gamedata/processes/tiles/0_setup.py b/code/nel/tools/build_gamedata/processes/tiles/0_setup.py index a15122e91..8657a63cb 100644 --- a/code/nel/tools/build_gamedata/processes/tiles/0_setup.py +++ b/code/nel/tools/build_gamedata/processes/tiles/0_setup.py @@ -26,7 +26,7 @@ import time, sys, os, shutil, subprocess, distutils.dir_util sys.path.append("../../configuration") -sys.path.append("../../configuration/project") + if os.path.isfile("log.log"): os.remove("log.log") log = open("log.log", "w") diff --git a/code/nel/tools/build_gamedata/processes/tiles/1_export.py b/code/nel/tools/build_gamedata/processes/tiles/1_export.py index d6b78b2f0..1b5a4eb2e 100644 --- a/code/nel/tools/build_gamedata/processes/tiles/1_export.py +++ b/code/nel/tools/build_gamedata/processes/tiles/1_export.py @@ -26,7 +26,7 @@ import time, sys, os, shutil, subprocess, distutils.dir_util sys.path.append("../../configuration") -sys.path.append("../../configuration/project") + if os.path.isfile("log.log"): os.remove("log.log") log = open("log.log", "w") diff --git a/code/nel/tools/build_gamedata/processes/tiles/2_build.py b/code/nel/tools/build_gamedata/processes/tiles/2_build.py index c40803a2b..b2a179c29 100644 --- a/code/nel/tools/build_gamedata/processes/tiles/2_build.py +++ b/code/nel/tools/build_gamedata/processes/tiles/2_build.py @@ -26,7 +26,7 @@ import time, sys, os, shutil, subprocess, distutils.dir_util sys.path.append("../../configuration") -sys.path.append("../../configuration/project") + if os.path.isfile("log.log"): os.remove("log.log") log = open("log.log", "w") diff --git a/code/nel/tools/build_gamedata/processes/tiles/3_install.py b/code/nel/tools/build_gamedata/processes/tiles/3_install.py index 2a971b9f0..39b8ac141 100644 --- a/code/nel/tools/build_gamedata/processes/tiles/3_install.py +++ b/code/nel/tools/build_gamedata/processes/tiles/3_install.py @@ -26,7 +26,7 @@ import time, sys, os, shutil, subprocess, distutils.dir_util sys.path.append("../../configuration") -sys.path.append("../../configuration/project") + if os.path.isfile("log.log"): os.remove("log.log") log = open("log.log", "w") diff --git a/code/nel/tools/build_gamedata/processes/veget/0_setup.py b/code/nel/tools/build_gamedata/processes/veget/0_setup.py index 8a25227d6..84ae97c7d 100644 --- a/code/nel/tools/build_gamedata/processes/veget/0_setup.py +++ b/code/nel/tools/build_gamedata/processes/veget/0_setup.py @@ -26,7 +26,7 @@ import time, sys, os, shutil, subprocess, distutils.dir_util sys.path.append("../../configuration") -sys.path.append("../../configuration/project") + if os.path.isfile("log.log"): os.remove("log.log") log = open("log.log", "w") diff --git a/code/nel/tools/build_gamedata/processes/veget/1_export.py b/code/nel/tools/build_gamedata/processes/veget/1_export.py index 44cd0b931..39e03c484 100644 --- a/code/nel/tools/build_gamedata/processes/veget/1_export.py +++ b/code/nel/tools/build_gamedata/processes/veget/1_export.py @@ -26,7 +26,7 @@ import time, sys, os, shutil, subprocess, distutils.dir_util sys.path.append("../../configuration") -sys.path.append("../../configuration/project") + if os.path.isfile("log.log"): os.remove("log.log") log = open("log.log", "w") diff --git a/code/nel/tools/build_gamedata/processes/veget/2_build.py b/code/nel/tools/build_gamedata/processes/veget/2_build.py index 30ad86fc8..c08502eaa 100644 --- a/code/nel/tools/build_gamedata/processes/veget/2_build.py +++ b/code/nel/tools/build_gamedata/processes/veget/2_build.py @@ -26,7 +26,7 @@ import time, sys, os, shutil, subprocess, distutils.dir_util sys.path.append("../../configuration") -sys.path.append("../../configuration/project") + if os.path.isfile("log.log"): os.remove("log.log") log = open("log.log", "w") diff --git a/code/nel/tools/build_gamedata/processes/veget/3_install.py b/code/nel/tools/build_gamedata/processes/veget/3_install.py index fad4ea33b..4be5ffc18 100644 --- a/code/nel/tools/build_gamedata/processes/veget/3_install.py +++ b/code/nel/tools/build_gamedata/processes/veget/3_install.py @@ -26,7 +26,7 @@ import time, sys, os, shutil, subprocess, distutils.dir_util sys.path.append("../../configuration") -sys.path.append("../../configuration/project") + if os.path.isfile("log.log"): os.remove("log.log") log = open("log.log", "w") diff --git a/code/nel/tools/build_gamedata/processes/vegetset/0_setup.py b/code/nel/tools/build_gamedata/processes/vegetset/0_setup.py index bd8df545b..8fd055f3c 100644 --- a/code/nel/tools/build_gamedata/processes/vegetset/0_setup.py +++ b/code/nel/tools/build_gamedata/processes/vegetset/0_setup.py @@ -26,7 +26,7 @@ import time, sys, os, shutil, subprocess, distutils.dir_util sys.path.append("../../configuration") -sys.path.append("../../configuration/project") + if os.path.isfile("log.log"): os.remove("log.log") log = open("log.log", "w") diff --git a/code/nel/tools/build_gamedata/processes/vegetset/1_export.py b/code/nel/tools/build_gamedata/processes/vegetset/1_export.py index 63ea405ef..c01d29baf 100644 --- a/code/nel/tools/build_gamedata/processes/vegetset/1_export.py +++ b/code/nel/tools/build_gamedata/processes/vegetset/1_export.py @@ -26,7 +26,7 @@ import time, sys, os, shutil, subprocess, distutils.dir_util sys.path.append("../../configuration") -sys.path.append("../../configuration/project") + if os.path.isfile("log.log"): os.remove("log.log") log = open("log.log", "w") diff --git a/code/nel/tools/build_gamedata/processes/vegetset/2_build.py b/code/nel/tools/build_gamedata/processes/vegetset/2_build.py index 2bc216775..2a2d800f1 100644 --- a/code/nel/tools/build_gamedata/processes/vegetset/2_build.py +++ b/code/nel/tools/build_gamedata/processes/vegetset/2_build.py @@ -26,7 +26,7 @@ import time, sys, os, shutil, subprocess, distutils.dir_util sys.path.append("../../configuration") -sys.path.append("../../configuration/project") + if os.path.isfile("log.log"): os.remove("log.log") log = open("log.log", "w") diff --git a/code/nel/tools/build_gamedata/processes/vegetset/3_install.py b/code/nel/tools/build_gamedata/processes/vegetset/3_install.py index 6e5f5506a..94a3e4c0b 100644 --- a/code/nel/tools/build_gamedata/processes/vegetset/3_install.py +++ b/code/nel/tools/build_gamedata/processes/vegetset/3_install.py @@ -26,7 +26,7 @@ import time, sys, os, shutil, subprocess, distutils.dir_util sys.path.append("../../configuration") -sys.path.append("../../configuration/project") + if os.path.isfile("log.log"): os.remove("log.log") log = open("log.log", "w") diff --git a/code/nel/tools/build_gamedata/processes/zone/0_setup.py b/code/nel/tools/build_gamedata/processes/zone/0_setup.py index 7ec4e5c5f..6a51da333 100644 --- a/code/nel/tools/build_gamedata/processes/zone/0_setup.py +++ b/code/nel/tools/build_gamedata/processes/zone/0_setup.py @@ -26,7 +26,7 @@ import time, sys, os, shutil, subprocess, distutils.dir_util sys.path.append("../../configuration") -sys.path.append("../../configuration/project") + if os.path.isfile("log.log"): os.remove("log.log") log = open("log.log", "w") diff --git a/code/nel/tools/build_gamedata/processes/zone/1_export.py b/code/nel/tools/build_gamedata/processes/zone/1_export.py index 564c47bb7..19308e1d1 100644 --- a/code/nel/tools/build_gamedata/processes/zone/1_export.py +++ b/code/nel/tools/build_gamedata/processes/zone/1_export.py @@ -26,7 +26,7 @@ import time, sys, os, shutil, subprocess, distutils.dir_util sys.path.append("../../configuration") -sys.path.append("../../configuration/project") + if os.path.isfile("log.log"): os.remove("log.log") log = open("log.log", "w") diff --git a/code/nel/tools/build_gamedata/processes/zone/2_build.py b/code/nel/tools/build_gamedata/processes/zone/2_build.py index 60f8d034f..6ce75fc58 100644 --- a/code/nel/tools/build_gamedata/processes/zone/2_build.py +++ b/code/nel/tools/build_gamedata/processes/zone/2_build.py @@ -26,7 +26,7 @@ import time, sys, os, shutil, subprocess, distutils.dir_util sys.path.append("../../configuration") -sys.path.append("../../configuration/project") + if os.path.isfile("log.log"): os.remove("log.log") log = open("log.log", "w") diff --git a/code/nel/tools/build_gamedata/processes/zone/3_install.py b/code/nel/tools/build_gamedata/processes/zone/3_install.py index d305974c4..d7322b1ff 100644 --- a/code/nel/tools/build_gamedata/processes/zone/3_install.py +++ b/code/nel/tools/build_gamedata/processes/zone/3_install.py @@ -26,7 +26,7 @@ import time, sys, os, shutil, subprocess, distutils.dir_util sys.path.append("../../configuration") -sys.path.append("../../configuration/project") + if os.path.isfile("log.log"): os.remove("log.log") log = open("log.log", "w") diff --git a/code/nel/tools/build_gamedata/processes/zone_light/0_setup.py b/code/nel/tools/build_gamedata/processes/zone_light/0_setup.py index 0626bb784..9e61a541d 100644 --- a/code/nel/tools/build_gamedata/processes/zone_light/0_setup.py +++ b/code/nel/tools/build_gamedata/processes/zone_light/0_setup.py @@ -26,7 +26,7 @@ import time, sys, os, shutil, subprocess, distutils.dir_util sys.path.append("../../configuration") -sys.path.append("../../configuration/project") + if os.path.isfile("log.log"): os.remove("log.log") log = open("log.log", "w") @@ -43,9 +43,9 @@ printLog(log, "-------") printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) printLog(log, "") -mkPath(log, ScriptDirectory + "/configuration/project/generated") -zlp = open(ScriptDirectory + "/configuration/project/generated/zone_lighter.cfg", "w") -ps = open(ScriptDirectory + "/configuration/project/zone_lighter_base.cfg", "r") +mkPath(log, ActiveProjectDirectory + "/generated") +zlp = open(ActiveProjectDirectory + "/generated/zone_lighter.cfg", "w") +ps = open(ActiveProjectDirectory + "/zone_lighter_base.cfg", "r") for line in ps: newline = line.replace("%ExportBuildDirectory%", ExportBuildDirectory) newline = newline.replace("%SmallbankExportDirectory%", SmallbankExportDirectory) @@ -61,9 +61,9 @@ for line in ps: zlp.write(newline) ps.close() if (BuildQuality == 1): - ps = open(ScriptDirectory + "/configuration/project/zone_lighter_final.cfg", "r") + ps = open(ActiveProjectDirectory + "/zone_lighter_final.cfg", "r") else: - ps = open(ScriptDirectory + "/configuration/project/zone_lighter_draft.cfg", "r") + ps = open(ActiveProjectDirectory + "/zone_lighter_draft.cfg", "r") for line in ps: zlp.write(line) zlp.close() diff --git a/code/nel/tools/build_gamedata/processes/zone_light/1_export.py b/code/nel/tools/build_gamedata/processes/zone_light/1_export.py index 50e1d6e36..5b186e46f 100644 --- a/code/nel/tools/build_gamedata/processes/zone_light/1_export.py +++ b/code/nel/tools/build_gamedata/processes/zone_light/1_export.py @@ -26,7 +26,7 @@ import time, sys, os, shutil, subprocess, distutils.dir_util sys.path.append("../../configuration") -sys.path.append("../../configuration/project") + if os.path.isfile("log.log"): os.remove("log.log") log = open("log.log", "w") diff --git a/code/nel/tools/build_gamedata/processes/zone_light/2_build.py b/code/nel/tools/build_gamedata/processes/zone_light/2_build.py index 124e7cf4f..1aeecceda 100644 --- a/code/nel/tools/build_gamedata/processes/zone_light/2_build.py +++ b/code/nel/tools/build_gamedata/processes/zone_light/2_build.py @@ -26,7 +26,7 @@ import time, sys, os, shutil, subprocess, distutils.dir_util sys.path.append("../../configuration") -sys.path.append("../../configuration/project") + if os.path.isfile("log.log"): os.remove("log.log") log = open("log.log", "w") @@ -68,7 +68,7 @@ else: destFile = destDir + "/" + file[0:-len(".zonew")] + ".zonel" if (needUpdateLogRemoveDest(log, srcFile, destFile)): dependFile = destDir + "/" + file[0:-len(".zonew")] + ".depend" - subprocess.call([ ExecTimeout, str(ZoneLightBuildTimeout), ZoneLighter, srcFile, destFile, ScriptDirectory + "/configuration/project/generated/zone_lighter.cfg", dependFile ]) + subprocess.call([ ExecTimeout, str(ZoneLightBuildTimeout), ZoneLighter, srcFile, destFile, ActiveProjectDirectory + "/generated/zone_lighter.cfg", dependFile ]) printLog(log, "") # For each zone_light ig @@ -94,7 +94,7 @@ else: if (needUpdateLogRemoveDest(log, igsrcFile, destFile)): srcFile = srcDir + "/" + file # ************************* TODO CHECK IF THIS REALLY WORKS ************************************* dependFile = destDir + "/" + file[0:-len(".zonel")] + ".depend" - subprocess.call([ ExecTimeout, str(ZoneIgLightBuildTimeout), ZoneIgLighter, srcFile, destFile, ScriptDirectory + "/configuration/project/generated/zone_lighter.cfg", dependFile ]) + subprocess.call([ ExecTimeout, str(ZoneIgLightBuildTimeout), ZoneIgLighter, srcFile, destFile, ActiveProjectDirectory + "/generated/zone_lighter.cfg", dependFile ]) printLog(log, "") log.close() diff --git a/code/nel/tools/build_gamedata/processes/zone_light/3_install.py b/code/nel/tools/build_gamedata/processes/zone_light/3_install.py index 5027dd8bb..158c35e47 100644 --- a/code/nel/tools/build_gamedata/processes/zone_light/3_install.py +++ b/code/nel/tools/build_gamedata/processes/zone_light/3_install.py @@ -26,7 +26,7 @@ import time, sys, os, shutil, subprocess, distutils.dir_util sys.path.append("../../configuration") -sys.path.append("../../configuration/project") + if os.path.isfile("log.log"): os.remove("log.log") log = open("log.log", "w")