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 7ed294830c
commit deb69ad630
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/>.
#
import time, sys, os, shutil, subprocess, distutils.dir_util
import time, sys, os, shutil, subprocess, distutils.dir_util, argparse
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"):
os.remove("log.log")
log = open("log.log", "w")
@ -35,8 +53,12 @@ try:
from buildsite import *
except ImportError:
printLog(log, "*** FIRST RUN ***")
if args.noconf:
printLog(log, "ERROR --noconf is invalid on first run, exit.")
exit()
from tools import *
if not args.noconf:
try:
BuildQuality
except NameError:
@ -262,9 +284,16 @@ printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
printLog(log, "")
# For each project
for projectName in ProjectsToProcess:
if ((args.includeproject == None or projectName in args.includeproject) and (args.excludeproject == None or not projectName in args.excludeproject)):
printLog(log, "PROJECT " + projectName)
os.putenv("NELBUILDACTIVEPROJECT", os.path.abspath(WorkspaceDirectory + "/" + projectName))
os.chdir("processes")
try:
if not args.includeprocess == None:
subprocess.call([ "python", "0_setup.py", "--includeprocess" ] + args.includeprocess)
elif not args.excludeprocess == None:
subprocess.call([ "python", "0_setup.py", "--excludeprocess" ] + args.excludeprocess)
else:
subprocess.call([ "python", "0_setup.py" ])
except Exception, e:
printLog(log, "<" + projectName + "> " + str(e))
@ -276,13 +305,62 @@ for projectName in ProjectsToProcess:
log.write(projectLogData)
except Exception, e:
printLog(log, "<" + projectName + "> " + str(e))
else:
printLog(log, "IGNORE PROJECT " + projectName)
printLog(log, "")
# Additional directories
printLog(log, ">>> Setup additional directories <<<")
mkPath(log, ClientDevDirectory)
mkPath(log, ClientPatchDirectory)
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()
if os.path.isfile("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/>.
#
import time, sys, os, shutil, subprocess, distutils.dir_util
import time, sys, os, shutil, subprocess, distutils.dir_util, argparse
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"):
os.remove("log.log")
log = open("log.log", "w")
@ -46,9 +62,16 @@ printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
printLog(log, "")
# For each project
for projectName in ProjectsToProcess:
if ((args.includeproject == None or projectName in args.includeproject) and (args.excludeproject == None or not projectName in args.excludeproject)):
printLog(log, "PROJECT " + projectName)
os.putenv("NELBUILDACTIVEPROJECT", os.path.abspath(WorkspaceDirectory + "/" + projectName))
os.chdir("processes")
try:
if not args.includeprocess == None:
subprocess.call([ "python", "1_export.py", "--includeprocess" ] + args.includeprocess)
elif not args.excludeprocess == None:
subprocess.call([ "python", "1_export.py", "--excludeprocess" ] + args.excludeprocess)
else:
subprocess.call([ "python", "1_export.py" ])
except Exception, e:
printLog(log, "<" + projectName + "> " + str(e))
@ -60,6 +83,8 @@ for projectName in ProjectsToProcess:
log.write(projectLogData)
except Exception, e:
printLog(log, "<" + projectName + "> " + str(e))
else:
printLog(log, "IGNORE PROJECT " + projectName)
printLog(log, "")
log.close()

View file

@ -24,9 +24,25 @@
# 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")
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"):
os.remove("log.log")
log = open("log.log", "w")
@ -46,9 +62,16 @@ printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
printLog(log, "")
# For each project
for projectName in ProjectsToProcess:
if ((args.includeproject == None or projectName in args.includeproject) and (args.excludeproject == None or not projectName in args.excludeproject)):
printLog(log, "PROJECT " + projectName)
os.putenv("NELBUILDACTIVEPROJECT", os.path.abspath(WorkspaceDirectory + "/" + projectName))
os.chdir("processes")
try:
if not args.includeprocess == None:
subprocess.call([ "python", "2_build.py", "--includeprocess" ] + args.includeprocess)
elif not args.excludeprocess == None:
subprocess.call([ "python", "2_build.py", "--excludeprocess" ] + args.excludeprocess)
else:
subprocess.call([ "python", "2_build.py" ])
except Exception, e:
printLog(log, "<" + projectName + "> " + str(e))
@ -60,6 +83,8 @@ for projectName in ProjectsToProcess:
log.write(projectLogData)
except Exception, e:
printLog(log, "<" + projectName + "> " + str(e))
else:
printLog(log, "IGNORE PROJECT " + projectName)
printLog(log, "")
log.close()

View file

@ -24,9 +24,25 @@
# 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")
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"):
os.remove("log.log")
log = open("log.log", "w")
@ -46,9 +62,16 @@ printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
printLog(log, "")
# For each project
for projectName in ProjectsToProcess:
if ((args.includeproject == None or projectName in args.includeproject) and (args.excludeproject == None or not projectName in args.excludeproject)):
printLog(log, "PROJECT " + projectName)
os.putenv("NELBUILDACTIVEPROJECT", os.path.abspath(WorkspaceDirectory + "/" + projectName))
os.chdir("processes")
try:
if not args.includeprocess == None:
subprocess.call([ "python", "3_install.py", "--includeprocess" ] + args.includeprocess)
elif not args.excludeprocess == None:
subprocess.call([ "python", "3_install.py", "--excludeprocess" ] + args.excludeprocess)
else:
subprocess.call([ "python", "3_install.py" ])
except Exception, e:
printLog(log, "<" + projectName + "> " + str(e))
@ -60,6 +83,8 @@ for projectName in ProjectsToProcess:
log.write(projectLogData)
except Exception, e:
printLog(log, "<" + projectName + "> " + str(e))
else:
printLog(log, "IGNORE PROJECT " + projectName)
printLog(log, "")
log.close()

View file

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

View file

@ -24,8 +24,14 @@
# 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")
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"):
os.remove("log.log")
log = open("log.log", "w")
@ -60,6 +66,8 @@ printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
printLog(log, "")
# For each process
for processName in ProcessToComplete:
if ((args.includeprocess == None or processName in args.includeprocess) and (args.excludeprocess == None or not processName in args.excludeprocess)):
printLog(log, "PROCESS " + processName)
os.chdir(processName)
try:
subprocess.call([ "python", "0_setup.py" ])
@ -74,6 +82,8 @@ for processName in ProcessToComplete:
except Exception, e:
printLog(log, "<" + processName + "> " + str(e))
# subprocess.call("idle.bat")
else:
printLog(log, "IGNORE PROCESS " + processName)
printLog(log, "")
log.close()

View file

@ -24,9 +24,14 @@
# 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")
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"):
os.remove("log.log")
log = open("log.log", "w")
@ -45,6 +50,8 @@ printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
printLog(log, "")
# For each process
for processName in ProcessToComplete:
if ((args.includeprocess == None or processName in args.includeprocess) and (args.excludeprocess == None or not processName in args.excludeprocess)):
printLog(log, "PROCESS " + processName)
os.chdir(processName)
try:
subprocess.call([ "python", "1_export.py" ])
@ -59,6 +66,8 @@ for processName in ProcessToComplete:
except Exception, e:
printLog(log, "<" + processName + "> " + str(e))
# subprocess.call("idle.bat")
else:
printLog(log, "IGNORE PROCESS " + processName)
printLog(log, "")
log.close()

View file

@ -24,9 +24,14 @@
# 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")
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"):
os.remove("log.log")
log = open("log.log", "w")
@ -45,6 +50,8 @@ printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
printLog(log, "")
# For each process
for processName in ProcessToComplete:
if ((args.includeprocess == None or processName in args.includeprocess) and (args.excludeprocess == None or not processName in args.excludeprocess)):
printLog(log, "PROCESS " + processName)
os.chdir(processName)
try:
subprocess.call([ "python", "2_build.py" ])
@ -59,6 +66,8 @@ for processName in ProcessToComplete:
except Exception, e:
printLog(log, "<" + processName + "> " + str(e))
# subprocess.call("idle.bat")
else:
printLog(log, "IGNORE PROCESS " + processName)
printLog(log, "")
log.close()

View file

@ -24,9 +24,14 @@
# 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")
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"):
os.remove("log.log")
log = open("log.log", "w")
@ -44,6 +49,8 @@ printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
printLog(log, "")
# For each process
for processName in ProcessToComplete:
if ((args.includeprocess == None or processName in args.includeprocess) and (args.excludeprocess == None or not processName in args.excludeprocess)):
printLog(log, "PROCESS " + processName)
os.chdir(processName)
try:
subprocess.call([ "python", "3_install.py" ])
@ -58,6 +65,8 @@ for processName in ProcessToComplete:
except Exception, e:
printLog(log, "<" + processName + "> " + str(e))
# subprocess.call("idle.bat")
else:
printLog(log, "IGNORE PROCESS " + processName)
printLog(log, "")
log.close()