Added: #1093 Command line arguments for build gamedata scripts, filter projects and processes, make setup buildsite config skippable, and verify tool paths in setup script.

This commit is contained in:
kaetemi 2011-09-17 11:35:07 +02:00
parent 261a77dbb9
commit aa90415148
9 changed files with 525 additions and 335 deletions

View file

@ -24,9 +24,27 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
# #
import time, sys, os, shutil, subprocess, distutils.dir_util import time, sys, os, shutil, subprocess, distutils.dir_util, argparse
sys.path.append("configuration") sys.path.append("configuration")
parser = argparse.ArgumentParser(description='Ryzom Core - Build Gamedata - Setup')
parser.add_argument('--noconf', '-nc', action='store_true')
parser.add_argument('--noverify', '-nv', action='store_true')
# parser.add_argument('--haltonerror', '-eh', action='store_true')
parser.add_argument('--includeproject', '-ipj', nargs='+')
parser.add_argument('--excludeproject', '-epj', nargs='+')
parser.add_argument('--includeprocess', '-ipc', nargs='+')
parser.add_argument('--excludeprocess', '-epc', nargs='+')
args = parser.parse_args()
if not args.includeproject == None and not args.excludeproject == None:
print "ERROR --includeproject cannot be combined with --excludeproject, exit."
exit()
if not args.includeprocess == None and not args.excludeprocess == None:
print "ERROR --includeprocess cannot be combined with --excludeprocess, exit."
exit()
if os.path.isfile("log.log"): if os.path.isfile("log.log"):
os.remove("log.log") os.remove("log.log")
log = open("log.log", "w") log = open("log.log", "w")
@ -35,221 +53,225 @@ try:
from buildsite import * from buildsite import *
except ImportError: except ImportError:
printLog(log, "*** FIRST RUN ***") printLog(log, "*** FIRST RUN ***")
if args.noconf:
printLog(log, "ERROR --noconf is invalid on first run, exit.")
exit()
from tools import * from tools import *
try: if not args.noconf:
BuildQuality try:
except NameError: BuildQuality
BuildQuality = 1 except NameError:
try: BuildQuality = 1
ToolDirectories try:
except NameError: ToolDirectories
ToolDirectories = [ 'R:/build/dev/bin/Release', 'D:/libraries/external/bin' ] except NameError:
try: ToolDirectories = [ 'R:/build/dev/bin/Release', 'D:/libraries/external/bin' ]
ToolSuffix try:
except NameError: ToolSuffix
ToolSuffix = ".exe" except NameError:
try: ToolSuffix = ".exe"
ScriptDirectory try:
except NameError: ScriptDirectory
ScriptDirectory = "R:/code/nel/tools/build_gamedata" except NameError:
try: ScriptDirectory = "R:/code/nel/tools/build_gamedata"
WorkspaceDirectory try:
except NameError: WorkspaceDirectory
WorkspaceDirectory = "R:/code/ryzom/tools/build_gamedata/workspace" except NameError:
try: WorkspaceDirectory = "R:/code/ryzom/tools/build_gamedata/workspace"
DatabaseDirectory try:
except NameError: DatabaseDirectory
DatabaseDirectory = "W:/database" except NameError:
try: DatabaseDirectory = "W:/database"
ExportBuildDirectory try:
except NameError: ExportBuildDirectory
ExportBuildDirectory = "W:/export" except NameError:
try: ExportBuildDirectory = "W:/export"
InstallDirectory try:
except NameError: InstallDirectory
InstallDirectory = "W:/install" except NameError:
try: InstallDirectory = "W:/install"
DataShardDirectory try:
except NameError: DataShardDirectory
DataShardDirectory = "R:/code/ryzom/server/data_shard" except NameError:
try: DataShardDirectory = "R:/code/ryzom/server/data_shard"
ClientDevDirectory try:
except NameError: ClientDevDirectory
ClientDevDirectory = "W:/client_dev" except NameError:
try: ClientDevDirectory = "W:/client_dev"
ClientPatchDirectory try:
except NameError: ClientPatchDirectory
ClientPatchDirectory = "W:/client_patch" except NameError:
try: ClientPatchDirectory = "W:/client_patch"
ClientInstallDirectory try:
except NameError: ClientInstallDirectory
ClientInstallDirectory = "W:/client_install" except NameError:
try: ClientInstallDirectory = "W:/client_install"
LeveldesignDirectory try:
except NameError: LeveldesignDirectory
LeveldesignDirectory = "L:/leveldesign" except NameError:
try: LeveldesignDirectory = "L:/leveldesign"
LeveldesignDfnDirectory try:
except NameError: LeveldesignDfnDirectory
LeveldesignDfnDirectory = "L:/leveldesign/dfn" except NameError:
try: LeveldesignDfnDirectory = "L:/leveldesign/dfn"
LeveldesignWorldDirectory try:
except NameError: LeveldesignWorldDirectory
LeveldesignWorldDirectory = "L:/leveldesign/world" except NameError:
try: LeveldesignWorldDirectory = "L:/leveldesign/world"
PrimitivesDirectory try:
except NameError: PrimitivesDirectory
PrimitivesDirectory = "L:/primitives" except NameError:
try: PrimitivesDirectory = "L:/primitives"
GamedevDirectory try:
except NameError: GamedevDirectory
GamedevDirectory = "R:/code/ryzom/client/data/gamedev" except NameError:
try: GamedevDirectory = "R:/code/ryzom/client/data/gamedev"
DataCommonDirectory try:
except NameError: DataCommonDirectory
DataCommonDirectory = "R:/code/ryzom/common/data_common" except NameError:
try: DataCommonDirectory = "R:/code/ryzom/common/data_common"
WindowsExeDllCfgDirectories try:
except NameError: WindowsExeDllCfgDirectories
WindowsExeDllCfgDirectories = [ 'C:/Program Files (x86)/Microsoft Visual Studio 9.0/VC/redist/x86', 'D:/libraries/external/bin', 'R:/build/dev/bin/Release', 'R:/code/ryzom/client', 'R:/code/nel/lib', 'R:/code/ryzom/bin', 'R:/code/ryzom/tools/client/client_config/bin' ] except NameError:
try: WindowsExeDllCfgDirectories = [ 'C:/Program Files (x86)/Microsoft Visual Studio 9.0/VC/redist/x86', 'D:/libraries/external/bin', 'R:/build/dev/bin/Release', 'R:/code/ryzom/client', 'R:/code/nel/lib', 'R:/code/ryzom/bin', 'R:/code/ryzom/tools/client/client_config/bin' ]
MaxAvailable try:
except NameError: MaxAvailable
MaxAvailable = 1 except NameError:
try: MaxAvailable = 1
MaxDirectory try:
except NameError: MaxDirectory
MaxDirectory = "C:/Program Files (x86)/Autodesk/3ds Max 2010" except NameError:
try: MaxDirectory = "C:/Program Files (x86)/Autodesk/3ds Max 2010"
MaxUserDirectory try:
except NameError: MaxUserDirectory
MaxUserDirectory = "C:/Users/Kaetemi/AppData/Local/Autodesk/3dsMax/2010 - 32bit/enu" except NameError:
try: MaxUserDirectory = "C:/Users/Kaetemi/AppData/Local/Autodesk/3dsMax/2010 - 32bit/enu"
MaxExecutable try:
except NameError: MaxExecutable
MaxExecutable = "3dsmax.exe" except NameError:
MaxExecutable = "3dsmax.exe"
printLog(log, "") printLog(log, "")
printLog(log, "-------") printLog(log, "-------")
printLog(log, "--- Setup build site") printLog(log, "--- Setup build site")
printLog(log, "-------") printLog(log, "-------")
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
printLog(log, "") printLog(log, "")
printLog(log, "This script will set up the buildsite configuration, and create needed directories.") printLog(log, "This script will set up the buildsite configuration, and create needed directories.")
printLog(log, "To use the defaults, simply hit ENTER, else type in the new value.") printLog(log, "To use the defaults, simply hit ENTER, else type in the new value.")
printLog(log, "Use -- if you need to insert an empty value.") printLog(log, "Use -- if you need to insert an empty value.")
printLog(log, "") printLog(log, "")
BuildQuality = int(askVar(log, "Build Quality", str(BuildQuality))) BuildQuality = int(askVar(log, "Build Quality", str(BuildQuality)))
ToolDirectories[0] = askVar(log, "Primary Tool Directory", ToolDirectories[0]).replace("\\", "/") ToolDirectories[0] = askVar(log, "Primary Tool Directory", ToolDirectories[0]).replace("\\", "/")
ToolDirectories[1] = askVar(log, "Secondary Tool Directory", ToolDirectories[1]).replace("\\", "/") ToolDirectories[1] = askVar(log, "Secondary Tool Directory", ToolDirectories[1]).replace("\\", "/")
ToolSuffix = askVar(log, "Tool Suffix", ToolSuffix) ToolSuffix = askVar(log, "Tool Suffix", ToolSuffix)
ScriptDirectory = askVar(log, "Script Directory", os.getcwd().replace("\\", "/")).replace("\\", "/") ScriptDirectory = askVar(log, "Script Directory", os.getcwd().replace("\\", "/")).replace("\\", "/")
WorkspaceDirectory = askVar(log, "Workspace Directory", WorkspaceDirectory).replace("\\", "/") WorkspaceDirectory = askVar(log, "Workspace Directory", WorkspaceDirectory).replace("\\", "/")
DatabaseDirectory = askVar(log, "Database Directory", DatabaseDirectory).replace("\\", "/") DatabaseDirectory = askVar(log, "Database Directory", DatabaseDirectory).replace("\\", "/")
ExportBuildDirectory = askVar(log, "Export Build Directory", ExportBuildDirectory).replace("\\", "/") ExportBuildDirectory = askVar(log, "Export Build Directory", ExportBuildDirectory).replace("\\", "/")
InstallDirectory = askVar(log, "Install Directory", InstallDirectory).replace("\\", "/") InstallDirectory = askVar(log, "Install Directory", InstallDirectory).replace("\\", "/")
DataShardDirectory = askVar(log, "Data Shard Directory", DataShardDirectory).replace("\\", "/") DataShardDirectory = askVar(log, "Data Shard Directory", DataShardDirectory).replace("\\", "/")
ClientDevDirectory = askVar(log, "Client Dev Directory", ClientDevDirectory).replace("\\", "/") ClientDevDirectory = askVar(log, "Client Dev Directory", ClientDevDirectory).replace("\\", "/")
ClientPatchDirectory = askVar(log, "Client Patch Directory", ClientPatchDirectory).replace("\\", "/") ClientPatchDirectory = askVar(log, "Client Patch Directory", ClientPatchDirectory).replace("\\", "/")
ClientInstallDirectory = askVar(log, "Client Install Directory", ClientInstallDirectory).replace("\\", "/") ClientInstallDirectory = askVar(log, "Client Install Directory", ClientInstallDirectory).replace("\\", "/")
LeveldesignDirectory = askVar(log, "Leveldesign Directory", LeveldesignDirectory).replace("\\", "/") LeveldesignDirectory = askVar(log, "Leveldesign Directory", LeveldesignDirectory).replace("\\", "/")
LeveldesignDfnDirectory = askVar(log, "Leveldesign DFN Directory", LeveldesignDfnDirectory).replace("\\", "/") LeveldesignDfnDirectory = askVar(log, "Leveldesign DFN Directory", LeveldesignDfnDirectory).replace("\\", "/")
LeveldesignWorldDirectory = askVar(log, "Leveldesign World Directory", LeveldesignWorldDirectory).replace("\\", "/") LeveldesignWorldDirectory = askVar(log, "Leveldesign World Directory", LeveldesignWorldDirectory).replace("\\", "/")
PrimitivesDirectory = askVar(log, "Primitives Directory", PrimitivesDirectory).replace("\\", "/") PrimitivesDirectory = askVar(log, "Primitives Directory", PrimitivesDirectory).replace("\\", "/")
GamedevDirectory = askVar(log, "Gamedev Directory", GamedevDirectory).replace("\\", "/") GamedevDirectory = askVar(log, "Gamedev Directory", GamedevDirectory).replace("\\", "/")
DataCommonDirectory = askVar(log, "Data Common Directory", DataCommonDirectory).replace("\\", "/") DataCommonDirectory = askVar(log, "Data Common Directory", DataCommonDirectory).replace("\\", "/")
WindowsExeDllCfgDirectories[0] = askVar(log, "Primary Windows exe/dll/cfg Directory", WindowsExeDllCfgDirectories[0]).replace("\\", "/") WindowsExeDllCfgDirectories[0] = askVar(log, "Primary Windows exe/dll/cfg Directory", WindowsExeDllCfgDirectories[0]).replace("\\", "/")
WindowsExeDllCfgDirectories[1] = askVar(log, "Secondary Windows exe/dll/cfg Directory", WindowsExeDllCfgDirectories[1]).replace("\\", "/") WindowsExeDllCfgDirectories[1] = askVar(log, "Secondary Windows exe/dll/cfg Directory", WindowsExeDllCfgDirectories[1]).replace("\\", "/")
WindowsExeDllCfgDirectories[2] = askVar(log, "Tertiary Windows exe/dll/cfg Directory", WindowsExeDllCfgDirectories[2]).replace("\\", "/") WindowsExeDllCfgDirectories[2] = askVar(log, "Tertiary Windows exe/dll/cfg Directory", WindowsExeDllCfgDirectories[2]).replace("\\", "/")
WindowsExeDllCfgDirectories[3] = askVar(log, "Quaternary Windows exe/dll/cfg Directory", WindowsExeDllCfgDirectories[3]).replace("\\", "/") WindowsExeDllCfgDirectories[3] = askVar(log, "Quaternary Windows exe/dll/cfg Directory", WindowsExeDllCfgDirectories[3]).replace("\\", "/")
WindowsExeDllCfgDirectories[4] = askVar(log, "Quinary Windows exe/dll/cfg Directory", WindowsExeDllCfgDirectories[4]).replace("\\", "/") WindowsExeDllCfgDirectories[4] = askVar(log, "Quinary Windows exe/dll/cfg Directory", WindowsExeDllCfgDirectories[4]).replace("\\", "/")
WindowsExeDllCfgDirectories[5] = askVar(log, "Senary Windows exe/dll/cfg Directory", WindowsExeDllCfgDirectories[5]).replace("\\", "/") WindowsExeDllCfgDirectories[5] = askVar(log, "Senary Windows exe/dll/cfg Directory", WindowsExeDllCfgDirectories[5]).replace("\\", "/")
WindowsExeDllCfgDirectories[6] = askVar(log, "Septenary Windows exe/dll/cfg Directory", WindowsExeDllCfgDirectories[6]).replace("\\", "/") WindowsExeDllCfgDirectories[6] = askVar(log, "Septenary Windows exe/dll/cfg Directory", WindowsExeDllCfgDirectories[6]).replace("\\", "/")
MaxAvailable = int(askVar(log, "3dsMax Available", str(MaxAvailable))) MaxAvailable = int(askVar(log, "3dsMax Available", str(MaxAvailable)))
if MaxAvailable: if MaxAvailable:
MaxDirectory = askVar(log, "3dsMax Directory", MaxDirectory).replace("\\", "/") MaxDirectory = askVar(log, "3dsMax Directory", MaxDirectory).replace("\\", "/")
MaxUserDirectory = askVar(log, "3dsMax User Directory", MaxUserDirectory).replace("\\", "/") MaxUserDirectory = askVar(log, "3dsMax User Directory", MaxUserDirectory).replace("\\", "/")
MaxExecutable = askVar(log, "3dsMax Executable", MaxExecutable) MaxExecutable = askVar(log, "3dsMax Executable", MaxExecutable)
if os.path.isfile("configuration/buildsite.py"): if os.path.isfile("configuration/buildsite.py"):
os.remove("configuration/buildsite.py") os.remove("configuration/buildsite.py")
sf = open("configuration/buildsite.py", "w") sf = open("configuration/buildsite.py", "w")
sf.write("#!/usr/bin/python\n") sf.write("#!/usr/bin/python\n")
sf.write("# \n") sf.write("# \n")
sf.write("# \\file site.py\n") sf.write("# \\file site.py\n")
sf.write("# \\brief Site configuration\n") sf.write("# \\brief Site configuration\n")
sf.write("# \\date " + time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + "\n") sf.write("# \\date " + time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + "\n")
sf.write("# \\author Jan Boon (Kaetemi)\n") sf.write("# \\author Jan Boon (Kaetemi)\n")
sf.write("# Python port of game data build pipeline.\n") sf.write("# Python port of game data build pipeline.\n")
sf.write("# Site configuration.\n") sf.write("# Site configuration.\n")
sf.write("# \n") sf.write("# \n")
sf.write("# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>\n") sf.write("# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>\n")
sf.write("# Copyright (C) 2010 Winch Gate Property Limited\n") sf.write("# Copyright (C) 2010 Winch Gate Property Limited\n")
sf.write("# \n") sf.write("# \n")
sf.write("# This program is free software: you can redistribute it and/or modify\n") sf.write("# This program is free software: you can redistribute it and/or modify\n")
sf.write("# it under the terms of the GNU Affero General Public License as\n") sf.write("# it under the terms of the GNU Affero General Public License as\n")
sf.write("# published by the Free Software Foundation, either version 3 of the\n") sf.write("# published by the Free Software Foundation, either version 3 of the\n")
sf.write("# License, or (at your option) any later version.\n") sf.write("# License, or (at your option) any later version.\n")
sf.write("# \n") sf.write("# \n")
sf.write("# This program is distributed in the hope that it will be useful,\n") sf.write("# This program is distributed in the hope that it will be useful,\n")
sf.write("# but WITHOUT ANY WARRANTY; without even the implied warranty of\n") sf.write("# but WITHOUT ANY WARRANTY; without even the implied warranty of\n")
sf.write("# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n") sf.write("# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n")
sf.write("# GNU Affero General Public License for more details.\n") sf.write("# GNU Affero General Public License for more details.\n")
sf.write("# \n") sf.write("# \n")
sf.write("# You should have received a copy of the GNU Affero General Public License\n") sf.write("# You should have received a copy of the GNU Affero General Public License\n")
sf.write("# along with this program. If not, see <http://www.gnu.org/licenses/>.\n") sf.write("# along with this program. If not, see <http://www.gnu.org/licenses/>.\n")
sf.write("# \n") sf.write("# \n")
sf.write("\n") sf.write("\n")
sf.write("\n") sf.write("\n")
sf.write("# *** SITE INSTALLATION ***\n") sf.write("# *** SITE INSTALLATION ***\n")
sf.write("\n") sf.write("\n")
sf.write("# Use '/' in path name, not '\'\n") sf.write("# Use '/' in path name, not '\'\n")
sf.write("# Don't put '/' at the end of a directory name\n") sf.write("# Don't put '/' at the end of a directory name\n")
sf.write("\n") sf.write("\n")
sf.write("\n") sf.write("\n")
sf.write("# Quality option for this site (1 for BEST, 0 for DRAFT)\n") sf.write("# Quality option for this site (1 for BEST, 0 for DRAFT)\n")
sf.write("BuildQuality = " + str(BuildQuality) + "\n") sf.write("BuildQuality = " + str(BuildQuality) + "\n")
sf.write("\n") sf.write("\n")
sf.write("ToolDirectories = " + str(ToolDirectories) + "\n") sf.write("ToolDirectories = " + str(ToolDirectories) + "\n")
sf.write("ToolSuffix = \"" + str(ToolSuffix) + "\"\n") sf.write("ToolSuffix = \"" + str(ToolSuffix) + "\"\n")
sf.write("\n") sf.write("\n")
sf.write("# Build script directory\n") sf.write("# Build script directory\n")
sf.write("ScriptDirectory = \"" + str(ScriptDirectory) + "\"\n") sf.write("ScriptDirectory = \"" + str(ScriptDirectory) + "\"\n")
sf.write("WorkspaceDirectory = \"" + str(WorkspaceDirectory) + "\"\n") sf.write("WorkspaceDirectory = \"" + str(WorkspaceDirectory) + "\"\n")
sf.write("\n") sf.write("\n")
sf.write("# Data build directories\n") sf.write("# Data build directories\n")
sf.write("DatabaseDirectory = \"" + str(DatabaseDirectory) + "\"\n") sf.write("DatabaseDirectory = \"" + str(DatabaseDirectory) + "\"\n")
sf.write("ExportBuildDirectory = \"" + str(ExportBuildDirectory) + "\"\n") sf.write("ExportBuildDirectory = \"" + str(ExportBuildDirectory) + "\"\n")
sf.write("\n") sf.write("\n")
sf.write("# Install directories\n") sf.write("# Install directories\n")
sf.write("InstallDirectory = \"" + str(InstallDirectory) + "\"\n") sf.write("InstallDirectory = \"" + str(InstallDirectory) + "\"\n")
sf.write("DataShardDirectory = \"" + str(DataShardDirectory) + "\"\n") sf.write("DataShardDirectory = \"" + str(DataShardDirectory) + "\"\n")
sf.write("ClientDevDirectory = \"" + str(ClientDevDirectory) + "\"\n") sf.write("ClientDevDirectory = \"" + str(ClientDevDirectory) + "\"\n")
sf.write("ClientPatchDirectory = \"" + str(ClientPatchDirectory) + "\"\n") sf.write("ClientPatchDirectory = \"" + str(ClientPatchDirectory) + "\"\n")
sf.write("ClientInstallDirectory = \"" + str(ClientInstallDirectory) + "\"\n") sf.write("ClientInstallDirectory = \"" + str(ClientInstallDirectory) + "\"\n")
sf.write("\n") sf.write("\n")
sf.write("# TODO: NETWORK RECONNECT NOT IMPLEMENTED :)\n") sf.write("# TODO: NETWORK RECONNECT NOT IMPLEMENTED :)\n")
sf.write("\n") sf.write("\n")
sf.write("# Leveldesign directories\n") sf.write("# Leveldesign directories\n")
sf.write("LeveldesignDirectory = \"" + str(LeveldesignDirectory) + "\"\n") sf.write("LeveldesignDirectory = \"" + str(LeveldesignDirectory) + "\"\n")
sf.write("LeveldesignDfnDirectory = \"" + str(LeveldesignDfnDirectory) + "\"\n") sf.write("LeveldesignDfnDirectory = \"" + str(LeveldesignDfnDirectory) + "\"\n")
sf.write("LeveldesignWorldDirectory = \"" + str(LeveldesignWorldDirectory) + "\"\n") sf.write("LeveldesignWorldDirectory = \"" + str(LeveldesignWorldDirectory) + "\"\n")
sf.write("PrimitivesDirectory = \"" + str(PrimitivesDirectory) + "\"\n") sf.write("PrimitivesDirectory = \"" + str(PrimitivesDirectory) + "\"\n")
sf.write("\n") sf.write("\n")
sf.write("# Misc data directories\n") sf.write("# Misc data directories\n")
sf.write("GamedevDirectory = \"" + str(GamedevDirectory) + "\"\n") sf.write("GamedevDirectory = \"" + str(GamedevDirectory) + "\"\n")
sf.write("DataCommonDirectory = \"" + str(DataCommonDirectory) + "\"\n") sf.write("DataCommonDirectory = \"" + str(DataCommonDirectory) + "\"\n")
sf.write("WindowsExeDllCfgDirectories = " + str(WindowsExeDllCfgDirectories) + "\n") sf.write("WindowsExeDllCfgDirectories = " + str(WindowsExeDllCfgDirectories) + "\n")
sf.write("\n") sf.write("\n")
sf.write("# 3dsMax directives\n") sf.write("# 3dsMax directives\n")
sf.write("MaxAvailable = " + str(MaxAvailable) + "\n") sf.write("MaxAvailable = " + str(MaxAvailable) + "\n")
sf.write("MaxDirectory = \"" + str(MaxDirectory) + "\"\n") sf.write("MaxDirectory = \"" + str(MaxDirectory) + "\"\n")
sf.write("MaxUserDirectory = \"" + str(MaxUserDirectory) + "\"\n") sf.write("MaxUserDirectory = \"" + str(MaxUserDirectory) + "\"\n")
sf.write("MaxExecutable = \"" + str(MaxExecutable) + "\"\n") sf.write("MaxExecutable = \"" + str(MaxExecutable) + "\"\n")
sf.write("\n") sf.write("\n")
sf.write("\n") sf.write("\n")
sf.write("# end of file\n") sf.write("# end of file\n")
sf.close() sf.close()
sys.path.append(WorkspaceDirectory) sys.path.append(WorkspaceDirectory)
from projects import * from projects import *
@ -262,27 +284,83 @@ printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
printLog(log, "") printLog(log, "")
# For each project # For each project
for projectName in ProjectsToProcess: for projectName in ProjectsToProcess:
os.putenv("NELBUILDACTIVEPROJECT", os.path.abspath(WorkspaceDirectory + "/" + projectName)) if ((args.includeproject == None or projectName in args.includeproject) and (args.excludeproject == None or not projectName in args.excludeproject)):
os.chdir("processes") printLog(log, "PROJECT " + projectName)
try: os.putenv("NELBUILDACTIVEPROJECT", os.path.abspath(WorkspaceDirectory + "/" + projectName))
subprocess.call([ "python", "0_setup.py" ]) os.chdir("processes")
except Exception, e: try:
printLog(log, "<" + projectName + "> " + str(e)) if not args.includeprocess == None:
os.chdir("..") subprocess.call([ "python", "0_setup.py", "--includeprocess" ] + args.includeprocess)
try: elif not args.excludeprocess == None:
projectLog = open("processes/log.log", "r") subprocess.call([ "python", "0_setup.py", "--excludeprocess" ] + args.excludeprocess)
projectLogData = projectLog.read() else:
projectLog.close() subprocess.call([ "python", "0_setup.py" ])
log.write(projectLogData) except Exception, e:
except Exception, e: printLog(log, "<" + projectName + "> " + str(e))
printLog(log, "<" + projectName + "> " + str(e)) os.chdir("..")
try:
projectLog = open("processes/log.log", "r")
projectLogData = projectLog.read()
projectLog.close()
log.write(projectLogData)
except Exception, e:
printLog(log, "<" + projectName + "> " + str(e))
else:
printLog(log, "IGNORE PROJECT " + projectName)
printLog(log, "") printLog(log, "")
# Additional directories # Additional directories
printLog(log, ">>> Setup additional directories <<<") printLog(log, ">>> Setup additional directories <<<")
mkPath(log, ClientDevDirectory) mkPath(log, ClientDevDirectory)
mkPath(log, ClientPatchDirectory) mkPath(log, ClientPatchDirectory)
mkPath(log, ClientInstallDirectory) mkPath(log, ClientInstallDirectory)
if not args.noverify:
printLog(log, "")
printLog(log, "-------")
printLog(log, "--- Verify tool paths")
printLog(log, "-------")
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
printLog(log, "")
if MaxAvailable:
findMax(log, MaxDirectory, MaxExecutable)
findTool(log, ToolDirectories, TgaToDdsTool, ToolSuffix)
findTool(log, ToolDirectories, BuildInterfaceTool, ToolSuffix)
findTool(log, ToolDirectories, ExecTimeoutTool, ToolSuffix)
findTool(log, ToolDirectories, BuildSmallbankTool, ToolSuffix)
findTool(log, ToolDirectories, BuildFarbankTool, ToolSuffix)
findTool(log, ToolDirectories, ZoneDependenciesTool, ToolSuffix)
findTool(log, ToolDirectories, ZoneWelderTool, ToolSuffix)
findTool(log, ToolDirectories, BuildRbankTool, ToolSuffix)
findTool(log, ToolDirectories, BuildIndoorRbankTool, ToolSuffix)
findTool(log, ToolDirectories, BuildIgBoxesTool, ToolSuffix)
findTool(log, ToolDirectories, GetNeighborsTool, ToolSuffix)
findTool(log, ToolDirectories, ZoneLighterTool, ToolSuffix)
findTool(log, ToolDirectories, ZoneIgLighterTool, ToolSuffix)
findTool(log, ToolDirectories, IgLighterTool, ToolSuffix)
findTool(log, ToolDirectories, AnimBuilderTool, ToolSuffix)
findTool(log, ToolDirectories, TileEditTool, ToolSuffix)
# findTool(log, ToolDirectories, BuildImagesetTool, ToolSuffix) # kaetemi stuff, ignore this
findTool(log, ToolDirectories, MakeSheetIdTool, ToolSuffix)
# findTool(log, ToolDirectories, BuildSheetsTool, ToolSuffix) # kaetemi stuff, ignore this
# findTool(log, ToolDirectories, BuildSoundTool, ToolSuffix) # kaetemi stuff, ignore this
findTool(log, ToolDirectories, BuildCoarseMeshTool, ToolSuffix)
findTool(log, ToolDirectories, LightmapOptimizerTool, ToolSuffix)
findTool(log, ToolDirectories, BuildClodtexTool, ToolSuffix)
findTool(log, ToolDirectories, BuildShadowSkinTool, ToolSuffix)
findTool(log, ToolDirectories, PanoplyMakerTool, ToolSuffix)
findTool(log, ToolDirectories, HlsBankMakerTool, ToolSuffix)
findTool(log, ToolDirectories, LandExportTool, ToolSuffix)
findTool(log, ToolDirectories, PrimExportTool, ToolSuffix)
findTool(log, ToolDirectories, IgElevationTool, ToolSuffix)
findTool(log, ToolDirectories, IgAddTool, ToolSuffix)
findTool(log, ToolDirectories, BuildClodBankTool, ToolSuffix)
findTool(log, ToolDirectories, SheetsPackerTool, ToolSuffix)
findTool(log, ToolDirectories, BnpMakeTool, ToolSuffix)
findTool(log, ToolDirectories, AiBuildWmapTool, ToolSuffix)
findTool(log, ToolDirectories, TgaCutTool, ToolSuffix)
findTool(log, ToolDirectories, PatchGenTool, ToolSuffix)
log.close() log.close()
if os.path.isfile("0_setup.log"): if os.path.isfile("0_setup.log"):
os.remove("0_setup.log") os.remove("0_setup.log")

View file

@ -24,9 +24,25 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
# #
import time, sys, os, shutil, subprocess, distutils.dir_util import time, sys, os, shutil, subprocess, distutils.dir_util, argparse
sys.path.append("configuration") sys.path.append("configuration")
parser = argparse.ArgumentParser(description='Ryzom Core - Build Gamedata - Export')
# parser.add_argument('--haltonerror', '-eh', action='store_true')
parser.add_argument('--includeproject', '-ipj', nargs='+')
parser.add_argument('--excludeproject', '-epj', nargs='+')
parser.add_argument('--includeprocess', '-ipc', nargs='+')
parser.add_argument('--excludeprocess', '-epc', nargs='+')
args = parser.parse_args()
if not args.includeproject == None and not args.excludeproject == None:
print "ERROR --includeproject cannot be combined with --excludeproject, exit."
exit()
if not args.includeprocess == None and not args.excludeprocess == None:
print "ERROR --includeprocess cannot be combined with --excludeprocess, exit."
exit()
if os.path.isfile("log.log"): if os.path.isfile("log.log"):
os.remove("log.log") os.remove("log.log")
log = open("log.log", "w") log = open("log.log", "w")
@ -46,20 +62,29 @@ printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
printLog(log, "") printLog(log, "")
# For each project # For each project
for projectName in ProjectsToProcess: for projectName in ProjectsToProcess:
os.putenv("NELBUILDACTIVEPROJECT", os.path.abspath(WorkspaceDirectory + "/" + projectName)) if ((args.includeproject == None or projectName in args.includeproject) and (args.excludeproject == None or not projectName in args.excludeproject)):
os.chdir("processes") printLog(log, "PROJECT " + projectName)
try: os.putenv("NELBUILDACTIVEPROJECT", os.path.abspath(WorkspaceDirectory + "/" + projectName))
subprocess.call([ "python", "1_export.py" ]) os.chdir("processes")
except Exception, e: try:
printLog(log, "<" + projectName + "> " + str(e)) if not args.includeprocess == None:
os.chdir("..") subprocess.call([ "python", "1_export.py", "--includeprocess" ] + args.includeprocess)
try: elif not args.excludeprocess == None:
projectLog = open("processes/log.log", "r") subprocess.call([ "python", "1_export.py", "--excludeprocess" ] + args.excludeprocess)
projectLogData = projectLog.read() else:
projectLog.close() subprocess.call([ "python", "1_export.py" ])
log.write(projectLogData) except Exception, e:
except Exception, e: printLog(log, "<" + projectName + "> " + str(e))
printLog(log, "<" + projectName + "> " + str(e)) os.chdir("..")
try:
projectLog = open("processes/log.log", "r")
projectLogData = projectLog.read()
projectLog.close()
log.write(projectLogData)
except Exception, e:
printLog(log, "<" + projectName + "> " + str(e))
else:
printLog(log, "IGNORE PROJECT " + projectName)
printLog(log, "") printLog(log, "")
log.close() log.close()

View file

@ -24,9 +24,25 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
# #
import time, sys, os, shutil, subprocess, distutils.dir_util import time, sys, os, shutil, subprocess, distutils.dir_util, argparse
sys.path.append("configuration") sys.path.append("configuration")
parser = argparse.ArgumentParser(description='Ryzom Core - Build Gamedata - Build')
# parser.add_argument('--haltonerror', '-eh', action='store_true')
parser.add_argument('--includeproject', '-ipj', nargs='+')
parser.add_argument('--excludeproject', '-epj', nargs='+')
parser.add_argument('--includeprocess', '-ipc', nargs='+')
parser.add_argument('--excludeprocess', '-epc', nargs='+')
args = parser.parse_args()
if not args.includeproject == None and not args.excludeproject == None:
print "ERROR --includeproject cannot be combined with --excludeproject, exit."
exit()
if not args.includeprocess == None and not args.excludeprocess == None:
print "ERROR --includeprocess cannot be combined with --excludeprocess, exit."
exit()
if os.path.isfile("log.log"): if os.path.isfile("log.log"):
os.remove("log.log") os.remove("log.log")
log = open("log.log", "w") log = open("log.log", "w")
@ -46,20 +62,29 @@ printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
printLog(log, "") printLog(log, "")
# For each project # For each project
for projectName in ProjectsToProcess: for projectName in ProjectsToProcess:
os.putenv("NELBUILDACTIVEPROJECT", os.path.abspath(WorkspaceDirectory + "/" + projectName)) if ((args.includeproject == None or projectName in args.includeproject) and (args.excludeproject == None or not projectName in args.excludeproject)):
os.chdir("processes") printLog(log, "PROJECT " + projectName)
try: os.putenv("NELBUILDACTIVEPROJECT", os.path.abspath(WorkspaceDirectory + "/" + projectName))
subprocess.call([ "python", "2_build.py" ]) os.chdir("processes")
except Exception, e: try:
printLog(log, "<" + projectName + "> " + str(e)) if not args.includeprocess == None:
os.chdir("..") subprocess.call([ "python", "2_build.py", "--includeprocess" ] + args.includeprocess)
try: elif not args.excludeprocess == None:
projectLog = open("processes/log.log", "r") subprocess.call([ "python", "2_build.py", "--excludeprocess" ] + args.excludeprocess)
projectLogData = projectLog.read() else:
projectLog.close() subprocess.call([ "python", "2_build.py" ])
log.write(projectLogData) except Exception, e:
except Exception, e: printLog(log, "<" + projectName + "> " + str(e))
printLog(log, "<" + projectName + "> " + str(e)) os.chdir("..")
try:
projectLog = open("processes/log.log", "r")
projectLogData = projectLog.read()
projectLog.close()
log.write(projectLogData)
except Exception, e:
printLog(log, "<" + projectName + "> " + str(e))
else:
printLog(log, "IGNORE PROJECT " + projectName)
printLog(log, "") printLog(log, "")
log.close() log.close()

View file

@ -24,9 +24,25 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
# #
import time, sys, os, shutil, subprocess, distutils.dir_util import time, sys, os, shutil, subprocess, distutils.dir_util, argparse
sys.path.append("configuration") sys.path.append("configuration")
parser = argparse.ArgumentParser(description='Ryzom Core - Build Gamedata - Install')
# parser.add_argument('--haltonerror', '-eh', action='store_true')
parser.add_argument('--includeproject', '-ipj', nargs='+')
parser.add_argument('--excludeproject', '-epj', nargs='+')
parser.add_argument('--includeprocess', '-ipc', nargs='+')
parser.add_argument('--excludeprocess', '-epc', nargs='+')
args = parser.parse_args()
if not args.includeproject == None and not args.excludeproject == None:
print "ERROR --includeproject cannot be combined with --excludeproject, exit."
exit()
if not args.includeprocess == None and not args.excludeprocess == None:
print "ERROR --includeprocess cannot be combined with --excludeprocess, exit."
exit()
if os.path.isfile("log.log"): if os.path.isfile("log.log"):
os.remove("log.log") os.remove("log.log")
log = open("log.log", "w") log = open("log.log", "w")
@ -46,20 +62,29 @@ printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
printLog(log, "") printLog(log, "")
# For each project # For each project
for projectName in ProjectsToProcess: for projectName in ProjectsToProcess:
os.putenv("NELBUILDACTIVEPROJECT", os.path.abspath(WorkspaceDirectory + "/" + projectName)) if ((args.includeproject == None or projectName in args.includeproject) and (args.excludeproject == None or not projectName in args.excludeproject)):
os.chdir("processes") printLog(log, "PROJECT " + projectName)
try: os.putenv("NELBUILDACTIVEPROJECT", os.path.abspath(WorkspaceDirectory + "/" + projectName))
subprocess.call([ "python", "3_install.py" ]) os.chdir("processes")
except Exception, e: try:
printLog(log, "<" + projectName + "> " + str(e)) if not args.includeprocess == None:
os.chdir("..") subprocess.call([ "python", "3_install.py", "--includeprocess" ] + args.includeprocess)
try: elif not args.excludeprocess == None:
projectLog = open("processes/log.log", "r") subprocess.call([ "python", "3_install.py", "--excludeprocess" ] + args.excludeprocess)
projectLogData = projectLog.read() else:
projectLog.close() subprocess.call([ "python", "3_install.py" ])
log.write(projectLogData) except Exception, e:
except Exception, e: printLog(log, "<" + projectName + "> " + str(e))
printLog(log, "<" + projectName + "> " + str(e)) os.chdir("..")
try:
projectLog = open("processes/log.log", "r")
projectLogData = projectLog.read()
projectLog.close()
log.write(projectLogData)
except Exception, e:
printLog(log, "<" + projectName + "> " + str(e))
else:
printLog(log, "IGNORE PROJECT " + projectName)
printLog(log, "") printLog(log, "")
log.close() log.close()

View file

@ -69,10 +69,10 @@ ZoneIgLighterTool = "zone_ig_lighter"
IgLighterTool = "ig_lighter" IgLighterTool = "ig_lighter"
AnimBuilderTool = "anim_builder" AnimBuilderTool = "anim_builder"
TileEditTool = "tile_edit" TileEditTool = "tile_edit"
BuildImagesetTool = "th_build_imageset" # BuildImagesetTool = "th_build_imageset" # kaetemi stuff, ignore this
MakeSheetIdTool = "make_sheet_id" MakeSheetIdTool = "make_sheet_id"
BuildSheetsTool = "th_build_sheets" # BuildSheetsTool = "th_build_sheets" # kaetemi stuff, ignore this
BuildSoundTool = "th_build_sound" # BuildSoundTool = "th_build_sound" # kaetemi stuff, ignore this
BuildCoarseMeshTool = "build_coarse_mesh" BuildCoarseMeshTool = "build_coarse_mesh"
LightmapOptimizerTool = "lightmap_optimizer" LightmapOptimizerTool = "lightmap_optimizer"
BuildClodtexTool = "build_clodtex" BuildClodtexTool = "build_clodtex"

View file

@ -24,8 +24,14 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
# #
import time, sys, os, shutil, subprocess, distutils.dir_util import time, sys, os, shutil, subprocess, distutils.dir_util, argparse
sys.path.append("../configuration") sys.path.append("../configuration")
parser = argparse.ArgumentParser()
parser.add_argument('--includeprocess', '-ipc', nargs='+')
parser.add_argument('--excludeprocess', '-epc', nargs='+')
args = parser.parse_args()
if os.path.isfile("log.log"): if os.path.isfile("log.log"):
os.remove("log.log") os.remove("log.log")
log = open("log.log", "w") log = open("log.log", "w")
@ -60,20 +66,24 @@ printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
printLog(log, "") printLog(log, "")
# For each process # For each process
for processName in ProcessToComplete: for processName in ProcessToComplete:
os.chdir(processName) if ((args.includeprocess == None or processName in args.includeprocess) and (args.excludeprocess == None or not processName in args.excludeprocess)):
try: printLog(log, "PROCESS " + processName)
subprocess.call([ "python", "0_setup.py" ]) os.chdir(processName)
except Exception, e: try:
printLog(log, "<" + processName + "> " + str(e)) subprocess.call([ "python", "0_setup.py" ])
os.chdir("..") except Exception, e:
try: printLog(log, "<" + processName + "> " + str(e))
processLog = open(processName + "/log.log", "r") os.chdir("..")
processLogData = processLog.read() try:
processLog.close() processLog = open(processName + "/log.log", "r")
log.write(processLogData) processLogData = processLog.read()
except Exception, e: processLog.close()
printLog(log, "<" + processName + "> " + str(e)) log.write(processLogData)
# subprocess.call("idle.bat") except Exception, e:
printLog(log, "<" + processName + "> " + str(e))
# subprocess.call("idle.bat")
else:
printLog(log, "IGNORE PROCESS " + processName)
printLog(log, "") printLog(log, "")
log.close() log.close()

View file

@ -24,9 +24,14 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
# #
import time, sys, os, shutil, subprocess, distutils.dir_util import time, sys, os, shutil, subprocess, distutils.dir_util, argparse
sys.path.append("../configuration") sys.path.append("../configuration")
parser = argparse.ArgumentParser()
parser.add_argument('--includeprocess', '-ipc', nargs='+')
parser.add_argument('--excludeprocess', '-epc', nargs='+')
args = parser.parse_args()
if os.path.isfile("log.log"): if os.path.isfile("log.log"):
os.remove("log.log") os.remove("log.log")
log = open("log.log", "w") log = open("log.log", "w")
@ -45,20 +50,24 @@ printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
printLog(log, "") printLog(log, "")
# For each process # For each process
for processName in ProcessToComplete: for processName in ProcessToComplete:
os.chdir(processName) if ((args.includeprocess == None or processName in args.includeprocess) and (args.excludeprocess == None or not processName in args.excludeprocess)):
try: printLog(log, "PROCESS " + processName)
subprocess.call([ "python", "1_export.py" ]) os.chdir(processName)
except Exception, e: try:
printLog(log, "<" + processName + "> " + str(e)) subprocess.call([ "python", "1_export.py" ])
os.chdir("..") except Exception, e:
try: printLog(log, "<" + processName + "> " + str(e))
processLog = open(processName + "/log.log", "r") os.chdir("..")
processLogData = processLog.read() try:
processLog.close() processLog = open(processName + "/log.log", "r")
log.write(processLogData) processLogData = processLog.read()
except Exception, e: processLog.close()
printLog(log, "<" + processName + "> " + str(e)) log.write(processLogData)
# subprocess.call("idle.bat") except Exception, e:
printLog(log, "<" + processName + "> " + str(e))
# subprocess.call("idle.bat")
else:
printLog(log, "IGNORE PROCESS " + processName)
printLog(log, "") printLog(log, "")
log.close() log.close()

View file

@ -24,9 +24,14 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
# #
import time, sys, os, shutil, subprocess, distutils.dir_util import time, sys, os, shutil, subprocess, distutils.dir_util, argparse
sys.path.append("../configuration") sys.path.append("../configuration")
parser = argparse.ArgumentParser()
parser.add_argument('--includeprocess', '-ipc', nargs='+')
parser.add_argument('--excludeprocess', '-epc', nargs='+')
args = parser.parse_args()
if os.path.isfile("log.log"): if os.path.isfile("log.log"):
os.remove("log.log") os.remove("log.log")
log = open("log.log", "w") log = open("log.log", "w")
@ -45,20 +50,24 @@ printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
printLog(log, "") printLog(log, "")
# For each process # For each process
for processName in ProcessToComplete: for processName in ProcessToComplete:
os.chdir(processName) if ((args.includeprocess == None or processName in args.includeprocess) and (args.excludeprocess == None or not processName in args.excludeprocess)):
try: printLog(log, "PROCESS " + processName)
subprocess.call([ "python", "2_build.py" ]) os.chdir(processName)
except Exception, e: try:
printLog(log, "<" + processName + "> " + str(e)) subprocess.call([ "python", "2_build.py" ])
os.chdir("..") except Exception, e:
try: printLog(log, "<" + processName + "> " + str(e))
processLog = open(processName + "/log.log", "r") os.chdir("..")
processLogData = processLog.read() try:
processLog.close() processLog = open(processName + "/log.log", "r")
log.write(processLogData) processLogData = processLog.read()
except Exception, e: processLog.close()
printLog(log, "<" + processName + "> " + str(e)) log.write(processLogData)
# subprocess.call("idle.bat") except Exception, e:
printLog(log, "<" + processName + "> " + str(e))
# subprocess.call("idle.bat")
else:
printLog(log, "IGNORE PROCESS " + processName)
printLog(log, "") printLog(log, "")
log.close() log.close()

View file

@ -24,9 +24,14 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
# #
import time, sys, os, shutil, subprocess, distutils.dir_util import time, sys, os, shutil, subprocess, distutils.dir_util, argparse
sys.path.append("../configuration") sys.path.append("../configuration")
parser = argparse.ArgumentParser()
parser.add_argument('--includeprocess', '-ipc', nargs='+')
parser.add_argument('--excludeprocess', '-epc', nargs='+')
args = parser.parse_args()
if os.path.isfile("log.log"): if os.path.isfile("log.log"):
os.remove("log.log") os.remove("log.log")
log = open("log.log", "w") log = open("log.log", "w")
@ -44,20 +49,24 @@ printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
printLog(log, "") printLog(log, "")
# For each process # For each process
for processName in ProcessToComplete: for processName in ProcessToComplete:
os.chdir(processName) if ((args.includeprocess == None or processName in args.includeprocess) and (args.excludeprocess == None or not processName in args.excludeprocess)):
try: printLog(log, "PROCESS " + processName)
subprocess.call([ "python", "3_install.py" ]) os.chdir(processName)
except Exception, e: try:
printLog(log, "<" + processName + "> " + str(e)) subprocess.call([ "python", "3_install.py" ])
os.chdir("..") except Exception, e:
try: printLog(log, "<" + processName + "> " + str(e))
processLog = open(processName + "/log.log", "r") os.chdir("..")
processLogData = processLog.read() try:
processLog.close() processLog = open(processName + "/log.log", "r")
log.write(processLogData) processLogData = processLog.read()
except Exception, e: processLog.close()
printLog(log, "<" + processName + "> " + str(e)) log.write(processLogData)
# subprocess.call("idle.bat") except Exception, e:
printLog(log, "<" + processName + "> " + str(e))
# subprocess.call("idle.bat")
else:
printLog(log, "IGNORE PROCESS " + processName)
printLog(log, "") printLog(log, "")
log.close() log.close()