diff --git a/code/nel/tools/build_gamedata/0_setup.py b/code/nel/tools/build_gamedata/0_setup.py old mode 100755 new mode 100644 index 00d19cbe6..12441fb05 --- a/code/nel/tools/build_gamedata/0_setup.py +++ b/code/nel/tools/build_gamedata/0_setup.py @@ -1,478 +1,594 @@ -#!/usr/bin/python -# -# \file 0_setup.py -# \brief Run all setup processes -# \date 2009-02-18 15:28GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Run all setup processes -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -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: - BuildQuality = 1 - try: - ToolDirectories - except NameError: - ToolDirectories = [ 'R:/build/dev/bin/Release', 'D:/libraries/external/bin' ] - try: - ToolSuffix - except NameError: - ToolSuffix = ".exe" - try: - ScriptDirectory - except NameError: - ScriptDirectory = "R:/code/nel/tools/build_gamedata" - try: - WorkspaceDirectory - except NameError: - WorkspaceDirectory = "L:/workspace" - try: - DatabaseDirectory - except NameError: - DatabaseDirectory = "W:/database" - try: - SoundDirectory - except NameError: - SoundDirectory = "V:" - try: - SoundDfnDirectory - except NameError: - SoundDfnDirectory = "V:/DFN" - try: - ExportBuildDirectory - except NameError: - ExportBuildDirectory = "T:/export" - try: - InstallDirectory - except NameError: - InstallDirectory = "T:/install" - try: - ClientDevDirectory - except NameError: - ClientDevDirectory = "T:/client_dev" - try: - ClientPatchDirectory - except NameError: - ClientPatchDirectory = "T:/client_patch" - try: - ClientInstallDirectory - except NameError: - ClientInstallDirectory = "T:/client_install" - try: - ShardInstallDirectory - except NameError: - ShardInstallDirectory = "T:/shard" - try: - WorldEditInstallDirectory - except NameError: - WorldEditInstallDirectory = "T:/worldedit" - try: - LeveldesignDirectory - except NameError: - LeveldesignDirectory = "L:/leveldesign" - try: - LeveldesignDfnDirectory - except NameError: - LeveldesignDfnDirectory = "L:/leveldesign/DFN" - try: - LeveldesignWorldDirectory - except NameError: - LeveldesignWorldDirectory = "L:/leveldesign/world" - try: - PrimitivesDirectory - except NameError: - PrimitivesDirectory = "L:/primitives" - try: - GamedevDirectory - except NameError: - GamedevDirectory = "R:/code/ryzom/client/data/gamedev" - try: - DataShardDirectory - except NameError: - DataShardDirectory = "R:/code/ryzom/server/data_shard" - try: - DataCommonDirectory - except NameError: - DataCommonDirectory = "R:/code/ryzom/common/data_common" - try: - LeveldesignDataShardDirectory - except NameError: - LeveldesignDataShardDirectory = "L:/shard" - try: - LeveldesignDataCommonDirectory - except NameError: - LeveldesignDataCommonDirectory = "L:/common" - try: - TranslationDirectory - except NameError: - TranslationDirectory = "L:/translation" - try: - WorldEditorFilesDirectory - except NameError: - WorldEditorFilesDirectory = "R:/code/ryzom/common/data_leveldesign/leveldesign/world_editor_files" - try: - WindowsExeDllCfgDirectories - except NameError: - 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' ] - try: - LinuxServiceExecutableDirectory - except NameError: - LinuxServiceExecutableDirectory = "S:/devls_x64/bin" - try: - LinuxClientExecutableDirectory - except NameError: - LinuxClientExecutableDirectory = "S:/devl_x64/bin" - try: - PatchmanCfgAdminDirectory - except NameError: - PatchmanCfgAdminDirectory = "R:/code/ryzom/server/patchman_cfg/admin_install" - try: - PatchmanCfgDefaultDirectory - except NameError: - PatchmanCfgDefaultDirectory = "R:/code/ryzom/server/patchman_cfg/default" - try: - PatchmanBridgeServerDirectory - except NameError: - PatchmanBridgeServerDirectory = "T:/bridge_server" - try: - SignToolExecutable - except NameError: - SignToolExecutable = "C:/Program Files/Microsoft SDKs/Windows/v6.0A/Bin/signtool.exe" - try: - SignToolSha1 - except NameError: - SignToolSha1 = "" - try: - SignToolTimestamp - except NameError: - SignToolTimestamp = "http://timestamp.comodoca.com/authenticode" - try: - MaxAvailable - except NameError: - MaxAvailable = 1 - try: - MaxDirectory - except NameError: - MaxDirectory = "C:/Program Files (x86)/Autodesk/3ds Max 2010" - try: - MaxUserDirectory - except NameError: - import os - try: - MaxUserDirectory = os.path.normpath(os.environ["LOCALAPPDATA"] + "/Autodesk/3dsMax/2010 - 32bit/enu") - except KeyError: - MaxAvailable = 0 - MaxUserDirectory = "C:/Users/Kaetemi/AppData/Local/Autodesk/3dsMax/2010 - 32bit/enu" - try: - MaxExecutable - except NameError: - MaxExecutable = "3dsmax.exe" - - printLog(log, "") - printLog(log, "-------") - printLog(log, "--- Setup build site") - printLog(log, "-------") - printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) - printLog(log, "") - 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, "Use -- if you need to insert an empty value.") - printLog(log, "") - BuildQuality = int(askVar(log, "Build Quality", str(BuildQuality))) - ToolDirectories[0] = askVar(log, "[IN] Primary Tool Directory", ToolDirectories[0]).replace("\\", "/") - ToolDirectories[1] = askVar(log, "[IN] Secondary Tool Directory", ToolDirectories[1]).replace("\\", "/") - ToolSuffix = askVar(log, "Tool Suffix", ToolSuffix) - ScriptDirectory = askVar(log, "[IN] Script Directory", os.getcwd().replace("\\", "/")).replace("\\", "/") - WorkspaceDirectory = askVar(log, "[IN] Workspace Directory", WorkspaceDirectory).replace("\\", "/") - DatabaseDirectory = askVar(log, "[IN] Database Directory", DatabaseDirectory).replace("\\", "/") - SoundDirectory = askVar(log, "[IN] Sound Directory", SoundDirectory).replace("\\", "/") - SoundDfnDirectory = askVar(log, "[IN] Sound DFN Directory", SoundDfnDirectory).replace("\\", "/") - ExportBuildDirectory = askVar(log, "[OUT] Export Build Directory", ExportBuildDirectory).replace("\\", "/") - InstallDirectory = askVar(log, "[OUT] Install Directory", InstallDirectory).replace("\\", "/") - ClientDevDirectory = askVar(log, "[OUT] Client Dev Directory", ClientDevDirectory).replace("\\", "/") - ClientPatchDirectory = askVar(log, "[OUT] Client Patch Directory", ClientPatchDirectory).replace("\\", "/") - ClientInstallDirectory = askVar(log, "[OUT] Client Install Directory", ClientInstallDirectory).replace("\\", "/") - ShardInstallDirectory = askVar(log, "[OUT] Shard Data Install Directory", ShardInstallDirectory).replace("\\", "/") - WorldEditInstallDirectory = askVar(log, "[OUT] World Edit Data Install Directory", WorldEditInstallDirectory).replace("\\", "/") - LeveldesignDirectory = askVar(log, "[IN] Leveldesign Directory", LeveldesignDirectory).replace("\\", "/") - LeveldesignDfnDirectory = askVar(log, "[IN] Leveldesign DFN Directory", LeveldesignDfnDirectory).replace("\\", "/") - LeveldesignWorldDirectory = askVar(log, "[IN] Leveldesign World Directory", LeveldesignWorldDirectory).replace("\\", "/") - PrimitivesDirectory = askVar(log, "[IN] Primitives Directory", PrimitivesDirectory).replace("\\", "/") - GamedevDirectory = askVar(log, "[IN] Gamedev Directory", GamedevDirectory).replace("\\", "/") - DataShardDirectory = askVar(log, "[IN] Data Shard Directory", DataShardDirectory).replace("\\", "/") - DataCommonDirectory = askVar(log, "[IN] Data Common Directory", DataCommonDirectory).replace("\\", "/") - TranslationDirectory = askVar(log, "[IN] Translation Directory", TranslationDirectory).replace("\\", "/") - LeveldesignDataShardDirectory = askVar(log, "[IN] Leveldesign Data Shard Directory", LeveldesignDataShardDirectory).replace("\\", "/") - LeveldesignDataCommonDirectory = askVar(log, "[IN] Leveldesign Data Common Directory", LeveldesignDataCommonDirectory).replace("\\", "/") - WorldEditorFilesDirectory = askVar(log, "[IN] World Editor Files Directory", WorldEditorFilesDirectory).replace("\\", "/") - WindowsExeDllCfgDirectories[0] = askVar(log, "[IN] Primary Windows exe/dll/cfg Directory", WindowsExeDllCfgDirectories[0]).replace("\\", "/") - WindowsExeDllCfgDirectories[1] = askVar(log, "[IN] Secondary Windows exe/dll/cfg Directory", WindowsExeDllCfgDirectories[1]).replace("\\", "/") - WindowsExeDllCfgDirectories[2] = askVar(log, "[IN] Tertiary Windows exe/dll/cfg Directory", WindowsExeDllCfgDirectories[2]).replace("\\", "/") - WindowsExeDllCfgDirectories[3] = askVar(log, "[IN] Quaternary Windows exe/dll/cfg Directory", WindowsExeDllCfgDirectories[3]).replace("\\", "/") - WindowsExeDllCfgDirectories[4] = askVar(log, "[IN] Quinary Windows exe/dll/cfg Directory", WindowsExeDllCfgDirectories[4]).replace("\\", "/") - WindowsExeDllCfgDirectories[5] = askVar(log, "[IN] Senary Windows exe/dll/cfg Directory", WindowsExeDllCfgDirectories[5]).replace("\\", "/") - WindowsExeDllCfgDirectories[6] = askVar(log, "[IN] Septenary Windows exe/dll/cfg Directory", WindowsExeDllCfgDirectories[6]).replace("\\", "/") - LinuxServiceExecutableDirectory = askVar(log, "[IN] Linux Service Executable Directory", LinuxServiceExecutableDirectory).replace("\\", "/") - LinuxClientExecutableDirectory = askVar(log, "[IN] Linux Client Executable Directory", LinuxClientExecutableDirectory).replace("\\", "/") - PatchmanCfgAdminDirectory = askVar(log, "[IN] Patchman Cfg Admin Directory", PatchmanCfgAdminDirectory).replace("\\", "/") - PatchmanCfgDefaultDirectory = askVar(log, "[IN] Patchman Cfg Default Directory", PatchmanCfgDefaultDirectory).replace("\\", "/") - PatchmanBridgeServerDirectory = askVar(log, "[OUT] Patchman Bridge Server Patch Directory", PatchmanBridgeServerDirectory).replace("\\", "/") - SignToolExecutable = askVar(log, "Sign Tool Executable", SignToolExecutable).replace("\\", "/") - SignToolSha1 = askVar(log, "Sign Tool Signature SHA1", SignToolSha1) - SignToolTimestamp = askVar(log, "Sign Tool Timestamp Authority", SignToolTimestamp) - MaxAvailable = int(askVar(log, "3dsMax Available", str(MaxAvailable))) - if MaxAvailable: - MaxDirectory = askVar(log, "3dsMax Directory", MaxDirectory).replace("\\", "/") - MaxUserDirectory = askVar(log, "3dsMax User Directory", MaxUserDirectory).replace("\\", "/") - MaxExecutable = askVar(log, "3dsMax Executable", MaxExecutable) - if os.path.isfile("configuration/buildsite.py"): - os.remove("configuration/buildsite.py") - sf = open("configuration/buildsite.py", "w") - sf.write("#!/usr/bin/python\n") - sf.write("# \n") - sf.write("# \\file site.py\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("# \\author Jan Boon (Kaetemi)\n") - sf.write("# Python port of game data build pipeline.\n") - sf.write("# Site configuration.\n") - sf.write("# \n") - sf.write("# NeL - MMORPG Framework \n") - sf.write("# Copyright (C) 2009-2014 by authors\n") - sf.write("# \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("# 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("# \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("# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n") - sf.write("# GNU Affero General Public License for more details.\n") - sf.write("# \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 .\n") - sf.write("# \n") - sf.write("\n") - sf.write("\n") - sf.write("# *** SITE INSTALLATION ***\n") - sf.write("\n") - sf.write("# Use '/' in path name, not '\'\n") - sf.write("# Don't put '/' at the end of a directory name\n") - sf.write("\n") - sf.write("\n") - sf.write("# Quality option for this site (1 for BEST, 0 for DRAFT)\n") - sf.write("BuildQuality = " + str(BuildQuality) + "\n") - sf.write("\n") - sf.write("ToolDirectories = " + str(ToolDirectories) + "\n") - sf.write("ToolSuffix = \"" + str(ToolSuffix) + "\"\n") - sf.write("\n") - sf.write("# Build script directory\n") - sf.write("ScriptDirectory = \"" + str(ScriptDirectory) + "\"\n") - sf.write("WorkspaceDirectory = \"" + str(WorkspaceDirectory) + "\"\n") - sf.write("\n") - sf.write("# Data build directories\n") - sf.write("DatabaseDirectory = \"" + str(DatabaseDirectory) + "\"\n") - sf.write("SoundDirectory = \"" + str(SoundDirectory) + "\"\n") - sf.write("SoundDfnDirectory = \"" + str(SoundDfnDirectory) + "\"\n") - sf.write("ExportBuildDirectory = \"" + str(ExportBuildDirectory) + "\"\n") - sf.write("\n") - sf.write("# Install directories\n") - sf.write("InstallDirectory = \"" + str(InstallDirectory) + "\"\n") - sf.write("ClientDevDirectory = \"" + str(ClientDevDirectory) + "\"\n") - sf.write("ClientPatchDirectory = \"" + str(ClientPatchDirectory) + "\"\n") - sf.write("ClientInstallDirectory = \"" + str(ClientInstallDirectory) + "\"\n") - sf.write("ShardInstallDirectory = \"" + str(ShardInstallDirectory) + "\"\n") - sf.write("WorldEditInstallDirectory = \"" + str(WorldEditInstallDirectory) + "\"\n") - sf.write("\n") - sf.write("# Utility directories\n") - sf.write("WorldEditorFilesDirectory = \"" + str(WorldEditorFilesDirectory) + "\"\n") - sf.write("\n") - sf.write("# Leveldesign directories\n") - sf.write("LeveldesignDirectory = \"" + str(LeveldesignDirectory) + "\"\n") - sf.write("LeveldesignDfnDirectory = \"" + str(LeveldesignDfnDirectory) + "\"\n") - sf.write("LeveldesignWorldDirectory = \"" + str(LeveldesignWorldDirectory) + "\"\n") - sf.write("PrimitivesDirectory = \"" + str(PrimitivesDirectory) + "\"\n") - sf.write("LeveldesignDataCommonDirectory = \"" + str(LeveldesignDataCommonDirectory) + "\"\n") - sf.write("LeveldesignDataShardDirectory = \"" + str(LeveldesignDataShardDirectory) + "\"\n") - sf.write("TranslationDirectory = \"" + str(TranslationDirectory) + "\"\n") - sf.write("\n") - sf.write("# Misc data directories\n") - sf.write("GamedevDirectory = \"" + str(GamedevDirectory) + "\"\n") - sf.write("DataCommonDirectory = \"" + str(DataCommonDirectory) + "\"\n") - sf.write("DataShardDirectory = \"" + str(DataShardDirectory) + "\"\n") - sf.write("WindowsExeDllCfgDirectories = " + str(WindowsExeDllCfgDirectories) + "\n") - sf.write("LinuxServiceExecutableDirectory = \"" + str(LinuxServiceExecutableDirectory) + "\"\n") - sf.write("LinuxClientExecutableDirectory = \"" + str(LinuxClientExecutableDirectory) + "\"\n") - sf.write("PatchmanCfgAdminDirectory = \"" + str(PatchmanCfgAdminDirectory) + "\"\n") - sf.write("PatchmanCfgDefaultDirectory = \"" + str(PatchmanCfgDefaultDirectory) + "\"\n") - sf.write("PatchmanBridgeServerDirectory = \"" + str(PatchmanBridgeServerDirectory) + "\"\n") - sf.write("\n") - sf.write("# Sign tool\n") - sf.write("SignToolExecutable = \"" + str(SignToolExecutable) + "\"\n") - sf.write("SignToolSha1 = \"" + str(SignToolSha1) + "\"\n") - sf.write("SignToolTimestamp = \"" + str(SignToolTimestamp) + "\"\n") - sf.write("\n") - sf.write("# 3dsMax directives\n") - sf.write("MaxAvailable = " + str(MaxAvailable) + "\n") - sf.write("MaxDirectory = \"" + str(MaxDirectory) + "\"\n") - sf.write("MaxUserDirectory = \"" + str(MaxUserDirectory) + "\"\n") - sf.write("MaxExecutable = \"" + str(MaxExecutable) + "\"\n") - sf.write("\n") - sf.write("\n") - sf.write("# end of file\n") - sf.close() - -sys.path.append(WorkspaceDirectory) -from projects import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Run the setup projects") -printLog(log, "-------") -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)) - 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, "") - -# 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, ZoneElevationTool, 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, BuildSoundTool, ToolSuffix) - findTool(log, ToolDirectories, BuildSoundbankTool, ToolSuffix) - findTool(log, ToolDirectories, BuildSamplebankTool, ToolSuffix) - 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) - findTool(log, ToolDirectories, TranslationToolsTool, ToolSuffix) - findTool(log, ToolDirectories, BuildWorldPackedColTool, ToolSuffix) - findTool(log, ToolDirectories, R2IslandsTexturesTool, ToolSuffix) - -log.close() -if os.path.isfile("0_setup.log"): - os.remove("0_setup.log") -shutil.copy("log.log", time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + "_setup.log") -shutil.move("log.log", "0_setup.log") +#!/usr/bin/python +# +# \file 0_setup.py +# \brief Run all setup processes +# \date 2009-02-18 15:28GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Run all setup processes +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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('--preset', '-p', 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") +from scripts import * +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: + BuildQuality = 1 + try: + if args.preset: + DummyUnknownName + RemapLocalFrom + except NameError: + RemapLocalFrom = 'R:' + try: + if args.preset: + DummyUnknownName + RemapLocalTo + except NameError: + RemapLocalTo = os.getenv('RC_ROOT').replace('\\', '/') + if (not RemapLocalTo) or (not ':' in RemapLocalTo): + RemapLocalTo = 'R:' + try: + if args.preset: + DummyUnknownName + ToolDirectories + except NameError: + ToolDirectories = [ 'R:/distribution/nel_tools_win_x64', 'R:/distribution/ryzom_tools_win_x64' ] + try: + ToolSuffix + except NameError: + ToolSuffix = ".exe" + try: + if args.preset: + DummyUnknownName + ScriptDirectory + except NameError: + ScriptDirectory = "R:/code/nel/tools/build_gamedata" + try: + if args.preset: + DummyUnknownName + WorkspaceDirectory + except NameError: + WorkspaceDirectory = "R:/leveldesign/workspace" + try: + if args.preset: + DummyUnknownName + DatabaseDirectory + except NameError: + DatabaseDirectory = "R:/graphics" + try: + if args.preset: + DummyUnknownName + SoundDirectory + except NameError: + SoundDirectory = "R:/sound" + try: + if args.preset: + DummyUnknownName + SoundDfnDirectory + except NameError: + SoundDfnDirectory = "R:/sound/DFN" + try: + if args.preset: + DummyUnknownName + ExportBuildDirectory + except NameError: + ExportBuildDirectory = "R:/pipeline/export" + try: + if args.preset: + DummyUnknownName + InstallDirectory + except NameError: + InstallDirectory = "R:/pipeline/install" + try: + if args.preset: + DummyUnknownName + ClientDevDirectory + except NameError: + ClientDevDirectory = "R:/pipeline/client_dev" + try: + if args.preset: + DummyUnknownName + ClientDevLiveDirectory + except NameError: + ClientDevLiveDirectory = "R:/pipeline/client_dev_live" + try: + if args.preset: + DummyUnknownName + ClientPatchDirectory + except NameError: + ClientPatchDirectory = "R:/pipeline/client_patch" + try: + if args.preset: + DummyUnknownName + ClientInstallDirectory + except NameError: + ClientInstallDirectory = "R:/pipeline/client_install" + try: + if args.preset: + DummyUnknownName + ShardInstallDirectory + except NameError: + ShardInstallDirectory = "R:/pipeline/shard" + try: + if args.preset: + DummyUnknownName + ShardDevDirectory + except NameError: + ShardDevDirectory = "R:/pipeline/shard_dev" + try: + if args.preset: + DummyUnknownName + WorldEditInstallDirectory + except NameError: + WorldEditInstallDirectory = "R:/pipeline/worldedit" + try: + if args.preset: + DummyUnknownName + WorldEditorFilesDirectory + except NameError: + WorldEditorFilesDirectory = "R:/code/ryzom/common/data_leveldesign/leveldesign/world_editor_files" + try: + if args.preset: + DummyUnknownName + LeveldesignDirectory + except NameError: + LeveldesignDirectory = "R:/leveldesign" + try: + if args.preset: + DummyUnknownName + LeveldesignDfnDirectory + except NameError: + LeveldesignDfnDirectory = "R:/leveldesign/DFN" + try: + if args.preset: + DummyUnknownName + LeveldesignWorldDirectory + except NameError: + LeveldesignWorldDirectory = "R:/leveldesign/world" + try: + if args.preset: + DummyUnknownName + PrimitivesDirectory + except NameError: + PrimitivesDirectory = "R:/leveldesign/primitives" + try: + if args.preset: + DummyUnknownName + LeveldesignDataCommonDirectory + except NameError: + LeveldesignDataCommonDirectory = "R:/leveldesign/common" + try: + if args.preset: + DummyUnknownName + LeveldesignDataShardDirectory + except NameError: + LeveldesignDataShardDirectory = "R:/leveldesign/shard" + try: + if args.preset: + DummyUnknownName + TranslationDirectory + except NameError: + TranslationDirectory = "R:/leveldesign/translation" + try: + if args.preset: + DummyUnknownName + GamedevDirectory + except NameError: + GamedevDirectory = "R:/code/ryzom/client/data/gamedev" + try: + if args.preset: + DummyUnknownName + DataCommonDirectory + except NameError: + DataCommonDirectory = "R:/code/ryzom/common/data_common" + try: + if args.preset: + DummyUnknownName + DataShardDirectory + except NameError: + DataShardDirectory = "R:/code/ryzom/server/data_shard" + try: + if args.preset: + DummyUnknownName + WindowsExeDllCfgDirectories + except NameError: + # TODO: Separate 64bit and 32bit + WindowsExeDllCfgDirectories = [ '', 'R:/build/fv_x64/bin/Release', 'R:/distribution/external_x64', 'R:/code/ryzom/client', '', '', '' ] + try: + if args.preset: + DummyUnknownName + LinuxServiceExecutableDirectory + except NameError: + LinuxServiceExecutableDirectory = "R:/build/server_gcc/bin" + try: + if args.preset: + DummyUnknownName + LinuxClientExecutableDirectory + except NameError: + LinuxClientExecutableDirectory = "R:/build/client_gcc/bin" + try: + if args.preset: + DummyUnknownName + PatchmanDevDirectory + except NameError: + PatchmanDevDirectory = "R:/patchman/terminal_dev" + try: + if args.preset: + DummyUnknownName + PatchmanCfgAdminDirectory + except NameError: + PatchmanCfgAdminDirectory = "R:/patchman/admin_install" + try: + if args.preset: + DummyUnknownName + PatchmanCfgDefaultDirectory + except NameError: + PatchmanCfgDefaultDirectory = "R:/patchman/default" + try: + if args.preset: + DummyUnknownName + PatchmanBridgeServerDirectory + except NameError: + PatchmanBridgeServerDirectory = "R:/pipeline/bridge_server" + try: + SignToolExecutable + except NameError: + SignToolExecutable = "C:/Program Files/Microsoft SDKs/Windows/v6.0A/Bin/signtool.exe" + try: + SignToolSha1 + except NameError: + SignToolSha1 = "" + try: + SignToolTimestamp + except NameError: + SignToolTimestamp = "http://timestamp.comodoca.com/authenticode" + try: + MaxAvailable + except NameError: + MaxAvailable = 1 + try: + MaxDirectory + except NameError: + MaxDirectory = "C:/Program Files (x86)/Autodesk/3ds Max 2010" + try: + MaxUserDirectory + except NameError: + import os + try: + MaxUserDirectory = os.path.normpath(os.environ["LOCALAPPDATA"] + "/Autodesk/3dsMax/2010 - 32bit/enu") + except KeyError: + MaxAvailable = 0 + MaxUserDirectory = "C:/Users/Kaetemi/AppData/Local/Autodesk/3dsMax/2010 - 32bit/enu" + try: + MaxExecutable + except NameError: + MaxExecutable = "3dsmax.exe" + + printLog(log, "") + printLog(log, "-------") + printLog(log, "--- Setup build site") + printLog(log, "-------") + printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) + printLog(log, "") + 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, "Use -- if you need to insert an empty value.") + printLog(log, "") + BuildQuality = int(askVar(log, "Build Quality", str(BuildQuality))) + if not args.preset: + ToolDirectories[0] = askVar(log, "[IN] Primary Tool Directory", ToolDirectories[0]).replace("\\", "/") + ToolDirectories[1] = askVar(log, "[IN] Secondary Tool Directory", ToolDirectories[1]).replace("\\", "/") + ToolSuffix = askVar(log, "Tool Suffix", ToolSuffix) + ScriptDirectory = askVar(log, "[IN] Script Directory", os.getcwd().replace("\\", "/")).replace("\\", "/") + WorkspaceDirectory = askVar(log, "[IN] Workspace Directory", WorkspaceDirectory).replace("\\", "/") + DatabaseDirectory = askVar(log, "[IN] Database Directory", DatabaseDirectory).replace("\\", "/") + SoundDirectory = askVar(log, "[IN] Sound Directory", SoundDirectory).replace("\\", "/") + SoundDfnDirectory = askVar(log, "[IN] Sound DFN Directory", SoundDfnDirectory).replace("\\", "/") + ExportBuildDirectory = askVar(log, "[OUT] Export Build Directory", ExportBuildDirectory).replace("\\", "/") + InstallDirectory = askVar(log, "[OUT] Install Directory", InstallDirectory).replace("\\", "/") + ClientDevDirectory = askVar(log, "[OUT] Client Dev Directory", ClientDevDirectory).replace("\\", "/") + ClientDevLiveDirectory = askVar(log, "[OUT] Client Dev Live Directory", ClientDevLiveDirectory).replace("\\", "/") + ClientPatchDirectory = askVar(log, "[OUT] Client Patch Directory", ClientPatchDirectory).replace("\\", "/") + ClientInstallDirectory = askVar(log, "[OUT] Client Install Directory", ClientInstallDirectory).replace("\\", "/") + ShardInstallDirectory = askVar(log, "[OUT] Shard Data Install Directory", ShardInstallDirectory).replace("\\", "/") + ShardDevDirectory = askVar(log, "[OUT] Shard Dev Directory", ShardDevDirectory).replace("\\", "/") + WorldEditInstallDirectory = askVar(log, "[OUT] World Edit Data Install Directory", WorldEditInstallDirectory).replace("\\", "/") + LeveldesignDirectory = askVar(log, "[IN] Leveldesign Directory", LeveldesignDirectory).replace("\\", "/") + LeveldesignDfnDirectory = askVar(log, "[IN] Leveldesign DFN Directory", LeveldesignDfnDirectory).replace("\\", "/") + LeveldesignWorldDirectory = askVar(log, "[IN] Leveldesign World Directory", LeveldesignWorldDirectory).replace("\\", "/") + PrimitivesDirectory = askVar(log, "[IN] Primitives Directory", PrimitivesDirectory).replace("\\", "/") + GamedevDirectory = askVar(log, "[IN] Gamedev Directory", GamedevDirectory).replace("\\", "/") + DataShardDirectory = askVar(log, "[IN] Data Shard Directory", DataShardDirectory).replace("\\", "/") + DataCommonDirectory = askVar(log, "[IN] Data Common Directory", DataCommonDirectory).replace("\\", "/") + TranslationDirectory = askVar(log, "[IN] Translation Directory", TranslationDirectory).replace("\\", "/") + LeveldesignDataShardDirectory = askVar(log, "[IN] Leveldesign Data Shard Directory", LeveldesignDataShardDirectory).replace("\\", "/") + LeveldesignDataCommonDirectory = askVar(log, "[IN] Leveldesign Data Common Directory", LeveldesignDataCommonDirectory).replace("\\", "/") + WorldEditorFilesDirectory = askVar(log, "[IN] World Editor Files Directory", WorldEditorFilesDirectory).replace("\\", "/") + WindowsExeDllCfgDirectories[0] = askVar(log, "[IN] Primary Windows exe/dll/cfg Directory", WindowsExeDllCfgDirectories[0]).replace("\\", "/") + WindowsExeDllCfgDirectories[1] = askVar(log, "[IN] Secondary Windows exe/dll/cfg Directory", WindowsExeDllCfgDirectories[1]).replace("\\", "/") + WindowsExeDllCfgDirectories[2] = askVar(log, "[IN] Tertiary Windows exe/dll/cfg Directory", WindowsExeDllCfgDirectories[2]).replace("\\", "/") + WindowsExeDllCfgDirectories[3] = askVar(log, "[IN] Quaternary Windows exe/dll/cfg Directory", WindowsExeDllCfgDirectories[3]).replace("\\", "/") + WindowsExeDllCfgDirectories[4] = askVar(log, "[IN] Quinary Windows exe/dll/cfg Directory", WindowsExeDllCfgDirectories[4]).replace("\\", "/") + WindowsExeDllCfgDirectories[5] = askVar(log, "[IN] Senary Windows exe/dll/cfg Directory", WindowsExeDllCfgDirectories[5]).replace("\\", "/") + WindowsExeDllCfgDirectories[6] = askVar(log, "[IN] Septenary Windows exe/dll/cfg Directory", WindowsExeDllCfgDirectories[6]).replace("\\", "/") + LinuxServiceExecutableDirectory = askVar(log, "[IN] Linux Service Executable Directory", LinuxServiceExecutableDirectory).replace("\\", "/") + LinuxClientExecutableDirectory = askVar(log, "[IN] Linux Client Executable Directory", LinuxClientExecutableDirectory).replace("\\", "/") + PatchmanDevDirectory = askVar(log, "[IN] Patchman Directory", PatchmanDevDirectory).replace("\\", "/") + PatchmanCfgAdminDirectory = askVar(log, "[IN] Patchman Cfg Admin Directory", PatchmanCfgAdminDirectory).replace("\\", "/") + PatchmanCfgDefaultDirectory = askVar(log, "[IN] Patchman Cfg Default Directory", PatchmanCfgDefaultDirectory).replace("\\", "/") + PatchmanBridgeServerDirectory = askVar(log, "[OUT] Patchman Bridge Server Patch Directory", PatchmanBridgeServerDirectory).replace("\\", "/") + SignToolExecutable = askVar(log, "Sign Tool Executable", SignToolExecutable).replace("\\", "/") + SignToolSha1 = askVar(log, "Sign Tool Signature SHA1", SignToolSha1) + SignToolTimestamp = askVar(log, "Sign Tool Timestamp Authority", SignToolTimestamp) + MaxAvailable = int(askVar(log, "3dsMax Available", str(MaxAvailable))) + if MaxAvailable: + MaxDirectory = askVar(log, "3dsMax Directory", MaxDirectory).replace("\\", "/") + MaxUserDirectory = askVar(log, "3dsMax User Directory", MaxUserDirectory).replace("\\", "/") + MaxExecutable = askVar(log, "3dsMax Executable", MaxExecutable) + if os.path.isfile("configuration/buildsite.py"): + os.remove("configuration/buildsite.py") + sf = open("configuration/buildsite.py", "w") + sf.write("#!/usr/bin/python\n") + sf.write("# \n") + sf.write("# \\file site.py\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("# \\author Jan Boon (Kaetemi)\n") + sf.write("# Python port of game data build pipeline.\n") + sf.write("# Site configuration.\n") + sf.write("# \n") + sf.write("# NeL - MMORPG Framework \n") + sf.write("# Copyright (C) 2009-2014 by authors\n") + sf.write("# \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("# 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("# \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("# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n") + sf.write("# GNU Affero General Public License for more details.\n") + sf.write("# \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 .\n") + sf.write("# \n") + sf.write("\n") + sf.write("\n") + sf.write("# *** SITE INSTALLATION ***\n") + sf.write("\n") + sf.write("# Use '/' in path name, not '\'\n") + sf.write("# Don't put '/' at the end of a directory name\n") + sf.write("\n") + sf.write("\n") + sf.write("# Quality option for this site (1 for BEST, 0 for DRAFT)\n") + sf.write("BuildQuality = " + str(BuildQuality) + "\n") + sf.write("\n") + sf.write("RemapLocalFrom = \"" + str(RemapLocalFrom) + "\"\n") + sf.write("RemapLocalTo = \"" + str(RemapLocalTo) + "\"\n") + sf.write("\n") + sf.write("ToolDirectories = " + str(ToolDirectories) + "\n") + sf.write("ToolSuffix = \"" + str(ToolSuffix) + "\"\n") + sf.write("\n") + sf.write("# Build script directory\n") + sf.write("ScriptDirectory = \"" + str(ScriptDirectory) + "\"\n") + sf.write("WorkspaceDirectory = \"" + str(WorkspaceDirectory) + "\"\n") + sf.write("\n") + sf.write("# Data build directories\n") + sf.write("DatabaseDirectory = \"" + str(DatabaseDirectory) + "\"\n") + sf.write("SoundDirectory = \"" + str(SoundDirectory) + "\"\n") + sf.write("SoundDfnDirectory = \"" + str(SoundDfnDirectory) + "\"\n") + sf.write("ExportBuildDirectory = \"" + str(ExportBuildDirectory) + "\"\n") + sf.write("\n") + sf.write("# Install directories\n") + sf.write("InstallDirectory = \"" + str(InstallDirectory) + "\"\n") + sf.write("ClientDevDirectory = \"" + str(ClientDevDirectory) + "\"\n") + sf.write("ClientDevLiveDirectory = \"" + str(ClientDevLiveDirectory) + "\"\n") + sf.write("ClientPatchDirectory = \"" + str(ClientPatchDirectory) + "\"\n") + sf.write("ClientInstallDirectory = \"" + str(ClientInstallDirectory) + "\"\n") + sf.write("ShardInstallDirectory = \"" + str(ShardInstallDirectory) + "\"\n") + sf.write("ShardDevDirectory = \"" + str(ShardDevDirectory) + "\"\n") + sf.write("WorldEditInstallDirectory = \"" + str(WorldEditInstallDirectory) + "\"\n") + sf.write("\n") + sf.write("# Utility directories\n") + sf.write("WorldEditorFilesDirectory = \"" + str(WorldEditorFilesDirectory) + "\"\n") + sf.write("\n") + sf.write("# Leveldesign directories\n") + sf.write("LeveldesignDirectory = \"" + str(LeveldesignDirectory) + "\"\n") + sf.write("LeveldesignDfnDirectory = \"" + str(LeveldesignDfnDirectory) + "\"\n") + sf.write("LeveldesignWorldDirectory = \"" + str(LeveldesignWorldDirectory) + "\"\n") + sf.write("PrimitivesDirectory = \"" + str(PrimitivesDirectory) + "\"\n") + sf.write("LeveldesignDataCommonDirectory = \"" + str(LeveldesignDataCommonDirectory) + "\"\n") + sf.write("LeveldesignDataShardDirectory = \"" + str(LeveldesignDataShardDirectory) + "\"\n") + sf.write("TranslationDirectory = \"" + str(TranslationDirectory) + "\"\n") + sf.write("\n") + sf.write("# Misc data directories\n") + sf.write("GamedevDirectory = \"" + str(GamedevDirectory) + "\"\n") + sf.write("DataCommonDirectory = \"" + str(DataCommonDirectory) + "\"\n") + sf.write("DataShardDirectory = \"" + str(DataShardDirectory) + "\"\n") + sf.write("WindowsExeDllCfgDirectories = " + str(WindowsExeDllCfgDirectories) + "\n") + sf.write("LinuxServiceExecutableDirectory = \"" + str(LinuxServiceExecutableDirectory) + "\"\n") + sf.write("LinuxClientExecutableDirectory = \"" + str(LinuxClientExecutableDirectory) + "\"\n") + sf.write("PatchmanDevDirectory = \"" + str(PatchmanDevDirectory) + "\"\n") + sf.write("PatchmanCfgAdminDirectory = \"" + str(PatchmanCfgAdminDirectory) + "\"\n") + sf.write("PatchmanCfgDefaultDirectory = \"" + str(PatchmanCfgDefaultDirectory) + "\"\n") + sf.write("PatchmanBridgeServerDirectory = \"" + str(PatchmanBridgeServerDirectory) + "\"\n") + sf.write("\n") + sf.write("# Sign tool\n") + sf.write("SignToolExecutable = \"" + str(SignToolExecutable) + "\"\n") + sf.write("SignToolSha1 = \"" + str(SignToolSha1) + "\"\n") + sf.write("SignToolTimestamp = \"" + str(SignToolTimestamp) + "\"\n") + sf.write("\n") + sf.write("# 3dsMax directives\n") + sf.write("MaxAvailable = " + str(MaxAvailable) + "\n") + sf.write("MaxDirectory = \"" + str(MaxDirectory) + "\"\n") + sf.write("MaxUserDirectory = \"" + str(MaxUserDirectory) + "\"\n") + sf.write("MaxExecutable = \"" + str(MaxExecutable) + "\"\n") + sf.write("\n") + sf.write("\n") + sf.write("# end of file\n") + sf.flush() + sf.close() + sf = open("configuration/buildsite_local.py", "w") + sfr = open("configuration/buildsite.py", "r") + for l in sfr: + sf.write(l.replace(RemapLocalFrom + '/', RemapLocalTo + '/')) + sf.flush() + sfr.close() + sf.close() + +from buildsite_local import * + +sys.path.append(WorkspaceDirectory) +from projects import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Run the setup projects") +printLog(log, "-------") +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)) + 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, "") + +# Additional directories +printLog(log, ">>> Setup additional directories <<<") +mkPath(log, ClientDevDirectory) +mkPath(log, ClientDevLiveDirectory) +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, ZoneElevationTool, 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, BuildSoundTool, ToolSuffix) + findTool(log, ToolDirectories, BuildSoundbankTool, ToolSuffix) + findTool(log, ToolDirectories, BuildSamplebankTool, ToolSuffix) + 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) + findTool(log, ToolDirectories, TranslationToolsTool, ToolSuffix) + findTool(log, ToolDirectories, BuildWorldPackedColTool, ToolSuffix) + findTool(log, ToolDirectories, R2IslandsTexturesTool, ToolSuffix) + findTool(log, ToolDirectories, PatchmanServiceTool, ToolSuffix) + +log.close() +if os.path.isfile("0_setup.log"): + os.remove("0_setup.log") +shutil.copy("log.log", time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + "_setup.log") +shutil.move("log.log", "0_setup.log") diff --git a/code/nel/tools/build_gamedata/1_export.py b/code/nel/tools/build_gamedata/1_export.py old mode 100755 new mode 100644 index d9e4670f7..b010d98aa --- a/code/nel/tools/build_gamedata/1_export.py +++ b/code/nel/tools/build_gamedata/1_export.py @@ -1,94 +1,94 @@ -#!/usr/bin/python -# -# \file 1_export.py -# \brief Run all export processes -# \date 2009-02-18 09:22GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Run all export processes -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from tools import * - -sys.path.append(WorkspaceDirectory) -from projects import * - -# Log error -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Run the export processes") -printLog(log, "-------") -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)) - 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, "") - -log.close() -if os.path.isfile("1_export.log"): - os.remove("1_export.log") -shutil.copy("log.log", time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + "_export.log") -shutil.move("log.log", "1_export.log") +#!/usr/bin/python +# +# \file 1_export.py +# \brief Run all export processes +# \date 2009-02-18 09:22GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Run all export processes +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite_local import * +from tools import * + +sys.path.append(WorkspaceDirectory) +from projects import * + +# Log error +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Run the export processes") +printLog(log, "-------") +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)) + 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, "") + +log.close() +if os.path.isfile("1_export.log"): + os.remove("1_export.log") +shutil.copy("log.log", time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + "_export.log") +shutil.move("log.log", "1_export.log") diff --git a/code/nel/tools/build_gamedata/2_build.py b/code/nel/tools/build_gamedata/2_build.py old mode 100755 new mode 100644 index 4777ad2d1..18cc4ad16 --- a/code/nel/tools/build_gamedata/2_build.py +++ b/code/nel/tools/build_gamedata/2_build.py @@ -1,94 +1,94 @@ -#!/usr/bin/python -# -# \file 2_build.py -# \brief Run all build processes -# \date 2009-02-18 09:22GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Run all build processes -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from tools import * - -sys.path.append(WorkspaceDirectory) -from projects import * - -# Log error -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Run the build processes") -printLog(log, "-------") -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)) - 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, "") - -log.close() -if os.path.isfile("2_build.log"): - os.remove("2_build.log") -shutil.copy("log.log", time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + "_build.log") -shutil.move("log.log", "2_build.log") +#!/usr/bin/python +# +# \file 2_build.py +# \brief Run all build processes +# \date 2009-02-18 09:22GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Run all build processes +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite_local import * +from tools import * + +sys.path.append(WorkspaceDirectory) +from projects import * + +# Log error +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Run the build processes") +printLog(log, "-------") +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)) + 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, "") + +log.close() +if os.path.isfile("2_build.log"): + os.remove("2_build.log") +shutil.copy("log.log", time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + "_build.log") +shutil.move("log.log", "2_build.log") diff --git a/code/nel/tools/build_gamedata/3_install.py b/code/nel/tools/build_gamedata/3_install.py old mode 100755 new mode 100644 index b2584274c..807ee4430 --- a/code/nel/tools/build_gamedata/3_install.py +++ b/code/nel/tools/build_gamedata/3_install.py @@ -1,94 +1,94 @@ -#!/usr/bin/python -# -# \file 3_install.py -# \brief Run all install processes -# \date 2009-02-18 16:19GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Run all install processes -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -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, "") -# 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)) - 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, "") - -log.close() -if os.path.isfile("3_install.log"): - os.remove("3_install.log") -shutil.copy("log.log", time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + "_install.log") -shutil.move("log.log", "3_install.log") +#!/usr/bin/python +# +# \file 3_install.py +# \brief Run all install processes +# \date 2009-02-18 16:19GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Run all install processes +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite_local import * +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, "") +# 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)) + 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, "") + +log.close() +if os.path.isfile("3_install.log"): + os.remove("3_install.log") +shutil.copy("log.log", time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + "_install.log") +shutil.move("log.log", "3_install.log") diff --git a/code/nel/tools/build_gamedata/9_upload.py b/code/nel/tools/build_gamedata/9_upload.py old mode 100755 new mode 100644 index 31f6852b5..33d563c7b --- a/code/nel/tools/build_gamedata/9_upload.py +++ b/code/nel/tools/build_gamedata/9_upload.py @@ -1,181 +1,181 @@ -#!/usr/bin/python -# -# \file 9_upload.py -# \brief Upload data to servers -# \date 2009-02-18 16:19GMT -# \author Jan Boon (Kaetemi) -# Game data build pipeline. -# Upload data to servers -# -# NeL - MMORPG Framework -# Copyright (C) 2011 Kaetemi -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from tools import * - -try: - from upload import * -except ImportError: - # Not documenting this. Because we can. - printLog(log, "ERROR Upload not configured, bye.") - exit() - -sys.path.append(WorkspaceDirectory) -from projects import * - -# Log error -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Upload data to servers") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -# Find tools -# Not documenting this. Because we can. -Psftp = findFileMultiDir(log, ToolDirectories + WindowsExeDllCfgDirectories, UploadPsftpTool) -printLog(log, "PSFTP " + Psftp) - -def downloadVersionTag(server, user, sshkey, dir): - if os.path.isfile("upload.tag"): - os.remove("upload.tag") - if os.path.isfile("upload.batch"): - os.remove("upload.batch") - ub = open("upload.batch", "w") - ub.write("cd " + dir + "\n") - ub.write("get upload.tag upload.tag\n") - ub.write("quit\n") - ub.close() - subprocess.call([ Psftp, "-b", "upload.batch", "-i", sshkey, user + "@" + server ]) - os.remove("upload.batch") - if os.path.isfile("upload.tag"): - ft = open("upload.tag") - result = float(ft.read()) # float, really - ft.close() - os.remove("upload.tag") - printLog(log, "INFO Upload tag is " + str(result)) - return result - else: - printLog(log, "WARNING Upload tag not found, uploading everything") - return 0 - -def isDirectoryNeeded(ft, dir): - files = os.listdir(dir) - for fileName in files: - if isLegalFileName(fileName): - fileFull = dir + "/" + fileName - if os.path.isfile(fileFull): - nftf = os.stat(fileFull).st_mtime - if nftf > ft: - return True - elif os.path.isdir(fileFull): - if isDirectoryNeeded(ft, fileFull): - return True - elif not os.path.isdir(fileFull): - printLog(log, "isDirectoryNeeded: file not dir or file?!" + fileFull) - return False - -def listDirectoryUpload(ft, ub, udb, dir): - nft = 0 - files = os.listdir(dir) - for fileName in files: - if isLegalFileName(fileName): - fileFull = dir + "/" + fileName - if os.path.isfile(fileFull): - nftf = os.stat(fileFull).st_mtime - if nftf > ft: - ub.write("put " + fileFull + " " + fileName + "\n") - if nftf > nft: - nft = nftf - elif os.path.isdir(fileFull): - if isDirectoryNeeded(ft, fileFull): - udb.write("mkdir " + fileName + "\n") - ub.write("cd " + fileName + "\n") - udb.write("cd " + fileName + "\n") - nft2 = listDirectoryUpload(ft, ub, udb, fileFull) - if (nft2 > nft): - nft = nft2 - ub.write("cd ..\n") - udb.write("cd ..\n") - elif not os.path.isdir(fileFull): - printLog(log, "listDirectoryUpload: file not dir or file?!" + fileFull) - return nft - -def uploadSftp(server, user, sshkey, dir_to, dir_from, addcmd): - ft = downloadVersionTag(server, user, sshkey, dir_to) - if isDirectoryNeeded(ft, dir_from): - if os.path.isfile("upload_dir.batch"): - os.remove("upload_dir.batch") - if os.path.isfile("upload.batch"): - os.remove("upload.batch") - udb = open("upload_dir.batch", "w") - udb.write("cd " + dir_to + "\n") - ub = open("upload.batch", "w") - ub.write("cd " + dir_to + "\n") - for ac in addcmd: - ub.write(ac + "\n") - ftn = listDirectoryUpload(ft, ub, udb, dir_from) - if (ft > ftn): - ftn = ft - nft = open("upload.tag", "w") - nft.write(str(ftn)) - nft.close() - ub.write("put upload.tag upload.tag\n") - ub.write("quit\n") - ub.close() - udb.write("quit\n") - udb.close() - subprocess.call([ Psftp, "-be", "-b", "upload_dir.batch", "-i", sshkey, user + "@" + server ]) - subprocess.call([ Psftp, "-b", "upload.batch", "-i", sshkey, user + "@" + server ]) - os.remove("upload_dir.batch") - os.remove("upload.batch") - os.remove("upload.tag") - else: - printLog(log, "SKIP " + dir_to) - -printLog(log, ">>> Upload patch <<<") -for target in UploadPatch: - uploadSftp(target[0], target[1], target[2], target[3], ClientPatchDirectory + "/patch", [ ]) - -printLog(log, ">>> Upload data_shard <<<") -for target in UploadShard: - uploadSftp(target[0], target[1], target[2], target[3], DataShardDirectory, [ "rm *.packed_sheets", "rm primitive_cache/*.binprim" ]) - -printLog(log, ">>> Upload data_common <<<") -for target in UploadCommon: - uploadSftp(target[0], target[1], target[2], target[3], DataCommonDirectory, [ ]) - -printLog(log, ">>> Upload data_leveldesign/leveldesign <<<") -for target in UploadLeveldesign: - uploadSftp(target[0], target[1], target[2], target[3], LeveldesignDirectory, [ ]) - -printLog(log, ">>> Upload data_leveldesign/primitives <<<") -for target in UploadPrimitives: - uploadSftp(target[0], target[1], target[2], target[3], PrimitivesDirectory, [ ]) - -log.close() -if os.path.isfile("9_upload.log"): - os.remove("9_upload.log") -shutil.copy("log.log", time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + "_upload.log") -shutil.move("log.log", "9_upload.log") +#!/usr/bin/python +# +# \file 9_upload.py +# \brief Upload data to servers +# \date 2009-02-18 16:19GMT +# \author Jan Boon (Kaetemi) +# Game data build pipeline. +# Upload data to servers +# +# NeL - MMORPG Framework +# Copyright (C) 2011 Kaetemi +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite_local import * +from tools import * + +try: + from upload import * +except ImportError: + # Not documenting this. Because we can. + printLog(log, "ERROR Upload not configured, bye.") + exit() + +sys.path.append(WorkspaceDirectory) +from projects import * + +# Log error +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Upload data to servers") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +# Find tools +# Not documenting this. Because we can. +Psftp = findFileMultiDir(log, ToolDirectories + WindowsExeDllCfgDirectories, UploadPsftpTool) +printLog(log, "PSFTP " + Psftp) + +def downloadVersionTag(server, user, sshkey, dir): + if os.path.isfile("upload.tag"): + os.remove("upload.tag") + if os.path.isfile("upload.batch"): + os.remove("upload.batch") + ub = open("upload.batch", "w") + ub.write("cd " + dir + "\n") + ub.write("get upload.tag upload.tag\n") + ub.write("quit\n") + ub.close() + subprocess.call([ Psftp, "-b", "upload.batch", "-i", sshkey, user + "@" + server ]) + os.remove("upload.batch") + if os.path.isfile("upload.tag"): + ft = open("upload.tag") + result = float(ft.read()) # float, really + ft.close() + os.remove("upload.tag") + printLog(log, "INFO Upload tag is " + str(result)) + return result + else: + printLog(log, "WARNING Upload tag not found, uploading everything") + return 0 + +def isDirectoryNeeded(ft, dir): + files = os.listdir(dir) + for fileName in files: + if isLegalFileName(fileName): + fileFull = dir + "/" + fileName + if os.path.isfile(fileFull): + nftf = os.stat(fileFull).st_mtime + if nftf > ft: + return True + elif os.path.isdir(fileFull): + if isDirectoryNeeded(ft, fileFull): + return True + elif not os.path.isdir(fileFull): + printLog(log, "isDirectoryNeeded: file not dir or file?!" + fileFull) + return False + +def listDirectoryUpload(ft, ub, udb, dir): + nft = 0 + files = os.listdir(dir) + for fileName in files: + if isLegalFileName(fileName): + fileFull = dir + "/" + fileName + if os.path.isfile(fileFull): + nftf = os.stat(fileFull).st_mtime + if nftf > ft: + ub.write("put " + fileFull + " " + fileName + "\n") + if nftf > nft: + nft = nftf + elif os.path.isdir(fileFull): + if isDirectoryNeeded(ft, fileFull): + udb.write("mkdir " + fileName + "\n") + ub.write("cd " + fileName + "\n") + udb.write("cd " + fileName + "\n") + nft2 = listDirectoryUpload(ft, ub, udb, fileFull) + if (nft2 > nft): + nft = nft2 + ub.write("cd ..\n") + udb.write("cd ..\n") + elif not os.path.isdir(fileFull): + printLog(log, "listDirectoryUpload: file not dir or file?!" + fileFull) + return nft + +def uploadSftp(server, user, sshkey, dir_to, dir_from, addcmd): + ft = downloadVersionTag(server, user, sshkey, dir_to) + if isDirectoryNeeded(ft, dir_from): + if os.path.isfile("upload_dir.batch"): + os.remove("upload_dir.batch") + if os.path.isfile("upload.batch"): + os.remove("upload.batch") + udb = open("upload_dir.batch", "w") + udb.write("cd " + dir_to + "\n") + ub = open("upload.batch", "w") + ub.write("cd " + dir_to + "\n") + for ac in addcmd: + ub.write(ac + "\n") + ftn = listDirectoryUpload(ft, ub, udb, dir_from) + if (ft > ftn): + ftn = ft + nft = open("upload.tag", "w") + nft.write(str(ftn)) + nft.close() + ub.write("put upload.tag upload.tag\n") + ub.write("quit\n") + ub.close() + udb.write("quit\n") + udb.close() + subprocess.call([ Psftp, "-be", "-b", "upload_dir.batch", "-i", sshkey, user + "@" + server ]) + subprocess.call([ Psftp, "-b", "upload.batch", "-i", sshkey, user + "@" + server ]) + os.remove("upload_dir.batch") + os.remove("upload.batch") + os.remove("upload.tag") + else: + printLog(log, "SKIP " + dir_to) + +printLog(log, ">>> Upload patch <<<") +for target in UploadPatch: + uploadSftp(target[0], target[1], target[2], target[3], ClientPatchDirectory + "/patch", [ ]) + +printLog(log, ">>> Upload data_shard <<<") +for target in UploadShard: + uploadSftp(target[0], target[1], target[2], target[3], DataShardDirectory, [ "rm *.packed_sheets", "rm primitive_cache/*.binprim" ]) + +printLog(log, ">>> Upload data_common <<<") +for target in UploadCommon: + uploadSftp(target[0], target[1], target[2], target[3], DataCommonDirectory, [ ]) + +printLog(log, ">>> Upload data_leveldesign/leveldesign <<<") +for target in UploadLeveldesign: + uploadSftp(target[0], target[1], target[2], target[3], LeveldesignDirectory, [ ]) + +printLog(log, ">>> Upload data_leveldesign/primitives <<<") +for target in UploadPrimitives: + uploadSftp(target[0], target[1], target[2], target[3], PrimitivesDirectory, [ ]) + +log.close() +if os.path.isfile("9_upload.log"): + os.remove("9_upload.log") +shutil.copy("log.log", time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + "_upload.log") +shutil.move("log.log", "9_upload.log") diff --git a/code/nel/tools/build_gamedata/a1_worldedit_data.py b/code/nel/tools/build_gamedata/a1_worldedit_data.py old mode 100755 new mode 100644 index f7aae7a04..d87fe08b6 --- a/code/nel/tools/build_gamedata/a1_worldedit_data.py +++ b/code/nel/tools/build_gamedata/a1_worldedit_data.py @@ -1,74 +1,74 @@ -#!/usr/bin/python -# -# \file a1_worldedit_data.py -# \brief Install worldedit data -# \date 2014-09-10 14:01GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Install worldedit data -# -# NeL - MMORPG Framework -# Copyright (C) 2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from tools import * - -sys.path.append(WorkspaceDirectory) -from projects import * - -# Log error -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Install worldedit data") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -for ecosystem in WorldEditEcosystems: - ecosystemName = ecosystem[0] - srcZoneLigos = ExportBuildDirectory + "/ecosystems/" + ecosystemName + "/ligo_es/zoneligos/" - dstZoneLigos = WorldEditInstallDirectory + "/" + ecosystemName + "/zoneligos/" - mkPath(log, srcZoneLigos) - mkPath(log, dstZoneLigos) - copyFilesNoTreeIfNeeded(log, srcZoneLigos, dstZoneLigos) - srcZoneBitmaps = DatabaseDirectory + "/landscape/ligo/" + ecosystemName + "/zonebitmaps/" - dstZoneBitmaps = WorldEditInstallDirectory + "/" + ecosystemName + "/zonebitmaps/" - mkPath(log, srcZoneBitmaps) - mkPath(log, dstZoneBitmaps) - copyFilesExtNoTreeIfNeeded(log, srcZoneBitmaps, dstZoneBitmaps, ".tga") - copyFilesExtNoTreeIfNeeded(log, srcZoneBitmaps, dstZoneBitmaps, ".png") - dstCollisionMap = WorldEditInstallDirectory + "/" + ecosystemName + "/collisionmap/" - mkPath(log, dstCollisionMap) - for continentName in ecosystem[1]: - srcCollisionMap = ExportBuildDirectory + "/continents/" + continentName + "/ai_wmap/" - mkPath(log, srcCollisionMap) - copyFilesExtNoTreeIfNeeded(log, srcCollisionMap, dstCollisionMap, ".tga") - copyFilesExtNoTreeIfNeeded(log, srcCollisionMap, dstCollisionMap, ".png") -printLog(log, "") - -log.close() -if os.path.isfile("a1_worldedit_data.log"): - os.remove("a1_worldedit_data.log") -shutil.copy("log.log", time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + "_worldedit_data.log") -shutil.move("log.log", "a1_worldedit_data.log") +#!/usr/bin/python +# +# \file a1_worldedit_data.py +# \brief Install worldedit data +# \date 2014-09-10 14:01GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Install worldedit data +# +# NeL - MMORPG Framework +# Copyright (C) 2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite_local import * +from tools import * + +sys.path.append(WorkspaceDirectory) +from projects import * + +# Log error +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Install worldedit data") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +for ecosystem in WorldEditEcosystems: + ecosystemName = ecosystem[0] + srcZoneLigos = ExportBuildDirectory + "/ecosystems/" + ecosystemName + "/ligo_es/zoneligos/" + dstZoneLigos = WorldEditInstallDirectory + "/" + ecosystemName + "/zoneligos/" + mkPath(log, srcZoneLigos) + mkPath(log, dstZoneLigos) + copyFilesNoTreeIfNeeded(log, srcZoneLigos, dstZoneLigos) + srcZoneBitmaps = DatabaseDirectory + "/landscape/ligo/" + ecosystemName + "/zonebitmaps/" + dstZoneBitmaps = WorldEditInstallDirectory + "/" + ecosystemName + "/zonebitmaps/" + mkPath(log, srcZoneBitmaps) + mkPath(log, dstZoneBitmaps) + copyFilesExtNoTreeIfNeeded(log, srcZoneBitmaps, dstZoneBitmaps, ".tga") + copyFilesExtNoTreeIfNeeded(log, srcZoneBitmaps, dstZoneBitmaps, ".png") + dstCollisionMap = WorldEditInstallDirectory + "/" + ecosystemName + "/collisionmap/" + mkPath(log, dstCollisionMap) + for continentName in ecosystem[1]: + srcCollisionMap = ExportBuildDirectory + "/continents/" + continentName + "/ai_wmap/" + mkPath(log, srcCollisionMap) + copyFilesExtNoTreeIfNeeded(log, srcCollisionMap, dstCollisionMap, ".tga") + copyFilesExtNoTreeIfNeeded(log, srcCollisionMap, dstCollisionMap, ".png") +printLog(log, "") + +log.close() +if os.path.isfile("a1_worldedit_data.log"): + os.remove("a1_worldedit_data.log") +shutil.copy("log.log", time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + "_worldedit_data.log") +shutil.move("log.log", "a1_worldedit_data.log") diff --git a/code/nel/tools/build_gamedata/b1_client_dev.py b/code/nel/tools/build_gamedata/b1_client_dev.py old mode 100755 new mode 100644 index a23ee693c..87ce0f998 --- a/code/nel/tools/build_gamedata/b1_client_dev.py +++ b/code/nel/tools/build_gamedata/b1_client_dev.py @@ -1,79 +1,108 @@ -#!/usr/bin/python -# -# \file b1_client_dev.py -# \brief Install to client dev -# \date 2009-02-18 16:19GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Install to client dev -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from tools import * - -sys.path.append(WorkspaceDirectory) -from projects import * - -# Log error -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Install to client dev") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -if not os.path.isfile(ClientDevDirectory + "/client.cfg"): - printLog(log, ">>> Generate client.cfg <<<") - cfg = open(ClientDevDirectory + "/client.cfg", "w") - cfg.write("RootConfigFilename = \"client_default.cfg\";\n") - cfg.write("PreDataPath = {\n") - cfg.write("\t\"" + InstallDirectory + "\", \"user\", \"patch\", \"data\", \"examples\" \n") - cfg.write("};\n") - cfg.write("PatchWanted = 0;\n") - cfg.write("DisplayLuaDebugInfo = 1;\n") - cfg.write("AllowDebugLua = 1;\n") - cfg.write("FullScreen = 0;\n") - printLog(log, "") - -printLog(log, ">>> Install data <<<") -for category in InstallClientData: - if (category["UnpackTo"] != None): - printLog(log, "CATEGORY " + category["Name"]) - targetPath = ClientDevDirectory - if (category["UnpackTo"] != ""): - targetPath += "/" + category["UnpackTo"] - mkPath(log, targetPath) - for package in category["Packages"]: - printLog(log, "PACKAGE " + package[0]) - mkPath(log, InstallDirectory + "/" + package[0]) - copyFilesNoTreeIfNeeded(log, InstallDirectory + "/" + package[0], targetPath) -printLog(log, "") - -log.close() -if os.path.isfile("b1_client_dev.log"): - os.remove("b1_client_dev.log") -shutil.copy("log.log", time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + "_client_dev.log") -shutil.move("log.log", "b1_client_dev.log") +#!/usr/bin/python +# +# \file b1_client_dev.py +# \brief Install to client dev +# \date 2009-02-18 16:19GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Install to client dev +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +import time, sys, os, shutil, subprocess, distutils.dir_util, socket +sys.path.append("configuration") + +if os.path.isfile("log.log"): + os.remove("log.log") +log = open("log.log", "w") +from scripts import * +from buildsite_local import * +from tools import * + +sys.path.append(WorkspaceDirectory) +from projects import * + +# Log error +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Install to client dev") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +mkPath(log, ClientDevLiveDirectory) +if not os.path.isfile(ClientDevLiveDirectory + "/client.cfg"): + printLog(log, ">>> Generate live dev client.cfg <<<") + cfg = open(ClientDevLiveDirectory + "/client.cfg", "w") + cfg.write("RootConfigFilename = \"client_default.cfg\";\n") + cfg.write("PreDataPath = {\n") + cfg.write("\t\"user\", \"patch\", \"" + DataCommonDirectory + "\", \"" + GamedevDirectory + "\", \"" + LeveldesignDirectory + "/translation/translated\", \"" + InstallDirectory + "\", \"data\", \"examples\" \n") + cfg.write("};\n") + cfg.write("PreLoadPath = \"" + InstallDirectory + "\";\n") + cfg.write("PatchWanted = 0;\n") + cfg.write("DisplayLuaDebugInfo = 1;\n") + cfg.write("AllowDebugLua = 1;\n") + cfg.write("FullScreen = 0;\n") + cfg.flush() + cfg.close() + printLog(log, "") + +mkPath(log, ClientDevDirectory) +if not os.path.isfile(ClientDevDirectory + "/client.cfg"): + printLog(log, ">>> Generate local dev client.cfg <<<") + cfg = open(ClientDevDirectory + "/client.cfg", "w") + cfgr = open(ClientDevLiveDirectory + "/client.cfg", "r") + for l in cfgr: + cfg.write(l) + cfgr.close() + cfg.write("StartupHost = \"http://" + socket.gethostname() + ":9042\";\n") + cfg.write("Application = {\n") + cfg.write(" \"dev\", \"./client_ryzom_r.exe\", \"./\" \n") + cfg.write("};\n") + cfg.flush() + cfg.close() + printLog(log, "") + +printLog(log, ">>> Install data <<<") +for category in InstallClientData: + if (category["UnpackTo"] != None): + printLog(log, "CATEGORY " + category["Name"]) + targetPath = ClientDevDirectory + targetPathLive = ClientDevLiveDirectory + if (category["UnpackTo"] != ""): + targetPath += "/" + category["UnpackTo"] + targetPathLive += "/" + category["UnpackTo"] + mkPath(log, targetPath) + mkPath(log, targetPathLive) + for package in category["Packages"]: + printLog(log, "PACKAGE " + package[0]) + mkPath(log, InstallDirectory + "/" + package[0]) + if "exedll" in package[0]: + if package[0] == "exedll": # or package[0] == platformExeDll # TODO: 64-bit and Linux separation of exedll, only include one + copyFileIfNeeded(log, InstallDirectory + "/" + package[0] + "/client_default.cfg", targetPath) + copyFileIfNeeded(log, InstallDirectory + "/" + package[0] + "/client_default.cfg", targetPathLive) + else: + copyFilesNoTreeIfNeeded(log, InstallDirectory + "/" + package[0], targetPath) + copyFilesNoTreeIfNeeded(log, InstallDirectory + "/" + package[0], targetPathLive) +printLog(log, "") + +log.close() +if os.path.isfile("b1_client_dev.log"): + os.remove("b1_client_dev.log") +shutil.copy("log.log", time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + "_client_dev.log") +shutil.move("log.log", "b1_client_dev.log") diff --git a/code/nel/tools/build_gamedata/b2_shard_data.py b/code/nel/tools/build_gamedata/b2_shard_data.py old mode 100755 new mode 100644 index f0a50cfdf..5416e06c3 --- a/code/nel/tools/build_gamedata/b2_shard_data.py +++ b/code/nel/tools/build_gamedata/b2_shard_data.py @@ -1,93 +1,93 @@ -#!/usr/bin/python -# -# \file b2_shard_data.py -# \brief Install shard data -# \date 2009-02-18 16:19GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Install shard data -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from tools import * - -sys.path.append(WorkspaceDirectory) -from projects import * - -# Log error -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Install shard data") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -for dir in InstallShardDataDirectories: - printLog(log, "SHARD PACKAGE " + dir) - mkPath(log, ShardInstallDirectory + "/" + dir) - printLog(log, "FROM " + dir) - mkPath(log, InstallDirectory + "/" + dir) - copyFilesNoTreeIfNeeded(log, InstallDirectory + "/" + dir, ShardInstallDirectory + "/" + dir) -for package in InstallShardDataFiles: - dstDir = package[0] - mkPath(log, ShardInstallDirectory + "/" + dstDir) - printLog(log, "SHARD PACKAGE " + dstDir) - copyFileListNoTreeIfNeeded(log, InstallDirectory, ShardInstallDirectory + "/" + dstDir, package[1]) -for multiDir in InstallShardDataMultiDirectories: - dstDir = multiDir[0] - mkPath(log, ShardInstallDirectory + "/" + dstDir) - printLog(log, "SHARD PACKAGE " + dstDir) - for srcDir in multiDir[1]: - printLog(log, "FROM " + srcDir) - mkPath(log, InstallDirectory + "/" + srcDir) - mkPath(log, ShardInstallDirectory + "/" + dstDir + "/" + srcDir) - copyFilesNoTreeIfNeeded(log, InstallDirectory + "/" + srcDir, ShardInstallDirectory + "/" + dstDir + "/" + srcDir) -for multiDir in InstallShardDataPrimitivesDirectories: - dstDir = multiDir[0] - mkPath(log, ShardInstallDirectory + "/" + dstDir) - printLog(log, "SHARD PACKAGE " + dstDir) - for srcDir in multiDir[1]: - printLog(log, "FROM PRIMITIVES " + srcDir) - mkPath(log, PrimitivesDirectory + "/" + srcDir) - mkPath(log, ShardInstallDirectory + "/" + dstDir + "/" + srcDir) - copyFilesNoTreeIfNeeded(log, PrimitivesDirectory + "/" + srcDir, ShardInstallDirectory + "/" + dstDir + "/" + srcDir) -for execDir in InstallShardDataExecutables: - dstDir = execDir[0] - mkPath(log, LinuxServiceExecutableDirectory) - mkPath(log, PatchmanCfgDefaultDirectory) - mkPath(log, InstallDirectory) - mkPath(log, ShardInstallDirectory + "/" + dstDir) - printLog(log, "SHARD PACKAGE " + dstDir) - copyFileIfNeeded(log, LinuxServiceExecutableDirectory + "/" + execDir[1][1], ShardInstallDirectory + "/" + dstDir + "/" + execDir[1][0]) - copyFileListNoTreeIfNeeded(log, PatchmanCfgDefaultDirectory, ShardInstallDirectory + "/" + dstDir, execDir[2]) - copyFileListNoTreeIfNeeded(log, InstallDirectory, ShardInstallDirectory + "/" + dstDir, execDir[3]) -printLog(log, "") - -log.close() -if os.path.isfile("b2_shard_data.log"): - os.remove("b2_shard_data.log") -shutil.copy("log.log", time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + "_shard_data.log") -shutil.move("log.log", "b2_shard_data.log") +#!/usr/bin/python +# +# \file b2_shard_data.py +# \brief Install shard data +# \date 2009-02-18 16:19GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Install shard data +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite_local import * +from tools import * + +sys.path.append(WorkspaceDirectory) +from projects import * + +# Log error +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Install shard data") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +for dir in InstallShardDataDirectories: + printLog(log, "SHARD PACKAGE " + dir) + mkPath(log, ShardInstallDirectory + "/" + dir) + printLog(log, "FROM " + dir) + mkPath(log, InstallDirectory + "/" + dir) + copyFilesNoTreeIfNeeded(log, InstallDirectory + "/" + dir, ShardInstallDirectory + "/" + dir) +for package in InstallShardDataFiles: + dstDir = package[0] + mkPath(log, ShardInstallDirectory + "/" + dstDir) + printLog(log, "SHARD PACKAGE " + dstDir) + copyFileListNoTreeIfNeeded(log, InstallDirectory, ShardInstallDirectory + "/" + dstDir, package[1]) +for multiDir in InstallShardDataMultiDirectories: + dstDir = multiDir[0] + mkPath(log, ShardInstallDirectory + "/" + dstDir) + printLog(log, "SHARD PACKAGE " + dstDir) + for srcDir in multiDir[1]: + printLog(log, "FROM " + srcDir) + mkPath(log, InstallDirectory + "/" + srcDir) + mkPath(log, ShardInstallDirectory + "/" + dstDir + "/" + srcDir) + copyFilesNoTreeIfNeeded(log, InstallDirectory + "/" + srcDir, ShardInstallDirectory + "/" + dstDir + "/" + srcDir) +for multiDir in InstallShardDataPrimitivesDirectories: + dstDir = multiDir[0] + mkPath(log, ShardInstallDirectory + "/" + dstDir) + printLog(log, "SHARD PACKAGE " + dstDir) + for srcDir in multiDir[1]: + printLog(log, "FROM PRIMITIVES " + srcDir) + mkPath(log, PrimitivesDirectory + "/" + srcDir) + mkPath(log, ShardInstallDirectory + "/" + dstDir + "/" + srcDir) + copyFilesNoTreeIfNeeded(log, PrimitivesDirectory + "/" + srcDir, ShardInstallDirectory + "/" + dstDir + "/" + srcDir) +for execDir in InstallShardDataExecutables: + dstDir = execDir[0] + mkPath(log, LinuxServiceExecutableDirectory) + mkPath(log, PatchmanCfgDefaultDirectory) + mkPath(log, InstallDirectory) + mkPath(log, ShardInstallDirectory + "/" + dstDir) + printLog(log, "SHARD PACKAGE " + dstDir) + copyFileIfNeeded(log, LinuxServiceExecutableDirectory + "/" + execDir[1][1], ShardInstallDirectory + "/" + dstDir + "/" + execDir[1][0]) + copyFileListNoTreeIfNeeded(log, PatchmanCfgDefaultDirectory, ShardInstallDirectory + "/" + dstDir, execDir[2]) + copyFileListNoTreeIfNeeded(log, InstallDirectory, ShardInstallDirectory + "/" + dstDir, execDir[3]) +printLog(log, "") + +log.close() +if os.path.isfile("b2_shard_data.log"): + os.remove("b2_shard_data.log") +shutil.copy("log.log", time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + "_shard_data.log") +shutil.move("log.log", "b2_shard_data.log") diff --git a/code/nel/tools/build_gamedata/c1_shard_patch.py b/code/nel/tools/build_gamedata/c1_shard_patch.py old mode 100755 new mode 100644 index b67b053a8..30cb88bb8 --- a/code/nel/tools/build_gamedata/c1_shard_patch.py +++ b/code/nel/tools/build_gamedata/c1_shard_patch.py @@ -1,114 +1,123 @@ -#!/usr/bin/python -# -# \file c1_shard_patch.py -# \brief Create a new patch for the patchman bridge -# \date 2014-02-20 00:27GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Create a new patch for the patchman bridge -# -# NeL - MMORPG Framework -# Copyright (C) 2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -import time, sys, os, shutil, subprocess, distutils.dir_util, tarfile, argparse -sys.path.append("configuration") - -parser = argparse.ArgumentParser(description='Ryzom Core - Build Gamedata - Shard Patch') -parser.add_argument('--admininstall', '-ai', action='store_true') -args = parser.parse_args() - -if os.path.isfile("log.log"): - os.remove("log.log") -log = open("log.log", "w") -from scripts import * -from buildsite import * -from tools import * - -sys.path.append(WorkspaceDirectory) -from projects import * - -# Log error -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Create a new patch for the patchman bridge") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -# List the directories that will be used -archiveDirectories = [ ] -for dir in InstallShardDataDirectories: - if not dir in archiveDirectories: - archiveDirectories += [ dir ] -for package in InstallShardDataFiles: - dstDir = package[0] - if not dstDir in archiveDirectories: - archiveDirectories += [ dstDir ] -for multiDir in InstallShardDataMultiDirectories: - dstDir = multiDir[0] - if not dstDir in archiveDirectories: - archiveDirectories += [ dstDir ] -for multiDir in InstallShardDataPrimitivesDirectories: - dstDir = multiDir[0] - if not dstDir in archiveDirectories: - archiveDirectories += [ dstDir ] -for execDir in InstallShardDataExecutables: - dstDir = execDir[0] - if not dstDir in archiveDirectories: - archiveDirectories += [ dstDir ] - -printLog(log, ">>> Archive new admin_install.tgz <<<") -mkPath(log, PatchmanBridgeServerDirectory) -adminInstallTgz = PatchmanBridgeServerDirectory + "/admin_install.tgz" -patchmanExecutable = LinuxServiceExecutableDirectory + "/ryzom_patchman_service" -if needUpdateDirNoSubdirFile(log, PatchmanCfgAdminDirectory + "/bin", adminInstallTgz) or needUpdateDirNoSubdirFile(log, PatchmanCfgAdminDirectory + "/patchman", adminInstallTgz) or needUpdate(log, patchmanExecutable, adminInstallTgz): - printLog(log, "WRITE " + adminInstallTgz) - if os.path.isfile(adminInstallTgz): - os.remove(adminInstallTgz) - tar = tarfile.open(adminInstallTgz, "w:gz") - tar.add(PatchmanCfgAdminDirectory + "/bin", arcname = "bin") - tar.add(PatchmanCfgAdminDirectory + "/patchman", arcname = "patchman") - tar.add(patchmanExecutable, arcname = "patchman/ryzom_patchman_service") - tar.close() -else: - printLog(log, "SKIP " + adminInstallTgz) -printLog(log, "") - -if not args.admininstall: - printLog(log, ">>> Create new version <<<") - newVersion = 1 - vstr = str(newVersion).zfill(6) - vpath = PatchmanBridgeServerDirectory + "/" + vstr - while os.path.exists(vpath): - newVersion = newVersion + 1 - vstr = str(newVersion).zfill(6) - vpath = PatchmanBridgeServerDirectory + "/" + vstr - mkPath(log, vpath) - for dir in archiveDirectories: - mkPath(log, ShardInstallDirectory + "/" + dir) - tgzPath = vpath + "/" + dir + ".tgz" - printLog(log, "WRITE " + tgzPath) - tar = tarfile.open(tgzPath, "w:gz") - tar.add(ShardInstallDirectory + "/" + dir, arcname = dir) - tar.close() - printLog(log, "") - -log.close() -if os.path.isfile("c1_shard_patch.log"): - os.remove("c1_shard_patch.log") -shutil.copy("log.log", time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + "_shard_patch.log") -shutil.move("log.log", "c1_shard_patch.log") +#!/usr/bin/python +# +# \file c1_shard_patch.py +# \brief Create a new patch for the patchman bridge +# \date 2014-02-20 00:27GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Create a new patch for the patchman bridge +# +# NeL - MMORPG Framework +# Copyright (C) 2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +import time, sys, os, shutil, subprocess, distutils.dir_util, tarfile, argparse +sys.path.append("configuration") + +parser = argparse.ArgumentParser(description='Ryzom Core - Build Gamedata - Shard Patch') +parser.add_argument('--admininstall', '-ai', action='store_true') +args = parser.parse_args() + +if os.path.isfile("log.log"): + os.remove("log.log") +log = open("log.log", "w") +from scripts import * +from buildsite_local import * +from tools import * + +sys.path.append(WorkspaceDirectory) +from projects import * + +# Log error +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Create a new patch for the patchman bridge") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +# Find tools +SevenZip = findTool(log, ToolDirectories, SevenZipTool, ToolSuffix) + +# List the directories that will be used +archiveDirectories = [ ] +for dir in InstallShardDataDirectories: + if not dir in archiveDirectories: + archiveDirectories += [ dir ] +for package in InstallShardDataFiles: + dstDir = package[0] + if not dstDir in archiveDirectories: + archiveDirectories += [ dstDir ] +for multiDir in InstallShardDataMultiDirectories: + dstDir = multiDir[0] + if not dstDir in archiveDirectories: + archiveDirectories += [ dstDir ] +for multiDir in InstallShardDataPrimitivesDirectories: + dstDir = multiDir[0] + if not dstDir in archiveDirectories: + archiveDirectories += [ dstDir ] +for execDir in InstallShardDataExecutables: + dstDir = execDir[0] + if not dstDir in archiveDirectories: + archiveDirectories += [ dstDir ] + +printLog(log, ">>> Archive new admin_install.tgz <<<") +mkPath(log, PatchmanBridgeServerDirectory) +adminInstallTgz = PatchmanBridgeServerDirectory + "/admin_install.tgz" +patchmanExecutable = LinuxServiceExecutableDirectory + "/ryzom_patchman_service" +if needUpdateDirNoSubdirFile(log, PatchmanCfgAdminDirectory + "/bin", adminInstallTgz) or needUpdateDirNoSubdirFile(log, PatchmanCfgAdminDirectory + "/patchman", adminInstallTgz) or needUpdate(log, patchmanExecutable, adminInstallTgz): + printLog(log, "WRITE " + adminInstallTgz) + if os.path.isfile(adminInstallTgz): + os.remove(adminInstallTgz) + tar = tarfile.open(adminInstallTgz, "w:gz") + tar.add(PatchmanCfgAdminDirectory + "/bin", arcname = "bin") + tar.add(PatchmanCfgAdminDirectory + "/patchman", arcname = "patchman") + tar.add(patchmanExecutable, arcname = "patchman/ryzom_patchman_service") + tar.close() +else: + printLog(log, "SKIP " + adminInstallTgz) +printLog(log, "") + +if not args.admininstall: + if SevenZip == "": + toolLogFail(log, SevenZipTool, ToolSuffix) + else: + printLog(log, ">>> Create new version <<<") + newVersion = 1 + vstr = str(newVersion).zfill(6) + vpath = PatchmanBridgeServerDirectory + "/" + vstr + while os.path.exists(vpath): + newVersion = newVersion + 1 + vstr = str(newVersion).zfill(6) + vpath = PatchmanBridgeServerDirectory + "/" + vstr + mkPath(log, vpath) + for dir in archiveDirectories: + mkPath(log, ShardInstallDirectory + "/" + dir) + # tgzPath = vpath + "/" + dir + ".tgz" + # printLog(log, "WRITE " + tgzPath) + # tar = tarfile.open(tgzPath, "w:gz") + # tar.add(ShardInstallDirectory + "/" + dir, arcname = dir) + # tar.close() + sevenZipPath = vpath + "/" + dir + ".7z" + printLog(log, "WRITE " + sevenZipPath) + subprocess.call([ SevenZip, "a", sevenZipPath, ShardInstallDirectory + "/" + dir ]) + printLog(log, "") + +log.close() +if os.path.isfile("c1_shard_patch.log"): + os.remove("c1_shard_patch.log") +shutil.copy("log.log", time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + "_shard_patch.log") +shutil.move("log.log", "c1_shard_patch.log") diff --git a/code/nel/tools/build_gamedata/configuration/scripts.py b/code/nel/tools/build_gamedata/configuration/scripts.py old mode 100755 new mode 100644 index 5bbed497f..4dcfaaac5 --- a/code/nel/tools/build_gamedata/configuration/scripts.py +++ b/code/nel/tools/build_gamedata/configuration/scripts.py @@ -1,589 +1,610 @@ -#!/usr/bin/python -# -# \file export.py -# \brief Useful scripts -# \date 2009-02-18 09:22GMT -# \author Jan Boon (Kaetemi) -# Useful scripts -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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 - -def mkPath(log, path): - printLog(log, "DIR " + path) - distutils.dir_util.mkpath(path) - -def needUpdate(log, source, dest): - if (os.path.isfile(source)): - if (os.path.isfile(dest)): - if (os.stat(source).st_mtime > os.stat(dest).st_mtime): - return 1 - else: - return 0 - return 1 - printLog(log, "MISSING " + source) - return 0 - -def needUpdateRemoveDest(log, source, dest): - if (os.path.isfile(source)): - if (os.path.isfile(dest)): - if (os.stat(source).st_mtime > os.stat(dest).st_mtime): - os.remove(dest) - return 1 - else: - return 0 - return 1 - printLog(log, "MISSING " + source) - return 0 - -def needUpdateLogRemoveDest(log, source, dest): - if (os.path.isfile(source)): - if (os.path.isfile(dest)): - if (os.stat(source).st_mtime > os.stat(dest).st_mtime): - os.remove(dest) - printLog(log, source + " -> " + dest) - return 1 - else: - printLog(log, "SKIP " + dest) - return 0 - printLog(log, source + " -> " + dest) - return 1 - printLog(log, "MISSING " + source) - printLog(log, "SKIP " + dest) - return 0 - -def copyFileList(log, dir_source, dir_target, files): - for fileName in files: - if fileName != ".svn" and fileName != ".." and fileName != "." and fileName != "*.*": - if (os.path.isfile(dir_source + "/" + fileName)): - if needUpdateLogRemoveDest(log, dir_source + "/" + fileName, dir_target + "/" + fileName): - shutil.copy(dir_source + "/" + fileName, dir_target + "/" + fileName) - -def copyFileListLogless(log, dir_source, dir_target, files): - for fileName in files: - if fileName != ".svn" and fileName != ".." and fileName != "." and fileName != "*.*": - if (os.path.isfile(dir_source + "/" + fileName)): - if needUpdateRemoveDest(log, dir_source + "/" + fileName, dir_target + "/" + fileName): - shutil.copy(dir_source + "/" + fileName, dir_target + "/" + fileName) - -def copyFileListNoTree(log, dir_source, dir_target, files): - for fileName in files: - if fileName != ".svn" and fileName != ".." and fileName != "." and fileName != "*.*": - if (os.path.isfile(dir_source + "/" + fileName)): - printLog(log, dir_source + "/" + fileName + " -> " + dir_target + "/" + os.path.basename(fileName)) - shutil.copy(dir_source + "/" + fileName, dir_target + "/" + os.path.basename(fileName)) - -def copyFileListNoTreeIfNeeded(log, dir_source, dir_target, files): - for fileName in files: - if fileName != ".svn" and fileName != ".." and fileName != "." and fileName != "*.*": - if (os.path.isfile(dir_source + "/" + fileName)): - srcFile = dir_source + "/" + fileName - destFile = dir_target + "/" + os.path.basename(fileName) - if needUpdateLogRemoveDest(log, srcFile, destFile): - shutil.copy(srcFile, destFile) - -def removeFilesRecursive(log, dir_files): - files = os.listdir(dir_files) - for fileName in files: - if (fileName != ".svn" and fileName != ".." and fileName != "." and fileName != "*.*"): - if os.path.isdir(dir_files + "/" + fileName): - removeFilesRecursive(log, dir_files + "/" + fileName) - else: - printLog(log, "RM " + dir_files + "/" + fileName) - os.remove(dir_files + "/" + fileName) - -def removeFilesDirsRecursive(log, dir_files): - files = os.listdir(dir_files) - for fileName in files: - if (fileName != ".svn" and fileName != ".." and fileName != "." and fileName != "*.*"): - if os.path.isdir(dir_files + "/" + fileName): - removeFilesRecursive(log, dir_files + "/" + fileName) - else: - printLog(log, "RM " + dir_files + "/" + fileName) - os.remove(dir_files + "/" + fileName) - printLog(log, "RMDIR " + dir_files) - os.rmdir(dir_files) - -def removeFilesRecursiveExt(log, dir_files, file_ext): - files = os.listdir(dir_files) - len_file_ext = len(file_ext) - for fileName in files: - if (fileName != ".svn" and fileName != ".." and fileName != "." and fileName != "*.*"): - if os.path.isdir(dir_files + "/" + fileName): - removeFilesRecursiveExt(log, dir_files + "/" + fileName, file_ext) - elif (fileName[-len_file_ext:].lower() == file_ext.lower()): - printLog(log, "RM " + dir_files + "/" + fileName) - os.remove(dir_files + "/" + fileName) - -def copyFilesRecursive(log, dir_source, dir_target): - files = os.listdir(dir_source) - mkPath(log, dir_target) - for fileName in files: - if (fileName != ".svn" and fileName != ".." and fileName != "." and fileName != "*.*"): - if os.path.isdir(dir_source + "/" + fileName): - copyFilesRecursive(log, dir_source + "/" + fileName, dir_target + "/" + fileName) - else: - printLog(log, dir_source + "/" + fileName + " -> " + dir_target + "/" + fileName) - shutil.copy(dir_source + "/" + fileName, dir_target + "/" + fileName) - -def copyFiles(log, dir_source, dir_target): - copyFileList(log, dir_source, dir_target, os.listdir(dir_source)) - -def copyFilesLogless(log, dir_source, dir_target): - copyFileListLogless(log, dir_source, dir_target, os.listdir(dir_source)) - -def copyFilesExt(log, dir_source, dir_target, file_ext): - files = os.listdir(dir_source) - len_file_ext = len(file_ext) - for fileName in files: - if (fileName != ".svn" and fileName != ".." and fileName != "." and fileName != "*.*") and (fileName[-len_file_ext:].lower() == file_ext.lower()): - if (os.path.isfile(dir_source + "/" + fileName)): - printLog(log, dir_source + "/" + fileName + " -> " + dir_target + "/" + fileName) - shutil.copy(dir_source + "/" + fileName, dir_target + "/" + fileName) - -def copyFilesRenamePrefixExt(log, dir_source, dir_target, old_prefix, new_prefix, file_ext): - files = os.listdir(dir_source) - len_file_ext = len(file_ext) - len_prefix = len(old_prefix) - for fileName in files: - if (fileName != ".svn" and fileName != ".." and fileName != "." and fileName != "*.*") and (fileName[-len_file_ext:].lower() == file_ext.lower()) and ((fileName[:len_prefix].lower() == old_prefix.lower())): - if (os.path.isfile(dir_source + "/" + fileName)): - printLog(log, dir_source + "/" + fileName + " -> " + dir_target + "/" + new_prefix + fileName[-(len(fileName) - len_prefix):]) - shutil.copy(dir_source + "/" + fileName, dir_target + "/" + new_prefix + fileName[-(len(fileName) - len_prefix):]) - -def copyFilesExtNoSubdir(log, dir_source, dir_target, file_ext): - files = findFilesNoSubdir(log, dir_source, file_ext) - copyFileListNoTree(log, dir_source, dir_target, files) - -def copyFilesExtNoTree(log, dir_source, dir_target, file_ext): - files = findFiles(log, dir_source, "", file_ext) - copyFileListNoTree(log, dir_source, dir_target, files) - -def copyFilesExtNoTreeIfNeeded(log, dir_source, dir_target, file_ext): - files = findFiles(log, dir_source, "", file_ext) - copyFileListNoTreeIfNeeded(log, dir_source, dir_target, files) - -def copyFilesExtNoSubdirIfNeeded(log, dir_source, dir_target, file_ext): - files = findFilesNoSubdir(log, dir_source, file_ext) - copyFileListNoTreeIfNeeded(log, dir_source, dir_target, files) - -def copyFilesNoTreeIfNeeded(log, dir_source, dir_target): - copyFileListNoTreeIfNeeded(log, dir_source, dir_target, os.listdir(dir_source)) - -def copyFilesRecursiveNoTreeIfNeeded(log, dir_source, dir_target): - files = findFilesRecursive(log, dir_source, "") - copyFileListNoTreeIfNeeded(log, dir_source, dir_target, files) - -def copyFileListExtReplaceNoTreeIfNeeded(log, dir_source, dir_target, files, file_ext, target_ext): - for fileName in files: - if fileName != ".svn" and fileName != ".." and fileName != "." and fileName != "*.*": - if (os.path.isfile(dir_source + "/" + fileName)): - srcFile = dir_source + "/" + fileName - destFile = dir_target + "/" + os.path.basename(fileName)[0:-len(file_ext)] + target_ext - if needUpdateLogRemoveDest(log, srcFile, destFile): - shutil.copy(srcFile, destFile) - -def copyFilesExtReplaceNoTreeIfNeeded(log, dir_source, dir_target, file_ext, target_ext): - files = findFiles(log, dir_source, "", file_ext) - copyFileListExtReplaceNoTreeIfNeeded(log, dir_source, dir_target, files, file_ext, target_ext) - -def copyFileIfNeeded(log, srcFile, destFile): - if needUpdateLogRemoveDest(log, srcFile, destFile): - shutil.copy(srcFile, destFile) - -def moveFileListNoTree(log, dir_source, dir_target, files): - for fileName in files: - if fileName != ".svn" and fileName != ".." and fileName != "." and fileName != "*.*": - if (os.path.isfile(dir_source + "/" + fileName)): - printLog(log, "MOVE " + dir_source + "/" + fileName + " -> " + dir_target + "/" + os.path.basename(fileName)) - shutil.move(dir_source + "/" + fileName, dir_target + "/" + os.path.basename(fileName)) - -def moveFilesExtNoTree(log, dir_source, dir_target, file_ext): - files = findFiles(log, dir_source, "", file_ext) - moveFileListNoTree(log, dir_source, dir_target, files) - -def moveFilesNoSubdir(log, dir_source, dir_target): - files = os.listdir(dir_source) - moveFileListNoTree(log, dir_source, dir_target, files) - -def moveDir(log, dir_source, dir_target): - printLog(log, "MOVE " + dir_source + " -> " + dir_target) - shutil.move(dir_source, dir_target) - -def findFilesRecursive(log, dir_where, dir_sub): - result = [ ] - files = os.listdir(dir_where + "/" + dir_sub) - for fileName in files: - if fileName != ".svn" and fileName != ".." and fileName != "." and fileName != "*.*": - filePath = dir_sub + fileName - fileFull = dir_where + "/" + dir_sub + fileName - if os.path.isfile(fileFull): - result += [ filePath ] - elif os.path.isdir(fileFull): - result += findFilesRecursive(log, dir_where, filePath + "/") - else: - printLog(log, "findFilesRecursive: file not dir or file?!" + filePath) - return result - -def findFiles(log, dir_where, dir_sub, file_ext): - result = [ ] - files = os.listdir(dir_where + "/" + dir_sub) - len_file_ext = len(file_ext) - for fileName in files: - if fileName != ".svn" and fileName != ".." and fileName != "." and fileName != "*.*": - filePath = dir_sub + fileName - fileFull = dir_where + "/" + dir_sub + fileName - if os.path.isfile(fileFull): - if fileName[-len_file_ext:].lower() == file_ext.lower(): - result += [ filePath ] - elif os.path.isdir(fileFull): - result += findFiles(log, dir_where, filePath + "/", file_ext) - else: - printLog(log, "findFiles: file not dir or file?!" + filePath) - return result - -def isLegalFileName(fileName): - return fileName != ".svn" and fileName != ".." and fileName != "." and fileName != "*.*" - -def findFilesNoSubdir(log, dir_where, file_ext): - result = [ ] - files = os.listdir(dir_where) - len_file_ext = len(file_ext) - for fileName in files: - if fileName != ".svn" and fileName != ".." and fileName != "." and fileName != "*.*": - fileFull = dir_where + "/" + fileName - if os.path.isfile(fileFull): - if fileName[-len_file_ext:].lower() == file_ext.lower(): - result += [ fileName ] - elif not os.path.isdir(fileFull): - printLog(log, "findFilesNoSubdir: file not dir or file?!" + fileFull) - return result - -def findFilesNoSubdirFiltered(log, dir_where, file_ext, filter): - if len(filter) == 0: - return findFilesNoSubdir(log, dir_where, file_ext) - result = [ ] - files = os.listdir(dir_where) - len_file_ext = len(file_ext) - for fileName in files: - if fileName != ".svn" and fileName != ".." and fileName != "." and fileName != "*.*": - fileFull = dir_where + "/" + fileName - if os.path.isfile(fileFull): - if fileName[-len_file_ext:].lower() == file_ext.lower(): - fileNameLower = fileName.lower() - for filterWord in filter: - if filterWord in fileNameLower: - result += [ fileName ] - break - elif not os.path.isdir(fileFull): - printLog(log, "findFilesNoSubdir: file not dir or file?!" + fileFull) - return result - -def findFile(log, dir_where, file_name): - files = os.listdir(dir_where) - for fileName in files: - if fileName != ".svn" and fileName != ".." and fileName != "." and fileName != "*.*": - filePath = dir_where + "/" + fileName - if os.path.isfile(filePath): - if fileName == file_name: - return filePath - elif os.path.isdir(filePath): - result = findFile(log, filePath, file_name) - if result != "": - return result - else: - printLog(log, "findFile: file not dir or file?! " + filePath) - return "" - -def needUpdateDirByLowercaseTagLog(log, dir_source, ext_source, dir_dest, ext_dest): - updateCount = 0 - skipCount = 0 - lenSrcExt = len(ext_source) - sourceFiles = findFilesNoSubdir(log, dir_source, ext_source) - destFiles = findFilesNoSubdir(log, dir_dest, ext_dest) - for file in sourceFiles: - sourceFile = dir_source + "/" + file - tagFile = dir_dest + "/" + file[0:-lenSrcExt].lower() + ext_dest - if os.path.isfile(tagFile): - sourceTime = os.stat(sourceFile).st_mtime - tagTime = os.stat(tagFile).st_mtime - if (sourceTime > tagTime): - updateCount = updateCount + 1 - else: - skipCount = skipCount + 1 - else: - updateCount = updateCount + 1 - if updateCount > 0: - printLog(log, "UPDATE " + str(updateCount) + " / " + str(len(sourceFiles)) + "; SKIP " + str(skipCount) + " / " + str(len(sourceFiles)) + "; DEST " + str(len(destFiles))) - return 1 - else: - printLog(log, "SKIP " + str(skipCount) + " / " + str(len(sourceFiles)) + "; DEST " + str(len(destFiles))) - return 0 - -def needUpdateDirByTagLogFiltered(log, dir_source, ext_source, dir_dest, ext_dest, filter): - updateCount = 0 - skipCount = 0 - lenSrcExt = len(ext_source) - sourceFiles = findFilesNoSubdirFiltered(log, dir_source, ext_source, filter) - destFiles = findFilesNoSubdir(log, dir_dest, ext_dest) - for file in sourceFiles: - sourceFile = dir_source + "/" + file - tagFile = dir_dest + "/" + file[0:-lenSrcExt] + ext_dest - if os.path.isfile(tagFile): - sourceTime = os.stat(sourceFile).st_mtime - tagTime = os.stat(tagFile).st_mtime - if (sourceTime > tagTime): - updateCount = updateCount + 1 - else: - skipCount = skipCount + 1 - else: - updateCount = updateCount + 1 - if updateCount > 0: - printLog(log, "UPDATE " + str(updateCount) + " / " + str(len(sourceFiles)) + "; SKIP " + str(skipCount) + " / " + str(len(sourceFiles)) + "; DEST " + str(len(destFiles))) - return 1 - else: - printLog(log, "SKIP " + str(skipCount) + " / " + str(len(sourceFiles)) + "; DEST " + str(len(destFiles))) - return 0 - -def needUpdateDirByTagLog(log, dir_source, ext_source, dir_dest, ext_dest): - updateCount = 0 - skipCount = 0 - lenSrcExt = len(ext_source) - sourceFiles = findFilesNoSubdir(log, dir_source, ext_source) - destFiles = findFilesNoSubdir(log, dir_dest, ext_dest) - for file in sourceFiles: - sourceFile = dir_source + "/" + file - tagFile = dir_dest + "/" + file[0:-lenSrcExt] + ext_dest - if os.path.isfile(tagFile): - sourceTime = os.stat(sourceFile).st_mtime - tagTime = os.stat(tagFile).st_mtime - if (sourceTime > tagTime): - updateCount = updateCount + 1 - else: - skipCount = skipCount + 1 - else: - updateCount = updateCount + 1 - if updateCount > 0: - printLog(log, "UPDATE " + str(updateCount) + " / " + str(len(sourceFiles)) + "; SKIP " + str(skipCount) + " / " + str(len(sourceFiles)) + "; DEST " + str(len(destFiles))) - return 1 - else: - printLog(log, "SKIP " + str(skipCount) + " / " + str(len(sourceFiles)) + "; DEST " + str(len(destFiles))) - return 0 - -def needUpdateDirNoSubdirFile(log, dir_source, file_dest): - if not os.path.isfile(file_dest): - return 1 - destTime = os.stat(file_dest).st_mtime - sourceFiles = os.listdir(dir_source) - for file in sourceFiles: - filePath = dir_source + "/" + file - if os.path.isfile(filePath): - fileTime = os.stat(filePath).st_mtime - if fileTime > destTime: - return 1 - else: - return 0 - -def needUpdateFileDirNoSubdir(log, file_source, dir_dest): - if not os.path.isfile(file_source): - printLog(log, "WARNING MISSING " + file_source) - return 0 - sourceTime = os.stat(file_source).st_mtime - destFiles = os.listdir(dir_dest) - for file in destFiles: - filePath = dir_dest + "/" + file - if os.path.isfile(filePath): - fileTime = os.stat(filePath).st_mtime - if sourceTime > fileTime: - return 1 - else: - return 0 - -def needUpdateDirNoSubdirMultiFile(log, dir_source, root_file, files_dest): - for file_dest in files_dest: - if needUpdateDirNoSubdirFile(log, dir_source, root_file + "/" + file_dest): - return 1 - return 0 - -def needUpdateDirNoSubdirMultiFileExt(log, dir_source, root_file, files_dest, file_ext): - for file_dest in files_dest: - if needUpdateDirNoSubdirFile(log, dir_source, root_file + "/" + file_dest + file_ext): - return 1 - return 0 - -def needUpdateMultiDirNoSubdirFile(log, root_dir, dirs_source, file_dest): - for dir_source in dirs_source: - if needUpdateDirNoSubdirFile(log, root_dir + "/" + dir_source, file_dest): - return 1 - return 0 - -def needUpdateMultiDirNoSubdirMultiFileExt(log, root_dir, dirs_source, root_file, files_dest, file_ext): - for file_dest in files_dest: - if needUpdateMultiDirNoSubdirFile(log, root_dir, dirs_source, root_file + "/" + file_dest + file_ext): - return 1 - return 0 - -def needUpdateMultiDirNoSubdir(log, root_dir, dirs_source, dir_dest): - for dir_source in dirs_source: - if needUpdateDirNoSubdir(log, root_dir + "/" + dir_source, dir_dest): - return 1 - return 0 - -def needUpdateDirNoSubdirExtFile(log, dir_source, dir_ext, file_dest): - if not os.path.isfile(file_dest): - return 1 - destTime = os.stat(file_dest).st_mtime - sourceFiles = os.listdir(dir_source) - for file in sourceFiles: - if file.endswith(dir_ext): - filePath = dir_source + "/" + file - if os.path.isfile(filePath): - fileTime = os.stat(filePath).st_mtime - if fileTime > destTime: - return 1 - else: - return 0 - -def needUpdateDirNoSubdirExtMultiFileExt(log, dir_source, dir_ext, root_file, files_dest, file_ext): - for file_dest in files_dest: - if needUpdateDirNoSubdirExtFile(log, dir_source, dir_ext, root_file + "/" + file_dest + file_ext): - return 1 - return 0 - -def needUpdateDirNoSubdir(log, dir_source, dir_dest): - latestSourceFile = 0 - oldestDestFile = 0 - sourceFiles = os.listdir(dir_source) - destFiles = os.listdir(dir_dest) - for file in sourceFiles: - filePath = dir_source + "/" + file - if os.path.isfile(filePath): - fileTime = os.stat(filePath).st_mtime - if fileTime > latestSourceFile: - latestSourceFile = fileTime - for file in destFiles: - filePath = dir_dest + "/" + file - if os.path.isfile(filePath): - fileTime = os.stat(filePath).st_mtime - if oldestDestFile == 0 or fileTime < oldestDestFile: - oldestDestFile = fileTime - if latestSourceFile > oldestDestFile: - return 1 - else: - return 0 - -def needUpdateDirNoSubdirLogExt(log, dir_source, ext_source, dir_dest, ext_dest): - latestSourceFile = 0 - latestDestFile = 0 - sourceFiles = findFilesNoSubdir(log, dir_source, ext_source) - destFiles = findFilesNoSubdir(log, dir_dest, ext_dest) - for file in sourceFiles: - fileTime = os.stat(dir_source + "/" + file).st_mtime - if (fileTime > latestSourceFile): - latestSourceFile = fileTime - for file in destFiles: - fileTime = os.stat(dir_dest + "/" + file).st_mtime - if (fileTime > latestDestFile): - latestDestFile = fileTime - if latestSourceFile > latestDestFile or len(sourceFiles) > len(destFiles): - printLog(log, "UPDATE; Source: " + str(latestSourceFile) + ", " + str(len(sourceFiles)) + " files; Dest: " + str(latestDestFile) + ", " + str(len(destFiles)) + " files") - return 1 - else: - printLog(log, "SKIP *") - return 0 - -def needUpdateDirNoSubdirLogExtMultidir(log, all_dir_base, all_dir_source, dir_source, ext_source, dir_dest, ext_dest): - latestSourceFile = 0 - latestDestFile = 0 - sourceFilesAll = [ ] - for dir in all_dir_source: - sourceFilesAll += findFilesNoSubdir(log, all_dir_base + "/" + dir, ext_source) - sourceFiles = findFilesNoSubdir(log, dir_source, ext_source) - destFiles = findFilesNoSubdir(log, dir_dest, ext_dest) - for file in sourceFiles: - fileTime = os.stat(dir_source + "/" + file).st_mtime - if (fileTime > latestSourceFile): - latestSourceFile = fileTime - for file in destFiles: - fileTime = os.stat(dir_dest + "/" + file).st_mtime - if (fileTime > latestDestFile): - latestDestFile = fileTime - if latestSourceFile > latestDestFile or len(sourceFilesAll) > len(destFiles): - printLog(log, "UPDATE; Source: " + str(latestSourceFile) + ", " + str(len(sourceFilesAll)) + " files; Dest: " + str(latestDestFile) + ", " + str(len(destFiles)) + " files") - return 1 - else: - printLog(log, "SKIP *") - return 0 - -def findFileMultiDir(log, dirs_where, file_name): - try: - for dir in dirs_where: - if dir != "": - file = findFile(log, dir, file_name) - if file != "": - return file - except Exception, e: - printLog(log, "EXCEPTION " + str(e)) - printLog(log, "FILE NOT FOUND " + file_name) - return "" - -def findTool(log, dirs_where, file_name, suffix): - try: - for dir in dirs_where: - if dir != "": - tool = findFile(log, dir, file_name + suffix) - if tool != "": - printLog(log, "TOOL " + tool) - return tool - except Exception, e: - printLog(log, "EXCEPTION " + str(e)) - printLog(log, "TOOL NOT FOUND " + file_name + suffix) - return "" - -def findMax(log, dir, file): - tool = dir + "/" + file - if os.path.isfile(tool): - printLog(log, "3DSMAX " + tool) - return tool - printLog(log, "3DSMAX NOT FOUND " + file) - return "" - -def toolLogFail(log, tool, suffix): - printLog(log, "FAIL " + tool + suffix + " is not found") - -def askVar(log, name, default): - sys.stdout.write(name + " (" + default + "): ") - line = sys.stdin.readline() - linestrip = line.strip() - if linestrip == "--": - log.write(name + " (" + default + "): ''\n") - return "" - elif linestrip == "": - log.write(name + " (" + default + "): '" + default + "'\n") - return default - else: - log.write(name + " (" + default + "): '" + linestrip + "'\n") - return linestrip +#!/usr/bin/python +# +# \file export.py +# \brief Useful scripts +# \date 2009-02-18 09:22GMT +# \author Jan Boon (Kaetemi) +# Useful scripts +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +import time, sys, os, shutil, subprocess, distutils.dir_util, multiprocessing, math + +ActiveProjectDirectory = os.getenv("NELBUILDACTIVEPROJECT", "configuration/project") +sys.path.append(ActiveProjectDirectory) + +def printLog(log, text): + log.write(text + "\n") + print text + +pendingProcesses = [] +processLimit = math.ceil(multiprocessing.cpu_count() * 0.75) + +def callParallelProcess(command): + res = 0 + if len(pendingProcesses) >= processLimit: + waitingProc = pendingProcesses.pop(0) + res = waitingProc.wait() + proc = subprocess.Popen(command) + pendingProcesses.append(proc) + return res + +def flushParallelProcesses(): + res = 0 + while (len(pendingProcesses) > 0): + waitingProc = pendingProcesses.pop(0) + procRes = waitingProc.wait() + if procRes != 0: + res = procRes + return res + +def mkPath(log, path): + printLog(log, "DIR " + path) + distutils.dir_util.mkpath(path) + +def needUpdate(log, source, dest): + if (os.path.isfile(source)): + if (os.path.isfile(dest)): + if (os.stat(source).st_mtime > os.stat(dest).st_mtime): + return 1 + else: + return 0 + return 1 + printLog(log, "MISSING " + source) + return 0 + +def needUpdateRemoveDest(log, source, dest): + if (os.path.isfile(source)): + if (os.path.isfile(dest)): + if (os.stat(source).st_mtime > os.stat(dest).st_mtime): + os.remove(dest) + return 1 + else: + return 0 + return 1 + printLog(log, "MISSING " + source) + return 0 + +def needUpdateLogRemoveDest(log, source, dest): + if (os.path.isfile(source)): + if (os.path.isfile(dest)): + if (os.stat(source).st_mtime > os.stat(dest).st_mtime): + os.remove(dest) + printLog(log, source + " -> " + dest) + return 1 + else: + printLog(log, "SKIP " + dest) + return 0 + printLog(log, source + " -> " + dest) + return 1 + printLog(log, "MISSING " + source) + printLog(log, "SKIP " + dest) + return 0 + +def copyFileList(log, dir_source, dir_target, files): + for fileName in files: + if fileName != ".svn" and fileName != ".." and fileName != "." and fileName != "*.*": + if (os.path.isfile(dir_source + "/" + fileName)): + if needUpdateLogRemoveDest(log, dir_source + "/" + fileName, dir_target + "/" + fileName): + shutil.copy(dir_source + "/" + fileName, dir_target + "/" + fileName) + +def copyFileListLogless(log, dir_source, dir_target, files): + for fileName in files: + if fileName != ".svn" and fileName != ".." and fileName != "." and fileName != "*.*": + if (os.path.isfile(dir_source + "/" + fileName)): + if needUpdateRemoveDest(log, dir_source + "/" + fileName, dir_target + "/" + fileName): + shutil.copy(dir_source + "/" + fileName, dir_target + "/" + fileName) + +def copyFileListNoTree(log, dir_source, dir_target, files): + for fileName in files: + if fileName != ".svn" and fileName != ".." and fileName != "." and fileName != "*.*": + if (os.path.isfile(dir_source + "/" + fileName)): + printLog(log, dir_source + "/" + fileName + " -> " + dir_target + "/" + os.path.basename(fileName)) + shutil.copy(dir_source + "/" + fileName, dir_target + "/" + os.path.basename(fileName)) + +def copyFileListNoTreeIfNeeded(log, dir_source, dir_target, files): + for fileName in files: + if fileName != ".svn" and fileName != ".." and fileName != "." and fileName != "*.*": + if (os.path.isfile(dir_source + "/" + fileName)): + srcFile = dir_source + "/" + fileName + destFile = dir_target + "/" + os.path.basename(fileName) + if needUpdateLogRemoveDest(log, srcFile, destFile): + shutil.copy(srcFile, destFile) + +def removeFilesRecursive(log, dir_files): + files = os.listdir(dir_files) + for fileName in files: + if (fileName != ".svn" and fileName != ".." and fileName != "." and fileName != "*.*"): + if os.path.isdir(dir_files + "/" + fileName): + removeFilesRecursive(log, dir_files + "/" + fileName) + else: + printLog(log, "RM " + dir_files + "/" + fileName) + os.remove(dir_files + "/" + fileName) + +def removeFilesDirsRecursive(log, dir_files): + files = os.listdir(dir_files) + for fileName in files: + if (fileName != ".svn" and fileName != ".." and fileName != "." and fileName != "*.*"): + if os.path.isdir(dir_files + "/" + fileName): + removeFilesRecursive(log, dir_files + "/" + fileName) + else: + printLog(log, "RM " + dir_files + "/" + fileName) + os.remove(dir_files + "/" + fileName) + printLog(log, "RMDIR " + dir_files) + os.rmdir(dir_files) + +def removeFilesRecursiveExt(log, dir_files, file_ext): + files = os.listdir(dir_files) + len_file_ext = len(file_ext) + for fileName in files: + if (fileName != ".svn" and fileName != ".." and fileName != "." and fileName != "*.*"): + if os.path.isdir(dir_files + "/" + fileName): + removeFilesRecursiveExt(log, dir_files + "/" + fileName, file_ext) + elif (fileName[-len_file_ext:].lower() == file_ext.lower()): + printLog(log, "RM " + dir_files + "/" + fileName) + os.remove(dir_files + "/" + fileName) + +def copyFilesRecursive(log, dir_source, dir_target): + files = os.listdir(dir_source) + mkPath(log, dir_target) + for fileName in files: + if (fileName != ".svn" and fileName != ".." and fileName != "." and fileName != "*.*"): + if os.path.isdir(dir_source + "/" + fileName): + copyFilesRecursive(log, dir_source + "/" + fileName, dir_target + "/" + fileName) + else: + printLog(log, dir_source + "/" + fileName + " -> " + dir_target + "/" + fileName) + shutil.copy(dir_source + "/" + fileName, dir_target + "/" + fileName) + +def copyFiles(log, dir_source, dir_target): + copyFileList(log, dir_source, dir_target, os.listdir(dir_source)) + +def copyFilesLogless(log, dir_source, dir_target): + copyFileListLogless(log, dir_source, dir_target, os.listdir(dir_source)) + +def copyFilesExt(log, dir_source, dir_target, file_ext): + files = os.listdir(dir_source) + len_file_ext = len(file_ext) + for fileName in files: + if (fileName != ".svn" and fileName != ".." and fileName != "." and fileName != "*.*") and (fileName[-len_file_ext:].lower() == file_ext.lower()): + if (os.path.isfile(dir_source + "/" + fileName)): + printLog(log, dir_source + "/" + fileName + " -> " + dir_target + "/" + fileName) + shutil.copy(dir_source + "/" + fileName, dir_target + "/" + fileName) + +def copyFilesRenamePrefixExt(log, dir_source, dir_target, old_prefix, new_prefix, file_ext): + files = os.listdir(dir_source) + len_file_ext = len(file_ext) + len_prefix = len(old_prefix) + for fileName in files: + if (fileName != ".svn" and fileName != ".." and fileName != "." and fileName != "*.*") and (fileName[-len_file_ext:].lower() == file_ext.lower()) and ((fileName[:len_prefix].lower() == old_prefix.lower())): + if (os.path.isfile(dir_source + "/" + fileName)): + printLog(log, dir_source + "/" + fileName + " -> " + dir_target + "/" + new_prefix + fileName[-(len(fileName) - len_prefix):]) + shutil.copy(dir_source + "/" + fileName, dir_target + "/" + new_prefix + fileName[-(len(fileName) - len_prefix):]) + +def copyFilesExtNoSubdir(log, dir_source, dir_target, file_ext): + files = findFilesNoSubdir(log, dir_source, file_ext) + copyFileListNoTree(log, dir_source, dir_target, files) + +def copyFilesExtNoTree(log, dir_source, dir_target, file_ext): + files = findFiles(log, dir_source, "", file_ext) + copyFileListNoTree(log, dir_source, dir_target, files) + +def copyFilesExtNoTreeIfNeeded(log, dir_source, dir_target, file_ext): + files = findFiles(log, dir_source, "", file_ext) + copyFileListNoTreeIfNeeded(log, dir_source, dir_target, files) + +def copyFilesExtNoSubdirIfNeeded(log, dir_source, dir_target, file_ext): + files = findFilesNoSubdir(log, dir_source, file_ext) + copyFileListNoTreeIfNeeded(log, dir_source, dir_target, files) + +def copyFilesNoTreeIfNeeded(log, dir_source, dir_target): + copyFileListNoTreeIfNeeded(log, dir_source, dir_target, os.listdir(dir_source)) + +def copyFilesRecursiveNoTreeIfNeeded(log, dir_source, dir_target): + files = findFilesRecursive(log, dir_source, "") + copyFileListNoTreeIfNeeded(log, dir_source, dir_target, files) + +def copyFileListExtReplaceNoTreeIfNeeded(log, dir_source, dir_target, files, file_ext, target_ext): + for fileName in files: + if fileName != ".svn" and fileName != ".." and fileName != "." and fileName != "*.*": + if (os.path.isfile(dir_source + "/" + fileName)): + srcFile = dir_source + "/" + fileName + destFile = dir_target + "/" + os.path.basename(fileName)[0:-len(file_ext)] + target_ext + if needUpdateLogRemoveDest(log, srcFile, destFile): + shutil.copy(srcFile, destFile) + +def copyFilesExtReplaceNoTreeIfNeeded(log, dir_source, dir_target, file_ext, target_ext): + files = findFiles(log, dir_source, "", file_ext) + copyFileListExtReplaceNoTreeIfNeeded(log, dir_source, dir_target, files, file_ext, target_ext) + +def copyFileIfNeeded(log, srcFile, destFile): + if needUpdateLogRemoveDest(log, srcFile, destFile): + shutil.copy(srcFile, destFile) + +def moveFileListNoTree(log, dir_source, dir_target, files): + for fileName in files: + if fileName != ".svn" and fileName != ".." and fileName != "." and fileName != "*.*": + if (os.path.isfile(dir_source + "/" + fileName)): + printLog(log, "MOVE " + dir_source + "/" + fileName + " -> " + dir_target + "/" + os.path.basename(fileName)) + shutil.move(dir_source + "/" + fileName, dir_target + "/" + os.path.basename(fileName)) + +def moveFilesExtNoTree(log, dir_source, dir_target, file_ext): + files = findFiles(log, dir_source, "", file_ext) + moveFileListNoTree(log, dir_source, dir_target, files) + +def moveFilesNoSubdir(log, dir_source, dir_target): + files = os.listdir(dir_source) + moveFileListNoTree(log, dir_source, dir_target, files) + +def moveDir(log, dir_source, dir_target): + printLog(log, "MOVE " + dir_source + " -> " + dir_target) + shutil.move(dir_source, dir_target) + +def findFilesRecursive(log, dir_where, dir_sub): + result = [ ] + files = os.listdir(dir_where + "/" + dir_sub) + for fileName in files: + if fileName != ".svn" and fileName != ".." and fileName != "." and fileName != "*.*": + filePath = dir_sub + fileName + fileFull = dir_where + "/" + dir_sub + fileName + if os.path.isfile(fileFull): + result += [ filePath ] + elif os.path.isdir(fileFull): + result += findFilesRecursive(log, dir_where, filePath + "/") + else: + printLog(log, "findFilesRecursive: file not dir or file?!" + filePath) + return result + +def findFiles(log, dir_where, dir_sub, file_ext): + result = [ ] + files = os.listdir(dir_where + "/" + dir_sub) + len_file_ext = len(file_ext) + for fileName in files: + if fileName != ".svn" and fileName != ".." and fileName != "." and fileName != "*.*": + filePath = dir_sub + fileName + fileFull = dir_where + "/" + dir_sub + fileName + if os.path.isfile(fileFull): + if fileName[-len_file_ext:].lower() == file_ext.lower(): + result += [ filePath ] + elif os.path.isdir(fileFull): + result += findFiles(log, dir_where, filePath + "/", file_ext) + else: + printLog(log, "findFiles: file not dir or file?!" + filePath) + return result + +def isLegalFileName(fileName): + return fileName != ".svn" and fileName != ".." and fileName != "." and fileName != "*.*" + +def findFilesNoSubdir(log, dir_where, file_ext): + result = [ ] + files = os.listdir(dir_where) + len_file_ext = len(file_ext) + for fileName in files: + if fileName != ".svn" and fileName != ".." and fileName != "." and fileName != "*.*": + fileFull = dir_where + "/" + fileName + if os.path.isfile(fileFull): + if fileName[-len_file_ext:].lower() == file_ext.lower(): + result += [ fileName ] + elif not os.path.isdir(fileFull): + printLog(log, "findFilesNoSubdir: file not dir or file?!" + fileFull) + return result + +def findFilesNoSubdirFiltered(log, dir_where, file_ext, filter): + if len(filter) == 0: + return findFilesNoSubdir(log, dir_where, file_ext) + result = [ ] + files = os.listdir(dir_where) + len_file_ext = len(file_ext) + for fileName in files: + if fileName != ".svn" and fileName != ".." and fileName != "." and fileName != "*.*": + fileFull = dir_where + "/" + fileName + if os.path.isfile(fileFull): + if fileName[-len_file_ext:].lower() == file_ext.lower(): + fileNameLower = fileName.lower() + for filterWord in filter: + if filterWord in fileNameLower: + result += [ fileName ] + break + elif not os.path.isdir(fileFull): + printLog(log, "findFilesNoSubdir: file not dir or file?!" + fileFull) + return result + +def findFile(log, dir_where, file_name): + files = os.listdir(dir_where) + for fileName in files: + if fileName != ".svn" and fileName != ".." and fileName != "." and fileName != "*.*": + filePath = dir_where + "/" + fileName + if os.path.isfile(filePath): + if fileName == file_name: + return filePath + elif os.path.isdir(filePath): + result = findFile(log, filePath, file_name) + if result != "": + return result + else: + printLog(log, "findFile: file not dir or file?! " + filePath) + return "" + +def needUpdateDirByLowercaseTagLog(log, dir_source, ext_source, dir_dest, ext_dest): + updateCount = 0 + skipCount = 0 + lenSrcExt = len(ext_source) + sourceFiles = findFilesNoSubdir(log, dir_source, ext_source) + destFiles = findFilesNoSubdir(log, dir_dest, ext_dest) + for file in sourceFiles: + sourceFile = dir_source + "/" + file + tagFile = dir_dest + "/" + file[0:-lenSrcExt].lower() + ext_dest + if os.path.isfile(tagFile): + sourceTime = os.stat(sourceFile).st_mtime + tagTime = os.stat(tagFile).st_mtime + if (sourceTime > tagTime): + updateCount = updateCount + 1 + else: + skipCount = skipCount + 1 + else: + updateCount = updateCount + 1 + if updateCount > 0: + printLog(log, "UPDATE " + str(updateCount) + " / " + str(len(sourceFiles)) + "; SKIP " + str(skipCount) + " / " + str(len(sourceFiles)) + "; DEST " + str(len(destFiles))) + return 1 + else: + printLog(log, "SKIP " + str(skipCount) + " / " + str(len(sourceFiles)) + "; DEST " + str(len(destFiles))) + return 0 + +def needUpdateDirByTagLogFiltered(log, dir_source, ext_source, dir_dest, ext_dest, filter): + updateCount = 0 + skipCount = 0 + lenSrcExt = len(ext_source) + sourceFiles = findFilesNoSubdirFiltered(log, dir_source, ext_source, filter) + destFiles = findFilesNoSubdir(log, dir_dest, ext_dest) + for file in sourceFiles: + sourceFile = dir_source + "/" + file + tagFile = dir_dest + "/" + file[0:-lenSrcExt] + ext_dest + if os.path.isfile(tagFile): + sourceTime = os.stat(sourceFile).st_mtime + tagTime = os.stat(tagFile).st_mtime + if (sourceTime > tagTime): + updateCount = updateCount + 1 + else: + skipCount = skipCount + 1 + else: + updateCount = updateCount + 1 + if updateCount > 0: + printLog(log, "UPDATE " + str(updateCount) + " / " + str(len(sourceFiles)) + "; SKIP " + str(skipCount) + " / " + str(len(sourceFiles)) + "; DEST " + str(len(destFiles))) + return 1 + else: + printLog(log, "SKIP " + str(skipCount) + " / " + str(len(sourceFiles)) + "; DEST " + str(len(destFiles))) + return 0 + +def needUpdateDirByTagLog(log, dir_source, ext_source, dir_dest, ext_dest): + updateCount = 0 + skipCount = 0 + lenSrcExt = len(ext_source) + sourceFiles = findFilesNoSubdir(log, dir_source, ext_source) + destFiles = findFilesNoSubdir(log, dir_dest, ext_dest) + for file in sourceFiles: + sourceFile = dir_source + "/" + file + tagFile = dir_dest + "/" + file[0:-lenSrcExt] + ext_dest + if os.path.isfile(tagFile): + sourceTime = os.stat(sourceFile).st_mtime + tagTime = os.stat(tagFile).st_mtime + if (sourceTime > tagTime): + updateCount = updateCount + 1 + else: + skipCount = skipCount + 1 + else: + updateCount = updateCount + 1 + if updateCount > 0: + printLog(log, "UPDATE " + str(updateCount) + " / " + str(len(sourceFiles)) + "; SKIP " + str(skipCount) + " / " + str(len(sourceFiles)) + "; DEST " + str(len(destFiles))) + return 1 + else: + printLog(log, "SKIP " + str(skipCount) + " / " + str(len(sourceFiles)) + "; DEST " + str(len(destFiles))) + return 0 + +def needUpdateDirNoSubdirFile(log, dir_source, file_dest): + if not os.path.isfile(file_dest): + return 1 + destTime = os.stat(file_dest).st_mtime + sourceFiles = os.listdir(dir_source) + for file in sourceFiles: + filePath = dir_source + "/" + file + if os.path.isfile(filePath): + fileTime = os.stat(filePath).st_mtime + if fileTime > destTime: + return 1 + else: + return 0 + +def needUpdateFileDirNoSubdir(log, file_source, dir_dest): + if not os.path.isfile(file_source): + printLog(log, "WARNING MISSING " + file_source) + return 0 + sourceTime = os.stat(file_source).st_mtime + destFiles = os.listdir(dir_dest) + for file in destFiles: + filePath = dir_dest + "/" + file + if os.path.isfile(filePath): + fileTime = os.stat(filePath).st_mtime + if sourceTime > fileTime: + return 1 + else: + return 0 + +def needUpdateDirNoSubdirMultiFile(log, dir_source, root_file, files_dest): + for file_dest in files_dest: + if needUpdateDirNoSubdirFile(log, dir_source, root_file + "/" + file_dest): + return 1 + return 0 + +def needUpdateDirNoSubdirMultiFileExt(log, dir_source, root_file, files_dest, file_ext): + for file_dest in files_dest: + if needUpdateDirNoSubdirFile(log, dir_source, root_file + "/" + file_dest + file_ext): + return 1 + return 0 + +def needUpdateMultiDirNoSubdirFile(log, root_dir, dirs_source, file_dest): + for dir_source in dirs_source: + if needUpdateDirNoSubdirFile(log, root_dir + "/" + dir_source, file_dest): + return 1 + return 0 + +def needUpdateMultiDirNoSubdirMultiFileExt(log, root_dir, dirs_source, root_file, files_dest, file_ext): + for file_dest in files_dest: + if needUpdateMultiDirNoSubdirFile(log, root_dir, dirs_source, root_file + "/" + file_dest + file_ext): + return 1 + return 0 + +def needUpdateMultiDirNoSubdir(log, root_dir, dirs_source, dir_dest): + for dir_source in dirs_source: + if needUpdateDirNoSubdir(log, root_dir + "/" + dir_source, dir_dest): + return 1 + return 0 + +def needUpdateDirNoSubdirExtFile(log, dir_source, dir_ext, file_dest): + if not os.path.isfile(file_dest): + return 1 + destTime = os.stat(file_dest).st_mtime + sourceFiles = os.listdir(dir_source) + for file in sourceFiles: + if file.endswith(dir_ext): + filePath = dir_source + "/" + file + if os.path.isfile(filePath): + fileTime = os.stat(filePath).st_mtime + if fileTime > destTime: + return 1 + else: + return 0 + +def needUpdateDirNoSubdirExtMultiFileExt(log, dir_source, dir_ext, root_file, files_dest, file_ext): + for file_dest in files_dest: + if needUpdateDirNoSubdirExtFile(log, dir_source, dir_ext, root_file + "/" + file_dest + file_ext): + return 1 + return 0 + +def needUpdateDirNoSubdir(log, dir_source, dir_dest): + latestSourceFile = 0 + oldestDestFile = 0 + sourceFiles = os.listdir(dir_source) + destFiles = os.listdir(dir_dest) + for file in sourceFiles: + filePath = dir_source + "/" + file + if os.path.isfile(filePath): + fileTime = os.stat(filePath).st_mtime + if fileTime > latestSourceFile: + latestSourceFile = fileTime + for file in destFiles: + filePath = dir_dest + "/" + file + if os.path.isfile(filePath): + fileTime = os.stat(filePath).st_mtime + if oldestDestFile == 0 or fileTime < oldestDestFile: + oldestDestFile = fileTime + if latestSourceFile > oldestDestFile: + return 1 + else: + return 0 + +def needUpdateDirNoSubdirLogExt(log, dir_source, ext_source, dir_dest, ext_dest): + latestSourceFile = 0 + latestDestFile = 0 + sourceFiles = findFilesNoSubdir(log, dir_source, ext_source) + destFiles = findFilesNoSubdir(log, dir_dest, ext_dest) + for file in sourceFiles: + fileTime = os.stat(dir_source + "/" + file).st_mtime + if (fileTime > latestSourceFile): + latestSourceFile = fileTime + for file in destFiles: + fileTime = os.stat(dir_dest + "/" + file).st_mtime + if (fileTime > latestDestFile): + latestDestFile = fileTime + if latestSourceFile > latestDestFile or len(sourceFiles) > len(destFiles): + printLog(log, "UPDATE; Source: " + str(latestSourceFile) + ", " + str(len(sourceFiles)) + " files; Dest: " + str(latestDestFile) + ", " + str(len(destFiles)) + " files") + return 1 + else: + printLog(log, "SKIP *") + return 0 + +def needUpdateDirNoSubdirLogExtMultidir(log, all_dir_base, all_dir_source, dir_source, ext_source, dir_dest, ext_dest): + latestSourceFile = 0 + latestDestFile = 0 + sourceFilesAll = [ ] + for dir in all_dir_source: + sourceFilesAll += findFilesNoSubdir(log, all_dir_base + "/" + dir, ext_source) + sourceFiles = findFilesNoSubdir(log, dir_source, ext_source) + destFiles = findFilesNoSubdir(log, dir_dest, ext_dest) + for file in sourceFiles: + fileTime = os.stat(dir_source + "/" + file).st_mtime + if (fileTime > latestSourceFile): + latestSourceFile = fileTime + for file in destFiles: + fileTime = os.stat(dir_dest + "/" + file).st_mtime + if (fileTime > latestDestFile): + latestDestFile = fileTime + if latestSourceFile > latestDestFile or len(sourceFilesAll) > len(destFiles): + printLog(log, "UPDATE; Source: " + str(latestSourceFile) + ", " + str(len(sourceFilesAll)) + " files; Dest: " + str(latestDestFile) + ", " + str(len(destFiles)) + " files") + return 1 + else: + printLog(log, "SKIP *") + return 0 + +def findFileMultiDir(log, dirs_where, file_name): + try: + for dir in dirs_where: + if dir != "": + file = findFile(log, dir, file_name) + if file != "": + return file + except Exception, e: + printLog(log, "EXCEPTION " + str(e)) + printLog(log, "FILE NOT FOUND " + file_name) + return "" + +def findTool(log, dirs_where, file_name, suffix): + try: + for dir in dirs_where: + if dir != "": + tool = findFile(log, dir, file_name + suffix) + if tool != "": + printLog(log, "TOOL " + tool) + return tool + except Exception, e: + printLog(log, "EXCEPTION " + str(e)) + printLog(log, "TOOL NOT FOUND " + file_name + suffix) + return "" + +def findMax(log, dir, file): + tool = dir + "/" + file + if os.path.isfile(tool): + printLog(log, "3DSMAX " + tool) + return tool + printLog(log, "3DSMAX NOT FOUND " + file) + return "" + +def toolLogFail(log, tool, suffix): + printLog(log, "FAIL " + tool + suffix + " is not found") + +def askVar(log, name, default): + sys.stdout.write(name + " (" + default + "): ") + line = sys.stdin.readline() + linestrip = line.strip() + if linestrip == "--": + log.write(name + " (" + default + "): ''\n") + return "" + elif linestrip == "": + log.write(name + " (" + default + "): '" + default + "'\n") + return default + else: + log.write(name + " (" + default + "): '" + linestrip + "'\n") + return linestrip diff --git a/code/nel/tools/build_gamedata/configuration/tools.py b/code/nel/tools/build_gamedata/configuration/tools.py old mode 100755 new mode 100644 index ebb1d07da..cbf1e63f5 --- a/code/nel/tools/build_gamedata/configuration/tools.py +++ b/code/nel/tools/build_gamedata/configuration/tools.py @@ -1,100 +1,102 @@ -#!/usr/bin/python -# -# \file process.py -# \brief Tools configuration -# \date 2009-03-10 11:33GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Tools configuration. -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -# *** PROCESS TIMEOUT *** -SkelExportTimeout = 600000 -SwtExportTimeout = 600000 -ShapeExportTimeout = 3600000 -ZoneExportTimeout = 1800000 -ZoneBuildDependTimeout = 1800000 -ZoneBuildWeldTimeout = 60000 -ZoneLightBuildTimeout = 600000 -ZoneIgLightBuildTimeout = 600000 -SmallbankBuildTimeout = 60000 -FarbankBuildTimeout = 180000 -AnimExportTimeout = 1800000 -IgExportTimeout = 600000 -CmbExportTimeout = 60000 -RbankBuildTesselTimeout = 6000000 -RbankBuildSmoothTimeout = 6000000 -RbankBuildProclocalTimeout = 6000000 -RbankBuildProcglobalTimeout = 18000000 -RbankBuildIndoorTimeout = 18000000 -# WmapBuildTimeout = 60000 -LigoExportTimeout = 3600000 -LigoBuildTimeout = 1800000 -PacsPrimExportTimeout = 600000 - -MapsBuildTimeout = 60000 # 1min -MaxShapeExportTimeout = 600000 # 10min - -# *** TOOLS CONFIGURATION *** - -TgaToDdsTool = "tga2dds" -BuildInterfaceTool = "build_interface" -ExecTimeoutTool = "exec_timeout" -BuildSmallbankTool = "build_smallbank" -BuildFarbankTool = "build_far_bank" -ZoneDependenciesTool = "zone_dependencies" -ZoneWelderTool = "zone_welder" -ZoneElevationTool = "zone_elevation" -BuildRbankTool = "build_rbank" -BuildIndoorRbankTool = "build_indoor_rbank" -BuildIgBoxesTool = "build_ig_boxes" -GetNeighborsTool = "get_neighbors" -ZoneLighterTool = "zone_lighter" -ZoneIgLighterTool = "zone_ig_lighter" -IgLighterTool = "ig_lighter" -AnimBuilderTool = "anim_builder" -TileEditTool = "tile_edit" -# BuildImagesetTool = "th_build_imageset" # kaetemi stuff, ignore this -MakeSheetIdTool = "make_sheet_id" -# BuildSheetsTool = "th_build_sheets" # kaetemi stuff, ignore this -# BuildSoundTool = "th_build_sound" # kaetemi stuff, ignore this -# BuildSoundTool = "build_sound" -BuildSoundbankTool = "build_soundbank" -BuildSamplebankTool = "build_samplebank" -BuildCoarseMeshTool = "build_coarse_mesh" -LightmapOptimizerTool = "lightmap_optimizer" -BuildClodtexTool = "build_clodtex" -BuildShadowSkinTool = "build_shadow_skin" -PanoplyMakerTool = "panoply_maker" -HlsBankMakerTool = "hls_bank_maker" -LandExportTool = "land_export" -PrimExportTool = "prim_export" -IgElevationTool = "ig_elevation" -IgAddTool = "ig_add" -BuildClodBankTool = "build_clod_bank" -SheetsPackerTool = "sheets_packer" -SheetsPackerShardTool = "sheets_packer_shard" -BnpMakeTool = "bnp_make" -SnpMakeTool = "snp_make" -AiBuildWmapTool = "ai_build_wmap" -TgaCutTool = "tga_cut" -PatchGenTool = "patch_gen" -TranslationToolsTool = "translation_tools" -BuildWorldPackedColTool = "build_world_packed_col" -R2IslandsTexturesTool = "r2_islands_textures" +#!/usr/bin/python +# +# \file process.py +# \brief Tools configuration +# \date 2009-03-10 11:33GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Tools configuration. +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +# *** PROCESS TIMEOUT *** +SkelExportTimeout = 600000 +SwtExportTimeout = 600000 +ShapeExportTimeout = 3600000 +ZoneExportTimeout = 1800000 +ZoneBuildDependTimeout = 1800000 +ZoneBuildWeldTimeout = 60000 +ZoneLightBuildTimeout = 600000 +ZoneIgLightBuildTimeout = 600000 +SmallbankBuildTimeout = 60000 +FarbankBuildTimeout = 180000 +AnimExportTimeout = 1800000 +IgExportTimeout = 600000 +CmbExportTimeout = 60000 +RbankBuildTesselTimeout = 6000000 +RbankBuildSmoothTimeout = 6000000 +RbankBuildProclocalTimeout = 6000000 +RbankBuildProcglobalTimeout = 18000000 +RbankBuildIndoorTimeout = 18000000 +# WmapBuildTimeout = 60000 +LigoExportTimeout = 3600000 +LigoBuildTimeout = 1800000 +PacsPrimExportTimeout = 600000 + +MapsBuildTimeout = 60000 # 1min +MaxShapeExportTimeout = 600000 # 10min + +# *** TOOLS CONFIGURATION *** + +TgaToDdsTool = "tga2dds" +BuildInterfaceTool = "build_interface" +ExecTimeoutTool = "exec_timeout" +BuildSmallbankTool = "build_smallbank" +BuildFarbankTool = "build_far_bank" +ZoneDependenciesTool = "zone_dependencies" +ZoneWelderTool = "zone_welder" +ZoneElevationTool = "zone_elevation" +BuildRbankTool = "build_rbank" +BuildIndoorRbankTool = "build_indoor_rbank" +BuildIgBoxesTool = "build_ig_boxes" +GetNeighborsTool = "get_neighbors" +ZoneLighterTool = "zone_lighter" +ZoneIgLighterTool = "zone_ig_lighter" +IgLighterTool = "ig_lighter" +AnimBuilderTool = "anim_builder" +TileEditTool = "tile_edit" +# BuildImagesetTool = "th_build_imageset" # kaetemi stuff, ignore this +MakeSheetIdTool = "make_sheet_id" +# BuildSheetsTool = "th_build_sheets" # kaetemi stuff, ignore this +# BuildSoundTool = "th_build_sound" # kaetemi stuff, ignore this +# BuildSoundTool = "build_sound" +BuildSoundbankTool = "build_soundbank" +BuildSamplebankTool = "build_samplebank" +BuildCoarseMeshTool = "build_coarse_mesh" +LightmapOptimizerTool = "lightmap_optimizer" +BuildClodtexTool = "build_clodtex" +BuildShadowSkinTool = "build_shadow_skin" +PanoplyMakerTool = "panoply_maker" +HlsBankMakerTool = "hls_bank_maker" +LandExportTool = "land_export" +PrimExportTool = "prim_export" +IgElevationTool = "ig_elevation" +IgAddTool = "ig_add" +BuildClodBankTool = "build_clod_bank" +SheetsPackerTool = "sheets_packer" +SheetsPackerShardTool = "sheets_packer_shard" +BnpMakeTool = "bnp_make" +SnpMakeTool = "snp_make" +AiBuildWmapTool = "ai_build_wmap" +TgaCutTool = "tga_cut" +PatchGenTool = "patch_gen" +TranslationToolsTool = "translation_tools" +BuildWorldPackedColTool = "build_world_packed_col" +R2IslandsTexturesTool = "r2_islands_textures" +PatchmanServiceTool = "ryzom_patchman_service" +SevenZipTool = "7za" diff --git a/code/nel/tools/build_gamedata/d1_client_patch.py b/code/nel/tools/build_gamedata/d1_client_patch.py old mode 100755 new mode 100644 index ea4cc742c..608f24766 --- a/code/nel/tools/build_gamedata/d1_client_patch.py +++ b/code/nel/tools/build_gamedata/d1_client_patch.py @@ -1,172 +1,181 @@ -#!/usr/bin/python -# -# \file d1_client_patch.py -# \brief Install to client patch -# \date 2009-02-18 16:19GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Install to client patch -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -import time, sys, os, shutil, subprocess, distutils.dir_util, argparse -sys.path.append("configuration") - -parser = argparse.ArgumentParser(description='Ryzom Core - Build Gamedata - Client Patch') -parser.add_argument('--bnponly', '-bo', action='store_true') -args = parser.parse_args() - -if os.path.isfile("log.log"): - os.remove("log.log") -log = open("log.log", "w") -from scripts import * -from buildsite import * -from tools import * - -sys.path.append(WorkspaceDirectory) -from projects import * - -# Log error -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Install to client patch") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -# Find tools -BnpMake = findTool(log, ToolDirectories, BnpMakeTool, ToolSuffix) -SnpMake = findTool(log, ToolDirectories, SnpMakeTool, ToolSuffix); -PatchGen = findTool(log, ToolDirectories, PatchGenTool, ToolSuffix) -printLog(log, "") - -# Find **** HARDCODED **** WINDOWS **** tools ... TODO: fix patch_gen tool !!! -Lzma = findFileMultiDir(log, ToolDirectories + WindowsExeDllCfgDirectories, "lzma.exe") -printLog(log, "LZMA " + Lzma) -XDelta = findFileMultiDir(log, ToolDirectories + WindowsExeDllCfgDirectories, "xdelta.exe") -printLog(log, "XDELTA " + XDelta) -printLog(log, "") - -if BnpMake == "": - toolLogFail(log, BnpMakeTool, ToolSuffix) -elif PatchGen == "" and not args.bnponly: - toolLogFail(log, PatchGenTool, ToolSuffix) -elif Lzma == "" and not args.bnponly: - toolLogFail(log, "LZMA", ToolSuffix) -elif XDelta == "" and not args.bnponly: - toolLogFail(log, "XDELTA", ToolSuffix) -elif os.path.dirname(Lzma) != os.path.dirname(XDelta): - printLog(log, "FAIL lzma.exe and xdelta.exe must be in the same directory") -else: - mkPath(log, ClientPatchDirectory) - if not args.bnponly: - productXml = ClientPatchDirectory + "/" + ProductName + ".xml" - if not os.path.isfile(productXml): - printLog(log, ">>> Create new product <<<") - subprocess.call([ PatchGen, "createNewProduct", productXml ]) - printLog(log, "") - printLog(log, ">>> Rewrite " + ProductName + ".xml <<<") # because we know better. - shutil.move(productXml, productXml + ".old") - oldCfg = open(productXml + ".old", "r") - cfg = open(productXml, "w") - inCategories = 0 - for line in oldCfg: - if not inCategories: - if line.strip() == "<_Categories>": - inCategories = 1 - cfg.write("\t<_Categories>\n") - for category in InstallClientData: - packExt = ".bnp" - if (category["StreamedPackages"]): - packExt = ".snp" - cfg.write("\t\t<_Category>\n") - cfg.write("\t\t\t<_Name type=\"STRING\" value=\"" + category["Name"] + "\"/>\n") - if category["UnpackTo"] != None: - if category["UnpackTo"] != "": - cfg.write("\t\t\t<_UnpackTo type=\"STRING\" value=\"./" + category["UnpackTo"] + "/\"/>\n") - else: - cfg.write("\t\t\t<_UnpackTo type=\"STRING\" value=\"./\"/>\n") - cfg.write("\t\t\t<_IsOptional type=\"SINT32\" value=\"" + str(category["IsOptional"]) + "\"/>\n") - cfg.write("\t\t\t<_IsIncremental type=\"SINT32\" value=\"" + str(category["IsIncremental"]) + "\"/>\n") - for package in category["Packages"]: - if (len(package[1]) > 0): - cfg.write("\t\t\t<_Files type=\"STRING\" value=\"" + package[1][0] + "\"/>\n") - else: - cfg.write("\t\t\t<_Files type=\"STRING\" value=\"" + package[0] + packExt + "\"/>\n") - for ref in category["Refs"]: - cfg.write("\t\t\t<_Files type=\"STRING\" value=\"" + ref + "_.ref\"/>\n") - cfg.write("\t\t\n") - cfg.write("\t\n") - else: - cfg.write(line) - else: - if line.strip() == "": - inCategories = 0 - oldCfg.close() - cfg.close() - os.remove(productXml + ".old") - printLog(log, "") - printLog(log, ">>> Make bnp <<<") - targetPath = ClientPatchDirectory + "/bnp" - mkPath(log, targetPath) - for category in InstallClientData: - packExt = ".bnp" - if (category["StreamedPackages"]): - packExt = ".snp" - for package in category["Packages"]: - printLog(log, "PACKAGE " + package[0]) - sourcePath = InstallDirectory + "/" + package[0] - mkPath(log, sourcePath) - targetBnp = targetPath + "/" + package[0] + packExt - if (len(package[1]) > 0): - targetBnp = targetPath + "/" + package[1][0] - printLog(log, "TARGET " + package[1][0]) - needUpdateBnp = 1 - if (len(package) > 2): - needUpdateBnp = needUpdate(log, sourcePath + "/" + package[2], targetBnp) - else: - needUpdateBnp = needUpdateDirNoSubdirFile(log, sourcePath, targetBnp) - if (needUpdateBnp): - if (category["StreamedPackages"]): - printLog(log, "SNP " + targetBnp) - # cwDir = os.getcwd().replace("\\", "/") - # toolDir = os.path.dirname(Lzma).replace("\\", "/") - # os.chdir(toolDir) - subprocess.call([ SnpMake, "-p", sourcePath, targetBnp, ClientPatchDirectory + "/stream" ] + package[1][1:]) - # os.chdir(cwDir) - else: - printLog(log, "BNP " + targetBnp) - subprocess.call([ BnpMake, "-p", sourcePath, "-o", targetBnp ] + package[1][1:]) - else: - printLog(log, "SKIP " + targetBnp) - printLog(log, "") - if not args.bnponly: - printLog(log, ">>> Update product <<<") - cwDir = os.getcwd().replace("\\", "/") - toolDir = os.path.dirname(Lzma).replace("\\", "/") - os.chdir(toolDir) - subprocess.call([ PatchGen, "updateProduct", productXml ]) - os.chdir(cwDir) - printLog(log, "") - - -log.close() -if os.path.isfile("d1_client_patch.log"): - os.remove("d1_client_patch.log") -shutil.copy("log.log", time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + "_client_patch.log") -shutil.move("log.log", "d1_client_patch.log") +#!/usr/bin/python +# +# \file d1_client_patch.py +# \brief Install to client patch +# \date 2009-02-18 16:19GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Install to client patch +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +import time, sys, os, shutil, subprocess, distutils.dir_util, argparse +sys.path.append("configuration") + +parser = argparse.ArgumentParser(description='Ryzom Core - Build Gamedata - Client Patch') +parser.add_argument('--bnponly', '-bo', action='store_true') +args = parser.parse_args() + +if os.path.isfile("log.log"): + os.remove("log.log") +log = open("log.log", "w") +from scripts import * +from buildsite_local import * +from tools import * + +sys.path.append(WorkspaceDirectory) +from projects import * + +# Log error +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Install to client patch") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +# Find tools +BnpMake = findTool(log, ToolDirectories, BnpMakeTool, ToolSuffix) +SnpMake = findTool(log, ToolDirectories, SnpMakeTool, ToolSuffix); +PatchGen = findTool(log, ToolDirectories, PatchGenTool, ToolSuffix) +printLog(log, "") + +# Find **** HARDCODED **** WINDOWS **** tools ... TODO: fix patch_gen tool !!! +Lzma = findFileMultiDir(log, ToolDirectories + WindowsExeDllCfgDirectories, "lzma.exe") +printLog(log, "LZMA " + Lzma) +XDelta = findFileMultiDir(log, ToolDirectories + WindowsExeDllCfgDirectories, "xdelta.exe") +printLog(log, "XDELTA " + XDelta) +printLog(log, "") + +if BnpMake == "": + toolLogFail(log, BnpMakeTool, ToolSuffix) +elif PatchGen == "" and not args.bnponly: + toolLogFail(log, PatchGenTool, ToolSuffix) +elif Lzma == "" and not args.bnponly: + toolLogFail(log, "LZMA", ToolSuffix) +elif XDelta == "" and not args.bnponly: + toolLogFail(log, "XDELTA", ToolSuffix) +elif os.path.dirname(Lzma) != os.path.dirname(XDelta): + printLog(log, "FAIL lzma.exe and xdelta.exe must be in the same directory") +else: + mkPath(log, ClientPatchDirectory) + if not args.bnponly: + productXml = ClientPatchDirectory + "/" + ProductName + ".xml" + if not os.path.isfile(productXml): + printLog(log, ">>> Create new product <<<") + subprocess.call([ PatchGen, "createNewProduct", productXml ]) + printLog(log, "") + printLog(log, ">>> Rewrite " + ProductName + ".xml <<<") # because we know better. + shutil.move(productXml, productXml + ".old") + oldCfg = open(productXml + ".old", "r") + cfg = open(productXml, "w") + inCategories = 0 + for line in oldCfg: + if not inCategories: + if line.strip() == "<_Categories>": + inCategories = 1 + cfg.write("\t<_Categories>\n") + for category in InstallClientData: + packExt = ".bnp" + if (category["StreamedPackages"]): + packExt = ".snp" + cfg.write("\t\t<_Category>\n") + cfg.write("\t\t\t<_Name type=\"STRING\" value=\"" + category["Name"] + "\"/>\n") + if category["UnpackTo"] != None: + if category["UnpackTo"] != "": + cfg.write("\t\t\t<_UnpackTo type=\"STRING\" value=\"./" + category["UnpackTo"] + "/\"/>\n") + else: + cfg.write("\t\t\t<_UnpackTo type=\"STRING\" value=\"./\"/>\n") + cfg.write("\t\t\t<_IsOptional type=\"SINT32\" value=\"" + str(category["IsOptional"]) + "\"/>\n") + cfg.write("\t\t\t<_IsIncremental type=\"SINT32\" value=\"" + str(category["IsIncremental"]) + "\"/>\n") + for package in category["Packages"]: + if (len(package[1]) > 0): + cfg.write("\t\t\t<_Files type=\"STRING\" value=\"" + package[1][0] + "\"/>\n") + else: + cfg.write("\t\t\t<_Files type=\"STRING\" value=\"" + package[0] + packExt + "\"/>\n") + for ref in category["Refs"]: + cfg.write("\t\t\t<_Files type=\"STRING\" value=\"" + ref + "_.ref\"/>\n") + cfg.write("\t\t\n") + cfg.write("\t\n") + else: + cfg.write(line) + else: + if line.strip() == "": + inCategories = 0 + oldCfg.close() + cfg.close() + os.remove(productXml + ".old") + printLog(log, "") + printLog(log, ">>> Make bnp <<<") + targetPath = ClientPatchDirectory + "/bnp" + tagPath = ClientPatchDirectory + "/bnp_tag" + mkPath(log, targetPath) + mkPath(log, tagPath) + for category in InstallClientData: + packExt = ".bnp" + if (category["StreamedPackages"]): + packExt = ".snp" + for package in category["Packages"]: + printLog(log, "PACKAGE " + package[0]) + sourcePath = InstallDirectory + "/" + package[0] + mkPath(log, sourcePath) + targetBnp = targetPath + "/" + package[0] + packExt + tagBnp = tagPath + "/" + package[0] + packExt + ".tag" + if (len(package[1]) > 0): + targetBnp = targetPath + "/" + package[1][0] + tagBnp = tagPath + "/" + package[1][0] + ".tag" + printLog(log, "TARGET " + package[1][0]) + needUpdateBnp = 1 + if (len(package) > 2): + needUpdateBnp = needUpdate(log, sourcePath + "/" + package[2], tagBnp) + else: + needUpdateBnp = needUpdateDirNoSubdirFile(log, sourcePath, tagBnp) + if (needUpdateBnp): + subRet = 0 + open(tagBnp, 'a').close() + os.utime(tagBnp, None) + if (category["StreamedPackages"]): + printLog(log, "SNP " + targetBnp) + # cwDir = os.getcwd().replace("\\", "/") + # toolDir = os.path.dirname(Lzma).replace("\\", "/") + # os.chdir(toolDir) + subRet = subprocess.call([ SnpMake, "-p", sourcePath, targetBnp, ClientPatchDirectory + "/stream" ] + package[1][1:]) + # os.chdir(cwDir) + else: + printLog(log, "BNP " + targetBnp) + subRet = subprocess.call([ BnpMake, "-p", sourcePath, "-o", targetBnp ] + package[1][1:]) + if (subRet != 0): + os.remove(tagBnp) + else: + printLog(log, "SKIP " + targetBnp) + printLog(log, "") + if not args.bnponly: + printLog(log, ">>> Update product <<<") + cwDir = os.getcwd().replace("\\", "/") + toolDir = os.path.dirname(Lzma).replace("\\", "/") + os.chdir(toolDir) + subprocess.call([ PatchGen, "updateProduct", productXml ]) + os.chdir(cwDir) + printLog(log, "") + + +log.close() +if os.path.isfile("d1_client_patch.log"): + os.remove("d1_client_patch.log") +shutil.copy("log.log", time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + "_client_patch.log") +shutil.move("log.log", "d1_client_patch.log") diff --git a/code/nel/tools/build_gamedata/d2_client_install.py b/code/nel/tools/build_gamedata/d2_client_install.py old mode 100755 new mode 100644 index bb399447f..4041d79c2 --- a/code/nel/tools/build_gamedata/d2_client_install.py +++ b/code/nel/tools/build_gamedata/d2_client_install.py @@ -1,86 +1,86 @@ -#!/usr/bin/python -# -# \file d2_client_install.py -# \brief Install to client install -# \date 2009-02-18 16:19GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Install to client install -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from tools import * - -sys.path.append(WorkspaceDirectory) -from projects import * - -# Log error -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Install to client install") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -for category in InstallClientData: - printLog(log, "CATEGORY " + category["Name"]) - packExt = ".bnp" - if (category["StreamedPackages"]): - packExt = ".snp" - if (category["UnpackTo"] != None): - targetPath = ClientInstallDirectory - if (category["UnpackTo"] != ""): - targetPath += "/" + category["UnpackTo"] - mkPath(log, targetPath) - for package in category["Packages"]: - printLog(log, "PACKAGE " + package[0]) - mkPath(log, InstallDirectory + "/" + package[0]) - copyFilesNoTreeIfNeeded(log, InstallDirectory + "/" + package[0], targetPath) - else: - sourcePath = ClientPatchDirectory + "/bnp" - targetPath = ClientInstallDirectory + "/data" - mkPath(log, targetPath) - for package in category["Packages"]: - printLog(log, "PACKAGE " + package[0]) - sourceBnp = sourcePath + "/" + package[0] + packExt - targetBnp = targetPath + "/" + package[0] + packExt - if (len(package[1]) > 0): - sourceBnp = sourcePath + "/" + package[1][0] - targetBnp = targetPath + "/" + package[1][0] - printLog(log, "TARGET " + package[1][0]) - copyFileIfNeeded(log, sourceBnp, targetBnp) - for ref in category["Refs"]: - printLog(log, "REFERENCE " + ref) - sourceRef = sourcePath + "/" + ref + "_.ref" - targetRef = targetPath + "/" + ref + "_.ref" - copyFileIfNeeded(log, sourceRef, targetRef) -printLog(log, "") - -log.close() -if os.path.isfile("d2_client_install.log"): - os.remove("d2_client_install.log") -shutil.copy("log.log", time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + "_client_install.log") -shutil.move("log.log", "d2_client_install.log") +#!/usr/bin/python +# +# \file d2_client_install.py +# \brief Install to client install +# \date 2009-02-18 16:19GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Install to client install +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite_local import * +from tools import * + +sys.path.append(WorkspaceDirectory) +from projects import * + +# Log error +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Install to client install") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +for category in InstallClientData: + printLog(log, "CATEGORY " + category["Name"]) + packExt = ".bnp" + if (category["StreamedPackages"]): + packExt = ".snp" + if (category["UnpackTo"] != None): + targetPath = ClientInstallDirectory + if (category["UnpackTo"] != ""): + targetPath += "/" + category["UnpackTo"] + mkPath(log, targetPath) + for package in category["Packages"]: + printLog(log, "PACKAGE " + package[0]) + mkPath(log, InstallDirectory + "/" + package[0]) + copyFilesNoTreeIfNeeded(log, InstallDirectory + "/" + package[0], targetPath) + else: + sourcePath = ClientPatchDirectory + "/bnp" + targetPath = ClientInstallDirectory + "/data" + mkPath(log, targetPath) + for package in category["Packages"]: + printLog(log, "PACKAGE " + package[0]) + sourceBnp = sourcePath + "/" + package[0] + packExt + targetBnp = targetPath + "/" + package[0] + packExt + if (len(package[1]) > 0): + sourceBnp = sourcePath + "/" + package[1][0] + targetBnp = targetPath + "/" + package[1][0] + printLog(log, "TARGET " + package[1][0]) + copyFileIfNeeded(log, sourceBnp, targetBnp) + for ref in category["Refs"]: + printLog(log, "REFERENCE " + ref) + sourceRef = sourcePath + "/" + ref + "_.ref" + targetRef = targetPath + "/" + ref + "_.ref" + copyFileIfNeeded(log, sourceRef, targetRef) +printLog(log, "") + +log.close() +if os.path.isfile("d2_client_install.log"): + os.remove("d2_client_install.log") +shutil.copy("log.log", time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + "_client_install.log") +shutil.move("log.log", "d2_client_install.log") diff --git a/code/nel/tools/build_gamedata/export_build_install.py b/code/nel/tools/build_gamedata/export_build_install.py old mode 100755 new mode 100644 index b5e46ba06..cf6da81d7 --- a/code/nel/tools/build_gamedata/export_build_install.py +++ b/code/nel/tools/build_gamedata/export_build_install.py @@ -1,32 +1,32 @@ -#!/usr/bin/python -# -# \file export_build_install.py -# \brief Run all processes -# \date 2009-02-18 15:28GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Run all processes -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -import shutil, subprocess - -subprocess.call([ "python", "1_export.py" ]) -subprocess.call([ "python", "2_build.py" ]) -subprocess.call([ "python", "3_install.py" ]) - +#!/usr/bin/python +# +# \file export_build_install.py +# \brief Run all processes +# \date 2009-02-18 15:28GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Run all processes +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +import shutil, subprocess + +subprocess.call([ "python", "1_export.py" ]) +subprocess.call([ "python", "2_build.py" ]) +subprocess.call([ "python", "3_install.py" ]) + diff --git a/code/nel/tools/build_gamedata/generators/ecosystem_project_template/directories.py b/code/nel/tools/build_gamedata/generators/ecosystem_project_template/directories.py old mode 100755 new mode 100644 index 34886120e..6e614ffb3 --- a/code/nel/tools/build_gamedata/generators/ecosystem_project_template/directories.py +++ b/code/nel/tools/build_gamedata/generators/ecosystem_project_template/directories.py @@ -1,220 +1,220 @@ -#!/usr/bin/python -# -# ################################################################# -# ## %PreGenWarning% -# ################################################################# -# -# \file directories.py -# \brief Directories configuration -# \date %PreGenDateTimeStamp% -# \author Jan Boon (Kaetemi) -# \date 2001-2005 -# \author Nevrax -# Python port of game data build pipeline. -# Directories configuration for '%PreGenEcosystemName%' ecosystem. -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - - -# *** ECOSYSTEM AND CONTINENT NAMES *** - -EcosystemName = "%PreGenEcosystemName%" -EcosystemPath = "ecosystems/" + EcosystemName -CommonName = EcosystemName -CommonPath = EcosystemPath - -DatabaseRootName = "%PreGenDatabaseRootName%" -DatabaseRootPath = "stuff/" + DatabaseRootName - - -# *** SOURCE DIRECTORIES IN THE DATABASE *** - -# Shape directories -ShapeSourceDirectories = [ ] -ShapeSourceDirectories += [ DatabaseRootPath + "/decors/vegetations" ] -ShapeSourceDirectories += [ "landscape/ligo/" + EcosystemName + "/max" ] - -# Maps directories -MapSourceDirectories = [ ] -MapSourceDirectories += [ DatabaseRootPath + "/decors/_textures" ] -%PreGenMapSubdirectories%MapSourceDirectories += [ "landscape/microveget/" + EcosystemName + "" ] -MapSourceDirectories += [ "landscape/water/meshes/" + EcosystemName + "" ] - -MapUncompressedSourceDirectories = [ ] - -# Tiles directories -TilesSourceDirectories = [ ] -%PreGenTileSourceDirectories% -# Tiles root directory -TileRootSourceDirectory = "landscape/_texture_tiles/" + EcosystemName - -# Displace directory -DisplaceSourceDirectory = "landscape/_texture_tiles/" + EcosystemName + "/displace" - -# Do not use, needs to be removed and fixed in processes -DisplaceSourceDirectories = [ ] -DisplaceSourceDirectories += [ DisplaceSourceDirectory ] - -# Bank directory -BankSourceDirectory = "landscape/_texture_tiles/" + EcosystemName - -# Vegetable set directories -VegetSetSourceDirectories = [ ] -VegetSetSourceDirectories += [ "landscape/microveget/" + EcosystemName ] - -# Veget directories -VegetSourceDirectories = [ ] -VegetSourceDirectories += [ "landscape/microveget/" + EcosystemName ] - -# Ligo directories -LigoBaseSourceDirectory = "landscape/ligo/" + EcosystemName -LigoMaxSourceDirectory = LigoBaseSourceDirectory + "/max" - -# Zone directories -ZoneSourceDirectory = [ "landscape/zones/" + EcosystemName ] # For old snowballs style landscape when not using ligo - -# Ig landscape directories -IgLandSourceDirectory = "_invalid" - -# Ig other directories -IgOtherSourceDirectory = "_invalid" - -# PACS primitives directories -PacsPrimSourceDirectories = [ ] -PacsPrimSourceDirectories += [ DatabaseRootPath + "/decors/vegetations" ] - - -# *** LOOKUP DIRECTORIES WITHIN THE BUILD PIPELINE *** (TODO: use these instead of search_pathes in properties(_base).cfg) - -# Ig lookup directories used by rbank -IgLookupDirectories = [ ] - -# Shape lookup directories used by rbank -ShapeLookupDirectories = [ ] -ShapeLookupDirectories += [ EcosystemPath + "/shape_clodtex_build" ] -ShapeLookupDirectories += [ EcosystemPath + "/shape_with_coarse_mesh" ] - -# Map lookup directories not yet used -MapLookupDirectories = [ ] -MapLookupDirectories += [ EcosystemPath + "/map_export" ] -MapLookupDirectories += [ EcosystemPath + "/map_uncompressed" ] - - -# *** EXPORT DIRECTORIES FOR THE BUILD PIPELINE *** - -# Map directories -MapExportDirectory = CommonPath + "/map_export" -MapUncompressedExportDirectory = CommonPath + "/map_uncompressed" - -# Shape directories -ShapeTagExportDirectory = CommonPath + "/shape_tag" -ShapeNotOptimizedExportDirectory = CommonPath + "/shape_not_optimized" -ShapeWithCoarseMeshExportDirectory = CommonPath + "/shape_with_coarse_mesh" -ShapeLightmapNotOptimizedExportDirectory = CommonPath + "/shape_lightmap_not_optimized" -ShapeAnimExportDirectory = CommonPath + "/shape_anim" - -# Smallbank directories -SmallbankExportDirectory = CommonPath + "/smallbank" - -# Tiles directories -TilesExportDirectory = CommonPath + "/tiles" - -# Tiles directories -DisplaceExportDirectory = CommonPath + "/diplace" - -# Veget directories -VegetExportDirectory = CommonPath + "/veget" -VegetTagExportDirectory = CommonPath + "/veget_tag" - -# Veget Set directories -VegetSetExportDirectory = CommonPath + "/veget_set" - -# Ligo directories -LigoEcosystemExportDirectory = CommonPath + "/ligo_es" -LigoEcosystemIgExportDirectory = LigoEcosystemExportDirectory + "/igs" -LigoEcosystemZoneExportDirectory = LigoEcosystemExportDirectory + "/zones" -LigoEcosystemZoneLigoExportDirectory = LigoEcosystemExportDirectory + "/zoneligos" -LigoEcosystemCmbExportDirectory = LigoEcosystemExportDirectory + "/cmb" -LigoEcosystemTagExportDirectory = CommonPath + "/ligo_es_tag" - -# Zone directories -ZoneExportDirectory = CommonPath + "/zone" - -# PACS primitives directories -PacsPrimExportDirectory = CommonPath + "/pacs_prim" -PacsPrimTagExportDirectory = CommonPath + "/pacs_prim_tag" - - -# *** BUILD DIRECTORIES FOR THE BUILD PIPELINE *** - -# Map directories -MapBuildDirectory = CommonPath + "/map" -MapPanoplyBuildDirectory = CommonPath + "/map_panoply" -MapPanoplyHlsInfoBuildDirectory = CommonPath + "/map_panoply_hls_info" -MapPanoplyHlsBankBuildDirectory = CommonPath + "/map_panoply_hls_bank" -MapPanoplyCacheBuildDirectory = CommonPath + "/map_panoply_cache" -MapTagBuildDirectory = CommonPath + "/map_tag" - -# Shape directories -ShapeClodtexBuildDirectory = CommonPath + "/shape_clodtex_build" -ShapeWithCoarseMeshBuildDirectory = CommonPath + "/shape_with_coarse_mesh_builded" -ShapeLightmapBuildDirectory = CommonPath + "/shape_lightmap" -ShapeLightmap16BitsBuildDirectory = CommonPath + "/shape_lightmap_16_bits" - -# Farbank directories -FarbankBuildDirectory = CommonPath + "/farbank" - -# Ig directories ************** TODO CONFIRM IN IG BUILD PROCESS ************ FIX RBANK IF NEEDED *********** -IgLandBuildDirectory = "_invalid" -IgOtherBuildDirectory = "_invalid" - -# Rbank directories -RbankOutputBuildDirectory = "_invalid" - -# Ligo directories - - -# *** INSTALL DIRECTORIES IN THE CLIENT DATA *** - -# Map directory -MapInstallDirectory = CommonName + "_maps" -BitmapInstallDirectory = MapInstallDirectory - -# Shape directory -ShapeInstallDirectory = CommonName + "_shapes" - -# Lightmap directory -LightmapInstallDirectory = CommonName + "_lightmaps" - -# Tile directory -TilesInstallDirectory = CommonName + "_tiles" - -# Displace directory -DisplaceInstallDirectory = CommonName + "_displaces" - -# Bank directory -BankInstallDirectory = CommonName + "_bank" - -# Vegetable set directory -VegetSetInstallDirectory = CommonName + "_vegetable_sets" - -# Vegetable shape directory -VegetInstallDirectory = CommonName + "_vegetables" - -# PACS primitives directories -PacsPrimInstallDirectory = CommonName + "_pacs_prim" +#!/usr/bin/python +# +# ################################################################# +# ## %PreGenWarning% +# ################################################################# +# +# \file directories.py +# \brief Directories configuration +# \date %PreGenDateTimeStamp% +# \author Jan Boon (Kaetemi) +# \date 2001-2005 +# \author Nevrax +# Python port of game data build pipeline. +# Directories configuration for '%PreGenEcosystemName%' ecosystem. +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + + +# *** ECOSYSTEM AND CONTINENT NAMES *** + +EcosystemName = "%PreGenEcosystemName%" +EcosystemPath = "ecosystems/" + EcosystemName +CommonName = EcosystemName +CommonPath = EcosystemPath + +DatabaseRootName = "%PreGenDatabaseRootName%" +DatabaseRootPath = "stuff/" + DatabaseRootName + + +# *** SOURCE DIRECTORIES IN THE DATABASE *** + +# Shape directories +ShapeSourceDirectories = [ ] +ShapeSourceDirectories += [ DatabaseRootPath + "/decors/vegetations" ] +ShapeSourceDirectories += [ "landscape/ligo/" + EcosystemName + "/max" ] + +# Maps directories +MapSourceDirectories = [ ] +MapSourceDirectories += [ DatabaseRootPath + "/decors/_textures" ] +%PreGenMapSubdirectories%MapSourceDirectories += [ "landscape/microveget/" + EcosystemName + "" ] +MapSourceDirectories += [ "landscape/water/meshes/" + EcosystemName + "" ] + +MapUncompressedSourceDirectories = [ ] + +# Tiles directories +TilesSourceDirectories = [ ] +%PreGenTileSourceDirectories% +# Tiles root directory +TileRootSourceDirectory = "landscape/_texture_tiles/" + EcosystemName + +# Displace directory +DisplaceSourceDirectory = "landscape/_texture_tiles/" + EcosystemName + "/displace" + +# Do not use, needs to be removed and fixed in processes +DisplaceSourceDirectories = [ ] +DisplaceSourceDirectories += [ DisplaceSourceDirectory ] + +# Bank directory +BankSourceDirectory = "landscape/_texture_tiles/" + EcosystemName + +# Vegetable set directories +VegetSetSourceDirectories = [ ] +VegetSetSourceDirectories += [ "landscape/microveget/" + EcosystemName ] + +# Veget directories +VegetSourceDirectories = [ ] +VegetSourceDirectories += [ "landscape/microveget/" + EcosystemName ] + +# Ligo directories +LigoBaseSourceDirectory = "landscape/ligo/" + EcosystemName +LigoMaxSourceDirectory = LigoBaseSourceDirectory + "/max" + +# Zone directories +ZoneSourceDirectory = [ "landscape/zones/" + EcosystemName ] # For old snowballs style landscape when not using ligo + +# Ig landscape directories +IgLandSourceDirectory = "_invalid" + +# Ig other directories +IgOtherSourceDirectory = "_invalid" + +# PACS primitives directories +PacsPrimSourceDirectories = [ ] +PacsPrimSourceDirectories += [ DatabaseRootPath + "/decors/vegetations" ] + + +# *** LOOKUP DIRECTORIES WITHIN THE BUILD PIPELINE *** (TODO: use these instead of search_pathes in properties(_base).cfg) + +# Ig lookup directories used by rbank +IgLookupDirectories = [ ] + +# Shape lookup directories used by rbank +ShapeLookupDirectories = [ ] +ShapeLookupDirectories += [ EcosystemPath + "/shape_clodtex_build" ] +ShapeLookupDirectories += [ EcosystemPath + "/shape_with_coarse_mesh" ] + +# Map lookup directories not yet used +MapLookupDirectories = [ ] +MapLookupDirectories += [ EcosystemPath + "/map_export" ] +MapLookupDirectories += [ EcosystemPath + "/map_uncompressed" ] + + +# *** EXPORT DIRECTORIES FOR THE BUILD PIPELINE *** + +# Map directories +MapExportDirectory = CommonPath + "/map_export" +MapUncompressedExportDirectory = CommonPath + "/map_uncompressed" + +# Shape directories +ShapeTagExportDirectory = CommonPath + "/shape_tag" +ShapeNotOptimizedExportDirectory = CommonPath + "/shape_not_optimized" +ShapeWithCoarseMeshExportDirectory = CommonPath + "/shape_with_coarse_mesh" +ShapeLightmapNotOptimizedExportDirectory = CommonPath + "/shape_lightmap_not_optimized" +ShapeAnimExportDirectory = CommonPath + "/shape_anim" + +# Smallbank directories +SmallbankExportDirectory = CommonPath + "/smallbank" + +# Tiles directories +TilesExportDirectory = CommonPath + "/tiles" + +# Tiles directories +DisplaceExportDirectory = CommonPath + "/diplace" + +# Veget directories +VegetExportDirectory = CommonPath + "/veget" +VegetTagExportDirectory = CommonPath + "/veget_tag" + +# Veget Set directories +VegetSetExportDirectory = CommonPath + "/veget_set" + +# Ligo directories +LigoEcosystemExportDirectory = CommonPath + "/ligo_es" +LigoEcosystemIgExportDirectory = LigoEcosystemExportDirectory + "/igs" +LigoEcosystemZoneExportDirectory = LigoEcosystemExportDirectory + "/zones" +LigoEcosystemZoneLigoExportDirectory = LigoEcosystemExportDirectory + "/zoneligos" +LigoEcosystemCmbExportDirectory = LigoEcosystemExportDirectory + "/cmb" +LigoEcosystemTagExportDirectory = CommonPath + "/ligo_es_tag" + +# Zone directories +ZoneExportDirectory = CommonPath + "/zone" + +# PACS primitives directories +PacsPrimExportDirectory = CommonPath + "/pacs_prim" +PacsPrimTagExportDirectory = CommonPath + "/pacs_prim_tag" + + +# *** BUILD DIRECTORIES FOR THE BUILD PIPELINE *** + +# Map directories +MapBuildDirectory = CommonPath + "/map" +MapPanoplyBuildDirectory = CommonPath + "/map_panoply" +MapPanoplyHlsInfoBuildDirectory = CommonPath + "/map_panoply_hls_info" +MapPanoplyHlsBankBuildDirectory = CommonPath + "/map_panoply_hls_bank" +MapPanoplyCacheBuildDirectory = CommonPath + "/map_panoply_cache" +MapTagBuildDirectory = CommonPath + "/map_tag" + +# Shape directories +ShapeClodtexBuildDirectory = CommonPath + "/shape_clodtex_build" +ShapeWithCoarseMeshBuildDirectory = CommonPath + "/shape_with_coarse_mesh_builded" +ShapeLightmapBuildDirectory = CommonPath + "/shape_lightmap" +ShapeLightmap16BitsBuildDirectory = CommonPath + "/shape_lightmap_16_bits" + +# Farbank directories +FarbankBuildDirectory = CommonPath + "/farbank" + +# Ig directories ************** TODO CONFIRM IN IG BUILD PROCESS ************ FIX RBANK IF NEEDED *********** +IgLandBuildDirectory = "_invalid" +IgOtherBuildDirectory = "_invalid" + +# Rbank directories +RbankOutputBuildDirectory = "_invalid" + +# Ligo directories + + +# *** INSTALL DIRECTORIES IN THE CLIENT DATA *** + +# Map directory +MapInstallDirectory = CommonName + "_maps" +BitmapInstallDirectory = MapInstallDirectory + +# Shape directory +ShapeInstallDirectory = CommonName + "_shapes" + +# Lightmap directory +LightmapInstallDirectory = CommonName + "_lightmaps" + +# Tile directory +TilesInstallDirectory = CommonName + "_tiles" + +# Displace directory +DisplaceInstallDirectory = CommonName + "_displaces" + +# Bank directory +BankInstallDirectory = CommonName + "_bank" + +# Vegetable set directory +VegetSetInstallDirectory = CommonName + "_vegetable_sets" + +# Vegetable shape directory +VegetInstallDirectory = CommonName + "_vegetables" + +# PACS primitives directories +PacsPrimInstallDirectory = CommonName + "_pacs_prim" diff --git a/code/nel/tools/build_gamedata/generators/ecosystem_project_template/process.py b/code/nel/tools/build_gamedata/generators/ecosystem_project_template/process.py old mode 100755 new mode 100644 index 367ff8feb..cd38a8143 --- a/code/nel/tools/build_gamedata/generators/ecosystem_project_template/process.py +++ b/code/nel/tools/build_gamedata/generators/ecosystem_project_template/process.py @@ -1,122 +1,122 @@ -#!/usr/bin/python -# -# ################################################################# -# ## %PreGenWarning% -# ################################################################# -# -# \file config.py -# \brief Process configuration -# \date %PreGenDateTimeStamp% -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Process configuration for '%PreGenEcosystemName%' ecosystem. -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -# *** PROCESS CONFIGURATION *** - -# *** PROCESS CONFIG *** -ProcessToComplete = [ ] -ProcessToComplete += [ "shape" ] -ProcessToComplete += [ "map" ] -ProcessToComplete += [ "smallbank" ] -ProcessToComplete += [ "farbank" ] -ProcessToComplete += [ "tiles" ] -ProcessToComplete += [ "displace" ] -ProcessToComplete += [ "veget" ] -ProcessToComplete += [ "vegetset" ] -ProcessToComplete += [ "ligo" ] -ProcessToComplete += [ "pacs_prim" ] - - -# *** ECOSYSTEM AND CONTINENT NAMES *** - -EcosystemName = "%PreGenEcosystemName%" -EcosystemPath = "ecosystems/" + EcosystemName -CommonName = EcosystemName -CommonPath = EcosystemPath - - -# *** MAP EXPORT OPTIONS *** -PanoplyFileList = [ ] -HlsBankFileName = "" - -# *** SHAPE EXPORT OPTIONS *** - -# Compute lightmaps ? -ShapeExportOptExportLighting = "%PreGenShapeExportOptExportLighting%" - -# Cast shadow in lightmap ? -ShapeExportOptShadow = "%PreGenShapeExportOptShadow%" - -# Lighting limits. 0 : normal, 1 : soft shadows -ShapeExportOptLightingLimit = %PreGenShapeExportOptLightingLimit% - -# Lightmap lumel size -ShapeExportOptLumelSize = "%PreGenShapeExportOptLumelSize%" - -# Oversampling value. Can be 1, 2, 4 or 8 -ShapeExportOptOversampling = %PreGenShapeExportOptOversampling% - -# Does the lightmap must be generated in 8 bits format ? -ShapeExportOpt8BitsLightmap = "%PreGenShapeExportOpt8BitsLightmap%" - -# Does the lightmaps export must generate logs ? -ShapeExportOptLightmapLog = "%PreGenShapeExportOptLightmapLog%" - -# Coarse mesh texture mul size -TextureMulSizeValue = "%PreGenTextureMulSizeValue%" - -ClodConfigFile = "" - -# *** COARSE MESH TEXTURE NAME *** -CoarseMeshTextureNames = [ ] -%PreGenCoarseMeshTextureNames% -# *** POSTFIX USED BY THE MULTIPLE TILES SYSTEM *** -MultipleTilesPostfix = [ ] -%PreGenMultipleTilesPostfix% -# *** BANK EXPORT OPTIONS *** - -# Name of the tilebank to use -BankTileBankName = EcosystemName - -# *** RBANK EXPORT OPTIONS *** - -# Output names -RbankRbankName = "_invalid" - -# *** LIGO OPTIONS *** - -LigoExportLand = "" -LigoExportOnePass = 0 - -# *** MAPS OPTIONS *** - -ReduceBitmapFactor = 0 -# list all panoply files -MapPanoplyFileList = None -# name of the .hlsbank to build. -MapHlsBankFileName = None - -# *** SHAPE BUILD OPTIONS * - -BuildShadowSkinEnabled = False -ClodConfigFile = "" - -# *** PACS_PRIM OPTIONS *** -WantLandscapeColPrimPacsList = True +#!/usr/bin/python +# +# ################################################################# +# ## %PreGenWarning% +# ################################################################# +# +# \file config.py +# \brief Process configuration +# \date %PreGenDateTimeStamp% +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Process configuration for '%PreGenEcosystemName%' ecosystem. +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +# *** PROCESS CONFIGURATION *** + +# *** PROCESS CONFIG *** +ProcessToComplete = [ ] +ProcessToComplete += [ "shape" ] +ProcessToComplete += [ "map" ] +ProcessToComplete += [ "smallbank" ] +ProcessToComplete += [ "farbank" ] +ProcessToComplete += [ "tiles" ] +ProcessToComplete += [ "displace" ] +ProcessToComplete += [ "veget" ] +ProcessToComplete += [ "vegetset" ] +ProcessToComplete += [ "ligo" ] +ProcessToComplete += [ "pacs_prim" ] + + +# *** ECOSYSTEM AND CONTINENT NAMES *** + +EcosystemName = "%PreGenEcosystemName%" +EcosystemPath = "ecosystems/" + EcosystemName +CommonName = EcosystemName +CommonPath = EcosystemPath + + +# *** MAP EXPORT OPTIONS *** +PanoplyFileList = [ ] +HlsBankFileName = "" + +# *** SHAPE EXPORT OPTIONS *** + +# Compute lightmaps ? +ShapeExportOptExportLighting = "%PreGenShapeExportOptExportLighting%" + +# Cast shadow in lightmap ? +ShapeExportOptShadow = "%PreGenShapeExportOptShadow%" + +# Lighting limits. 0 : normal, 1 : soft shadows +ShapeExportOptLightingLimit = %PreGenShapeExportOptLightingLimit% + +# Lightmap lumel size +ShapeExportOptLumelSize = "%PreGenShapeExportOptLumelSize%" + +# Oversampling value. Can be 1, 2, 4 or 8 +ShapeExportOptOversampling = %PreGenShapeExportOptOversampling% + +# Does the lightmap must be generated in 8 bits format ? +ShapeExportOpt8BitsLightmap = "%PreGenShapeExportOpt8BitsLightmap%" + +# Does the lightmaps export must generate logs ? +ShapeExportOptLightmapLog = "%PreGenShapeExportOptLightmapLog%" + +# Coarse mesh texture mul size +TextureMulSizeValue = "%PreGenTextureMulSizeValue%" + +ClodConfigFile = "" + +# *** COARSE MESH TEXTURE NAME *** +CoarseMeshTextureNames = [ ] +%PreGenCoarseMeshTextureNames% +# *** POSTFIX USED BY THE MULTIPLE TILES SYSTEM *** +MultipleTilesPostfix = [ ] +%PreGenMultipleTilesPostfix% +# *** BANK EXPORT OPTIONS *** + +# Name of the tilebank to use +BankTileBankName = EcosystemName + +# *** RBANK EXPORT OPTIONS *** + +# Output names +RbankRbankName = "_invalid" + +# *** LIGO OPTIONS *** + +LigoExportLand = "" +LigoExportOnePass = 0 + +# *** MAPS OPTIONS *** + +ReduceBitmapFactor = 0 +# list all panoply files +MapPanoplyFileList = None +# name of the .hlsbank to build. +MapHlsBankFileName = None + +# *** SHAPE BUILD OPTIONS * + +BuildShadowSkinEnabled = False +ClodConfigFile = "" + +# *** PACS_PRIM OPTIONS *** +WantLandscapeColPrimPacsList = True diff --git a/code/nel/tools/build_gamedata/generators/generate_all.py b/code/nel/tools/build_gamedata/generators/generate_all.py old mode 100755 new mode 100644 index 29060647d..79f22955c --- a/code/nel/tools/build_gamedata/generators/generate_all.py +++ b/code/nel/tools/build_gamedata/generators/generate_all.py @@ -1,65 +1,65 @@ -#!/usr/bin/python -# -# \file 0_setup.py -# \brief Run all setup processes -# \date 2009-02-18 15:28GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Run all setup processes -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -import time, sys, os, shutil, subprocess, distutils.dir_util -sys.path.append("../configuration") -if os.path.isfile("generate_all.log"): - os.remove("generate_all.log") -log = open("generate_all.log", "w") -from scripts import * -from buildsite import * -from tools import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Generate all") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - - -try: - subprocess.call([ "python", "generate_simple_max_exporters.py" ]) -except Exception, e: - printLog(log, "<" + processName + "> " + str(e)) -printLog(log, "") - - -try: - subprocess.call([ "python", "generate_tagged_max_exporters.py" ]) -except Exception, e: - printLog(log, "<" + processName + "> " + str(e)) -printLog(log, "") - - -try: - subprocess.call([ "python", "generate_ecosystem_projects.py" ]) -except Exception, e: - printLog(log, "<" + processName + "> " + str(e)) -printLog(log, "") - - -log.close() +#!/usr/bin/python +# +# \file 0_setup.py +# \brief Run all setup processes +# \date 2009-02-18 15:28GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Run all setup processes +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +import time, sys, os, shutil, subprocess, distutils.dir_util +sys.path.append("../configuration") +if os.path.isfile("generate_all.log"): + os.remove("generate_all.log") +log = open("generate_all.log", "w") +from scripts import * +from buildsite import * +from tools import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Generate all") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + + +try: + subprocess.call([ "python", "generate_simple_max_exporters.py" ]) +except Exception, e: + printLog(log, "<" + processName + "> " + str(e)) +printLog(log, "") + + +try: + subprocess.call([ "python", "generate_tagged_max_exporters.py" ]) +except Exception, e: + printLog(log, "<" + processName + "> " + str(e)) +printLog(log, "") + + +try: + subprocess.call([ "python", "generate_ecosystem_projects.py" ]) +except Exception, e: + printLog(log, "<" + processName + "> " + str(e)) +printLog(log, "") + + +log.close() diff --git a/code/nel/tools/build_gamedata/generators/generate_ecosystem_projects.py b/code/nel/tools/build_gamedata/generators/generate_ecosystem_projects.py old mode 100755 new mode 100644 index 0f71f615b..3ad5f741b --- a/code/nel/tools/build_gamedata/generators/generate_ecosystem_projects.py +++ b/code/nel/tools/build_gamedata/generators/generate_ecosystem_projects.py @@ -1,278 +1,278 @@ -#!/usr/bin/python -# -# \file generate_ecosystem_projects.py -# \brief Run all setup processes -# \date 2010-09-02 10:36GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Generate ecosystem projects -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -import time, sys, os, shutil, subprocess, distutils.dir_util -sys.path.append("../configuration") -if os.path.isfile("generate_ecosystem_projects.log"): - os.remove("generate_ecosystem_projects.log") -log = open("generate_ecosystem_projects.log", "w") -from scripts import * -from buildsite import * -from tools import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Generate ecosystem projects") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -templateDir = os.getcwd().replace("\\", "/") + "/ecosystem_project_template" -mkPath(log, templateDir) - -os.chdir("..") - - -# Scroll down to add an ecosystem. - - - -DefaultShapeExportOptExportLighting = "true" -DefaultShapeExportOptShadow = "true" -DefaultShapeExportOptLightingLimit = "1" -DefaultShapeExportOptLumelSize = "0.25" -DefaultShapeExportOptOversampling = "1" -DefaultShapeExportOpt8BitsLightmap = "true" -DefaultShapeExportOptLightmapLog = "true" -DefaultTextureMulSizeValue = "1.5" -DefaultSeasonSuffixes = [ "sp" ] + [ "su" ] + [ "au" ] + [ "wi" ] -DefaultMapSubdirectories = [ ] -DefaultTileDirectories = [ ] - - -ShapeExportOptExportLighting = DefaultShapeExportOptExportLighting -ShapeExportOptShadow = DefaultShapeExportOptShadow -ShapeExportOptLightingLimit = DefaultShapeExportOptLightingLimit -ShapeExportOptLumelSize = DefaultShapeExportOptLumelSize -ShapeExportOptOversampling = DefaultShapeExportOptOversampling -ShapeExportOpt8BitsLightmap = DefaultShapeExportOpt8BitsLightmap -ShapeExportOptLightmapLog = DefaultShapeExportOptLightmapLog -TextureMulSizeValue = DefaultTextureMulSizeValue -SeasonSuffixes = DefaultSeasonSuffixes -MapSubdirectories = DefaultMapSubdirectories -TileDirectories = DefaultTileDirectories - - -PreGenDateTimeStamp = None -PreGenEcosystemName = None -PreGenDatabaseRootName = None -PreGenCoarseMeshTextureNames = None -PreGenMultipleTilesPostfix = None -PreGenMapSubdirectories = None -PreGenTileSourceDirectories = None - - -def transformLine(line): - newline = line.replace("%PreGenWarning%", "WARNING : this is a generated file, don't change it !") - newline = newline.replace("%PreGenDateTimeStamp%", PreGenDateTimeStamp) - - newline = newline.replace("%PreGenEcosystemName%", PreGenEcosystemName) - newline = newline.replace("%PreGenDatabaseRootName%", PreGenDatabaseRootName) - - newline = newline.replace("%PreGenCoarseMeshTextureNames%", PreGenCoarseMeshTextureNames) - newline = newline.replace("%PreGenMultipleTilesPostfix%", PreGenMultipleTilesPostfix) - newline = newline.replace("%PreGenMapSubdirectories%", PreGenMapSubdirectories) - newline = newline.replace("%PreGenTileSourceDirectories%", PreGenTileSourceDirectories) - - newline = newline.replace("%PreGenShapeExportOptExportLighting%", ShapeExportOptExportLighting) - newline = newline.replace("%PreGenShapeExportOptShadow%", ShapeExportOptShadow) - newline = newline.replace("%PreGenShapeExportOptLightingLimit%", ShapeExportOptLightingLimit) - newline = newline.replace("%PreGenShapeExportOptLumelSize%", ShapeExportOptLumelSize) - newline = newline.replace("%PreGenShapeExportOptOversampling%", ShapeExportOptOversampling) - newline = newline.replace("%PreGenShapeExportOpt8BitsLightmap%", ShapeExportOpt8BitsLightmap) - newline = newline.replace("%PreGenShapeExportOptLightmapLog%", ShapeExportOptLightmapLog) - newline = newline.replace("%PreGenTextureMulSizeValue%", TextureMulSizeValue) - newline = newline.replace("%PreGenTileSourceDirectories%", PreGenTileSourceDirectories) - - return newline - -def generateFile(sourceFile, destFile): - srcf = open(sourceFile, "r") - dstf = open(destFile, "w") - printLog(log, "WRITE " + destFile) - for line in srcf: - dstf.write(transformLine(line)) - dstf.close() - srcf.close() - -def generateEcosystem(ecosystemName, databaseRootName): - global PreGenEcosystemName - PreGenEcosystemName = ecosystemName - global PreGenDatabaseRootName - PreGenDatabaseRootName = databaseRootName - global PreGenDateTimeStamp - PreGenDateTimeStamp = time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) - - global PreGenMultipleTilesPostfix - PreGenMultipleTilesPostfix = "" - global PreGenCoarseMeshTextureNames - PreGenCoarseMeshTextureNames = "" - global PreGenTileSourceDirectories - PreGenTileSourceDirectories = "" - for suffix in SeasonSuffixes: - PreGenMultipleTilesPostfix += "MultipleTilesPostfix += [ \"_" + suffix + "\" ]\n" - PreGenCoarseMeshTextureNames += "CoarseMeshTextureNames += [ \"nel_coarse_mesh_\" + EcosystemName + \"_" + suffix + "\" ]\n" - for tiledir in TileDirectories: - PreGenTileSourceDirectories += "TilesSourceDirectories += [ \"landscape/_texture_tiles/\" + EcosystemName + \"_" + suffix + "/" + tiledir + "\" ]\n" - global PreGenMapSubdirectories - PreGenMapSubdirectories = "" - for subdir in MapSubdirectories: - PreGenMapSubdirectories += "MapSourceDirectories += [ DatabaseRootPath + \"/decors/_textures/" + subdir + "\" ]\n" - - destDir = WorkspaceDirectory + "/ecosystems/" + ecosystemName - mkPath(log, destDir) - - generateFile(templateDir + "/process.py", destDir + "/process.py") - generateFile(templateDir + "/directories.py", destDir + "/directories.py") - - return - - - -# Add new ecosystems below this line. - - - -# DESERT -ShapeExportOptExportLighting = DefaultShapeExportOptExportLighting -ShapeExportOptShadow = DefaultShapeExportOptShadow -ShapeExportOptLightingLimit = DefaultShapeExportOptLightingLimit -ShapeExportOptLumelSize = DefaultShapeExportOptLumelSize -ShapeExportOptOversampling = DefaultShapeExportOptOversampling -ShapeExportOpt8BitsLightmap = DefaultShapeExportOpt8BitsLightmap -ShapeExportOptLightmapLog = DefaultShapeExportOptLightmapLog -TextureMulSizeValue = DefaultTextureMulSizeValue -SeasonSuffixes = DefaultSeasonSuffixes -MapSubdirectories = [ ] -MapSubdirectories += [ "vegetations" ] -TileDirectories = [ ] -TileDirectories += [ "1.5-marecage_profond" ] -TileDirectories += [ "1-marecages" ] -TileDirectories += [ "2-citees" ] -TileDirectories += [ "3-fond_canyon" ] -TileDirectories += [ "4.2-boisbandeclair" ] -TileDirectories += [ "4.5-desert2boisbande" ] -TileDirectories += [ "4-falaise_bois_bande" ] -TileDirectories += [ "5-falaise_normales" ] -TileDirectories += [ "6.5-desertalternatif" ] -TileDirectories += [ "6-desert" ] -TileDirectories += [ "7-routes" ] -TileDirectories += [ "8-foretbrule" ] -generateEcosystem("desert", "fyros") - - -# JUNGLE -ShapeExportOptExportLighting = DefaultShapeExportOptExportLighting -ShapeExportOptShadow = DefaultShapeExportOptShadow -ShapeExportOptLightingLimit = DefaultShapeExportOptLightingLimit -ShapeExportOptLumelSize = DefaultShapeExportOptLumelSize -ShapeExportOptOversampling = DefaultShapeExportOptOversampling -ShapeExportOpt8BitsLightmap = "false" -ShapeExportOptLightmapLog = DefaultShapeExportOptLightmapLog -TextureMulSizeValue = DefaultTextureMulSizeValue -SeasonSuffixes = DefaultSeasonSuffixes -MapSubdirectories = [ ] -MapSubdirectories += [ "vegetations" ] -TileDirectories = [ ] -TileDirectories += [ "10-crevassejungle" ] -TileDirectories += [ "11-paroisjungle" ] -TileDirectories += [ "12-vasejungle" ] -TileDirectories += [ "1-junglemousse" ] -TileDirectories += [ "2-junglefeuilles" ] -TileDirectories += [ "3-jungleherbesseche" ] -TileDirectories += [ "4-jungleherbevieille" ] -TileDirectories += [ "5-jungleterreaux" ] -TileDirectories += [ "6-junglegoo" ] -TileDirectories += [ "7-sciurejungle" ] -TileDirectories += [ "8-terrejungle" ] -TileDirectories += [ "9-falaisejungle" ] -TileDirectories += [ "Transitions" ] -generateEcosystem("jungle", "jungle") - - -# PRIMES RACINES -ShapeExportOptExportLighting = DefaultShapeExportOptExportLighting -ShapeExportOptShadow = DefaultShapeExportOptShadow -ShapeExportOptLightingLimit = DefaultShapeExportOptLightingLimit -ShapeExportOptLumelSize = DefaultShapeExportOptLumelSize -ShapeExportOptOversampling = DefaultShapeExportOptOversampling -ShapeExportOpt8BitsLightmap = "false" -ShapeExportOptLightmapLog = DefaultShapeExportOptLightmapLog -TextureMulSizeValue = DefaultTextureMulSizeValue -SeasonSuffixes = DefaultSeasonSuffixes -MapSubdirectories = [ ] -MapSubdirectories += [ "vegetations" ] -MapSubdirectories += [ "batiments" ] -TileDirectories = [ ] -TileDirectories += [ "PR-creux" ] -TileDirectories += [ "PR-dome-moussu" ] -TileDirectories += [ "PR-kitiniere" ] -TileDirectories += [ "PR-mousse-licken" ] -TileDirectories += [ "PR-mousse-spongieus" ] -TileDirectories += [ "PR-parois" ] -TileDirectories += [ "PR-sol-mousse" ] -TileDirectories += [ "PR-souche" ] -TileDirectories += [ "PR-stalagmite" ] -TileDirectories += [ "PR-terre" ] -TileDirectories += [ "aditif" ] -generateEcosystem("primes_racines", "primes_racines") - - -# LACUSTRE -ShapeExportOptExportLighting = DefaultShapeExportOptExportLighting -ShapeExportOptShadow = DefaultShapeExportOptShadow -ShapeExportOptLightingLimit = "0" -ShapeExportOptLumelSize = DefaultShapeExportOptLumelSize -ShapeExportOptOversampling = "8" -ShapeExportOpt8BitsLightmap = "false" -ShapeExportOptLightmapLog = DefaultShapeExportOptLightmapLog -TextureMulSizeValue = DefaultTextureMulSizeValue -SeasonSuffixes = DefaultSeasonSuffixes -MapSubdirectories = [ ] -MapSubdirectories += [ "vegetations" ] -TileDirectories = [ ] -TileDirectories += [ "1a-sable-marin" ] -TileDirectories += [ "1-plages" ] -TileDirectories += [ "2-iles" ] -TileDirectories += [ "2-ilesa" ] -TileDirectories += [ "2-iles-marines" ] -TileDirectories += [ "3-fondmarin2plage" ] -TileDirectories += [ "4-marecages" ] -TileDirectories += [ "5-marecages" ] -TileDirectories += [ "5-parois-marine" ] -TileDirectories += [ "6-fond_marin" ] -TileDirectories += [ "7-bassesiles" ] -TileDirectories += [ "7-mousseter" ] -TileDirectories += [ "7-racines" ] -TileDirectories += [ "8-mousse_marine" ] -TileDirectories += [ "constructible" ] -generateEcosystem("lacustre", "tryker") - - - - -printLog(log, "") -log.close() +#!/usr/bin/python +# +# \file generate_ecosystem_projects.py +# \brief Run all setup processes +# \date 2010-09-02 10:36GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Generate ecosystem projects +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +import time, sys, os, shutil, subprocess, distutils.dir_util +sys.path.append("../configuration") +if os.path.isfile("generate_ecosystem_projects.log"): + os.remove("generate_ecosystem_projects.log") +log = open("generate_ecosystem_projects.log", "w") +from scripts import * +from buildsite import * +from tools import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Generate ecosystem projects") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +templateDir = os.getcwd().replace("\\", "/") + "/ecosystem_project_template" +mkPath(log, templateDir) + +os.chdir("..") + + +# Scroll down to add an ecosystem. + + + +DefaultShapeExportOptExportLighting = "true" +DefaultShapeExportOptShadow = "true" +DefaultShapeExportOptLightingLimit = "1" +DefaultShapeExportOptLumelSize = "0.25" +DefaultShapeExportOptOversampling = "1" +DefaultShapeExportOpt8BitsLightmap = "true" +DefaultShapeExportOptLightmapLog = "true" +DefaultTextureMulSizeValue = "1.5" +DefaultSeasonSuffixes = [ "sp" ] + [ "su" ] + [ "au" ] + [ "wi" ] +DefaultMapSubdirectories = [ ] +DefaultTileDirectories = [ ] + + +ShapeExportOptExportLighting = DefaultShapeExportOptExportLighting +ShapeExportOptShadow = DefaultShapeExportOptShadow +ShapeExportOptLightingLimit = DefaultShapeExportOptLightingLimit +ShapeExportOptLumelSize = DefaultShapeExportOptLumelSize +ShapeExportOptOversampling = DefaultShapeExportOptOversampling +ShapeExportOpt8BitsLightmap = DefaultShapeExportOpt8BitsLightmap +ShapeExportOptLightmapLog = DefaultShapeExportOptLightmapLog +TextureMulSizeValue = DefaultTextureMulSizeValue +SeasonSuffixes = DefaultSeasonSuffixes +MapSubdirectories = DefaultMapSubdirectories +TileDirectories = DefaultTileDirectories + + +PreGenDateTimeStamp = None +PreGenEcosystemName = None +PreGenDatabaseRootName = None +PreGenCoarseMeshTextureNames = None +PreGenMultipleTilesPostfix = None +PreGenMapSubdirectories = None +PreGenTileSourceDirectories = None + + +def transformLine(line): + newline = line.replace("%PreGenWarning%", "WARNING : this is a generated file, don't change it !") + newline = newline.replace("%PreGenDateTimeStamp%", PreGenDateTimeStamp) + + newline = newline.replace("%PreGenEcosystemName%", PreGenEcosystemName) + newline = newline.replace("%PreGenDatabaseRootName%", PreGenDatabaseRootName) + + newline = newline.replace("%PreGenCoarseMeshTextureNames%", PreGenCoarseMeshTextureNames) + newline = newline.replace("%PreGenMultipleTilesPostfix%", PreGenMultipleTilesPostfix) + newline = newline.replace("%PreGenMapSubdirectories%", PreGenMapSubdirectories) + newline = newline.replace("%PreGenTileSourceDirectories%", PreGenTileSourceDirectories) + + newline = newline.replace("%PreGenShapeExportOptExportLighting%", ShapeExportOptExportLighting) + newline = newline.replace("%PreGenShapeExportOptShadow%", ShapeExportOptShadow) + newline = newline.replace("%PreGenShapeExportOptLightingLimit%", ShapeExportOptLightingLimit) + newline = newline.replace("%PreGenShapeExportOptLumelSize%", ShapeExportOptLumelSize) + newline = newline.replace("%PreGenShapeExportOptOversampling%", ShapeExportOptOversampling) + newline = newline.replace("%PreGenShapeExportOpt8BitsLightmap%", ShapeExportOpt8BitsLightmap) + newline = newline.replace("%PreGenShapeExportOptLightmapLog%", ShapeExportOptLightmapLog) + newline = newline.replace("%PreGenTextureMulSizeValue%", TextureMulSizeValue) + newline = newline.replace("%PreGenTileSourceDirectories%", PreGenTileSourceDirectories) + + return newline + +def generateFile(sourceFile, destFile): + srcf = open(sourceFile, "r") + dstf = open(destFile, "w") + printLog(log, "WRITE " + destFile) + for line in srcf: + dstf.write(transformLine(line)) + dstf.close() + srcf.close() + +def generateEcosystem(ecosystemName, databaseRootName): + global PreGenEcosystemName + PreGenEcosystemName = ecosystemName + global PreGenDatabaseRootName + PreGenDatabaseRootName = databaseRootName + global PreGenDateTimeStamp + PreGenDateTimeStamp = time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + + global PreGenMultipleTilesPostfix + PreGenMultipleTilesPostfix = "" + global PreGenCoarseMeshTextureNames + PreGenCoarseMeshTextureNames = "" + global PreGenTileSourceDirectories + PreGenTileSourceDirectories = "" + for suffix in SeasonSuffixes: + PreGenMultipleTilesPostfix += "MultipleTilesPostfix += [ \"_" + suffix + "\" ]\n" + PreGenCoarseMeshTextureNames += "CoarseMeshTextureNames += [ \"nel_coarse_mesh_\" + EcosystemName + \"_" + suffix + "\" ]\n" + for tiledir in TileDirectories: + PreGenTileSourceDirectories += "TilesSourceDirectories += [ \"landscape/_texture_tiles/\" + EcosystemName + \"_" + suffix + "/" + tiledir + "\" ]\n" + global PreGenMapSubdirectories + PreGenMapSubdirectories = "" + for subdir in MapSubdirectories: + PreGenMapSubdirectories += "MapSourceDirectories += [ DatabaseRootPath + \"/decors/_textures/" + subdir + "\" ]\n" + + destDir = WorkspaceDirectory + "/ecosystems/" + ecosystemName + mkPath(log, destDir) + + generateFile(templateDir + "/process.py", destDir + "/process.py") + generateFile(templateDir + "/directories.py", destDir + "/directories.py") + + return + + + +# Add new ecosystems below this line. + + + +# DESERT +ShapeExportOptExportLighting = DefaultShapeExportOptExportLighting +ShapeExportOptShadow = DefaultShapeExportOptShadow +ShapeExportOptLightingLimit = DefaultShapeExportOptLightingLimit +ShapeExportOptLumelSize = DefaultShapeExportOptLumelSize +ShapeExportOptOversampling = DefaultShapeExportOptOversampling +ShapeExportOpt8BitsLightmap = DefaultShapeExportOpt8BitsLightmap +ShapeExportOptLightmapLog = DefaultShapeExportOptLightmapLog +TextureMulSizeValue = DefaultTextureMulSizeValue +SeasonSuffixes = DefaultSeasonSuffixes +MapSubdirectories = [ ] +MapSubdirectories += [ "vegetations" ] +TileDirectories = [ ] +TileDirectories += [ "1.5-marecage_profond" ] +TileDirectories += [ "1-marecages" ] +TileDirectories += [ "2-citees" ] +TileDirectories += [ "3-fond_canyon" ] +TileDirectories += [ "4.2-boisbandeclair" ] +TileDirectories += [ "4.5-desert2boisbande" ] +TileDirectories += [ "4-falaise_bois_bande" ] +TileDirectories += [ "5-falaise_normales" ] +TileDirectories += [ "6.5-desertalternatif" ] +TileDirectories += [ "6-desert" ] +TileDirectories += [ "7-routes" ] +TileDirectories += [ "8-foretbrule" ] +generateEcosystem("desert", "fyros") + + +# JUNGLE +ShapeExportOptExportLighting = DefaultShapeExportOptExportLighting +ShapeExportOptShadow = DefaultShapeExportOptShadow +ShapeExportOptLightingLimit = DefaultShapeExportOptLightingLimit +ShapeExportOptLumelSize = DefaultShapeExportOptLumelSize +ShapeExportOptOversampling = DefaultShapeExportOptOversampling +ShapeExportOpt8BitsLightmap = "false" +ShapeExportOptLightmapLog = DefaultShapeExportOptLightmapLog +TextureMulSizeValue = DefaultTextureMulSizeValue +SeasonSuffixes = DefaultSeasonSuffixes +MapSubdirectories = [ ] +MapSubdirectories += [ "vegetations" ] +TileDirectories = [ ] +TileDirectories += [ "10-crevassejungle" ] +TileDirectories += [ "11-paroisjungle" ] +TileDirectories += [ "12-vasejungle" ] +TileDirectories += [ "1-junglemousse" ] +TileDirectories += [ "2-junglefeuilles" ] +TileDirectories += [ "3-jungleherbesseche" ] +TileDirectories += [ "4-jungleherbevieille" ] +TileDirectories += [ "5-jungleterreaux" ] +TileDirectories += [ "6-junglegoo" ] +TileDirectories += [ "7-sciurejungle" ] +TileDirectories += [ "8-terrejungle" ] +TileDirectories += [ "9-falaisejungle" ] +TileDirectories += [ "Transitions" ] +generateEcosystem("jungle", "jungle") + + +# PRIMES RACINES +ShapeExportOptExportLighting = DefaultShapeExportOptExportLighting +ShapeExportOptShadow = DefaultShapeExportOptShadow +ShapeExportOptLightingLimit = DefaultShapeExportOptLightingLimit +ShapeExportOptLumelSize = DefaultShapeExportOptLumelSize +ShapeExportOptOversampling = DefaultShapeExportOptOversampling +ShapeExportOpt8BitsLightmap = "false" +ShapeExportOptLightmapLog = DefaultShapeExportOptLightmapLog +TextureMulSizeValue = DefaultTextureMulSizeValue +SeasonSuffixes = DefaultSeasonSuffixes +MapSubdirectories = [ ] +MapSubdirectories += [ "vegetations" ] +MapSubdirectories += [ "batiments" ] +TileDirectories = [ ] +TileDirectories += [ "PR-creux" ] +TileDirectories += [ "PR-dome-moussu" ] +TileDirectories += [ "PR-kitiniere" ] +TileDirectories += [ "PR-mousse-licken" ] +TileDirectories += [ "PR-mousse-spongieus" ] +TileDirectories += [ "PR-parois" ] +TileDirectories += [ "PR-sol-mousse" ] +TileDirectories += [ "PR-souche" ] +TileDirectories += [ "PR-stalagmite" ] +TileDirectories += [ "PR-terre" ] +TileDirectories += [ "aditif" ] +generateEcosystem("primes_racines", "primes_racines") + + +# LACUSTRE +ShapeExportOptExportLighting = DefaultShapeExportOptExportLighting +ShapeExportOptShadow = DefaultShapeExportOptShadow +ShapeExportOptLightingLimit = "0" +ShapeExportOptLumelSize = DefaultShapeExportOptLumelSize +ShapeExportOptOversampling = "8" +ShapeExportOpt8BitsLightmap = "false" +ShapeExportOptLightmapLog = DefaultShapeExportOptLightmapLog +TextureMulSizeValue = DefaultTextureMulSizeValue +SeasonSuffixes = DefaultSeasonSuffixes +MapSubdirectories = [ ] +MapSubdirectories += [ "vegetations" ] +TileDirectories = [ ] +TileDirectories += [ "1a-sable-marin" ] +TileDirectories += [ "1-plages" ] +TileDirectories += [ "2-iles" ] +TileDirectories += [ "2-ilesa" ] +TileDirectories += [ "2-iles-marines" ] +TileDirectories += [ "3-fondmarin2plage" ] +TileDirectories += [ "4-marecages" ] +TileDirectories += [ "5-marecages" ] +TileDirectories += [ "5-parois-marine" ] +TileDirectories += [ "6-fond_marin" ] +TileDirectories += [ "7-bassesiles" ] +TileDirectories += [ "7-mousseter" ] +TileDirectories += [ "7-racines" ] +TileDirectories += [ "8-mousse_marine" ] +TileDirectories += [ "constructible" ] +generateEcosystem("lacustre", "tryker") + + + + +printLog(log, "") +log.close() diff --git a/code/nel/tools/build_gamedata/generators/generate_simple_max_exporters.py b/code/nel/tools/build_gamedata/generators/generate_simple_max_exporters.py old mode 100755 new mode 100644 index be4867840..4706dcdfd --- a/code/nel/tools/build_gamedata/generators/generate_simple_max_exporters.py +++ b/code/nel/tools/build_gamedata/generators/generate_simple_max_exporters.py @@ -1,100 +1,100 @@ -#!/usr/bin/python -# -# \file 0_setup.py -# \brief Run all setup processes -# \date 2009-02-18 15:28GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Run all setup processes -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -import time, sys, os, shutil, subprocess, distutils.dir_util -sys.path.append("../configuration") -if os.path.isfile("generate_simple_max_exporters.log"): - os.remove("generate_simple_max_exporters.log") -log = open("generate_simple_max_exporters.log", "w") -from scripts import * -from buildsite import * -from tools import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Generate simple max exporters") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -def processLine(line, processName, fileExtension, sourceDirectoriesVariable, exportDirectoryVariable, clientDirectoryVariable, dateTimeStamp): - newline = line.replace("%PreGenWarning%", "WARNING : this is a generated file, don't change it !") - newline = newline.replace("%PreGenDateTimeStamp%", dateTimeStamp) - newline = newline.replace("%PreGenProcessName%", processName) - newline = newline.replace("%PreGenFileExtension%", fileExtension) - newline = newline.replace("%PreGenSourceDirectoriesVariable%", sourceDirectoriesVariable) - newline = newline.replace("%PreGenExportDirectoryVariable%", exportDirectoryVariable) - newline = newline.replace("%PreGenInstallDirectoryVariable%", clientDirectoryVariable) - return newline - -def generateSimpleMaxExporterFile(sourceFile, destFile, writeMode, processName, fileExtension, sourceDirectoriesVariable, exportDirectoryVariable, clientDirectoryVariable, dateTimeStamp): - srcf = open(sourceFile, "r") - dstf = open(destFile, writeMode) - printLog(log, "WRITE " + destFile + " " + writeMode) - for line in srcf: - dstf.write(processLine(line, processName, fileExtension, sourceDirectoriesVariable, exportDirectoryVariable, clientDirectoryVariable, dateTimeStamp)) - dstf.close() - srcf.close() - -def generateSimpleMaxExporter(processName, fileExtension, sourceDirectoriesVariable, exportDirectoryVariable, clientDirectoryVariable): - dateTimeStamp = time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) - processDir = ScriptDirectory + "/processes/" + processName - mkPath(log, processDir) - maxscriptDir = processDir + "/maxscript" - mkPath(log, maxscriptDir) - templateDir = os.getcwd().replace("\\", "/") + "/simple_max_exporter_template" - mkPath(log, templateDir) - scriptDir = os.getcwd().replace("\\", "/") + "/max_exporter_scripts" - mkPath(log, scriptDir) - - if not os.path.isfile(processDir + "/0_setup.py"): - generateSimpleMaxExporterFile(templateDir + "/0_setup.py", processDir + "/0_setup.py", "w", processName, fileExtension, sourceDirectoriesVariable, exportDirectoryVariable, clientDirectoryVariable, dateTimeStamp) - - generateSimpleMaxExporterFile(templateDir + "/1_export_header.py", processDir + "/1_export.py", "w", processName, fileExtension, sourceDirectoriesVariable, exportDirectoryVariable, clientDirectoryVariable, dateTimeStamp) - generateSimpleMaxExporterFile(scriptDir + "/" + fileExtension + ".py", processDir + "/1_export.py", "a", processName, fileExtension, sourceDirectoriesVariable, exportDirectoryVariable, clientDirectoryVariable, dateTimeStamp) - generateSimpleMaxExporterFile(templateDir + "/1_export_footer.py", processDir + "/1_export.py", "a", processName, fileExtension, sourceDirectoriesVariable, exportDirectoryVariable, clientDirectoryVariable, dateTimeStamp) - - if not os.path.isfile(processDir + "/2_build.py"): - generateSimpleMaxExporterFile(templateDir + "/2_build.py", processDir + "/2_build.py", "w", processName, fileExtension, sourceDirectoriesVariable, exportDirectoryVariable, clientDirectoryVariable, dateTimeStamp) - if not os.path.isfile(processDir + "/3_install.py"): - generateSimpleMaxExporterFile(templateDir + "/3_install.py", processDir + "/3_install.py", "w", processName, fileExtension, sourceDirectoriesVariable, exportDirectoryVariable, clientDirectoryVariable, dateTimeStamp) - - generateSimpleMaxExporterFile(templateDir + "/export_header.ms", maxscriptDir + "/" + fileExtension + "_export.ms", "w", processName, fileExtension, sourceDirectoriesVariable, exportDirectoryVariable, clientDirectoryVariable, dateTimeStamp) - generateSimpleMaxExporterFile(scriptDir + "/" + fileExtension + ".ms", maxscriptDir + "/" + fileExtension + "_export.ms", "a", processName, fileExtension, sourceDirectoriesVariable, exportDirectoryVariable, clientDirectoryVariable, dateTimeStamp) - generateSimpleMaxExporterFile(templateDir + "/export_footer.ms", maxscriptDir + "/" + fileExtension + "_export.ms", "a", processName, fileExtension, sourceDirectoriesVariable, exportDirectoryVariable, clientDirectoryVariable, dateTimeStamp) - - - -generateSimpleMaxExporter("skel", "skel", "SkelSourceDirectories", "SkelExportDirectory", "SkelInstallDirectory") - -generateSimpleMaxExporter("swt", "swt", "SwtSourceDirectories", "SwtExportDirectory", "SwtInstallDirectory") - -generateSimpleMaxExporter("zone", "zone", "ZoneSourceDirectory", "ZoneExportDirectory", "ZoneInstallDirectory") - - - -printLog(log, "") -log.close() +#!/usr/bin/python +# +# \file 0_setup.py +# \brief Run all setup processes +# \date 2009-02-18 15:28GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Run all setup processes +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +import time, sys, os, shutil, subprocess, distutils.dir_util +sys.path.append("../configuration") +if os.path.isfile("generate_simple_max_exporters.log"): + os.remove("generate_simple_max_exporters.log") +log = open("generate_simple_max_exporters.log", "w") +from scripts import * +from buildsite import * +from tools import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Generate simple max exporters") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +def processLine(line, processName, fileExtension, sourceDirectoriesVariable, exportDirectoryVariable, clientDirectoryVariable, dateTimeStamp): + newline = line.replace("%PreGenWarning%", "WARNING : this is a generated file, don't change it !") + newline = newline.replace("%PreGenDateTimeStamp%", dateTimeStamp) + newline = newline.replace("%PreGenProcessName%", processName) + newline = newline.replace("%PreGenFileExtension%", fileExtension) + newline = newline.replace("%PreGenSourceDirectoriesVariable%", sourceDirectoriesVariable) + newline = newline.replace("%PreGenExportDirectoryVariable%", exportDirectoryVariable) + newline = newline.replace("%PreGenInstallDirectoryVariable%", clientDirectoryVariable) + return newline + +def generateSimpleMaxExporterFile(sourceFile, destFile, writeMode, processName, fileExtension, sourceDirectoriesVariable, exportDirectoryVariable, clientDirectoryVariable, dateTimeStamp): + srcf = open(sourceFile, "r") + dstf = open(destFile, writeMode) + printLog(log, "WRITE " + destFile + " " + writeMode) + for line in srcf: + dstf.write(processLine(line, processName, fileExtension, sourceDirectoriesVariable, exportDirectoryVariable, clientDirectoryVariable, dateTimeStamp)) + dstf.close() + srcf.close() + +def generateSimpleMaxExporter(processName, fileExtension, sourceDirectoriesVariable, exportDirectoryVariable, clientDirectoryVariable): + dateTimeStamp = time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + processDir = ScriptDirectory + "/processes/" + processName + mkPath(log, processDir) + maxscriptDir = processDir + "/maxscript" + mkPath(log, maxscriptDir) + templateDir = os.getcwd().replace("\\", "/") + "/simple_max_exporter_template" + mkPath(log, templateDir) + scriptDir = os.getcwd().replace("\\", "/") + "/max_exporter_scripts" + mkPath(log, scriptDir) + + if not os.path.isfile(processDir + "/0_setup.py"): + generateSimpleMaxExporterFile(templateDir + "/0_setup.py", processDir + "/0_setup.py", "w", processName, fileExtension, sourceDirectoriesVariable, exportDirectoryVariable, clientDirectoryVariable, dateTimeStamp) + + generateSimpleMaxExporterFile(templateDir + "/1_export_header.py", processDir + "/1_export.py", "w", processName, fileExtension, sourceDirectoriesVariable, exportDirectoryVariable, clientDirectoryVariable, dateTimeStamp) + generateSimpleMaxExporterFile(scriptDir + "/" + fileExtension + ".py", processDir + "/1_export.py", "a", processName, fileExtension, sourceDirectoriesVariable, exportDirectoryVariable, clientDirectoryVariable, dateTimeStamp) + generateSimpleMaxExporterFile(templateDir + "/1_export_footer.py", processDir + "/1_export.py", "a", processName, fileExtension, sourceDirectoriesVariable, exportDirectoryVariable, clientDirectoryVariable, dateTimeStamp) + + if not os.path.isfile(processDir + "/2_build.py"): + generateSimpleMaxExporterFile(templateDir + "/2_build.py", processDir + "/2_build.py", "w", processName, fileExtension, sourceDirectoriesVariable, exportDirectoryVariable, clientDirectoryVariable, dateTimeStamp) + if not os.path.isfile(processDir + "/3_install.py"): + generateSimpleMaxExporterFile(templateDir + "/3_install.py", processDir + "/3_install.py", "w", processName, fileExtension, sourceDirectoriesVariable, exportDirectoryVariable, clientDirectoryVariable, dateTimeStamp) + + generateSimpleMaxExporterFile(templateDir + "/export_header.ms", maxscriptDir + "/" + fileExtension + "_export.ms", "w", processName, fileExtension, sourceDirectoriesVariable, exportDirectoryVariable, clientDirectoryVariable, dateTimeStamp) + generateSimpleMaxExporterFile(scriptDir + "/" + fileExtension + ".ms", maxscriptDir + "/" + fileExtension + "_export.ms", "a", processName, fileExtension, sourceDirectoriesVariable, exportDirectoryVariable, clientDirectoryVariable, dateTimeStamp) + generateSimpleMaxExporterFile(templateDir + "/export_footer.ms", maxscriptDir + "/" + fileExtension + "_export.ms", "a", processName, fileExtension, sourceDirectoriesVariable, exportDirectoryVariable, clientDirectoryVariable, dateTimeStamp) + + + +generateSimpleMaxExporter("skel", "skel", "SkelSourceDirectories", "SkelExportDirectory", "SkelInstallDirectory") + +generateSimpleMaxExporter("swt", "swt", "SwtSourceDirectories", "SwtExportDirectory", "SwtInstallDirectory") + +generateSimpleMaxExporter("zone", "zone", "ZoneSourceDirectory", "ZoneExportDirectory", "ZoneInstallDirectory") + + + +printLog(log, "") +log.close() diff --git a/code/nel/tools/build_gamedata/generators/generate_tagged_max_exporters.py b/code/nel/tools/build_gamedata/generators/generate_tagged_max_exporters.py old mode 100755 new mode 100644 index 99f8cba83..6244984d2 --- a/code/nel/tools/build_gamedata/generators/generate_tagged_max_exporters.py +++ b/code/nel/tools/build_gamedata/generators/generate_tagged_max_exporters.py @@ -1,120 +1,120 @@ -#!/usr/bin/python -# -# \file 0_setup.py -# \brief Run all setup processes -# \date 2009-02-18 15:28GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Run all setup processes -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -import time, sys, os, shutil, subprocess, distutils.dir_util -sys.path.append("../configuration") -if os.path.isfile("generate_tagged_max_exporters.log"): - os.remove("generate_tagged_max_exporters.log") -log = open("generate_tagged_max_exporters.log", "w") -from scripts import * -from buildsite import * -from tools import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Generate tagged max exporters") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -templateDir = os.getcwd().replace("\\", "/") + "/tagged_max_exporter_template" -mkPath(log, templateDir) -scriptDir = os.getcwd().replace("\\", "/") + "/max_exporter_scripts" -mkPath(log, scriptDir) - -def processLine(line, processName, fileExtension, sourceDirectoriesVariable, exportDirectoryVariable, tagExportDirectoryVariable, clientDirectoryVariable, dateTimeStamp): - newline = line.replace("%PreGenWarning%", "WARNING : this is a generated file, don't change it !") - newline = newline.replace("%PreGenDateTimeStamp%", dateTimeStamp) - newline = newline.replace("%PreGenProcessName%", processName) - newline = newline.replace("%PreGenFileExtension%", fileExtension) - newline = newline.replace("%PreGenSourceDirectoriesVariable%", sourceDirectoriesVariable) - newline = newline.replace("%PreGenExportDirectoryVariable%", exportDirectoryVariable) - newline = newline.replace("%PreGenTagExportDirectoryVariable%", tagExportDirectoryVariable) - newline = newline.replace("%PreGenInstallDirectoryVariable%", clientDirectoryVariable) - return newline - -def generateTaggedMaxExporterFile(sourceFile, destFile, writeMode, processName, fileExtension, sourceDirectoriesVariable, exportDirectoryVariable, tagExportDirectoryVariable, clientDirectoryVariable, dateTimeStamp): - srcf = open(sourceFile, "r") - dstf = open(destFile, writeMode) - printLog(log, "WRITE " + destFile + " " + writeMode) - for line in srcf: - dstf.write(processLine(line, processName, fileExtension, sourceDirectoriesVariable, exportDirectoryVariable, tagExportDirectoryVariable, clientDirectoryVariable, dateTimeStamp)) - dstf.close() - srcf.close() - -def generateTaggedMaxScriptFile(processDir, processName, fileExtension, sourceDirectoriesVariable, exportDirectoryVariable, tagExportDirectoryVariable, clientDirectoryVariable, dateTimeStamp): - maxscriptDir = processDir + "/maxscript" - mkPath(log, maxscriptDir) - generateTaggedMaxExporterFile(templateDir + "/export_header.ms", maxscriptDir + "/" + fileExtension + "_export.ms", "w", processName, fileExtension, sourceDirectoriesVariable, exportDirectoryVariable, tagExportDirectoryVariable, clientDirectoryVariable, dateTimeStamp) - generateTaggedMaxExporterFile(scriptDir + "/" + fileExtension + ".ms", maxscriptDir + "/" + fileExtension + "_export.ms", "a", processName, fileExtension, sourceDirectoriesVariable, exportDirectoryVariable, tagExportDirectoryVariable, clientDirectoryVariable, dateTimeStamp) - generateTaggedMaxExporterFile(templateDir + "/export_footer.ms", maxscriptDir + "/" + fileExtension + "_export.ms", "a", processName, fileExtension, sourceDirectoriesVariable, exportDirectoryVariable, tagExportDirectoryVariable, clientDirectoryVariable, dateTimeStamp) - -def generateTaggedMaxScript(processName, fileExtension): - dateTimeStamp = time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) - processDir = ScriptDirectory + "/processes/" + processName - mkPath(log, processDir) - - generateTaggedMaxScriptFile(processDir, processName, fileExtension, "_invalid", "_invalid", "_invalid", "_invalid", dateTimeStamp) - -def generateTaggedMaxExporter(processName, fileExtension, sourceDirectoriesVariable, exportDirectoryVariable, tagExportDirectoryVariable, clientDirectoryVariable): - dateTimeStamp = time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) - processDir = ScriptDirectory + "/processes/" + processName - mkPath(log, processDir) - - if not os.path.isfile(processDir + "/0_setup.py"): - generateTaggedMaxExporterFile(templateDir + "/0_setup.py", processDir + "/0_setup.py", "w", processName, fileExtension, sourceDirectoriesVariable, exportDirectoryVariable, tagExportDirectoryVariable, clientDirectoryVariable, dateTimeStamp) - - generateTaggedMaxExporterFile(templateDir + "/1_export_header.py", processDir + "/1_export.py", "w", processName, fileExtension, sourceDirectoriesVariable, exportDirectoryVariable, tagExportDirectoryVariable, clientDirectoryVariable, dateTimeStamp) - generateTaggedMaxExporterFile(scriptDir + "/" + fileExtension + ".py", processDir + "/1_export.py", "a", processName, fileExtension, sourceDirectoriesVariable, exportDirectoryVariable, tagExportDirectoryVariable, clientDirectoryVariable, dateTimeStamp) - generateTaggedMaxExporterFile(templateDir + "/1_export_footer.py", processDir + "/1_export.py", "a", processName, fileExtension, sourceDirectoriesVariable, exportDirectoryVariable, tagExportDirectoryVariable, clientDirectoryVariable, dateTimeStamp) - - if not os.path.isfile(processDir + "/2_build.py"): - generateTaggedMaxExporterFile(templateDir + "/2_build.py", processDir + "/2_build.py", "w", processName, fileExtension, sourceDirectoriesVariable, exportDirectoryVariable, tagExportDirectoryVariable, clientDirectoryVariable, dateTimeStamp) - if not os.path.isfile(processDir + "/3_install.py"): - generateTaggedMaxExporterFile(templateDir + "/3_install.py", processDir + "/3_install.py", "w", processName, fileExtension, sourceDirectoriesVariable, exportDirectoryVariable, tagExportDirectoryVariable, clientDirectoryVariable, dateTimeStamp) - - generateTaggedMaxScriptFile(processDir, processName, fileExtension, sourceDirectoriesVariable, exportDirectoryVariable, tagExportDirectoryVariable, clientDirectoryVariable, dateTimeStamp) - - - -generateTaggedMaxExporter("pacs_prim", "pacs_prim", "PacsPrimSourceDirectories", "PacsPrimExportDirectory", "PacsPrimTagExportDirectory", "PacsPrimInstallDirectory") - -generateTaggedMaxExporter("clodbank", "clod", "ClodSourceDirectories", "ClodExportDirectory", "ClodTagExportDirectory", "ClodInstallDirectory") - -generateTaggedMaxScript("ig", "ig") - -generateTaggedMaxExporter("rbank", "cmb", "RBankCmbSourceDirectories", "RBankCmbExportDirectory", "RBankCmbTagExportDirectory", "PacsInstallDirectory") - -generateTaggedMaxExporter("veget", "veget", "VegetSourceDirectories", "VegetExportDirectory", "VegetTagExportDirectory", "VegetInstallDirectory") - -generateTaggedMaxScript("shape", "shape") - -generateTaggedMaxExporter("anim", "anim", "AnimSourceDirectories", "AnimExportDirectory", "AnimTagExportDirectory", "AnimInstallDirectory") - - - -printLog(log, "") -log.close() +#!/usr/bin/python +# +# \file 0_setup.py +# \brief Run all setup processes +# \date 2009-02-18 15:28GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Run all setup processes +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +import time, sys, os, shutil, subprocess, distutils.dir_util +sys.path.append("../configuration") +if os.path.isfile("generate_tagged_max_exporters.log"): + os.remove("generate_tagged_max_exporters.log") +log = open("generate_tagged_max_exporters.log", "w") +from scripts import * +from buildsite import * +from tools import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Generate tagged max exporters") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +templateDir = os.getcwd().replace("\\", "/") + "/tagged_max_exporter_template" +mkPath(log, templateDir) +scriptDir = os.getcwd().replace("\\", "/") + "/max_exporter_scripts" +mkPath(log, scriptDir) + +def processLine(line, processName, fileExtension, sourceDirectoriesVariable, exportDirectoryVariable, tagExportDirectoryVariable, clientDirectoryVariable, dateTimeStamp): + newline = line.replace("%PreGenWarning%", "WARNING : this is a generated file, don't change it !") + newline = newline.replace("%PreGenDateTimeStamp%", dateTimeStamp) + newline = newline.replace("%PreGenProcessName%", processName) + newline = newline.replace("%PreGenFileExtension%", fileExtension) + newline = newline.replace("%PreGenSourceDirectoriesVariable%", sourceDirectoriesVariable) + newline = newline.replace("%PreGenExportDirectoryVariable%", exportDirectoryVariable) + newline = newline.replace("%PreGenTagExportDirectoryVariable%", tagExportDirectoryVariable) + newline = newline.replace("%PreGenInstallDirectoryVariable%", clientDirectoryVariable) + return newline + +def generateTaggedMaxExporterFile(sourceFile, destFile, writeMode, processName, fileExtension, sourceDirectoriesVariable, exportDirectoryVariable, tagExportDirectoryVariable, clientDirectoryVariable, dateTimeStamp): + srcf = open(sourceFile, "r") + dstf = open(destFile, writeMode) + printLog(log, "WRITE " + destFile + " " + writeMode) + for line in srcf: + dstf.write(processLine(line, processName, fileExtension, sourceDirectoriesVariable, exportDirectoryVariable, tagExportDirectoryVariable, clientDirectoryVariable, dateTimeStamp)) + dstf.close() + srcf.close() + +def generateTaggedMaxScriptFile(processDir, processName, fileExtension, sourceDirectoriesVariable, exportDirectoryVariable, tagExportDirectoryVariable, clientDirectoryVariable, dateTimeStamp): + maxscriptDir = processDir + "/maxscript" + mkPath(log, maxscriptDir) + generateTaggedMaxExporterFile(templateDir + "/export_header.ms", maxscriptDir + "/" + fileExtension + "_export.ms", "w", processName, fileExtension, sourceDirectoriesVariable, exportDirectoryVariable, tagExportDirectoryVariable, clientDirectoryVariable, dateTimeStamp) + generateTaggedMaxExporterFile(scriptDir + "/" + fileExtension + ".ms", maxscriptDir + "/" + fileExtension + "_export.ms", "a", processName, fileExtension, sourceDirectoriesVariable, exportDirectoryVariable, tagExportDirectoryVariable, clientDirectoryVariable, dateTimeStamp) + generateTaggedMaxExporterFile(templateDir + "/export_footer.ms", maxscriptDir + "/" + fileExtension + "_export.ms", "a", processName, fileExtension, sourceDirectoriesVariable, exportDirectoryVariable, tagExportDirectoryVariable, clientDirectoryVariable, dateTimeStamp) + +def generateTaggedMaxScript(processName, fileExtension): + dateTimeStamp = time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + processDir = ScriptDirectory + "/processes/" + processName + mkPath(log, processDir) + + generateTaggedMaxScriptFile(processDir, processName, fileExtension, "_invalid", "_invalid", "_invalid", "_invalid", dateTimeStamp) + +def generateTaggedMaxExporter(processName, fileExtension, sourceDirectoriesVariable, exportDirectoryVariable, tagExportDirectoryVariable, clientDirectoryVariable): + dateTimeStamp = time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + processDir = ScriptDirectory + "/processes/" + processName + mkPath(log, processDir) + + if not os.path.isfile(processDir + "/0_setup.py"): + generateTaggedMaxExporterFile(templateDir + "/0_setup.py", processDir + "/0_setup.py", "w", processName, fileExtension, sourceDirectoriesVariable, exportDirectoryVariable, tagExportDirectoryVariable, clientDirectoryVariable, dateTimeStamp) + + generateTaggedMaxExporterFile(templateDir + "/1_export_header.py", processDir + "/1_export.py", "w", processName, fileExtension, sourceDirectoriesVariable, exportDirectoryVariable, tagExportDirectoryVariable, clientDirectoryVariable, dateTimeStamp) + generateTaggedMaxExporterFile(scriptDir + "/" + fileExtension + ".py", processDir + "/1_export.py", "a", processName, fileExtension, sourceDirectoriesVariable, exportDirectoryVariable, tagExportDirectoryVariable, clientDirectoryVariable, dateTimeStamp) + generateTaggedMaxExporterFile(templateDir + "/1_export_footer.py", processDir + "/1_export.py", "a", processName, fileExtension, sourceDirectoriesVariable, exportDirectoryVariable, tagExportDirectoryVariable, clientDirectoryVariable, dateTimeStamp) + + if not os.path.isfile(processDir + "/2_build.py"): + generateTaggedMaxExporterFile(templateDir + "/2_build.py", processDir + "/2_build.py", "w", processName, fileExtension, sourceDirectoriesVariable, exportDirectoryVariable, tagExportDirectoryVariable, clientDirectoryVariable, dateTimeStamp) + if not os.path.isfile(processDir + "/3_install.py"): + generateTaggedMaxExporterFile(templateDir + "/3_install.py", processDir + "/3_install.py", "w", processName, fileExtension, sourceDirectoriesVariable, exportDirectoryVariable, tagExportDirectoryVariable, clientDirectoryVariable, dateTimeStamp) + + generateTaggedMaxScriptFile(processDir, processName, fileExtension, sourceDirectoriesVariable, exportDirectoryVariable, tagExportDirectoryVariable, clientDirectoryVariable, dateTimeStamp) + + + +generateTaggedMaxExporter("pacs_prim", "pacs_prim", "PacsPrimSourceDirectories", "PacsPrimExportDirectory", "PacsPrimTagExportDirectory", "PacsPrimInstallDirectory") + +generateTaggedMaxExporter("clodbank", "clod", "ClodSourceDirectories", "ClodExportDirectory", "ClodTagExportDirectory", "ClodInstallDirectory") + +generateTaggedMaxScript("ig", "ig") + +generateTaggedMaxExporter("rbank", "cmb", "RBankCmbSourceDirectories", "RBankCmbExportDirectory", "RBankCmbTagExportDirectory", "PacsInstallDirectory") + +generateTaggedMaxExporter("veget", "veget", "VegetSourceDirectories", "VegetExportDirectory", "VegetTagExportDirectory", "VegetInstallDirectory") + +generateTaggedMaxScript("shape", "shape") + +generateTaggedMaxExporter("anim", "anim", "AnimSourceDirectories", "AnimExportDirectory", "AnimTagExportDirectory", "AnimInstallDirectory") + + + +printLog(log, "") +log.close() diff --git a/code/nel/tools/build_gamedata/generators/max_exporter_scripts/anim.ms b/code/nel/tools/build_gamedata/generators/max_exporter_scripts/anim.ms old mode 100755 new mode 100644 diff --git a/code/nel/tools/build_gamedata/generators/max_exporter_scripts/anim.py b/code/nel/tools/build_gamedata/generators/max_exporter_scripts/anim.py old mode 100755 new mode 100644 diff --git a/code/nel/tools/build_gamedata/generators/max_exporter_scripts/clod.ms b/code/nel/tools/build_gamedata/generators/max_exporter_scripts/clod.ms old mode 100755 new mode 100644 diff --git a/code/nel/tools/build_gamedata/generators/max_exporter_scripts/clod.py b/code/nel/tools/build_gamedata/generators/max_exporter_scripts/clod.py old mode 100755 new mode 100644 diff --git a/code/nel/tools/build_gamedata/generators/max_exporter_scripts/cmb.ms b/code/nel/tools/build_gamedata/generators/max_exporter_scripts/cmb.ms old mode 100755 new mode 100644 diff --git a/code/nel/tools/build_gamedata/generators/max_exporter_scripts/cmb.py b/code/nel/tools/build_gamedata/generators/max_exporter_scripts/cmb.py old mode 100755 new mode 100644 diff --git a/code/nel/tools/build_gamedata/generators/max_exporter_scripts/ig.ms b/code/nel/tools/build_gamedata/generators/max_exporter_scripts/ig.ms old mode 100755 new mode 100644 diff --git a/code/nel/tools/build_gamedata/generators/max_exporter_scripts/pacs_prim.ms b/code/nel/tools/build_gamedata/generators/max_exporter_scripts/pacs_prim.ms old mode 100755 new mode 100644 diff --git a/code/nel/tools/build_gamedata/generators/max_exporter_scripts/pacs_prim.py b/code/nel/tools/build_gamedata/generators/max_exporter_scripts/pacs_prim.py old mode 100755 new mode 100644 index 3edfcb66b..2e3f07ec9 --- a/code/nel/tools/build_gamedata/generators/max_exporter_scripts/pacs_prim.py +++ b/code/nel/tools/build_gamedata/generators/max_exporter_scripts/pacs_prim.py @@ -1,7 +1,7 @@ - - -# Remove bad file from previous script version -listPath = ExportBuildDirectory + "/" + %PreGenExportDirectoryVariable% + "/landscape_col_prim_pacs_list.txt" -if os.path.isfile(listPath): - os.remove(listPath) - + + +# Remove bad file from previous script version +listPath = ExportBuildDirectory + "/" + %PreGenExportDirectoryVariable% + "/landscape_col_prim_pacs_list.txt" +if os.path.isfile(listPath): + os.remove(listPath) + diff --git a/code/nel/tools/build_gamedata/generators/max_exporter_scripts/shape.ms b/code/nel/tools/build_gamedata/generators/max_exporter_scripts/shape.ms old mode 100755 new mode 100644 diff --git a/code/nel/tools/build_gamedata/generators/max_exporter_scripts/skel.ms b/code/nel/tools/build_gamedata/generators/max_exporter_scripts/skel.ms old mode 100755 new mode 100644 diff --git a/code/nel/tools/build_gamedata/generators/max_exporter_scripts/skel.py b/code/nel/tools/build_gamedata/generators/max_exporter_scripts/skel.py old mode 100755 new mode 100644 index 9ef54684e..884e11db3 --- a/code/nel/tools/build_gamedata/generators/max_exporter_scripts/skel.py +++ b/code/nel/tools/build_gamedata/generators/max_exporter_scripts/skel.py @@ -1,8 +1,8 @@ - - -printLog(log, ">>> Export skel directly <<<") -mkPath(log, ExportBuildDirectory + "/" + SkelExportDirectory) -for dir in SkelSourceDirectories: - mkPath(log, DatabaseDirectory + "/" + dir) - copyFilesExtNoSubdirIfNeeded(log, DatabaseDirectory + "/" + dir, ExportBuildDirectory + "/" + SkelExportDirectory, ".skel") - + + +printLog(log, ">>> Export skel directly <<<") +mkPath(log, ExportBuildDirectory + "/" + SkelExportDirectory) +for dir in SkelSourceDirectories: + mkPath(log, DatabaseDirectory + "/" + dir) + copyFilesExtNoSubdirIfNeeded(log, DatabaseDirectory + "/" + dir, ExportBuildDirectory + "/" + SkelExportDirectory, ".skel") + diff --git a/code/nel/tools/build_gamedata/generators/max_exporter_scripts/swt.ms b/code/nel/tools/build_gamedata/generators/max_exporter_scripts/swt.ms old mode 100755 new mode 100644 diff --git a/code/nel/tools/build_gamedata/generators/max_exporter_scripts/swt.py b/code/nel/tools/build_gamedata/generators/max_exporter_scripts/swt.py old mode 100755 new mode 100644 diff --git a/code/nel/tools/build_gamedata/generators/max_exporter_scripts/veget.ms b/code/nel/tools/build_gamedata/generators/max_exporter_scripts/veget.ms old mode 100755 new mode 100644 diff --git a/code/nel/tools/build_gamedata/generators/max_exporter_scripts/veget.py b/code/nel/tools/build_gamedata/generators/max_exporter_scripts/veget.py old mode 100755 new mode 100644 diff --git a/code/nel/tools/build_gamedata/generators/max_exporter_scripts/zone.ms b/code/nel/tools/build_gamedata/generators/max_exporter_scripts/zone.ms old mode 100755 new mode 100644 diff --git a/code/nel/tools/build_gamedata/generators/max_exporter_scripts/zone.py b/code/nel/tools/build_gamedata/generators/max_exporter_scripts/zone.py old mode 100755 new mode 100644 index 45b3b3e04..d6e821879 --- a/code/nel/tools/build_gamedata/generators/max_exporter_scripts/zone.py +++ b/code/nel/tools/build_gamedata/generators/max_exporter_scripts/zone.py @@ -1,8 +1,8 @@ - - -printLog(log, ">>> Try to copy ligo zone if any <<<") -printLog(log, "********************************") -printLog(log, "******** TODO ********") -printLog(log, "********************************") -printLog(log, "") - + + +printLog(log, ">>> Try to copy ligo zone if any <<<") +printLog(log, "********************************") +printLog(log, "******** TODO ********") +printLog(log, "********************************") +printLog(log, "") + diff --git a/code/nel/tools/build_gamedata/generators/simple_max_exporter_template/0_setup.py b/code/nel/tools/build_gamedata/generators/simple_max_exporter_template/0_setup.py old mode 100755 new mode 100644 index 520eedb03..060d00e15 --- a/code/nel/tools/build_gamedata/generators/simple_max_exporter_template/0_setup.py +++ b/code/nel/tools/build_gamedata/generators/simple_max_exporter_template/0_setup.py @@ -1,65 +1,65 @@ -#!/usr/bin/python -# -# \file 0_setup.py -# \brief setup %PreGenProcessName% -# \date %PreGenDateTimeStamp% -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Setup %PreGenProcessName% -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Setup %PreGenProcessName%") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -# Setup source directories -printLog(log, ">>> Setup source directories <<<") -for dir in %PreGenSourceDirectoriesVariable%: - mkPath(log, DatabaseDirectory + "/" + dir) - -# Setup export directories -printLog(log, ">>> Setup export directories <<<") -mkPath(log, ExportBuildDirectory + "/" + %PreGenExportDirectoryVariable%) - -# Setup build directories -printLog(log, ">>> Setup build directories <<<") - -# Setup client directories -printLog(log, ">>> Setup client directories <<<") -mkPath(log, InstallDirectory + "/" + %PreGenInstallDirectoryVariable%) - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 0_setup.py +# \brief setup %PreGenProcessName% +# \date %PreGenDateTimeStamp% +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Setup %PreGenProcessName% +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Setup %PreGenProcessName%") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +# Setup source directories +printLog(log, ">>> Setup source directories <<<") +for dir in %PreGenSourceDirectoriesVariable%: + mkPath(log, DatabaseDirectory + "/" + dir) + +# Setup export directories +printLog(log, ">>> Setup export directories <<<") +mkPath(log, ExportBuildDirectory + "/" + %PreGenExportDirectoryVariable%) + +# Setup build directories +printLog(log, ">>> Setup build directories <<<") + +# Setup client directories +printLog(log, ">>> Setup client directories <<<") +mkPath(log, InstallDirectory + "/" + %PreGenInstallDirectoryVariable%) + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/generators/simple_max_exporter_template/1_export_footer.py b/code/nel/tools/build_gamedata/generators/simple_max_exporter_template/1_export_footer.py old mode 100755 new mode 100644 index 75bc99082..f4d6f4950 --- a/code/nel/tools/build_gamedata/generators/simple_max_exporter_template/1_export_footer.py +++ b/code/nel/tools/build_gamedata/generators/simple_max_exporter_template/1_export_footer.py @@ -1,7 +1,7 @@ - - -printLog(log, "") -log.close() - - -# end of file + + +printLog(log, "") +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/generators/simple_max_exporter_template/1_export_header.py b/code/nel/tools/build_gamedata/generators/simple_max_exporter_template/1_export_header.py old mode 100755 new mode 100644 index 6e857af0d..dd5baa402 --- a/code/nel/tools/build_gamedata/generators/simple_max_exporter_template/1_export_header.py +++ b/code/nel/tools/build_gamedata/generators/simple_max_exporter_template/1_export_header.py @@ -1,92 +1,92 @@ -#!/usr/bin/python -# -# ################################################################# -# ## %PreGenWarning% -# ################################################################# -# -# \file 1_export.py -# \brief Export %PreGenProcessName% -# \date %PreGenDateTimeStamp% -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Export %PreGenProcessName% -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Export %PreGenProcessName%") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -# Find tools -# ... - -# Export %PreGenProcessName% 3dsmax -if MaxAvailable: - # Find tools - Max = findMax(log, MaxDirectory, MaxExecutable) - printLog(log, "") - - printLog(log, ">>> Export %PreGenProcessName% 3dsmax <<<") - mkPath(log, ExportBuildDirectory + "/" + %PreGenExportDirectoryVariable%) - for dir in %PreGenSourceDirectoriesVariable%: - mkPath(log, DatabaseDirectory + "/" + dir) - if (needUpdateDirByTagLog(log, DatabaseDirectory + "/" + dir, ".max", ExportBuildDirectory + "/" + %PreGenExportDirectoryVariable%, ".%PreGenFileExtension%")): - scriptSrc = "maxscript/%PreGenFileExtension%_export.ms" - scriptDst = MaxUserDirectory + "/scripts/%PreGenFileExtension%_export.ms" - outputLogfile = ScriptDirectory + "/processes/%PreGenProcessName%/log.log" - outputDirectory = ExportBuildDirectory + "/" + %PreGenExportDirectoryVariable% - maxSourceDir = DatabaseDirectory + "/" + dir - tagList = findFiles(log, outputDirectory, "", ".%PreGenFileExtension%") - tagLen = len(tagList) - if os.path.isfile(scriptDst): - os.remove(scriptDst) - tagDiff = 1 - sSrc = open(scriptSrc, "r") - sDst = open(scriptDst, "w") - for line in sSrc: - newline = line.replace("%OutputLogfile%", outputLogfile) - newline = newline.replace("%MaxSourceDirectory%", maxSourceDir) - newline = newline.replace("%OutputDirectory%", outputDirectory) - sDst.write(newline) - sSrc.close() - sDst.close() - while tagDiff > 0: - printLog(log, "MAXSCRIPT " + scriptDst) - subprocess.call([ Max, "-U", "MAXScript", "%PreGenFileExtension%_export.ms", "-q", "-mi", "-mip" ]) - tagList = findFiles(log, outputDirectory, "", ".%PreGenFileExtension%") - newTagLen = len(tagList) - tagDiff = newTagLen - tagLen - tagLen = newTagLen - printLog(log, "Exported " + str(tagDiff) + " .%PreGenFileExtension% files!") - os.remove(scriptDst) - +#!/usr/bin/python +# +# ################################################################# +# ## %PreGenWarning% +# ################################################################# +# +# \file 1_export.py +# \brief Export %PreGenProcessName% +# \date %PreGenDateTimeStamp% +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Export %PreGenProcessName% +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Export %PreGenProcessName%") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +# Find tools +# ... + +# Export %PreGenProcessName% 3dsmax +if MaxAvailable: + # Find tools + Max = findMax(log, MaxDirectory, MaxExecutable) + printLog(log, "") + + printLog(log, ">>> Export %PreGenProcessName% 3dsmax <<<") + mkPath(log, ExportBuildDirectory + "/" + %PreGenExportDirectoryVariable%) + for dir in %PreGenSourceDirectoriesVariable%: + mkPath(log, DatabaseDirectory + "/" + dir) + if (needUpdateDirByTagLog(log, DatabaseDirectory + "/" + dir, ".max", ExportBuildDirectory + "/" + %PreGenExportDirectoryVariable%, ".%PreGenFileExtension%")): + scriptSrc = "maxscript/%PreGenFileExtension%_export.ms" + scriptDst = MaxUserDirectory + "/scripts/%PreGenFileExtension%_export.ms" + outputLogfile = ScriptDirectory + "/processes/%PreGenProcessName%/log.log" + outputDirectory = ExportBuildDirectory + "/" + %PreGenExportDirectoryVariable% + maxSourceDir = DatabaseDirectory + "/" + dir + tagList = findFiles(log, outputDirectory, "", ".%PreGenFileExtension%") + tagLen = len(tagList) + if os.path.isfile(scriptDst): + os.remove(scriptDst) + tagDiff = 1 + sSrc = open(scriptSrc, "r") + sDst = open(scriptDst, "w") + for line in sSrc: + newline = line.replace("%OutputLogfile%", outputLogfile) + newline = newline.replace("%MaxSourceDirectory%", maxSourceDir) + newline = newline.replace("%OutputDirectory%", outputDirectory) + sDst.write(newline) + sSrc.close() + sDst.close() + while tagDiff > 0: + printLog(log, "MAXSCRIPT " + scriptDst) + subprocess.call([ Max, "-U", "MAXScript", "%PreGenFileExtension%_export.ms", "-q", "-mi", "-mip" ]) + tagList = findFiles(log, outputDirectory, "", ".%PreGenFileExtension%") + newTagLen = len(tagList) + tagDiff = newTagLen - tagLen + tagLen = newTagLen + printLog(log, "Exported " + str(tagDiff) + " .%PreGenFileExtension% files!") + os.remove(scriptDst) + diff --git a/code/nel/tools/build_gamedata/generators/simple_max_exporter_template/2_build.py b/code/nel/tools/build_gamedata/generators/simple_max_exporter_template/2_build.py old mode 100755 new mode 100644 index 9583c04eb..5eb9866b6 --- a/code/nel/tools/build_gamedata/generators/simple_max_exporter_template/2_build.py +++ b/code/nel/tools/build_gamedata/generators/simple_max_exporter_template/2_build.py @@ -1,49 +1,49 @@ -#!/usr/bin/python -# -# \file 2_build.py -# \brief Build %PreGenProcessName% -# \date %PreGenDateTimeStamp% -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Build %PreGenProcessName% -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Build %PreGenProcessName%") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 2_build.py +# \brief Build %PreGenProcessName% +# \date %PreGenDateTimeStamp% +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Build %PreGenProcessName% +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Build %PreGenProcessName%") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/generators/simple_max_exporter_template/3_install.py b/code/nel/tools/build_gamedata/generators/simple_max_exporter_template/3_install.py old mode 100755 new mode 100644 index f2d296d55..c245af1c3 --- a/code/nel/tools/build_gamedata/generators/simple_max_exporter_template/3_install.py +++ b/code/nel/tools/build_gamedata/generators/simple_max_exporter_template/3_install.py @@ -1,57 +1,57 @@ -#!/usr/bin/python -# -# \file 3_install.py -# \brief Install %PreGenProcessName% -# \date %PreGenDateTimeStamp% -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Install %PreGenProcessName% -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Install %PreGenProcessName%") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -printLog(log, ">>> Install %PreGenProcessName% <<<") -exportPath = ExportBuildDirectory + "/" + %PreGenExportDirectoryVariable% -mkPath(log, exportPath) -installPath = InstallDirectory + "/" + %PreGenInstallDirectoryVariable% -mkPath(log, installPath) -copyFilesExtNoSubdirIfNeeded(log, exportPath, installPath, ".%PreGenFileExtension%") - -printLog(log, "") -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 3_install.py +# \brief Install %PreGenProcessName% +# \date %PreGenDateTimeStamp% +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Install %PreGenProcessName% +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Install %PreGenProcessName%") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +printLog(log, ">>> Install %PreGenProcessName% <<<") +exportPath = ExportBuildDirectory + "/" + %PreGenExportDirectoryVariable% +mkPath(log, exportPath) +installPath = InstallDirectory + "/" + %PreGenInstallDirectoryVariable% +mkPath(log, installPath) +copyFilesExtNoSubdirIfNeeded(log, exportPath, installPath, ".%PreGenFileExtension%") + +printLog(log, "") +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/generators/simple_max_exporter_template/export_footer.ms b/code/nel/tools/build_gamedata/generators/simple_max_exporter_template/export_footer.ms old mode 100755 new mode 100644 diff --git a/code/nel/tools/build_gamedata/generators/simple_max_exporter_template/export_header.ms b/code/nel/tools/build_gamedata/generators/simple_max_exporter_template/export_header.ms old mode 100755 new mode 100644 diff --git a/code/nel/tools/build_gamedata/generators/tagged_max_exporter_template/0_setup.py b/code/nel/tools/build_gamedata/generators/tagged_max_exporter_template/0_setup.py old mode 100755 new mode 100644 index 6bd49c40f..b72650db1 --- a/code/nel/tools/build_gamedata/generators/tagged_max_exporter_template/0_setup.py +++ b/code/nel/tools/build_gamedata/generators/tagged_max_exporter_template/0_setup.py @@ -1,66 +1,66 @@ -#!/usr/bin/python -# -# \file 0_setup.py -# \brief setup %PreGenProcessName% -# \date %PreGenDateTimeStamp% -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Setup %PreGenProcessName% -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Setup %PreGenProcessName%") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -# Setup source directories -printLog(log, ">>> Setup source directories <<<") -for dir in %PreGenSourceDirectoriesVariable%: - mkPath(log, DatabaseDirectory + "/" + dir) - -# Setup export directories -printLog(log, ">>> Setup export directories <<<") -mkPath(log, ExportBuildDirectory + "/" + %PreGenExportDirectoryVariable%) -mkPath(log, ExportBuildDirectory + "/" + %PreGenTagExportDirectoryVariable%) - -# Setup build directories -printLog(log, ">>> Setup build directories <<<") - -# Setup client directories -printLog(log, ">>> Setup client directories <<<") -mkPath(log, InstallDirectory + "/" + %PreGenInstallDirectoryVariable%) - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 0_setup.py +# \brief setup %PreGenProcessName% +# \date %PreGenDateTimeStamp% +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Setup %PreGenProcessName% +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Setup %PreGenProcessName%") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +# Setup source directories +printLog(log, ">>> Setup source directories <<<") +for dir in %PreGenSourceDirectoriesVariable%: + mkPath(log, DatabaseDirectory + "/" + dir) + +# Setup export directories +printLog(log, ">>> Setup export directories <<<") +mkPath(log, ExportBuildDirectory + "/" + %PreGenExportDirectoryVariable%) +mkPath(log, ExportBuildDirectory + "/" + %PreGenTagExportDirectoryVariable%) + +# Setup build directories +printLog(log, ">>> Setup build directories <<<") + +# Setup client directories +printLog(log, ">>> Setup client directories <<<") +mkPath(log, InstallDirectory + "/" + %PreGenInstallDirectoryVariable%) + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/generators/tagged_max_exporter_template/1_export_footer.py b/code/nel/tools/build_gamedata/generators/tagged_max_exporter_template/1_export_footer.py old mode 100755 new mode 100644 index de627d6c7..1c5d530f1 --- a/code/nel/tools/build_gamedata/generators/tagged_max_exporter_template/1_export_footer.py +++ b/code/nel/tools/build_gamedata/generators/tagged_max_exporter_template/1_export_footer.py @@ -1,9 +1,9 @@ - - -log.close() -if os.path.isfile("log.log"): - os.remove("log.log") -shutil.move("temp_log.log", "log.log") - - -# end of file + + +log.close() +if os.path.isfile("log.log"): + os.remove("log.log") +shutil.move("temp_log.log", "log.log") + + +# end of file diff --git a/code/nel/tools/build_gamedata/generators/tagged_max_exporter_template/1_export_header.py b/code/nel/tools/build_gamedata/generators/tagged_max_exporter_template/1_export_header.py old mode 100755 new mode 100644 index 523001d22..cd0e974e0 --- a/code/nel/tools/build_gamedata/generators/tagged_max_exporter_template/1_export_header.py +++ b/code/nel/tools/build_gamedata/generators/tagged_max_exporter_template/1_export_header.py @@ -1,130 +1,130 @@ -#!/usr/bin/python -# -# ################################################################# -# ## %PreGenWarning% -# ################################################################# -# -# \file 1_export.py -# \brief Export %PreGenProcessName% -# \date %PreGenDateTimeStamp% -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Export %PreGenProcessName% -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -import time, sys, os, shutil, subprocess, distutils.dir_util -sys.path.append("../../configuration") - -if os.path.isfile("log.log"): - os.remove("log.log") -if os.path.isfile("temp_log.log"): - os.remove("temp_log.log") -log = open("temp_log.log", "w") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Export %PreGenProcessName%") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - - -# Find tools -# ... - -# Export %PreGenProcessName% 3dsmax -if MaxAvailable: - # Find tools - Max = findMax(log, MaxDirectory, MaxExecutable) - printLog(log, "") - - printLog(log, ">>> Export %PreGenProcessName% 3dsmax <<<") - mkPath(log, ExportBuildDirectory + "/" + %PreGenExportDirectoryVariable%) - mkPath(log, ExportBuildDirectory + "/" + %PreGenTagExportDirectoryVariable%) - for dir in %PreGenSourceDirectoriesVariable%: - mkPath(log, DatabaseDirectory + "/" + dir) - if (needUpdateDirByTagLog(log, DatabaseDirectory + "/" + dir, ".max", ExportBuildDirectory + "/" + %PreGenTagExportDirectoryVariable%, ".max.tag")): - scriptSrc = "maxscript/%PreGenFileExtension%_export.ms" - scriptDst = MaxUserDirectory + "/scripts/%PreGenFileExtension%_export.ms" - outputLogfile = ScriptDirectory + "/processes/%PreGenProcessName%/log.log" - outputDirectory = ExportBuildDirectory + "/" + %PreGenExportDirectoryVariable% - tagDirectory = ExportBuildDirectory + "/" + %PreGenTagExportDirectoryVariable% - maxSourceDir = DatabaseDirectory + "/" + dir - maxRunningTagFile = tagDirectory + "/max_running.tag" - tagList = findFiles(log, tagDirectory, "", ".max.tag") - tagLen = len(tagList) - if os.path.isfile(scriptDst): - os.remove(scriptDst) - tagDiff = 1 - sSrc = open(scriptSrc, "r") - sDst = open(scriptDst, "w") - for line in sSrc: - newline = line.replace("%OutputLogfile%", outputLogfile) - newline = newline.replace("%MaxSourceDirectory%", maxSourceDir) - newline = newline.replace("%OutputDirectory%", outputDirectory) - newline = newline.replace("%TagDirectory%", tagDirectory) - sDst.write(newline) - sSrc.close() - sDst.close() - zeroRetryLimit = 3 - while tagDiff > 0: - mrt = open(maxRunningTagFile, "w") - mrt.write("moe-moe-kyun") - mrt.close() - printLog(log, "MAXSCRIPT " + scriptDst) - subprocess.call([ Max, "-U", "MAXScript", "%PreGenFileExtension%_export.ms", "-q", "-mi", "-mip" ]) - if os.path.exists(outputLogfile): - try: - lSrc = open(outputLogfile, "r") - for line in lSrc: - lineStrip = line.strip() - if (len(lineStrip) > 0): - printLog(log, lineStrip) - lSrc.close() - os.remove(outputLogfile) - except Exception: - printLog(log, "ERROR Failed to read 3dsmax log") - else: - printLog(log, "WARNING No 3dsmax log") - tagList = findFiles(log, tagDirectory, "", ".max.tag") - newTagLen = len(tagList) - tagDiff = newTagLen - tagLen - tagLen = newTagLen - addTagDiff = 0 - if os.path.exists(maxRunningTagFile): - printLog(log, "FAIL 3ds Max crashed and/or file export failed!") - if tagDiff == 0: - if zeroRetryLimit > 0: - zeroRetryLimit = zeroRetryLimit - 1 - addTagDiff = 1 - else: - printLog(log, "FAIL Retry limit reached!") - else: - addTagDiff = 1 - os.remove(maxRunningTagFile) - printLog(log, "Exported " + str(tagDiff) + " .max files!") - tagDiff += addTagDiff - os.remove(scriptDst) - printLog(log, "") - +#!/usr/bin/python +# +# ################################################################# +# ## %PreGenWarning% +# ################################################################# +# +# \file 1_export.py +# \brief Export %PreGenProcessName% +# \date %PreGenDateTimeStamp% +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Export %PreGenProcessName% +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +import time, sys, os, shutil, subprocess, distutils.dir_util +sys.path.append("../../configuration") + +if os.path.isfile("log.log"): + os.remove("log.log") +if os.path.isfile("temp_log.log"): + os.remove("temp_log.log") +log = open("temp_log.log", "w") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Export %PreGenProcessName%") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + + +# Find tools +# ... + +# Export %PreGenProcessName% 3dsmax +if MaxAvailable: + # Find tools + Max = findMax(log, MaxDirectory, MaxExecutable) + printLog(log, "") + + printLog(log, ">>> Export %PreGenProcessName% 3dsmax <<<") + mkPath(log, ExportBuildDirectory + "/" + %PreGenExportDirectoryVariable%) + mkPath(log, ExportBuildDirectory + "/" + %PreGenTagExportDirectoryVariable%) + for dir in %PreGenSourceDirectoriesVariable%: + mkPath(log, DatabaseDirectory + "/" + dir) + if (needUpdateDirByTagLog(log, DatabaseDirectory + "/" + dir, ".max", ExportBuildDirectory + "/" + %PreGenTagExportDirectoryVariable%, ".max.tag")): + scriptSrc = "maxscript/%PreGenFileExtension%_export.ms" + scriptDst = MaxUserDirectory + "/scripts/%PreGenFileExtension%_export.ms" + outputLogfile = ScriptDirectory + "/processes/%PreGenProcessName%/log.log" + outputDirectory = ExportBuildDirectory + "/" + %PreGenExportDirectoryVariable% + tagDirectory = ExportBuildDirectory + "/" + %PreGenTagExportDirectoryVariable% + maxSourceDir = DatabaseDirectory + "/" + dir + maxRunningTagFile = tagDirectory + "/max_running.tag" + tagList = findFiles(log, tagDirectory, "", ".max.tag") + tagLen = len(tagList) + if os.path.isfile(scriptDst): + os.remove(scriptDst) + tagDiff = 1 + sSrc = open(scriptSrc, "r") + sDst = open(scriptDst, "w") + for line in sSrc: + newline = line.replace("%OutputLogfile%", outputLogfile) + newline = newline.replace("%MaxSourceDirectory%", maxSourceDir) + newline = newline.replace("%OutputDirectory%", outputDirectory) + newline = newline.replace("%TagDirectory%", tagDirectory) + sDst.write(newline) + sSrc.close() + sDst.close() + zeroRetryLimit = 3 + while tagDiff > 0: + mrt = open(maxRunningTagFile, "w") + mrt.write("moe-moe-kyun") + mrt.close() + printLog(log, "MAXSCRIPT " + scriptDst) + subprocess.call([ Max, "-U", "MAXScript", "%PreGenFileExtension%_export.ms", "-q", "-mi", "-mip" ]) + if os.path.exists(outputLogfile): + try: + lSrc = open(outputLogfile, "r") + for line in lSrc: + lineStrip = line.strip() + if (len(lineStrip) > 0): + printLog(log, lineStrip) + lSrc.close() + os.remove(outputLogfile) + except Exception: + printLog(log, "ERROR Failed to read 3dsmax log") + else: + printLog(log, "WARNING No 3dsmax log") + tagList = findFiles(log, tagDirectory, "", ".max.tag") + newTagLen = len(tagList) + tagDiff = newTagLen - tagLen + tagLen = newTagLen + addTagDiff = 0 + if os.path.exists(maxRunningTagFile): + printLog(log, "FAIL 3ds Max crashed and/or file export failed!") + if tagDiff == 0: + if zeroRetryLimit > 0: + zeroRetryLimit = zeroRetryLimit - 1 + addTagDiff = 1 + else: + printLog(log, "FAIL Retry limit reached!") + else: + addTagDiff = 1 + os.remove(maxRunningTagFile) + printLog(log, "Exported " + str(tagDiff) + " .max files!") + tagDiff += addTagDiff + os.remove(scriptDst) + printLog(log, "") + diff --git a/code/nel/tools/build_gamedata/generators/tagged_max_exporter_template/2_build.py b/code/nel/tools/build_gamedata/generators/tagged_max_exporter_template/2_build.py old mode 100755 new mode 100644 index 9583c04eb..5eb9866b6 --- a/code/nel/tools/build_gamedata/generators/tagged_max_exporter_template/2_build.py +++ b/code/nel/tools/build_gamedata/generators/tagged_max_exporter_template/2_build.py @@ -1,49 +1,49 @@ -#!/usr/bin/python -# -# \file 2_build.py -# \brief Build %PreGenProcessName% -# \date %PreGenDateTimeStamp% -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Build %PreGenProcessName% -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Build %PreGenProcessName%") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 2_build.py +# \brief Build %PreGenProcessName% +# \date %PreGenDateTimeStamp% +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Build %PreGenProcessName% +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Build %PreGenProcessName%") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/generators/tagged_max_exporter_template/3_install.py b/code/nel/tools/build_gamedata/generators/tagged_max_exporter_template/3_install.py old mode 100755 new mode 100644 index 65122f3f8..97bb5983a --- a/code/nel/tools/build_gamedata/generators/tagged_max_exporter_template/3_install.py +++ b/code/nel/tools/build_gamedata/generators/tagged_max_exporter_template/3_install.py @@ -1,57 +1,57 @@ -#!/usr/bin/python -# -# \file 3_install.py -# \brief Install %PreGenProcessName% -# \date %PreGenDateTimeStamp% -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Install %PreGenProcessName% -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Install %PreGenProcessName%") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -printLog(log, ">>> Install %PreGenProcessName% <<<") -exportPath = ExportBuildDirectory + "/" + %PreGenExportDirectoryVariable% -mkPath(log, exportPath) -installPath = InstallDirectory + "/" + %PreGenInstallDirectoryVariable% -mkPath(log, installPath) -copyFilesNoTreeIfNeeded(log, exportPath, installPath) - -printLog(log, "") -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 3_install.py +# \brief Install %PreGenProcessName% +# \date %PreGenDateTimeStamp% +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Install %PreGenProcessName% +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Install %PreGenProcessName%") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +printLog(log, ">>> Install %PreGenProcessName% <<<") +exportPath = ExportBuildDirectory + "/" + %PreGenExportDirectoryVariable% +mkPath(log, exportPath) +installPath = InstallDirectory + "/" + %PreGenInstallDirectoryVariable% +mkPath(log, installPath) +copyFilesNoTreeIfNeeded(log, exportPath, installPath) + +printLog(log, "") +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/generators/tagged_max_exporter_template/export_footer.ms b/code/nel/tools/build_gamedata/generators/tagged_max_exporter_template/export_footer.ms old mode 100755 new mode 100644 diff --git a/code/nel/tools/build_gamedata/generators/tagged_max_exporter_template/export_header.ms b/code/nel/tools/build_gamedata/generators/tagged_max_exporter_template/export_header.ms old mode 100755 new mode 100644 diff --git a/code/nel/tools/build_gamedata/processes/0_setup.py b/code/nel/tools/build_gamedata/processes/0_setup.py old mode 100755 new mode 100644 index 6fb354781..01eab6102 --- a/code/nel/tools/build_gamedata/processes/0_setup.py +++ b/code/nel/tools/build_gamedata/processes/0_setup.py @@ -1,89 +1,89 @@ -#!/usr/bin/python -# -# \file 0_setup.py -# \brief Run all setup processes -# \date 2009-02-18 15:28GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Run all setup processes -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -#printLog(log, "") -#printLog(log, "-------") -#printLog(log, "--- Setup project") -#printLog(log, "-------") -#printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -#printLog(log, "") - -#printLog(log, "") -#printLog(log, "-------") -#printLog(log, "--- Setup client directories") -#printLog(log, "-------") -#printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -#printLog(log, "") -#for dir in ClientSetupDirectories: -# mkPath(log, InstallDirectory + "/" + dir) -#printLog(log, "") - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Run the setup processes") -printLog(log, "-------") -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" ]) - except Exception, e: - printLog(log, "<" + processName + "> " + str(e)) - os.chdir("..") - try: - processLog = open(processName + "/log.log", "r") - processLogData = processLog.read() - processLog.close() - log.write(processLogData) - except Exception, e: - printLog(log, "<" + processName + "> " + str(e)) - # subprocess.call("idle.bat") - else: - printLog(log, "IGNORE PROCESS " + processName) -printLog(log, "") - -log.close() +#!/usr/bin/python +# +# \file 0_setup.py +# \brief Run all setup processes +# \date 2009-02-18 15:28GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Run all setup processes +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +#printLog(log, "") +#printLog(log, "-------") +#printLog(log, "--- Setup project") +#printLog(log, "-------") +#printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +#printLog(log, "") + +#printLog(log, "") +#printLog(log, "-------") +#printLog(log, "--- Setup client directories") +#printLog(log, "-------") +#printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +#printLog(log, "") +#for dir in ClientSetupDirectories: +# mkPath(log, InstallDirectory + "/" + dir) +#printLog(log, "") + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Run the setup processes") +printLog(log, "-------") +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" ]) + except Exception, e: + printLog(log, "<" + processName + "> " + str(e)) + os.chdir("..") + try: + processLog = open(processName + "/log.log", "r") + processLogData = processLog.read() + processLog.close() + log.write(processLogData) + except Exception, e: + printLog(log, "<" + processName + "> " + str(e)) + # subprocess.call("idle.bat") + else: + printLog(log, "IGNORE PROCESS " + processName) +printLog(log, "") + +log.close() diff --git a/code/nel/tools/build_gamedata/processes/1_export.py b/code/nel/tools/build_gamedata/processes/1_export.py old mode 100755 new mode 100644 index f3ea98ed7..21b10b058 --- a/code/nel/tools/build_gamedata/processes/1_export.py +++ b/code/nel/tools/build_gamedata/processes/1_export.py @@ -1,73 +1,73 @@ -#!/usr/bin/python -# -# \file 1_export.py -# \brief Run all export processes -# \date 2009-02-18 09:22GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Run all export processes -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -# Log error -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Run the export processes") -printLog(log, "-------") -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" ]) - except Exception, e: - printLog(log, "<" + processName + "> " + str(e)) - os.chdir("..") - try: - processLog = open(processName + "/log.log", "r") - processLogData = processLog.read() - processLog.close() - log.write(processLogData) - except Exception, e: - printLog(log, "<" + processName + "> " + str(e)) - # subprocess.call("idle.bat") - else: - printLog(log, "IGNORE PROCESS " + processName) -printLog(log, "") - -log.close() +#!/usr/bin/python +# +# \file 1_export.py +# \brief Run all export processes +# \date 2009-02-18 09:22GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Run all export processes +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +# Log error +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Run the export processes") +printLog(log, "-------") +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" ]) + except Exception, e: + printLog(log, "<" + processName + "> " + str(e)) + os.chdir("..") + try: + processLog = open(processName + "/log.log", "r") + processLogData = processLog.read() + processLog.close() + log.write(processLogData) + except Exception, e: + printLog(log, "<" + processName + "> " + str(e)) + # subprocess.call("idle.bat") + else: + printLog(log, "IGNORE PROCESS " + processName) +printLog(log, "") + +log.close() diff --git a/code/nel/tools/build_gamedata/processes/2_build.py b/code/nel/tools/build_gamedata/processes/2_build.py old mode 100755 new mode 100644 index eea528708..706db4b45 --- a/code/nel/tools/build_gamedata/processes/2_build.py +++ b/code/nel/tools/build_gamedata/processes/2_build.py @@ -1,73 +1,73 @@ -#!/usr/bin/python -# -# \file 2_build.py -# \brief Run all build processes -# \date 2009-02-18 09:22GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Run all build processes -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -# Log error -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Run the build processes") -printLog(log, "-------") -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" ]) - except Exception, e: - printLog(log, "<" + processName + "> " + str(e)) - os.chdir("..") - try: - processLog = open(processName + "/log.log", "r") - processLogData = processLog.read() - processLog.close() - log.write(processLogData) - except Exception, e: - printLog(log, "<" + processName + "> " + str(e)) - # subprocess.call("idle.bat") - else: - printLog(log, "IGNORE PROCESS " + processName) -printLog(log, "") - -log.close() +#!/usr/bin/python +# +# \file 2_build.py +# \brief Run all build processes +# \date 2009-02-18 09:22GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Run all build processes +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +# Log error +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Run the build processes") +printLog(log, "-------") +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" ]) + except Exception, e: + printLog(log, "<" + processName + "> " + str(e)) + os.chdir("..") + try: + processLog = open(processName + "/log.log", "r") + processLogData = processLog.read() + processLog.close() + log.write(processLogData) + except Exception, e: + printLog(log, "<" + processName + "> " + str(e)) + # subprocess.call("idle.bat") + else: + printLog(log, "IGNORE PROCESS " + processName) +printLog(log, "") + +log.close() diff --git a/code/nel/tools/build_gamedata/processes/3_install.py b/code/nel/tools/build_gamedata/processes/3_install.py old mode 100755 new mode 100644 index a34fdbce6..9f7147d09 --- a/code/nel/tools/build_gamedata/processes/3_install.py +++ b/code/nel/tools/build_gamedata/processes/3_install.py @@ -1,72 +1,72 @@ -#!/usr/bin/python -# -# \file 3_install.py -# \brief Run all install processes -# \date 2009-02-18 16:19GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Run all install processes -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -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, "") -# 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" ]) - except Exception, e: - printLog(log, "<" + processName + "> " + str(e)) - os.chdir("..") - try: - processLog = open(processName + "/log.log", "r") - processLogData = processLog.read() - processLog.close() - log.write(processLogData) - except Exception, e: - printLog(log, "<" + processName + "> " + str(e)) - # subprocess.call("idle.bat") - else: - printLog(log, "IGNORE PROCESS " + processName) -printLog(log, "") - -log.close() +#!/usr/bin/python +# +# \file 3_install.py +# \brief Run all install processes +# \date 2009-02-18 16:19GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Run all install processes +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +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, "") +# 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" ]) + except Exception, e: + printLog(log, "<" + processName + "> " + str(e)) + os.chdir("..") + try: + processLog = open(processName + "/log.log", "r") + processLogData = processLog.read() + processLog.close() + log.write(processLogData) + except Exception, e: + printLog(log, "<" + processName + "> " + str(e)) + # subprocess.call("idle.bat") + else: + printLog(log, "IGNORE PROCESS " + processName) +printLog(log, "") + +log.close() diff --git a/code/nel/tools/build_gamedata/processes/_dummy/0_setup.py b/code/nel/tools/build_gamedata/processes/_dummy/0_setup.py old mode 100755 new mode 100644 index e3104979d..4880523d1 --- a/code/nel/tools/build_gamedata/processes/_dummy/0_setup.py +++ b/code/nel/tools/build_gamedata/processes/_dummy/0_setup.py @@ -1,66 +1,66 @@ -#!/usr/bin/python -# -# \file 0_setup.py -# \brief setup dummy -# \date 2010-05-24 13:42GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Setup dummy -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Setup dummy") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -# Setup source directories -printLog(log, ">>> Setup source directories <<<") -#for dir in MapSourceDirectories: -# mkPath(log, DatabaseDirectory + "/" + dir) - -# Setup export directories -printLog(log, ">>> Setup export directories <<<") -#mkPath(log, ExportBuildDirectory + "/" + DummyTagExportDirectory) - -# Setup build directories -printLog(log, ">>> Setup build directories <<<") -#mkPath(log, ExportBuildDirectory + "/" + DummyWithCoarseMeshBuildDirectory) - -# Setup client directories -printLog(log, ">>> Setup client directories <<<") -#mkPath(log, InstallDirectory + "/" + DummyInstallDirectory) - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 0_setup.py +# \brief setup dummy +# \date 2010-05-24 13:42GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Setup dummy +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Setup dummy") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +# Setup source directories +printLog(log, ">>> Setup source directories <<<") +#for dir in MapSourceDirectories: +# mkPath(log, DatabaseDirectory + "/" + dir) + +# Setup export directories +printLog(log, ">>> Setup export directories <<<") +#mkPath(log, ExportBuildDirectory + "/" + DummyTagExportDirectory) + +# Setup build directories +printLog(log, ">>> Setup build directories <<<") +#mkPath(log, ExportBuildDirectory + "/" + DummyWithCoarseMeshBuildDirectory) + +# Setup client directories +printLog(log, ">>> Setup client directories <<<") +#mkPath(log, InstallDirectory + "/" + DummyInstallDirectory) + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/_dummy/1_export.py b/code/nel/tools/build_gamedata/processes/_dummy/1_export.py old mode 100755 new mode 100644 index 373f984ae..6f0aab13f --- a/code/nel/tools/build_gamedata/processes/_dummy/1_export.py +++ b/code/nel/tools/build_gamedata/processes/_dummy/1_export.py @@ -1,117 +1,117 @@ -#!/usr/bin/python -# -# \file 1_export.py -# \brief Export dummy -# \date 2010-05-24 13:42GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Export dummy -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Export dummy") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -if MaxAvailable: - # Find tools - Max = findMax(log, MaxDirectory, MaxExecutable) - # ExecTimeout = findTool(log, ToolDirectories, ExecTimeoutTool, ToolSuffix) - printLog(log, "") - - # Export dummy 3dsmax - printLog(log, ">>> Export dummy 3dsmax <<<") - - # Build paths - #scriptSrc = "maxscript/dummy_export.ms" - # scriptDst = MaxDirectory + "/scripts/dummy_export.ms" - #scriptDst = MaxUserDirectory + "/scripts/dummy_export.ms" - #logFile = ScriptDirectory + "/processes/dummy/log.log" - #outDirTag = ExportBuildDirectory + "/" + DummyTagExportDirectory - #mkPath(log, outDirTag) - #outDirWithoutCoarse = ExportBuildDirectory + "/" + DummyExportDirectory - #mkPath(log, outDirWithoutCoarse) - #outDirWithCoarse = ExportBuildDirectory + "/" + DummyWithCoarseMeshExportDirectory - #mkPath(log, outDirWithCoarse) - #outDirLightmap = ExportBuildDirectory + "/" + DummyLightmapNotOptimizedExportDirectory - #mkPath(log, outDirLightmap) - #outDirAnim = ExportBuildDirectory + "/" + DummyAnimExportDirectory - #mkPath(log, outDirAnim) - - #tagList = findFiles(log, outDirTag, "", ".tag") - #tagLen = len(tagList) - - # For each directoy - #if os.path.isfile(scriptDst): - # os.remove(scriptDst) - #for dir in DummySourceDirectories: - # tagDiff = 1 - # dummySourceDir = DatabaseDirectory + "/" + dir - # mkPath(log, dummySourceDir) - # sSrc = open(scriptSrc, "r") - # sDst = open(scriptDst, "w") - # for line in sSrc: - # newline = line.replace("output_logfile", logFile) - # newline = newline.replace("dummy_source_directory", dummySourceDir) - # newline = newline.replace("output_directory_tag", outDirTag) - # newline = newline.replace("output_directory_without_coarse_mesh", outDirWithoutCoarse) - # newline = newline.replace("output_directory_with_coarse_mesh", outDirWithCoarse) - # newline = newline.replace("dummy_export_opt_export_lighting", DummyExportOptExportLighting) - # newline = newline.replace("dummy_export_opt_shadow", DummyExportOptShadow) - # newline = newline.replace("dummy_export_opt_lighting_limit", str(DummyExportOptLightingLimit)) - # newline = newline.replace("dummy_export_opt_lumel_size", DummyExportOptLumelSize) - # newline = newline.replace("dummy_export_opt_oversampling", str(DummyExportOptOversampling)) - # newline = newline.replace("dummy_export_opt_lightmap_log", DummyExportOptLightmapLog) - # newline = newline.replace("dummy_lightmap_path", outDirLightmap) - # newline = newline.replace("output_directory_anim", outDirAnim) - # sDst.write(newline) - # sSrc.close() - # sDst.close() - # while tagDiff > 0: - # printLog(log, "MAXSCRIPT " + scriptDst) - # subprocess.call([ Max, "-U", "MAXScript", "dummy_export.ms", "-q", "-mi", "-mip" ]) - # tagList = findFiles(log, outDirTag, "", ".tag") - # newTagLen = len(tagList) - # tagDiff = newTagLen - tagLen - # tagLen = newTagLen - # printLog(log, "Exported " + str(tagDiff) + " .max files!") - # tagDiff += hackBdummyTree() # force rerun also when bdummy tree deleted - # os.remove(scriptDst) - - -printLog(log, "") - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 1_export.py +# \brief Export dummy +# \date 2010-05-24 13:42GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Export dummy +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Export dummy") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +if MaxAvailable: + # Find tools + Max = findMax(log, MaxDirectory, MaxExecutable) + # ExecTimeout = findTool(log, ToolDirectories, ExecTimeoutTool, ToolSuffix) + printLog(log, "") + + # Export dummy 3dsmax + printLog(log, ">>> Export dummy 3dsmax <<<") + + # Build paths + #scriptSrc = "maxscript/dummy_export.ms" + # scriptDst = MaxDirectory + "/scripts/dummy_export.ms" + #scriptDst = MaxUserDirectory + "/scripts/dummy_export.ms" + #logFile = ScriptDirectory + "/processes/dummy/log.log" + #outDirTag = ExportBuildDirectory + "/" + DummyTagExportDirectory + #mkPath(log, outDirTag) + #outDirWithoutCoarse = ExportBuildDirectory + "/" + DummyExportDirectory + #mkPath(log, outDirWithoutCoarse) + #outDirWithCoarse = ExportBuildDirectory + "/" + DummyWithCoarseMeshExportDirectory + #mkPath(log, outDirWithCoarse) + #outDirLightmap = ExportBuildDirectory + "/" + DummyLightmapNotOptimizedExportDirectory + #mkPath(log, outDirLightmap) + #outDirAnim = ExportBuildDirectory + "/" + DummyAnimExportDirectory + #mkPath(log, outDirAnim) + + #tagList = findFiles(log, outDirTag, "", ".tag") + #tagLen = len(tagList) + + # For each directoy + #if os.path.isfile(scriptDst): + # os.remove(scriptDst) + #for dir in DummySourceDirectories: + # tagDiff = 1 + # dummySourceDir = DatabaseDirectory + "/" + dir + # mkPath(log, dummySourceDir) + # sSrc = open(scriptSrc, "r") + # sDst = open(scriptDst, "w") + # for line in sSrc: + # newline = line.replace("output_logfile", logFile) + # newline = newline.replace("dummy_source_directory", dummySourceDir) + # newline = newline.replace("output_directory_tag", outDirTag) + # newline = newline.replace("output_directory_without_coarse_mesh", outDirWithoutCoarse) + # newline = newline.replace("output_directory_with_coarse_mesh", outDirWithCoarse) + # newline = newline.replace("dummy_export_opt_export_lighting", DummyExportOptExportLighting) + # newline = newline.replace("dummy_export_opt_shadow", DummyExportOptShadow) + # newline = newline.replace("dummy_export_opt_lighting_limit", str(DummyExportOptLightingLimit)) + # newline = newline.replace("dummy_export_opt_lumel_size", DummyExportOptLumelSize) + # newline = newline.replace("dummy_export_opt_oversampling", str(DummyExportOptOversampling)) + # newline = newline.replace("dummy_export_opt_lightmap_log", DummyExportOptLightmapLog) + # newline = newline.replace("dummy_lightmap_path", outDirLightmap) + # newline = newline.replace("output_directory_anim", outDirAnim) + # sDst.write(newline) + # sSrc.close() + # sDst.close() + # while tagDiff > 0: + # printLog(log, "MAXSCRIPT " + scriptDst) + # subprocess.call([ Max, "-U", "MAXScript", "dummy_export.ms", "-q", "-mi", "-mip" ]) + # tagList = findFiles(log, outDirTag, "", ".tag") + # newTagLen = len(tagList) + # tagDiff = newTagLen - tagLen + # tagLen = newTagLen + # printLog(log, "Exported " + str(tagDiff) + " .max files!") + # tagDiff += hackBdummyTree() # force rerun also when bdummy tree deleted + # os.remove(scriptDst) + + +printLog(log, "") + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/_dummy/2_build.py b/code/nel/tools/build_gamedata/processes/_dummy/2_build.py old mode 100755 new mode 100644 index 6dd48b9e2..dfcd68e23 --- a/code/nel/tools/build_gamedata/processes/_dummy/2_build.py +++ b/code/nel/tools/build_gamedata/processes/_dummy/2_build.py @@ -1,96 +1,96 @@ -#!/usr/bin/python -# -# \file 2_build.py -# \brief Build dummy -# \date 2010-05-24 13:42GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Build dummy -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Build dummy") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -# Find tools -ExecTimeout = findTool(log, ToolDirectories, ExecTimeoutTool, ToolSuffix) -BuildShadowSkin = findTool(log, ToolDirectories, BuildShadowSkinTool, ToolSuffix) -BuildClodtex = findTool(log, ToolDirectories, BuildClodtexTool, ToolSuffix) -LightmapOptimizer = findTool(log, ToolDirectories, LightmapOptimizerTool, ToolSuffix) -TgaToDds = findTool(log, ToolDirectories, TgaToDdsTool, ToolSuffix) -BuildCoarseMesh = findTool(log, ToolDirectories, BuildCoarseMeshTool, ToolSuffix) - -#if 1: # todo: CoarseMeshTextureNames length > 0 ... -# printLog(log, ">>> Build coarse meshes <<<") -# dummyWithCoarseMesh = ExportBuildDirectory + "/" + DummyWithCoarseMeshExportDirectory -# mkPath(log, dummyWithCoarseMesh) -# dummyWithCoarseMeshBuilded = ExportBuildDirectory + "/" + DummyWithCoarseMeshBuildDirectory -# mkPath(log, dummyWithCoarseMeshBuilded) -# cf = open("confdummy_generated.cfg", "w") -# cf.write("texture_mul_size = " + TextureMulSizeValue + ";\n") -# cf.write("\n") -# cf.write("search_path = \n") -# cf.write("{\n") -# cf.write("\t\"" + dummyWithCoarseMesh + "\", \n") -# for dir in MapSourceDirectories: -# cf.write("\t\"" + DatabaseDirectory + "/" + dir + "\", \n") -# cf.write("};\n") -# cf.write("\n") -# cf.write("list_mesh = \n") -# cf.write("{\n") -# # For each dummy with coarse mesh -# files = findFiles(log, dummyWithCoarseMesh, "", ".dummy") -# for file in files: -# sourceFile = dummyWithCoarseMesh + "/" + file -# if os.path.isfile(sourceFile): -# destFile = dummyWithCoarseMeshBuilded + "/" + file -# cf.write("\t\"" + file + "\", \"" + destFile + "\", \n") -# cf.write("};\n") -# cf.write("\n") -# cf.write("output_textures = \n") -# cf.write("{\n") -# # For each dummy with coarse mesh -# for tn in CoarseMeshTextureNames: -# cf.write("\t\"" + dummyWithCoarseMesh + "/" + tn + ".tga\", \n") -# cf.write("};\n") -# cf.close() -# subprocess.call([ BuildCoarseMesh, "confdummy_generated.cfg" ]) -# os.remove("confdummy_generated.cfg") -# for tn in CoarseMeshTextureNames: -# subprocess.call([ TgaToDds, dummyWithCoarseMesh + "/" + tn + ".tga", "-o", dummyWithCoarseMeshBuilded + "/" + tn + ".dds", "-a", "5" ]) - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 2_build.py +# \brief Build dummy +# \date 2010-05-24 13:42GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Build dummy +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Build dummy") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +# Find tools +ExecTimeout = findTool(log, ToolDirectories, ExecTimeoutTool, ToolSuffix) +BuildShadowSkin = findTool(log, ToolDirectories, BuildShadowSkinTool, ToolSuffix) +BuildClodtex = findTool(log, ToolDirectories, BuildClodtexTool, ToolSuffix) +LightmapOptimizer = findTool(log, ToolDirectories, LightmapOptimizerTool, ToolSuffix) +TgaToDds = findTool(log, ToolDirectories, TgaToDdsTool, ToolSuffix) +BuildCoarseMesh = findTool(log, ToolDirectories, BuildCoarseMeshTool, ToolSuffix) + +#if 1: # todo: CoarseMeshTextureNames length > 0 ... +# printLog(log, ">>> Build coarse meshes <<<") +# dummyWithCoarseMesh = ExportBuildDirectory + "/" + DummyWithCoarseMeshExportDirectory +# mkPath(log, dummyWithCoarseMesh) +# dummyWithCoarseMeshBuilded = ExportBuildDirectory + "/" + DummyWithCoarseMeshBuildDirectory +# mkPath(log, dummyWithCoarseMeshBuilded) +# cf = open("confdummy_generated.cfg", "w") +# cf.write("texture_mul_size = " + TextureMulSizeValue + ";\n") +# cf.write("\n") +# cf.write("search_path = \n") +# cf.write("{\n") +# cf.write("\t\"" + dummyWithCoarseMesh + "\", \n") +# for dir in MapSourceDirectories: +# cf.write("\t\"" + DatabaseDirectory + "/" + dir + "\", \n") +# cf.write("};\n") +# cf.write("\n") +# cf.write("list_mesh = \n") +# cf.write("{\n") +# # For each dummy with coarse mesh +# files = findFiles(log, dummyWithCoarseMesh, "", ".dummy") +# for file in files: +# sourceFile = dummyWithCoarseMesh + "/" + file +# if os.path.isfile(sourceFile): +# destFile = dummyWithCoarseMeshBuilded + "/" + file +# cf.write("\t\"" + file + "\", \"" + destFile + "\", \n") +# cf.write("};\n") +# cf.write("\n") +# cf.write("output_textures = \n") +# cf.write("{\n") +# # For each dummy with coarse mesh +# for tn in CoarseMeshTextureNames: +# cf.write("\t\"" + dummyWithCoarseMesh + "/" + tn + ".tga\", \n") +# cf.write("};\n") +# cf.close() +# subprocess.call([ BuildCoarseMesh, "confdummy_generated.cfg" ]) +# os.remove("confdummy_generated.cfg") +# for tn in CoarseMeshTextureNames: +# subprocess.call([ TgaToDds, dummyWithCoarseMesh + "/" + tn + ".tga", "-o", dummyWithCoarseMeshBuilded + "/" + tn + ".dds", "-a", "5" ]) + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/_dummy/3_install.py b/code/nel/tools/build_gamedata/processes/_dummy/3_install.py old mode 100755 new mode 100644 index d809646b8..520dc0c49 --- a/code/nel/tools/build_gamedata/processes/_dummy/3_install.py +++ b/code/nel/tools/build_gamedata/processes/_dummy/3_install.py @@ -1,63 +1,63 @@ -#!/usr/bin/python -# -# \file 3_install.py -# \brief Install dummy -# \date 2010-05-24 13:42GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Install dummy -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Install dummy") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -#installPath = InstallDirectory + "/" + DummyInstallDirectory -#mkPath(log, installPath) - -printLog(log, ">>> Install dummy <<<") -#mkPath(log, ExportBuildDirectory + "/" + DummyExportDirectory) -#copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + DummyExportDirectory, installPath, ".dummy") -#mkPath(log, ExportBuildDirectory + "/" + DummyWithCoarseMeshBuildDirectory) -#copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + DummyWithCoarseMeshBuildDirectory, installPath, ".dummy") -#copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + DummyWithCoarseMeshBuildDirectory, installPath, ".dds") - -#mkPath(log, ExportBuildDirectory + "/" + DummyAnimExportDirectory) -#copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + DummyAnimExportDirectory, installPath, ".anim") - -printLog(log, "") -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 3_install.py +# \brief Install dummy +# \date 2010-05-24 13:42GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Install dummy +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite_local import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Install dummy") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +#installPath = InstallDirectory + "/" + DummyInstallDirectory +#mkPath(log, installPath) + +printLog(log, ">>> Install dummy <<<") +#mkPath(log, ExportBuildDirectory + "/" + DummyExportDirectory) +#copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + DummyExportDirectory, installPath, ".dummy") +#mkPath(log, ExportBuildDirectory + "/" + DummyWithCoarseMeshBuildDirectory) +#copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + DummyWithCoarseMeshBuildDirectory, installPath, ".dummy") +#copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + DummyWithCoarseMeshBuildDirectory, installPath, ".dds") + +#mkPath(log, ExportBuildDirectory + "/" + DummyAnimExportDirectory) +#copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + DummyAnimExportDirectory, installPath, ".anim") + +printLog(log, "") +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/ai_wmap/0_setup.py b/code/nel/tools/build_gamedata/processes/ai_wmap/0_setup.py old mode 100755 new mode 100644 index 418bb8de3..590a863e8 --- a/code/nel/tools/build_gamedata/processes/ai_wmap/0_setup.py +++ b/code/nel/tools/build_gamedata/processes/ai_wmap/0_setup.py @@ -1,98 +1,98 @@ -#!/usr/bin/python -# -# \file 0_setup.py -# \brief setup ai_wmap -# \date 2010-05-24 13:42GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Setup ai_wmap -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Setup ai_wmap") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -# Setup build directories -printLog(log, ">>> Setup build directories <<<") -mkPath(log, ExportBuildDirectory + "/" + RbankOutputBuildDirectory) -mkPath(log, ExportBuildDirectory + "/" + AiWmapBuildDirectory) -mkPath(log, ExportBuildDirectory + "/" + AiWmapBuildTagDirectory) - -# Setup lookup directories -printLog(log, ">>> Setup lookup directories <<<") -for dir in IgLookupDirectories: - mkPath(log, ExportBuildDirectory + "/" + dir) -for dir in PacsPrimLookupDirectories: - mkPath(log, ExportBuildDirectory + "/" + dir) - -# Setup client directories -printLog(log, ">>> Setup install directories <<<") -mkPath(log, InstallDirectory + "/" + AiWmapInstallDirectory) - -# Setup client directories -printLog(log, ">>> Setup configuration <<<") -mkPath(log, InstallDirectory + "/" + AiWmapInstallDirectory) -mkPath(log, ActiveProjectDirectory + "/generated") -cfg = open(ActiveProjectDirectory + "/generated/ai_build_wmap.cfg", "w") -cfg.write("\n") -cfg.write("// AI BUILD WMAP CONFIGURATION\n") -cfg.write("\n") -cfg.write("Paths = {\n") -for dir in IgLookupDirectories: - cfg.write("\t\"" + ExportBuildDirectory + "/" + dir + "\", \n") -cfg.write("\t\"" + ExportBuildDirectory + "/" + RbankOutputBuildDirectory + "\", \n") -cfg.write("\t\"" + LeveldesignDirectory + "\", \n") -cfg.write("};\n") -cfg.write("\n") -cfg.write("NoRecursePaths = { };\n") -cfg.write("\n") -cfg.write("PacsPrimPaths = {\n") -for dir in PacsPrimLookupDirectories: - cfg.write("\t\"" + ExportBuildDirectory + "/" + dir + "\", \n") -cfg.write("};\n") -cfg.write("\n") -cfg.write("OutputPath = \"" + ExportBuildDirectory + "/" + AiWmapBuildDirectory + "\";\n") -cfg.write("\n") -cfg.write("Commands = {\n") -cfg.write("\t\"Verbose " + str(AiWmapVerbose) + "\", \n") -for startPoint in AiWmapStartPoints: - cfg.write("\t\"setStartPoint " + startPoint + "\", \n") -cfg.write("};\n") -cfg.write("\n") -cfg.close() - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 0_setup.py +# \brief setup ai_wmap +# \date 2010-05-24 13:42GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Setup ai_wmap +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Setup ai_wmap") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +# Setup build directories +printLog(log, ">>> Setup build directories <<<") +mkPath(log, ExportBuildDirectory + "/" + RbankOutputBuildDirectory) +mkPath(log, ExportBuildDirectory + "/" + AiWmapBuildDirectory) +mkPath(log, ExportBuildDirectory + "/" + AiWmapBuildTagDirectory) + +# Setup lookup directories +printLog(log, ">>> Setup lookup directories <<<") +for dir in IgLookupDirectories: + mkPath(log, ExportBuildDirectory + "/" + dir) +for dir in PacsPrimLookupDirectories: + mkPath(log, ExportBuildDirectory + "/" + dir) + +# Setup client directories +printLog(log, ">>> Setup install directories <<<") +mkPath(log, InstallDirectory + "/" + AiWmapInstallDirectory) + +# Setup client directories +printLog(log, ">>> Setup configuration <<<") +mkPath(log, InstallDirectory + "/" + AiWmapInstallDirectory) +mkPath(log, ActiveProjectDirectory + "/generated") +cfg = open(ActiveProjectDirectory + "/generated/ai_build_wmap.cfg", "w") +cfg.write("\n") +cfg.write("// AI BUILD WMAP CONFIGURATION\n") +cfg.write("\n") +cfg.write("Paths = {\n") +for dir in IgLookupDirectories: + cfg.write("\t\"" + ExportBuildDirectory + "/" + dir + "\", \n") +cfg.write("\t\"" + ExportBuildDirectory + "/" + RbankOutputBuildDirectory + "\", \n") +cfg.write("\t\"" + LeveldesignDirectory + "\", \n") +cfg.write("};\n") +cfg.write("\n") +cfg.write("NoRecursePaths = { };\n") +cfg.write("\n") +cfg.write("PacsPrimPaths = {\n") +for dir in PacsPrimLookupDirectories: + cfg.write("\t\"" + ExportBuildDirectory + "/" + dir + "\", \n") +cfg.write("};\n") +cfg.write("\n") +cfg.write("OutputPath = \"" + ExportBuildDirectory + "/" + AiWmapBuildDirectory + "\";\n") +cfg.write("\n") +cfg.write("Commands = {\n") +cfg.write("\t\"Verbose " + str(AiWmapVerbose) + "\", \n") +for startPoint in AiWmapStartPoints: + cfg.write("\t\"setStartPoint " + startPoint + "\", \n") +cfg.write("};\n") +cfg.write("\n") +cfg.close() + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/ai_wmap/1_export.py b/code/nel/tools/build_gamedata/processes/ai_wmap/1_export.py old mode 100755 new mode 100644 index de3d108c4..e90f9e0cd --- a/code/nel/tools/build_gamedata/processes/ai_wmap/1_export.py +++ b/code/nel/tools/build_gamedata/processes/ai_wmap/1_export.py @@ -1,49 +1,49 @@ -#!/usr/bin/python -# -# \file 1_export.py -# \brief Export ai_wmap -# \date 2010-05-24 13:42GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Export ai_wmap -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Export ai_wmap") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 1_export.py +# \brief Export ai_wmap +# \date 2010-05-24 13:42GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Export ai_wmap +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Export ai_wmap") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/ai_wmap/2_build.py b/code/nel/tools/build_gamedata/processes/ai_wmap/2_build.py old mode 100755 new mode 100644 index 8aa63f62f..a59c7e09e --- a/code/nel/tools/build_gamedata/processes/ai_wmap/2_build.py +++ b/code/nel/tools/build_gamedata/processes/ai_wmap/2_build.py @@ -1,95 +1,97 @@ -#!/usr/bin/python -# -# \file 2_build.py -# \brief Build ai_wmap -# \date 2010-05-24 13:42GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Build ai_wmap -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Build ai_wmap") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -# Find tools -AiBuildWmap = findTool(log, ToolDirectories, AiBuildWmapTool, ToolSuffix) -TgaCut = findTool(log, ToolDirectories, TgaCutTool, ToolSuffix) - -if AiBuildWmap == "": - toolLogFail(log, AiBuildWmapTool, ToolSuffix) -if TgaCut == "": - toolLogFail(log, TgaCutTool, ToolSuffix) -else: - printLog(log, ">>> Copy ai_build_wmap.cfg <<<") - cfgPath = ActiveProjectDirectory + "/generated/ai_build_wmap.cfg" - tagPath = ExportBuildDirectory + "/" + AiWmapBuildTagDirectory + "/ai_wmap_build.tag" - shutil.copy(cfgPath, "ai_build_wmap.cfg") - printLog(log, ">>> Check up packed sheets <<<") - subprocess.call([ AiBuildWmap, "checkPackedSheets" ]) - printLog(log, ">>> Build ai_wmap <<<") - mkPath(log, ExportBuildDirectory + "/" + RbankOutputBuildDirectory) - mkPath(log, ExportBuildDirectory + "/" + AiWmapBuildDirectory) - mkPath(log, ExportBuildDirectory + "/" + AiWmapBuildTagDirectory) - if (needUpdate(log, "continents.packed_sheets", tagPath) or needUpdateMultiDirNoSubdirFile(log, ExportBuildDirectory, [ RbankOutputBuildDirectory ] + IgLookupDirectories + PacsPrimLookupDirectories, tagPath)): - printLog(log, ">>> Generate wmap <<<") - subprocess.call([ AiBuildWmap, "pacsCrunch " + AiWmapContinentName ]) - printLog(log, ">>> Generate sized wmap <<<") - subprocess.call([ AiBuildWmap, "pacsBuildGabarit " + AiWmapContinentName ]) - printLog(log, ">>> Generate cwmaps for each size <<<") - subprocess.call([ AiBuildWmap, "pacsBuildWmap " + AiWmapContinentName + "_0" ]) - subprocess.call([ AiBuildWmap, "pacsBuildWmap " + AiWmapContinentName + "_1" ]) - subprocess.call([ AiBuildWmap, "pacsBuildWmap " + AiWmapContinentName + "_2" ]) - printLog(log, ">>> Generate bitmap for each size <<<") - subprocess.call([ AiBuildWmap, "pacsBuildBitmap " + AiWmapContinentName + "_0" ]) - subprocess.call([ AiBuildWmap, "pacsBuildBitmap " + AiWmapContinentName + "_1" ]) - subprocess.call([ AiBuildWmap, "pacsBuildBitmap " + AiWmapContinentName + "_2" ]) - printLog(log, ">>> Clear height maps for size 1 and 2 <<<") - subprocess.call([ AiBuildWmap, "pacsClearHeightmap " + AiWmapContinentName ]) - printLog(log, ">>> Cut tga for world editor <<<") - subprocess.call([ TgaCut, ExportBuildDirectory + "/" + AiWmapBuildDirectory + "/" + AiWmapContinentName + "_0.tga" ]) - moveFilesExtNoTree(log, ".", ExportBuildDirectory + "/" + AiWmapBuildDirectory, ".tga") - printLog(log, ">>> Remove wmap <<<") - removeFilesRecursiveExt(log, ExportBuildDirectory + "/" + AiWmapBuildDirectory, ".wmap") - tagFile = open(tagPath, "w") - tagFile.write(time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())) + "\n") - tagFile.close() - else: - printLog(log, "SKIP *") -printLog(log, "") - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 2_build.py +# \brief Build ai_wmap +# \date 2010-05-24 13:42GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Build ai_wmap +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Build ai_wmap") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +# Find tools +AiBuildWmap = findTool(log, ToolDirectories, AiBuildWmapTool, ToolSuffix) +TgaCut = findTool(log, ToolDirectories, TgaCutTool, ToolSuffix) + +if AiBuildWmap == "": + toolLogFail(log, AiBuildWmapTool, ToolSuffix) +if TgaCut == "": + toolLogFail(log, TgaCutTool, ToolSuffix) +else: + printLog(log, ">>> Copy ai_build_wmap.cfg <<<") + cfgPath = ActiveProjectDirectory + "/generated/ai_build_wmap.cfg" + tagPath = ExportBuildDirectory + "/" + AiWmapBuildTagDirectory + "/ai_wmap_build.tag" + shutil.copy(cfgPath, "ai_build_wmap.cfg") + printLog(log, ">>> Check up packed sheets <<<") + subprocess.call([ AiBuildWmap, "checkPackedSheets" ]) + printLog(log, ">>> Build ai_wmap <<<") + mkPath(log, ExportBuildDirectory + "/" + RbankOutputBuildDirectory) + mkPath(log, ExportBuildDirectory + "/" + AiWmapBuildDirectory) + mkPath(log, ExportBuildDirectory + "/" + AiWmapBuildTagDirectory) + if (needUpdate(log, "continents.packed_sheets", tagPath) or needUpdateMultiDirNoSubdirFile(log, ExportBuildDirectory, [ RbankOutputBuildDirectory ] + IgLookupDirectories + PacsPrimLookupDirectories, tagPath)): + printLog(log, ">>> Generate wmap <<<") + subprocess.call([ AiBuildWmap, "pacsCrunch " + AiWmapContinentName ]) + printLog(log, ">>> Generate sized wmap <<<") + subprocess.call([ AiBuildWmap, "pacsBuildGabarit " + AiWmapContinentName ]) + printLog(log, ">>> Generate cwmaps for each size <<<") + callParallelProcess([ AiBuildWmap, "pacsBuildWmap " + AiWmapContinentName + "_0" ]) + callParallelProcess([ AiBuildWmap, "pacsBuildWmap " + AiWmapContinentName + "_1" ]) + callParallelProcess([ AiBuildWmap, "pacsBuildWmap " + AiWmapContinentName + "_2" ]) + flushParallelProcesses() + printLog(log, ">>> Generate bitmap for each size <<<") + callParallelProcess([ AiBuildWmap, "pacsBuildBitmap " + AiWmapContinentName + "_0" ]) + callParallelProcess([ AiBuildWmap, "pacsBuildBitmap " + AiWmapContinentName + "_1" ]) + callParallelProcess([ AiBuildWmap, "pacsBuildBitmap " + AiWmapContinentName + "_2" ]) + flushParallelProcesses() + printLog(log, ">>> Clear height maps for size 1 and 2 <<<") + subprocess.call([ AiBuildWmap, "pacsClearHeightmap " + AiWmapContinentName ]) + printLog(log, ">>> Cut tga for world editor <<<") + subprocess.call([ TgaCut, ExportBuildDirectory + "/" + AiWmapBuildDirectory + "/" + AiWmapContinentName + "_0.tga" ]) + moveFilesExtNoTree(log, ".", ExportBuildDirectory + "/" + AiWmapBuildDirectory, ".tga") + printLog(log, ">>> Remove wmap <<<") + removeFilesRecursiveExt(log, ExportBuildDirectory + "/" + AiWmapBuildDirectory, ".wmap") + tagFile = open(tagPath, "w") + tagFile.write(time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())) + "\n") + tagFile.close() + else: + printLog(log, "SKIP *") +printLog(log, "") + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/ai_wmap/3_install.py b/code/nel/tools/build_gamedata/processes/ai_wmap/3_install.py old mode 100755 new mode 100644 index fb81b991d..40a47754e --- a/code/nel/tools/build_gamedata/processes/ai_wmap/3_install.py +++ b/code/nel/tools/build_gamedata/processes/ai_wmap/3_install.py @@ -1,57 +1,57 @@ -#!/usr/bin/python -# -# \file 3_install.py -# \brief Install ai_wmap -# \date 2010-05-24 13:42GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Install ai_wmap -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Install ai_wmap") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -installPath = InstallDirectory + "/" + AiWmapInstallDirectory -mkPath(log, installPath) - -printLog(log, ">>> Install ai_wmap <<<") -mkPath(log, ExportBuildDirectory + "/" + AiWmapBuildDirectory) -copyFilesNoTreeIfNeeded(log, ExportBuildDirectory + "/" + AiWmapBuildDirectory, installPath) - -printLog(log, "") -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 3_install.py +# \brief Install ai_wmap +# \date 2010-05-24 13:42GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Install ai_wmap +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite_local import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Install ai_wmap") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +installPath = InstallDirectory + "/" + AiWmapInstallDirectory +mkPath(log, installPath) + +printLog(log, ">>> Install ai_wmap <<<") +mkPath(log, ExportBuildDirectory + "/" + AiWmapBuildDirectory) +copyFilesNoTreeIfNeeded(log, ExportBuildDirectory + "/" + AiWmapBuildDirectory, installPath) + +printLog(log, "") +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/anim/0_setup.py b/code/nel/tools/build_gamedata/processes/anim/0_setup.py old mode 100755 new mode 100644 index 1f9cf10d7..90cd4bfb9 --- a/code/nel/tools/build_gamedata/processes/anim/0_setup.py +++ b/code/nel/tools/build_gamedata/processes/anim/0_setup.py @@ -1,66 +1,66 @@ -#!/usr/bin/python -# -# \file 0_setup.py -# \brief Setup anim -# \date 2009-03-10 14:56GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Setup anim -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Setup anim") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -# Setup source directories -printLog(log, ">>> Setup source directories <<<") -for dir in AnimSourceDirectories: - mkPath(log, DatabaseDirectory + "/" + dir) - -# Setup export directories -printLog(log, ">>> Setup export directories <<<") -mkPath(log, ExportBuildDirectory + "/" + AnimExportDirectory) - -# Setup build directories -printLog(log, ">>> Setup build directories <<<") -mkPath(log, ExportBuildDirectory + "/" + AnimBuildDirectory) - -# Setup client directories -printLog(log, ">>> Setup client directories <<<") -mkPath(log, InstallDirectory + "/" + AnimInstallDirectory) - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 0_setup.py +# \brief Setup anim +# \date 2009-03-10 14:56GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Setup anim +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Setup anim") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +# Setup source directories +printLog(log, ">>> Setup source directories <<<") +for dir in AnimSourceDirectories: + mkPath(log, DatabaseDirectory + "/" + dir) + +# Setup export directories +printLog(log, ">>> Setup export directories <<<") +mkPath(log, ExportBuildDirectory + "/" + AnimExportDirectory) + +# Setup build directories +printLog(log, ">>> Setup build directories <<<") +mkPath(log, ExportBuildDirectory + "/" + AnimBuildDirectory) + +# Setup client directories +printLog(log, ">>> Setup client directories <<<") +mkPath(log, InstallDirectory + "/" + AnimInstallDirectory) + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/anim/1_export.py b/code/nel/tools/build_gamedata/processes/anim/1_export.py old mode 100755 new mode 100644 index 1745c45a9..d3424b663 --- a/code/nel/tools/build_gamedata/processes/anim/1_export.py +++ b/code/nel/tools/build_gamedata/processes/anim/1_export.py @@ -1,139 +1,139 @@ -#!/usr/bin/python -# -# ################################################################# -# ## WARNING : this is a generated file, don't change it ! -# ################################################################# -# -# \file 1_export.py -# \brief Export anim -# \date 2015-01-06-16-31-GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Export anim -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -import time, sys, os, shutil, subprocess, distutils.dir_util -sys.path.append("../../configuration") - -if os.path.isfile("log.log"): - os.remove("log.log") -if os.path.isfile("temp_log.log"): - os.remove("temp_log.log") -log = open("temp_log.log", "w") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Export anim") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - - -# Find tools -# ... - -# Export anim 3dsmax -if MaxAvailable: - # Find tools - Max = findMax(log, MaxDirectory, MaxExecutable) - printLog(log, "") - - printLog(log, ">>> Export anim 3dsmax <<<") - mkPath(log, ExportBuildDirectory + "/" + AnimExportDirectory) - mkPath(log, ExportBuildDirectory + "/" + AnimTagExportDirectory) - for dir in AnimSourceDirectories: - mkPath(log, DatabaseDirectory + "/" + dir) - if (needUpdateDirByTagLog(log, DatabaseDirectory + "/" + dir, ".max", ExportBuildDirectory + "/" + AnimTagExportDirectory, ".max.tag")): - scriptSrc = "maxscript/anim_export.ms" - scriptDst = MaxUserDirectory + "/scripts/anim_export.ms" - outputLogfile = ScriptDirectory + "/processes/anim/log.log" - outputDirectory = ExportBuildDirectory + "/" + AnimExportDirectory - tagDirectory = ExportBuildDirectory + "/" + AnimTagExportDirectory - maxSourceDir = DatabaseDirectory + "/" + dir - maxRunningTagFile = tagDirectory + "/max_running.tag" - tagList = findFiles(log, tagDirectory, "", ".max.tag") - tagLen = len(tagList) - if os.path.isfile(scriptDst): - os.remove(scriptDst) - tagDiff = 1 - sSrc = open(scriptSrc, "r") - sDst = open(scriptDst, "w") - for line in sSrc: - newline = line.replace("%OutputLogfile%", outputLogfile) - newline = newline.replace("%MaxSourceDirectory%", maxSourceDir) - newline = newline.replace("%OutputDirectory%", outputDirectory) - newline = newline.replace("%TagDirectory%", tagDirectory) - sDst.write(newline) - sSrc.close() - sDst.close() - zeroRetryLimit = 3 - while tagDiff > 0: - mrt = open(maxRunningTagFile, "w") - mrt.write("moe-moe-kyun") - mrt.close() - printLog(log, "MAXSCRIPT " + scriptDst) - subprocess.call([ Max, "-U", "MAXScript", "anim_export.ms", "-q", "-mi", "-mip" ]) - if os.path.exists(outputLogfile): - try: - lSrc = open(outputLogfile, "r") - for line in lSrc: - lineStrip = line.strip() - if (len(lineStrip) > 0): - printLog(log, lineStrip) - lSrc.close() - os.remove(outputLogfile) - except Exception: - printLog(log, "ERROR Failed to read 3dsmax log") - else: - printLog(log, "WARNING No 3dsmax log") - tagList = findFiles(log, tagDirectory, "", ".max.tag") - newTagLen = len(tagList) - tagDiff = newTagLen - tagLen - tagLen = newTagLen - addTagDiff = 0 - if os.path.exists(maxRunningTagFile): - printLog(log, "FAIL 3ds Max crashed and/or file export failed!") - if tagDiff == 0: - if zeroRetryLimit > 0: - zeroRetryLimit = zeroRetryLimit - 1 - addTagDiff = 1 - else: - printLog(log, "FAIL Retry limit reached!") - else: - addTagDiff = 1 - os.remove(maxRunningTagFile) - printLog(log, "Exported " + str(tagDiff) + " .max files!") - tagDiff += addTagDiff - os.remove(scriptDst) - printLog(log, "") - - - -log.close() -if os.path.isfile("log.log"): - os.remove("log.log") -shutil.move("temp_log.log", "log.log") - - -# end of file +#!/usr/bin/python +# +# ################################################################# +# ## WARNING : this is a generated file, don't change it ! +# ################################################################# +# +# \file 1_export.py +# \brief Export anim +# \date 2015-01-06-16-31-GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Export anim +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +import time, sys, os, shutil, subprocess, distutils.dir_util +sys.path.append("../../configuration") + +if os.path.isfile("log.log"): + os.remove("log.log") +if os.path.isfile("temp_log.log"): + os.remove("temp_log.log") +log = open("temp_log.log", "w") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Export anim") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + + +# Find tools +# ... + +# Export anim 3dsmax +if MaxAvailable: + # Find tools + Max = findMax(log, MaxDirectory, MaxExecutable) + printLog(log, "") + + printLog(log, ">>> Export anim 3dsmax <<<") + mkPath(log, ExportBuildDirectory + "/" + AnimExportDirectory) + mkPath(log, ExportBuildDirectory + "/" + AnimTagExportDirectory) + for dir in AnimSourceDirectories: + mkPath(log, DatabaseDirectory + "/" + dir) + if (needUpdateDirByTagLog(log, DatabaseDirectory + "/" + dir, ".max", ExportBuildDirectory + "/" + AnimTagExportDirectory, ".max.tag")): + scriptSrc = "maxscript/anim_export.ms" + scriptDst = MaxUserDirectory + "/scripts/anim_export.ms" + outputLogfile = ScriptDirectory + "/processes/anim/log.log" + outputDirectory = ExportBuildDirectory + "/" + AnimExportDirectory + tagDirectory = ExportBuildDirectory + "/" + AnimTagExportDirectory + maxSourceDir = DatabaseDirectory + "/" + dir + maxRunningTagFile = tagDirectory + "/max_running.tag" + tagList = findFiles(log, tagDirectory, "", ".max.tag") + tagLen = len(tagList) + if os.path.isfile(scriptDst): + os.remove(scriptDst) + tagDiff = 1 + sSrc = open(scriptSrc, "r") + sDst = open(scriptDst, "w") + for line in sSrc: + newline = line.replace("%OutputLogfile%", outputLogfile) + newline = newline.replace("%MaxSourceDirectory%", maxSourceDir) + newline = newline.replace("%OutputDirectory%", outputDirectory) + newline = newline.replace("%TagDirectory%", tagDirectory) + sDst.write(newline) + sSrc.close() + sDst.close() + zeroRetryLimit = 3 + while tagDiff > 0: + mrt = open(maxRunningTagFile, "w") + mrt.write("moe-moe-kyun") + mrt.close() + printLog(log, "MAXSCRIPT " + scriptDst) + subprocess.call([ Max, "-U", "MAXScript", "anim_export.ms", "-q", "-mi", "-mip" ]) + if os.path.exists(outputLogfile): + try: + lSrc = open(outputLogfile, "r") + for line in lSrc: + lineStrip = line.strip() + if (len(lineStrip) > 0): + printLog(log, lineStrip) + lSrc.close() + os.remove(outputLogfile) + except Exception: + printLog(log, "ERROR Failed to read 3dsmax log") + else: + printLog(log, "WARNING No 3dsmax log") + tagList = findFiles(log, tagDirectory, "", ".max.tag") + newTagLen = len(tagList) + tagDiff = newTagLen - tagLen + tagLen = newTagLen + addTagDiff = 0 + if os.path.exists(maxRunningTagFile): + printLog(log, "FAIL 3ds Max crashed and/or file export failed!") + if tagDiff == 0: + if zeroRetryLimit > 0: + zeroRetryLimit = zeroRetryLimit - 1 + addTagDiff = 1 + else: + printLog(log, "FAIL Retry limit reached!") + else: + addTagDiff = 1 + os.remove(maxRunningTagFile) + printLog(log, "Exported " + str(tagDiff) + " .max files!") + tagDiff += addTagDiff + os.remove(scriptDst) + printLog(log, "") + + + +log.close() +if os.path.isfile("log.log"): + os.remove("log.log") +shutil.move("temp_log.log", "log.log") + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/anim/2_build.py b/code/nel/tools/build_gamedata/processes/anim/2_build.py old mode 100755 new mode 100644 index 81d968b06..1dbd2abae --- a/code/nel/tools/build_gamedata/processes/anim/2_build.py +++ b/code/nel/tools/build_gamedata/processes/anim/2_build.py @@ -1,70 +1,70 @@ -#!/usr/bin/python -# -# \file 2_build.py -# \brief Build anim -# \date 2009-03-10 13:13GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Build anim -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Build anim") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -# Find tools -AnimBuilder = findTool(log, ToolDirectories, AnimBuilderTool, ToolSuffix) -printLog(log, "") - -# For each anim directory -printLog(log, ">>> Build anim <<<") -if AnimBuilder == "": - toolLogFail(log, AnimBuilderTool, ToolSuffix) -else: - srcDir = ExportBuildDirectory + "/" + AnimExportDirectory - mkPath(log, srcDir) - destDir = ExportBuildDirectory + "/" + AnimBuildDirectory - mkPath(log, destDir) - if DoOptimizeAnimations: - printLog(log, ">>> Optimizing animations <<<") - subprocess.call([ AnimBuilder, srcDir, destDir, ActiveProjectDirectory + "/anim_builder.cfg" ]) - else: - printLog(log, ">>> Not optimizing animations <<<") - copyFilesNoTreeIfNeeded(log, srcDir, destDir) -printLog(log, "") - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 2_build.py +# \brief Build anim +# \date 2009-03-10 13:13GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Build anim +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Build anim") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +# Find tools +AnimBuilder = findTool(log, ToolDirectories, AnimBuilderTool, ToolSuffix) +printLog(log, "") + +# For each anim directory +printLog(log, ">>> Build anim <<<") +if AnimBuilder == "": + toolLogFail(log, AnimBuilderTool, ToolSuffix) +else: + srcDir = ExportBuildDirectory + "/" + AnimExportDirectory + mkPath(log, srcDir) + destDir = ExportBuildDirectory + "/" + AnimBuildDirectory + mkPath(log, destDir) + if DoOptimizeAnimations: + printLog(log, ">>> Optimizing animations <<<") + subprocess.call([ AnimBuilder, srcDir, destDir, ActiveProjectDirectory + "/anim_builder.cfg" ]) + else: + printLog(log, ">>> Not optimizing animations <<<") + copyFilesNoTreeIfNeeded(log, srcDir, destDir) +printLog(log, "") + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/anim/3_install.py b/code/nel/tools/build_gamedata/processes/anim/3_install.py old mode 100755 new mode 100644 index 896f43db0..6fea6e9e7 --- a/code/nel/tools/build_gamedata/processes/anim/3_install.py +++ b/code/nel/tools/build_gamedata/processes/anim/3_install.py @@ -1,57 +1,57 @@ -#!/usr/bin/python -# -# \file 3_install.py -# \brief Install anim -# \date 2009-03-10 13:13GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Install anim -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Install anim") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -printLog(log, ">>> Install anim <<<") -srcDir = ExportBuildDirectory + "/" + AnimBuildDirectory -mkPath(log, srcDir) -destDir = InstallDirectory + "/" + AnimInstallDirectory -mkPath(log, destDir) -copyFilesNoTreeIfNeeded(log, srcDir, destDir) - -printLog(log, "") -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 3_install.py +# \brief Install anim +# \date 2009-03-10 13:13GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Install anim +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite_local import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Install anim") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +printLog(log, ">>> Install anim <<<") +srcDir = ExportBuildDirectory + "/" + AnimBuildDirectory +mkPath(log, srcDir) +destDir = InstallDirectory + "/" + AnimInstallDirectory +mkPath(log, destDir) +copyFilesNoTreeIfNeeded(log, srcDir, destDir) + +printLog(log, "") +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/anim/maxscript/anim_export.ms b/code/nel/tools/build_gamedata/processes/anim/maxscript/anim_export.ms old mode 100755 new mode 100644 diff --git a/code/nel/tools/build_gamedata/processes/cartographer/0_setup.py b/code/nel/tools/build_gamedata/processes/cartographer/0_setup.py index 6f8b9a754..eda395771 100644 --- a/code/nel/tools/build_gamedata/processes/cartographer/0_setup.py +++ b/code/nel/tools/build_gamedata/processes/cartographer/0_setup.py @@ -1,114 +1,120 @@ -#!/usr/bin/python -# -# \file 0_setup.py -# \brief setup cartographer -# \date 2014-09-13 13:32GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Setup cartographer -# -# NeL - MMORPG Framework -# Copyright (C) 2014 Jan BOON -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Setup cartographer") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -# Setup build directories -printLog(log, ">>> Setup build directories <<<") -mkPath(log, ExportBuildDirectory + "/" + CartographerBuildDirectory) - -# Setup lookup directories -printLog(log, ">>> Setup lookup directories <<<") -mkPath(log, ExportBuildDirectory + "/" + AiWmapBuildDirectory) # IN -mkPath(log, ExportBuildDirectory + "/" + ZoneLightBuildDirectory) # IN (.zonel) -mkPath(log, ExportBuildDirectory + "/" + ZoneLightIgLandBuildDirectory) # IN (.ig) -mkPath(log, ExportBuildDirectory + "/" + SmallbankExportDirectory) # IN -mkPath(log, ExportBuildDirectory + "/" + FarbankBuildDirectory) # IN -mkPath(log, ExportBuildDirectory + "/" + DisplaceExportDirectory) # IN -mkPath(log, ExportBuildDirectory + "/" + TilesExportDirectory) # IN -mkPath(log, LeveldesignDataCommonDirectory) # IN -mkPath(log, LeveldesignDfnDirectory) # IN -mkPath(log, LeveldesignDirectory) # IN -for dir in PropertiesExportBuildSearchPaths: - mkPath(log, ExportBuildDirectory + "/" + dir) - -# Setup client directories -printLog(log, ">>> Setup install directories <<<") -mkPath(log, InstallDirectory + "/" + CartographerInstallDirectory) - -# Setup client directories -printLog(log, ">>> Setup configuration <<<") -mkPath(log, ActiveProjectDirectory + "/generated") -cfg = open(ActiveProjectDirectory + "/generated/island_screenshots.cfg", "w") -cfg.write("\n") -cfg.write("// BUILD CARTOGRAPHER CONFIGURATION\n") -cfg.write("\n") -cfg.write("SearchPaths = {\n") -cfg.write("\t\"" + ExportBuildDirectory + "/" + AiWmapBuildDirectory + "\", \n") -cfg.write("\t\"" + ExportBuildDirectory + "/" + ZoneLightBuildDirectory + "\", \n") -cfg.write("\t\"" + ExportBuildDirectory + "/" + ZoneLightIgLandBuildDirectory + "\", \n") -cfg.write("\t\"" + ExportBuildDirectory + "/" + SmallbankExportDirectory + "\", \n") -cfg.write("\t\"" + ExportBuildDirectory + "/" + FarbankBuildDirectory + "\", \n") -cfg.write("\t\"" + ExportBuildDirectory + "/" + DisplaceExportDirectory + "\", \n") -cfg.write("\t\"" + ExportBuildDirectory + "/" + TilesExportDirectory + "\", \n") -cfg.write("\t\"" + LeveldesignDataCommonDirectory + "\", \n") -cfg.write("\t\"" + LeveldesignDfnDirectory + "\", \n") -cfg.write("\t\"" + LeveldesignDirectory + "\", \n") -for dir in PropertiesExportBuildSearchPaths: - cfg.write("\t\"" + ExportBuildDirectory + "/" + dir + "\", \n") -cfg.write("};\n") -cfg.write("\n") -cfg.write("OutDir = \"" + ExportBuildDirectory + "/" + CartographerBuildDirectory + "\";\n") -cfg.write("\n") -cfg.write("Continents = {\n") -cfg.write("\t\"" + CartographerContinent + "\", \n") -cfg.write("};\n") -cfg.write("\n") -cfg.write("SeasonSuffixes = {\n") -for suffix in MultipleTilesPostfix: - cfg.write("\t\"" + suffix + "\", \n") -cfg.write("};\n") -cfg.write("\n") -cfg.write("InverseZTest = true;\n") -cfg.write("Vegetation = true;\n") -cfg.write("MeterPixelSize = 2;\n") -cfg.write("\n") -cfg.write("CompleteIslandsFile = \"r2_islands.xml\";\n") -cfg.write("EntryPointsFile = \"r2_entry_points.txt\";\n") -cfg.write("\n") -cfg.close() - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 0_setup.py +# \brief setup cartographer +# \date 2014-09-13 13:32GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Setup cartographer +# +# NeL - MMORPG Framework +# Copyright (C) 2014 Jan BOON +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Setup cartographer") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +# Setup build directories +printLog(log, ">>> Setup build directories <<<") +mkPath(log, ExportBuildDirectory + "/" + CartographerBuildDirectory) +mkPath(log, ExportBuildDirectory + "/" + CartographerMapBuildDirectory) + +# Setup lookup directories +printLog(log, ">>> Setup lookup directories <<<") +mkPath(log, ExportBuildDirectory + "/" + AiWmapBuildDirectory) # IN +mkPath(log, ExportBuildDirectory + "/" + ZoneLightBuildDirectory) # IN (.zonel) +mkPath(log, ExportBuildDirectory + "/" + ZoneLightIgLandBuildDirectory) # IN (.ig) +mkPath(log, ExportBuildDirectory + "/" + SmallbankExportDirectory) # IN +mkPath(log, ExportBuildDirectory + "/" + FarbankBuildDirectory) # IN +mkPath(log, ExportBuildDirectory + "/" + DisplaceExportDirectory) # IN +mkPath(log, ExportBuildDirectory + "/" + TilesExportDirectory) # IN +mkPath(log, LeveldesignDataCommonDirectory) # IN +mkPath(log, LeveldesignDfnDirectory) # IN +mkPath(log, LeveldesignDirectory) # IN +for dir in PropertiesExportBuildSearchPaths: + mkPath(log, ExportBuildDirectory + "/" + dir) + +# Setup client directories +printLog(log, ">>> Setup install directories <<<") +mkPath(log, InstallDirectory + "/" + CartographerInstallDirectory) +mkPath(log, InstallDirectory + "/" + IslandsInstallDirectory) + +# Setup client directories +printLog(log, ">>> Setup configuration <<<") +mkPath(log, ActiveProjectDirectory + "/generated") +cfg = open(ActiveProjectDirectory + "/generated/island_screenshots.cfg", "w") +cfg.write("\n") +cfg.write("// BUILD CARTOGRAPHER CONFIGURATION\n") +cfg.write("\n") +cfg.write("SearchPaths = {\n") +cfg.write("\t\"" + ExportBuildDirectory + "/" + AiWmapBuildDirectory + "\", \n") +cfg.write("\t\"" + ExportBuildDirectory + "/" + ZoneLightBuildDirectory + "\", \n") +cfg.write("\t\"" + ExportBuildDirectory + "/" + ZoneLightIgLandBuildDirectory + "\", \n") +cfg.write("\t\"" + ExportBuildDirectory + "/" + SmallbankExportDirectory + "\", \n") +cfg.write("\t\"" + ExportBuildDirectory + "/" + FarbankBuildDirectory + "\", \n") +cfg.write("\t\"" + ExportBuildDirectory + "/" + DisplaceExportDirectory + "\", \n") +cfg.write("\t\"" + ExportBuildDirectory + "/" + TilesExportDirectory + "\", \n") +cfg.write("\t\"" + LeveldesignDataCommonDirectory + "\", \n") +cfg.write("\t\"" + LeveldesignDfnDirectory + "\", \n") +cfg.write("\t\"" + LeveldesignDirectory + "\", \n") +for dir in PropertiesExportBuildSearchPaths: + cfg.write("\t\"" + ExportBuildDirectory + "/" + dir + "\", \n") +cfg.write("};\n") +cfg.write("\n") +cfg.write("OutDir = \"" + ExportBuildDirectory + "/" + CartographerBuildDirectory + "\";\n") +cfg.write("\n") +cfg.write("Continents = {\n") +cfg.write("\t\"" + CartographerContinent + "\", \n") +cfg.write("};\n") +cfg.write("\n") +cfg.write("SeasonSuffixes = {\n") +if CartographerSeasonSuffixes: + for suffix in CartographerSeasonSuffixes: + cfg.write("\t\"" + suffix + "\", \n") +else: + for suffix in MultipleTilesPostfix: + cfg.write("\t\"" + suffix + "\", \n") +cfg.write("};\n") +cfg.write("\n") +cfg.write("InverseZTest = true;\n") +cfg.write("Vegetation = true;\n") +cfg.write("MeterPixelSize = 2;\n") +cfg.write("\n") +cfg.write("CompleteIslandsFile = \"" + ExportBuildDirectory + "/" + CartographerBuildDirectory + "/" + IslandsXmlFile + "\";\n") +cfg.write("EntryPointsFile = \"r2_entry_points.txt\";\n") +cfg.write("\n") +cfg.close() + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/cartographer/1_export.py b/code/nel/tools/build_gamedata/processes/cartographer/1_export.py index 319316728..ea1627d61 100644 --- a/code/nel/tools/build_gamedata/processes/cartographer/1_export.py +++ b/code/nel/tools/build_gamedata/processes/cartographer/1_export.py @@ -1,49 +1,49 @@ -#!/usr/bin/python -# -# \file 1_export.py -# \brief Export cartographer -# \date 2014-09-13 13:32GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Export cartographer -# -# NeL - MMORPG Framework -# Copyright (C) 2014 Jan BOON -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Export cartographer") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 1_export.py +# \brief Export cartographer +# \date 2014-09-13 13:32GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Export cartographer +# +# NeL - MMORPG Framework +# Copyright (C) 2014 Jan BOON +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Export cartographer") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/cartographer/2_build.py b/code/nel/tools/build_gamedata/processes/cartographer/2_build.py index c3c14e9aa..fdc78dd43 100644 --- a/code/nel/tools/build_gamedata/processes/cartographer/2_build.py +++ b/code/nel/tools/build_gamedata/processes/cartographer/2_build.py @@ -1,62 +1,87 @@ -#!/usr/bin/python -# -# \file 2_build.py -# \brief Build cartographer -# \date 2014-09-13 13:32GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Build cartographer -# -# NeL - MMORPG Framework -# Copyright (C) 2014 Jan BOON -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Build cartographer") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -# Find tools -R2IslandsTextures = findTool(log, ToolDirectories, R2IslandsTexturesTool, ToolSuffix) - -if R2IslandsTextures == "": - toolLogFail(log, R2IslandsTexturesTool, ToolSuffix) -else: - printLog(log, ">>> Copy island_screenshots.cfg <<<") - cfgPath = ActiveProjectDirectory + "/generated/island_screenshots.cfg" - shutil.copy(cfgPath, "island_screenshots.cfg") - printLog(log, ">>> Build cartographer <<<") - subprocess.call([ R2IslandsTextures ]) -printLog(log, "") - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 2_build.py +# \brief Build cartographer +# \date 2014-09-13 13:32GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Build cartographer +# +# NeL - MMORPG Framework +# Copyright (C) 2014 Jan BOON +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Build cartographer") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +# Find tools +R2IslandsTextures = findTool(log, ToolDirectories, R2IslandsTexturesTool, ToolSuffix) +TgaToDds = findTool(log, ToolDirectories, TgaToDdsTool, ToolSuffix) + +if R2IslandsTextures == "": + toolLogFail(log, R2IslandsTexturesTool, ToolSuffix) +else: + printLog(log, ">>> Copy island_screenshots.cfg <<<") + cfgPath = ActiveProjectDirectory + "/generated/island_screenshots.cfg" + shutil.copy(cfgPath, "island_screenshots.cfg") + printLog(log, ">>> Build cartographer <<<") + mkPath(log, ExportBuildDirectory + "/" + CartographerBuildDirectory) + subprocess.call([ R2IslandsTextures ]) +printLog(log, "") + +printLog(log, ">>> Compress cartographer maps to DDS <<<") +if TgaToDds == "": + toolLogFail(log, TgaToDdsTool, ToolSuffix) +else: + destPath = ExportBuildDirectory + "/" + CartographerMapBuildDirectory + mkPath(log, destPath) + sourcePath = ExportBuildDirectory + "/" + CartographerBuildDirectory + mkPath(log, sourcePath) + files = os.listdir(sourcePath) + len_tga_png = len(".tga") + len_dds = len(".dds") + for fileName in files: + if isLegalFileName(fileName): + sourceFile = sourcePath + "/" + fileName + if os.path.isfile(sourceFile): + if (fileName[-len_tga_png:].lower() == ".tga") or (fileName[-len_tga_png:].lower() == ".png"): + destFile = destPath + "/" + os.path.basename(fileName)[0:-len_tga_png] + ".dds" + if needUpdateLogRemoveDest(log, sourceFile, destFile): + subprocess.call([ TgaToDds, sourceFile, "-o", destFile, "-m" ]) + elif not os.path.isdir(sourceFile): + printLog(log, "FAIL ?! file not dir or file ?! " + sourceFile) +printLog(log, "") + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/cartographer/3_install.py b/code/nel/tools/build_gamedata/processes/cartographer/3_install.py index f241318c4..8ee8e6e0e 100644 --- a/code/nel/tools/build_gamedata/processes/cartographer/3_install.py +++ b/code/nel/tools/build_gamedata/processes/cartographer/3_install.py @@ -1,57 +1,66 @@ -#!/usr/bin/python -# -# \file 3_install.py -# \brief Install cartographer -# \date 2014-09-13 13:32GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Install cartographer -# -# NeL - MMORPG Framework -# Copyright (C) 2014 Jan BOON -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Install cartographer") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -installPath = InstallDirectory + "/" + CartographerInstallDirectory -mkPath(log, installPath) - -printLog(log, ">>> Install cartographer <<<") -mkPath(log, ExportBuildDirectory + "/" + CartographerBuildDirectory) -copyFilesNoTreeIfNeeded(log, ExportBuildDirectory + "/" + CartographerBuildDirectory, installPath) - -printLog(log, "") -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 3_install.py +# \brief Install cartographer +# \date 2014-09-13 13:32GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Install cartographer +# +# NeL - MMORPG Framework +# Copyright (C) 2014 Jan BOON +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite_local import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Install cartographer") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + + +installPath = InstallDirectory + "/" + CartographerInstallDirectory +islandsInstallPath = InstallDirectory + "/" + IslandsInstallDirectory + + +printLog(log, ">>> Install cartographer <<<") + +mkPath(log, ExportBuildDirectory + "/" + CartographerMapBuildDirectory) +mkPath(log, installPath) +copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + CartographerMapBuildDirectory, installPath, ".dds") + +mkPath(log, ExportBuildDirectory + "/" + CartographerBuildDirectory) +mkPath(log, islandsInstallPath) +copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + CartographerBuildDirectory, islandsInstallPath, ".xml") + + +printLog(log, "") +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/cegui/0_setup.py b/code/nel/tools/build_gamedata/processes/cegui/0_setup.py old mode 100755 new mode 100644 index b3f61468c..b2856b720 --- a/code/nel/tools/build_gamedata/processes/cegui/0_setup.py +++ b/code/nel/tools/build_gamedata/processes/cegui/0_setup.py @@ -1,65 +1,65 @@ -#!/usr/bin/python -# -# \file 0_setup.py -# \brief Setup cegui -# \date 2009-03-14-17-46-GMT -# \author Jan Boon (Kaetemi) -# Setup cegui -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Setup cegui") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -# Setup source directories -printLog(log, ">>> Setup source directories <<<") -for dir in CeguiImagesetSourceDirectories: - mkPath(log, DatabaseDirectory + "/" + dir) - -# Setup export directories -printLog(log, ">>> Setup export directories <<<") -mkPath(log, ExportBuildDirectory + "/" + CeguiImagesetExportDirectory) - -# Setup build directories -printLog(log, ">>> Setup build directories <<<") -mkPath(log, ExportBuildDirectory + "/" + CeguiImagesetBuildDirectory) - -# Setup client directories -printLog(log, ">>> Setup client directories <<<") -mkPath(log, InstallDirectory + "/" + CeguiImagesetInstallDirectory) - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 0_setup.py +# \brief Setup cegui +# \date 2009-03-14-17-46-GMT +# \author Jan Boon (Kaetemi) +# Setup cegui +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Setup cegui") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +# Setup source directories +printLog(log, ">>> Setup source directories <<<") +for dir in CeguiImagesetSourceDirectories: + mkPath(log, DatabaseDirectory + "/" + dir) + +# Setup export directories +printLog(log, ">>> Setup export directories <<<") +mkPath(log, ExportBuildDirectory + "/" + CeguiImagesetExportDirectory) + +# Setup build directories +printLog(log, ">>> Setup build directories <<<") +mkPath(log, ExportBuildDirectory + "/" + CeguiImagesetBuildDirectory) + +# Setup client directories +printLog(log, ">>> Setup client directories <<<") +mkPath(log, InstallDirectory + "/" + CeguiImagesetInstallDirectory) + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/cegui/1_export.py b/code/nel/tools/build_gamedata/processes/cegui/1_export.py old mode 100755 new mode 100644 index 018562c46..897247498 --- a/code/nel/tools/build_gamedata/processes/cegui/1_export.py +++ b/code/nel/tools/build_gamedata/processes/cegui/1_export.py @@ -1,67 +1,67 @@ -#!/usr/bin/python -# -# \file 1_export.py -# \brief Export cegui -# \date 2009-03-14-17-46-GMT -# \author Jan Boon (Kaetemi) -# Export cegui -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Export cegui") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -# For each cegui imageset directory -printLog(log, ">>> Export cegui imagesets <<<") -destDir = ExportBuildDirectory + "/" + CeguiImagesetExportDirectory -mkPath(log, destDir) -for dir in CeguiImagesetSourceDirectories: - srcDir = DatabaseDirectory + "/" + dir - mkPath(log, srcDir) - imagesets = findFiles(log, srcDir, "", ".imageset") - if (len(imagesets) != 1): - printLog(log, "FAIL Cannot find *.imageset, folder must contain at least one and only one imageset xml file") - else: - niouname = dir.replace("/", "_") - newpath = destDir + "/" + niouname - mkPath(log, newpath) - copyFileIfNeeded(log, srcDir + "/" + imagesets[0], newpath + ".imageset") - copyFilesExtNoTreeIfNeeded(log, srcDir, newpath, ".tga") - copyFilesExtNoTreeIfNeeded(log, srcDir, newpath, ".png") -printLog(log, "") - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 1_export.py +# \brief Export cegui +# \date 2009-03-14-17-46-GMT +# \author Jan Boon (Kaetemi) +# Export cegui +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Export cegui") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +# For each cegui imageset directory +printLog(log, ">>> Export cegui imagesets <<<") +destDir = ExportBuildDirectory + "/" + CeguiImagesetExportDirectory +mkPath(log, destDir) +for dir in CeguiImagesetSourceDirectories: + srcDir = DatabaseDirectory + "/" + dir + mkPath(log, srcDir) + imagesets = findFiles(log, srcDir, "", ".imageset") + if (len(imagesets) != 1): + printLog(log, "FAIL Cannot find *.imageset, folder must contain at least one and only one imageset xml file") + else: + niouname = dir.replace("/", "_") + newpath = destDir + "/" + niouname + mkPath(log, newpath) + copyFileIfNeeded(log, srcDir + "/" + imagesets[0], newpath + ".imageset") + copyFilesExtNoTreeIfNeeded(log, srcDir, newpath, ".tga") + copyFilesExtNoTreeIfNeeded(log, srcDir, newpath, ".png") +printLog(log, "") + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/cegui/2_build.py b/code/nel/tools/build_gamedata/processes/cegui/2_build.py old mode 100755 new mode 100644 index 134830547..5bef5ec90 --- a/code/nel/tools/build_gamedata/processes/cegui/2_build.py +++ b/code/nel/tools/build_gamedata/processes/cegui/2_build.py @@ -1,67 +1,67 @@ -#!/usr/bin/python -# -# \file 2_build.py -# \brief Build cegui -# \date 2009-03-14-17-46-GMT -# \author Jan Boon (Kaetemi) -# Build cegui -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Build cegui") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -# Find tools -BuildImageset = findTool(log, ToolDirectories, BuildImagesetTool, ToolSuffix) -printLog(log, "") - -# For each cegui imageset directory -printLog(log, ">>> Build cegui imagesets <<<") -if BuildImageset == "": - toolLogFail(log, BuildImagesetTool, ToolSuffix) -else: - srcDir = ExportBuildDirectory + "/" + CeguiImagesetExportDirectory - mkPath(log, srcDir) - destDir = ExportBuildDirectory + "/" + CeguiImagesetBuildDirectory - mkPath(log, destDir) - for dir in os.listdir(srcDir): - if (os.path.isdir(srcDir + "/" + dir)) and dir != ".svn" and dir != "*.*": - mkPath(log, srcDir + "/" + dir) - subprocess.call([ BuildImageset, destDir + "/" + dir + ".tga", srcDir + "/" + dir ]) -printLog(log, "") - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 2_build.py +# \brief Build cegui +# \date 2009-03-14-17-46-GMT +# \author Jan Boon (Kaetemi) +# Build cegui +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Build cegui") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +# Find tools +BuildImageset = findTool(log, ToolDirectories, BuildImagesetTool, ToolSuffix) +printLog(log, "") + +# For each cegui imageset directory +printLog(log, ">>> Build cegui imagesets <<<") +if BuildImageset == "": + toolLogFail(log, BuildImagesetTool, ToolSuffix) +else: + srcDir = ExportBuildDirectory + "/" + CeguiImagesetExportDirectory + mkPath(log, srcDir) + destDir = ExportBuildDirectory + "/" + CeguiImagesetBuildDirectory + mkPath(log, destDir) + for dir in os.listdir(srcDir): + if (os.path.isdir(srcDir + "/" + dir)) and dir != ".svn" and dir != "*.*": + mkPath(log, srcDir + "/" + dir) + subprocess.call([ BuildImageset, destDir + "/" + dir + ".tga", srcDir + "/" + dir ]) +printLog(log, "") + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/cegui/3_install.py b/code/nel/tools/build_gamedata/processes/cegui/3_install.py old mode 100755 new mode 100644 index d1d6547ad..136f4e60b --- a/code/nel/tools/build_gamedata/processes/cegui/3_install.py +++ b/code/nel/tools/build_gamedata/processes/cegui/3_install.py @@ -1,56 +1,56 @@ -#!/usr/bin/python -# -# \file 3_install.py -# \brief Install cegui -# \date 2009-03-14-17-46-GMT -# \author Jan Boon (Kaetemi) -# Install cegui -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Install cegui") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -printLog(log, ">>> Install cegui imagesets <<<") -srcDir = ExportBuildDirectory + "/" + CeguiImagesetBuildDirectory -mkPath(log, srcDir) -destDir = InstallDirectory + "/" + CeguiImagesetInstallDirectory -mkPath(log, destDir) -copyFilesNoTreeIfNeeded(log, srcDir, destDir) - -printLog(log, "") -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 3_install.py +# \brief Install cegui +# \date 2009-03-14-17-46-GMT +# \author Jan Boon (Kaetemi) +# Install cegui +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite_local import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Install cegui") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +printLog(log, ">>> Install cegui imagesets <<<") +srcDir = ExportBuildDirectory + "/" + CeguiImagesetBuildDirectory +mkPath(log, srcDir) +destDir = InstallDirectory + "/" + CeguiImagesetInstallDirectory +mkPath(log, destDir) +copyFilesNoTreeIfNeeded(log, srcDir, destDir) + +printLog(log, "") +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/clodbank/0_setup.py b/code/nel/tools/build_gamedata/processes/clodbank/0_setup.py old mode 100755 new mode 100644 index a4ab0f4df..cd350d0c8 --- a/code/nel/tools/build_gamedata/processes/clodbank/0_setup.py +++ b/code/nel/tools/build_gamedata/processes/clodbank/0_setup.py @@ -1,87 +1,87 @@ -#!/usr/bin/python -# -# \file 0_setup.py -# \brief Setup clodbank -# \date 2009-03-10 14:56GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Setup clodbank -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Setup clodbank") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -# Setup source directories -printLog(log, ">>> Setup source directories <<<") -for dir in ClodSourceDirectories: - mkPath(log, DatabaseDirectory + "/" + dir) - -# Setup export directories -printLog(log, ">>> Setup export directories <<<") -mkPath(log, ExportBuildDirectory + "/" + ClodTagExportDirectory) -mkPath(log, ExportBuildDirectory + "/" + ClodExportDirectory) -mkPath(log, ExportBuildDirectory + "/" + SkelExportDirectory) - -# Setup build directories -printLog(log, ">>> Setup build directories <<<") -mkPath(log, ExportBuildDirectory + "/" + ClodBankBuildDirectory) -mkPath(log, ExportBuildDirectory + "/" + AnimBuildDirectory) - -# Setup client directories -printLog(log, ">>> Setup client directories <<<") -mkPath(log, InstallDirectory + "/" + ShapeInstallDirectory) - -# Setup configuration files -printLog(log, ">>> Setup configuration files <<<") -mkPath(log, ActiveProjectDirectory + "/generated") -cfgOut = open(ActiveProjectDirectory + "/generated/clod_paths.cfg", "w") -cfgOut.write("\n") -cfgOut.write("// The search pathes, look in the current process\n") -cfgOut.write("search_pathes = \n") -cfgOut.write("{\n") -cfgOut.write("\t\"" + ExportBuildDirectory + "/" + ClodExportDirectory + "\", \n") -cfgOut.write("\t\"" + ExportBuildDirectory + "/" + SkelExportDirectory + "\", \n") -cfgOut.write("\t\"" + ExportBuildDirectory + "/" + AnimBuildDirectory + "\", \n") -cfgOut.write("\t\"" + ExportBuildDirectory + "/" + ShapeOptimizedBuildDirectory + "\", \n") -cfgOut.write("\t\"" + ExportBuildDirectory + "/" + ShapeWithCoarseMeshBuildDirectory + "\", \n") -cfgOut.write("};\n") -cfgOut.write("\n") -cfgOut.close() - - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 0_setup.py +# \brief Setup clodbank +# \date 2009-03-10 14:56GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Setup clodbank +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Setup clodbank") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +# Setup source directories +printLog(log, ">>> Setup source directories <<<") +for dir in ClodSourceDirectories: + mkPath(log, DatabaseDirectory + "/" + dir) + +# Setup export directories +printLog(log, ">>> Setup export directories <<<") +mkPath(log, ExportBuildDirectory + "/" + ClodTagExportDirectory) +mkPath(log, ExportBuildDirectory + "/" + ClodExportDirectory) +mkPath(log, ExportBuildDirectory + "/" + SkelExportDirectory) + +# Setup build directories +printLog(log, ">>> Setup build directories <<<") +mkPath(log, ExportBuildDirectory + "/" + ClodBankBuildDirectory) +mkPath(log, ExportBuildDirectory + "/" + AnimBuildDirectory) + +# Setup client directories +printLog(log, ">>> Setup client directories <<<") +mkPath(log, InstallDirectory + "/" + ShapeInstallDirectory) + +# Setup configuration files +printLog(log, ">>> Setup configuration files <<<") +mkPath(log, ActiveProjectDirectory + "/generated") +cfgOut = open(ActiveProjectDirectory + "/generated/clod_paths.cfg", "w") +cfgOut.write("\n") +cfgOut.write("// The search pathes, look in the current process\n") +cfgOut.write("search_pathes = \n") +cfgOut.write("{\n") +cfgOut.write("\t\"" + ExportBuildDirectory + "/" + ClodExportDirectory + "\", \n") +cfgOut.write("\t\"" + ExportBuildDirectory + "/" + SkelExportDirectory + "\", \n") +cfgOut.write("\t\"" + ExportBuildDirectory + "/" + AnimBuildDirectory + "\", \n") +cfgOut.write("\t\"" + ExportBuildDirectory + "/" + ShapeOptimizedBuildDirectory + "\", \n") +cfgOut.write("\t\"" + ExportBuildDirectory + "/" + ShapeWithCoarseMeshBuildDirectory + "\", \n") +cfgOut.write("};\n") +cfgOut.write("\n") +cfgOut.close() + + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/clodbank/1_export.py b/code/nel/tools/build_gamedata/processes/clodbank/1_export.py old mode 100755 new mode 100644 index c73a86ac7..118773463 --- a/code/nel/tools/build_gamedata/processes/clodbank/1_export.py +++ b/code/nel/tools/build_gamedata/processes/clodbank/1_export.py @@ -1,139 +1,139 @@ -#!/usr/bin/python -# -# ################################################################# -# ## WARNING : this is a generated file, don't change it ! -# ################################################################# -# -# \file 1_export.py -# \brief Export clodbank -# \date 2015-01-06-16-31-GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Export clodbank -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -import time, sys, os, shutil, subprocess, distutils.dir_util -sys.path.append("../../configuration") - -if os.path.isfile("log.log"): - os.remove("log.log") -if os.path.isfile("temp_log.log"): - os.remove("temp_log.log") -log = open("temp_log.log", "w") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Export clodbank") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - - -# Find tools -# ... - -# Export clodbank 3dsmax -if MaxAvailable: - # Find tools - Max = findMax(log, MaxDirectory, MaxExecutable) - printLog(log, "") - - printLog(log, ">>> Export clodbank 3dsmax <<<") - mkPath(log, ExportBuildDirectory + "/" + ClodExportDirectory) - mkPath(log, ExportBuildDirectory + "/" + ClodTagExportDirectory) - for dir in ClodSourceDirectories: - mkPath(log, DatabaseDirectory + "/" + dir) - if (needUpdateDirByTagLog(log, DatabaseDirectory + "/" + dir, ".max", ExportBuildDirectory + "/" + ClodTagExportDirectory, ".max.tag")): - scriptSrc = "maxscript/clod_export.ms" - scriptDst = MaxUserDirectory + "/scripts/clod_export.ms" - outputLogfile = ScriptDirectory + "/processes/clodbank/log.log" - outputDirectory = ExportBuildDirectory + "/" + ClodExportDirectory - tagDirectory = ExportBuildDirectory + "/" + ClodTagExportDirectory - maxSourceDir = DatabaseDirectory + "/" + dir - maxRunningTagFile = tagDirectory + "/max_running.tag" - tagList = findFiles(log, tagDirectory, "", ".max.tag") - tagLen = len(tagList) - if os.path.isfile(scriptDst): - os.remove(scriptDst) - tagDiff = 1 - sSrc = open(scriptSrc, "r") - sDst = open(scriptDst, "w") - for line in sSrc: - newline = line.replace("%OutputLogfile%", outputLogfile) - newline = newline.replace("%MaxSourceDirectory%", maxSourceDir) - newline = newline.replace("%OutputDirectory%", outputDirectory) - newline = newline.replace("%TagDirectory%", tagDirectory) - sDst.write(newline) - sSrc.close() - sDst.close() - zeroRetryLimit = 3 - while tagDiff > 0: - mrt = open(maxRunningTagFile, "w") - mrt.write("moe-moe-kyun") - mrt.close() - printLog(log, "MAXSCRIPT " + scriptDst) - subprocess.call([ Max, "-U", "MAXScript", "clod_export.ms", "-q", "-mi", "-mip" ]) - if os.path.exists(outputLogfile): - try: - lSrc = open(outputLogfile, "r") - for line in lSrc: - lineStrip = line.strip() - if (len(lineStrip) > 0): - printLog(log, lineStrip) - lSrc.close() - os.remove(outputLogfile) - except Exception: - printLog(log, "ERROR Failed to read 3dsmax log") - else: - printLog(log, "WARNING No 3dsmax log") - tagList = findFiles(log, tagDirectory, "", ".max.tag") - newTagLen = len(tagList) - tagDiff = newTagLen - tagLen - tagLen = newTagLen - addTagDiff = 0 - if os.path.exists(maxRunningTagFile): - printLog(log, "FAIL 3ds Max crashed and/or file export failed!") - if tagDiff == 0: - if zeroRetryLimit > 0: - zeroRetryLimit = zeroRetryLimit - 1 - addTagDiff = 1 - else: - printLog(log, "FAIL Retry limit reached!") - else: - addTagDiff = 1 - os.remove(maxRunningTagFile) - printLog(log, "Exported " + str(tagDiff) + " .max files!") - tagDiff += addTagDiff - os.remove(scriptDst) - printLog(log, "") - - - -log.close() -if os.path.isfile("log.log"): - os.remove("log.log") -shutil.move("temp_log.log", "log.log") - - -# end of file +#!/usr/bin/python +# +# ################################################################# +# ## WARNING : this is a generated file, don't change it ! +# ################################################################# +# +# \file 1_export.py +# \brief Export clodbank +# \date 2015-01-06-16-31-GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Export clodbank +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +import time, sys, os, shutil, subprocess, distutils.dir_util +sys.path.append("../../configuration") + +if os.path.isfile("log.log"): + os.remove("log.log") +if os.path.isfile("temp_log.log"): + os.remove("temp_log.log") +log = open("temp_log.log", "w") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Export clodbank") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + + +# Find tools +# ... + +# Export clodbank 3dsmax +if MaxAvailable: + # Find tools + Max = findMax(log, MaxDirectory, MaxExecutable) + printLog(log, "") + + printLog(log, ">>> Export clodbank 3dsmax <<<") + mkPath(log, ExportBuildDirectory + "/" + ClodExportDirectory) + mkPath(log, ExportBuildDirectory + "/" + ClodTagExportDirectory) + for dir in ClodSourceDirectories: + mkPath(log, DatabaseDirectory + "/" + dir) + if (needUpdateDirByTagLog(log, DatabaseDirectory + "/" + dir, ".max", ExportBuildDirectory + "/" + ClodTagExportDirectory, ".max.tag")): + scriptSrc = "maxscript/clod_export.ms" + scriptDst = MaxUserDirectory + "/scripts/clod_export.ms" + outputLogfile = ScriptDirectory + "/processes/clodbank/log.log" + outputDirectory = ExportBuildDirectory + "/" + ClodExportDirectory + tagDirectory = ExportBuildDirectory + "/" + ClodTagExportDirectory + maxSourceDir = DatabaseDirectory + "/" + dir + maxRunningTagFile = tagDirectory + "/max_running.tag" + tagList = findFiles(log, tagDirectory, "", ".max.tag") + tagLen = len(tagList) + if os.path.isfile(scriptDst): + os.remove(scriptDst) + tagDiff = 1 + sSrc = open(scriptSrc, "r") + sDst = open(scriptDst, "w") + for line in sSrc: + newline = line.replace("%OutputLogfile%", outputLogfile) + newline = newline.replace("%MaxSourceDirectory%", maxSourceDir) + newline = newline.replace("%OutputDirectory%", outputDirectory) + newline = newline.replace("%TagDirectory%", tagDirectory) + sDst.write(newline) + sSrc.close() + sDst.close() + zeroRetryLimit = 3 + while tagDiff > 0: + mrt = open(maxRunningTagFile, "w") + mrt.write("moe-moe-kyun") + mrt.close() + printLog(log, "MAXSCRIPT " + scriptDst) + subprocess.call([ Max, "-U", "MAXScript", "clod_export.ms", "-q", "-mi", "-mip" ]) + if os.path.exists(outputLogfile): + try: + lSrc = open(outputLogfile, "r") + for line in lSrc: + lineStrip = line.strip() + if (len(lineStrip) > 0): + printLog(log, lineStrip) + lSrc.close() + os.remove(outputLogfile) + except Exception: + printLog(log, "ERROR Failed to read 3dsmax log") + else: + printLog(log, "WARNING No 3dsmax log") + tagList = findFiles(log, tagDirectory, "", ".max.tag") + newTagLen = len(tagList) + tagDiff = newTagLen - tagLen + tagLen = newTagLen + addTagDiff = 0 + if os.path.exists(maxRunningTagFile): + printLog(log, "FAIL 3ds Max crashed and/or file export failed!") + if tagDiff == 0: + if zeroRetryLimit > 0: + zeroRetryLimit = zeroRetryLimit - 1 + addTagDiff = 1 + else: + printLog(log, "FAIL Retry limit reached!") + else: + addTagDiff = 1 + os.remove(maxRunningTagFile) + printLog(log, "Exported " + str(tagDiff) + " .max files!") + tagDiff += addTagDiff + os.remove(scriptDst) + printLog(log, "") + + + +log.close() +if os.path.isfile("log.log"): + os.remove("log.log") +shutil.move("temp_log.log", "log.log") + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/clodbank/2_build.py b/code/nel/tools/build_gamedata/processes/clodbank/2_build.py old mode 100755 new mode 100644 index 9146f8c8e..07c896bc6 --- a/code/nel/tools/build_gamedata/processes/clodbank/2_build.py +++ b/code/nel/tools/build_gamedata/processes/clodbank/2_build.py @@ -1,68 +1,68 @@ -#!/usr/bin/python -# -# \file 2_build.py -# \brief Build clodbank -# \date 2009-03-10 13:13GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Build clodbank -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Build clodbank") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -# Find tools -BuildClodBank = findTool(log, ToolDirectories, BuildClodBankTool, ToolSuffix) -printLog(log, "") - -# Build clodbank -printLog(log, ">>> Build clodbank <<<") -if BuildClodBank == "": - toolLogFail(log, BuildClodBankTool, ToolSuffix) -else: - srcDir = ExportBuildDirectory + "/" + ClodExportDirectory - mkPath(log, srcDir) - destDir = ExportBuildDirectory + "/" + ClodBankBuildDirectory - mkPath(log, destDir) - mkPath(log, ActiveProjectDirectory + "/generated") - destFile = destDir + "/" + ClodBankFileName - configFile = DatabaseDirectory + "/" + ClodConfigFile - subprocess.call([ BuildClodBank, ActiveProjectDirectory + "/generated/clod_paths.cfg", configFile, destFile ]) -printLog(log, "") - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 2_build.py +# \brief Build clodbank +# \date 2009-03-10 13:13GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Build clodbank +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Build clodbank") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +# Find tools +BuildClodBank = findTool(log, ToolDirectories, BuildClodBankTool, ToolSuffix) +printLog(log, "") + +# Build clodbank +printLog(log, ">>> Build clodbank <<<") +if BuildClodBank == "": + toolLogFail(log, BuildClodBankTool, ToolSuffix) +else: + srcDir = ExportBuildDirectory + "/" + ClodExportDirectory + mkPath(log, srcDir) + destDir = ExportBuildDirectory + "/" + ClodBankBuildDirectory + mkPath(log, destDir) + mkPath(log, ActiveProjectDirectory + "/generated") + destFile = destDir + "/" + ClodBankFileName + configFile = DatabaseDirectory + "/" + ClodConfigFile + subprocess.call([ BuildClodBank, ActiveProjectDirectory + "/generated/clod_paths.cfg", configFile, destFile ]) +printLog(log, "") + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/clodbank/3_install.py b/code/nel/tools/build_gamedata/processes/clodbank/3_install.py old mode 100755 new mode 100644 index b8da3d280..17ce9c0b9 --- a/code/nel/tools/build_gamedata/processes/clodbank/3_install.py +++ b/code/nel/tools/build_gamedata/processes/clodbank/3_install.py @@ -1,57 +1,57 @@ -#!/usr/bin/python -# -# \file 3_install.py -# \brief Install clodbank -# \date 2009-03-10 13:13GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Install clodbank -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Install clodbank") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -printLog(log, ">>> Install clodbank <<<") -srcDir = ExportBuildDirectory + "/" + ClodBankBuildDirectory -mkPath(log, srcDir) -destDir = InstallDirectory + "/" + ShapeInstallDirectory -mkPath(log, destDir) -copyFilesNoTreeIfNeeded(log, srcDir, destDir) - -printLog(log, "") -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 3_install.py +# \brief Install clodbank +# \date 2009-03-10 13:13GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Install clodbank +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite_local import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Install clodbank") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +printLog(log, ">>> Install clodbank <<<") +srcDir = ExportBuildDirectory + "/" + ClodBankBuildDirectory +mkPath(log, srcDir) +destDir = InstallDirectory + "/" + ShapeInstallDirectory +mkPath(log, destDir) +copyFilesNoTreeIfNeeded(log, srcDir, destDir) + +printLog(log, "") +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/clodbank/maxscript/clod_export.ms b/code/nel/tools/build_gamedata/processes/clodbank/maxscript/clod_export.ms old mode 100755 new mode 100644 diff --git a/code/nel/tools/build_gamedata/processes/copy/0_setup.py b/code/nel/tools/build_gamedata/processes/copy/0_setup.py old mode 100755 new mode 100644 index f87f94bc9..17d08f6ba --- a/code/nel/tools/build_gamedata/processes/copy/0_setup.py +++ b/code/nel/tools/build_gamedata/processes/copy/0_setup.py @@ -1,76 +1,76 @@ -#!/usr/bin/python -# -# \file 0_setup.py -# \brief setup copy -# \date 2010-05-24 13:42GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Setup copy -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Setup copy") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -# Setup source directories -printLog(log, ">>> Setup source directories <<<") -for dir in CopyDirectSourceDirectories: - mkPath(log, dir) -for file in CopyDirectSourceFiles: - mkPath(log, os.path.dirname(file)) -for dir in CopyLeveldesignSourceDirectories: - mkPath(log, LeveldesignDirectory + "/" + dir) -for file in CopyLeveldesignSourceFiles: - mkPath(log, os.path.dirname(LeveldesignDirectory + "/" + file)) -for dir in CopyLeveldesignWorldSourceDirectories: - mkPath(log, LeveldesignWorldDirectory + "/" + dir) -for file in CopyLeveldesignWorldSourceFiles: - mkPath(log, os.path.dirname(LeveldesignWorldDirectory + "/" + file)) -for dir in CopyLeveldesignDfnSourceDirectories: - mkPath(log, LeveldesignDfnDirectory + "/" + dir) -for file in CopyLeveldesignDfnSourceFiles: - mkPath(log, os.path.dirname(LeveldesignDfnDirectory + "/" + file)) -for dir in CopyDatabaseSourceDirectories: - mkPath(log, DatabaseDirectory + "/" + dir) -for file in CopyDatabaseSourceFiles: - mkPath(log, os.path.dirname(DatabaseDirectory + "/" + file)) - -# Setup client directories -printLog(log, ">>> Setup client directories <<<") -mkPath(log, InstallDirectory + "/" + CopyInstallDirectory) - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 0_setup.py +# \brief setup copy +# \date 2010-05-24 13:42GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Setup copy +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Setup copy") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +# Setup source directories +printLog(log, ">>> Setup source directories <<<") +for dir in CopyDirectSourceDirectories: + mkPath(log, dir) +for file in CopyDirectSourceFiles: + mkPath(log, os.path.dirname(file)) +for dir in CopyLeveldesignSourceDirectories: + mkPath(log, LeveldesignDirectory + "/" + dir) +for file in CopyLeveldesignSourceFiles: + mkPath(log, os.path.dirname(LeveldesignDirectory + "/" + file)) +for dir in CopyLeveldesignWorldSourceDirectories: + mkPath(log, LeveldesignWorldDirectory + "/" + dir) +for file in CopyLeveldesignWorldSourceFiles: + mkPath(log, os.path.dirname(LeveldesignWorldDirectory + "/" + file)) +for dir in CopyLeveldesignDfnSourceDirectories: + mkPath(log, LeveldesignDfnDirectory + "/" + dir) +for file in CopyLeveldesignDfnSourceFiles: + mkPath(log, os.path.dirname(LeveldesignDfnDirectory + "/" + file)) +for dir in CopyDatabaseSourceDirectories: + mkPath(log, DatabaseDirectory + "/" + dir) +for file in CopyDatabaseSourceFiles: + mkPath(log, os.path.dirname(DatabaseDirectory + "/" + file)) + +# Setup client directories +printLog(log, ">>> Setup client directories <<<") +mkPath(log, InstallDirectory + "/" + CopyInstallDirectory) + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/copy/1_export.py b/code/nel/tools/build_gamedata/processes/copy/1_export.py old mode 100755 new mode 100644 index 39fa7fa4e..a001d7a95 --- a/code/nel/tools/build_gamedata/processes/copy/1_export.py +++ b/code/nel/tools/build_gamedata/processes/copy/1_export.py @@ -1,49 +1,49 @@ -#!/usr/bin/python -# -# \file 1_export.py -# \brief Export copy -# \date 2010-05-24 13:42GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Export copy -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Export copy") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 1_export.py +# \brief Export copy +# \date 2010-05-24 13:42GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Export copy +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Export copy") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/copy/2_build.py b/code/nel/tools/build_gamedata/processes/copy/2_build.py old mode 100755 new mode 100644 index 796ce3451..7333235b0 --- a/code/nel/tools/build_gamedata/processes/copy/2_build.py +++ b/code/nel/tools/build_gamedata/processes/copy/2_build.py @@ -1,49 +1,49 @@ -#!/usr/bin/python -# -# \file 2_build.py -# \brief Build copy -# \date 2010-05-24 13:42GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Build copy -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Build copy") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 2_build.py +# \brief Build copy +# \date 2010-05-24 13:42GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Build copy +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Build copy") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/copy/3_install.py b/code/nel/tools/build_gamedata/processes/copy/3_install.py old mode 100755 new mode 100644 index 7bcacc473..89e149e63 --- a/code/nel/tools/build_gamedata/processes/copy/3_install.py +++ b/code/nel/tools/build_gamedata/processes/copy/3_install.py @@ -1,85 +1,85 @@ -#!/usr/bin/python -# -# \file 3_install.py -# \brief Install copy -# \date 2010-05-24 13:42GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Install copy -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Install copy") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -installPath = InstallDirectory + "/" + CopyInstallDirectory -mkPath(log, installPath) - -printLog(log, ">>> Install copy <<<") -for dir in CopyDirectSourceDirectories: - copyFilesRecursiveNoTreeIfNeeded(log, dir, installPath) -for file in CopyDirectSourceFiles: - copyFileIfNeeded(log, file, installPath + "/" + os.path.basename(file)) -for dir in CopyLeveldesignSourceDirectories: - copyFilesRecursiveNoTreeIfNeeded(log, LeveldesignDirectory + "/" + dir, installPath) -for file in CopyLeveldesignSourceFiles: - copyFileIfNeeded(log, LeveldesignDirectory + "/" + file, installPath + "/" + os.path.basename(file)) -for dir in CopyLeveldesignWorldSourceDirectories: - copyFilesRecursiveNoTreeIfNeeded(log, LeveldesignWorldDirectory + "/" + dir, installPath) -for file in CopyLeveldesignWorldSourceFiles: - copyFileIfNeeded(log, LeveldesignWorldDirectory + "/" + file, installPath + "/" + os.path.basename(file)) -for dir in CopyLeveldesignDfnSourceDirectories: - copyFilesRecursiveNoTreeIfNeeded(log, LeveldesignDfnDirectory + "/" + dir, installPath) -for file in CopyLeveldesignDfnSourceFiles: - copyFileIfNeeded(log, LeveldesignDfnDirectory + "/" + file, installPath + "/" + os.path.basename(file)) -for dir in CopyDatabaseSourceDirectories: - copyFilesRecursiveNoTreeIfNeeded(log, DatabaseDirectory + "/" + dir, installPath) -for file in CopyDatabaseSourceFiles: - copyFileIfNeeded(log, DatabaseDirectory + "/" + file, installPath + "/" + os.path.basename(file)) - -try: - CopyWindowsExeDllCfgSourceFiles -except NameError: - CopyWindowsExeDllCfgSourceFiles = [ ] -for file in CopyWindowsExeDllCfgSourceFiles: - filePath = findFileMultiDir(log, WindowsExeDllCfgDirectories, file) - if (filePath != ""): - copyFileIfNeeded(log, filePath, installPath + "/" + os.path.basename(file)) - -printLog(log, "") - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 3_install.py +# \brief Install copy +# \date 2010-05-24 13:42GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Install copy +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite_local import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Install copy") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +installPath = InstallDirectory + "/" + CopyInstallDirectory +mkPath(log, installPath) + +printLog(log, ">>> Install copy <<<") +for dir in CopyDirectSourceDirectories: + copyFilesRecursiveNoTreeIfNeeded(log, dir, installPath) +for file in CopyDirectSourceFiles: + copyFileIfNeeded(log, file, installPath + "/" + os.path.basename(file)) +for dir in CopyLeveldesignSourceDirectories: + copyFilesRecursiveNoTreeIfNeeded(log, LeveldesignDirectory + "/" + dir, installPath) +for file in CopyLeveldesignSourceFiles: + copyFileIfNeeded(log, LeveldesignDirectory + "/" + file, installPath + "/" + os.path.basename(file)) +for dir in CopyLeveldesignWorldSourceDirectories: + copyFilesRecursiveNoTreeIfNeeded(log, LeveldesignWorldDirectory + "/" + dir, installPath) +for file in CopyLeveldesignWorldSourceFiles: + copyFileIfNeeded(log, LeveldesignWorldDirectory + "/" + file, installPath + "/" + os.path.basename(file)) +for dir in CopyLeveldesignDfnSourceDirectories: + copyFilesRecursiveNoTreeIfNeeded(log, LeveldesignDfnDirectory + "/" + dir, installPath) +for file in CopyLeveldesignDfnSourceFiles: + copyFileIfNeeded(log, LeveldesignDfnDirectory + "/" + file, installPath + "/" + os.path.basename(file)) +for dir in CopyDatabaseSourceDirectories: + copyFilesRecursiveNoTreeIfNeeded(log, DatabaseDirectory + "/" + dir, installPath) +for file in CopyDatabaseSourceFiles: + copyFileIfNeeded(log, DatabaseDirectory + "/" + file, installPath + "/" + os.path.basename(file)) + +try: + CopyWindowsExeDllCfgSourceFiles +except NameError: + CopyWindowsExeDllCfgSourceFiles = [ ] +for file in CopyWindowsExeDllCfgSourceFiles: + filePath = findFileMultiDir(log, WindowsExeDllCfgDirectories, file) + if (filePath != ""): + copyFileIfNeeded(log, filePath, installPath + "/" + os.path.basename(file)) + +printLog(log, "") + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/displace/0_setup.py b/code/nel/tools/build_gamedata/processes/displace/0_setup.py old mode 100755 new mode 100644 index 6a5e3170e..024311e25 --- a/code/nel/tools/build_gamedata/processes/displace/0_setup.py +++ b/code/nel/tools/build_gamedata/processes/displace/0_setup.py @@ -1,65 +1,65 @@ -#!/usr/bin/python -# -# \file 0_setup.py -# \brief Setup displace -# \date 2009-03-10-21-45-GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Setup displace -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Setup displace") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -# Setup source directories -printLog(log, ">>> Setup source directories <<<") -for dir in DisplaceSourceDirectories: - mkPath(log, DatabaseDirectory + "/" + dir) - -# Setup export directories -printLog(log, ">>> Setup export directories <<<") -mkPath(log, ExportBuildDirectory + "/" + DisplaceExportDirectory) - -# Setup build directories -printLog(log, ">>> Setup build directories <<<") - -# Setup client directories -printLog(log, ">>> Setup client directories <<<") -mkPath(log, InstallDirectory + "/" + DisplaceInstallDirectory) - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 0_setup.py +# \brief Setup displace +# \date 2009-03-10-21-45-GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Setup displace +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Setup displace") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +# Setup source directories +printLog(log, ">>> Setup source directories <<<") +for dir in DisplaceSourceDirectories: + mkPath(log, DatabaseDirectory + "/" + dir) + +# Setup export directories +printLog(log, ">>> Setup export directories <<<") +mkPath(log, ExportBuildDirectory + "/" + DisplaceExportDirectory) + +# Setup build directories +printLog(log, ">>> Setup build directories <<<") + +# Setup client directories +printLog(log, ">>> Setup client directories <<<") +mkPath(log, InstallDirectory + "/" + DisplaceInstallDirectory) + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/displace/1_export.py b/code/nel/tools/build_gamedata/processes/displace/1_export.py old mode 100755 new mode 100644 index 52ce5e24d..46314a123 --- a/code/nel/tools/build_gamedata/processes/displace/1_export.py +++ b/code/nel/tools/build_gamedata/processes/displace/1_export.py @@ -1,55 +1,55 @@ -#!/usr/bin/python -# -# \file 1_export.py -# \brief Export displace -# \date 2009-03-10-21-45-GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Export displace -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Export displace") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -mkPath(log, ExportBuildDirectory + "/" + DisplaceExportDirectory) -for dir in DisplaceSourceDirectories: - mkPath(log, DatabaseDirectory + "/" + dir) - copyFilesExtNoTreeIfNeeded(log, DatabaseDirectory + "/" + dir, ExportBuildDirectory + "/" + DisplaceExportDirectory, ".tga") - copyFilesExtNoTreeIfNeeded(log, DatabaseDirectory + "/" + dir, ExportBuildDirectory + "/" + DisplaceExportDirectory, ".png") - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 1_export.py +# \brief Export displace +# \date 2009-03-10-21-45-GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Export displace +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Export displace") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +mkPath(log, ExportBuildDirectory + "/" + DisplaceExportDirectory) +for dir in DisplaceSourceDirectories: + mkPath(log, DatabaseDirectory + "/" + dir) + copyFilesExtNoTreeIfNeeded(log, DatabaseDirectory + "/" + dir, ExportBuildDirectory + "/" + DisplaceExportDirectory, ".tga") + copyFilesExtNoTreeIfNeeded(log, DatabaseDirectory + "/" + dir, ExportBuildDirectory + "/" + DisplaceExportDirectory, ".png") + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/displace/2_build.py b/code/nel/tools/build_gamedata/processes/displace/2_build.py old mode 100755 new mode 100644 index bc7f91aac..6cb8bc7a9 --- a/code/nel/tools/build_gamedata/processes/displace/2_build.py +++ b/code/nel/tools/build_gamedata/processes/displace/2_build.py @@ -1,49 +1,49 @@ -#!/usr/bin/python -# -# \file 2_build.py -# \brief Build displace -# \date 2009-03-10-21-45-GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Build displace -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Build displace") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 2_build.py +# \brief Build displace +# \date 2009-03-10-21-45-GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Build displace +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Build displace") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/displace/3_install.py b/code/nel/tools/build_gamedata/processes/displace/3_install.py old mode 100755 new mode 100644 index 76c0c03e4..f067939a9 --- a/code/nel/tools/build_gamedata/processes/displace/3_install.py +++ b/code/nel/tools/build_gamedata/processes/displace/3_install.py @@ -1,57 +1,57 @@ -#!/usr/bin/python -# -# \file 3_install.py -# \brief Install displace -# \date 2009-03-10-21-45-GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Install displace -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Install displace") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -printLog(log, ">>> Install displace <<<") -installPath = InstallDirectory + "/" + DisplaceInstallDirectory -mkPath(log, installPath) -mkPath(log, ExportBuildDirectory + "/" + DisplaceExportDirectory) -copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + DisplaceExportDirectory, installPath, ".tga") -copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + DisplaceExportDirectory, installPath, ".png") - -printLog(log, "") -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 3_install.py +# \brief Install displace +# \date 2009-03-10-21-45-GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Install displace +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite_local import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Install displace") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +printLog(log, ">>> Install displace <<<") +installPath = InstallDirectory + "/" + DisplaceInstallDirectory +mkPath(log, installPath) +mkPath(log, ExportBuildDirectory + "/" + DisplaceExportDirectory) +copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + DisplaceExportDirectory, installPath, ".tga") +copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + DisplaceExportDirectory, installPath, ".png") + +printLog(log, "") +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/farbank/0_setup.py b/code/nel/tools/build_gamedata/processes/farbank/0_setup.py old mode 100755 new mode 100644 index 9761fa8b1..28b50daa7 --- a/code/nel/tools/build_gamedata/processes/farbank/0_setup.py +++ b/code/nel/tools/build_gamedata/processes/farbank/0_setup.py @@ -1,66 +1,66 @@ -#!/usr/bin/python -# -# \file 0_setup.py -# \brief setup farbank -# \date 2009-03-10-21-12-GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Setup farbank -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Setup farbank") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -# Setup source directories -printLog(log, ">>> Setup source directories <<<") -for postfix in MultipleTilesPostfix: - mkPath(log, DatabaseDirectory + "/" + TileRootSourceDirectory + postfix) - -# Setup export directories -printLog(log, ">>> Setup export directories <<<") -mkPath(log, ExportBuildDirectory + "/" + SmallbankExportDirectory) - -# Setup build directories -printLog(log, ">>> Setup build directories <<<") -mkPath(log, ExportBuildDirectory + "/" + FarbankBuildDirectory) - -# Setup client directories -printLog(log, ">>> Setup client directories <<<") -mkPath(log, InstallDirectory + "/" + BankInstallDirectory) - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 0_setup.py +# \brief setup farbank +# \date 2009-03-10-21-12-GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Setup farbank +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Setup farbank") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +# Setup source directories +printLog(log, ">>> Setup source directories <<<") +for postfix in MultipleTilesPostfix: + mkPath(log, DatabaseDirectory + "/" + TileRootSourceDirectory + postfix) + +# Setup export directories +printLog(log, ">>> Setup export directories <<<") +mkPath(log, ExportBuildDirectory + "/" + SmallbankExportDirectory) + +# Setup build directories +printLog(log, ">>> Setup build directories <<<") +mkPath(log, ExportBuildDirectory + "/" + FarbankBuildDirectory) + +# Setup client directories +printLog(log, ">>> Setup client directories <<<") +mkPath(log, InstallDirectory + "/" + BankInstallDirectory) + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/farbank/1_export.py b/code/nel/tools/build_gamedata/processes/farbank/1_export.py old mode 100755 new mode 100644 index 380a3444e..f3a88038b --- a/code/nel/tools/build_gamedata/processes/farbank/1_export.py +++ b/code/nel/tools/build_gamedata/processes/farbank/1_export.py @@ -1,49 +1,49 @@ -#!/usr/bin/python -# -# \file 1_export.py -# \brief Export farbank -# \date 2009-03-10-21-12-GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Export farbank -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Export farbank") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 1_export.py +# \brief Export farbank +# \date 2009-03-10-21-12-GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Export farbank +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Export farbank") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/farbank/2_build.py b/code/nel/tools/build_gamedata/processes/farbank/2_build.py old mode 100755 new mode 100644 index 85008bdde..58f89d37b --- a/code/nel/tools/build_gamedata/processes/farbank/2_build.py +++ b/code/nel/tools/build_gamedata/processes/farbank/2_build.py @@ -1,74 +1,74 @@ -#!/usr/bin/python -# -# \file 2_build.py -# \brief Build farbank -# \date 2009-03-10-21-12-GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Build farbank -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Build farbank") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -# Find tools -ExecTimeout = findTool(log, ToolDirectories, ExecTimeoutTool, ToolSuffix) -BuildFarbank = findTool(log, ToolDirectories, BuildFarbankTool, ToolSuffix) -printLog(log, "") - -# For each bank export farbank -printLog(log, ">>> Build farbank <<<") -if ExecTimeout == "": - toolLogFail(log, ExecTimeoutTool, ToolSuffix) -elif BuildFarbank == "": - toolLogFail(log, BuildFarbankTool, ToolSuffix) -else: - mkPath(log, ExportBuildDirectory + "/" + SmallbankExportDirectory) - mkPath(log, ExportBuildDirectory + "/" + FarbankBuildDirectory) - files = findFiles(log, ExportBuildDirectory + "/" + SmallbankExportDirectory, "", ".smallbank") - for file in files: - sourceFile = ExportBuildDirectory + "/" + SmallbankExportDirectory + "/" + file - if os.path.isfile(sourceFile): - for postfix in MultipleTilesPostfix: - destFile = ExportBuildDirectory + "/" + FarbankBuildDirectory + "/" + file[0:-len(".smallbank")] + postfix + ".farbank" - if (needUpdateLogRemoveDest(log, sourceFile, destFile)): - mkPath(log, DatabaseDirectory + "/" + TileRootSourceDirectory + postfix) - subprocess.call([ ExecTimeout, str(FarbankBuildTimeout), BuildFarbank, sourceFile, destFile, "-d" + DatabaseDirectory + "/" + TileRootSourceDirectory + postfix + "/", "-p" + postfix ]) -printLog(log, "") - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 2_build.py +# \brief Build farbank +# \date 2009-03-10-21-12-GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Build farbank +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Build farbank") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +# Find tools +ExecTimeout = findTool(log, ToolDirectories, ExecTimeoutTool, ToolSuffix) +BuildFarbank = findTool(log, ToolDirectories, BuildFarbankTool, ToolSuffix) +printLog(log, "") + +# For each bank export farbank +printLog(log, ">>> Build farbank <<<") +if ExecTimeout == "": + toolLogFail(log, ExecTimeoutTool, ToolSuffix) +elif BuildFarbank == "": + toolLogFail(log, BuildFarbankTool, ToolSuffix) +else: + mkPath(log, ExportBuildDirectory + "/" + SmallbankExportDirectory) + mkPath(log, ExportBuildDirectory + "/" + FarbankBuildDirectory) + files = findFiles(log, ExportBuildDirectory + "/" + SmallbankExportDirectory, "", ".smallbank") + for file in files: + sourceFile = ExportBuildDirectory + "/" + SmallbankExportDirectory + "/" + file + if os.path.isfile(sourceFile): + for postfix in MultipleTilesPostfix: + destFile = ExportBuildDirectory + "/" + FarbankBuildDirectory + "/" + file[0:-len(".smallbank")] + postfix + ".farbank" + if (needUpdateLogRemoveDest(log, sourceFile, destFile)): + mkPath(log, DatabaseDirectory + "/" + TileRootSourceDirectory + postfix) + subprocess.call([ ExecTimeout, str(FarbankBuildTimeout), BuildFarbank, sourceFile, destFile, "-d" + DatabaseDirectory + "/" + TileRootSourceDirectory + postfix + "/", "-p" + postfix ]) +printLog(log, "") + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/farbank/3_install.py b/code/nel/tools/build_gamedata/processes/farbank/3_install.py old mode 100755 new mode 100644 index d9164f84a..6fdbab993 --- a/code/nel/tools/build_gamedata/processes/farbank/3_install.py +++ b/code/nel/tools/build_gamedata/processes/farbank/3_install.py @@ -1,55 +1,55 @@ -#!/usr/bin/python -# -# \file 3_install.py -# \brief Install farbank -# \date 2009-03-10-21-12-GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Install farbank -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Install farbank") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -printLog(log, ">>> Install farbank <<<") -mkPath(log, ExportBuildDirectory + "/" + FarbankBuildDirectory) -mkPath(log, InstallDirectory + "/" + BankInstallDirectory) -copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + FarbankBuildDirectory, InstallDirectory + "/" + BankInstallDirectory, ".farbank") - -printLog(log, "") -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 3_install.py +# \brief Install farbank +# \date 2009-03-10-21-12-GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Install farbank +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite_local import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Install farbank") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +printLog(log, ">>> Install farbank <<<") +mkPath(log, ExportBuildDirectory + "/" + FarbankBuildDirectory) +mkPath(log, InstallDirectory + "/" + BankInstallDirectory) +copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + FarbankBuildDirectory, InstallDirectory + "/" + BankInstallDirectory, ".farbank") + +printLog(log, "") +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/font/0_setup.py b/code/nel/tools/build_gamedata/processes/font/0_setup.py old mode 100755 new mode 100644 index 4b2a149da..9f15c1e00 --- a/code/nel/tools/build_gamedata/processes/font/0_setup.py +++ b/code/nel/tools/build_gamedata/processes/font/0_setup.py @@ -1,65 +1,65 @@ -#!/usr/bin/python -# -# \file 0_setup.py -# \brief setup font -# \date 2009-03-10-19-43-GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# setup font -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Setup font") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -# Setup source directories -printLog(log, ">>> Setup source directories <<<") -for dir in FontSourceDirectories: - mkPath(log, DatabaseDirectory + "/" + dir) - -# Setup export directories -printLog(log, ">>> Setup export directories <<<") -mkPath(log, ExportBuildDirectory + "/" + FontExportDirectory) - -# Setup build directories -printLog(log, ">>> Setup build directories <<<") - -# Setup client directories -printLog(log, ">>> Setup client directories <<<") -mkPath(log, InstallDirectory + "/" + FontInstallDirectory) - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 0_setup.py +# \brief setup font +# \date 2009-03-10-19-43-GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# setup font +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Setup font") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +# Setup source directories +printLog(log, ">>> Setup source directories <<<") +for dir in FontSourceDirectories: + mkPath(log, DatabaseDirectory + "/" + dir) + +# Setup export directories +printLog(log, ">>> Setup export directories <<<") +mkPath(log, ExportBuildDirectory + "/" + FontExportDirectory) + +# Setup build directories +printLog(log, ">>> Setup build directories <<<") + +# Setup client directories +printLog(log, ">>> Setup client directories <<<") +mkPath(log, InstallDirectory + "/" + FontInstallDirectory) + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/font/1_export.py b/code/nel/tools/build_gamedata/processes/font/1_export.py old mode 100755 new mode 100644 index f97d3375e..0bad904f6 --- a/code/nel/tools/build_gamedata/processes/font/1_export.py +++ b/code/nel/tools/build_gamedata/processes/font/1_export.py @@ -1,62 +1,63 @@ -#!/usr/bin/python -# -# \file 1_export.py -# \brief Export font -# \date 2009-03-10-19-43-GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Export font -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Export font") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -printLog(log, ">>> Export font <<<") -fontExportDir = ExportBuildDirectory + "/" + FontExportDirectory -mkPath(log, fontExportDir) -for dir in FontSourceDirectories: - mkPath(log, DatabaseDirectory + "/" + dir) - copyFilesExtNoTreeIfNeeded(log, DatabaseDirectory + "/" + dir, fontExportDir, ".ttf") - copyFilesExtNoTreeIfNeeded(log, DatabaseDirectory + "/" + dir, fontExportDir, ".afm") - copyFilesExtNoTreeIfNeeded(log, DatabaseDirectory + "/" + dir, fontExportDir, ".pfb") - copyFilesExtNoTreeIfNeeded(log, DatabaseDirectory + "/" + dir, fontExportDir, ".pfm") - - -printLog(log, "") - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 1_export.py +# \brief Export font +# \date 2009-03-10-19-43-GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Export font +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Export font") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +printLog(log, ">>> Export font <<<") +fontExportDir = ExportBuildDirectory + "/" + FontExportDirectory +mkPath(log, fontExportDir) +for dir in FontSourceDirectories: + mkPath(log, DatabaseDirectory + "/" + dir) + copyFilesExtNoTreeIfNeeded(log, DatabaseDirectory + "/" + dir, fontExportDir, ".ttf") + copyFilesExtNoTreeIfNeeded(log, DatabaseDirectory + "/" + dir, fontExportDir, ".otf") + copyFilesExtNoTreeIfNeeded(log, DatabaseDirectory + "/" + dir, fontExportDir, ".afm") + copyFilesExtNoTreeIfNeeded(log, DatabaseDirectory + "/" + dir, fontExportDir, ".pfb") + copyFilesExtNoTreeIfNeeded(log, DatabaseDirectory + "/" + dir, fontExportDir, ".pfm") + + +printLog(log, "") + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/font/2_build.py b/code/nel/tools/build_gamedata/processes/font/2_build.py old mode 100755 new mode 100644 index bc8794996..559d98327 --- a/code/nel/tools/build_gamedata/processes/font/2_build.py +++ b/code/nel/tools/build_gamedata/processes/font/2_build.py @@ -1,51 +1,51 @@ -#!/usr/bin/python -# -# \file 2_build.py -# \brief Build font -# \date 2009-03-10-19-43-GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Build font -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Build font") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -printLog(log, "") - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 2_build.py +# \brief Build font +# \date 2009-03-10-19-43-GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Build font +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Build font") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +printLog(log, "") + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/font/3_install.py b/code/nel/tools/build_gamedata/processes/font/3_install.py old mode 100755 new mode 100644 index c18ae12e3..3d244989a --- a/code/nel/tools/build_gamedata/processes/font/3_install.py +++ b/code/nel/tools/build_gamedata/processes/font/3_install.py @@ -1,61 +1,62 @@ -#!/usr/bin/python -# -# \file 3_install.py -# \brief Install font -# \date 2009-03-10-19-43-GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Install font -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Install font") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -installPath = InstallDirectory + "/" + FontInstallDirectory -mkPath(log, installPath) -fontExportDir = ExportBuildDirectory + "/" + FontExportDirectory -mkPath(log, fontExportDir) - -printLog(log, ">>> Install font <<<") -copyFilesExtNoTreeIfNeeded(log, fontExportDir, installPath, ".ttf") -copyFilesExtNoTreeIfNeeded(log, fontExportDir, installPath, ".afm") -copyFilesExtNoTreeIfNeeded(log, fontExportDir, installPath, ".pfb") -copyFilesExtNoTreeIfNeeded(log, fontExportDir, installPath, ".pfm") - -printLog(log, "") -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 3_install.py +# \brief Install font +# \date 2009-03-10-19-43-GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Install font +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite_local import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Install font") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +installPath = InstallDirectory + "/" + FontInstallDirectory +mkPath(log, installPath) +fontExportDir = ExportBuildDirectory + "/" + FontExportDirectory +mkPath(log, fontExportDir) + +printLog(log, ">>> Install font <<<") +copyFilesExtNoTreeIfNeeded(log, fontExportDir, installPath, ".ttf") +copyFilesExtNoTreeIfNeeded(log, fontExportDir, installPath, ".otf") +copyFilesExtNoTreeIfNeeded(log, fontExportDir, installPath, ".afm") +copyFilesExtNoTreeIfNeeded(log, fontExportDir, installPath, ".pfb") +copyFilesExtNoTreeIfNeeded(log, fontExportDir, installPath, ".pfm") + +printLog(log, "") +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/ig/0_setup.py b/code/nel/tools/build_gamedata/processes/ig/0_setup.py old mode 100755 new mode 100644 index 830a32e26..aaeae8c29 --- a/code/nel/tools/build_gamedata/processes/ig/0_setup.py +++ b/code/nel/tools/build_gamedata/processes/ig/0_setup.py @@ -1,78 +1,78 @@ -#!/usr/bin/python -# -# \file 0_setup.py -# \brief setup ig -# \date 2010-05-24 13:42GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Setup ig -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Setup ig") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -# Setup source directories -printLog(log, ">>> Setup source directories <<<") -for dir in IgLandSourceDirectories: - mkPath(log, DatabaseDirectory + "/" + dir) -for dir in IgOtherSourceDirectories: - mkPath(log, DatabaseDirectory + "/" + dir) -mkPath(log, DatabaseDirectory + "/" + LigoBaseSourceDirectory) - -# Setup export directories -printLog(log, ">>> Setup export directories <<<") -mkPath(log, ExportBuildDirectory + "/" + IgStaticLandExportDirectory) -mkPath(log, ExportBuildDirectory + "/" + IgStaticOtherExportDirectory) -mkPath(log, ExportBuildDirectory + "/" + IgStaticTagExportDirectory) - -# Setup build directories -printLog(log, ">>> Setup build directories <<<") -mkPath(log, ExportBuildDirectory + "/" + LigoIgLandBuildDirectory) -mkPath(log, ExportBuildDirectory + "/" + LigoIgOtherBuildDirectory) -mkPath(log, ExportBuildDirectory + "/" + IgElevLandPrimBuildDirectory) -mkPath(log, ExportBuildDirectory + "/" + IgElevLandLigoBuildDirectory) -mkPath(log, ExportBuildDirectory + "/" + IgElevLandStaticBuildDirectory) -mkPath(log, ExportBuildDirectory + "/" + IgTempLandMergeBuildDirectory) -mkPath(log, ExportBuildDirectory + "/" + IgLandBuildDirectory) -mkPath(log, ExportBuildDirectory + "/" + IgOtherBuildDirectory) - -# Setup client directories -printLog(log, ">>> Setup client directories <<<") -#mkPath(log, InstallDirectory + "/" + IgInstallDirectory) - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 0_setup.py +# \brief setup ig +# \date 2010-05-24 13:42GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Setup ig +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Setup ig") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +# Setup source directories +printLog(log, ">>> Setup source directories <<<") +for dir in IgLandSourceDirectories: + mkPath(log, DatabaseDirectory + "/" + dir) +for dir in IgOtherSourceDirectories: + mkPath(log, DatabaseDirectory + "/" + dir) +mkPath(log, DatabaseDirectory + "/" + LigoBaseSourceDirectory) + +# Setup export directories +printLog(log, ">>> Setup export directories <<<") +mkPath(log, ExportBuildDirectory + "/" + IgStaticLandExportDirectory) +mkPath(log, ExportBuildDirectory + "/" + IgStaticOtherExportDirectory) +mkPath(log, ExportBuildDirectory + "/" + IgStaticTagExportDirectory) + +# Setup build directories +printLog(log, ">>> Setup build directories <<<") +mkPath(log, ExportBuildDirectory + "/" + LigoIgLandBuildDirectory) +mkPath(log, ExportBuildDirectory + "/" + LigoIgOtherBuildDirectory) +mkPath(log, ExportBuildDirectory + "/" + IgElevLandPrimBuildDirectory) +mkPath(log, ExportBuildDirectory + "/" + IgElevLandLigoBuildDirectory) +mkPath(log, ExportBuildDirectory + "/" + IgElevLandStaticBuildDirectory) +mkPath(log, ExportBuildDirectory + "/" + IgTempLandMergeBuildDirectory) +mkPath(log, ExportBuildDirectory + "/" + IgLandBuildDirectory) +mkPath(log, ExportBuildDirectory + "/" + IgOtherBuildDirectory) + +# Setup client directories +printLog(log, ">>> Setup client directories <<<") +#mkPath(log, InstallDirectory + "/" + IgInstallDirectory) + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/ig/1_export.py b/code/nel/tools/build_gamedata/processes/ig/1_export.py old mode 100755 new mode 100644 index e22e7ec82..11def37fe --- a/code/nel/tools/build_gamedata/processes/ig/1_export.py +++ b/code/nel/tools/build_gamedata/processes/ig/1_export.py @@ -1,148 +1,148 @@ -#!/usr/bin/python -# -# \file 1_export.py -# \brief Export ig -# \date 2010-05-24 13:42GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Export ig -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -import time, sys, os, shutil, subprocess, distutils.dir_util -sys.path.append("../../configuration") - -if os.path.isfile("log.log"): - os.remove("log.log") -if os.path.isfile("temp_log.log"): - os.remove("temp_log.log") -log = open("temp_log.log", "w") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Export ig") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -Max = "" #find later - - -def igExport(sourceDir, targetDir): - scriptSrc = "maxscript/ig_export.ms" - scriptDst = MaxUserDirectory + "/scripts/ig_export.ms" - outputLogfile = ScriptDirectory + "/processes/ig/log.log" - tagDirectory = ExportBuildDirectory + "/" + IgStaticTagExportDirectory - outputDirectory = ExportBuildDirectory + "/" + targetDir - maxSourceDir = DatabaseDirectory + "/" + sourceDir - maxRunningTagFile = tagDirectory + "/max_running.tag" - if (needUpdateDirByTagLog(log, maxSourceDir, ".max", tagDirectory, ".max.tag")): - tagList = findFiles(log, tagDirectory, "", ".tag") - tagLen = len(tagList) - if os.path.isfile(scriptDst): - os.remove(scriptDst) - tagDiff = 1 - sSrc = open(scriptSrc, "r") - sDst = open(scriptDst, "w") - for line in sSrc: - newline = line.replace("%OutputLogfile%", outputLogfile) - newline = newline.replace("%MaxSourceDirectory%", maxSourceDir) - newline = newline.replace("%OutputDirectory%", outputDirectory) - newline = newline.replace("%TagDirectory%", tagDirectory) - sDst.write(newline) - sSrc.close() - sDst.close() - zeroRetryLimit = 3 - while tagDiff > 0: - mrt = open(maxRunningTagFile, "w") - mrt.write("moe-moe-kyun") - mrt.close() - printLog(log, "MAXSCRIPT " + scriptDst) - subprocess.call([ Max, "-U", "MAXScript", "ig_export.ms", "-q", "-mi", "-mip" ]) - if os.path.exists(outputLogfile): - try: - lSrc = open(outputLogfile, "r") - for line in lSrc: - lineStrip = line.strip() - if (len(lineStrip) > 0): - printLog(log, lineStrip) - lSrc.close() - os.remove(outputLogfile) - except Exception: - printLog(log, "ERROR Failed to read 3dsmax log") - else: - printLog(log, "WARNING No 3dsmax log") - tagList = findFiles(log, tagDirectory, "", ".tag") - newTagLen = len(tagList) - tagDiff = newTagLen - tagLen - tagLen = newTagLen - addTagDiff = 0 - if os.path.exists(maxRunningTagFile): - printLog(log, "FAIL 3ds Max crashed and/or file export failed!") - if tagDiff == 0: - if zeroRetryLimit > 0: - zeroRetryLimit = zeroRetryLimit - 1 - addTagDiff = 1 - else: - printLog(log, "FAIL Retry limit reached!") - else: - addTagDiff = 1 - os.remove(maxRunningTagFile) - printLog(log, "Exported " + str(tagDiff) + " .max files!") - tagDiff += addTagDiff - os.remove(scriptDst) - return - - -if MaxAvailable: - # Find tools - Max = findMax(log, MaxDirectory, MaxExecutable) - # ExecTimeout = findTool(log, ToolDirectories, ExecTimeoutTool, ToolSuffix) - printLog(log, "") - - mkPath(log, ExportBuildDirectory + "/" + IgStaticTagExportDirectory) - - # Export ig land 3dsmax - printLog(log, ">>> Export ig land 3dsmax <<<") - mkPath(log, ExportBuildDirectory + "/" + IgStaticLandExportDirectory) - for dir in IgLandSourceDirectories: - mkPath(log, DatabaseDirectory + "/" + dir) - igExport(dir, IgStaticLandExportDirectory) - printLog(log, "") - - # Export ig other 3dsmax - printLog(log, ">>> Export ig other 3dsmax <<<") - mkPath(log, ExportBuildDirectory + "/" + IgStaticOtherExportDirectory) - for dir in IgOtherSourceDirectories: - mkPath(log, DatabaseDirectory + "/" + dir) - igExport(dir, IgStaticOtherExportDirectory) - printLog(log, "") - - -log.close() -if os.path.isfile("log.log"): - os.remove("log.log") -shutil.move("temp_log.log", "log.log") - - -# end of file +#!/usr/bin/python +# +# \file 1_export.py +# \brief Export ig +# \date 2010-05-24 13:42GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Export ig +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +import time, sys, os, shutil, subprocess, distutils.dir_util +sys.path.append("../../configuration") + +if os.path.isfile("log.log"): + os.remove("log.log") +if os.path.isfile("temp_log.log"): + os.remove("temp_log.log") +log = open("temp_log.log", "w") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Export ig") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +Max = "" #find later + + +def igExport(sourceDir, targetDir): + scriptSrc = "maxscript/ig_export.ms" + scriptDst = MaxUserDirectory + "/scripts/ig_export.ms" + outputLogfile = ScriptDirectory + "/processes/ig/log.log" + tagDirectory = ExportBuildDirectory + "/" + IgStaticTagExportDirectory + outputDirectory = ExportBuildDirectory + "/" + targetDir + maxSourceDir = DatabaseDirectory + "/" + sourceDir + maxRunningTagFile = tagDirectory + "/max_running.tag" + if (needUpdateDirByTagLog(log, maxSourceDir, ".max", tagDirectory, ".max.tag")): + tagList = findFiles(log, tagDirectory, "", ".tag") + tagLen = len(tagList) + if os.path.isfile(scriptDst): + os.remove(scriptDst) + tagDiff = 1 + sSrc = open(scriptSrc, "r") + sDst = open(scriptDst, "w") + for line in sSrc: + newline = line.replace("%OutputLogfile%", outputLogfile) + newline = newline.replace("%MaxSourceDirectory%", maxSourceDir) + newline = newline.replace("%OutputDirectory%", outputDirectory) + newline = newline.replace("%TagDirectory%", tagDirectory) + sDst.write(newline) + sSrc.close() + sDst.close() + zeroRetryLimit = 3 + while tagDiff > 0: + mrt = open(maxRunningTagFile, "w") + mrt.write("moe-moe-kyun") + mrt.close() + printLog(log, "MAXSCRIPT " + scriptDst) + subprocess.call([ Max, "-U", "MAXScript", "ig_export.ms", "-q", "-mi", "-mip" ]) + if os.path.exists(outputLogfile): + try: + lSrc = open(outputLogfile, "r") + for line in lSrc: + lineStrip = line.strip() + if (len(lineStrip) > 0): + printLog(log, lineStrip) + lSrc.close() + os.remove(outputLogfile) + except Exception: + printLog(log, "ERROR Failed to read 3dsmax log") + else: + printLog(log, "WARNING No 3dsmax log") + tagList = findFiles(log, tagDirectory, "", ".tag") + newTagLen = len(tagList) + tagDiff = newTagLen - tagLen + tagLen = newTagLen + addTagDiff = 0 + if os.path.exists(maxRunningTagFile): + printLog(log, "FAIL 3ds Max crashed and/or file export failed!") + if tagDiff == 0: + if zeroRetryLimit > 0: + zeroRetryLimit = zeroRetryLimit - 1 + addTagDiff = 1 + else: + printLog(log, "FAIL Retry limit reached!") + else: + addTagDiff = 1 + os.remove(maxRunningTagFile) + printLog(log, "Exported " + str(tagDiff) + " .max files!") + tagDiff += addTagDiff + os.remove(scriptDst) + return + + +if MaxAvailable: + # Find tools + Max = findMax(log, MaxDirectory, MaxExecutable) + # ExecTimeout = findTool(log, ToolDirectories, ExecTimeoutTool, ToolSuffix) + printLog(log, "") + + mkPath(log, ExportBuildDirectory + "/" + IgStaticTagExportDirectory) + + # Export ig land 3dsmax + printLog(log, ">>> Export ig land 3dsmax <<<") + mkPath(log, ExportBuildDirectory + "/" + IgStaticLandExportDirectory) + for dir in IgLandSourceDirectories: + mkPath(log, DatabaseDirectory + "/" + dir) + igExport(dir, IgStaticLandExportDirectory) + printLog(log, "") + + # Export ig other 3dsmax + printLog(log, ">>> Export ig other 3dsmax <<<") + mkPath(log, ExportBuildDirectory + "/" + IgStaticOtherExportDirectory) + for dir in IgOtherSourceDirectories: + mkPath(log, DatabaseDirectory + "/" + dir) + igExport(dir, IgStaticOtherExportDirectory) + printLog(log, "") + + +log.close() +if os.path.isfile("log.log"): + os.remove("log.log") +shutil.move("temp_log.log", "log.log") + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/ig/2_build.py b/code/nel/tools/build_gamedata/processes/ig/2_build.py old mode 100755 new mode 100644 index c2ab57059..159be465c --- a/code/nel/tools/build_gamedata/processes/ig/2_build.py +++ b/code/nel/tools/build_gamedata/processes/ig/2_build.py @@ -1,273 +1,275 @@ -#!/usr/bin/python -# -# \file 2_build.py -# \brief Build ig -# \date 2010-05-24 13:42GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Build ig -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Build ig") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -# Find tools -ExecTimeout = findTool(log, ToolDirectories, ExecTimeoutTool, ToolSuffix) -PrimExport = findTool(log, ToolDirectories, PrimExportTool , ToolSuffix) -IgElevation = findTool(log, ToolDirectories, IgElevationTool, ToolSuffix) -IgAdd = findTool(log, ToolDirectories, IgAddTool, ToolSuffix) - -configDir = ActiveProjectDirectory + "/generated" -mkPath(log, configDir) - -def igElevation(inputIgDir, outputIgDir): - printLog(log, ">>> IG Elevation <<<") - mkPath(log, inputIgDir) - mkPath(log, outputIgDir) - needUpdateIg = needUpdateDirByTagLog(log, inputIgDir, ".ig", outputIgDir, ".ig") - if needUpdateIg: - printLog(log, "DETECT UPDATE IG->Elevated") - else: - printLog(log, "DETECT SKIP IG->Elevated") - needUpdateHeightMap = needUpdateFileDirNoSubdir(log, DatabaseDirectory + "/" + LigoBaseSourceDirectory + "/" + LigoExportHeightmap1, outputIgDir) or needUpdateFileDirNoSubdir(log, DatabaseDirectory + "/" + LigoBaseSourceDirectory + "/" + LigoExportHeightmap2, outputIgDir) - if needUpdateHeightMap: - printLog(log, "DETECT UPDATE HeightMap->Elevated") - else: - printLog(log, "DETECT SKIP HeightMap->Elevated") - needUpdateLand = needUpdateFileDirNoSubdir(log, DatabaseDirectory + "/" + LigoBaseSourceDirectory + "/" + LigoExportLand, outputIgDir) - if needUpdateLand: - printLog(log, "DETECT UPDATE Land->Elevated") - else: - printLog(log, "DETECT SKIP Land->Elevated") - if needUpdateIg or needUpdateHeightMap or needUpdateLand: - printLog(log, "DETECT DECIDE UPDATE") - mkPath(log, inputIgDir) - mkPath(log, outputIgDir) - mkPath(log, DatabaseDirectory + "/" + LigoBaseSourceDirectory) - - configFile = configDir + "/ig_elevation.cfg" - if os.path.isfile(configFile): - os.remove(configFile) - - printLog(log, "CONFIG " + configFile) - cf = open(configFile, "w") - cf.write("// ig_elevation.cfg\n") - cf.write("\n") - cf.write("InputIGDir = \"" + inputIgDir + "\";\n") - cf.write("OutputIGDir = \"" + outputIgDir + "\";\n") - cf.write("\n") - cf.write("CellSize = 160.0;") - cf.write("\n") - cf.write("HeightMapFile1 = \"" + DatabaseDirectory + "/" + LigoBaseSourceDirectory + "/" + LigoExportHeightmap1 + "\";\n") - cf.write("ZFactor1 = " + LigoExportZFactor1 + ";\n") - cf.write("HeightMapFile2 = \"" + DatabaseDirectory + "/" + LigoBaseSourceDirectory + "/" + LigoExportHeightmap2 + "\";\n") - cf.write("ZFactor2 = " + LigoExportZFactor2 + ";\n") - cf.write("\n") - cf.write("LandFile = \"" + DatabaseDirectory + "/" + LigoBaseSourceDirectory + "/" + LigoExportLand + "\";\n") - cf.write("\n") - cf.close() - subprocess.call([ IgElevation, configFile ]) - os.remove(configFile) - - # Copy remaining IG files - #BUG:copyFilesLogless(log, inputIgDir, outputIgDir) - else: - printLog(log, "DETECT DECIDE SKIP") - printLog(log, "SKIP *") - -# Build process -if (ContinentLeveldesignWorldDirectory != "") or (len(IgOtherSourceDirectories) > 0): - printLog(log, ">>> Prim IG: ON <<<") - configFile = configDir + "/prim_export.cfg" - if os.path.isfile(configFile): - os.remove(configFile) - - outIgDir = ExportBuildDirectory + "/" + IgElevLandPrimBuildDirectory - mkPath(log, outIgDir) - zoneWDir = ExportBuildDirectory + "/" + ZoneWeldBuildDirectory - mkPath(log, zoneWDir) - smallBank = DatabaseDirectory + "/" + TileRootSourceDirectory + "/" + BankTileBankName + ".bank" - farBank = ExportBuildDirectory + "/" + FarbankBuildDirectory + "/" + BankTileBankName + MultipleTilesPostfix[0] + ".farbank" - displaceDir = DatabaseDirectory + "/" + DisplaceSourceDirectory - continentDir = LeveldesignWorldDirectory + "/" + ContinentLeveldesignWorldDirectory - mkPath(log, continentDir) - formDir = LeveldesignDirectory - mkPath(log, LeveldesignDirectory) - worldEditorFiles = WorldEditorFilesDirectory - mkPath(log, WorldEditorFilesDirectory) - - printLog(log, "CONFIG " + configFile) - cf = open(configFile, "w") - cf.write("// prim_export.cfg\n") - cf.write("\n") - cf.write("OutIGDir = \"" + outIgDir + "\";\n") - cf.write("ZoneWDir = \"" + zoneWDir + "\";\n") - cf.write("\n") - cf.write("SmallBank = \"" + smallBank + "\";\n") - cf.write("FarBank = \"" + farBank + "\";\n") - cf.write("DisplaceDir = \"" + displaceDir + "\";\n") - cf.write("\n") - cf.write("CellSize = 160.0;") - cf.write("\n") - cf.write("PrimDirs = {\n") - cf.write("\t\"" + continentDir + "\", \n") - for dir in IgPrimitiveSourceDirectories: - mkPath(log, DatabaseDirectory + "/" + dir) - cf.write("\t\"" + DatabaseDirectory + "/" + dir + "\", \n") - cf.write("};\n") - cf.write("\n") - cf.write("FormDir = \"" + formDir + "\";\n") - cf.write("WorldEditorFiles = \"" + worldEditorFiles + "\";\n") - cf.write("\n") - cf.close() - subprocess.call([ PrimExport, configFile ]) - os.remove(configFile) - - igElevation(ExportBuildDirectory + "/" + LigoIgLandBuildDirectory, ExportBuildDirectory + "/" + IgElevLandLigoBuildDirectory) - - igElevation(ExportBuildDirectory + "/" + IgStaticLandExportDirectory, ExportBuildDirectory + "/" + IgElevLandStaticBuildDirectory) - -printLog(log, ">>> Merge land IGs <<<") -mkPath(log, ExportBuildDirectory + "/" + IgTempLandMergeBuildDirectory) -removeFilesRecursive(log, ExportBuildDirectory + "/" + IgTempLandMergeBuildDirectory) - -mkPath(log, ExportBuildDirectory + "/" + IgLandBuildDirectory) - -mkPath(log, ExportBuildDirectory + "/" + IgElevLandPrimBuildDirectory) -mkPath(log, ExportBuildDirectory + "/" + IgElevLandLigoBuildDirectory) -mkPath(log, ExportBuildDirectory + "/" + IgElevLandStaticBuildDirectory) -igFilesPrim = findFiles(log, ExportBuildDirectory + "/" + IgElevLandPrimBuildDirectory, "", ".ig") -igFilesLigo = findFiles(log, ExportBuildDirectory + "/" + IgElevLandLigoBuildDirectory, "", ".ig") -igFilesStatic = findFiles(log, ExportBuildDirectory + "/" + IgElevLandStaticBuildDirectory, "", ".ig") -igFilesAll = [ ] -for igFile in igFilesPrim: - if not igFile in igFilesAll: - igFilesAll += [ igFile ] -for igFile in igFilesLigo: - if not igFile in igFilesAll: - igFilesAll += [ igFile ] -for igFile in igFilesStatic: - if not igFile in igFilesAll: - igFilesAll += [ igFile ] -igFilesAll.sort() -for igFile in igFilesAll: - primIgFile = ExportBuildDirectory + "/" + IgElevLandPrimBuildDirectory + "/" + igFile - ligoIgFile = ExportBuildDirectory + "/" + IgElevLandLigoBuildDirectory + "/" + igFile - staticIgFile = ExportBuildDirectory + "/" + IgElevLandStaticBuildDirectory + "/" + igFile - tempIgFile = ExportBuildDirectory + "/" + IgTempLandMergeBuildDirectory + "/" + igFile - outIgFile = ExportBuildDirectory + "/" + IgLandBuildDirectory + "/" + igFile - activeFile = "" - needsUpdate = 0 - sourceTools = "" - if igFile in igFilesPrim: - if needUpdate(log, primIgFile, outIgFile): - needsUpdate = 1 - if not needsUpdate == 1 and igFile in igFilesLigo: - if needUpdate(log, ligoIgFile, outIgFile): - needsUpdate = 1 - if not needsUpdate == 1 and igFile in igFilesStatic: - if needUpdate(log, staticIgFile, outIgFile): - needsUpdate = 1 - if needsUpdate == 1: - if os.path.isfile(outIgFile): - os.remove(outIgFile) - if igFile in igFilesPrim: - sourceTools += " [Prim]" - activeFile = primIgFile - if igFile in igFilesLigo: - if activeFile == "": - activeFile = ligoIgFile - else: - sourceTools += " [Ligo]" - subprocess.call([ IgAdd, tempIgFile, ligoIgFile, activeFile ]) - activeFile = tempIgFile - if igFile in igFilesStatic: - if activeFile == "": - activeFile = staticIgFile - else: - sourceTools += " [Static]" - subprocess.call([ IgAdd, outIgFile, staticIgFile, activeFile ]) - activeFile = outIgFile - else: - shutil.copy(activeFile, outIgFile) - printLog(log, "MERGE " + igFile + sourceTools) - else: - printLog(log, "SKIP " + igFile) - -# Remove temporary land IGs -printLog(log, ">>> Remove temporary land IGs <<<") -mkPath(log, ExportBuildDirectory + "/" + IgTempLandMergeBuildDirectory) -removeFilesRecursive(log, ExportBuildDirectory + "/" + IgTempLandMergeBuildDirectory) - -# Remove outdated land IGs -printLog(log, ">>> Remove outdated land IGs <<<") -igFilesOut = findFiles(log, ExportBuildDirectory + "/" + IgLandBuildDirectory, "", ".ig") -for igFile in igFilesOut: - if not igFile in igFilesAll: - printLog(log, "RM " + ExportBuildDirectory + "/" + IgLandBuildDirectory + "/" + igFile) - os.remove(ExportBuildDirectory + "/" + IgLandBuildDirectory + "/" + igFile) - -# Verify land IGs -printLog(log, ">>> Verify land IGs <<<") -for igFile in igFilesAll: - if not igFile in igFilesOut: - printLog(log, "MISSING " + igFile) - -# Write land IGs TXT -printLog(log, ">>> Write land IGs TXT <<<") -igTxtFile = ExportBuildDirectory + "/" + IgLandBuildDirectory + "/" + LandscapeName + "_ig.txt" -if needUpdateDirNoSubdirFile(log, ExportBuildDirectory + "/" + IgLandBuildDirectory, igTxtFile): - printLog(log, "WRITE " + ExportBuildDirectory + "/" + IgLandBuildDirectory + "/" + LandscapeName + "_ig.txt") - if os.path.isfile(igTxtFile): - os.remove(igTxtFile) - igTxt = open(igTxtFile, "w") - for igFile in igFilesAll: - igTxt.write(igFile + "\n") - igTxt.close() -else: - printLog(log, "SKIP *") - -# Merge other IGs -printLog(log, ">>> Merge other IGs <<<") # (not true merge, since not necesserary) -mkPath(log, ExportBuildDirectory + "/" + IgStaticOtherExportDirectory) -mkPath(log, ExportBuildDirectory + "/" + LigoIgOtherBuildDirectory) -mkPath(log, ExportBuildDirectory + "/" + IgOtherBuildDirectory) -copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + IgStaticOtherExportDirectory, ExportBuildDirectory + "/" + IgOtherBuildDirectory, ".ig") -copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + LigoIgOtherBuildDirectory, ExportBuildDirectory + "/" + IgOtherBuildDirectory, ".ig") - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 2_build.py +# \brief Build ig +# \date 2010-05-24 13:42GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Build ig +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Build ig") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +# Find tools +ExecTimeout = findTool(log, ToolDirectories, ExecTimeoutTool, ToolSuffix) +PrimExport = findTool(log, ToolDirectories, PrimExportTool , ToolSuffix) +IgElevation = findTool(log, ToolDirectories, IgElevationTool, ToolSuffix) +IgAdd = findTool(log, ToolDirectories, IgAddTool, ToolSuffix) + +configDir = ActiveProjectDirectory + "/generated" +mkPath(log, configDir) + +def igElevation(inputIgDir, outputIgDir): + printLog(log, ">>> IG Elevation <<<") + mkPath(log, inputIgDir) + mkPath(log, outputIgDir) + needUpdateIg = needUpdateDirByTagLog(log, inputIgDir, ".ig", outputIgDir, ".ig") + if needUpdateIg: + printLog(log, "DETECT UPDATE IG->Elevated") + else: + printLog(log, "DETECT SKIP IG->Elevated") + needUpdateHeightMap = needUpdateFileDirNoSubdir(log, DatabaseDirectory + "/" + LigoBaseSourceDirectory + "/" + LigoExportHeightmap1, outputIgDir) or needUpdateFileDirNoSubdir(log, DatabaseDirectory + "/" + LigoBaseSourceDirectory + "/" + LigoExportHeightmap2, outputIgDir) + if needUpdateHeightMap: + printLog(log, "DETECT UPDATE HeightMap->Elevated") + else: + printLog(log, "DETECT SKIP HeightMap->Elevated") + needUpdateLand = needUpdateFileDirNoSubdir(log, DatabaseDirectory + "/" + LigoBaseSourceDirectory + "/" + LigoExportLand, outputIgDir) + if needUpdateLand: + printLog(log, "DETECT UPDATE Land->Elevated") + else: + printLog(log, "DETECT SKIP Land->Elevated") + if needUpdateIg or needUpdateHeightMap or needUpdateLand: + printLog(log, "DETECT DECIDE UPDATE") + mkPath(log, inputIgDir) + mkPath(log, outputIgDir) + mkPath(log, DatabaseDirectory + "/" + LigoBaseSourceDirectory) + + configFile = configDir + "/ig_elevation.cfg" + if os.path.isfile(configFile): + os.remove(configFile) + + printLog(log, "CONFIG " + configFile) + cf = open(configFile, "w") + cf.write("// ig_elevation.cfg\n") + cf.write("\n") + cf.write("InputIGDir = \"" + inputIgDir + "\";\n") + cf.write("OutputIGDir = \"" + outputIgDir + "\";\n") + cf.write("\n") + cf.write("CellSize = 160.0;") + cf.write("\n") + cf.write("HeightMapFile1 = \"" + DatabaseDirectory + "/" + LigoBaseSourceDirectory + "/" + LigoExportHeightmap1 + "\";\n") + cf.write("ZFactor1 = " + LigoExportZFactor1 + ";\n") + cf.write("HeightMapFile2 = \"" + DatabaseDirectory + "/" + LigoBaseSourceDirectory + "/" + LigoExportHeightmap2 + "\";\n") + cf.write("ZFactor2 = " + LigoExportZFactor2 + ";\n") + cf.write("ExtendCoords = " + str(LigoExportExtendCoords) + ";\n") + cf.write("\n") + cf.write("LandFile = \"" + DatabaseDirectory + "/" + LigoBaseSourceDirectory + "/" + LigoExportLand + "\";\n") + cf.write("\n") + cf.close() + subprocess.call([ IgElevation, configFile ]) + os.remove(configFile) + + # Copy remaining IG files + #BUG:copyFilesLogless(log, inputIgDir, outputIgDir) + else: + printLog(log, "DETECT DECIDE SKIP") + printLog(log, "SKIP *") + +# Build process +if (ContinentLeveldesignWorldDirectory != "") or (len(IgOtherSourceDirectories) > 0): + printLog(log, ">>> Prim IG: ON <<<") + configFile = configDir + "/prim_export.cfg" + if os.path.isfile(configFile): + os.remove(configFile) + + outIgDir = ExportBuildDirectory + "/" + IgElevLandPrimBuildDirectory + mkPath(log, outIgDir) + zoneWDir = ExportBuildDirectory + "/" + ZoneWeldBuildDirectory + mkPath(log, zoneWDir) + smallBank = DatabaseDirectory + "/" + TileRootSourceDirectory + "/" + BankTileBankName + ".bank" + farBank = ExportBuildDirectory + "/" + FarbankBuildDirectory + "/" + BankTileBankName + MultipleTilesPostfix[0] + ".farbank" + displaceDir = DatabaseDirectory + "/" + DisplaceSourceDirectory + continentDir = LeveldesignWorldDirectory + "/" + ContinentLeveldesignWorldDirectory + mkPath(log, continentDir) + formDir = LeveldesignDirectory + mkPath(log, LeveldesignDirectory) + worldEditorFiles = WorldEditorFilesDirectory + mkPath(log, WorldEditorFilesDirectory) + + printLog(log, "CONFIG " + configFile) + cf = open(configFile, "w") + cf.write("// prim_export.cfg\n") + cf.write("\n") + cf.write("OutIGDir = \"" + outIgDir + "\";\n") + cf.write("ZoneWDir = \"" + zoneWDir + "\";\n") + cf.write("\n") + cf.write("SmallBank = \"" + smallBank + "\";\n") + cf.write("FarBank = \"" + farBank + "\";\n") + cf.write("DisplaceDir = \"" + displaceDir + "\";\n") + cf.write("\n") + cf.write("CellSize = 160.0;") + cf.write("\n") + cf.write("PrimDirs = {\n") + cf.write("\t\"" + continentDir + "\", \n") + for dir in IgPrimitiveSourceDirectories: + mkPath(log, DatabaseDirectory + "/" + dir) + cf.write("\t\"" + DatabaseDirectory + "/" + dir + "\", \n") + cf.write("};\n") + cf.write("\n") + cf.write("FormDir = \"" + formDir + "\";\n") + cf.write("WorldEditorFiles = \"" + worldEditorFiles + "\";\n") + cf.write("\n") + cf.close() + subprocess.call([ PrimExport, configFile ]) + os.remove(configFile) + + igElevation(ExportBuildDirectory + "/" + LigoIgLandBuildDirectory, ExportBuildDirectory + "/" + IgElevLandLigoBuildDirectory) + + igElevation(ExportBuildDirectory + "/" + IgStaticLandExportDirectory, ExportBuildDirectory + "/" + IgElevLandStaticBuildDirectory) + +printLog(log, ">>> Merge land IGs <<<") +mkPath(log, ExportBuildDirectory + "/" + IgTempLandMergeBuildDirectory) +removeFilesRecursive(log, ExportBuildDirectory + "/" + IgTempLandMergeBuildDirectory) + +mkPath(log, ExportBuildDirectory + "/" + IgLandBuildDirectory) + +mkPath(log, ExportBuildDirectory + "/" + IgElevLandPrimBuildDirectory) +mkPath(log, ExportBuildDirectory + "/" + IgElevLandLigoBuildDirectory) +mkPath(log, ExportBuildDirectory + "/" + IgElevLandStaticBuildDirectory) +igFilesPrim = findFiles(log, ExportBuildDirectory + "/" + IgElevLandPrimBuildDirectory, "", ".ig") +igFilesLigo = findFiles(log, ExportBuildDirectory + "/" + IgElevLandLigoBuildDirectory, "", ".ig") +igFilesStatic = findFiles(log, ExportBuildDirectory + "/" + IgElevLandStaticBuildDirectory, "", ".ig") +igFilesAll = [ ] +for igFile in igFilesPrim: + if not igFile in igFilesAll: + igFilesAll += [ igFile ] +for igFile in igFilesLigo: + if not igFile in igFilesAll: + igFilesAll += [ igFile ] +for igFile in igFilesStatic: + if not igFile in igFilesAll: + igFilesAll += [ igFile ] +igFilesAll.sort() +for igFile in igFilesAll: + primIgFile = ExportBuildDirectory + "/" + IgElevLandPrimBuildDirectory + "/" + igFile + ligoIgFile = ExportBuildDirectory + "/" + IgElevLandLigoBuildDirectory + "/" + igFile + staticIgFile = ExportBuildDirectory + "/" + IgElevLandStaticBuildDirectory + "/" + igFile + tempIgFile = ExportBuildDirectory + "/" + IgTempLandMergeBuildDirectory + "/" + igFile + outIgFile = ExportBuildDirectory + "/" + IgLandBuildDirectory + "/" + igFile + activeFile = "" + needsUpdate = 0 + sourceTools = "" + if igFile in igFilesPrim: + if needUpdate(log, primIgFile, outIgFile): + needsUpdate = 1 + if not needsUpdate == 1 and igFile in igFilesLigo: + if needUpdate(log, ligoIgFile, outIgFile): + needsUpdate = 1 + if not needsUpdate == 1 and igFile in igFilesStatic: + if needUpdate(log, staticIgFile, outIgFile): + needsUpdate = 1 + if needsUpdate == 1: + if os.path.isfile(outIgFile): + os.remove(outIgFile) + if igFile in igFilesPrim: + sourceTools += " [Prim]" + activeFile = primIgFile + if igFile in igFilesLigo: + if activeFile == "": + activeFile = ligoIgFile + else: + sourceTools += " [Ligo]" + subprocess.call([ IgAdd, tempIgFile, ligoIgFile, activeFile ]) + activeFile = tempIgFile + if igFile in igFilesStatic: + if activeFile == "": + activeFile = staticIgFile + else: + sourceTools += " [Static]" + subprocess.call([ IgAdd, outIgFile, staticIgFile, activeFile ]) + activeFile = outIgFile + else: + shutil.copy(activeFile, outIgFile) + printLog(log, "MERGE " + igFile + sourceTools) + else: + printLog(log, "SKIP " + igFile) + +# Remove temporary land IGs +printLog(log, ">>> Remove temporary land IGs <<<") +mkPath(log, ExportBuildDirectory + "/" + IgTempLandMergeBuildDirectory) +removeFilesRecursive(log, ExportBuildDirectory + "/" + IgTempLandMergeBuildDirectory) + +# Remove outdated land IGs +printLog(log, ">>> Remove outdated land IGs <<<") +igFilesOut = findFiles(log, ExportBuildDirectory + "/" + IgLandBuildDirectory, "", ".ig") +for igFile in igFilesOut: + if not igFile in igFilesAll: + printLog(log, "RM " + ExportBuildDirectory + "/" + IgLandBuildDirectory + "/" + igFile) + os.remove(ExportBuildDirectory + "/" + IgLandBuildDirectory + "/" + igFile) + +# Verify land IGs +printLog(log, ">>> Verify land IGs <<<") +for igFile in igFilesAll: + if not igFile in igFilesOut: + printLog(log, "MISSING " + igFile) + +# Write land IGs TXT +printLog(log, ">>> Write land IGs TXT <<<") +igTxtFile = ExportBuildDirectory + "/" + IgLandBuildDirectory + "/" + LandscapeName + "_ig.txt" +if needUpdateDirNoSubdirFile(log, ExportBuildDirectory + "/" + IgLandBuildDirectory, igTxtFile): + printLog(log, "WRITE " + ExportBuildDirectory + "/" + IgLandBuildDirectory + "/" + LandscapeName + "_ig.txt") + if os.path.isfile(igTxtFile): + os.remove(igTxtFile) + igTxt = open(igTxtFile, "w") + for igFile in igFilesAll: + igTxt.write(igFile + "\n") + igTxt.close() +else: + printLog(log, "SKIP *") + +# Merge other IGs +printLog(log, ">>> Merge other IGs <<<") # (not true merge, since not necesserary) +mkPath(log, ExportBuildDirectory + "/" + IgStaticOtherExportDirectory) +mkPath(log, ExportBuildDirectory + "/" + LigoIgOtherBuildDirectory) +mkPath(log, ExportBuildDirectory + "/" + IgOtherBuildDirectory) +# copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + IgStaticOtherExportDirectory, ExportBuildDirectory + "/" + IgOtherBuildDirectory, ".ig") +igElevation(ExportBuildDirectory + "/" + IgStaticOtherExportDirectory, ExportBuildDirectory + "/" + IgOtherBuildDirectory) +copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + LigoIgOtherBuildDirectory, ExportBuildDirectory + "/" + IgOtherBuildDirectory, ".ig") + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/ig/3_install.py b/code/nel/tools/build_gamedata/processes/ig/3_install.py old mode 100755 new mode 100644 index 7ab5f182d..aebfc4d5a --- a/code/nel/tools/build_gamedata/processes/ig/3_install.py +++ b/code/nel/tools/build_gamedata/processes/ig/3_install.py @@ -1,60 +1,60 @@ -#!/usr/bin/python -# -# \file 3_install.py -# \brief Install ig -# \date 2010-05-24 13:42GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Install ig -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Install ig") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -clientPathIg = InstallDirectory + "/" + IgInstallDirectory -mkPath(log, clientPathIg) - -printLog(log, ">>> Install ig <<<") -landBuildDir = ExportBuildDirectory + "/" + IgLandBuildDirectory -mkPath(log, landBuildDir) -copyFilesExtNoTreeIfNeeded(log, landBuildDir, clientPathIg, "_ig.txt") # Copy the *_ig.txt file -# Do not copy *.ig in ig_land, because zone process will copy zone ig lighted versions into client directory. -# Do not copy *.ig ig_other, because ig_light process will copy ig lighted versions into client directory. - -printLog(log, "") -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 3_install.py +# \brief Install ig +# \date 2010-05-24 13:42GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Install ig +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite_local import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Install ig") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +clientPathIg = InstallDirectory + "/" + IgInstallDirectory +mkPath(log, clientPathIg) + +printLog(log, ">>> Install ig <<<") +landBuildDir = ExportBuildDirectory + "/" + IgLandBuildDirectory +mkPath(log, landBuildDir) +copyFilesExtNoTreeIfNeeded(log, landBuildDir, clientPathIg, "_ig.txt") # Copy the *_ig.txt file +# Do not copy *.ig in ig_land, because zone process will copy zone ig lighted versions into client directory. +# Do not copy *.ig ig_other, because ig_light process will copy ig lighted versions into client directory. + +printLog(log, "") +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/ig/maxscript/ig_export.ms b/code/nel/tools/build_gamedata/processes/ig/maxscript/ig_export.ms old mode 100755 new mode 100644 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 old mode 100755 new mode 100644 index 82bda3129..3c624c5a2 --- a/code/nel/tools/build_gamedata/processes/ig_light/0_setup.py +++ b/code/nel/tools/build_gamedata/processes/ig_light/0_setup.py @@ -1,64 +1,64 @@ -#!/usr/bin/python -# -# \file 0_setup.py -# \brief Setup ig_light -# \date 2009-03-11-15-16-GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Setup ig_light -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Setup ig_light") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -# Setup source directories -printLog(log, ">>> Setup source directories <<<") - -# Setup export directories -printLog(log, ">>> Setup export directories <<<") - -# Setup build directories -printLog(log, ">>> Setup build directories <<<") -mkPath(log, ExportBuildDirectory + "/" + IgOtherBuildDirectory) -mkPath(log, ExportBuildDirectory + "/" + IgOtherLightedBuildDirectory) - -# Setup client directories -printLog(log, ">>> Setup client directories <<<") -mkPath(log, InstallDirectory + "/" + IgInstallDirectory) - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 0_setup.py +# \brief Setup ig_light +# \date 2009-03-11-15-16-GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Setup ig_light +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Setup ig_light") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +# Setup source directories +printLog(log, ">>> Setup source directories <<<") + +# Setup export directories +printLog(log, ">>> Setup export directories <<<") + +# Setup build directories +printLog(log, ">>> Setup build directories <<<") +mkPath(log, ExportBuildDirectory + "/" + IgOtherBuildDirectory) +mkPath(log, ExportBuildDirectory + "/" + IgOtherLightedBuildDirectory) + +# Setup client directories +printLog(log, ">>> Setup client directories <<<") +mkPath(log, InstallDirectory + "/" + IgInstallDirectory) + +log.close() + + +# end of file 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 old mode 100755 new mode 100644 index 4880b9d57..571c2457d --- a/code/nel/tools/build_gamedata/processes/ig_light/1_export.py +++ b/code/nel/tools/build_gamedata/processes/ig_light/1_export.py @@ -1,49 +1,49 @@ -#!/usr/bin/python -# -# \file 1_export.py -# \brief Export ig_light -# \date 2009-03-11-15-16-GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Export ig_light -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Export ig_light") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 1_export.py +# \brief Export ig_light +# \date 2009-03-11-15-16-GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Export ig_light +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Export ig_light") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +log.close() + + +# end of file 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 old mode 100755 new mode 100644 index 41ae92ff8..938b51d88 --- a/code/nel/tools/build_gamedata/processes/ig_light/2_build.py +++ b/code/nel/tools/build_gamedata/processes/ig_light/2_build.py @@ -1,65 +1,65 @@ -#!/usr/bin/python -# -# \file 2_build.py -# \brief Build ig_light -# \date 2009-03-11-15-16-GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Build ig_light -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Build ig_light") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -# Find tools -IgLighter = findTool(log, ToolDirectories, IgLighterTool, ToolSuffix) -printLog(log, "") - -# For each ig_light directory -printLog(log, ">>> Build ig_light <<<") -if IgLighter == "": - toolLogFail(log, IgLighterTool, ToolSuffix) -else: - srcDir = ExportBuildDirectory + "/" + IgOtherBuildDirectory - mkPath(log, srcDir) - destDir = ExportBuildDirectory + "/" + IgOtherLightedBuildDirectory - mkPath(log, destDir) - subprocess.call([ IgLighter, srcDir, destDir, ActiveProjectDirectory + "/generated/properties.cfg" ]) -printLog(log, "") - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 2_build.py +# \brief Build ig_light +# \date 2009-03-11-15-16-GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Build ig_light +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Build ig_light") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +# Find tools +IgLighter = findTool(log, ToolDirectories, IgLighterTool, ToolSuffix) +printLog(log, "") + +# For each ig_light directory +printLog(log, ">>> Build ig_light <<<") +if IgLighter == "": + toolLogFail(log, IgLighterTool, ToolSuffix) +else: + srcDir = ExportBuildDirectory + "/" + IgOtherBuildDirectory + mkPath(log, srcDir) + destDir = ExportBuildDirectory + "/" + IgOtherLightedBuildDirectory + mkPath(log, destDir) + subprocess.call([ IgLighter, srcDir, destDir, ActiveProjectDirectory + "/generated/properties.cfg" ]) +printLog(log, "") + +log.close() + + +# end of file 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 old mode 100755 new mode 100644 index 332d02184..a1e4d52a0 --- a/code/nel/tools/build_gamedata/processes/ig_light/3_install.py +++ b/code/nel/tools/build_gamedata/processes/ig_light/3_install.py @@ -1,57 +1,57 @@ -#!/usr/bin/python -# -# \file 3_install.py -# \brief Install ig_light -# \date 2009-03-11-15-16-GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Install ig_light -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Install ig_light") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -printLog(log, ">>> Install ig_light <<<") -srcDir = ExportBuildDirectory + "/" + IgOtherLightedBuildDirectory -mkPath(log, srcDir) -destDir = InstallDirectory + "/" + IgInstallDirectory -mkPath(log, destDir) -copyFilesNoTreeIfNeeded(log, srcDir, destDir) - -printLog(log, "") -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 3_install.py +# \brief Install ig_light +# \date 2009-03-11-15-16-GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Install ig_light +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite_local import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Install ig_light") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +printLog(log, ">>> Install ig_light <<<") +srcDir = ExportBuildDirectory + "/" + IgOtherLightedBuildDirectory +mkPath(log, srcDir) +destDir = InstallDirectory + "/" + IgInstallDirectory +mkPath(log, destDir) +copyFilesNoTreeIfNeeded(log, srcDir, destDir) + +printLog(log, "") +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/interface/0_setup.py b/code/nel/tools/build_gamedata/processes/interface/0_setup.py old mode 100755 new mode 100644 index 4a227d364..7f4203413 --- a/code/nel/tools/build_gamedata/processes/interface/0_setup.py +++ b/code/nel/tools/build_gamedata/processes/interface/0_setup.py @@ -1,77 +1,77 @@ -#!/usr/bin/python -# -# \file 0_setup.py -# \brief Setup interface -# \date 2009-03-10 14:56GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Setup interface -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Setup interface") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -# Setup source directories -printLog(log, ">>> Setup source directories <<<") -for dirs in InterfaceSourceDirectories: - for dir in dirs: - mkPath(log, DatabaseDirectory + "/" + dir) -for dir in InterfaceDxtcSourceDirectories: - mkPath(log, DatabaseDirectory + "/" + dir) -for dir in InterfaceFullscreenSourceDirectories: - mkPath(log, DatabaseDirectory + "/" + dir) -for dir in Interface3DSourceDirectories: - mkPath(log, DatabaseDirectory + "/" + dir) - -# Setup export directories -printLog(log, ">>> Setup export directories <<<") -mkPath(log, ExportBuildDirectory + "/" + InterfaceExportDirectory) -mkPath(log, ExportBuildDirectory + "/" + InterfaceDxtcExportDirectory) -mkPath(log, ExportBuildDirectory + "/" + InterfaceFullscreenExportDirectory) -mkPath(log, ExportBuildDirectory + "/" + Interface3DExportDirectory) - -# Setup build directories -printLog(log, ">>> Setup build directories <<<") -mkPath(log, ExportBuildDirectory + "/" + InterfaceBuildDirectory) -mkPath(log, ExportBuildDirectory + "/" + InterfaceDxtcBuildDirectory) - -# Setup client directories -printLog(log, ">>> Setup client directories <<<") -mkPath(log, InstallDirectory + "/" + InterfaceInstallDirectory) - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 0_setup.py +# \brief Setup interface +# \date 2009-03-10 14:56GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Setup interface +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Setup interface") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +# Setup source directories +printLog(log, ">>> Setup source directories <<<") +for dirs in InterfaceSourceDirectories: + for dir in dirs: + mkPath(log, DatabaseDirectory + "/" + dir) +for dir in InterfaceDxtcSourceDirectories: + mkPath(log, DatabaseDirectory + "/" + dir) +for dir in InterfaceFullscreenSourceDirectories: + mkPath(log, DatabaseDirectory + "/" + dir) +for dir in Interface3DSourceDirectories: + mkPath(log, DatabaseDirectory + "/" + dir) + +# Setup export directories +printLog(log, ">>> Setup export directories <<<") +mkPath(log, ExportBuildDirectory + "/" + InterfaceExportDirectory) +mkPath(log, ExportBuildDirectory + "/" + InterfaceDxtcExportDirectory) +mkPath(log, ExportBuildDirectory + "/" + InterfaceFullscreenExportDirectory) +mkPath(log, ExportBuildDirectory + "/" + Interface3DExportDirectory) + +# Setup build directories +printLog(log, ">>> Setup build directories <<<") +mkPath(log, ExportBuildDirectory + "/" + InterfaceBuildDirectory) +mkPath(log, ExportBuildDirectory + "/" + InterfaceDxtcBuildDirectory) + +# Setup client directories +printLog(log, ">>> Setup client directories <<<") +mkPath(log, InstallDirectory + "/" + InterfaceInstallDirectory) + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/interface/1_export.py b/code/nel/tools/build_gamedata/processes/interface/1_export.py old mode 100755 new mode 100644 index b6c0f394c..eaf2f0f41 --- a/code/nel/tools/build_gamedata/processes/interface/1_export.py +++ b/code/nel/tools/build_gamedata/processes/interface/1_export.py @@ -1,105 +1,105 @@ -#!/usr/bin/python -# -# \file 1_export.py -# \brief Export interface -# \date 2009-03-10 13:13GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Export interface -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Export interface") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -# Find tools -TgaToDds = findTool(log, ToolDirectories, TgaToDdsTool, ToolSuffix) -printLog(log, "") - -# For each interface directory -printLog(log, ">>> Export interface <<<") -mkPath(log, ExportBuildDirectory + "/" + InterfaceExportDirectory) -for dirs in InterfaceSourceDirectories: - niouname = dirs[0].replace("/", "_") - newpath = ExportBuildDirectory + "/" + InterfaceExportDirectory + "/" + niouname - mkPath(log, newpath) - for dir in dirs: - mkPath(log, DatabaseDirectory + "/" + dir) - copyFilesExtNoSubdirIfNeeded(log, DatabaseDirectory + "/" + dir, newpath, ".tga") - copyFilesExtNoSubdirIfNeeded(log, DatabaseDirectory + "/" + dir, newpath, ".png") -printLog(log, "") - -# For each interface directory to compress in one DXTC -printLog(log, ">>> Export interface dxtc <<<") -mkPath(log, ExportBuildDirectory + "/" + InterfaceDxtcExportDirectory) -for dir in InterfaceDxtcSourceDirectories: - mkPath(log, DatabaseDirectory + "/" + dir) - copyFilesExtNoSubdirIfNeeded(log, DatabaseDirectory + "/" + dir, ExportBuildDirectory + "/" + InterfaceDxtcExportDirectory, ".tga") - copyFilesExtNoSubdirIfNeeded(log, DatabaseDirectory + "/" + dir, ExportBuildDirectory + "/" + InterfaceDxtcExportDirectory, ".png") -printLog(log, "") - -# For each interface fullscreen directory compress independently all in dds -printLog(log, ">>> Export interface fullscreen <<<") -if TgaToDds == "": - toolLogFail(log, TgaToDdsTool, ToolSuffix) -else: - mkPath(log, ExportBuildDirectory + "/" + InterfaceFullscreenExportDirectory) - for dir in InterfaceFullscreenSourceDirectories: - mkPath(log, DatabaseDirectory + "/" + dir) - files = findFiles(log, DatabaseDirectory + "/" + dir, "", ".tga") - for file in files: - sourceFile = DatabaseDirectory + "/" + dir + "/" + file - destFile = ExportBuildDirectory + "/" + InterfaceFullscreenExportDirectory + "/" + os.path.basename(file)[0:-len(".tga")] + ".dds" - if needUpdateLogRemoveDest(log, sourceFile, destFile): - subprocess.call([ TgaToDds, sourceFile, "-o", destFile, "-a", "5" ]) - files = findFiles(log, DatabaseDirectory + "/" + dir, "", ".png") - for file in files: - sourceFile = DatabaseDirectory + "/" + dir + "/" + file - destFile = ExportBuildDirectory + "/" + InterfaceFullscreenExportDirectory + "/" + os.path.basename(file)[0:-len(".png")] + ".dds" - if needUpdateLogRemoveDest(log, sourceFile, destFile): - subprocess.call([ TgaToDds, sourceFile, "-o", destFile, "-a", "5" ]) -printLog(log, "") - -# For each interface 3d directory -printLog(log, ">>> Export interface 3d <<<") -mkPath(log, ExportBuildDirectory + "/" + Interface3DExportDirectory) -for dir in Interface3DSourceDirectories: - mkPath(log, DatabaseDirectory + "/" + dir) - copyFiles(log, DatabaseDirectory + "/" + dir, ExportBuildDirectory + "/" + Interface3DExportDirectory) -printLog(log, "") - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 1_export.py +# \brief Export interface +# \date 2009-03-10 13:13GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Export interface +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Export interface") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +# Find tools +TgaToDds = findTool(log, ToolDirectories, TgaToDdsTool, ToolSuffix) +printLog(log, "") + +# For each interface directory +printLog(log, ">>> Export interface <<<") +mkPath(log, ExportBuildDirectory + "/" + InterfaceExportDirectory) +for dirs in InterfaceSourceDirectories: + niouname = dirs[0].replace("/", "_") + newpath = ExportBuildDirectory + "/" + InterfaceExportDirectory + "/" + niouname + mkPath(log, newpath) + for dir in dirs: + mkPath(log, DatabaseDirectory + "/" + dir) + copyFilesExtNoSubdirIfNeeded(log, DatabaseDirectory + "/" + dir, newpath, ".tga") + copyFilesExtNoSubdirIfNeeded(log, DatabaseDirectory + "/" + dir, newpath, ".png") +printLog(log, "") + +# For each interface directory to compress in one DXTC +printLog(log, ">>> Export interface dxtc <<<") +mkPath(log, ExportBuildDirectory + "/" + InterfaceDxtcExportDirectory) +for dir in InterfaceDxtcSourceDirectories: + mkPath(log, DatabaseDirectory + "/" + dir) + copyFilesExtNoSubdirIfNeeded(log, DatabaseDirectory + "/" + dir, ExportBuildDirectory + "/" + InterfaceDxtcExportDirectory, ".tga") + copyFilesExtNoSubdirIfNeeded(log, DatabaseDirectory + "/" + dir, ExportBuildDirectory + "/" + InterfaceDxtcExportDirectory, ".png") +printLog(log, "") + +# For each interface fullscreen directory compress independently all in dds +printLog(log, ">>> Export interface fullscreen <<<") +if TgaToDds == "": + toolLogFail(log, TgaToDdsTool, ToolSuffix) +else: + mkPath(log, ExportBuildDirectory + "/" + InterfaceFullscreenExportDirectory) + for dir in InterfaceFullscreenSourceDirectories: + mkPath(log, DatabaseDirectory + "/" + dir) + files = findFiles(log, DatabaseDirectory + "/" + dir, "", ".tga") + for file in files: + sourceFile = DatabaseDirectory + "/" + dir + "/" + file + destFile = ExportBuildDirectory + "/" + InterfaceFullscreenExportDirectory + "/" + os.path.basename(file)[0:-len(".tga")] + ".dds" + if needUpdateLogRemoveDest(log, sourceFile, destFile): + subprocess.call([ TgaToDds, sourceFile, "-o", destFile, "-a", "5" ]) + files = findFiles(log, DatabaseDirectory + "/" + dir, "", ".png") + for file in files: + sourceFile = DatabaseDirectory + "/" + dir + "/" + file + destFile = ExportBuildDirectory + "/" + InterfaceFullscreenExportDirectory + "/" + os.path.basename(file)[0:-len(".png")] + ".dds" + if needUpdateLogRemoveDest(log, sourceFile, destFile): + subprocess.call([ TgaToDds, sourceFile, "-o", destFile, "-a", "5" ]) +printLog(log, "") + +# For each interface 3d directory +printLog(log, ">>> Export interface 3d <<<") +mkPath(log, ExportBuildDirectory + "/" + Interface3DExportDirectory) +for dir in Interface3DSourceDirectories: + mkPath(log, DatabaseDirectory + "/" + dir) + copyFiles(log, DatabaseDirectory + "/" + dir, ExportBuildDirectory + "/" + Interface3DExportDirectory) +printLog(log, "") + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/interface/2_build.py b/code/nel/tools/build_gamedata/processes/interface/2_build.py old mode 100755 new mode 100644 index 4dfead25b..af25b919e --- a/code/nel/tools/build_gamedata/processes/interface/2_build.py +++ b/code/nel/tools/build_gamedata/processes/interface/2_build.py @@ -1,83 +1,83 @@ -#!/usr/bin/python -# -# \file 2_build.py -# \brief Build interface -# \date 2009-03-10 13:13GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Build interface -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Build interface") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -# Find tools -BuildInterface = findTool(log, ToolDirectories, BuildInterfaceTool, ToolSuffix) -printLog(log, "") - -# For each interface directory -printLog(log, ">>> Build interface <<<") -if BuildInterface == "": - toolLogFail(log, BuildInterfaceTool, ToolSuffix) -else: - mkPath(log, ExportBuildDirectory + "/" + InterfaceBuildDirectory) - for dir in os.listdir(ExportBuildDirectory + "/" + InterfaceExportDirectory): - dirPath = ExportBuildDirectory + "/" + InterfaceExportDirectory + "/" + dir - if (os.path.isdir(dirPath)) and dir != ".svn" and dir != "*.*": - texturePath = ExportBuildDirectory + "/" + InterfaceBuildDirectory + "/texture_" + dir + ".tga" - if needUpdateDirNoSubdirFile(log, dirPath, texturePath): - subprocess.call([ BuildInterface, texturePath, dirPath ]) - else: - printLog(log, "SKIP " + texturePath) -printLog(log, "") - -# For each interface directory to compress in one DXTC -printLog(log, ">>> Build interface dxtc <<<") -if BuildInterface == "": - toolLogFail(log, BuildInterfaceTool, ToolSuffix) -else: - mkPath(log, ExportBuildDirectory + "/" + InterfaceDxtcBuildDirectory) - dirPath = ExportBuildDirectory + "/" + InterfaceDxtcExportDirectory - texturePath = ExportBuildDirectory + "/" + InterfaceDxtcBuildDirectory + "/texture_interfaces_dxtc.tga" - if needUpdateDirNoSubdirFile(log, dirPath, texturePath): - subprocess.call([ BuildInterface, texturePath, dirPath ]) - else: - printLog(log, "SKIP " + texturePath) -printLog(log, "") - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 2_build.py +# \brief Build interface +# \date 2009-03-10 13:13GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Build interface +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Build interface") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +# Find tools +BuildInterface = findTool(log, ToolDirectories, BuildInterfaceTool, ToolSuffix) +printLog(log, "") + +# For each interface directory +printLog(log, ">>> Build interface <<<") +if BuildInterface == "": + toolLogFail(log, BuildInterfaceTool, ToolSuffix) +else: + mkPath(log, ExportBuildDirectory + "/" + InterfaceBuildDirectory) + for dir in os.listdir(ExportBuildDirectory + "/" + InterfaceExportDirectory): + dirPath = ExportBuildDirectory + "/" + InterfaceExportDirectory + "/" + dir + if (os.path.isdir(dirPath)) and dir != ".svn" and dir != "*.*": + texturePath = ExportBuildDirectory + "/" + InterfaceBuildDirectory + "/texture_" + dir + ".tga" + if needUpdateDirNoSubdirFile(log, dirPath, texturePath): + subprocess.call([ BuildInterface, texturePath, dirPath ]) + else: + printLog(log, "SKIP " + texturePath) +printLog(log, "") + +# For each interface directory to compress in one DXTC +printLog(log, ">>> Build interface dxtc <<<") +if BuildInterface == "": + toolLogFail(log, BuildInterfaceTool, ToolSuffix) +else: + mkPath(log, ExportBuildDirectory + "/" + InterfaceDxtcBuildDirectory) + dirPath = ExportBuildDirectory + "/" + InterfaceDxtcExportDirectory + texturePath = ExportBuildDirectory + "/" + InterfaceDxtcBuildDirectory + "/texture_interfaces_dxtc.tga" + if needUpdateDirNoSubdirFile(log, dirPath, texturePath): + subprocess.call([ BuildInterface, texturePath, dirPath ]) + else: + printLog(log, "SKIP " + texturePath) +printLog(log, "") + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/interface/3_install.py b/code/nel/tools/build_gamedata/processes/interface/3_install.py old mode 100755 new mode 100644 index d7f052561..7a771b420 --- a/code/nel/tools/build_gamedata/processes/interface/3_install.py +++ b/code/nel/tools/build_gamedata/processes/interface/3_install.py @@ -1,69 +1,69 @@ -#!/usr/bin/python -# -# \file 3_install.py -# \brief Install interface -# \date 2009-03-10 13:13GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Install interface -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Install interface") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -installPath = InstallDirectory + "/" + InterfaceInstallDirectory -mkPath(log, installPath) - -printLog(log, ">>> Install interface <<<") -mkPath(log, ExportBuildDirectory + "/" + InterfaceBuildDirectory) -copyFilesNoTreeIfNeeded(log, ExportBuildDirectory + "/" + InterfaceBuildDirectory, installPath) - -printLog(log, ">>> Install interface dxtc <<<") -mkPath(log, ExportBuildDirectory + "/" + InterfaceDxtcBuildDirectory) -copyFilesNoTreeIfNeeded(log, ExportBuildDirectory + "/" + InterfaceDxtcBuildDirectory, installPath) - -printLog(log, ">>> Install interface fullscreen <<<") -mkPath(log, ExportBuildDirectory + "/" + InterfaceFullscreenExportDirectory) -copyFilesNoTreeIfNeeded(log, ExportBuildDirectory + "/" + InterfaceFullscreenExportDirectory, installPath) - -printLog(log, ">>> Install interface 3d <<<") -mkPath(log, ExportBuildDirectory + "/" + Interface3DExportDirectory) -copyFilesNoTreeIfNeeded(log, ExportBuildDirectory + "/" + Interface3DExportDirectory, installPath) - -printLog(log, "") -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 3_install.py +# \brief Install interface +# \date 2009-03-10 13:13GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Install interface +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite_local import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Install interface") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +installPath = InstallDirectory + "/" + InterfaceInstallDirectory +mkPath(log, installPath) + +printLog(log, ">>> Install interface <<<") +mkPath(log, ExportBuildDirectory + "/" + InterfaceBuildDirectory) +copyFilesNoTreeIfNeeded(log, ExportBuildDirectory + "/" + InterfaceBuildDirectory, installPath) + +printLog(log, ">>> Install interface dxtc <<<") +mkPath(log, ExportBuildDirectory + "/" + InterfaceDxtcBuildDirectory) +copyFilesNoTreeIfNeeded(log, ExportBuildDirectory + "/" + InterfaceDxtcBuildDirectory, installPath) + +printLog(log, ">>> Install interface fullscreen <<<") +mkPath(log, ExportBuildDirectory + "/" + InterfaceFullscreenExportDirectory) +copyFilesNoTreeIfNeeded(log, ExportBuildDirectory + "/" + InterfaceFullscreenExportDirectory, installPath) + +printLog(log, ">>> Install interface 3d <<<") +mkPath(log, ExportBuildDirectory + "/" + Interface3DExportDirectory) +copyFilesNoTreeIfNeeded(log, ExportBuildDirectory + "/" + Interface3DExportDirectory, installPath) + +printLog(log, "") +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/ligo/0_setup.py b/code/nel/tools/build_gamedata/processes/ligo/0_setup.py old mode 100755 new mode 100644 index 32a74bf63..18d5ea6f7 --- a/code/nel/tools/build_gamedata/processes/ligo/0_setup.py +++ b/code/nel/tools/build_gamedata/processes/ligo/0_setup.py @@ -1,120 +1,121 @@ -#!/usr/bin/python -# -# \file 0_setup.py -# \brief setup ligo -# \date 2010-05-24 08:13GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Setup ligo -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Setup ligo") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -# Setup source directories -printLog(log, ">>> Setup source directories <<<") -mkPath(log, DatabaseDirectory + "/" + LigoBaseSourceDirectory) -mkPath(log, DatabaseDirectory + "/" + LigoMaxSourceDirectory) -mkPath(log, DatabaseDirectory + "/" + ZoneSourceDirectory[0]) - -# Setup export directories -printLog(log, ">>> Setup export directories <<<") -mkPath(log, ExportBuildDirectory + "/" + SmallbankExportDirectory) -mkPath(log, ExportBuildDirectory + "/" + LigoEcosystemExportDirectory) -mkPath(log, ExportBuildDirectory + "/" + LigoEcosystemIgExportDirectory) -mkPath(log, ExportBuildDirectory + "/" + LigoEcosystemZoneExportDirectory) -mkPath(log, ExportBuildDirectory + "/" + LigoEcosystemZoneLigoExportDirectory) -mkPath(log, ExportBuildDirectory + "/" + LigoEcosystemCmbExportDirectory) -mkPath(log, ExportBuildDirectory + "/" + LigoEcosystemTagExportDirectory) -mkPath(log, ExportBuildDirectory + "/" + ZoneExportDirectory) - -# Setup build directories -printLog(log, ">>> Setup build directories <<<") -if LigoExportLand != "": - mkPath(log, ExportBuildDirectory + "/" + LigoZoneBuildDirectory) - mkPath(log, ExportBuildDirectory + "/" + LigoIgLandBuildDirectory) - mkPath(log, ExportBuildDirectory + "/" + LigoIgOtherBuildDirectory) - mkPath(log, ExportBuildDirectory + "/" + RBankCmbExportDirectory) - -# Setup client directories -printLog(log, ">>> Setup client directories <<<") - -# Setup land exporter cfg -if LigoExportLand != "": - printLog(log, ">>> Setup land exporter cfg <<<") - mkPath(log, ActiveProjectDirectory + "/generated") - cf = open(ActiveProjectDirectory + "/generated/land_exporter.cfg", "w") - cf.write("\n") - cf.write("// Ligo settings\n") - cf.write("\n") - cf.write("OutZoneDir = \"" + ExportBuildDirectory + "/" + LigoZoneBuildDirectory + "\";\n") - cf.write("OutIGDir = \"" + ExportBuildDirectory + "/" + LigoIgLandBuildDirectory + "\";\n") - cf.write("AdditionnalIGOutDir = \"" + ExportBuildDirectory + "/" + LigoIgOtherBuildDirectory + "\";\n") - cf.write("\n") - cf.write("RefZoneDir = \"" + ExportBuildDirectory + "/" + LigoEcosystemZoneExportDirectory+ "\";\n") # FIXME - cf.write("RefIGDir = \"" + ExportBuildDirectory + "/" + LigoEcosystemIgExportDirectory + "\";\n") - cf.write("AdditionnalIGInDir = \"" + ExportBuildDirectory + "/" + LigoEcosystemIgExportDirectory + "\";\n") # FIXME - cf.write("ContinentsDir = \"" + LeveldesignWorldDirectory + "\";\n") - cf.write("LigoBankDir = \"" + ExportBuildDirectory + "/" + LigoEcosystemZoneLigoExportDirectory + "\";\n") # FIXME - cf.write("\n") - cf.write("TileBankFile = \"" + DatabaseDirectory + "/" + LigoTileBankFile + "\";\n") - cf.write("\n") - cf.write("ColorMapFile = \"" + DatabaseDirectory + "/" + LigoBaseSourceDirectory + "/" + LigoExportColormap + "\";\n") - cf.write("HeightMapFile1 = \"" + DatabaseDirectory + "/" + LigoBaseSourceDirectory + "/" + LigoExportHeightmap1 + "\";\n") - cf.write("ZFactor1 = " + LigoExportZFactor1 + ";\n") - cf.write("HeightMapFile2 = \"" + DatabaseDirectory + "/" + LigoBaseSourceDirectory + "/" + LigoExportHeightmap2 + "\";\n") - cf.write("ZFactor2 = " + LigoExportZFactor2 + ";\n") - cf.write("\n") - cf.write("ZoneLight = 0;\n") - cf.write("CellSize = 160;\n") - cf.write("Threshold = 1;\n") - cf.write("\n") - cf.write("DFNDir = \"" + LeveldesignDfnDirectory + "\";\n") - cf.write("RefCMBDir = \"" + ExportBuildDirectory + "/" + LigoEcosystemCmbExportDirectory + "\";\n") # FIXME - cf.write("OutCMBDir = \"" + ExportBuildDirectory + "/" + RBankCmbExportDirectory + "\";\n") - cf.write("\n") - cf.write("ContinentFile = \"" + LeveldesignWorldDirectory + "/" + ContinentFile + "\";\n") - cf.write("\n") - cf.write("ExportCollisions = 1;\n") - cf.write("ExportAdditionnalIGs = 1;\n") - cf.write("\n") - cf.write("ZoneRegionFile = \"" + DatabaseDirectory + "/" + LigoBaseSourceDirectory + "/" + LigoExportLand + "\";\n") - cf.write("\n") - cf.close() - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 0_setup.py +# \brief setup ligo +# \date 2010-05-24 08:13GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Setup ligo +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Setup ligo") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +# Setup source directories +printLog(log, ">>> Setup source directories <<<") +mkPath(log, DatabaseDirectory + "/" + LigoBaseSourceDirectory) +mkPath(log, DatabaseDirectory + "/" + LigoMaxSourceDirectory) +mkPath(log, DatabaseDirectory + "/" + ZoneSourceDirectory[0]) + +# Setup export directories +printLog(log, ">>> Setup export directories <<<") +mkPath(log, ExportBuildDirectory + "/" + SmallbankExportDirectory) +mkPath(log, ExportBuildDirectory + "/" + LigoEcosystemExportDirectory) +mkPath(log, ExportBuildDirectory + "/" + LigoEcosystemIgExportDirectory) +mkPath(log, ExportBuildDirectory + "/" + LigoEcosystemZoneExportDirectory) +mkPath(log, ExportBuildDirectory + "/" + LigoEcosystemZoneLigoExportDirectory) +mkPath(log, ExportBuildDirectory + "/" + LigoEcosystemCmbExportDirectory) +mkPath(log, ExportBuildDirectory + "/" + LigoEcosystemTagExportDirectory) +mkPath(log, ExportBuildDirectory + "/" + ZoneExportDirectory) + +# Setup build directories +printLog(log, ">>> Setup build directories <<<") +if LigoExportLand != "": + mkPath(log, ExportBuildDirectory + "/" + LigoZoneBuildDirectory) + mkPath(log, ExportBuildDirectory + "/" + LigoIgLandBuildDirectory) + mkPath(log, ExportBuildDirectory + "/" + LigoIgOtherBuildDirectory) + mkPath(log, ExportBuildDirectory + "/" + RBankCmbExportDirectory) + +# Setup client directories +printLog(log, ">>> Setup client directories <<<") + +# Setup land exporter cfg +if LigoExportLand != "": + printLog(log, ">>> Setup land exporter cfg <<<") + mkPath(log, ActiveProjectDirectory + "/generated") + cf = open(ActiveProjectDirectory + "/generated/land_exporter.cfg", "w") + cf.write("\n") + cf.write("// Ligo settings\n") + cf.write("\n") + cf.write("OutZoneDir = \"" + ExportBuildDirectory + "/" + LigoZoneBuildDirectory + "\";\n") + cf.write("OutIGDir = \"" + ExportBuildDirectory + "/" + LigoIgLandBuildDirectory + "\";\n") + cf.write("AdditionnalIGOutDir = \"" + ExportBuildDirectory + "/" + LigoIgOtherBuildDirectory + "\";\n") + cf.write("\n") + cf.write("RefZoneDir = \"" + ExportBuildDirectory + "/" + LigoEcosystemZoneExportDirectory+ "\";\n") # FIXME + cf.write("RefIGDir = \"" + ExportBuildDirectory + "/" + LigoEcosystemIgExportDirectory + "\";\n") + cf.write("AdditionnalIGInDir = \"" + ExportBuildDirectory + "/" + LigoEcosystemIgExportDirectory + "\";\n") # FIXME + cf.write("ContinentsDir = \"" + LeveldesignWorldDirectory + "\";\n") + cf.write("LigoBankDir = \"" + ExportBuildDirectory + "/" + LigoEcosystemZoneLigoExportDirectory + "\";\n") # FIXME + cf.write("\n") + cf.write("TileBankFile = \"" + DatabaseDirectory + "/" + LigoTileBankFile + "\";\n") + cf.write("\n") + cf.write("ColorMapFile = \"" + DatabaseDirectory + "/" + LigoBaseSourceDirectory + "/" + LigoExportColormap + "\";\n") + cf.write("HeightMapFile1 = \"" + DatabaseDirectory + "/" + LigoBaseSourceDirectory + "/" + LigoExportHeightmap1 + "\";\n") + cf.write("ZFactor1 = " + LigoExportZFactor1 + ";\n") + cf.write("HeightMapFile2 = \"" + DatabaseDirectory + "/" + LigoBaseSourceDirectory + "/" + LigoExportHeightmap2 + "\";\n") + cf.write("ZFactor2 = " + LigoExportZFactor2 + ";\n") + cf.write("ExtendCoords = " + str(LigoExportExtendCoords) + ";\n") + cf.write("\n") + cf.write("ZoneLight = 0;\n") + cf.write("CellSize = 160;\n") + cf.write("Threshold = 1;\n") + cf.write("\n") + cf.write("DFNDir = \"" + LeveldesignDfnDirectory + "\";\n") + cf.write("RefCMBDir = \"" + ExportBuildDirectory + "/" + LigoEcosystemCmbExportDirectory + "\";\n") # FIXME + cf.write("OutCMBDir = \"" + ExportBuildDirectory + "/" + RBankCmbExportDirectory + "\";\n") + cf.write("\n") + cf.write("ContinentFile = \"" + LeveldesignWorldDirectory + "/" + ContinentFile + "\";\n") + cf.write("\n") + cf.write("ExportCollisions = 1;\n") + cf.write("ExportAdditionnalIGs = 1;\n") + cf.write("\n") + cf.write("ZoneRegionFile = \"" + DatabaseDirectory + "/" + LigoBaseSourceDirectory + "/" + LigoExportLand + "\";\n") + cf.write("\n") + cf.close() + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/ligo/1_export.py b/code/nel/tools/build_gamedata/processes/ligo/1_export.py old mode 100755 new mode 100644 index e0f9bab77..4d78b0baf --- a/code/nel/tools/build_gamedata/processes/ligo/1_export.py +++ b/code/nel/tools/build_gamedata/processes/ligo/1_export.py @@ -1,150 +1,150 @@ -#!/usr/bin/python -# -# \file 1_export.py -# \brief Export ligo -# \date 2010-05-24 08:13GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Export ligo -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -import time, sys, os, shutil, subprocess, distutils.dir_util -sys.path.append("../../configuration") - -if os.path.isfile("log.log"): - os.remove("log.log") -if os.path.isfile("temp_log.log"): - os.remove("temp_log.log") -log = open("temp_log.log", "w") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Export ligo") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -if LigoExportLand == "" or LigoExportOnePass == 1: - # Find tools - Max = findMax(log, MaxDirectory, MaxExecutable) - ExecTimeout = findTool(log, ToolDirectories, ExecTimeoutTool, ToolSuffix) - printLog(log, "") - - # For each directory - printLog(log, ">>> Export ligo 3dsmax <<<") - - ligoIniPath = MaxUserDirectory + "/plugcfg/nelligo.ini" - mkPath(log, ExportBuildDirectory + "/" + SmallbankExportDirectory) - mkPath(log, DatabaseDirectory + "/" + LigoMaxSourceDirectory) - mkPath(log, ExportBuildDirectory + "/" + LigoEcosystemExportDirectory) - mkPath(log, ExportBuildDirectory + "/" + LigoEcosystemIgExportDirectory) - mkPath(log, ExportBuildDirectory + "/" + LigoEcosystemZoneExportDirectory) - mkPath(log, ExportBuildDirectory + "/" + LigoEcosystemZoneLigoExportDirectory) - mkPath(log, ExportBuildDirectory + "/" + LigoEcosystemCmbExportDirectory) - mkPath(log, DatabaseDirectory + "/" + ZoneSourceDirectory[0]) - tagDirectory = ExportBuildDirectory + "/" + LigoEcosystemTagExportDirectory - mkPath(log, tagDirectory) - if (needUpdateDirByTagLogFiltered(log, DatabaseDirectory + "/" + LigoMaxSourceDirectory, ".max", tagDirectory, ".max.tag", [ "zonematerial", "zonetransition", "zonespecial" ])): - printLog(log, "WRITE " + ligoIniPath) - ligoIni = open(ligoIniPath, "w") - ligoIni.write("[LigoConfig]\n") - ligoIni.write("LigoPath=" + DatabaseDirectory + "/" + LigoMaxSourceDirectory + "/\n") - ligoIni.write("LigoExportPath=" + ExportBuildDirectory + "/" + LigoEcosystemExportDirectory + "/\n") - ligoIni.write("LigoOldZonePath=" + DatabaseDirectory + "/" + ZoneSourceDirectory[0] + "/\n") - ligoIni.close() - - outputLogfile = ScriptDirectory + "/processes/ligo/log.log" - smallBank = ExportBuildDirectory + "/" + SmallbankExportDirectory + "/" + BankTileBankName + ".smallbank" - maxRunningTagFile = tagDirectory + "/max_running.tag" - - scriptSrc = "maxscript/nel_ligo_export.ms" - scriptDst = MaxUserDirectory + "/scripts/nel_ligo_export.ms" - - tagList = findFiles(log, tagDirectory, "", ".max.tag") - tagLen = len(tagList) - - if os.path.isfile(scriptDst): - os.remove(scriptDst) - - tagDiff = 1 - printLog(log, "WRITE " + scriptDst) - sSrc = open(scriptSrc, "r") - sDst = open(scriptDst, "w") - for line in sSrc: - newline = line.replace("%OutputLogfile%", outputLogfile) - newline = newline.replace("%TagDirectory%", tagDirectory) - newline = newline.replace("%SmallBankFilename%", smallBank) - sDst.write(newline) - sSrc.close() - sDst.close() - - zeroRetryLimit = 3 - while tagDiff > 0: - mrt = open(maxRunningTagFile, "w") - mrt.write("moe-moe-kyun") - mrt.close() - printLog(log, "MAXSCRIPT " + scriptDst) - subprocess.call([ Max, "-U", "MAXScript", "nel_ligo_export.ms", "-q", "-mi", "-mip" ]) - if os.path.exists(outputLogfile): - try: - lSrc = open(outputLogfile, "r") - for line in lSrc: - lineStrip = line.strip() - if (len(lineStrip) > 0): - printLog(log, lineStrip) - lSrc.close() - os.remove(outputLogfile) - except Exception: - printLog(log, "ERROR Failed to read 3dsmax log") - else: - printLog(log, "WARNING No 3dsmax log") - tagList = findFiles(log, tagDirectory, "", ".max.tag") - newTagLen = len(tagList) - tagDiff = newTagLen - tagLen - tagLen = newTagLen - addTagDiff = 0 - if os.path.exists(maxRunningTagFile): - printLog(log, "FAIL 3ds Max crashed and/or file export failed!") - if tagDiff == 0: - if zeroRetryLimit > 0: - zeroRetryLimit = zeroRetryLimit - 1 - addTagDiff = 1 - else: - printLog(log, "FAIL Retry limit reached!") - else: - addTagDiff = 1 - os.remove(maxRunningTagFile) - printLog(log, "Exported " + str(tagDiff) + " .max files!") - tagDiff += addTagDiff - - os.remove(scriptDst) - printLog(log, "") - -log.close() -if os.path.isfile("log.log"): - os.remove("log.log") -shutil.move("temp_log.log", "log.log") - - -# end of file +#!/usr/bin/python +# +# \file 1_export.py +# \brief Export ligo +# \date 2010-05-24 08:13GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Export ligo +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +import time, sys, os, shutil, subprocess, distutils.dir_util +sys.path.append("../../configuration") + +if os.path.isfile("log.log"): + os.remove("log.log") +if os.path.isfile("temp_log.log"): + os.remove("temp_log.log") +log = open("temp_log.log", "w") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Export ligo") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +if LigoExportLand == "" or LigoExportOnePass == 1: + # Find tools + Max = findMax(log, MaxDirectory, MaxExecutable) + ExecTimeout = findTool(log, ToolDirectories, ExecTimeoutTool, ToolSuffix) + printLog(log, "") + + # For each directory + printLog(log, ">>> Export ligo 3dsmax <<<") + + ligoIniPath = MaxUserDirectory + "/plugcfg/nelligo.ini" + mkPath(log, ExportBuildDirectory + "/" + SmallbankExportDirectory) + mkPath(log, DatabaseDirectory + "/" + LigoMaxSourceDirectory) + mkPath(log, ExportBuildDirectory + "/" + LigoEcosystemExportDirectory) + mkPath(log, ExportBuildDirectory + "/" + LigoEcosystemIgExportDirectory) + mkPath(log, ExportBuildDirectory + "/" + LigoEcosystemZoneExportDirectory) + mkPath(log, ExportBuildDirectory + "/" + LigoEcosystemZoneLigoExportDirectory) + mkPath(log, ExportBuildDirectory + "/" + LigoEcosystemCmbExportDirectory) + mkPath(log, DatabaseDirectory + "/" + ZoneSourceDirectory[0]) + tagDirectory = ExportBuildDirectory + "/" + LigoEcosystemTagExportDirectory + mkPath(log, tagDirectory) + if (needUpdateDirByTagLogFiltered(log, DatabaseDirectory + "/" + LigoMaxSourceDirectory, ".max", tagDirectory, ".max.tag", [ "zonematerial", "zonetransition", "zonespecial" ])): + printLog(log, "WRITE " + ligoIniPath) + ligoIni = open(ligoIniPath, "w") + ligoIni.write("[LigoConfig]\n") + ligoIni.write("LigoPath=" + DatabaseDirectory + "/" + LigoMaxSourceDirectory + "/\n") + ligoIni.write("LigoExportPath=" + ExportBuildDirectory + "/" + LigoEcosystemExportDirectory + "/\n") + ligoIni.write("LigoOldZonePath=" + DatabaseDirectory + "/" + ZoneSourceDirectory[0] + "/\n") + ligoIni.close() + + outputLogfile = ScriptDirectory + "/processes/ligo/log.log" + smallBank = ExportBuildDirectory + "/" + SmallbankExportDirectory + "/" + BankTileBankName + ".smallbank" + maxRunningTagFile = tagDirectory + "/max_running.tag" + + scriptSrc = "maxscript/nel_ligo_export.ms" + scriptDst = MaxUserDirectory + "/scripts/nel_ligo_export.ms" + + tagList = findFiles(log, tagDirectory, "", ".max.tag") + tagLen = len(tagList) + + if os.path.isfile(scriptDst): + os.remove(scriptDst) + + tagDiff = 1 + printLog(log, "WRITE " + scriptDst) + sSrc = open(scriptSrc, "r") + sDst = open(scriptDst, "w") + for line in sSrc: + newline = line.replace("%OutputLogfile%", outputLogfile) + newline = newline.replace("%TagDirectory%", tagDirectory) + newline = newline.replace("%SmallBankFilename%", smallBank) + sDst.write(newline) + sSrc.close() + sDst.close() + + zeroRetryLimit = 3 + while tagDiff > 0: + mrt = open(maxRunningTagFile, "w") + mrt.write("moe-moe-kyun") + mrt.close() + printLog(log, "MAXSCRIPT " + scriptDst) + subprocess.call([ Max, "-U", "MAXScript", "nel_ligo_export.ms", "-q", "-mi", "-mip" ]) + if os.path.exists(outputLogfile): + try: + lSrc = open(outputLogfile, "r") + for line in lSrc: + lineStrip = line.strip() + if (len(lineStrip) > 0): + printLog(log, lineStrip) + lSrc.close() + os.remove(outputLogfile) + except Exception: + printLog(log, "ERROR Failed to read 3dsmax log") + else: + printLog(log, "WARNING No 3dsmax log") + tagList = findFiles(log, tagDirectory, "", ".max.tag") + newTagLen = len(tagList) + tagDiff = newTagLen - tagLen + tagLen = newTagLen + addTagDiff = 0 + if os.path.exists(maxRunningTagFile): + printLog(log, "FAIL 3ds Max crashed and/or file export failed!") + if tagDiff == 0: + if zeroRetryLimit > 0: + zeroRetryLimit = zeroRetryLimit - 1 + addTagDiff = 1 + else: + printLog(log, "FAIL Retry limit reached!") + else: + addTagDiff = 1 + os.remove(maxRunningTagFile) + printLog(log, "Exported " + str(tagDiff) + " .max files!") + tagDiff += addTagDiff + + os.remove(scriptDst) + printLog(log, "") + +log.close() +if os.path.isfile("log.log"): + os.remove("log.log") +shutil.move("temp_log.log", "log.log") + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/ligo/2_build.py b/code/nel/tools/build_gamedata/processes/ligo/2_build.py old mode 100755 new mode 100644 index 54f5d75e8..c7b9593cc --- a/code/nel/tools/build_gamedata/processes/ligo/2_build.py +++ b/code/nel/tools/build_gamedata/processes/ligo/2_build.py @@ -1,69 +1,69 @@ -#!/usr/bin/python -# -# \file 2_build.py -# \brief Build ligo -# \date 2010-05-24 08:13GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Build ligo -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Build ligo") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -if LigoExportLand != "": - ExecTimeout = findTool(log, ToolDirectories, ExecTimeoutTool, ToolSuffix) - LandExport = findTool(log, ToolDirectories, LandExportTool, ToolSuffix) - - printLog(log, ">>> Generate ligo zone <<<") - if LandExport == "": - toolLogFail(log, LandExportTool, ToolSuffix) - elif ExecTimeout == "": - toolLogfail(log, ExecTimeoutTool, ToolSuffix) - else: - subprocess.call([ ExecTimeout, str(LigoExportTimeout), LandExport, ActiveProjectDirectory + "/generated/land_exporter.cfg" ]) - - printLog(log, ">>> Copy to zone builder <<<") - dirSource = ExportBuildDirectory + "/" + LigoZoneBuildDirectory - dirTarget = ExportBuildDirectory + "/" + ZoneExportDirectory - mkPath(log, dirSource) - mkPath(log, dirTarget) - copyFilesExtReplaceNoTreeIfNeeded(log, dirSource, dirTarget, ".zonel", ".zone") - copyFilesExtNoTreeIfNeeded(log, dirSource, dirTarget, ".zonenh") - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 2_build.py +# \brief Build ligo +# \date 2010-05-24 08:13GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Build ligo +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Build ligo") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +if LigoExportLand != "": + ExecTimeout = findTool(log, ToolDirectories, ExecTimeoutTool, ToolSuffix) + LandExport = findTool(log, ToolDirectories, LandExportTool, ToolSuffix) + + printLog(log, ">>> Generate ligo zone <<<") + if LandExport == "": + toolLogFail(log, LandExportTool, ToolSuffix) + elif ExecTimeout == "": + toolLogfail(log, ExecTimeoutTool, ToolSuffix) + else: + subprocess.call([ ExecTimeout, str(LigoExportTimeout), LandExport, ActiveProjectDirectory + "/generated/land_exporter.cfg" ]) + + printLog(log, ">>> Copy to zone builder <<<") + dirSource = ExportBuildDirectory + "/" + LigoZoneBuildDirectory + dirTarget = ExportBuildDirectory + "/" + ZoneExportDirectory + mkPath(log, dirSource) + mkPath(log, dirTarget) + copyFilesExtReplaceNoTreeIfNeeded(log, dirSource, dirTarget, ".zonel", ".zone") + copyFilesExtNoTreeIfNeeded(log, dirSource, dirTarget, ".zonenh") + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/ligo/3_install.py b/code/nel/tools/build_gamedata/processes/ligo/3_install.py old mode 100755 new mode 100644 index 9d9e59b54..a65f6348b --- a/code/nel/tools/build_gamedata/processes/ligo/3_install.py +++ b/code/nel/tools/build_gamedata/processes/ligo/3_install.py @@ -1,50 +1,50 @@ -#!/usr/bin/python -# -# \file 3_install.py -# \brief Install ligo -# \date 2010-05-24 08:13GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Install ligo -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Install ligo") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -printLog(log, "") -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 3_install.py +# \brief Install ligo +# \date 2010-05-24 08:13GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Install ligo +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite_local import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Install ligo") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +printLog(log, "") +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/ligo/maxscript/nel_ligo_export.ms b/code/nel/tools/build_gamedata/processes/ligo/maxscript/nel_ligo_export.ms old mode 100755 new mode 100644 diff --git a/code/nel/tools/build_gamedata/processes/map/0_setup.py b/code/nel/tools/build_gamedata/processes/map/0_setup.py old mode 100755 new mode 100644 index 5cfc189d5..25d54d24d --- a/code/nel/tools/build_gamedata/processes/map/0_setup.py +++ b/code/nel/tools/build_gamedata/processes/map/0_setup.py @@ -1,79 +1,79 @@ -#!/usr/bin/python -# -# \file 0_setup.py -# \brief Setup map -# \date 2009-03-10 14:56GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Setup map -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Setup map") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -# Setup source directories -printLog(log, ">>> Setup source directories <<<") -for dir in MapSourceDirectories: - mkPath(log, DatabaseDirectory + "/" + dir) -for dir in MapUncompressedSourceDirectories: - mkPath(log, DatabaseDirectory + "/" + dir) -if MapHlsBankFileName != None or MapPanoplyFileList != None: - for panoplyCfg in MapPanoplySourceDirectories: - mkPath(log, DatabaseDirectory + "/" + panoplyCfg[2]) - mkPath(log, DatabaseDirectory + "/" + panoplyCfg[3]) - -# Setup export directories -printLog(log, ">>> Setup export directories <<<") -mkPath(log, ExportBuildDirectory + "/" + MapExportDirectory) -mkPath(log, ExportBuildDirectory + "/" + MapUncompressedExportDirectory) - -# Setup build directories -printLog(log, ">>> Setup build directories <<<") -mkPath(log, ExportBuildDirectory + "/" + MapBuildDirectory) -mkPath(log, ExportBuildDirectory + "/" + MapTagBuildDirectory) -if MapHlsBankFileName != None or MapPanoplyFileList != None: - mkPath(log, ExportBuildDirectory + "/" + MapPanoplyBuildDirectory) - mkPath(log, ExportBuildDirectory + "/" + MapPanoplyHlsInfoBuildDirectory) - mkPath(log, ExportBuildDirectory + "/" + MapPanoplyHlsBankBuildDirectory) - mkPath(log, ExportBuildDirectory + "/" + MapPanoplyCacheBuildDirectory) - -# Setup client directories -printLog(log, ">>> Setup client directories <<<") -mkPath(log, InstallDirectory + "/" + MapInstallDirectory) - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 0_setup.py +# \brief Setup map +# \date 2009-03-10 14:56GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Setup map +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Setup map") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +# Setup source directories +printLog(log, ">>> Setup source directories <<<") +for dir in MapSourceDirectories: + mkPath(log, DatabaseDirectory + "/" + dir) +for dir in MapUncompressedSourceDirectories: + mkPath(log, DatabaseDirectory + "/" + dir) +if MapHlsBankFileName != None or MapPanoplyFileList != None: + for panoplyCfg in MapPanoplySourceDirectories: + mkPath(log, DatabaseDirectory + "/" + panoplyCfg[2]) + mkPath(log, DatabaseDirectory + "/" + panoplyCfg[3]) + +# Setup export directories +printLog(log, ">>> Setup export directories <<<") +mkPath(log, ExportBuildDirectory + "/" + MapExportDirectory) +mkPath(log, ExportBuildDirectory + "/" + MapUncompressedExportDirectory) + +# Setup build directories +printLog(log, ">>> Setup build directories <<<") +mkPath(log, ExportBuildDirectory + "/" + MapBuildDirectory) +mkPath(log, ExportBuildDirectory + "/" + MapTagBuildDirectory) +if MapHlsBankFileName != None or MapPanoplyFileList != None: + mkPath(log, ExportBuildDirectory + "/" + MapPanoplyBuildDirectory) + mkPath(log, ExportBuildDirectory + "/" + MapPanoplyHlsInfoBuildDirectory) + mkPath(log, ExportBuildDirectory + "/" + MapPanoplyHlsBankBuildDirectory) + mkPath(log, ExportBuildDirectory + "/" + MapPanoplyCacheBuildDirectory) + +# Setup client directories +printLog(log, ">>> Setup client directories <<<") +mkPath(log, InstallDirectory + "/" + MapInstallDirectory) + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/map/1_export.py b/code/nel/tools/build_gamedata/processes/map/1_export.py old mode 100755 new mode 100644 index a77d32082..9be2e45c6 --- a/code/nel/tools/build_gamedata/processes/map/1_export.py +++ b/code/nel/tools/build_gamedata/processes/map/1_export.py @@ -1,71 +1,71 @@ -#!/usr/bin/python -# -# \file 1_export.py -# \brief Export map -# \date 2009-03-10 13:13GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Export map -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Export map") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -printLog(log, ">>> Export maps that will be compressed to DDS <<<") -for dir in MapSourceDirectories: - sourcePath = DatabaseDirectory + "/" + dir - mkPath(log, sourcePath) - destPath = ExportBuildDirectory + "/" + MapExportDirectory - mkPath(log, destPath) - copyFilesExtNoSubdirIfNeeded(log, sourcePath, destPath, ".dds") - copyFilesExtNoSubdirIfNeeded(log, sourcePath, destPath, ".png") - copyFilesExtNoSubdirIfNeeded(log, sourcePath, destPath, ".tga") -printLog(log, "") - -printLog(log, ">>> Export maps that will not be compressed <<<") -for dir in MapUncompressedSourceDirectories: - sourcePath = DatabaseDirectory + "/" + dir - mkPath(log, sourcePath) - destPath = ExportBuildDirectory + "/" + MapUncompressedExportDirectory - mkPath(log, destPath) - copyFilesExtNoSubdirIfNeeded(log, sourcePath, destPath, ".dds") - copyFilesExtNoSubdirIfNeeded(log, sourcePath, destPath, ".png") - copyFilesExtNoSubdirIfNeeded(log, sourcePath, destPath, ".tga") -printLog(log, "") - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 1_export.py +# \brief Export map +# \date 2009-03-10 13:13GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Export map +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Export map") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +printLog(log, ">>> Export maps that will be compressed to DDS <<<") +for dir in MapSourceDirectories: + sourcePath = DatabaseDirectory + "/" + dir + mkPath(log, sourcePath) + destPath = ExportBuildDirectory + "/" + MapExportDirectory + mkPath(log, destPath) + copyFilesExtNoSubdirIfNeeded(log, sourcePath, destPath, ".dds") + copyFilesExtNoSubdirIfNeeded(log, sourcePath, destPath, ".png") + copyFilesExtNoSubdirIfNeeded(log, sourcePath, destPath, ".tga") +printLog(log, "") + +printLog(log, ">>> Export maps that will not be compressed <<<") +for dir in MapUncompressedSourceDirectories: + sourcePath = DatabaseDirectory + "/" + dir + mkPath(log, sourcePath) + destPath = ExportBuildDirectory + "/" + MapUncompressedExportDirectory + mkPath(log, destPath) + copyFilesExtNoSubdirIfNeeded(log, sourcePath, destPath, ".dds") + copyFilesExtNoSubdirIfNeeded(log, sourcePath, destPath, ".png") + copyFilesExtNoSubdirIfNeeded(log, sourcePath, destPath, ".tga") +printLog(log, "") + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/map/2_build.py b/code/nel/tools/build_gamedata/processes/map/2_build.py old mode 100755 new mode 100644 index 82a777410..4a9477b8a --- a/code/nel/tools/build_gamedata/processes/map/2_build.py +++ b/code/nel/tools/build_gamedata/processes/map/2_build.py @@ -1,168 +1,168 @@ -#!/usr/bin/python -# -# \file 2_build.py -# \brief Build map -# \date 2009-03-10 13:13GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Build map -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Build map") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -# Find tools -TgaToDds = findTool(log, ToolDirectories, TgaToDdsTool, ToolSuffix) -ExecTimeout = findTool(log, ToolDirectories, ExecTimeoutTool, ToolSuffix) -PanoplyMaker = findTool(log, ToolDirectories, PanoplyMakerTool, ToolSuffix) -HlsBankMaker = findTool(log, ToolDirectories, HlsBankMakerTool, ToolSuffix) -printLog(log, "") - -buildPanoplyTagPath = ExportBuildDirectory + "/" + MapTagBuildDirectory + "/build_panoply.tag" -buildCompressTagPath = ExportBuildDirectory + "/" + MapTagBuildDirectory + "/build_compress.tag" - -if MapPanoplyFileList != None: - printLog(log, ">>> Panoply build <<<") - mkPath(log, ExportBuildDirectory + "/" + MapTagBuildDirectory) - directoriesCheck = [ ] - for panoplyCfg in MapPanoplySourceDirectories: - directoriesCheck += [ panoplyCfg[2] ] - directoriesCheck += [ panoplyCfg[3] ] - if (needUpdateMultiDirNoSubdirFile(log, DatabaseDirectory, directoriesCheck, buildPanoplyTagPath)): - mkPath(log, ActiveProjectDirectory + "/generated") - mkPath(log, ExportBuildDirectory + "/" + MapPanoplyBuildDirectory) - mkPath(log, ExportBuildDirectory + "/" + MapPanoplyHlsInfoBuildDirectory) - mkPath(log, ExportBuildDirectory + "/" + MapPanoplyCacheBuildDirectory) - printLog(log, "") - printLog(log, ">>> Move panoply and hls to cache <<<") - removeFilesDirsRecursive(log, ExportBuildDirectory + "/" + MapPanoplyCacheBuildDirectory) - moveDir(log, ExportBuildDirectory + "/" + MapPanoplyBuildDirectory, ExportBuildDirectory + "/" + MapPanoplyCacheBuildDirectory) - mkPath(log, ExportBuildDirectory + "/" + MapPanoplyBuildDirectory) - moveFilesNoSubdir(log, ExportBuildDirectory + "/" + MapPanoplyHlsInfoBuildDirectory, ExportBuildDirectory + "/" + MapPanoplyCacheBuildDirectory) - printLog(log, "") - for panoplyCfg in MapPanoplySourceDirectories: - printLog(log, ">>> Panoply " + panoplyCfg[1] + " <<<") - mkPath(log, DatabaseDirectory + "/" + panoplyCfg[2]) - mkPath(log, DatabaseDirectory + "/" + panoplyCfg[3]) - cfg = open(ActiveProjectDirectory + "/generated/current_panoply.cfg", "w") - cfgCommon = open(ActiveProjectDirectory + "/" + panoplyCfg[0], "r") - cfgRace = open(ActiveProjectDirectory + "/" + panoplyCfg[1], "r") - cfg.write("\n") - cfg.write("// CURRENT PANOPLY CONFIGURATION\n") - cfg.write("\n") - cfg.write("input_path = \"" + DatabaseDirectory + "/" + panoplyCfg[2] + "\";\n") - cfg.write("additionnal_paths = \"" + DatabaseDirectory + "/" + panoplyCfg[3] + "\";\n") - cfg.write("output_path = \"" + ExportBuildDirectory + "/" + MapPanoplyBuildDirectory + "\";\n") - cfg.write("hls_info_path = \"" + ExportBuildDirectory + "/" + MapPanoplyHlsInfoBuildDirectory + "\";\n") - cfg.write("cache_path = \"" + ExportBuildDirectory + "/" + MapPanoplyCacheBuildDirectory + "\";\n") - cfg.write("\n") - cfg.write("/////////////////////////////////////////////\n") - cfg.write("\n") - for line in cfgCommon: - cfg.write(line) - for line in cfgRace: - cfg.write(line) - cfg.close() - cfgCommon.close() - cfgRace.close() - subprocess.call([ PanoplyMaker, ActiveProjectDirectory + "/generated/current_panoply.cfg" ]) - printLog(log, "") - tagFile = open(buildPanoplyTagPath, "w") - tagFile.write(time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())) + "\n") - tagFile.close() - else: - printLog(log, "SKIP *.*") - printLog(log, "") - -printLog(log, ">>> Compress TGA and PNG maps to DDS <<<") -if TgaToDds == "": - toolLogFail(log, TgaToDdsTool, ToolSuffix) -elif ExecTimeout == "": - toolLogFail(log, ExecTimeoutTool, ToolSuffix) -else: - destPath = ExportBuildDirectory + "/" + MapBuildDirectory - mkPath(log, destPath) - sourcePaths = [ ExportBuildDirectory + "/" + MapExportDirectory ] - writeTag = 0 - if MapPanoplyFileList != None: - if needUpdate(log, buildPanoplyTagPath, buildCompressTagPath): - sourcePaths += [ ExportBuildDirectory + "/" + MapPanoplyBuildDirectory ] - else: - printLog(log, "SKIP " + ExportBuildDirectory + "/" + MapPanoplyBuildDirectory + "/*.*") - for sourcePath in sourcePaths: - mkPath(log, sourcePath) - files = os.listdir(sourcePath) - len_tga_png = len(".tga") - len_dds = len(".dds") - for fileName in files: - if isLegalFileName(fileName): - sourceFile = sourcePath + "/" + fileName - if os.path.isfile(sourceFile): - if (fileName[-len_tga_png:].lower() == ".tga") or (fileName[-len_tga_png:].lower() == ".png"): - destFile = destPath + "/" + os.path.basename(fileName)[0:-len_tga_png] + ".dds" - if needUpdateLogRemoveDest(log, sourceFile, destFile): - subprocess.call([ ExecTimeout, str(MapsBuildTimeout), TgaToDds, sourceFile, "-o", destFile, "-m", "-r" + str(ReduceBitmapFactor) ]) - writeTag = 1 - elif fileName[-len_dds:].lower() == ".dds": - copyFileIfNeeded(log, sourceFile, destPath + "/" + os.path.basename(fileName)) - writeTag = 1 - elif not os.path.isdir(sourceFile): - printLog(log, "FAIL ?! file not dir or file ?! " + sourceFile) - if writeTag: - tagFile = open(buildCompressTagPath, "w") - tagFile.write(time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())) + "\n") - tagFile.close() -printLog(log, "") - -if MapHlsBankFileName != None: - printLog(log, ">>> Build the HLSBank <<<") - if HlsBankMaker == "": - toolLogFail(log, HlsBankMakerTool, ToolSuffix) - else: - mkPath(log, ExportBuildDirectory + "/" + MapPanoplyHlsInfoBuildDirectory) - mkPath(log, ExportBuildDirectory + "/" + MapPanoplyHlsBankBuildDirectory) - hlsBankPath = ExportBuildDirectory + "/" + MapPanoplyHlsBankBuildDirectory + "/" + MapHlsBankFileName - if (needUpdate(log, buildPanoplyTagPath, hlsBankPath) or needUpdate(log, buildCompressTagPath, hlsBankPath)): - if os.path.isfile(hlsBankPath): - os.remove(hlsBankPath) - subprocess.call([ HlsBankMaker, ExportBuildDirectory + "/" + MapPanoplyHlsInfoBuildDirectory, hlsBankPath ]) - else: - printLog(log,"SKIP " + hlsBankPath) - printLog(log, "") - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 2_build.py +# \brief Build map +# \date 2009-03-10 13:13GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Build map +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Build map") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +# Find tools +TgaToDds = findTool(log, ToolDirectories, TgaToDdsTool, ToolSuffix) +ExecTimeout = findTool(log, ToolDirectories, ExecTimeoutTool, ToolSuffix) +PanoplyMaker = findTool(log, ToolDirectories, PanoplyMakerTool, ToolSuffix) +HlsBankMaker = findTool(log, ToolDirectories, HlsBankMakerTool, ToolSuffix) +printLog(log, "") + +buildPanoplyTagPath = ExportBuildDirectory + "/" + MapTagBuildDirectory + "/build_panoply.tag" +buildCompressTagPath = ExportBuildDirectory + "/" + MapTagBuildDirectory + "/build_compress.tag" + +if MapPanoplyFileList != None: + printLog(log, ">>> Panoply build <<<") + mkPath(log, ExportBuildDirectory + "/" + MapTagBuildDirectory) + directoriesCheck = [ ] + for panoplyCfg in MapPanoplySourceDirectories: + directoriesCheck += [ panoplyCfg[2] ] + directoriesCheck += [ panoplyCfg[3] ] + if (needUpdateMultiDirNoSubdirFile(log, DatabaseDirectory, directoriesCheck, buildPanoplyTagPath)): + mkPath(log, ActiveProjectDirectory + "/generated") + mkPath(log, ExportBuildDirectory + "/" + MapPanoplyBuildDirectory) + mkPath(log, ExportBuildDirectory + "/" + MapPanoplyHlsInfoBuildDirectory) + mkPath(log, ExportBuildDirectory + "/" + MapPanoplyCacheBuildDirectory) + printLog(log, "") + printLog(log, ">>> Move panoply and hls to cache <<<") + removeFilesDirsRecursive(log, ExportBuildDirectory + "/" + MapPanoplyCacheBuildDirectory) + moveDir(log, ExportBuildDirectory + "/" + MapPanoplyBuildDirectory, ExportBuildDirectory + "/" + MapPanoplyCacheBuildDirectory) + mkPath(log, ExportBuildDirectory + "/" + MapPanoplyBuildDirectory) + moveFilesNoSubdir(log, ExportBuildDirectory + "/" + MapPanoplyHlsInfoBuildDirectory, ExportBuildDirectory + "/" + MapPanoplyCacheBuildDirectory) + printLog(log, "") + for panoplyCfg in MapPanoplySourceDirectories: + printLog(log, ">>> Panoply " + panoplyCfg[1] + " <<<") + mkPath(log, DatabaseDirectory + "/" + panoplyCfg[2]) + mkPath(log, DatabaseDirectory + "/" + panoplyCfg[3]) + cfg = open(ActiveProjectDirectory + "/generated/current_panoply.cfg", "w") + cfgCommon = open(ActiveProjectDirectory + "/" + panoplyCfg[0], "r") + cfgRace = open(ActiveProjectDirectory + "/" + panoplyCfg[1], "r") + cfg.write("\n") + cfg.write("// CURRENT PANOPLY CONFIGURATION\n") + cfg.write("\n") + cfg.write("input_path = \"" + DatabaseDirectory + "/" + panoplyCfg[2] + "\";\n") + cfg.write("additionnal_paths = \"" + DatabaseDirectory + "/" + panoplyCfg[3] + "\";\n") + cfg.write("output_path = \"" + ExportBuildDirectory + "/" + MapPanoplyBuildDirectory + "\";\n") + cfg.write("hls_info_path = \"" + ExportBuildDirectory + "/" + MapPanoplyHlsInfoBuildDirectory + "\";\n") + cfg.write("cache_path = \"" + ExportBuildDirectory + "/" + MapPanoplyCacheBuildDirectory + "\";\n") + cfg.write("\n") + cfg.write("/////////////////////////////////////////////\n") + cfg.write("\n") + for line in cfgCommon: + cfg.write(line) + for line in cfgRace: + cfg.write(line) + cfg.close() + cfgCommon.close() + cfgRace.close() + subprocess.call([ PanoplyMaker, ActiveProjectDirectory + "/generated/current_panoply.cfg" ]) + printLog(log, "") + tagFile = open(buildPanoplyTagPath, "w") + tagFile.write(time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())) + "\n") + tagFile.close() + else: + printLog(log, "SKIP *.*") + printLog(log, "") + +printLog(log, ">>> Compress TGA and PNG maps to DDS <<<") +if TgaToDds == "": + toolLogFail(log, TgaToDdsTool, ToolSuffix) +elif ExecTimeout == "": + toolLogFail(log, ExecTimeoutTool, ToolSuffix) +else: + destPath = ExportBuildDirectory + "/" + MapBuildDirectory + mkPath(log, destPath) + sourcePaths = [ ExportBuildDirectory + "/" + MapExportDirectory ] + writeTag = 0 + if MapPanoplyFileList != None: + if needUpdate(log, buildPanoplyTagPath, buildCompressTagPath): + sourcePaths += [ ExportBuildDirectory + "/" + MapPanoplyBuildDirectory ] + else: + printLog(log, "SKIP " + ExportBuildDirectory + "/" + MapPanoplyBuildDirectory + "/*.*") + for sourcePath in sourcePaths: + mkPath(log, sourcePath) + files = os.listdir(sourcePath) + len_tga_png = len(".tga") + len_dds = len(".dds") + for fileName in files: + if isLegalFileName(fileName): + sourceFile = sourcePath + "/" + fileName + if os.path.isfile(sourceFile): + if (fileName[-len_tga_png:].lower() == ".tga") or (fileName[-len_tga_png:].lower() == ".png"): + destFile = destPath + "/" + os.path.basename(fileName)[0:-len_tga_png] + ".dds" + if needUpdateLogRemoveDest(log, sourceFile, destFile): + subprocess.call([ ExecTimeout, str(MapsBuildTimeout), TgaToDds, sourceFile, "-o", destFile, "-m", "-r" + str(ReduceBitmapFactor) ]) + writeTag = 1 + elif fileName[-len_dds:].lower() == ".dds": + copyFileIfNeeded(log, sourceFile, destPath + "/" + os.path.basename(fileName)) + writeTag = 1 + elif not os.path.isdir(sourceFile): + printLog(log, "FAIL ?! file not dir or file ?! " + sourceFile) + if writeTag: + tagFile = open(buildCompressTagPath, "w") + tagFile.write(time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())) + "\n") + tagFile.close() +printLog(log, "") + +if MapHlsBankFileName != None: + printLog(log, ">>> Build the HLSBank <<<") + if HlsBankMaker == "": + toolLogFail(log, HlsBankMakerTool, ToolSuffix) + else: + mkPath(log, ExportBuildDirectory + "/" + MapPanoplyHlsInfoBuildDirectory) + mkPath(log, ExportBuildDirectory + "/" + MapPanoplyHlsBankBuildDirectory) + hlsBankPath = ExportBuildDirectory + "/" + MapPanoplyHlsBankBuildDirectory + "/" + MapHlsBankFileName + if (needUpdate(log, buildPanoplyTagPath, hlsBankPath) or needUpdate(log, buildCompressTagPath, hlsBankPath)): + if os.path.isfile(hlsBankPath): + os.remove(hlsBankPath) + subprocess.call([ HlsBankMaker, ExportBuildDirectory + "/" + MapPanoplyHlsInfoBuildDirectory, hlsBankPath ]) + else: + printLog(log,"SKIP " + hlsBankPath) + printLog(log, "") + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/map/3_install.py b/code/nel/tools/build_gamedata/processes/map/3_install.py old mode 100755 new mode 100644 index a5a56bb94..fc4c52596 --- a/code/nel/tools/build_gamedata/processes/map/3_install.py +++ b/code/nel/tools/build_gamedata/processes/map/3_install.py @@ -1,91 +1,91 @@ -#!/usr/bin/python -# -# \file 3_install.py -# \brief Install map -# \date 2009-03-10 13:13GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Install map -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Install map") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -installPath = InstallDirectory + "/" + MapInstallDirectory -mkPath(log, installPath) - -printLog(log, ">>> Install map <<<") -sourcePaths = [ ExportBuildDirectory + "/" + MapBuildDirectory ] + [ ExportBuildDirectory + "/" + MapUncompressedExportDirectory ] -for sourcePath in sourcePaths: - mkPath(log, sourcePath) - files = os.listdir(sourcePath) - len_ext = 4 - for fileName in files: - if isLegalFileName(fileName): - sourceFile = sourcePath + "/" + fileName - if os.path.isfile(sourceFile): - if (fileName[-len_ext:].lower() == ".tga") or (fileName[-len_ext:].lower() == ".png") or (fileName[-len_ext:].lower() == ".dds"): - copyFileIfNeeded(log, sourceFile, installPath + "/" + os.path.basename(fileName)) - elif not os.path.isdir(sourceFile): - printLog(log, "FAIL ?! file not dir or file ?! " + sourceFile) - -if MapPanoplyFileList != None: - printLog(log, ">>> Install panoply file list <<<") - buildPanoplyTagPath = ExportBuildDirectory + "/" + MapTagBuildDirectory + "/build_panoply.tag" - mkPath(log, ExportBuildDirectory + "/" + MapTagBuildDirectory) - if needUpdate(log, buildPanoplyTagPath, installPath + "/" + MapPanoplyFileList): - sourcePath = ExportBuildDirectory + "/" + MapPanoplyBuildDirectory - mkPath(log, sourcePath) - printLog(log, "WRITE " + installPath + "/" + MapPanoplyFileList) - lf = open(installPath + "/" + MapPanoplyFileList, "w") - files = os.listdir(sourcePath) - for file in files: - if isLegalFileName(file): - lf.write(file + "\n") - lf.close() - else: - printLog(log, "SKIP " + installPath + "/" + MapPanoplyBuildDirectory) - -if MapHlsBankFileName != None: - printLog(log, ">>> Install map hlsbank <<<") - sourcePath = ExportBuildDirectory + "/" + MapPanoplyHlsBankBuildDirectory - mkPath(log, sourcePath) - copyFilesExtNoSubdirIfNeeded(log, sourcePath, installPath, ".hlsbank") - -printLog(log, "") -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 3_install.py +# \brief Install map +# \date 2009-03-10 13:13GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Install map +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite_local import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Install map") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +installPath = InstallDirectory + "/" + MapInstallDirectory +mkPath(log, installPath) + +printLog(log, ">>> Install map <<<") +sourcePaths = [ ExportBuildDirectory + "/" + MapBuildDirectory ] + [ ExportBuildDirectory + "/" + MapUncompressedExportDirectory ] +for sourcePath in sourcePaths: + mkPath(log, sourcePath) + files = os.listdir(sourcePath) + len_ext = 4 + for fileName in files: + if isLegalFileName(fileName): + sourceFile = sourcePath + "/" + fileName + if os.path.isfile(sourceFile): + if (fileName[-len_ext:].lower() == ".tga") or (fileName[-len_ext:].lower() == ".png") or (fileName[-len_ext:].lower() == ".dds"): + copyFileIfNeeded(log, sourceFile, installPath + "/" + os.path.basename(fileName)) + elif not os.path.isdir(sourceFile): + printLog(log, "FAIL ?! file not dir or file ?! " + sourceFile) + +if MapPanoplyFileList != None: + printLog(log, ">>> Install panoply file list <<<") + buildPanoplyTagPath = ExportBuildDirectory + "/" + MapTagBuildDirectory + "/build_panoply.tag" + mkPath(log, ExportBuildDirectory + "/" + MapTagBuildDirectory) + if needUpdate(log, buildPanoplyTagPath, installPath + "/" + MapPanoplyFileList): + sourcePath = ExportBuildDirectory + "/" + MapPanoplyBuildDirectory + mkPath(log, sourcePath) + printLog(log, "WRITE " + installPath + "/" + MapPanoplyFileList) + lf = open(installPath + "/" + MapPanoplyFileList, "w") + files = os.listdir(sourcePath) + for file in files: + if isLegalFileName(file): + lf.write(file + "\n") + lf.close() + else: + printLog(log, "SKIP " + installPath + "/" + MapPanoplyBuildDirectory) + +if MapHlsBankFileName != None: + printLog(log, ">>> Install map hlsbank <<<") + sourcePath = ExportBuildDirectory + "/" + MapPanoplyHlsBankBuildDirectory + mkPath(log, sourcePath) + copyFilesExtNoSubdirIfNeeded(log, sourcePath, installPath, ".hlsbank") + +printLog(log, "") +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/pacs_prim/0_setup.py b/code/nel/tools/build_gamedata/processes/pacs_prim/0_setup.py old mode 100755 new mode 100644 index e9bdb5918..56e26a000 --- a/code/nel/tools/build_gamedata/processes/pacs_prim/0_setup.py +++ b/code/nel/tools/build_gamedata/processes/pacs_prim/0_setup.py @@ -1,65 +1,65 @@ -#!/usr/bin/python -# -# \file 0_setup.py -# \brief setup pacs_prim -# \date 2010-08-31 16:50GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Setup pacs_prim -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Setup pacs_prim") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -# Setup source directories -printLog(log, ">>> Setup source directories <<<") -for dir in PacsPrimSourceDirectories: - mkPath(log, DatabaseDirectory + "/" + dir) - -# Setup export directories -printLog(log, ">>> Setup export directories <<<") -mkPath(log, ExportBuildDirectory + "/" + PacsPrimExportDirectory) - -# Setup build directories -printLog(log, ">>> Setup build directories <<<") - -# Setup client directories -printLog(log, ">>> Setup client directories <<<") -mkPath(log, InstallDirectory + "/" + PacsPrimInstallDirectory) - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 0_setup.py +# \brief setup pacs_prim +# \date 2010-08-31 16:50GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Setup pacs_prim +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Setup pacs_prim") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +# Setup source directories +printLog(log, ">>> Setup source directories <<<") +for dir in PacsPrimSourceDirectories: + mkPath(log, DatabaseDirectory + "/" + dir) + +# Setup export directories +printLog(log, ">>> Setup export directories <<<") +mkPath(log, ExportBuildDirectory + "/" + PacsPrimExportDirectory) + +# Setup build directories +printLog(log, ">>> Setup build directories <<<") + +# Setup client directories +printLog(log, ">>> Setup client directories <<<") +mkPath(log, InstallDirectory + "/" + PacsPrimInstallDirectory) + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/pacs_prim/1_export.py b/code/nel/tools/build_gamedata/processes/pacs_prim/1_export.py old mode 100755 new mode 100644 index cfb46635f..32a537787 --- a/code/nel/tools/build_gamedata/processes/pacs_prim/1_export.py +++ b/code/nel/tools/build_gamedata/processes/pacs_prim/1_export.py @@ -1,146 +1,146 @@ -#!/usr/bin/python -# -# ################################################################# -# ## WARNING : this is a generated file, don't change it ! -# ################################################################# -# -# \file 1_export.py -# \brief Export pacs_prim -# \date 2015-01-06-16-31-GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Export pacs_prim -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -import time, sys, os, shutil, subprocess, distutils.dir_util -sys.path.append("../../configuration") - -if os.path.isfile("log.log"): - os.remove("log.log") -if os.path.isfile("temp_log.log"): - os.remove("temp_log.log") -log = open("temp_log.log", "w") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Export pacs_prim") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - - -# Find tools -# ... - -# Export pacs_prim 3dsmax -if MaxAvailable: - # Find tools - Max = findMax(log, MaxDirectory, MaxExecutable) - printLog(log, "") - - printLog(log, ">>> Export pacs_prim 3dsmax <<<") - mkPath(log, ExportBuildDirectory + "/" + PacsPrimExportDirectory) - mkPath(log, ExportBuildDirectory + "/" + PacsPrimTagExportDirectory) - for dir in PacsPrimSourceDirectories: - mkPath(log, DatabaseDirectory + "/" + dir) - if (needUpdateDirByTagLog(log, DatabaseDirectory + "/" + dir, ".max", ExportBuildDirectory + "/" + PacsPrimTagExportDirectory, ".max.tag")): - scriptSrc = "maxscript/pacs_prim_export.ms" - scriptDst = MaxUserDirectory + "/scripts/pacs_prim_export.ms" - outputLogfile = ScriptDirectory + "/processes/pacs_prim/log.log" - outputDirectory = ExportBuildDirectory + "/" + PacsPrimExportDirectory - tagDirectory = ExportBuildDirectory + "/" + PacsPrimTagExportDirectory - maxSourceDir = DatabaseDirectory + "/" + dir - maxRunningTagFile = tagDirectory + "/max_running.tag" - tagList = findFiles(log, tagDirectory, "", ".max.tag") - tagLen = len(tagList) - if os.path.isfile(scriptDst): - os.remove(scriptDst) - tagDiff = 1 - sSrc = open(scriptSrc, "r") - sDst = open(scriptDst, "w") - for line in sSrc: - newline = line.replace("%OutputLogfile%", outputLogfile) - newline = newline.replace("%MaxSourceDirectory%", maxSourceDir) - newline = newline.replace("%OutputDirectory%", outputDirectory) - newline = newline.replace("%TagDirectory%", tagDirectory) - sDst.write(newline) - sSrc.close() - sDst.close() - zeroRetryLimit = 3 - while tagDiff > 0: - mrt = open(maxRunningTagFile, "w") - mrt.write("moe-moe-kyun") - mrt.close() - printLog(log, "MAXSCRIPT " + scriptDst) - subprocess.call([ Max, "-U", "MAXScript", "pacs_prim_export.ms", "-q", "-mi", "-mip" ]) - if os.path.exists(outputLogfile): - try: - lSrc = open(outputLogfile, "r") - for line in lSrc: - lineStrip = line.strip() - if (len(lineStrip) > 0): - printLog(log, lineStrip) - lSrc.close() - os.remove(outputLogfile) - except Exception: - printLog(log, "ERROR Failed to read 3dsmax log") - else: - printLog(log, "WARNING No 3dsmax log") - tagList = findFiles(log, tagDirectory, "", ".max.tag") - newTagLen = len(tagList) - tagDiff = newTagLen - tagLen - tagLen = newTagLen - addTagDiff = 0 - if os.path.exists(maxRunningTagFile): - printLog(log, "FAIL 3ds Max crashed and/or file export failed!") - if tagDiff == 0: - if zeroRetryLimit > 0: - zeroRetryLimit = zeroRetryLimit - 1 - addTagDiff = 1 - else: - printLog(log, "FAIL Retry limit reached!") - else: - addTagDiff = 1 - os.remove(maxRunningTagFile) - printLog(log, "Exported " + str(tagDiff) + " .max files!") - tagDiff += addTagDiff - os.remove(scriptDst) - printLog(log, "") - - - -# Remove bad file from previous script version -listPath = ExportBuildDirectory + "/" + PacsPrimExportDirectory + "/landscape_col_prim_pacs_list.txt" -if os.path.isfile(listPath): - os.remove(listPath) - - - -log.close() -if os.path.isfile("log.log"): - os.remove("log.log") -shutil.move("temp_log.log", "log.log") - - -# end of file +#!/usr/bin/python +# +# ################################################################# +# ## WARNING : this is a generated file, don't change it ! +# ################################################################# +# +# \file 1_export.py +# \brief Export pacs_prim +# \date 2015-01-06-16-31-GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Export pacs_prim +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +import time, sys, os, shutil, subprocess, distutils.dir_util +sys.path.append("../../configuration") + +if os.path.isfile("log.log"): + os.remove("log.log") +if os.path.isfile("temp_log.log"): + os.remove("temp_log.log") +log = open("temp_log.log", "w") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Export pacs_prim") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + + +# Find tools +# ... + +# Export pacs_prim 3dsmax +if MaxAvailable: + # Find tools + Max = findMax(log, MaxDirectory, MaxExecutable) + printLog(log, "") + + printLog(log, ">>> Export pacs_prim 3dsmax <<<") + mkPath(log, ExportBuildDirectory + "/" + PacsPrimExportDirectory) + mkPath(log, ExportBuildDirectory + "/" + PacsPrimTagExportDirectory) + for dir in PacsPrimSourceDirectories: + mkPath(log, DatabaseDirectory + "/" + dir) + if (needUpdateDirByTagLog(log, DatabaseDirectory + "/" + dir, ".max", ExportBuildDirectory + "/" + PacsPrimTagExportDirectory, ".max.tag")): + scriptSrc = "maxscript/pacs_prim_export.ms" + scriptDst = MaxUserDirectory + "/scripts/pacs_prim_export.ms" + outputLogfile = ScriptDirectory + "/processes/pacs_prim/log.log" + outputDirectory = ExportBuildDirectory + "/" + PacsPrimExportDirectory + tagDirectory = ExportBuildDirectory + "/" + PacsPrimTagExportDirectory + maxSourceDir = DatabaseDirectory + "/" + dir + maxRunningTagFile = tagDirectory + "/max_running.tag" + tagList = findFiles(log, tagDirectory, "", ".max.tag") + tagLen = len(tagList) + if os.path.isfile(scriptDst): + os.remove(scriptDst) + tagDiff = 1 + sSrc = open(scriptSrc, "r") + sDst = open(scriptDst, "w") + for line in sSrc: + newline = line.replace("%OutputLogfile%", outputLogfile) + newline = newline.replace("%MaxSourceDirectory%", maxSourceDir) + newline = newline.replace("%OutputDirectory%", outputDirectory) + newline = newline.replace("%TagDirectory%", tagDirectory) + sDst.write(newline) + sSrc.close() + sDst.close() + zeroRetryLimit = 3 + while tagDiff > 0: + mrt = open(maxRunningTagFile, "w") + mrt.write("moe-moe-kyun") + mrt.close() + printLog(log, "MAXSCRIPT " + scriptDst) + subprocess.call([ Max, "-U", "MAXScript", "pacs_prim_export.ms", "-q", "-mi", "-mip" ]) + if os.path.exists(outputLogfile): + try: + lSrc = open(outputLogfile, "r") + for line in lSrc: + lineStrip = line.strip() + if (len(lineStrip) > 0): + printLog(log, lineStrip) + lSrc.close() + os.remove(outputLogfile) + except Exception: + printLog(log, "ERROR Failed to read 3dsmax log") + else: + printLog(log, "WARNING No 3dsmax log") + tagList = findFiles(log, tagDirectory, "", ".max.tag") + newTagLen = len(tagList) + tagDiff = newTagLen - tagLen + tagLen = newTagLen + addTagDiff = 0 + if os.path.exists(maxRunningTagFile): + printLog(log, "FAIL 3ds Max crashed and/or file export failed!") + if tagDiff == 0: + if zeroRetryLimit > 0: + zeroRetryLimit = zeroRetryLimit - 1 + addTagDiff = 1 + else: + printLog(log, "FAIL Retry limit reached!") + else: + addTagDiff = 1 + os.remove(maxRunningTagFile) + printLog(log, "Exported " + str(tagDiff) + " .max files!") + tagDiff += addTagDiff + os.remove(scriptDst) + printLog(log, "") + + + +# Remove bad file from previous script version +listPath = ExportBuildDirectory + "/" + PacsPrimExportDirectory + "/landscape_col_prim_pacs_list.txt" +if os.path.isfile(listPath): + os.remove(listPath) + + + +log.close() +if os.path.isfile("log.log"): + os.remove("log.log") +shutil.move("temp_log.log", "log.log") + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/pacs_prim/2_build.py b/code/nel/tools/build_gamedata/processes/pacs_prim/2_build.py old mode 100755 new mode 100644 index d50aa6b8c..f863e6df2 --- a/code/nel/tools/build_gamedata/processes/pacs_prim/2_build.py +++ b/code/nel/tools/build_gamedata/processes/pacs_prim/2_build.py @@ -1,49 +1,49 @@ -#!/usr/bin/python -# -# \file 2_build.py -# \brief Build pacs_prim -# \date 2010-08-31 16:50GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Build pacs_prim -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Build pacs_prim") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 2_build.py +# \brief Build pacs_prim +# \date 2010-08-31 16:50GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Build pacs_prim +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Build pacs_prim") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/pacs_prim/3_install.py b/code/nel/tools/build_gamedata/processes/pacs_prim/3_install.py old mode 100755 new mode 100644 index da932c469..ef3b34978 --- a/code/nel/tools/build_gamedata/processes/pacs_prim/3_install.py +++ b/code/nel/tools/build_gamedata/processes/pacs_prim/3_install.py @@ -1,57 +1,57 @@ -#!/usr/bin/python -# -# \file 3_install.py -# \brief Install pacs_prim -# \date 2010-08-31 16:50GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Install pacs_prim -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Install pacs_prim") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -installPath = InstallDirectory + "/" + PacsPrimInstallDirectory -mkPath(log, installPath) - -printLog(log, ">>> Install pacs_prim <<<") -mkPath(log, ExportBuildDirectory + "/" + PacsPrimExportDirectory) -copyFilesExtNoSubdirIfNeeded(log, ExportBuildDirectory + "/" + PacsPrimExportDirectory, installPath, ".pacs_prim") - -printLog(log, "") -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 3_install.py +# \brief Install pacs_prim +# \date 2010-08-31 16:50GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Install pacs_prim +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite_local import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Install pacs_prim") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +installPath = InstallDirectory + "/" + PacsPrimInstallDirectory +mkPath(log, installPath) + +printLog(log, ">>> Install pacs_prim <<<") +mkPath(log, ExportBuildDirectory + "/" + PacsPrimExportDirectory) +copyFilesExtNoSubdirIfNeeded(log, ExportBuildDirectory + "/" + PacsPrimExportDirectory, installPath, ".pacs_prim") + +printLog(log, "") +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/pacs_prim/maxscript/pacs_prim_export.ms b/code/nel/tools/build_gamedata/processes/pacs_prim/maxscript/pacs_prim_export.ms old mode 100755 new mode 100644 diff --git a/code/nel/tools/build_gamedata/processes/pacs_prim_list/0_setup.py b/code/nel/tools/build_gamedata/processes/pacs_prim_list/0_setup.py old mode 100755 new mode 100644 index 6be8fbea3..7bed34207 --- a/code/nel/tools/build_gamedata/processes/pacs_prim_list/0_setup.py +++ b/code/nel/tools/build_gamedata/processes/pacs_prim_list/0_setup.py @@ -1,62 +1,62 @@ -#!/usr/bin/python -# -# \file 0_setup.py -# \brief setup pacs_prim_list -# \date 2011-09-28 7:22GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Setup pacs_prim_list -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Setup pacs_prim_list") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -# Setup source directories -printLog(log, ">>> Setup source directories <<<") -for dir in PacsPrimExportSourceDirectories: - mkPath(log, ExportBuildDirectory + "/" + dir) - -# Setup build directories -printLog(log, ">>> Setup build directories <<<") -mkPath(log, ExportBuildDirectory + "/" + PacsPrimListBuildDirectory) - -# Setup client directories -printLog(log, ">>> Setup client directories <<<") -mkPath(log, InstallDirectory + "/" + PacsPrimListInstallDirectory) - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 0_setup.py +# \brief setup pacs_prim_list +# \date 2011-09-28 7:22GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Setup pacs_prim_list +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Setup pacs_prim_list") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +# Setup source directories +printLog(log, ">>> Setup source directories <<<") +for dir in PacsPrimExportSourceDirectories: + mkPath(log, ExportBuildDirectory + "/" + dir) + +# Setup build directories +printLog(log, ">>> Setup build directories <<<") +mkPath(log, ExportBuildDirectory + "/" + PacsPrimListBuildDirectory) + +# Setup client directories +printLog(log, ">>> Setup client directories <<<") +mkPath(log, InstallDirectory + "/" + PacsPrimListInstallDirectory) + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/pacs_prim_list/1_export.py b/code/nel/tools/build_gamedata/processes/pacs_prim_list/1_export.py old mode 100755 new mode 100644 index 3f250406b..ac3a7aeaf --- a/code/nel/tools/build_gamedata/processes/pacs_prim_list/1_export.py +++ b/code/nel/tools/build_gamedata/processes/pacs_prim_list/1_export.py @@ -1,53 +1,53 @@ -#!/usr/bin/python -# -# \file 1_export.py -# \brief Export pacs_prim_list -# \date 2011-09-28 7:22GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Export pacs_prim_list -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Export pacs_prim_list") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -printLog(log, ">>> Nothing to do! <<<") - -printLog(log, "") - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 1_export.py +# \brief Export pacs_prim_list +# \date 2011-09-28 7:22GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Export pacs_prim_list +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Export pacs_prim_list") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +printLog(log, ">>> Nothing to do! <<<") + +printLog(log, "") + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/pacs_prim_list/2_build.py b/code/nel/tools/build_gamedata/processes/pacs_prim_list/2_build.py old mode 100755 new mode 100644 index 3c1f3cdbb..a7d5599ce --- a/code/nel/tools/build_gamedata/processes/pacs_prim_list/2_build.py +++ b/code/nel/tools/build_gamedata/processes/pacs_prim_list/2_build.py @@ -1,63 +1,63 @@ -#!/usr/bin/python -# -# \file 2_build.py -# \brief Build pacs_prim_list -# \date 2011-09-28 7:22GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Build pacs_prim_list -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Build pacs_prim_list") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -printLog(log, ">>> List pacs_prim <<<") -listPath = ExportBuildDirectory + "/" + PacsPrimListBuildDirectory + "/landscape_col_prim_pacs_list.txt" -if os.path.isfile(listPath): - os.remove(listPath) -listFile = open(listPath, "w") -printLog(log, "WRITE " + listPath) -for dir in PacsPrimExportSourceDirectories: - outDirPacsPrim = ExportBuildDirectory + "/" + dir - mkPath(log, outDirPacsPrim) - exportedPacsPrims = findFiles(log, outDirPacsPrim, "", ".pacs_prim") - for exported in exportedPacsPrims: - listFile.write(exported + "\n") -listFile.close() - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 2_build.py +# \brief Build pacs_prim_list +# \date 2011-09-28 7:22GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Build pacs_prim_list +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Build pacs_prim_list") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +printLog(log, ">>> List pacs_prim <<<") +listPath = ExportBuildDirectory + "/" + PacsPrimListBuildDirectory + "/landscape_col_prim_pacs_list.txt" +if os.path.isfile(listPath): + os.remove(listPath) +listFile = open(listPath, "w") +printLog(log, "WRITE " + listPath) +for dir in PacsPrimExportSourceDirectories: + outDirPacsPrim = ExportBuildDirectory + "/" + dir + mkPath(log, outDirPacsPrim) + exportedPacsPrims = findFiles(log, outDirPacsPrim, "", ".pacs_prim") + for exported in exportedPacsPrims: + listFile.write(exported + "\n") +listFile.close() + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/pacs_prim_list/3_install.py b/code/nel/tools/build_gamedata/processes/pacs_prim_list/3_install.py old mode 100755 new mode 100644 index 73656122c..df218c9f7 --- a/code/nel/tools/build_gamedata/processes/pacs_prim_list/3_install.py +++ b/code/nel/tools/build_gamedata/processes/pacs_prim_list/3_install.py @@ -1,55 +1,55 @@ -#!/usr/bin/python -# -# \file 3_install.py -# \brief Install pacs_prim_list -# \date 2011-09-28 7:22GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Install pacs_prim_list -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Install pacs_prim_list") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -printLog(log, ">>> Install pacs_prim_list <<<") -installPath = InstallDirectory + "/" + PacsPrimListInstallDirectory -mkPath(log, installPath) -copyFileIfNeeded(log, ExportBuildDirectory + "/" + PacsPrimListBuildDirectory + "/landscape_col_prim_pacs_list.txt", installPath + "/landscape_col_prim_pacs_list.txt") - -printLog(log, "") -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 3_install.py +# \brief Install pacs_prim_list +# \date 2011-09-28 7:22GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Install pacs_prim_list +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite_local import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Install pacs_prim_list") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +printLog(log, ">>> Install pacs_prim_list <<<") +installPath = InstallDirectory + "/" + PacsPrimListInstallDirectory +mkPath(log, installPath) +copyFileIfNeeded(log, ExportBuildDirectory + "/" + PacsPrimListBuildDirectory + "/landscape_col_prim_pacs_list.txt", installPath + "/landscape_col_prim_pacs_list.txt") + +printLog(log, "") +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/properties/0_setup.py b/code/nel/tools/build_gamedata/processes/properties/0_setup.py old mode 100755 new mode 100644 index b6114d5b2..538cdffd5 --- a/code/nel/tools/build_gamedata/processes/properties/0_setup.py +++ b/code/nel/tools/build_gamedata/processes/properties/0_setup.py @@ -1,141 +1,141 @@ -#!/usr/bin/python -# -# \file 0_setup.py -# \brief setup properties -# \date 2010-05-24 13:42GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Setup properties -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Setup properties") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - - - -mkPath(log, ActiveProjectDirectory + "/generated") -zlp = open(ActiveProjectDirectory + "/generated/properties.cfg", "w") -zlp.write("\n") -zlp.write("// Search pathes\n") -zlp.write("search_pathes = \n") -zlp.write("{\n") -for searchPath in PropertiesExportBuildSearchPaths: - zlp.write("\t\"" + ExportBuildDirectory + "/" + searchPath + "\",\n") -zlp.write("};\n") -zlp.write("\n") -ps = open(ActiveProjectDirectory + "/properties_base.cfg", "r") -for line in ps: - try: - SmallbankExportDirectory - except NameError: - SmallbankExportDirectory = "_invalid" - try: - FarbankBuildDirectory - except NameError: - FarbankBuildDirectory = "_invalid" - try: - EcosystemName - except NameError: - EcosystemName = "_invalid" - try: - EcosystemPath - except NameError: - EcosystemPath = "_invalid" - try: - ContinentName - except NameError: - ContinentName = "_invalid" - try: - ContinentPath - except NameError: - ContinentPath = "_invalid" - try: - ContinentSheet - except NameError: - ContinentSheet = ContinentName - try: - BankTileBankName - except NameError: - BankTileBankName = "_invalid" - try: - IgLandBuildDirectory - except NameError: - IgLandBuildDirectory = "_invalid" - try: - IgOtherBuildDirectory - except NameError: - IgOtherBuildDirectory = "_invalid" - try: - RbankOutputBuildDirectory - except NameError: - RbankOutputBuildDirectory = "_invalid" - try: - RbankRbankName - except NameError: - RbankRbankName = "_invalid" - newline = line.replace("%ExportBuildDirectory%", ExportBuildDirectory) - newline = newline.replace("%LeveldesignDirectory%", LeveldesignDirectory) - newline = newline.replace("%LeveldesignWorldDirectory%", LeveldesignWorldDirectory) - newline = newline.replace("%LeveldesignDfnDirectory%", LeveldesignDfnDirectory) - newline = newline.replace("%SmallbankExportDirectory%", SmallbankExportDirectory) - newline = newline.replace("%FarbankBuildDirectory%", FarbankBuildDirectory) - newline = newline.replace("%EcosystemName%", EcosystemName) - newline = newline.replace("%EcosystemPath%", EcosystemPath) - newline = newline.replace("%ContinentName%", ContinentName) - newline = newline.replace("%ContinentPath%", ContinentPath) - newline = newline.replace("%CommonName%", CommonName) - newline = newline.replace("%CommonPath%", CommonPath) - newline = newline.replace("%ContinentSheet%", ContinentSheet) - newline = newline.replace("%BankTileBankName%", BankTileBankName) - newline = newline.replace("%IgLandBuildDirectory%", IgLandBuildDirectory) - newline = newline.replace("%IgOtherBuildDirectory%", IgOtherBuildDirectory) - newline = newline.replace("%RbankOutputBuildDirectory%", RbankOutputBuildDirectory) - newline = newline.replace("%RbankRbankName%", RbankRbankName) - newline = newline.replace("%BuildQuality%", str(BuildQuality)) - zlp.write(newline) -ps.close() -if (BuildQuality == 1): - ps = open(ActiveProjectDirectory + "/properties_final.cfg", "r") -else: - ps = open(ActiveProjectDirectory + "/properties_draft.cfg", "r") -for line in ps: - zlp.write(line) -zlp.close() -printLog(log, "") - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 0_setup.py +# \brief setup properties +# \date 2010-05-24 13:42GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Setup properties +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Setup properties") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + + + +mkPath(log, ActiveProjectDirectory + "/generated") +zlp = open(ActiveProjectDirectory + "/generated/properties.cfg", "w") +zlp.write("\n") +zlp.write("// Search pathes\n") +zlp.write("search_pathes = \n") +zlp.write("{\n") +for searchPath in PropertiesExportBuildSearchPaths: + zlp.write("\t\"" + ExportBuildDirectory + "/" + searchPath + "\",\n") +zlp.write("};\n") +zlp.write("\n") +ps = open(ActiveProjectDirectory + "/properties_base.cfg", "r") +for line in ps: + try: + SmallbankExportDirectory + except NameError: + SmallbankExportDirectory = "_invalid" + try: + FarbankBuildDirectory + except NameError: + FarbankBuildDirectory = "_invalid" + try: + EcosystemName + except NameError: + EcosystemName = "_invalid" + try: + EcosystemPath + except NameError: + EcosystemPath = "_invalid" + try: + ContinentName + except NameError: + ContinentName = "_invalid" + try: + ContinentPath + except NameError: + ContinentPath = "_invalid" + try: + ContinentSheet + except NameError: + ContinentSheet = ContinentName + try: + BankTileBankName + except NameError: + BankTileBankName = "_invalid" + try: + IgLandBuildDirectory + except NameError: + IgLandBuildDirectory = "_invalid" + try: + IgOtherBuildDirectory + except NameError: + IgOtherBuildDirectory = "_invalid" + try: + RbankOutputBuildDirectory + except NameError: + RbankOutputBuildDirectory = "_invalid" + try: + RbankRbankName + except NameError: + RbankRbankName = "_invalid" + newline = line.replace("%ExportBuildDirectory%", ExportBuildDirectory) + newline = newline.replace("%LeveldesignDirectory%", LeveldesignDirectory) + newline = newline.replace("%LeveldesignWorldDirectory%", LeveldesignWorldDirectory) + newline = newline.replace("%LeveldesignDfnDirectory%", LeveldesignDfnDirectory) + newline = newline.replace("%SmallbankExportDirectory%", SmallbankExportDirectory) + newline = newline.replace("%FarbankBuildDirectory%", FarbankBuildDirectory) + newline = newline.replace("%EcosystemName%", EcosystemName) + newline = newline.replace("%EcosystemPath%", EcosystemPath) + newline = newline.replace("%ContinentName%", ContinentName) + newline = newline.replace("%ContinentPath%", ContinentPath) + newline = newline.replace("%CommonName%", CommonName) + newline = newline.replace("%CommonPath%", CommonPath) + newline = newline.replace("%ContinentSheet%", ContinentSheet) + newline = newline.replace("%BankTileBankName%", BankTileBankName) + newline = newline.replace("%IgLandBuildDirectory%", IgLandBuildDirectory) + newline = newline.replace("%IgOtherBuildDirectory%", IgOtherBuildDirectory) + newline = newline.replace("%RbankOutputBuildDirectory%", RbankOutputBuildDirectory) + newline = newline.replace("%RbankRbankName%", RbankRbankName) + newline = newline.replace("%BuildQuality%", str(BuildQuality)) + zlp.write(newline) +ps.close() +if (BuildQuality == 1): + ps = open(ActiveProjectDirectory + "/properties_final.cfg", "r") +else: + ps = open(ActiveProjectDirectory + "/properties_draft.cfg", "r") +for line in ps: + zlp.write(line) +zlp.close() +printLog(log, "") + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/properties/1_export.py b/code/nel/tools/build_gamedata/processes/properties/1_export.py old mode 100755 new mode 100644 index 809dc440c..13c27b260 --- a/code/nel/tools/build_gamedata/processes/properties/1_export.py +++ b/code/nel/tools/build_gamedata/processes/properties/1_export.py @@ -1,44 +1,44 @@ -#!/usr/bin/python -# -# \file 1_export.py -# \brief Export properties -# \date 2010-05-24 13:42GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Export properties -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 1_export.py +# \brief Export properties +# \date 2010-05-24 13:42GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Export properties +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/properties/2_build.py b/code/nel/tools/build_gamedata/processes/properties/2_build.py old mode 100755 new mode 100644 index 721d58174..53ef2c331 --- a/code/nel/tools/build_gamedata/processes/properties/2_build.py +++ b/code/nel/tools/build_gamedata/processes/properties/2_build.py @@ -1,42 +1,42 @@ -#!/usr/bin/python -# -# \file 2_build.py -# \brief Build properties -# \date 2010-05-24 13:42GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Build properties -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 2_build.py +# \brief Build properties +# \date 2010-05-24 13:42GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Build properties +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/properties/3_install.py b/code/nel/tools/build_gamedata/processes/properties/3_install.py old mode 100755 new mode 100644 index 79da071c0..b18ecadf5 --- a/code/nel/tools/build_gamedata/processes/properties/3_install.py +++ b/code/nel/tools/build_gamedata/processes/properties/3_install.py @@ -1,43 +1,43 @@ -#!/usr/bin/python -# -# \file 3_install.py -# \brief Install properties -# \date 2010-05-24 13:42GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Install properties -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 3_install.py +# \brief Install properties +# \date 2010-05-24 13:42GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Install properties +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite_local import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/ps/0_setup.py b/code/nel/tools/build_gamedata/processes/ps/0_setup.py old mode 100755 new mode 100644 index c602cb8fe..34dffa5fe --- a/code/nel/tools/build_gamedata/processes/ps/0_setup.py +++ b/code/nel/tools/build_gamedata/processes/ps/0_setup.py @@ -1,65 +1,65 @@ -#!/usr/bin/python -# -# \file 0_setup.py -# \brief setup ps -# \date 2010-05-24 13:42GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Setup ps -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Setup ps") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -# Setup source directories -printLog(log, ">>> Setup source directories <<<") -for dir in PsSourceDirectories: - mkPath(log, DatabaseDirectory + "/" + dir) - -# Setup export directories -printLog(log, ">>> Setup export directories <<<") -mkPath(log, ExportBuildDirectory + "/" + PsExportDirectory) - -# Setup build directories -printLog(log, ">>> Setup build directories <<<") - -# Setup client directories -printLog(log, ">>> Setup client directories <<<") -mkPath(log, InstallDirectory + "/" + PsInstallDirectory) - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 0_setup.py +# \brief setup ps +# \date 2010-05-24 13:42GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Setup ps +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Setup ps") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +# Setup source directories +printLog(log, ">>> Setup source directories <<<") +for dir in PsSourceDirectories: + mkPath(log, DatabaseDirectory + "/" + dir) + +# Setup export directories +printLog(log, ">>> Setup export directories <<<") +mkPath(log, ExportBuildDirectory + "/" + PsExportDirectory) + +# Setup build directories +printLog(log, ">>> Setup build directories <<<") + +# Setup client directories +printLog(log, ">>> Setup client directories <<<") +mkPath(log, InstallDirectory + "/" + PsInstallDirectory) + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/ps/1_export.py b/code/nel/tools/build_gamedata/processes/ps/1_export.py old mode 100755 new mode 100644 index e30385335..a73f82bef --- a/code/nel/tools/build_gamedata/processes/ps/1_export.py +++ b/code/nel/tools/build_gamedata/processes/ps/1_export.py @@ -1,60 +1,60 @@ -#!/usr/bin/python -# -# \file 1_export.py -# \brief Export ps -# \date 2010-05-24 13:42GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Export ps -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Export ps") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -# For each ps directory -printLog(log, ">>> Export ps 3dsmax <<<") -mkPath(log, ExportBuildDirectory + "/" + PsExportDirectory) -for dir in PsSourceDirectories: - mkPath(log, DatabaseDirectory + "/" + dir) - copyFilesExtNoSubdirIfNeeded(log, DatabaseDirectory + "/" + dir, ExportBuildDirectory + "/" + PsExportDirectory, ".ps") - copyFilesExtNoSubdirIfNeeded(log, DatabaseDirectory + "/" + dir, ExportBuildDirectory + "/" + PsExportDirectory, ".shape") - copyFilesExtNoSubdirIfNeeded(log, DatabaseDirectory + "/" + dir, ExportBuildDirectory + "/" + PsExportDirectory, ".primitive") - -printLog(log, "") - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 1_export.py +# \brief Export ps +# \date 2010-05-24 13:42GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Export ps +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Export ps") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +# For each ps directory +printLog(log, ">>> Export ps 3dsmax <<<") +mkPath(log, ExportBuildDirectory + "/" + PsExportDirectory) +for dir in PsSourceDirectories: + mkPath(log, DatabaseDirectory + "/" + dir) + copyFilesExtNoSubdirIfNeeded(log, DatabaseDirectory + "/" + dir, ExportBuildDirectory + "/" + PsExportDirectory, ".ps") + copyFilesExtNoSubdirIfNeeded(log, DatabaseDirectory + "/" + dir, ExportBuildDirectory + "/" + PsExportDirectory, ".shape") + copyFilesExtNoSubdirIfNeeded(log, DatabaseDirectory + "/" + dir, ExportBuildDirectory + "/" + PsExportDirectory, ".primitive") + +printLog(log, "") + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/ps/2_build.py b/code/nel/tools/build_gamedata/processes/ps/2_build.py old mode 100755 new mode 100644 index 71c45e42b..f7bee7b53 --- a/code/nel/tools/build_gamedata/processes/ps/2_build.py +++ b/code/nel/tools/build_gamedata/processes/ps/2_build.py @@ -1,49 +1,49 @@ -#!/usr/bin/python -# -# \file 2_build.py -# \brief Build ps -# \date 2010-05-24 13:42GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Build ps -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Build ps") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 2_build.py +# \brief Build ps +# \date 2010-05-24 13:42GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Build ps +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Build ps") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/ps/3_install.py b/code/nel/tools/build_gamedata/processes/ps/3_install.py old mode 100755 new mode 100644 index 56713d999..8190c83bc --- a/code/nel/tools/build_gamedata/processes/ps/3_install.py +++ b/code/nel/tools/build_gamedata/processes/ps/3_install.py @@ -1,57 +1,57 @@ -#!/usr/bin/python -# -# \file 3_install.py -# \brief Install ps -# \date 2010-05-24 13:42GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Install ps -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Install ps") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -printLog(log, ">>> Install ps <<<") -srcDir = ExportBuildDirectory + "/" + PsExportDirectory -mkPath(log, srcDir) -destDir = InstallDirectory + "/" + PsInstallDirectory -mkPath(log, destDir) -copyFilesNoTreeIfNeeded(log, srcDir, destDir) - -printLog(log, "") -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 3_install.py +# \brief Install ps +# \date 2010-05-24 13:42GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Install ps +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite_local import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Install ps") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +printLog(log, ">>> Install ps <<<") +srcDir = ExportBuildDirectory + "/" + PsExportDirectory +mkPath(log, srcDir) +destDir = InstallDirectory + "/" + PsInstallDirectory +mkPath(log, destDir) +copyFilesNoTreeIfNeeded(log, srcDir, destDir) + +printLog(log, "") +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/pz/0_setup.py b/code/nel/tools/build_gamedata/processes/pz/0_setup.py index e9f22be11..528c5ee84 100644 --- a/code/nel/tools/build_gamedata/processes/pz/0_setup.py +++ b/code/nel/tools/build_gamedata/processes/pz/0_setup.py @@ -1,97 +1,100 @@ -#!/usr/bin/python -# -# \file 0_setup.py -# \brief setup pz -# \date 2014-09-13 13:32GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Setup pz -# -# NeL - MMORPG Framework -# Copyright (C) 2014 Jan BOON -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Setup pz") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -# Setup build directories -printLog(log, ">>> Setup build directories <<<") -mkPath(log, ExportBuildDirectory + "/" + PackedZoneCacheBuildDirectory) -mkPath(log, ExportBuildDirectory + "/" + PackedZoneCWMapCacheBuildDirectory) -mkPath(log, ExportBuildDirectory + "/" + PackedZoneBuildDirectory) - -# Setup lookup directories -printLog(log, ">>> Setup lookup directories <<<") -mkPath(log, ExportBuildDirectory + "/" + AiWmapBuildDirectory) -mkPath(log, ExportBuildDirectory + "/" + ZoneLightBuildDirectory) -mkPath(log, LeveldesignDataCommonDirectory) - -# Setup client directories -printLog(log, ">>> Setup install directories <<<") -mkPath(log, InstallDirectory + "/" + PackedZoneInstallDirectory) - -# Setup client directories -printLog(log, ">>> Setup configuration <<<") -mkPath(log, ActiveProjectDirectory + "/generated") -cfg = open(ActiveProjectDirectory + "/generated/build_world_packed_col.cfg", "w") -cfg.write("\n") -cfg.write("// BUILD WORLD PACKED COL CONFIGURATION\n") -cfg.write("\n") -cfg.write("SearchPaths = {\n") -cfg.write("\t\"" + ExportBuildDirectory + "/" + AiWmapBuildDirectory + "\", \n") -cfg.write("\t\"" + ExportBuildDirectory + "/" + ZoneLightBuildDirectory + "\", \n") -cfg.write("\t\"" + LeveldesignDataCommonDirectory + "\", \n") -cfg.write("};\n") -cfg.write("\n") -cfg.write("CachePath = \"" + ExportBuildDirectory + "/" + PackedZoneCacheBuildDirectory + "\";\n") -cfg.write("CWMapCachePath = \"" + ExportBuildDirectory + "/" + PackedZoneCWMapCacheBuildDirectory + "\";\n") -cfg.write("OutputPath = \"" + ExportBuildDirectory + "/" + PackedZoneBuildDirectory + "\";\n") -cfg.write("\n") -cfg.write("EntryPointsFile = \"r2_islands.xml\";\n") -cfg.write("\n") -cfg.write("CWMapList = {\n") -cfg.write("\t\"" + PackedZoneCWMap + "\", \n") -cfg.write("};\n") -cfg.write("\n") -cfg.write("Fly = 0;\n") -cfg.write("\n") -cfg.write("HeightMapsAsTga = 1;\n") -cfg.write("PixelPerMeter = 1;\n") -cfg.write("\n") -cfg.write("RefineThreshold = 32;\n") -cfg.write("\n") -cfg.close() - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 0_setup.py +# \brief setup pz +# \date 2014-09-13 13:32GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Setup pz +# +# NeL - MMORPG Framework +# Copyright (C) 2014 Jan BOON +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Setup pz") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +# Setup build directories +printLog(log, ">>> Setup build directories <<<") +mkPath(log, ExportBuildDirectory + "/" + PackedZoneCacheBuildDirectory) +mkPath(log, ExportBuildDirectory + "/" + PackedZoneCWMapCacheBuildDirectory) +mkPath(log, ExportBuildDirectory + "/" + PackedZoneBuildDirectory) + +# Setup lookup directories +printLog(log, ">>> Setup lookup directories <<<") +mkPath(log, ExportBuildDirectory + "/" + AiWmapBuildDirectory) +mkPath(log, ExportBuildDirectory + "/" + ZoneLightBuildDirectory) +mkPath(log, ExportBuildDirectory + "/" + CartographerBuildDirectory) +mkPath(log, LeveldesignDataCommonDirectory) + +# Setup client directories +printLog(log, ">>> Setup install directories <<<") +mkPath(log, InstallDirectory + "/" + PackedZoneInstallDirectory) + +# Setup client directories +printLog(log, ">>> Setup configuration <<<") +mkPath(log, ActiveProjectDirectory + "/generated") +cfg = open(ActiveProjectDirectory + "/generated/build_world_packed_col.cfg", "w") +cfg.write("\n") +cfg.write("// BUILD WORLD PACKED COL CONFIGURATION\n") +cfg.write("\n") +cfg.write("SearchPaths = {\n") +cfg.write("\t\"" + ExportBuildDirectory + "/" + AiWmapBuildDirectory + "\", \n") +cfg.write("\t\"" + ExportBuildDirectory + "/" + ZoneLightBuildDirectory + "\", \n") +cfg.write("\t\"" + ExportBuildDirectory + "/" + CartographerBuildDirectory + "\", \n") +cfg.write("\t\"" + LeveldesignDataCommonDirectory + "\", \n") +cfg.write("};\n") +cfg.write("\n") +cfg.write("CachePath = \"" + ExportBuildDirectory + "/" + PackedZoneCacheBuildDirectory + "\";\n") +cfg.write("CWMapCachePath = \"" + ExportBuildDirectory + "/" + PackedZoneCWMapCacheBuildDirectory + "\";\n") +cfg.write("OutputPath = \"" + ExportBuildDirectory + "/" + PackedZoneBuildDirectory + "\";\n") +cfg.write("\n") +cfg.write("CompleteIslandsFile = \"" + IslandsXmlFile + "\";\n") +cfg.write("EntryPointsFile = \"r2_entry_points.txt\";\n") +cfg.write("\n") +cfg.write("CWMapList = {\n") +cfg.write("\t\"" + PackedZoneCWMap + "\", \n") +cfg.write("};\n") +cfg.write("\n") +cfg.write("Fly = 0;\n") +cfg.write("\n") +cfg.write("HeightMapsAsTga = 1;\n") +cfg.write("PixelPerMeter = 1;\n") +cfg.write("\n") +cfg.write("RefineThreshold = 32;\n") +cfg.write("\n") +cfg.close() + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/pz/1_export.py b/code/nel/tools/build_gamedata/processes/pz/1_export.py index ff8daf747..bca2b0d43 100644 --- a/code/nel/tools/build_gamedata/processes/pz/1_export.py +++ b/code/nel/tools/build_gamedata/processes/pz/1_export.py @@ -1,49 +1,49 @@ -#!/usr/bin/python -# -# \file 1_export.py -# \brief Export pz -# \date 2014-09-13 13:32GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Export pz -# -# NeL - MMORPG Framework -# Copyright (C) 2014 Jan BOON -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Export pz") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 1_export.py +# \brief Export pz +# \date 2014-09-13 13:32GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Export pz +# +# NeL - MMORPG Framework +# Copyright (C) 2014 Jan BOON +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Export pz") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/pz/2_build.py b/code/nel/tools/build_gamedata/processes/pz/2_build.py index b632412b0..be824ef67 100644 --- a/code/nel/tools/build_gamedata/processes/pz/2_build.py +++ b/code/nel/tools/build_gamedata/processes/pz/2_build.py @@ -1,62 +1,62 @@ -#!/usr/bin/python -# -# \file 2_build.py -# \brief Build pz -# \date 2014-09-13 13:32GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Build pz -# -# NeL - MMORPG Framework -# Copyright (C) 2014 Jan BOON -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Build pz") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -# Find tools -BuildWorldPackedCol = findTool(log, ToolDirectories, BuildWorldPackedColTool, ToolSuffix) - -if BuildWorldPackedCol == "": - toolLogFail(log, BuildWorldPackedColTool, ToolSuffix) -else: - printLog(log, ">>> Copy ai_build_wmap.cfg <<<") - cfgPath = ActiveProjectDirectory + "/generated/build_world_packed_col.cfg" - shutil.copy(cfgPath, "build_world_packed_col.cfg") - printLog(log, ">>> Build pz <<<") - subprocess.call([ BuildWorldPackedCol, "build_world_packed_col.cfg" ]) -printLog(log, "") - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 2_build.py +# \brief Build pz +# \date 2014-09-13 13:32GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Build pz +# +# NeL - MMORPG Framework +# Copyright (C) 2014 Jan BOON +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Build pz") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +# Find tools +BuildWorldPackedCol = findTool(log, ToolDirectories, BuildWorldPackedColTool, ToolSuffix) + +if BuildWorldPackedCol == "": + toolLogFail(log, BuildWorldPackedColTool, ToolSuffix) +else: + printLog(log, ">>> Copy ai_build_wmap.cfg <<<") + cfgPath = ActiveProjectDirectory + "/generated/build_world_packed_col.cfg" + shutil.copy(cfgPath, "build_world_packed_col.cfg") + printLog(log, ">>> Build pz <<<") + subprocess.call([ BuildWorldPackedCol, "build_world_packed_col.cfg" ]) +printLog(log, "") + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/pz/3_install.py b/code/nel/tools/build_gamedata/processes/pz/3_install.py index c4feedef1..f11f0dd3e 100644 --- a/code/nel/tools/build_gamedata/processes/pz/3_install.py +++ b/code/nel/tools/build_gamedata/processes/pz/3_install.py @@ -1,58 +1,58 @@ -#!/usr/bin/python -# -# \file 3_install.py -# \brief Install pz -# \date 2014-09-13 13:32GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Install pz -# -# NeL - MMORPG Framework -# Copyright (C) 2014 Jan BOON -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Install pz") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -installPath = InstallDirectory + "/" + PackedZoneInstallDirectory -mkPath(log, installPath) - -printLog(log, ">>> Install pz <<<") -mkPath(log, ExportBuildDirectory + "/" + PackedZoneBuildDirectory) -copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + PackedZoneBuildDirectory, installPath, ".island_hm") -copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + PackedZoneBuildDirectory, installPath, ".packed_island") - -printLog(log, "") -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 3_install.py +# \brief Install pz +# \date 2014-09-13 13:32GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Install pz +# +# NeL - MMORPG Framework +# Copyright (C) 2014 Jan BOON +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite_local import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Install pz") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +installPath = InstallDirectory + "/" + PackedZoneInstallDirectory +mkPath(log, installPath) + +printLog(log, ">>> Install pz <<<") +mkPath(log, ExportBuildDirectory + "/" + PackedZoneBuildDirectory) +copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + PackedZoneBuildDirectory, installPath, ".island_hm") +copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + PackedZoneBuildDirectory, installPath, ".packed_island") + +printLog(log, "") +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/rbank/0_setup.py b/code/nel/tools/build_gamedata/processes/rbank/0_setup.py old mode 100755 new mode 100644 index 94bdb1151..56a46f910 --- a/code/nel/tools/build_gamedata/processes/rbank/0_setup.py +++ b/code/nel/tools/build_gamedata/processes/rbank/0_setup.py @@ -1,83 +1,83 @@ -#!/usr/bin/python -# -# \file 0_setup.py -# \brief Setup rbank -# \date 2009-03-10-22-43-GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Setup rbank -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Setup rbank") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -# Setup source directories -printLog(log, ">>> Setup source directories <<<") -for dir in RBankCmbSourceDirectories: - mkPath(log, DatabaseDirectory + "/" + dir) -mkPath(log, LeveldesignWorldDirectory) -mkPath(log, WorldEditorFilesDirectory) - -# Setup export directories -printLog(log, ">>> Setup export directories <<<") -mkPath(log, ExportBuildDirectory + "/" + RBankCmbExportDirectory) -mkPath(log, ExportBuildDirectory + "/" + RBankCmbTagExportDirectory) -mkPath(log, ExportBuildDirectory + "/" + SmallbankExportDirectory) - -# Setup build directories -printLog(log, ">>> Setup build directories <<<") -mkPath(log, ExportBuildDirectory + "/" + ZoneWeldBuildDirectory) -for dir in IgLookupDirectories: - mkPath(log, ExportBuildDirectory + "/" + dir) -for dir in ShapeLookupDirectories: - mkPath(log, ExportBuildDirectory + "/" + dir) -mkPath(log, ExportBuildDirectory + "/" + RbankBboxBuildDirectory) -mkPath(log, ExportBuildDirectory + "/" + IgLandBuildDirectory) -mkPath(log, ExportBuildDirectory + "/" + IgOtherBuildDirectory) -mkPath(log, ExportBuildDirectory + "/" + RbankTessellationBuildDirectory) -mkPath(log, ExportBuildDirectory + "/" + RbankSmoothBuildDirectory) -mkPath(log, ExportBuildDirectory + "/" + RbankRawBuildDirectory) -mkPath(log, ExportBuildDirectory + "/" + RbankPreprocBuildDirectory) -mkPath(log, ExportBuildDirectory + "/" + RbankRetrieversBuildDirectory) -mkPath(log, ExportBuildDirectory + "/" + RbankOutputBuildDirectory) - -# Setup client directories -printLog(log, ">>> Setup client directories <<<") -mkPath(log, InstallDirectory + "/" + PacsInstallDirectory) - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 0_setup.py +# \brief Setup rbank +# \date 2009-03-10-22-43-GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Setup rbank +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Setup rbank") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +# Setup source directories +printLog(log, ">>> Setup source directories <<<") +for dir in RBankCmbSourceDirectories: + mkPath(log, DatabaseDirectory + "/" + dir) +mkPath(log, LeveldesignWorldDirectory) +mkPath(log, WorldEditorFilesDirectory) + +# Setup export directories +printLog(log, ">>> Setup export directories <<<") +mkPath(log, ExportBuildDirectory + "/" + RBankCmbExportDirectory) +mkPath(log, ExportBuildDirectory + "/" + RBankCmbTagExportDirectory) +mkPath(log, ExportBuildDirectory + "/" + SmallbankExportDirectory) + +# Setup build directories +printLog(log, ">>> Setup build directories <<<") +mkPath(log, ExportBuildDirectory + "/" + ZoneWeldBuildDirectory) +for dir in IgLookupDirectories: + mkPath(log, ExportBuildDirectory + "/" + dir) +for dir in ShapeLookupDirectories: + mkPath(log, ExportBuildDirectory + "/" + dir) +mkPath(log, ExportBuildDirectory + "/" + RbankBboxBuildDirectory) +mkPath(log, ExportBuildDirectory + "/" + IgLandBuildDirectory) +mkPath(log, ExportBuildDirectory + "/" + IgOtherBuildDirectory) +mkPath(log, ExportBuildDirectory + "/" + RbankTessellationBuildDirectory) +mkPath(log, ExportBuildDirectory + "/" + RbankSmoothBuildDirectory) +mkPath(log, ExportBuildDirectory + "/" + RbankRawBuildDirectory) +mkPath(log, ExportBuildDirectory + "/" + RbankPreprocBuildDirectory) +mkPath(log, ExportBuildDirectory + "/" + RbankRetrieversBuildDirectory) +mkPath(log, ExportBuildDirectory + "/" + RbankOutputBuildDirectory) + +# Setup client directories +printLog(log, ">>> Setup client directories <<<") +mkPath(log, InstallDirectory + "/" + PacsInstallDirectory) + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/rbank/1_export.py b/code/nel/tools/build_gamedata/processes/rbank/1_export.py old mode 100755 new mode 100644 index 65c14c907..e77a917b7 --- a/code/nel/tools/build_gamedata/processes/rbank/1_export.py +++ b/code/nel/tools/build_gamedata/processes/rbank/1_export.py @@ -1,139 +1,139 @@ -#!/usr/bin/python -# -# ################################################################# -# ## WARNING : this is a generated file, don't change it ! -# ################################################################# -# -# \file 1_export.py -# \brief Export rbank -# \date 2015-01-06-16-31-GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Export rbank -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -import time, sys, os, shutil, subprocess, distutils.dir_util -sys.path.append("../../configuration") - -if os.path.isfile("log.log"): - os.remove("log.log") -if os.path.isfile("temp_log.log"): - os.remove("temp_log.log") -log = open("temp_log.log", "w") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Export rbank") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - - -# Find tools -# ... - -# Export rbank 3dsmax -if MaxAvailable: - # Find tools - Max = findMax(log, MaxDirectory, MaxExecutable) - printLog(log, "") - - printLog(log, ">>> Export rbank 3dsmax <<<") - mkPath(log, ExportBuildDirectory + "/" + RBankCmbExportDirectory) - mkPath(log, ExportBuildDirectory + "/" + RBankCmbTagExportDirectory) - for dir in RBankCmbSourceDirectories: - mkPath(log, DatabaseDirectory + "/" + dir) - if (needUpdateDirByTagLog(log, DatabaseDirectory + "/" + dir, ".max", ExportBuildDirectory + "/" + RBankCmbTagExportDirectory, ".max.tag")): - scriptSrc = "maxscript/cmb_export.ms" - scriptDst = MaxUserDirectory + "/scripts/cmb_export.ms" - outputLogfile = ScriptDirectory + "/processes/rbank/log.log" - outputDirectory = ExportBuildDirectory + "/" + RBankCmbExportDirectory - tagDirectory = ExportBuildDirectory + "/" + RBankCmbTagExportDirectory - maxSourceDir = DatabaseDirectory + "/" + dir - maxRunningTagFile = tagDirectory + "/max_running.tag" - tagList = findFiles(log, tagDirectory, "", ".max.tag") - tagLen = len(tagList) - if os.path.isfile(scriptDst): - os.remove(scriptDst) - tagDiff = 1 - sSrc = open(scriptSrc, "r") - sDst = open(scriptDst, "w") - for line in sSrc: - newline = line.replace("%OutputLogfile%", outputLogfile) - newline = newline.replace("%MaxSourceDirectory%", maxSourceDir) - newline = newline.replace("%OutputDirectory%", outputDirectory) - newline = newline.replace("%TagDirectory%", tagDirectory) - sDst.write(newline) - sSrc.close() - sDst.close() - zeroRetryLimit = 3 - while tagDiff > 0: - mrt = open(maxRunningTagFile, "w") - mrt.write("moe-moe-kyun") - mrt.close() - printLog(log, "MAXSCRIPT " + scriptDst) - subprocess.call([ Max, "-U", "MAXScript", "cmb_export.ms", "-q", "-mi", "-mip" ]) - if os.path.exists(outputLogfile): - try: - lSrc = open(outputLogfile, "r") - for line in lSrc: - lineStrip = line.strip() - if (len(lineStrip) > 0): - printLog(log, lineStrip) - lSrc.close() - os.remove(outputLogfile) - except Exception: - printLog(log, "ERROR Failed to read 3dsmax log") - else: - printLog(log, "WARNING No 3dsmax log") - tagList = findFiles(log, tagDirectory, "", ".max.tag") - newTagLen = len(tagList) - tagDiff = newTagLen - tagLen - tagLen = newTagLen - addTagDiff = 0 - if os.path.exists(maxRunningTagFile): - printLog(log, "FAIL 3ds Max crashed and/or file export failed!") - if tagDiff == 0: - if zeroRetryLimit > 0: - zeroRetryLimit = zeroRetryLimit - 1 - addTagDiff = 1 - else: - printLog(log, "FAIL Retry limit reached!") - else: - addTagDiff = 1 - os.remove(maxRunningTagFile) - printLog(log, "Exported " + str(tagDiff) + " .max files!") - tagDiff += addTagDiff - os.remove(scriptDst) - printLog(log, "") - - - -log.close() -if os.path.isfile("log.log"): - os.remove("log.log") -shutil.move("temp_log.log", "log.log") - - -# end of file +#!/usr/bin/python +# +# ################################################################# +# ## WARNING : this is a generated file, don't change it ! +# ################################################################# +# +# \file 1_export.py +# \brief Export rbank +# \date 2015-01-06-16-31-GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Export rbank +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +import time, sys, os, shutil, subprocess, distutils.dir_util +sys.path.append("../../configuration") + +if os.path.isfile("log.log"): + os.remove("log.log") +if os.path.isfile("temp_log.log"): + os.remove("temp_log.log") +log = open("temp_log.log", "w") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Export rbank") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + + +# Find tools +# ... + +# Export rbank 3dsmax +if MaxAvailable: + # Find tools + Max = findMax(log, MaxDirectory, MaxExecutable) + printLog(log, "") + + printLog(log, ">>> Export rbank 3dsmax <<<") + mkPath(log, ExportBuildDirectory + "/" + RBankCmbExportDirectory) + mkPath(log, ExportBuildDirectory + "/" + RBankCmbTagExportDirectory) + for dir in RBankCmbSourceDirectories: + mkPath(log, DatabaseDirectory + "/" + dir) + if (needUpdateDirByTagLog(log, DatabaseDirectory + "/" + dir, ".max", ExportBuildDirectory + "/" + RBankCmbTagExportDirectory, ".max.tag")): + scriptSrc = "maxscript/cmb_export.ms" + scriptDst = MaxUserDirectory + "/scripts/cmb_export.ms" + outputLogfile = ScriptDirectory + "/processes/rbank/log.log" + outputDirectory = ExportBuildDirectory + "/" + RBankCmbExportDirectory + tagDirectory = ExportBuildDirectory + "/" + RBankCmbTagExportDirectory + maxSourceDir = DatabaseDirectory + "/" + dir + maxRunningTagFile = tagDirectory + "/max_running.tag" + tagList = findFiles(log, tagDirectory, "", ".max.tag") + tagLen = len(tagList) + if os.path.isfile(scriptDst): + os.remove(scriptDst) + tagDiff = 1 + sSrc = open(scriptSrc, "r") + sDst = open(scriptDst, "w") + for line in sSrc: + newline = line.replace("%OutputLogfile%", outputLogfile) + newline = newline.replace("%MaxSourceDirectory%", maxSourceDir) + newline = newline.replace("%OutputDirectory%", outputDirectory) + newline = newline.replace("%TagDirectory%", tagDirectory) + sDst.write(newline) + sSrc.close() + sDst.close() + zeroRetryLimit = 3 + while tagDiff > 0: + mrt = open(maxRunningTagFile, "w") + mrt.write("moe-moe-kyun") + mrt.close() + printLog(log, "MAXSCRIPT " + scriptDst) + subprocess.call([ Max, "-U", "MAXScript", "cmb_export.ms", "-q", "-mi", "-mip" ]) + if os.path.exists(outputLogfile): + try: + lSrc = open(outputLogfile, "r") + for line in lSrc: + lineStrip = line.strip() + if (len(lineStrip) > 0): + printLog(log, lineStrip) + lSrc.close() + os.remove(outputLogfile) + except Exception: + printLog(log, "ERROR Failed to read 3dsmax log") + else: + printLog(log, "WARNING No 3dsmax log") + tagList = findFiles(log, tagDirectory, "", ".max.tag") + newTagLen = len(tagList) + tagDiff = newTagLen - tagLen + tagLen = newTagLen + addTagDiff = 0 + if os.path.exists(maxRunningTagFile): + printLog(log, "FAIL 3ds Max crashed and/or file export failed!") + if tagDiff == 0: + if zeroRetryLimit > 0: + zeroRetryLimit = zeroRetryLimit - 1 + addTagDiff = 1 + else: + printLog(log, "FAIL Retry limit reached!") + else: + addTagDiff = 1 + os.remove(maxRunningTagFile) + printLog(log, "Exported " + str(tagDiff) + " .max files!") + tagDiff += addTagDiff + os.remove(scriptDst) + printLog(log, "") + + + +log.close() +if os.path.isfile("log.log"): + os.remove("log.log") +shutil.move("temp_log.log", "log.log") + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/rbank/2_build.py b/code/nel/tools/build_gamedata/processes/rbank/2_build.py old mode 100755 new mode 100644 index b38aea94b..1f872b968 --- a/code/nel/tools/build_gamedata/processes/rbank/2_build.py +++ b/code/nel/tools/build_gamedata/processes/rbank/2_build.py @@ -1,325 +1,339 @@ -#!/usr/bin/python -# -# \file 2_build.py -# \brief Build rbank -# \date 2009-03-10-22-43-GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Build rbank -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Build rbank") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -# Find tools -BuildIgBoxes = findTool(log, ToolDirectories, BuildIgBoxesTool, ToolSuffix) -ExecTimeout = findTool(log, ToolDirectories, ExecTimeoutTool, ToolSuffix) -BuildRbank = findTool(log, ToolDirectories, BuildRbankTool, ToolSuffix) -GetNeighbors = findTool(log, ToolDirectories, GetNeighborsTool, ToolSuffix) -BuildIndoorRbank = findTool(log, ToolDirectories, BuildIndoorRbankTool, ToolSuffix) -# AiBuildWmap = findTool(log, ToolDirectories, AiBuildWmapTool, ToolSuffix) -printLog(log, "") - -# Build rbank bbox -printLog(log, ">>> Build rbank bbox <<<") -tempBbox = ExportBuildDirectory + "/" + RbankBboxBuildDirectory + "/temp.bbox" -if BuildIgBoxes == "": - toolLogFail(log, BuildIgBoxesTool, ToolSuffix) -else: - mkPath(log, ExportBuildDirectory + "/" + RbankBboxBuildDirectory) - needUpdateIg = needUpdateMultiDirNoSubdirFile(log, ExportBuildDirectory, IgLookupDirectories, tempBbox) - if needUpdateIg: - printLog(log, "DETECT UPDATE IG->Bbox") - else: - printLog(log, "DETECT SKIP IG->Bbox") - needUpdateShape = needUpdateMultiDirNoSubdirFile(log, ExportBuildDirectory, ShapeLookupDirectories, tempBbox) - if needUpdateShape: - printLog(log, "DETECT UPDATE Shape->Bbox") - else: - printLog(log, "DETECT SKIP Shape->Bbox") - if needUpdateIg or needUpdateShape: - printLog(log, "DETECT DECIDE UPDATE") - cf = open("build_ig_boxes.cfg", "w") - cf.write("\n") - cf.write("Pathes = {\n") - for dir in IgLookupDirectories: - mkPath(log, ExportBuildDirectory + "/" + dir) - cf.write("\t\"" + ExportBuildDirectory + "/" + dir + "\", \n") - for dir in ShapeLookupDirectories: - mkPath(log, ExportBuildDirectory + "/" + dir) - cf.write("\t\"" + ExportBuildDirectory + "/" + dir + "\", \n") - cf.write("};\n") - cf.write("\n") - cf.write("IGs = {\n") - for dir in IgLookupDirectories: - files = findFiles(log, ExportBuildDirectory + "/" + dir, "", ".ig") - for file in files: - cf.write("\t\"" + os.path.basename(file)[0:-len(".ig")] + "\", \n") - cf.write("};\n") - cf.write("\n") - cf.write("Output = \"" + tempBbox + "\";\n") - cf.write("\n") - cf.close() - subprocess.call([ BuildIgBoxes ]) - os.remove("build_ig_boxes.cfg") - else: - printLog(log, "DETECT DECIDE SKIP") - printLog(log, "SKIP *") -printLog(log, "") - -printLog(log, ">>> Build rbank build config <<<") -cf = open("build_rbank.cfg", "w") -cf.write("\n") -cf.write("// Rbank settings\n") -cf.write("\n") -cf.write("Verbose = " + str(RBankVerbose) + ";\n") -cf.write("CheckConsistency = " + str(RBankConsistencyCheck) + ";\n") -mkPath(log, ExportBuildDirectory + "/" + ZoneWeldBuildDirectory) -cf.write("ZonePath = \"" + ExportBuildDirectory + "/" + ZoneWeldBuildDirectory + "/\";\n") -mkPath(log, ExportBuildDirectory + "/" + SmallbankExportDirectory) -cf.write("BanksPath = \"" + ExportBuildDirectory + "/" + SmallbankExportDirectory + "/\";\n") -cf.write("Bank = \"" + ExportBuildDirectory + "/" + SmallbankExportDirectory + "/" + BankTileBankName + ".smallbank\";\n") -cf.write("ZoneExt = \".zonew\";\n") -cf.write("ZoneNHExt = \".zonenhw\";\n") -cf.write("IGBoxes = \"" + tempBbox + "\";\n") -mkPath(log, LeveldesignWorldDirectory) -cf.write("LevelDesignWorldPath = \"" + LeveldesignWorldDirectory + "\";\n") -mkPath(log, ExportBuildDirectory + "/" + IgLandBuildDirectory) -cf.write("IgLandPath = \"" + ExportBuildDirectory + "/" + IgLandBuildDirectory + "\";\n") -mkPath(log, ExportBuildDirectory + "/" + IgOtherBuildDirectory) -cf.write("IgVillagePath = \"" + ExportBuildDirectory + "/" + IgOtherBuildDirectory + "\";\n") -cf.write("\n") -mkPath(log, ExportBuildDirectory + "/" + RbankTessellationBuildDirectory) -cf.write("TessellationPath = \"" + ExportBuildDirectory + "/" + RbankTessellationBuildDirectory + "/\";\n") -cf.write("TessellateLevel = " + str(BuildQuality) + ";\n") # BuildQuality -cf.write("\n") -cf.write("WaterThreshold = 1.0;\n") -cf.write("\n") -cf.write("OutputRootPath = \"" + ExportBuildDirectory + "/\";\n") -mkPath(log, ExportBuildDirectory + "/" + RbankSmoothBuildDirectory) -cf.write("SmoothDirectory = \"" + RbankSmoothBuildDirectory + "/\";\n") -mkPath(log, ExportBuildDirectory + "/" + RbankRawBuildDirectory) -cf.write("RawDirectory = \"" + RbankRawBuildDirectory + "/\";\n") -cf.write("\n") -cf.write("ReduceSurfaces = " + str(RbankReduceSurfaces) + ";\n") -cf.write("SmoothBorders = " + str(RbankSmoothBorders) + ";\n") -cf.write("\n") -cf.write("ComputeElevation = " + str(RbankComputeElevation) + ";\n") -cf.write("ComputeLevels = " + str(RbankComputeLevels) + ";\n") -cf.write("\n") -cf.write("LinkElements = " + str(RbankLinkElements) + ";\n") -cf.write("\n") -cf.write("CutEdges = " + str(RbankCutEdges) + ";\n") -cf.write("\n") -cf.write("UseZoneSquare = " + str(RbankUseZoneSquare) + ";\n") -cf.write("\n") -cf.write("// The whole landscape\n") -cf.write("ZoneUL = \"" + RbankZoneUl + "\";\n") -cf.write("ZoneDR = \"" + RbankZoneDr + "\";\n") -cf.write("\n") -mkPath(log, ExportBuildDirectory + "/" + RbankPreprocBuildDirectory) -cf.write("PreprocessDirectory = \"" + ExportBuildDirectory + "/" + RbankPreprocBuildDirectory + "/\";\n") -cf.write("\n") -cf.write("// The global retriever processing settings\n") -cf.write("GlobalRetriever = \"temp.gr\";\n") -cf.write("RetrieverBank = \"temp.rbank\";\n") -cf.write("\n") -cf.write("GlobalUL = \"" + RbankZoneUl + "\";\n") -cf.write("GlobalDR = \"" + RbankZoneDr + "\";\n") -cf.write("\n") -cf.write("// Which kind of stuff to do\n") -cf.write("TessellateZones = 0;\n") -cf.write("MoulineZones = 0;\n") -cf.write("ProcessRetrievers = 0;\n") -cf.write("ProcessGlobal = 0;\n") -cf.write("\n") -cf.write("Zones = {\n") -mkPath(log, ExportBuildDirectory + "/" + ZoneWeldBuildDirectory) -files = findFiles(log, ExportBuildDirectory + "/" + ZoneWeldBuildDirectory, "", ".zonew") -for file in files: - cf.write("\t\"" + os.path.basename(file) + "\", \n") -cf.write("};\n") -cf.write("\n") -cf.write("Pathes = {\n") -mkPath(log, WorldEditorFilesDirectory); -cf.write("\t\"" + WorldEditorFilesDirectory + "\", \n"); -for dir in IgLookupDirectories: - mkPath(log, ExportBuildDirectory + "/" + dir) - cf.write("\t\"" + ExportBuildDirectory + "/" + dir + "\", \n") -for dir in ShapeLookupDirectories: - mkPath(log, ExportBuildDirectory + "/" + dir) - cf.write("\t\"" + ExportBuildDirectory + "/" + dir + "\", \n") -cf.write("};\n") -cf.write("\n") -cf.close() -printLog(log, "") - -printLog(log, ">>> Build rbank check prims <<<") -if BuildRbank == "": - toolLogFail(log, BuildRbankTool, ToolSuffix) -elif ExecTimeout == "": - toolLogFail(log, ExecTimeoutTool, ToolSuffix) -else: - subprocess.call([ ExecTimeout, str(RbankBuildTesselTimeout), BuildRbank, "-C", "-p", "-g" ]) -printLog(log, "") - -printLog(log, ">>> Build rbank process all passes <<<") -if BuildRbank == "": - toolLogFail(log, BuildRbankTool, ToolSuffix) -if GetNeighbors == "": - toolLogFail(log, GetNeighborsTool, ToolSuffix) -elif ExecTimeout == "": - toolLogFail(log, ExecTimeoutTool, ToolSuffix) -else: - zonefiles = findFiles(log, ExportBuildDirectory + "/" + ZoneWeldBuildDirectory, "", ".zonew") - for zonefile in zonefiles: - zone = os.path.basename(zonefile)[0:-len(".zonew")] - lr1 = ExportBuildDirectory + "/" + RbankSmoothBuildDirectory + "/" + zone + ".lr" - nearzones = subprocess.Popen([ GetNeighbors, zone ], stdout = subprocess.PIPE).communicate()[0].strip().split(" ") - printLog(log, "ZONE " + zone + ": " + str(nearzones)) - zone_to_build = 0 - for nearzone in nearzones: - sourcePath = ExportBuildDirectory + "/" + ZoneWeldBuildDirectory + "/" + nearzone + ".zonew" - if (os.path.isfile(sourcePath)): - if (needUpdate(log, sourcePath, lr1)): - zone_to_build = 1 - sourcePath = ExportBuildDirectory + "/" + ZoneWeldBuildDirectory + "/" + zone + ".zonew" - if zone_to_build: - printLog(log, sourcePath + " -> " + lr1) - subprocess.call([ ExecTimeout, str(RbankBuildTesselTimeout), BuildRbank, "-c", "-P", "-g", os.path.basename(zonefile) ]) - else: - printLog(log, "SKIP " + lr1) -printLog(log, "") - -printLog(log, ">>> Detect modifications to rebuild lr <<<") -needUpdateCmbLr = needUpdateDirByTagLog(log, ExportBuildDirectory + "/" + RBankCmbExportDirectory, ".cmb", ExportBuildDirectory + "/" + RbankRetrieversBuildDirectory, ".lr") -if needUpdateCmbLr: - printLog(log, "DETECT UPDATE Cmb->Lr") -else: - printLog(log, "DETECT SKIP Cmb->Lr") -needUpdateCmbRbank = needUpdateDirNoSubdirFile(log, ExportBuildDirectory + "/" + RBankCmbExportDirectory, ExportBuildDirectory + "/" + RbankOutputBuildDirectory + "/" + RbankRbankName + ".rbank") -if needUpdateCmbRbank: - printLog(log, "DETECT UPDATE Cmb->Rbank") -else: - printLog(log, "DETECT SKIP Cmb->Rbank") -needUpdateLrRbank = needUpdateDirNoSubdirFile(log, ExportBuildDirectory + "/" + RbankSmoothBuildDirectory, ExportBuildDirectory + "/" + RbankOutputBuildDirectory + "/" + RbankRbankName + ".rbank") -if needUpdateLrRbank: - printLog(log, "DETECT UPDATE Lr->Rbank") -else: - printLog(log, "DETECT SKIP Lr->Rbank") -needUpdateBboxRbank = needUpdate(log, tempBbox, ExportBuildDirectory + "/" + RbankOutputBuildDirectory + "/" + RbankRbankName + ".rbank") -if needUpdateBboxRbank: - printLog(log, "DETECT UPDATE Lr->Rbank") -else: - printLog(log, "DETECT SKIP Lr->Rbank") - -if needUpdateCmbLr or needUpdateCmbRbank or needUpdateLrRbank or needUpdateBboxRbank: - printLog(log, "DETECT DECIDE UPDATE") - printLog(log, ">>> Build rbank process global <<<") # This generates temp lr files. TODO: Check if the LR changed? - if BuildRbank == "": - toolLogFail(log, BuildRbankTool, ToolSuffix) - elif ExecTimeout == "": - toolLogFail(log, ExecTimeoutTool, ToolSuffix) - else: - subprocess.call([ ExecTimeout, str(RbankBuildProcglobalTimeout), BuildRbank, "-c", "-P", "-G" ]) - printLog(log, "") - os.remove("build_rbank.cfg") - - printLog(log, ">>> Build rbank indoor <<<") # This generates the retrievers for the ig that have the cmb export - if BuildIndoorRbank == "": - toolLogFail(log, BuildIndoorRbankTool, ToolSuffix) - elif ExecTimeout == "": - toolLogFail(log, ExecTimeoutTool, ToolSuffix) - else: - retrieversDir = ExportBuildDirectory + "/" + RbankRetrieversBuildDirectory - mkPath(log, retrieversDir) - removeFilesRecursiveExt(log, retrieversDir, ".rbank") - removeFilesRecursiveExt(log, retrieversDir, ".gr") - removeFilesRecursiveExt(log, retrieversDir, ".lr") - cf = open("build_indoor_rbank.cfg", "w") - cf.write("\n") - mkPath(log, ExportBuildDirectory + "/" + RBankCmbExportDirectory) - cf.write("MeshPath = \"" + ExportBuildDirectory + "/" + RBankCmbExportDirectory + "/\";\n") - # cf.write("Meshes = { };\n") - cf.write("Meshes = \n") - cf.write("{\n") - meshFiles = findFilesNoSubdir(log, ExportBuildDirectory + "/" + RBankCmbExportDirectory, ".cmb") - lenCmbExt = len(".cmb") - for file in meshFiles: - cf.write("\t\"" + file[0:-lenCmbExt] + "\", \n") - cf.write("};\n") - cf.write("OutputPath = \"" + retrieversDir + "/\";\n") - # mkPath(log, ExportBuildDirectory + "/" + RbankOutputBuildDirectory) - # cf.write("OutputPath = \"" + ExportBuildDirectory + "/" + RbankOutputBuildDirectory + "/\";\n") - cf.write("OutputPrefix = \"unused\";\n") - cf.write("Merge = 1;\n") - mkPath(log, ExportBuildDirectory + "/" + RbankSmoothBuildDirectory) - cf.write("MergePath = \"" + ExportBuildDirectory + "/" + RbankSmoothBuildDirectory + "/\";\n") - cf.write("MergeInputPrefix = \"temp\";\n") - cf.write("MergeOutputPrefix = \"tempMerged\";\n") - # cf.write("MergeOutputPrefix = \"" + RbankRbankName + "\";\n") - cf.write("AddToRetriever = 1;\n") - cf.write("\n") - cf.close() - subprocess.call([ ExecTimeout, str(RbankBuildIndoorTimeout), BuildIndoorRbank ]) - os.remove("build_indoor_rbank.cfg") - printLog(log, "") - - retrieversDir = ExportBuildDirectory + "/" + RbankRetrieversBuildDirectory - mkPath(log, retrieversDir) - outputDir = ExportBuildDirectory + "/" + RbankOutputBuildDirectory - mkPath(log, outputDir) - printLog(log, ">>> Move gr, rbank and lr <<<") # This simply renames everything - if needUpdateDirNoSubdir(log, retrieversDir, outputDir): - removeFilesRecursiveExt(log, outputDir, ".rbank") - removeFilesRecursiveExt(log, outputDir, ".gr") - removeFilesRecursiveExt(log, outputDir, ".lr") - copyFilesRenamePrefixExt(log, retrieversDir, outputDir, "tempMerged", RbankRbankName, ".rbank") - copyFilesRenamePrefixExt(log, retrieversDir, outputDir, "tempMerged", RbankRbankName, ".gr") - copyFilesRenamePrefixExt(log, retrieversDir, outputDir, "tempMerged_", RbankRbankName + "_", ".lr") - else: - printLog(log, "SKIP *") -else: - printLog(log, "DETECT DECIDE SKIP") - printLog(log, "SKIP *") - -# Remove pacs.packed_prims when done -if os.path.isfile("pacs.packed_prims"): - os.remove("pacs.packed_prims") - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 2_build.py +# \brief Build rbank +# \date 2009-03-10-22-43-GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Build rbank +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Build rbank") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +# Find tools +BuildIgBoxes = findTool(log, ToolDirectories, BuildIgBoxesTool, ToolSuffix) +ExecTimeout = findTool(log, ToolDirectories, ExecTimeoutTool, ToolSuffix) +BuildRbank = findTool(log, ToolDirectories, BuildRbankTool, ToolSuffix) +GetNeighbors = findTool(log, ToolDirectories, GetNeighborsTool, ToolSuffix) +BuildIndoorRbank = findTool(log, ToolDirectories, BuildIndoorRbankTool, ToolSuffix) +# AiBuildWmap = findTool(log, ToolDirectories, AiBuildWmapTool, ToolSuffix) +printLog(log, "") + +# Build rbank bbox +printLog(log, ">>> Build rbank bbox <<<") +tempBbox = ExportBuildDirectory + "/" + RbankBboxBuildDirectory + "/temp.bbox" +rebuiltBbox = False +if BuildIgBoxes == "": + toolLogFail(log, BuildIgBoxesTool, ToolSuffix) +else: + mkPath(log, ExportBuildDirectory + "/" + RbankBboxBuildDirectory) + needUpdateIg = needUpdateMultiDirNoSubdirFile(log, ExportBuildDirectory, IgLookupDirectories, tempBbox) + if needUpdateIg: + printLog(log, "DETECT UPDATE IG->Bbox") + else: + printLog(log, "DETECT SKIP IG->Bbox") + needUpdateShape = needUpdateMultiDirNoSubdirFile(log, ExportBuildDirectory, ShapeLookupDirectories, tempBbox) + if needUpdateShape: + printLog(log, "DETECT UPDATE Shape->Bbox") + else: + printLog(log, "DETECT SKIP Shape->Bbox") + if needUpdateIg or needUpdateShape: + rebuiltBbox = True + printLog(log, "DETECT DECIDE UPDATE") + cf = open("build_ig_boxes.cfg", "w") + cf.write("\n") + cf.write("Pathes = {\n") + for dir in IgLookupDirectories: + mkPath(log, ExportBuildDirectory + "/" + dir) + cf.write("\t\"" + ExportBuildDirectory + "/" + dir + "\", \n") + for dir in ShapeLookupDirectories: + mkPath(log, ExportBuildDirectory + "/" + dir) + cf.write("\t\"" + ExportBuildDirectory + "/" + dir + "\", \n") + cf.write("};\n") + cf.write("\n") + cf.write("IGs = {\n") + for dir in IgLookupDirectories: + files = findFiles(log, ExportBuildDirectory + "/" + dir, "", ".ig") + for file in files: + cf.write("\t\"" + os.path.basename(file)[0:-len(".ig")] + "\", \n") + cf.write("};\n") + cf.write("\n") + cf.write("Output = \"" + tempBbox + "\";\n") + cf.write("\n") + cf.close() + subprocess.call([ BuildIgBoxes ]) + os.remove("build_ig_boxes.cfg") + else: + printLog(log, "DETECT DECIDE SKIP") + printLog(log, "SKIP *") +printLog(log, "") + +printLog(log, ">>> Build rbank build config <<<") +cf = open("build_rbank.cfg", "w") +cf.write("\n") +cf.write("// Rbank settings\n") +cf.write("\n") +cf.write("Verbose = " + str(RBankVerbose) + ";\n") +cf.write("CheckConsistency = " + str(RBankConsistencyCheck) + ";\n") +mkPath(log, ExportBuildDirectory + "/" + ZoneWeldBuildDirectory) +cf.write("ZonePath = \"" + ExportBuildDirectory + "/" + ZoneWeldBuildDirectory + "/\";\n") +mkPath(log, ExportBuildDirectory + "/" + SmallbankExportDirectory) +cf.write("BanksPath = \"" + ExportBuildDirectory + "/" + SmallbankExportDirectory + "/\";\n") +cf.write("Bank = \"" + ExportBuildDirectory + "/" + SmallbankExportDirectory + "/" + BankTileBankName + ".smallbank\";\n") +cf.write("ZoneExt = \".zonew\";\n") +cf.write("ZoneNHExt = \".zonenhw\";\n") +cf.write("IGBoxes = \"" + tempBbox + "\";\n") +mkPath(log, LeveldesignWorldDirectory) +cf.write("LevelDesignWorldPath = \"" + LeveldesignWorldDirectory + "\";\n") +mkPath(log, ExportBuildDirectory + "/" + IgLandBuildDirectory) +cf.write("IgLandPath = \"" + ExportBuildDirectory + "/" + IgLandBuildDirectory + "\";\n") +mkPath(log, ExportBuildDirectory + "/" + IgOtherBuildDirectory) +cf.write("IgVillagePath = \"" + ExportBuildDirectory + "/" + IgOtherBuildDirectory + "\";\n") +cf.write("\n") +mkPath(log, ExportBuildDirectory + "/" + RbankTessellationBuildDirectory) +cf.write("TessellationPath = \"" + ExportBuildDirectory + "/" + RbankTessellationBuildDirectory + "/\";\n") +cf.write("TessellateLevel = " + str(BuildQuality) + ";\n") # BuildQuality +cf.write("\n") +cf.write("WaterThreshold = 1.0;\n") +cf.write("\n") +cf.write("OutputRootPath = \"" + ExportBuildDirectory + "/\";\n") +mkPath(log, ExportBuildDirectory + "/" + RbankSmoothBuildDirectory) +cf.write("SmoothDirectory = \"" + RbankSmoothBuildDirectory + "/\";\n") +mkPath(log, ExportBuildDirectory + "/" + RbankRawBuildDirectory) +cf.write("RawDirectory = \"" + RbankRawBuildDirectory + "/\";\n") +cf.write("\n") +cf.write("ReduceSurfaces = " + str(RbankReduceSurfaces) + ";\n") +cf.write("SmoothBorders = " + str(RbankSmoothBorders) + ";\n") +cf.write("\n") +cf.write("ComputeElevation = " + str(RbankComputeElevation) + ";\n") +cf.write("ComputeLevels = " + str(RbankComputeLevels) + ";\n") +cf.write("\n") +cf.write("LinkElements = " + str(RbankLinkElements) + ";\n") +cf.write("\n") +cf.write("CutEdges = " + str(RbankCutEdges) + ";\n") +cf.write("\n") +cf.write("UseZoneSquare = " + str(RbankUseZoneSquare) + ";\n") +cf.write("\n") +cf.write("// The whole landscape\n") +cf.write("ZoneUL = \"" + RbankZoneUl + "\";\n") +cf.write("ZoneDR = \"" + RbankZoneDr + "\";\n") +cf.write("\n") +mkPath(log, ExportBuildDirectory + "/" + RbankPreprocBuildDirectory) +cf.write("PreprocessDirectory = \"" + ExportBuildDirectory + "/" + RbankPreprocBuildDirectory + "/\";\n") +cf.write("\n") +cf.write("// The global retriever processing settings\n") +cf.write("GlobalRetriever = \"temp.gr\";\n") +cf.write("RetrieverBank = \"temp.rbank\";\n") +cf.write("\n") +cf.write("GlobalUL = \"" + RbankZoneUl + "\";\n") +cf.write("GlobalDR = \"" + RbankZoneDr + "\";\n") +cf.write("\n") +cf.write("// Which kind of stuff to do\n") +cf.write("TessellateZones = 0;\n") +cf.write("MoulineZones = 0;\n") +cf.write("ProcessRetrievers = 0;\n") +cf.write("ProcessGlobal = 0;\n") +cf.write("\n") +cf.write("Zones = {\n") +mkPath(log, ExportBuildDirectory + "/" + ZoneWeldBuildDirectory) +files = findFiles(log, ExportBuildDirectory + "/" + ZoneWeldBuildDirectory, "", ".zonew") +for file in files: + cf.write("\t\"" + os.path.basename(file) + "\", \n") +cf.write("};\n") +cf.write("\n") +cf.write("Pathes = {\n") +mkPath(log, WorldEditorFilesDirectory); +cf.write("\t\"" + WorldEditorFilesDirectory + "\", \n"); +for dir in IgLookupDirectories: + mkPath(log, ExportBuildDirectory + "/" + dir) + cf.write("\t\"" + ExportBuildDirectory + "/" + dir + "\", \n") +for dir in ShapeLookupDirectories: + mkPath(log, ExportBuildDirectory + "/" + dir) + cf.write("\t\"" + ExportBuildDirectory + "/" + dir + "\", \n") +cf.write("};\n") +cf.write("\n") +cf.close() +printLog(log, "") + +printLog(log, ">>> Build rbank check prims <<<") +if BuildRbank == "": + toolLogFail(log, BuildRbankTool, ToolSuffix) +elif ExecTimeout == "": + toolLogFail(log, ExecTimeoutTool, ToolSuffix) +else: + subprocess.call([ ExecTimeout, str(RbankBuildTesselTimeout), BuildRbank, "-C", "-p", "-g" ]) +printLog(log, "") + +printLog(log, ">>> Build rbank process all passes <<<") +if BuildRbank == "": + toolLogFail(log, BuildRbankTool, ToolSuffix) +if GetNeighbors == "": + toolLogFail(log, GetNeighborsTool, ToolSuffix) +elif ExecTimeout == "": + toolLogFail(log, ExecTimeoutTool, ToolSuffix) +else: + zonefiles = findFiles(log, ExportBuildDirectory + "/" + ZoneWeldBuildDirectory, "", ".zonew") + zonesToBuild = [] + for zonefile in zonefiles: + zone = os.path.basename(zonefile)[0:-len(".zonew")] + lr1 = ExportBuildDirectory + "/" + RbankSmoothBuildDirectory + "/" + zone + ".lr" + nearzones = subprocess.Popen([ GetNeighbors, zone ], stdout = subprocess.PIPE).communicate()[0].strip().split(" ") + printLog(log, "ZONE " + zone + ": " + str(nearzones)) + zoneToBuild = 0 + for nearzone in nearzones: + sourcePath = ExportBuildDirectory + "/" + ZoneWeldBuildDirectory + "/" + nearzone + ".zonew" + if (os.path.isfile(sourcePath)): + if (rebuiltBbox or needUpdate(log, sourcePath, lr1)): + zoneToBuild = 1 + zonesToBuild.append(os.path.basename(zonefile)) + sourcePath = ExportBuildDirectory + "/" + ZoneWeldBuildDirectory + "/" + zone + ".zonew" + if zoneToBuild: + printLog(log, sourcePath + " -> " + lr1) + # subprocess.call([ ExecTimeout, str(RbankBuildTesselTimeout), BuildRbank, "-c", "-P", "-g", os.path.basename(zonefile) ]) + else: + printLog(log, "SKIP " + lr1) + while len(zonesToBuild) > 0: + processCommand = [ ExecTimeout, str(RbankBuildTesselTimeout), BuildRbank, "-c", "-P", "-g" ] + processCommand.extend(zonesToBuild[:min(len(zonesToBuild), 64)]) + if len(zonesToBuild) > 64: + zonesToBuild = zonesToBuild[64:] + else: + zonesToBuild = [] + print processCommand + callParallelProcess(processCommand) + flushParallelProcesses() +printLog(log, "") + +printLog(log, ">>> Detect modifications to rebuild lr <<<") +needUpdateCmbLr = needUpdateDirByTagLog(log, ExportBuildDirectory + "/" + RBankCmbExportDirectory, ".cmb", ExportBuildDirectory + "/" + RbankRetrieversBuildDirectory, ".lr") +if needUpdateCmbLr: + printLog(log, "DETECT UPDATE Cmb->Lr") +else: + printLog(log, "DETECT SKIP Cmb->Lr") +needUpdateCmbRbank = needUpdateDirNoSubdirFile(log, ExportBuildDirectory + "/" + RBankCmbExportDirectory, ExportBuildDirectory + "/" + RbankOutputBuildDirectory + "/" + RbankRbankName + ".rbank") +if needUpdateCmbRbank: + printLog(log, "DETECT UPDATE Cmb->Rbank") +else: + printLog(log, "DETECT SKIP Cmb->Rbank") +needUpdateLrRbank = needUpdateDirNoSubdirFile(log, ExportBuildDirectory + "/" + RbankSmoothBuildDirectory, ExportBuildDirectory + "/" + RbankOutputBuildDirectory + "/" + RbankRbankName + ".rbank") +if needUpdateLrRbank: + printLog(log, "DETECT UPDATE Lr->Rbank") +else: + printLog(log, "DETECT SKIP Lr->Rbank") +needUpdateBboxRbank = needUpdate(log, tempBbox, ExportBuildDirectory + "/" + RbankOutputBuildDirectory + "/" + RbankRbankName + ".rbank") +if needUpdateBboxRbank: + printLog(log, "DETECT UPDATE Lr->Rbank") +else: + printLog(log, "DETECT SKIP Lr->Rbank") + +if rebuiltBbox or needUpdateCmbLr or needUpdateCmbRbank or needUpdateLrRbank or needUpdateBboxRbank: + printLog(log, "DETECT DECIDE UPDATE") + printLog(log, ">>> Build rbank process global <<<") # This generates temp lr files. TODO: Check if the LR changed? + if BuildRbank == "": + toolLogFail(log, BuildRbankTool, ToolSuffix) + elif ExecTimeout == "": + toolLogFail(log, ExecTimeoutTool, ToolSuffix) + else: + subprocess.call([ ExecTimeout, str(RbankBuildProcglobalTimeout), BuildRbank, "-c", "-P", "-G" ]) + printLog(log, "") + os.remove("build_rbank.cfg") + + printLog(log, ">>> Build rbank indoor <<<") # This generates the retrievers for the ig that have the cmb export + if BuildIndoorRbank == "": + toolLogFail(log, BuildIndoorRbankTool, ToolSuffix) + elif ExecTimeout == "": + toolLogFail(log, ExecTimeoutTool, ToolSuffix) + else: + retrieversDir = ExportBuildDirectory + "/" + RbankRetrieversBuildDirectory + mkPath(log, retrieversDir) + removeFilesRecursiveExt(log, retrieversDir, ".rbank") + removeFilesRecursiveExt(log, retrieversDir, ".gr") + removeFilesRecursiveExt(log, retrieversDir, ".lr") + cf = open("build_indoor_rbank.cfg", "w") + cf.write("\n") + mkPath(log, ExportBuildDirectory + "/" + RBankCmbExportDirectory) + cf.write("MeshPath = \"" + ExportBuildDirectory + "/" + RBankCmbExportDirectory + "/\";\n") + # cf.write("Meshes = { };\n") + cf.write("Meshes = \n") + cf.write("{\n") + meshFiles = findFilesNoSubdir(log, ExportBuildDirectory + "/" + RBankCmbExportDirectory, ".cmb") + lenCmbExt = len(".cmb") + for file in meshFiles: + cf.write("\t\"" + file[0:-lenCmbExt] + "\", \n") + cf.write("};\n") + cf.write("OutputPath = \"" + retrieversDir + "/\";\n") + # mkPath(log, ExportBuildDirectory + "/" + RbankOutputBuildDirectory) + # cf.write("OutputPath = \"" + ExportBuildDirectory + "/" + RbankOutputBuildDirectory + "/\";\n") + cf.write("OutputPrefix = \"unused\";\n") + cf.write("Merge = 1;\n") + mkPath(log, ExportBuildDirectory + "/" + RbankSmoothBuildDirectory) + cf.write("MergePath = \"" + ExportBuildDirectory + "/" + RbankSmoothBuildDirectory + "/\";\n") + cf.write("MergeInputPrefix = \"temp\";\n") + cf.write("MergeOutputPrefix = \"tempMerged\";\n") + # cf.write("MergeOutputPrefix = \"" + RbankRbankName + "\";\n") + cf.write("AddToRetriever = 1;\n") + cf.write("\n") + cf.close() + subprocess.call([ ExecTimeout, str(RbankBuildIndoorTimeout), BuildIndoorRbank ]) + os.remove("build_indoor_rbank.cfg") + printLog(log, "") + + retrieversDir = ExportBuildDirectory + "/" + RbankRetrieversBuildDirectory + mkPath(log, retrieversDir) + outputDir = ExportBuildDirectory + "/" + RbankOutputBuildDirectory + mkPath(log, outputDir) + printLog(log, ">>> Move gr, rbank and lr <<<") # This simply renames everything + if needUpdateDirNoSubdir(log, retrieversDir, outputDir): + removeFilesRecursiveExt(log, outputDir, ".rbank") + removeFilesRecursiveExt(log, outputDir, ".gr") + removeFilesRecursiveExt(log, outputDir, ".lr") + copyFilesRenamePrefixExt(log, retrieversDir, outputDir, "tempMerged", RbankRbankName, ".rbank") + copyFilesRenamePrefixExt(log, retrieversDir, outputDir, "tempMerged", RbankRbankName, ".gr") + copyFilesRenamePrefixExt(log, retrieversDir, outputDir, "tempMerged_", RbankRbankName + "_", ".lr") + else: + printLog(log, "SKIP *") +else: + printLog(log, "DETECT DECIDE SKIP") + printLog(log, "SKIP *") + +# Remove pacs.packed_prims when done +if os.path.isfile("pacs.packed_prims"): + os.remove("pacs.packed_prims") + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/rbank/3_install.py b/code/nel/tools/build_gamedata/processes/rbank/3_install.py old mode 100755 new mode 100644 index c806c79f9..e8f0a8561 --- a/code/nel/tools/build_gamedata/processes/rbank/3_install.py +++ b/code/nel/tools/build_gamedata/processes/rbank/3_install.py @@ -1,68 +1,68 @@ -#!/usr/bin/python -# -# \file 3_install.py -# \brief Install rbank -# \date 2009-03-10-22-43-GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Install rbank -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Install rbank") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -printLog(log, ">>> Install rbank <<<") -installPath = InstallDirectory + "/" + PacsInstallDirectory -mkPath(log, installPath) -srcPath = ExportBuildDirectory + "/" + RbankOutputBuildDirectory -mkPath(log, srcPath) -copyFilesNoTreeIfNeeded(log, srcPath, installPath) -#installPath = InstallDirectory + "/" + PacsInstallDirectory -#mkPath(log, installPath) -#srcPath = ExportBuildDirectory + "/" + RbankRetrieversBuildDirectory -#mkPath(log, srcPath) -#copyFileIfNeeded(log, srcPath + "/tempMerged.rbank", installPath + "/" + RbankRbankName + ".rbank") -#copyFileIfNeeded(log, srcPath + "/tempMerged.gr", installPath + "/" + RbankRbankName + ".gr") -#for file in findFiles(log, srcPath, "", ".lr"): -# copyFileIfNeeded(log, srcPath + "/" + file, installPath + "/" + file.replace("tempMerged", RbankRbankName)) -# mkPath(log, ExportBuildDirectory + "/" + rbankBuildDirectory) -# copyFilesNoTreeIfNeeded(log, ExportBuildDirectory + "/" + rbankBuildDirectory, installPath) -#copyFileIfNeeded -printLog(log, "") - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 3_install.py +# \brief Install rbank +# \date 2009-03-10-22-43-GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Install rbank +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite_local import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Install rbank") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +printLog(log, ">>> Install rbank <<<") +installPath = InstallDirectory + "/" + PacsInstallDirectory +mkPath(log, installPath) +srcPath = ExportBuildDirectory + "/" + RbankOutputBuildDirectory +mkPath(log, srcPath) +copyFilesNoTreeIfNeeded(log, srcPath, installPath) +#installPath = InstallDirectory + "/" + PacsInstallDirectory +#mkPath(log, installPath) +#srcPath = ExportBuildDirectory + "/" + RbankRetrieversBuildDirectory +#mkPath(log, srcPath) +#copyFileIfNeeded(log, srcPath + "/tempMerged.rbank", installPath + "/" + RbankRbankName + ".rbank") +#copyFileIfNeeded(log, srcPath + "/tempMerged.gr", installPath + "/" + RbankRbankName + ".gr") +#for file in findFiles(log, srcPath, "", ".lr"): +# copyFileIfNeeded(log, srcPath + "/" + file, installPath + "/" + file.replace("tempMerged", RbankRbankName)) +# mkPath(log, ExportBuildDirectory + "/" + rbankBuildDirectory) +# copyFilesNoTreeIfNeeded(log, ExportBuildDirectory + "/" + rbankBuildDirectory, installPath) +#copyFileIfNeeded +printLog(log, "") + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/rbank/maxscript/cmb_export.ms b/code/nel/tools/build_gamedata/processes/rbank/maxscript/cmb_export.ms old mode 100755 new mode 100644 diff --git a/code/nel/tools/build_gamedata/processes/samplebank/0_setup.py b/code/nel/tools/build_gamedata/processes/samplebank/0_setup.py index 0c9c6c856..9f64d22fd 100644 --- a/code/nel/tools/build_gamedata/processes/samplebank/0_setup.py +++ b/code/nel/tools/build_gamedata/processes/samplebank/0_setup.py @@ -1,64 +1,64 @@ -#!/usr/bin/python -# -# \file 0_setup.py -# \brief Setup samplebank -# \date 2009-06-03 10:47GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Setup samplebank -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Setup samplebank") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -# Setup source directories -printLog(log, ">>> Setup source directories <<<") -mkPath(log, SoundDirectory + "/" + SoundSamplebanksSourceDirectory) - -# Setup export directories -printLog(log, ">>> Setup export directories <<<") - -# Setup build directories -printLog(log, ">>> Setup build directories <<<") -mkPath(log, ExportBuildDirectory + "/" + SoundSamplebanksBuildDirectory) - -# Setup client directories -printLog(log, ">>> Setup client directories <<<") -mkPath(log, InstallDirectory + "/" + SoundInstallDirectory) - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 0_setup.py +# \brief Setup samplebank +# \date 2009-06-03 10:47GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Setup samplebank +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Setup samplebank") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +# Setup source directories +printLog(log, ">>> Setup source directories <<<") +mkPath(log, SoundDirectory + "/" + SoundSamplebanksSourceDirectory) + +# Setup export directories +printLog(log, ">>> Setup export directories <<<") + +# Setup build directories +printLog(log, ">>> Setup build directories <<<") +mkPath(log, ExportBuildDirectory + "/" + SoundSamplebanksBuildDirectory) + +# Setup client directories +printLog(log, ">>> Setup client directories <<<") +mkPath(log, InstallDirectory + "/" + SoundInstallDirectory) + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/samplebank/1_export.py b/code/nel/tools/build_gamedata/processes/samplebank/1_export.py index 9760458b9..640f23282 100644 --- a/code/nel/tools/build_gamedata/processes/samplebank/1_export.py +++ b/code/nel/tools/build_gamedata/processes/samplebank/1_export.py @@ -1,49 +1,49 @@ -#!/usr/bin/python -# -# \file 1_export.py -# \brief Export samplebank -# \date 2009-06-03 10:47GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Export samplebank -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Export samplebank") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 1_export.py +# \brief Export samplebank +# \date 2009-06-03 10:47GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Export samplebank +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Export samplebank") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/samplebank/2_build.py b/code/nel/tools/build_gamedata/processes/samplebank/2_build.py index 447edd468..0e3095bb6 100644 --- a/code/nel/tools/build_gamedata/processes/samplebank/2_build.py +++ b/code/nel/tools/build_gamedata/processes/samplebank/2_build.py @@ -1,72 +1,72 @@ -#!/usr/bin/python -# -# \file 2_build.py -# \brief Build samplebank -# \date 2009-06-03 10:47GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Build samplebank -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Build samplebank") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -# Find tools -BuildSamplebank = findTool(log, ToolDirectories, BuildSamplebankTool, ToolSuffix) -printLog(log, "") - -# For each samplebank directory -printLog(log, ">>> Build samplebank <<<") -if BuildSamplebank == "": - toolLogFail(log, BuildSamplebankTool, ToolSuffix) -else: - sourcePath = SoundDirectory + "/" + SoundSamplebanksSourceDirectory - buildPath = ExportBuildDirectory + "/" + SoundSamplebanksBuildDirectory - mkPath(log, sourcePath) - mkPath(log, buildPath) - for dir in os.listdir(sourcePath): - dirPath = sourcePath + "/" + dir - if (os.path.isdir(dirPath)) and dir != ".svn" and dir != "*.*": - samplebankPath = buildPath + "/" + dir + ".sample_bank" - if needUpdateDirNoSubdirFile(log, dirPath, samplebankPath): - # build_samplebank - subprocess.call([ BuildSamplebank, dirPath, buildPath, dir ]) - else: - printLog(log, "SKIP " + samplebankPath) - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 2_build.py +# \brief Build samplebank +# \date 2009-06-03 10:47GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Build samplebank +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Build samplebank") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +# Find tools +BuildSamplebank = findTool(log, ToolDirectories, BuildSamplebankTool, ToolSuffix) +printLog(log, "") + +# For each samplebank directory +printLog(log, ">>> Build samplebank <<<") +if BuildSamplebank == "": + toolLogFail(log, BuildSamplebankTool, ToolSuffix) +else: + sourcePath = SoundDirectory + "/" + SoundSamplebanksSourceDirectory + buildPath = ExportBuildDirectory + "/" + SoundSamplebanksBuildDirectory + mkPath(log, sourcePath) + mkPath(log, buildPath) + for dir in os.listdir(sourcePath): + dirPath = sourcePath + "/" + dir + if (os.path.isdir(dirPath)) and dir != ".svn" and dir != "*.*": + samplebankPath = buildPath + "/" + dir + ".sample_bank" + if needUpdateDirNoSubdirFile(log, dirPath, samplebankPath): + # build_samplebank + subprocess.call([ BuildSamplebank, dirPath, buildPath, dir ]) + else: + printLog(log, "SKIP " + samplebankPath) + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/samplebank/3_install.py b/code/nel/tools/build_gamedata/processes/samplebank/3_install.py index 104f76681..5ac6962d7 100644 --- a/code/nel/tools/build_gamedata/processes/samplebank/3_install.py +++ b/code/nel/tools/build_gamedata/processes/samplebank/3_install.py @@ -1,55 +1,55 @@ -#!/usr/bin/python -# -# \file 3_install.py -# \brief Install samplebank -# \date 2009-06-03 10:47GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Install samplebank -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Install samplebank") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -printLog(log, ">>> Install samplebank <<<") -mkPath(log, ExportBuildDirectory + "/" + SoundSamplebanksBuildDirectory) -mkPath(log, InstallDirectory + "/" + SoundInstallDirectory) -copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + SoundSamplebanksBuildDirectory, InstallDirectory + "/" + SoundInstallDirectory, ".sample_bank") - -printLog(log, "") -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 3_install.py +# \brief Install samplebank +# \date 2009-06-03 10:47GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Install samplebank +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite_local import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Install samplebank") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +printLog(log, ">>> Install samplebank <<<") +mkPath(log, ExportBuildDirectory + "/" + SoundSamplebanksBuildDirectory) +mkPath(log, InstallDirectory + "/" + SoundInstallDirectory) +copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + SoundSamplebanksBuildDirectory, InstallDirectory + "/" + SoundInstallDirectory, ".sample_bank") + +printLog(log, "") +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/shape/0_setup.py b/code/nel/tools/build_gamedata/processes/shape/0_setup.py old mode 100755 new mode 100644 index 25eabed9e..34fc571a6 --- a/code/nel/tools/build_gamedata/processes/shape/0_setup.py +++ b/code/nel/tools/build_gamedata/processes/shape/0_setup.py @@ -1,84 +1,84 @@ -#!/usr/bin/python -# -# \file 0_setup.py -# \brief setup shape -# \date 2010-05-24 13:42GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Setup shape -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Setup shape") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -# Setup source directories -printLog(log, ">>> Setup source directories <<<") -for dir in ShapeSourceDirectories: - mkPath(log, DatabaseDirectory + "/" + dir) - -# Setup pipeline lookup directories -printLog(log, ">>> Setup pipeline lookup directories <<<") -for dir in MapLookupDirectories: - mkPath(log, ExportBuildDirectory + "/" + dir) - -# Setup export directories -printLog(log, ">>> Setup export directories <<<") -mkPath(log, ExportBuildDirectory + "/" + ShapeTagExportDirectory) -mkPath(log, ExportBuildDirectory + "/" + ShapeNotOptimizedExportDirectory) -mkPath(log, ExportBuildDirectory + "/" + ShapeWithCoarseMeshExportDirectory) -mkPath(log, ExportBuildDirectory + "/" + ShapeLightmapNotOptimizedExportDirectory) -mkPath(log, ExportBuildDirectory + "/" + ShapeAnimExportDirectory) -if ClodConfigFile != "": - mkPath(log, ExportBuildDirectory + "/" + ClodExportDirectory) -if BuildShadowSkinEnabled: - mkPath(log, ExportBuildDirectory + "/" + ShapeShadowSkinBuildDirectory) - -# Setup build directories -printLog(log, ">>> Setup build directories <<<") -mkPath(log, ExportBuildDirectory + "/" + ShapeClodtexBuildDirectory) -mkPath(log, ExportBuildDirectory + "/" + ShapeWithCoarseMeshBuildDirectory) -mkPath(log, ExportBuildDirectory + "/" + ShapeOptimizedBuildDirectory) -mkPath(log, ExportBuildDirectory + "/" + ShapeLightmapBuildDirectory) -mkPath(log, ExportBuildDirectory + "/" + ShapeLightmap16BitsBuildDirectory) - -# Setup client directories -printLog(log, ">>> Setup client directories <<<") -mkPath(log, InstallDirectory + "/" + ShapeInstallDirectory) -mkPath(log, InstallDirectory + "/" + LightmapInstallDirectory) - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 0_setup.py +# \brief setup shape +# \date 2010-05-24 13:42GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Setup shape +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Setup shape") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +# Setup source directories +printLog(log, ">>> Setup source directories <<<") +for dir in ShapeSourceDirectories: + mkPath(log, DatabaseDirectory + "/" + dir) + +# Setup pipeline lookup directories +printLog(log, ">>> Setup pipeline lookup directories <<<") +for dir in MapLookupDirectories: + mkPath(log, ExportBuildDirectory + "/" + dir) + +# Setup export directories +printLog(log, ">>> Setup export directories <<<") +mkPath(log, ExportBuildDirectory + "/" + ShapeTagExportDirectory) +mkPath(log, ExportBuildDirectory + "/" + ShapeNotOptimizedExportDirectory) +mkPath(log, ExportBuildDirectory + "/" + ShapeWithCoarseMeshExportDirectory) +mkPath(log, ExportBuildDirectory + "/" + ShapeLightmapNotOptimizedExportDirectory) +mkPath(log, ExportBuildDirectory + "/" + ShapeAnimExportDirectory) +if ClodConfigFile != "": + mkPath(log, ExportBuildDirectory + "/" + ClodExportDirectory) +if BuildShadowSkinEnabled: + mkPath(log, ExportBuildDirectory + "/" + ShapeShadowSkinBuildDirectory) + +# Setup build directories +printLog(log, ">>> Setup build directories <<<") +mkPath(log, ExportBuildDirectory + "/" + ShapeClodtexBuildDirectory) +mkPath(log, ExportBuildDirectory + "/" + ShapeWithCoarseMeshBuildDirectory) +mkPath(log, ExportBuildDirectory + "/" + ShapeOptimizedBuildDirectory) +mkPath(log, ExportBuildDirectory + "/" + ShapeLightmapBuildDirectory) +mkPath(log, ExportBuildDirectory + "/" + ShapeLightmap16BitsBuildDirectory) + +# Setup client directories +printLog(log, ">>> Setup client directories <<<") +mkPath(log, InstallDirectory + "/" + ShapeInstallDirectory) +mkPath(log, InstallDirectory + "/" + LightmapInstallDirectory) + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/shape/1_export.py b/code/nel/tools/build_gamedata/processes/shape/1_export.py old mode 100755 new mode 100644 index f30338264..b230fdc7c --- a/code/nel/tools/build_gamedata/processes/shape/1_export.py +++ b/code/nel/tools/build_gamedata/processes/shape/1_export.py @@ -1,156 +1,156 @@ -#!/usr/bin/python -# -# \file 1_export.py -# \brief Export shape -# \date 2010-09-20-18-35-GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Export shape -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -import time, sys, os, shutil, subprocess, distutils.dir_util -sys.path.append("../../configuration") - -if os.path.isfile("log.log"): - os.remove("log.log") -if os.path.isfile("temp_log.log"): - os.remove("temp_log.log") -log = open("temp_log.log", "w") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Export shape") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -# Override config values for draft mode -if BuildQuality == 0: - ShapeExportOptExportLighting = "false" - ShapeExportOptShadow = "false" - ShapeExportOptLightingLimit = 0 - ShapeExportOptLumelSize = "0.25" - ShapeExportOptOversampling = 1 - - -# Find tools -# ... - -# Export shape 3dsmax -if MaxAvailable: - # Find tools - Max = findMax(log, MaxDirectory, MaxExecutable) - printLog(log, "") - - printLog(log, ">>> Export shape 3dsmax <<<") - tagDirectory = ExportBuildDirectory + "/" + ShapeTagExportDirectory - mkPath(log, tagDirectory) - outDirWithoutCoarse = ExportBuildDirectory + "/" + ShapeNotOptimizedExportDirectory - mkPath(log, outDirWithoutCoarse) - outDirWithCoarse = ExportBuildDirectory + "/" + ShapeWithCoarseMeshExportDirectory - mkPath(log, outDirWithCoarse) - outDirLightmap = ExportBuildDirectory + "/" + ShapeLightmapNotOptimizedExportDirectory - mkPath(log, outDirLightmap) - outDirAnim = ExportBuildDirectory + "/" + ShapeAnimExportDirectory - mkPath(log, outDirAnim) - for dir in ShapeSourceDirectories: - mkPath(log, DatabaseDirectory + "/" + dir) - if (needUpdateDirByTagLog(log, DatabaseDirectory + "/" + dir, ".max", ExportBuildDirectory + "/" + ShapeTagExportDirectory, ".max.tag")): - scriptSrc = "maxscript/shape_export.ms" - scriptDst = MaxUserDirectory + "/scripts/shape_export.ms" - outputLogfile = ScriptDirectory + "/processes/shape/log.log" - maxRunningTagFile = tagDirectory + "/max_running.tag" - maxSourceDir = DatabaseDirectory + "/" + dir - tagList = findFiles(log, tagDirectory, "", ".max.tag") - tagLen = len(tagList) - if os.path.isfile(scriptDst): - os.remove(scriptDst) - tagDiff = 1 - sSrc = open(scriptSrc, "r") - sDst = open(scriptDst, "w") - for line in sSrc: - newline = line.replace("%OutputLogfile%", outputLogfile) - newline = newline.replace("%MaxSourceDirectory%", maxSourceDir) - newline = newline.replace("%TagDirectory%", tagDirectory) - newline = newline.replace("%OutputDirectoryWithoutCoarseMesh%", outDirWithoutCoarse) - newline = newline.replace("%OutputDirectoryWithCoarseMesh%", outDirWithCoarse) - newline = newline.replace("%OutputDirectoryLightmap%", outDirLightmap) - newline = newline.replace("%OutputDirectoryAnim%", outDirAnim) - newline = newline.replace("%ShapeExportOptExportLighting%", ShapeExportOptExportLighting) - newline = newline.replace("%ShapeExportOptShadow%", ShapeExportOptShadow) - newline = newline.replace("%ShapeExportOptLightingLimit%", str(ShapeExportOptLightingLimit)) - newline = newline.replace("%ShapeExportOptLumelSize%", ShapeExportOptLumelSize) - newline = newline.replace("%ShapeExportOptOversampling%", str(ShapeExportOptOversampling)) - newline = newline.replace("%ShapeExportOptLightmapLog%", ShapeExportOptLightmapLog) - sDst.write(newline) - sSrc.close() - sDst.close() - zeroRetryLimit = 3 - while tagDiff > 0: - mrt = open(maxRunningTagFile, "w") - mrt.write("moe-moe-kyun") - mrt.close() - printLog(log, "MAXSCRIPT " + scriptDst) - subprocess.call([ Max, "-U", "MAXScript", "shape_export.ms", "-q", "-mi", "-mip" ]) - if os.path.exists(outputLogfile): - try: - lSrc = open(outputLogfile, "r") - for line in lSrc: - lineStrip = line.strip() - if (len(lineStrip) > 0): - printLog(log, lineStrip) - lSrc.close() - os.remove(outputLogfile) - except Exception: - printLog(log, "ERROR Failed to read 3dsmax log") - else: - printLog(log, "WARNING No 3dsmax log") - tagList = findFiles(log, tagDirectory, "", ".max.tag") - newTagLen = len(tagList) - tagDiff = newTagLen - tagLen - tagLen = newTagLen - addTagDiff = 0 - if os.path.exists(maxRunningTagFile): - printLog(log, "FAIL 3ds Max crashed and/or file export failed!") - if tagDiff == 0: - if zeroRetryLimit > 0: - zeroRetryLimit = zeroRetryLimit - 1 - addTagDiff = 1 - else: - printLog(log, "FAIL Retry limit reached!") - else: - addTagDiff = 1 - os.remove(maxRunningTagFile) - printLog(log, "Exported " + str(tagDiff) + " .max files!") - tagDiff += addTagDiff - os.remove(scriptDst) - printLog(log, "") - -log.close() -if os.path.isfile("log.log"): - os.remove("log.log") -shutil.move("temp_log.log", "log.log") - - -# end of file +#!/usr/bin/python +# +# \file 1_export.py +# \brief Export shape +# \date 2010-09-20-18-35-GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Export shape +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +import time, sys, os, shutil, subprocess, distutils.dir_util +sys.path.append("../../configuration") + +if os.path.isfile("log.log"): + os.remove("log.log") +if os.path.isfile("temp_log.log"): + os.remove("temp_log.log") +log = open("temp_log.log", "w") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Export shape") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +# Override config values for draft mode +if BuildQuality == 0: + ShapeExportOptExportLighting = "false" + ShapeExportOptShadow = "false" + ShapeExportOptLightingLimit = 0 + ShapeExportOptLumelSize = "0.25" + ShapeExportOptOversampling = 1 + + +# Find tools +# ... + +# Export shape 3dsmax +if MaxAvailable: + # Find tools + Max = findMax(log, MaxDirectory, MaxExecutable) + printLog(log, "") + + printLog(log, ">>> Export shape 3dsmax <<<") + tagDirectory = ExportBuildDirectory + "/" + ShapeTagExportDirectory + mkPath(log, tagDirectory) + outDirWithoutCoarse = ExportBuildDirectory + "/" + ShapeNotOptimizedExportDirectory + mkPath(log, outDirWithoutCoarse) + outDirWithCoarse = ExportBuildDirectory + "/" + ShapeWithCoarseMeshExportDirectory + mkPath(log, outDirWithCoarse) + outDirLightmap = ExportBuildDirectory + "/" + ShapeLightmapNotOptimizedExportDirectory + mkPath(log, outDirLightmap) + outDirAnim = ExportBuildDirectory + "/" + ShapeAnimExportDirectory + mkPath(log, outDirAnim) + for dir in ShapeSourceDirectories: + mkPath(log, DatabaseDirectory + "/" + dir) + if (needUpdateDirByTagLog(log, DatabaseDirectory + "/" + dir, ".max", ExportBuildDirectory + "/" + ShapeTagExportDirectory, ".max.tag")): + scriptSrc = "maxscript/shape_export.ms" + scriptDst = MaxUserDirectory + "/scripts/shape_export.ms" + outputLogfile = ScriptDirectory + "/processes/shape/log.log" + maxRunningTagFile = tagDirectory + "/max_running.tag" + maxSourceDir = DatabaseDirectory + "/" + dir + tagList = findFiles(log, tagDirectory, "", ".max.tag") + tagLen = len(tagList) + if os.path.isfile(scriptDst): + os.remove(scriptDst) + tagDiff = 1 + sSrc = open(scriptSrc, "r") + sDst = open(scriptDst, "w") + for line in sSrc: + newline = line.replace("%OutputLogfile%", outputLogfile) + newline = newline.replace("%MaxSourceDirectory%", maxSourceDir) + newline = newline.replace("%TagDirectory%", tagDirectory) + newline = newline.replace("%OutputDirectoryWithoutCoarseMesh%", outDirWithoutCoarse) + newline = newline.replace("%OutputDirectoryWithCoarseMesh%", outDirWithCoarse) + newline = newline.replace("%OutputDirectoryLightmap%", outDirLightmap) + newline = newline.replace("%OutputDirectoryAnim%", outDirAnim) + newline = newline.replace("%ShapeExportOptExportLighting%", ShapeExportOptExportLighting) + newline = newline.replace("%ShapeExportOptShadow%", ShapeExportOptShadow) + newline = newline.replace("%ShapeExportOptLightingLimit%", str(ShapeExportOptLightingLimit)) + newline = newline.replace("%ShapeExportOptLumelSize%", ShapeExportOptLumelSize) + newline = newline.replace("%ShapeExportOptOversampling%", str(ShapeExportOptOversampling)) + newline = newline.replace("%ShapeExportOptLightmapLog%", ShapeExportOptLightmapLog) + sDst.write(newline) + sSrc.close() + sDst.close() + zeroRetryLimit = 3 + while tagDiff > 0: + mrt = open(maxRunningTagFile, "w") + mrt.write("moe-moe-kyun") + mrt.close() + printLog(log, "MAXSCRIPT " + scriptDst) + subprocess.call([ Max, "-U", "MAXScript", "shape_export.ms", "-q", "-mi", "-mip" ]) + if os.path.exists(outputLogfile): + try: + lSrc = open(outputLogfile, "r") + for line in lSrc: + lineStrip = line.strip() + if (len(lineStrip) > 0): + printLog(log, lineStrip) + lSrc.close() + os.remove(outputLogfile) + except Exception: + printLog(log, "ERROR Failed to read 3dsmax log") + else: + printLog(log, "WARNING No 3dsmax log") + tagList = findFiles(log, tagDirectory, "", ".max.tag") + newTagLen = len(tagList) + tagDiff = newTagLen - tagLen + tagLen = newTagLen + addTagDiff = 0 + if os.path.exists(maxRunningTagFile): + printLog(log, "FAIL 3ds Max crashed and/or file export failed!") + if tagDiff == 0: + if zeroRetryLimit > 0: + zeroRetryLimit = zeroRetryLimit - 1 + addTagDiff = 1 + else: + printLog(log, "FAIL Retry limit reached!") + else: + addTagDiff = 1 + os.remove(maxRunningTagFile) + printLog(log, "Exported " + str(tagDiff) + " .max files!") + tagDiff += addTagDiff + os.remove(scriptDst) + printLog(log, "") + +log.close() +if os.path.isfile("log.log"): + os.remove("log.log") +shutil.move("temp_log.log", "log.log") + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/shape/2_build.py b/code/nel/tools/build_gamedata/processes/shape/2_build.py old mode 100755 new mode 100644 index f261473fe..3881a35ec --- a/code/nel/tools/build_gamedata/processes/shape/2_build.py +++ b/code/nel/tools/build_gamedata/processes/shape/2_build.py @@ -1,191 +1,198 @@ -#!/usr/bin/python -# -# \file 2_build.py -# \brief Build shape -# \date 2010-05-24 13:42GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Build shape -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Build shape") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -# Find tools -ExecTimeout = findTool(log, ToolDirectories, ExecTimeoutTool, ToolSuffix) -BuildShadowSkin = findTool(log, ToolDirectories, BuildShadowSkinTool, ToolSuffix) -BuildClodtex = findTool(log, ToolDirectories, BuildClodtexTool, ToolSuffix) -LightmapOptimizer = findTool(log, ToolDirectories, LightmapOptimizerTool, ToolSuffix) -TgaToDds = findTool(log, ToolDirectories, TgaToDdsTool, ToolSuffix) -BuildCoarseMesh = findTool(log, ToolDirectories, BuildCoarseMeshTool, ToolSuffix) - -shapeDirectory = ExportBuildDirectory + "/" + ShapeNotOptimizedExportDirectory -if BuildShadowSkinEnabled: - mkPath(log, shapeDirectory) - shadowSkinBuildDirectory = ExportBuildDirectory + "/" + ShapeShadowSkinBuildDirectory - printLog(log, ">>> BuildShadowSkin <<<") - shadowSkinShapes = findFilesNoSubdir(log, shapeDirectory, ".shape") - for shadowSkinShape in shadowSkinShapes: - srcShape = shapeDirectory + "/" + shadowSkinShape - dstShape = shadowSkinBuildDirectory + "/" + shadowSkinShape - if needUpdateLogRemoveDest(log, srcShape, dstShape): - subprocess.call([ BuildShadowSkin, srcShape, dstShape, str(BuildShadowSkinRatio), str(BuildShadowSkinMaxface) ]) - shapeDirectory = shadowSkinBuildDirectory - -mkPath(log, shapeDirectory) -mkPath(log, ExportBuildDirectory + "/" + ShapeClodtexBuildDirectory) -if ClodConfigFile != "": - mkPath(log, ExportBuildDirectory + "/" + ClodExportDirectory) - printLog(log, ">>> Build CLodTex <<<") - subprocess.call([ BuildClodtex, "-d", DatabaseDirectory + "/" + ClodConfigFile, ExportBuildDirectory + "/" + ClodExportDirectory, shapeDirectory, ExportBuildDirectory + "/" + ShapeClodtexBuildDirectory ]) -else: - printLog(log, ">>> Copy Shape <<<") - copyFilesExtNoTreeIfNeeded(log, shapeDirectory, ExportBuildDirectory + "/" + ShapeClodtexBuildDirectory, ".shape") - -# copy lightmap_not_optimized to lightmap -printLog(log, ">>> Optimize lightmaps <<<") -loPathLightmapsOriginal = ExportBuildDirectory + "/" + ShapeLightmapNotOptimizedExportDirectory -loPathShapesOriginal = ExportBuildDirectory + "/" + ShapeClodtexBuildDirectory -mkPath(log, loPathLightmapsOriginal) -loPathLightmaps = ExportBuildDirectory + "/" + ShapeLightmapBuildDirectory -loPathShapes = ExportBuildDirectory + "/" + ShapeOptimizedBuildDirectory -loPathTags = ExportBuildDirectory + "/" + ShapeTagExportDirectory -mkPath(log, loPathLightmaps) -mkPath(log, loPathShapes) -mkPath(log, loPathTags) -if needUpdateDirByTagLog(log, loPathLightmapsOriginal, ".txt", loPathLightmaps, ".txt") or needUpdateDirNoSubdir(log, loPathLightmapsOriginal, loPathLightmaps) or needUpdateDirNoSubdir(log, loPathShapesOriginal, loPathShapes) or needUpdateDirNoSubdir(log, loPathShapes, loPathLightmaps) or needUpdateDirNoSubdir(log, loPathTags, loPathLightmaps): - removeFilesRecursive(log, loPathLightmaps) - copyFiles(log, loPathLightmapsOriginal, loPathLightmaps) - removeFilesRecursive(log, loPathShapes) - copyFiles(log, loPathShapesOriginal, loPathShapes) - # Optimize lightmaps if any. Additionnaly, output a file indicating which lightmaps are 8 bits - # lightmap_optimizer [path_tags] [path_flag8bit] - subprocess.call([ LightmapOptimizer, loPathLightmaps, loPathShapes, loPathTags, ExportBuildDirectory + "/" + ShapeLightmapBuildDirectory + "/list_lm_8bit.txt" ]) -else: - printLog(log, "SKIP *") - -# Convert lightmap in 16 bits mode if they are not 8 bits lightmap -printLog(log, ">>> Convert lightmaps in 16 or 8 bits <<<") -mkPath(log, ExportBuildDirectory + "/" + ShapeLightmapBuildDirectory) -mkPath(log, ExportBuildDirectory + "/" + ShapeLightmap16BitsBuildDirectory) -lightMapTgas = findFilesNoSubdir(log, ExportBuildDirectory + "/" + ShapeLightmapBuildDirectory, ".tga") -listLm8Bit = [ ] -listLm8BitFile = open(ExportBuildDirectory + "/" + ShapeLightmapBuildDirectory + "/list_lm_8bit.txt", "r") -for line in listLm8BitFile: - lineStrip = line.strip() - if (len(lineStrip) > 0): - listLm8Bit += [ lineStrip ] -for lightMapTga in lightMapTgas: - srcTga = ExportBuildDirectory + "/" + ShapeLightmapBuildDirectory + "/" + lightMapTga - dstTga = ExportBuildDirectory + "/" + ShapeLightmap16BitsBuildDirectory + "/" + lightMapTga - if needUpdateLogRemoveDest(log, srcTga, dstTga): - if lightMapTga in listLm8Bit: # THIS MAY NOT WORK, PLEASE VERIFY CONTENTS OF list_lm_8bit.txt!!! - subprocess.call([ TgaToDds, srcTga, "-o", dstTga, "-a", "tga8" ]) - else: - subprocess.call([ TgaToDds, srcTga, "-o", dstTga, "-a", "tga16" ]) - -# Corse meshes for this process ? -if len(CoarseMeshTextureNames) > 0: - printLog(log, ">>> Build coarse meshes <<<") - shapeWithCoarseMesh = ExportBuildDirectory + "/" + ShapeWithCoarseMeshExportDirectory - mkPath(log, shapeWithCoarseMesh) - shapeWithCoarseMeshBuilded = ExportBuildDirectory + "/" + ShapeWithCoarseMeshBuildDirectory - mkPath(log, shapeWithCoarseMeshBuilded) - # This builds from shapeWithCoarseMesh .shape to shapeWithCoarseMesh .tga - # And from shapeWithCoarseMesh .shape to shapeWithCoarseMeshBuilded .shape - # Then builds from shapeWithCoarseMesh .tga to shapeWithCoarseMeshBuilded .tga - # Depends on MapLookupDirectories - needUpdateMaps = needUpdateMultiDirNoSubdirMultiFileExt(log, ExportBuildDirectory, MapLookupDirectories, shapeWithCoarseMesh, CoarseMeshTextureNames, ".tga") or needUpdateMultiDirNoSubdir(log, ExportBuildDirectory, MapLookupDirectories, shapeWithCoarseMeshBuilded) - if needUpdateMaps: - printLog(log, "DETECT UPDATE Maps->*") - else: - printLog(log, "DETECT SKIP Maps->*") - needUpdateShapeShape = needUpdateDirByTagLog(log, shapeWithCoarseMesh, ".shape", shapeWithCoarseMeshBuilded, ".shape") - if needUpdateShapeShape: - printLog(log, "DETECT UPDATE Shape->Shape") - else: - printLog(log, "DETECT SKIP Shape->Shape") - needUpdateShapeCoarse = needUpdateDirNoSubdirExtMultiFileExt(log, shapeWithCoarseMesh, ".shape", shapeWithCoarseMesh, CoarseMeshTextureNames, ".tga") - if needUpdateShapeCoarse: - printLog(log, "DETECT UPDATE Shape->Coarse") - else: - printLog(log, "DETECT SKIP Shape->Coarse") - if needUpdateMaps or needUpdateShapeShape or needUpdateShapeCoarse: - cf = open("config_generated.cfg", "w") - cf.write("texture_mul_size = " + TextureMulSizeValue + ";\n") - cf.write("\n") - cf.write("search_path = \n") - cf.write("{\n") - cf.write("\t\"" + shapeWithCoarseMesh + "\", \n") - for dir in MapLookupDirectories: - cf.write("\t\"" + ExportBuildDirectory + "/" + dir + "\", \n") - cf.write("};\n") - cf.write("\n") - cf.write("list_mesh = \n") - cf.write("{\n") - # For each shape with coarse mesh - files = findFiles(log, shapeWithCoarseMesh, "", ".shape") - for file in files: - sourceFile = shapeWithCoarseMesh + "/" + file - if os.path.isfile(sourceFile): - destFile = shapeWithCoarseMeshBuilded + "/" + file - cf.write("\t\"" + file + "\", \"" + destFile + "\", \n") - cf.write("};\n") - cf.write("\n") - cf.write("output_textures = \n") - cf.write("{\n") - # For each shape with coarse mesh - for tn in CoarseMeshTextureNames: - cf.write("\t\"" + shapeWithCoarseMesh + "/" + tn + ".tga\", \n") - cf.write("};\n") - cf.close() - subprocess.call([ BuildCoarseMesh, "config_generated.cfg" ]) - os.remove("config_generated.cfg") - needUpdateCoarse = needUpdateDirNoSubdirExtMultiFileExt(log, shapeWithCoarseMesh, ".tga", shapeWithCoarseMeshBuilded, CoarseMeshTextureNames, ".dds") - if needUpdateCoarse: - printLog(log, "DETECT UPDATE Coarse->DDS") - else: - printLog(log, "DETECT SKIP Coarse->DDS") - # Convert the coarse texture to dds - if needUpdateCoarse: - for tn in CoarseMeshTextureNames: - subprocess.call([ TgaToDds, shapeWithCoarseMesh + "/" + tn + ".tga", "-o", shapeWithCoarseMeshBuilded + "/" + tn + ".dds", "-a", "5" ]) -else: - printLog(log, ">>> No coarse meshes <<<") - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 2_build.py +# \brief Build shape +# \date 2010-05-24 13:42GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Build shape +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Build shape") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +# Find tools +ExecTimeout = findTool(log, ToolDirectories, ExecTimeoutTool, ToolSuffix) +BuildShadowSkin = findTool(log, ToolDirectories, BuildShadowSkinTool, ToolSuffix) +BuildClodtex = findTool(log, ToolDirectories, BuildClodtexTool, ToolSuffix) +LightmapOptimizer = findTool(log, ToolDirectories, LightmapOptimizerTool, ToolSuffix) +TgaToDds = findTool(log, ToolDirectories, TgaToDdsTool, ToolSuffix) +BuildCoarseMesh = findTool(log, ToolDirectories, BuildCoarseMeshTool, ToolSuffix) + +shapeDirectory = ExportBuildDirectory + "/" + ShapeNotOptimizedExportDirectory +if BuildShadowSkinEnabled: + mkPath(log, shapeDirectory) + shadowSkinBuildDirectory = ExportBuildDirectory + "/" + ShapeShadowSkinBuildDirectory + printLog(log, ">>> BuildShadowSkin <<<") + shadowSkinShapes = findFilesNoSubdir(log, shapeDirectory, ".shape") + for shadowSkinShape in shadowSkinShapes: + srcShape = shapeDirectory + "/" + shadowSkinShape + dstShape = shadowSkinBuildDirectory + "/" + shadowSkinShape + if needUpdateLogRemoveDest(log, srcShape, dstShape): + subprocess.call([ BuildShadowSkin, srcShape, dstShape, str(BuildShadowSkinRatio), str(BuildShadowSkinMaxface) ]) + shapeDirectory = shadowSkinBuildDirectory + +mkPath(log, shapeDirectory) +mkPath(log, ExportBuildDirectory + "/" + ShapeClodtexBuildDirectory) +if ClodConfigFile != "": + mkPath(log, ExportBuildDirectory + "/" + ClodExportDirectory) + printLog(log, ">>> Build CLodTex <<<") + subprocess.call([ BuildClodtex, "-d", DatabaseDirectory + "/" + ClodConfigFile, ExportBuildDirectory + "/" + ClodExportDirectory, shapeDirectory, ExportBuildDirectory + "/" + ShapeClodtexBuildDirectory ]) +else: + printLog(log, ">>> Copy Shape <<<") + copyFilesExtNoTreeIfNeeded(log, shapeDirectory, ExportBuildDirectory + "/" + ShapeClodtexBuildDirectory, ".shape") + +printLog(log, ">>> Copy non-ShadowSkin non-CLodTex Shape <<<") +shapeDirectory = ExportBuildDirectory + "/" + ShapeNotOptimizedExportDirectory +mkPath(log, shapeDirectory) +mkPath(log, ExportBuildDirectory + "/" + ShapeClodtexBuildDirectory) +copyFilesExtNoTreeIfNeeded(log, shapeDirectory, ExportBuildDirectory + "/" + ShapeClodtexBuildDirectory, ".shape") +shapeDirectory = ExportBuildDirectory + "/" + ShapeClodtexBuildDirectory + +# copy lightmap_not_optimized to lightmap +printLog(log, ">>> Optimize lightmaps <<<") +loPathLightmapsOriginal = ExportBuildDirectory + "/" + ShapeLightmapNotOptimizedExportDirectory +loPathShapesOriginal = ExportBuildDirectory + "/" + ShapeClodtexBuildDirectory +mkPath(log, loPathLightmapsOriginal) +loPathLightmaps = ExportBuildDirectory + "/" + ShapeLightmapBuildDirectory +loPathShapes = ExportBuildDirectory + "/" + ShapeOptimizedBuildDirectory +loPathTags = ExportBuildDirectory + "/" + ShapeTagExportDirectory +mkPath(log, loPathLightmaps) +mkPath(log, loPathShapes) +mkPath(log, loPathTags) +if needUpdateDirByTagLog(log, loPathLightmapsOriginal, ".txt", loPathLightmaps, ".txt") or needUpdateDirNoSubdir(log, loPathLightmapsOriginal, loPathLightmaps) or needUpdateDirNoSubdir(log, loPathShapesOriginal, loPathShapes) or needUpdateDirNoSubdir(log, loPathShapes, loPathLightmaps) or needUpdateDirNoSubdir(log, loPathTags, loPathLightmaps): + removeFilesRecursive(log, loPathLightmaps) + copyFiles(log, loPathLightmapsOriginal, loPathLightmaps) + removeFilesRecursive(log, loPathShapes) + copyFiles(log, loPathShapesOriginal, loPathShapes) + # Optimize lightmaps if any. Additionnaly, output a file indicating which lightmaps are 8 bits + # lightmap_optimizer [path_tags] [path_flag8bit] + subprocess.call([ LightmapOptimizer, loPathLightmaps, loPathShapes, loPathTags, ExportBuildDirectory + "/" + ShapeLightmapBuildDirectory + "/list_lm_8bit.txt" ]) +else: + printLog(log, "SKIP *") + +# Convert lightmap in 16 bits mode if they are not 8 bits lightmap +printLog(log, ">>> Convert lightmaps in 16 or 8 bits <<<") +mkPath(log, ExportBuildDirectory + "/" + ShapeLightmapBuildDirectory) +mkPath(log, ExportBuildDirectory + "/" + ShapeLightmap16BitsBuildDirectory) +lightMapTgas = findFilesNoSubdir(log, ExportBuildDirectory + "/" + ShapeLightmapBuildDirectory, ".tga") +listLm8Bit = [ ] +listLm8BitFile = open(ExportBuildDirectory + "/" + ShapeLightmapBuildDirectory + "/list_lm_8bit.txt", "r") +for line in listLm8BitFile: + lineStrip = line.strip() + if (len(lineStrip) > 0): + listLm8Bit += [ lineStrip ] +for lightMapTga in lightMapTgas: + srcTga = ExportBuildDirectory + "/" + ShapeLightmapBuildDirectory + "/" + lightMapTga + dstTga = ExportBuildDirectory + "/" + ShapeLightmap16BitsBuildDirectory + "/" + lightMapTga + if needUpdateLogRemoveDest(log, srcTga, dstTga): + if lightMapTga in listLm8Bit: # THIS MAY NOT WORK, PLEASE VERIFY CONTENTS OF list_lm_8bit.txt!!! + subprocess.call([ TgaToDds, srcTga, "-o", dstTga, "-a", "tga8" ]) + else: + subprocess.call([ TgaToDds, srcTga, "-o", dstTga, "-a", "tga16" ]) + +# Corse meshes for this process ? +if len(CoarseMeshTextureNames) > 0: + printLog(log, ">>> Build coarse meshes <<<") + shapeWithCoarseMesh = ExportBuildDirectory + "/" + ShapeWithCoarseMeshExportDirectory + mkPath(log, shapeWithCoarseMesh) + shapeWithCoarseMeshBuilded = ExportBuildDirectory + "/" + ShapeWithCoarseMeshBuildDirectory + mkPath(log, shapeWithCoarseMeshBuilded) + # This builds from shapeWithCoarseMesh .shape to shapeWithCoarseMesh .tga + # And from shapeWithCoarseMesh .shape to shapeWithCoarseMeshBuilded .shape + # Then builds from shapeWithCoarseMesh .tga to shapeWithCoarseMeshBuilded .tga + # Depends on MapLookupDirectories + needUpdateMaps = needUpdateMultiDirNoSubdirMultiFileExt(log, ExportBuildDirectory, MapLookupDirectories, shapeWithCoarseMesh, CoarseMeshTextureNames, ".tga") or needUpdateMultiDirNoSubdir(log, ExportBuildDirectory, MapLookupDirectories, shapeWithCoarseMeshBuilded) + if needUpdateMaps: + printLog(log, "DETECT UPDATE Maps->*") + else: + printLog(log, "DETECT SKIP Maps->*") + needUpdateShapeShape = needUpdateDirByTagLog(log, shapeWithCoarseMesh, ".shape", shapeWithCoarseMeshBuilded, ".shape") + if needUpdateShapeShape: + printLog(log, "DETECT UPDATE Shape->Shape") + else: + printLog(log, "DETECT SKIP Shape->Shape") + needUpdateShapeCoarse = needUpdateDirNoSubdirExtMultiFileExt(log, shapeWithCoarseMesh, ".shape", shapeWithCoarseMesh, CoarseMeshTextureNames, ".tga") + if needUpdateShapeCoarse: + printLog(log, "DETECT UPDATE Shape->Coarse") + else: + printLog(log, "DETECT SKIP Shape->Coarse") + if needUpdateMaps or needUpdateShapeShape or needUpdateShapeCoarse: + cf = open("config_generated.cfg", "w") + cf.write("texture_mul_size = " + TextureMulSizeValue + ";\n") + cf.write("\n") + cf.write("search_path = \n") + cf.write("{\n") + cf.write("\t\"" + shapeWithCoarseMesh + "\", \n") + for dir in MapLookupDirectories: + cf.write("\t\"" + ExportBuildDirectory + "/" + dir + "\", \n") + cf.write("};\n") + cf.write("\n") + cf.write("list_mesh = \n") + cf.write("{\n") + # For each shape with coarse mesh + files = findFiles(log, shapeWithCoarseMesh, "", ".shape") + for file in files: + sourceFile = shapeWithCoarseMesh + "/" + file + if os.path.isfile(sourceFile): + destFile = shapeWithCoarseMeshBuilded + "/" + file + cf.write("\t\"" + file + "\", \"" + destFile + "\", \n") + cf.write("};\n") + cf.write("\n") + cf.write("output_textures = \n") + cf.write("{\n") + # For each shape with coarse mesh + for tn in CoarseMeshTextureNames: + cf.write("\t\"" + shapeWithCoarseMesh + "/" + tn + ".tga\", \n") + cf.write("};\n") + cf.close() + subprocess.call([ BuildCoarseMesh, "config_generated.cfg" ]) + os.remove("config_generated.cfg") + needUpdateCoarse = needUpdateDirNoSubdirExtMultiFileExt(log, shapeWithCoarseMesh, ".tga", shapeWithCoarseMeshBuilded, CoarseMeshTextureNames, ".dds") + if needUpdateCoarse: + printLog(log, "DETECT UPDATE Coarse->DDS") + else: + printLog(log, "DETECT SKIP Coarse->DDS") + # Convert the coarse texture to dds + if needUpdateCoarse: + for tn in CoarseMeshTextureNames: + subprocess.call([ TgaToDds, shapeWithCoarseMesh + "/" + tn + ".tga", "-o", shapeWithCoarseMeshBuilded + "/" + tn + ".dds", "-a", "5" ]) +else: + printLog(log, ">>> No coarse meshes <<<") + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/shape/3_install.py b/code/nel/tools/build_gamedata/processes/shape/3_install.py old mode 100755 new mode 100644 index d96770c28..f461ee4f7 --- a/code/nel/tools/build_gamedata/processes/shape/3_install.py +++ b/code/nel/tools/build_gamedata/processes/shape/3_install.py @@ -1,70 +1,70 @@ -#!/usr/bin/python -# -# \file 3_install.py -# \brief Install shape -# \date 2010-05-24 13:42GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Install shape -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Install shape") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -printLog(log, ">>> Install shape <<<") -installPath = InstallDirectory + "/" + ShapeInstallDirectory -mkPath(log, installPath) -mkPath(log, ExportBuildDirectory + "/" + ShapeOptimizedBuildDirectory) -copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + ShapeOptimizedBuildDirectory, installPath, ".shape") -mkPath(log, ExportBuildDirectory + "/" + ShapeWithCoarseMeshBuildDirectory) -copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + ShapeWithCoarseMeshBuildDirectory, installPath, ".shape") -copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + ShapeWithCoarseMeshBuildDirectory, installPath, ".dds") - -mkPath(log, ExportBuildDirectory + "/" + ShapeAnimExportDirectory) -copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + ShapeAnimExportDirectory, installPath, ".anim") - -# ls anim | grep ".anim" >> $client_directory/auto_animations_list.txt - -printLog(log, ">>> Install shape lightmaps <<<") -installPath = InstallDirectory + "/" + LightmapInstallDirectory -mkPath(log, installPath) -mkPath(log, ExportBuildDirectory + "/" + ShapeLightmap16BitsBuildDirectory) -copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + ShapeLightmap16BitsBuildDirectory, installPath, ".tga") - -printLog(log, "") -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 3_install.py +# \brief Install shape +# \date 2010-05-24 13:42GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Install shape +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite_local import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Install shape") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +printLog(log, ">>> Install shape <<<") +installPath = InstallDirectory + "/" + ShapeInstallDirectory +mkPath(log, installPath) +mkPath(log, ExportBuildDirectory + "/" + ShapeOptimizedBuildDirectory) +copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + ShapeOptimizedBuildDirectory, installPath, ".shape") +mkPath(log, ExportBuildDirectory + "/" + ShapeWithCoarseMeshBuildDirectory) +copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + ShapeWithCoarseMeshBuildDirectory, installPath, ".shape") +copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + ShapeWithCoarseMeshBuildDirectory, installPath, ".dds") + +mkPath(log, ExportBuildDirectory + "/" + ShapeAnimExportDirectory) +copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + ShapeAnimExportDirectory, installPath, ".anim") + +# ls anim | grep ".anim" >> $client_directory/auto_animations_list.txt + +printLog(log, ">>> Install shape lightmaps <<<") +installPath = InstallDirectory + "/" + LightmapInstallDirectory +mkPath(log, installPath) +mkPath(log, ExportBuildDirectory + "/" + ShapeLightmap16BitsBuildDirectory) +copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + ShapeLightmap16BitsBuildDirectory, installPath, ".tga") + +printLog(log, "") +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/shape/maxscript/shape_export.ms b/code/nel/tools/build_gamedata/processes/shape/maxscript/shape_export.ms old mode 100755 new mode 100644 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 old mode 100755 new mode 100644 index 94fd8210f..d7f1f9fae --- a/code/nel/tools/build_gamedata/processes/sheet_id/0_setup.py +++ b/code/nel/tools/build_gamedata/processes/sheet_id/0_setup.py @@ -1,63 +1,63 @@ -#!/usr/bin/python -# -# \file 0_setup.py -# \brief Setup sheet_id -# \date 2009-06-03 10:47GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Setup sheet_id -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Setup sheet_id") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -# Setup source directories -printLog(log, ">>> Setup source directories <<<") -mkPath(log, LeveldesignDirectory) -mkPath(log, LeveldesignWorldDirectory) - -# Setup export directories -printLog(log, ">>> Setup export directories <<<") - -# Setup build directories -printLog(log, ">>> Setup build directories <<<") - -# Setup client directories -printLog(log, ">>> Setup client directories <<<") - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 0_setup.py +# \brief Setup sheet_id +# \date 2009-06-03 10:47GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Setup sheet_id +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Setup sheet_id") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +# Setup source directories +printLog(log, ">>> Setup source directories <<<") +mkPath(log, LeveldesignDirectory) +mkPath(log, LeveldesignWorldDirectory) + +# Setup export directories +printLog(log, ">>> Setup export directories <<<") + +# Setup build directories +printLog(log, ">>> Setup build directories <<<") + +# Setup client directories +printLog(log, ">>> Setup client directories <<<") + +log.close() + + +# end of file 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 old mode 100755 new mode 100644 index 29387c55f..4de39e71b --- a/code/nel/tools/build_gamedata/processes/sheet_id/1_export.py +++ b/code/nel/tools/build_gamedata/processes/sheet_id/1_export.py @@ -1,49 +1,49 @@ -#!/usr/bin/python -# -# \file 1_export.py -# \brief Export sheet_id -# \date 2009-06-03 10:47GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Export sheet_id -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Export sheet_id") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 1_export.py +# \brief Export sheet_id +# \date 2009-06-03 10:47GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Export sheet_id +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Export sheet_id") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +log.close() + + +# end of file 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 old mode 100755 new mode 100644 index 51fdefc0f..7bc6b1f9c --- a/code/nel/tools/build_gamedata/processes/sheet_id/2_build.py +++ b/code/nel/tools/build_gamedata/processes/sheet_id/2_build.py @@ -1,63 +1,63 @@ -#!/usr/bin/python -# -# \file 2_build.py -# \brief Build sheet_id -# \date 2009-06-03 10:47GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Build sheet_id -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Build sheet_id") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -# Find tools -MakeSheetId = findTool(log, ToolDirectories, MakeSheetIdTool, ToolSuffix) -printLog(log, "") - -# For each sheet_id directory -printLog(log, ">>> Build sheet_id <<<") -if MakeSheetId == "": - toolLogFail(log, MakeSheetIdTool, ToolSuffix) -else: - mkPath(log, LeveldesignDirectory) - mkPath(log, LeveldesignWorldDirectory) - subprocess.call([ MakeSheetId, "-o" + LeveldesignDirectory + "/game_elem/sheet_id.bin", LeveldesignDirectory + "/game_elem", LeveldesignDirectory + "/game_element", LeveldesignWorldDirectory, DataShardDirectory + "/mirror_sheets" ]) # FIXME: Hardcoded path mirror_sheets -printLog(log, "") - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 2_build.py +# \brief Build sheet_id +# \date 2009-06-03 10:47GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Build sheet_id +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Build sheet_id") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +# Find tools +MakeSheetId = findTool(log, ToolDirectories, MakeSheetIdTool, ToolSuffix) +printLog(log, "") + +# For each sheet_id directory +printLog(log, ">>> Build sheet_id <<<") +if MakeSheetId == "": + toolLogFail(log, MakeSheetIdTool, ToolSuffix) +else: + mkPath(log, LeveldesignDirectory) + mkPath(log, LeveldesignWorldDirectory) + subprocess.call([ MakeSheetId, "-o" + LeveldesignDirectory + "/game_elem/sheet_id.bin", LeveldesignDirectory + "/game_elem", LeveldesignDirectory + "/game_element", LeveldesignWorldDirectory, DataShardDirectory + "/mirror_sheets" ]) # FIXME: Hardcoded path mirror_sheets +printLog(log, "") + +log.close() + + +# end of file 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 old mode 100755 new mode 100644 index 9f27b0dae..1c3806950 --- a/code/nel/tools/build_gamedata/processes/sheet_id/3_install.py +++ b/code/nel/tools/build_gamedata/processes/sheet_id/3_install.py @@ -1,50 +1,50 @@ -#!/usr/bin/python -# -# \file 3_install.py -# \brief Install sheet_id -# \date 2009-06-03 10:47GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Install sheet_id -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Install sheet_id") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -printLog(log, "") -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 3_install.py +# \brief Install sheet_id +# \date 2009-06-03 10:47GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Install sheet_id +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite_local import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Install sheet_id") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +printLog(log, "") +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/sheets/0_setup.py b/code/nel/tools/build_gamedata/processes/sheets/0_setup.py old mode 100755 new mode 100644 index 0ad1a3655..deb723745 --- a/code/nel/tools/build_gamedata/processes/sheets/0_setup.py +++ b/code/nel/tools/build_gamedata/processes/sheets/0_setup.py @@ -1,69 +1,69 @@ -#!/usr/bin/python -# -# \file 0_setup.py -# \brief Setup sheets -# \date 2009-06-03 10:47GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Setup sheets -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Setup sheets") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -# Setup source directories -printLog(log, ">>> Setup source directories <<<") -mkPath(log, LeveldesignDirectory) -mkPath(log, LeveldesignDfnDirectory) -mkPath(log, DataCommonDirectory) -mkPath(log, GamedevDirectory) -mkPath(log, PrimitivesDirectory) - -# Setup export directories -printLog(log, ">>> Setup export directories <<<") - -# Setup build directories -printLog(log, ">>> Setup build directories <<<") -mkPath(log, ExportBuildDirectory + "/" + SheetsBuildDirectory) -mkPath(log, ExportBuildDirectory + "/" + VisualSlotTabBuildDirectory) - -# Setup client directories -printLog(log, ">>> Setup client directories <<<") -mkPath(log, InstallDirectory + "/" + SheetsInstallDirectory) - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 0_setup.py +# \brief Setup sheets +# \date 2009-06-03 10:47GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Setup sheets +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Setup sheets") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +# Setup source directories +printLog(log, ">>> Setup source directories <<<") +mkPath(log, LeveldesignDirectory) +mkPath(log, LeveldesignDfnDirectory) +mkPath(log, DataCommonDirectory) +mkPath(log, GamedevDirectory) +mkPath(log, PrimitivesDirectory) + +# Setup export directories +printLog(log, ">>> Setup export directories <<<") + +# Setup build directories +printLog(log, ">>> Setup build directories <<<") +mkPath(log, ExportBuildDirectory + "/" + SheetsBuildDirectory) +mkPath(log, ExportBuildDirectory + "/" + VisualSlotTabBuildDirectory) + +# Setup client directories +printLog(log, ">>> Setup client directories <<<") +mkPath(log, InstallDirectory + "/" + SheetsInstallDirectory) + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/sheets/1_export.py b/code/nel/tools/build_gamedata/processes/sheets/1_export.py old mode 100755 new mode 100644 index 1a8cc51af..f75252742 --- a/code/nel/tools/build_gamedata/processes/sheets/1_export.py +++ b/code/nel/tools/build_gamedata/processes/sheets/1_export.py @@ -1,49 +1,49 @@ -#!/usr/bin/python -# -# \file 1_export.py -# \brief Export sheets -# \date 2009-06-03 10:47GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Export sheets -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Export sheets") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 1_export.py +# \brief Export sheets +# \date 2009-06-03 10:47GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Export sheets +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Export sheets") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/sheets/2_build.py b/code/nel/tools/build_gamedata/processes/sheets/2_build.py old mode 100755 new mode 100644 index ea8f899d2..c04113c52 --- a/code/nel/tools/build_gamedata/processes/sheets/2_build.py +++ b/code/nel/tools/build_gamedata/processes/sheets/2_build.py @@ -1,88 +1,88 @@ -#!/usr/bin/python -# -# \file 2_build.py -# \brief Build sheets -# \date 2009-06-03 10:47GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Build sheets -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Build sheets") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -# Find tools -SheetsPacker = findTool(log, ToolDirectories, SheetsPackerTool, ToolSuffix) -printLog(log, "") - -# For each sheets directory -printLog(log, ">>> Build sheets <<<") -if SheetsPacker == "": - toolLogFail(log, SheetsPackerTool, ToolSuffix) -else: - mkPath(log, LeveldesignDirectory) - mkPath(log, LeveldesignDfnDirectory) - mkPath(log, DataCommonDirectory) - mkPath(log, GamedevDirectory) - mkPath(log, PrimitivesDirectory) - mkPath(log, ExportBuildDirectory + "/" + SheetsBuildDirectory) - cf = open("sheets_packer.cfg", "w") - cf.write("\n") - cf.write("// SHEETS PACKER CONFIG FILE\n") - cf.write("\n") - cf.write("DataPath = \n") - cf.write("{\n") - cf.write("\t\"" + LeveldesignDirectory + "\", \n") - cf.write("\t\"" + LeveldesignDfnDirectory + "\", \n") - cf.write("\t\"" + DataCommonDirectory + "\", \n") - cf.write("\t\"" + GamedevDirectory + "\", \n") - cf.write("\t\"" + PrimitivesDirectory + "\", \n") - cf.write("};\n") - cf.write("WorldSheet = \"" + WorldSheet + "\";\n") - cf.write("PrimitivesPath = \"" + PrimitivesDirectory + "\";\n") - cf.write("OutputDataPath = \"" + ExportBuildDirectory + "/" + SheetsBuildDirectory + "\";\n") - cf.write("LigoPrimitiveClass = \"" + LigoPrimitiveClass + "\";\n") - cf.write("\n") - cf.close() - subprocess.call([ SheetsPacker ]) - mkPath(log, ExportBuildDirectory + "/" + VisualSlotTabBuildDirectory) - copyFileIfNeeded(log, "visual_slot.tab", ExportBuildDirectory + "/" + VisualSlotTabBuildDirectory + "/visual_slot.tab") - os.remove("visual_slot.tab") -printLog(log, "") - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 2_build.py +# \brief Build sheets +# \date 2009-06-03 10:47GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Build sheets +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Build sheets") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +# Find tools +SheetsPacker = findTool(log, ToolDirectories, SheetsPackerTool, ToolSuffix) +printLog(log, "") + +# For each sheets directory +printLog(log, ">>> Build sheets <<<") +if SheetsPacker == "": + toolLogFail(log, SheetsPackerTool, ToolSuffix) +else: + mkPath(log, LeveldesignDirectory) + mkPath(log, LeveldesignDfnDirectory) + mkPath(log, DataCommonDirectory) + mkPath(log, GamedevDirectory) + mkPath(log, PrimitivesDirectory) + mkPath(log, ExportBuildDirectory + "/" + SheetsBuildDirectory) + cf = open("sheets_packer.cfg", "w") + cf.write("\n") + cf.write("// SHEETS PACKER CONFIG FILE\n") + cf.write("\n") + cf.write("DataPath = \n") + cf.write("{\n") + cf.write("\t\"" + LeveldesignDirectory + "\", \n") + cf.write("\t\"" + LeveldesignDfnDirectory + "\", \n") + cf.write("\t\"" + DataCommonDirectory + "\", \n") + cf.write("\t\"" + GamedevDirectory + "\", \n") + cf.write("\t\"" + PrimitivesDirectory + "\", \n") + cf.write("};\n") + cf.write("WorldSheet = \"" + WorldSheet + "\";\n") + cf.write("PrimitivesPath = \"" + PrimitivesDirectory + "\";\n") + cf.write("OutputDataPath = \"" + ExportBuildDirectory + "/" + SheetsBuildDirectory + "\";\n") + cf.write("LigoPrimitiveClass = \"" + LigoPrimitiveClass + "\";\n") + cf.write("\n") + cf.close() + subprocess.call([ SheetsPacker ]) + mkPath(log, ExportBuildDirectory + "/" + VisualSlotTabBuildDirectory) + copyFileIfNeeded(log, "visual_slot.tab", ExportBuildDirectory + "/" + VisualSlotTabBuildDirectory + "/visual_slot.tab") + os.remove("visual_slot.tab") +printLog(log, "") + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/sheets/3_install.py b/code/nel/tools/build_gamedata/processes/sheets/3_install.py old mode 100755 new mode 100644 index ed6efaffd..0ef233783 --- a/code/nel/tools/build_gamedata/processes/sheets/3_install.py +++ b/code/nel/tools/build_gamedata/processes/sheets/3_install.py @@ -1,58 +1,58 @@ -#!/usr/bin/python -# -# \file 3_install.py -# \brief Install sheets -# \date 2009-06-03 10:47GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Install sheets -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Install sheets") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -installPath = InstallDirectory + "/" + SheetsInstallDirectory -mkPath(log, installPath) - -printLog(log, ">>> Install sheets <<<") -mkPath(log, ExportBuildDirectory + "/" + SheetsBuildDirectory) -copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + SheetsBuildDirectory, installPath, ".packed_sheets") -copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + SheetsBuildDirectory, installPath, ".packed") - -printLog(log, "") -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 3_install.py +# \brief Install sheets +# \date 2009-06-03 10:47GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Install sheets +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite_local import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Install sheets") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +installPath = InstallDirectory + "/" + SheetsInstallDirectory +mkPath(log, installPath) + +printLog(log, ">>> Install sheets <<<") +mkPath(log, ExportBuildDirectory + "/" + SheetsBuildDirectory) +copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + SheetsBuildDirectory, installPath, ".packed_sheets") +copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + SheetsBuildDirectory, installPath, ".packed") + +printLog(log, "") +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/sheets_shard/0_setup.py b/code/nel/tools/build_gamedata/processes/sheets_shard/0_setup.py old mode 100755 new mode 100644 index bc3024f3b..5c333d93f --- a/code/nel/tools/build_gamedata/processes/sheets_shard/0_setup.py +++ b/code/nel/tools/build_gamedata/processes/sheets_shard/0_setup.py @@ -1,67 +1,67 @@ -#!/usr/bin/python -# -# \file 0_setup.py -# \brief Setup sheets -# \date 2014-02-19 22:39GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Setup shard sheets -# -# NeL - MMORPG Framework -# Copyright (C) 2010-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Setup shard sheets") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -# Setup source directories -printLog(log, ">>> Setup source directories <<<") -mkPath(log, LeveldesignDirectory) -mkPath(log, LeveldesignDfnDirectory) -mkPath(log, ExportBuildDirectory + "/" + VisualSlotTabBuildDirectory) -mkPath(log, DataShardDirectory + "/mirror_sheets") # FIXME: Hardcoded path mirror_sheets - -# Setup export directories -printLog(log, ">>> Setup export directories <<<") - -# Setup build directories -printLog(log, ">>> Setup build directories <<<") -mkPath(log, ExportBuildDirectory + "/" + SheetsShardBuildDirectory) - -# Setup client directories -printLog(log, ">>> Setup client directories <<<") -mkPath(log, InstallDirectory + "/" + SheetsShardInstallDirectory) - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 0_setup.py +# \brief Setup sheets +# \date 2014-02-19 22:39GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Setup shard sheets +# +# NeL - MMORPG Framework +# Copyright (C) 2010-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Setup shard sheets") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +# Setup source directories +printLog(log, ">>> Setup source directories <<<") +mkPath(log, LeveldesignDirectory) +mkPath(log, LeveldesignDfnDirectory) +mkPath(log, ExportBuildDirectory + "/" + VisualSlotTabBuildDirectory) +mkPath(log, DataShardDirectory + "/mirror_sheets") # FIXME: Hardcoded path mirror_sheets + +# Setup export directories +printLog(log, ">>> Setup export directories <<<") + +# Setup build directories +printLog(log, ">>> Setup build directories <<<") +mkPath(log, ExportBuildDirectory + "/" + SheetsShardBuildDirectory) + +# Setup client directories +printLog(log, ">>> Setup client directories <<<") +mkPath(log, InstallDirectory + "/" + SheetsShardInstallDirectory) + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/sheets_shard/1_export.py b/code/nel/tools/build_gamedata/processes/sheets_shard/1_export.py old mode 100755 new mode 100644 index 650e0307d..70b00334a --- a/code/nel/tools/build_gamedata/processes/sheets_shard/1_export.py +++ b/code/nel/tools/build_gamedata/processes/sheets_shard/1_export.py @@ -1,49 +1,49 @@ -#!/usr/bin/python -# -# \file 1_export.py -# \brief Export sheets -# \date 2014-02-19 22:39GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Export shard sheets -# -# NeL - MMORPG Framework -# Copyright (C) 2010-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Export shard sheets") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 1_export.py +# \brief Export sheets +# \date 2014-02-19 22:39GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Export shard sheets +# +# NeL - MMORPG Framework +# Copyright (C) 2010-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Export shard sheets") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/sheets_shard/2_build.py b/code/nel/tools/build_gamedata/processes/sheets_shard/2_build.py old mode 100755 new mode 100644 index c66de2b28..acf21c8fd --- a/code/nel/tools/build_gamedata/processes/sheets_shard/2_build.py +++ b/code/nel/tools/build_gamedata/processes/sheets_shard/2_build.py @@ -1,67 +1,67 @@ -#!/usr/bin/python -# -# \file 2_build.py -# \brief Build sheets -# \date 2014-02-19 22:39GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Build shard sheets -# -# NeL - MMORPG Framework -# Copyright (C) 2010-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Build sheets") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -# Find tools -SheetsPackerShard = findTool(log, ToolDirectories, SheetsPackerShardTool, ToolSuffix) -printLog(log, "") - -# For each sheets directory -printLog(log, ">>> Build shard sheets <<<") -if SheetsPackerShard == "": - toolLogFail(log, SheetsPackerShardTool, ToolSuffix) -else: - mkPath(log, LeveldesignDirectory) - mkPath(log, LeveldesignDfnDirectory) - mkPath(log, ExportBuildDirectory + "/" + VisualSlotTabBuildDirectory) - mkPath(log, DataShardDirectory + "/mirror_sheets") # FIXME: Hardcoded path mirror_sheets - mkPath(log, ExportBuildDirectory + "/" + SheetsShardBuildDirectory) - # sheets_packer_shard - subprocess.call([ SheetsPackerShard, LeveldesignDirectory, LeveldesignDfnDirectory, DataShardDirectory + "/mirror_sheets", ExportBuildDirectory + "/" + VisualSlotTabBuildDirectory, ExportBuildDirectory + "/" + SheetsShardBuildDirectory ]) -printLog(log, "") - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 2_build.py +# \brief Build sheets +# \date 2014-02-19 22:39GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Build shard sheets +# +# NeL - MMORPG Framework +# Copyright (C) 2010-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Build sheets") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +# Find tools +SheetsPackerShard = findTool(log, ToolDirectories, SheetsPackerShardTool, ToolSuffix) +printLog(log, "") + +# For each sheets directory +printLog(log, ">>> Build shard sheets <<<") +if SheetsPackerShard == "": + toolLogFail(log, SheetsPackerShardTool, ToolSuffix) +else: + mkPath(log, LeveldesignDirectory) + mkPath(log, LeveldesignDfnDirectory) + mkPath(log, ExportBuildDirectory + "/" + VisualSlotTabBuildDirectory) + mkPath(log, DataShardDirectory + "/mirror_sheets") # FIXME: Hardcoded path mirror_sheets + mkPath(log, ExportBuildDirectory + "/" + SheetsShardBuildDirectory) + # sheets_packer_shard + subprocess.call([ SheetsPackerShard, LeveldesignDirectory, LeveldesignDfnDirectory, DataShardDirectory + "/mirror_sheets", ExportBuildDirectory + "/" + VisualSlotTabBuildDirectory, ExportBuildDirectory + "/" + SheetsShardBuildDirectory ]) +printLog(log, "") + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/sheets_shard/3_install.py b/code/nel/tools/build_gamedata/processes/sheets_shard/3_install.py old mode 100755 new mode 100644 index ba7e1a8a8..cd2516dcc --- a/code/nel/tools/build_gamedata/processes/sheets_shard/3_install.py +++ b/code/nel/tools/build_gamedata/processes/sheets_shard/3_install.py @@ -1,57 +1,57 @@ -#!/usr/bin/python -# -# \file 3_install.py -# \brief Install sheets -# \date 2014-02-19 22:39GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Install shard sheets -# -# NeL - MMORPG Framework -# Copyright (C) 2010-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Install shard sheets") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -installPath = InstallDirectory + "/" + SheetsShardInstallDirectory -mkPath(log, installPath) - -printLog(log, ">>> Install sheets <<<") -mkPath(log, ExportBuildDirectory + "/" + SheetsShardBuildDirectory) -copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + SheetsShardBuildDirectory, installPath, ".packed_sheets") - -printLog(log, "") -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 3_install.py +# \brief Install sheets +# \date 2014-02-19 22:39GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Install shard sheets +# +# NeL - MMORPG Framework +# Copyright (C) 2010-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite_local import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Install shard sheets") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +installPath = InstallDirectory + "/" + SheetsShardInstallDirectory +mkPath(log, installPath) + +printLog(log, ">>> Install sheets <<<") +mkPath(log, ExportBuildDirectory + "/" + SheetsShardBuildDirectory) +copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + SheetsShardBuildDirectory, installPath, ".packed_sheets") + +printLog(log, "") +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/sign/0_setup.py b/code/nel/tools/build_gamedata/processes/sign/0_setup.py index 418fcb15e..a0e47abc6 100644 --- a/code/nel/tools/build_gamedata/processes/sign/0_setup.py +++ b/code/nel/tools/build_gamedata/processes/sign/0_setup.py @@ -1,64 +1,64 @@ -#!/usr/bin/python -# -# \file 0_setup.py -# \brief setup sign -# \date 2010-05-24 13:42GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Setup sign -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Setup sign") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -# Setup source directories -printLog(log, ">>> Setup source directories <<<") - -# Setup build directories -printLog(log, ">>> Setup export directories <<<") -mkPath(log, ExportBuildDirectory + "/" + UnsignedExeDllDirectory) - -# Setup build directories -printLog(log, ">>> Setup build directories <<<") -mkPath(log, ExportBuildDirectory + "/" + SignedExeDllDirectory) - -# Setup client directories -printLog(log, ">>> Setup client directories <<<") -mkPath(log, InstallDirectory + "/" + SignInstallDirectory) - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 0_setup.py +# \brief setup sign +# \date 2010-05-24 13:42GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Setup sign +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Setup sign") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +# Setup source directories +printLog(log, ">>> Setup source directories <<<") + +# Setup build directories +printLog(log, ">>> Setup export directories <<<") +mkPath(log, ExportBuildDirectory + "/" + UnsignedExeDllDirectory) + +# Setup build directories +printLog(log, ">>> Setup build directories <<<") +mkPath(log, ExportBuildDirectory + "/" + SignedExeDllDirectory) + +# Setup client directories +printLog(log, ">>> Setup client directories <<<") +mkPath(log, InstallDirectory + "/" + SignInstallDirectory) + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/sign/1_export.py b/code/nel/tools/build_gamedata/processes/sign/1_export.py index 352860bda..e0a47008e 100644 --- a/code/nel/tools/build_gamedata/processes/sign/1_export.py +++ b/code/nel/tools/build_gamedata/processes/sign/1_export.py @@ -1,57 +1,57 @@ -#!/usr/bin/python -# -# \file 1_export.py -# \brief Export sign -# \date 2010-05-24 13:42GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Export sign -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Export sign") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -mkPath(log, ExportBuildDirectory + "/" + UnsignedExeDllDirectory) -for file in SignExeDllFiles: - printLog(log, str(WindowsExeDllCfgDirectories)) - printLog(log, file) - filePath = findFileMultiDir(log, WindowsExeDllCfgDirectories, file) - if (filePath != ""): - copyFileIfNeeded(log, filePath, ExportBuildDirectory + "/" + UnsignedExeDllDirectory + "/" + os.path.basename(file)) - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 1_export.py +# \brief Export sign +# \date 2010-05-24 13:42GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Export sign +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Export sign") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +mkPath(log, ExportBuildDirectory + "/" + UnsignedExeDllDirectory) +for file in SignExeDllFiles: + printLog(log, str(WindowsExeDllCfgDirectories)) + printLog(log, file) + filePath = findFileMultiDir(log, WindowsExeDllCfgDirectories, file) + if (filePath != ""): + copyFileIfNeeded(log, filePath, ExportBuildDirectory + "/" + UnsignedExeDllDirectory + "/" + os.path.basename(file)) + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/sign/2_build.py b/code/nel/tools/build_gamedata/processes/sign/2_build.py index c08049538..d3b1c79df 100644 --- a/code/nel/tools/build_gamedata/processes/sign/2_build.py +++ b/code/nel/tools/build_gamedata/processes/sign/2_build.py @@ -1,61 +1,61 @@ -#!/usr/bin/python -# -# \file 2_build.py -# \brief Build sign -# \date 2010-05-24 13:42GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Build sign -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Build sign") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -if SignToolSha1 != "": - unsignedDirectory = ExportBuildDirectory + "/" + UnsignedExeDllDirectory - signedDirectory = ExportBuildDirectory + "/" + SignedExeDllDirectory - mkPath(log, unsignedDirectory) - mkPath(log, signedDirectory) - unsignedFiles = os.listdir(unsignedDirectory) - for fileName in unsignedFiles: - if (fileName != ".svn" and fileName != ".." and fileName != "." and fileName != "*.*"): - if needUpdateLogRemoveDest(log, unsignedDirectory + "/" + fileName, signedDirectory + "/" + fileName): - shutil.copy(unsignedDirectory + "/" + fileName, signedDirectory + "/" + fileName) - subprocess.call([ SignToolExecutable, "sign", "/sha1", SignToolSha1, "/t", SignToolTimestamp, signedDirectory + "/" + fileName ]) - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 2_build.py +# \brief Build sign +# \date 2010-05-24 13:42GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Build sign +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Build sign") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +if SignToolSha1 != "": + unsignedDirectory = ExportBuildDirectory + "/" + UnsignedExeDllDirectory + signedDirectory = ExportBuildDirectory + "/" + SignedExeDllDirectory + mkPath(log, unsignedDirectory) + mkPath(log, signedDirectory) + unsignedFiles = os.listdir(unsignedDirectory) + for fileName in unsignedFiles: + if (fileName != ".svn" and fileName != ".." and fileName != "." and fileName != "*.*"): + if needUpdateLogRemoveDest(log, unsignedDirectory + "/" + fileName, signedDirectory + "/" + fileName): + shutil.copy(unsignedDirectory + "/" + fileName, signedDirectory + "/" + fileName) + subprocess.call([ SignToolExecutable, "sign", "/sha1", SignToolSha1, "/t", SignToolTimestamp, signedDirectory + "/" + fileName ]) + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/sign/3_install.py b/code/nel/tools/build_gamedata/processes/sign/3_install.py index b537da92d..2e28a7b59 100644 --- a/code/nel/tools/build_gamedata/processes/sign/3_install.py +++ b/code/nel/tools/build_gamedata/processes/sign/3_install.py @@ -1,58 +1,58 @@ -#!/usr/bin/python -# -# \file 3_install.py -# \brief Install sign -# \date 2010-05-24 13:42GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Install sign -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Install sign") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -srcDir = ExportBuildDirectory + "/" + SignedExeDllDirectory -if SignToolSha1 == "": - srcDir = ExportBuildDirectory + "/" + UnsignedExeDllDirectory -mkPath(log, srcDir) -destDir = InstallDirectory + "/" + SignInstallDirectory -mkPath(log, destDir) -copyFilesNoTreeIfNeeded(log, srcDir, destDir) - -printLog(log, "") -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 3_install.py +# \brief Install sign +# \date 2010-05-24 13:42GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Install sign +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite_local import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Install sign") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +srcDir = ExportBuildDirectory + "/" + SignedExeDllDirectory +if SignToolSha1 == "": + srcDir = ExportBuildDirectory + "/" + UnsignedExeDllDirectory +mkPath(log, srcDir) +destDir = InstallDirectory + "/" + SignInstallDirectory +mkPath(log, destDir) +copyFilesNoTreeIfNeeded(log, srcDir, destDir) + +printLog(log, "") +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/skel/0_setup.py b/code/nel/tools/build_gamedata/processes/skel/0_setup.py old mode 100755 new mode 100644 index 7394babdd..2bb47a5d7 --- a/code/nel/tools/build_gamedata/processes/skel/0_setup.py +++ b/code/nel/tools/build_gamedata/processes/skel/0_setup.py @@ -1,65 +1,65 @@ -#!/usr/bin/python -# -# \file 0_setup.py -# \brief setup skel -# \date 2009-03-10-20-23-GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Setup skel -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Setup skel") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -# Setup source directories -printLog(log, ">>> Setup source directories <<<") -for dir in SkelSourceDirectories: - mkPath(log, DatabaseDirectory + "/" + dir) - -# Setup export directories -printLog(log, ">>> Setup export directories <<<") -mkPath(log, ExportBuildDirectory + "/" + SkelExportDirectory) - -# Setup build directories -printLog(log, ">>> Setup build directories <<<") - -# Setup client directories -printLog(log, ">>> Setup client directories <<<") -mkPath(log, InstallDirectory + "/" + SkelInstallDirectory) - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 0_setup.py +# \brief setup skel +# \date 2009-03-10-20-23-GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Setup skel +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Setup skel") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +# Setup source directories +printLog(log, ">>> Setup source directories <<<") +for dir in SkelSourceDirectories: + mkPath(log, DatabaseDirectory + "/" + dir) + +# Setup export directories +printLog(log, ">>> Setup export directories <<<") +mkPath(log, ExportBuildDirectory + "/" + SkelExportDirectory) + +# Setup build directories +printLog(log, ">>> Setup build directories <<<") + +# Setup client directories +printLog(log, ">>> Setup client directories <<<") +mkPath(log, InstallDirectory + "/" + SkelInstallDirectory) + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/skel/1_export.py b/code/nel/tools/build_gamedata/processes/skel/1_export.py old mode 100755 new mode 100644 index dcf336dbd..fe0c4577a --- a/code/nel/tools/build_gamedata/processes/skel/1_export.py +++ b/code/nel/tools/build_gamedata/processes/skel/1_export.py @@ -1,107 +1,107 @@ -#!/usr/bin/python -# -# ################################################################# -# ## WARNING : this is a generated file, don't change it ! -# ################################################################# -# -# \file 1_export.py -# \brief Export skel -# \date 2015-01-06-16-31-GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Export skel -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Export skel") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -# Find tools -# ... - -# Export skel 3dsmax -if MaxAvailable: - # Find tools - Max = findMax(log, MaxDirectory, MaxExecutable) - printLog(log, "") - - printLog(log, ">>> Export skel 3dsmax <<<") - mkPath(log, ExportBuildDirectory + "/" + SkelExportDirectory) - for dir in SkelSourceDirectories: - mkPath(log, DatabaseDirectory + "/" + dir) - if (needUpdateDirByTagLog(log, DatabaseDirectory + "/" + dir, ".max", ExportBuildDirectory + "/" + SkelExportDirectory, ".skel")): - scriptSrc = "maxscript/skel_export.ms" - scriptDst = MaxUserDirectory + "/scripts/skel_export.ms" - outputLogfile = ScriptDirectory + "/processes/skel/log.log" - outputDirectory = ExportBuildDirectory + "/" + SkelExportDirectory - maxSourceDir = DatabaseDirectory + "/" + dir - tagList = findFiles(log, outputDirectory, "", ".skel") - tagLen = len(tagList) - if os.path.isfile(scriptDst): - os.remove(scriptDst) - tagDiff = 1 - sSrc = open(scriptSrc, "r") - sDst = open(scriptDst, "w") - for line in sSrc: - newline = line.replace("%OutputLogfile%", outputLogfile) - newline = newline.replace("%MaxSourceDirectory%", maxSourceDir) - newline = newline.replace("%OutputDirectory%", outputDirectory) - sDst.write(newline) - sSrc.close() - sDst.close() - while tagDiff > 0: - printLog(log, "MAXSCRIPT " + scriptDst) - subprocess.call([ Max, "-U", "MAXScript", "skel_export.ms", "-q", "-mi", "-mip" ]) - tagList = findFiles(log, outputDirectory, "", ".skel") - newTagLen = len(tagList) - tagDiff = newTagLen - tagLen - tagLen = newTagLen - printLog(log, "Exported " + str(tagDiff) + " .skel files!") - os.remove(scriptDst) - - - -printLog(log, ">>> Export skel directly <<<") -mkPath(log, ExportBuildDirectory + "/" + SkelExportDirectory) -for dir in SkelSourceDirectories: - mkPath(log, DatabaseDirectory + "/" + dir) - copyFilesExtNoSubdirIfNeeded(log, DatabaseDirectory + "/" + dir, ExportBuildDirectory + "/" + SkelExportDirectory, ".skel") - - - -printLog(log, "") -log.close() - - -# end of file +#!/usr/bin/python +# +# ################################################################# +# ## WARNING : this is a generated file, don't change it ! +# ################################################################# +# +# \file 1_export.py +# \brief Export skel +# \date 2015-01-06-16-31-GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Export skel +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Export skel") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +# Find tools +# ... + +# Export skel 3dsmax +if MaxAvailable: + # Find tools + Max = findMax(log, MaxDirectory, MaxExecutable) + printLog(log, "") + + printLog(log, ">>> Export skel 3dsmax <<<") + mkPath(log, ExportBuildDirectory + "/" + SkelExportDirectory) + for dir in SkelSourceDirectories: + mkPath(log, DatabaseDirectory + "/" + dir) + if (needUpdateDirByTagLog(log, DatabaseDirectory + "/" + dir, ".max", ExportBuildDirectory + "/" + SkelExportDirectory, ".skel")): + scriptSrc = "maxscript/skel_export.ms" + scriptDst = MaxUserDirectory + "/scripts/skel_export.ms" + outputLogfile = ScriptDirectory + "/processes/skel/log.log" + outputDirectory = ExportBuildDirectory + "/" + SkelExportDirectory + maxSourceDir = DatabaseDirectory + "/" + dir + tagList = findFiles(log, outputDirectory, "", ".skel") + tagLen = len(tagList) + if os.path.isfile(scriptDst): + os.remove(scriptDst) + tagDiff = 1 + sSrc = open(scriptSrc, "r") + sDst = open(scriptDst, "w") + for line in sSrc: + newline = line.replace("%OutputLogfile%", outputLogfile) + newline = newline.replace("%MaxSourceDirectory%", maxSourceDir) + newline = newline.replace("%OutputDirectory%", outputDirectory) + sDst.write(newline) + sSrc.close() + sDst.close() + while tagDiff > 0: + printLog(log, "MAXSCRIPT " + scriptDst) + subprocess.call([ Max, "-U", "MAXScript", "skel_export.ms", "-q", "-mi", "-mip" ]) + tagList = findFiles(log, outputDirectory, "", ".skel") + newTagLen = len(tagList) + tagDiff = newTagLen - tagLen + tagLen = newTagLen + printLog(log, "Exported " + str(tagDiff) + " .skel files!") + os.remove(scriptDst) + + + +printLog(log, ">>> Export skel directly <<<") +mkPath(log, ExportBuildDirectory + "/" + SkelExportDirectory) +for dir in SkelSourceDirectories: + mkPath(log, DatabaseDirectory + "/" + dir) + copyFilesExtNoSubdirIfNeeded(log, DatabaseDirectory + "/" + dir, ExportBuildDirectory + "/" + SkelExportDirectory, ".skel") + + + +printLog(log, "") +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/skel/2_build.py b/code/nel/tools/build_gamedata/processes/skel/2_build.py old mode 100755 new mode 100644 index 86bfce1c8..1a3935eb7 --- a/code/nel/tools/build_gamedata/processes/skel/2_build.py +++ b/code/nel/tools/build_gamedata/processes/skel/2_build.py @@ -1,49 +1,49 @@ -#!/usr/bin/python -# -# \file 2_build.py -# \brief Build skel -# \date 2009-03-10-20-23-GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Build skel -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Build skel") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 2_build.py +# \brief Build skel +# \date 2009-03-10-20-23-GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Build skel +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Build skel") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/skel/3_install.py b/code/nel/tools/build_gamedata/processes/skel/3_install.py old mode 100755 new mode 100644 index f70a0258f..5e87f7d2a --- a/code/nel/tools/build_gamedata/processes/skel/3_install.py +++ b/code/nel/tools/build_gamedata/processes/skel/3_install.py @@ -1,57 +1,57 @@ -#!/usr/bin/python -# -# \file 3_install.py -# \brief Install skel -# \date 2009-03-10-20-23-GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Install skel -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Install skel") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -installPath = InstallDirectory + "/" + SkelInstallDirectory -mkPath(log, installPath) - -printLog(log, ">>> Install skel <<<") -mkPath(log, ExportBuildDirectory + "/" + SkelExportDirectory) -copyFilesNoTreeIfNeeded(log, ExportBuildDirectory + "/" + SkelExportDirectory, installPath) - -printLog(log, "") -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 3_install.py +# \brief Install skel +# \date 2009-03-10-20-23-GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Install skel +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite_local import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Install skel") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +installPath = InstallDirectory + "/" + SkelInstallDirectory +mkPath(log, installPath) + +printLog(log, ">>> Install skel <<<") +mkPath(log, ExportBuildDirectory + "/" + SkelExportDirectory) +copyFilesNoTreeIfNeeded(log, ExportBuildDirectory + "/" + SkelExportDirectory, installPath) + +printLog(log, "") +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/skel/maxscript/skel_export.ms b/code/nel/tools/build_gamedata/processes/skel/maxscript/skel_export.ms old mode 100755 new mode 100644 diff --git a/code/nel/tools/build_gamedata/processes/smallbank/0_setup.py b/code/nel/tools/build_gamedata/processes/smallbank/0_setup.py old mode 100755 new mode 100644 index 751077ba3..c07138161 --- a/code/nel/tools/build_gamedata/processes/smallbank/0_setup.py +++ b/code/nel/tools/build_gamedata/processes/smallbank/0_setup.py @@ -1,64 +1,64 @@ -#!/usr/bin/python -# -# \file 0_setup.py -# \brief setup smallbank -# \date 2009-03-10-20-54-GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Setup smallbank -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Setup smallbank") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -# Setup source directories -printLog(log, ">>> Setup source directories <<<") -mkPath(log, DatabaseDirectory + "/" + BankSourceDirectory) - -# Setup export directories -printLog(log, ">>> Setup export directories <<<") -mkPath(log, ExportBuildDirectory + "/" + SmallbankExportDirectory) - -# Setup build directories -printLog(log, ">>> Setup build directories <<<") - -# Setup client directories -printLog(log, ">>> Setup client directories <<<") -mkPath(log, InstallDirectory + "/" + BankInstallDirectory) - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 0_setup.py +# \brief setup smallbank +# \date 2009-03-10-20-54-GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Setup smallbank +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Setup smallbank") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +# Setup source directories +printLog(log, ">>> Setup source directories <<<") +mkPath(log, DatabaseDirectory + "/" + BankSourceDirectory) + +# Setup export directories +printLog(log, ">>> Setup export directories <<<") +mkPath(log, ExportBuildDirectory + "/" + SmallbankExportDirectory) + +# Setup build directories +printLog(log, ">>> Setup build directories <<<") + +# Setup client directories +printLog(log, ">>> Setup client directories <<<") +mkPath(log, InstallDirectory + "/" + BankInstallDirectory) + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/smallbank/1_export.py b/code/nel/tools/build_gamedata/processes/smallbank/1_export.py old mode 100755 new mode 100644 index b7d3c6c24..2066c8bbc --- a/code/nel/tools/build_gamedata/processes/smallbank/1_export.py +++ b/code/nel/tools/build_gamedata/processes/smallbank/1_export.py @@ -1,72 +1,72 @@ -#!/usr/bin/python -# -# \file 1_export.py -# \brief Export smallbank -# \date 2009-03-10-20-54-GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Export smallbank -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Export smallbank") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -# Find tools -ExecTimeout = findTool(log, ToolDirectories, ExecTimeoutTool, ToolSuffix) -BuildSmallbank = findTool(log, ToolDirectories, BuildSmallbankTool, ToolSuffix) -printLog(log, "") - -# For each bank export smallbank -printLog(log, ">>> Export smallbank <<<") -if ExecTimeout == "": - toolLogFail(log, ExecTimeoutTool, ToolSuffix) -elif BuildSmallbank == "": - toolLogFail(log, BuildSmallbankTool, ToolSuffix) -else: - mkPath(log, DatabaseDirectory + "/" + BankSourceDirectory) - mkPath(log, ExportBuildDirectory + "/" + SmallbankExportDirectory) - files = findFiles(log, DatabaseDirectory + "/" + BankSourceDirectory, "", ".bank") - for file in files: - sourceFile = DatabaseDirectory + "/" + BankSourceDirectory + "/" + file - if os.path.isfile(sourceFile): - destFile = ExportBuildDirectory + "/" + SmallbankExportDirectory + "/" + file[0:-len(".bank")] + ".smallbank" - if (needUpdateLogRemoveDest(log, sourceFile, destFile)): - subprocess.call([ ExecTimeout, str(SmallbankBuildTimeout), BuildSmallbank, sourceFile, destFile, DatabaseDirectory + "/" + TileRootSourceDirectory + "/" ]) -printLog(log, "") - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 1_export.py +# \brief Export smallbank +# \date 2009-03-10-20-54-GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Export smallbank +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Export smallbank") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +# Find tools +ExecTimeout = findTool(log, ToolDirectories, ExecTimeoutTool, ToolSuffix) +BuildSmallbank = findTool(log, ToolDirectories, BuildSmallbankTool, ToolSuffix) +printLog(log, "") + +# For each bank export smallbank +printLog(log, ">>> Export smallbank <<<") +if ExecTimeout == "": + toolLogFail(log, ExecTimeoutTool, ToolSuffix) +elif BuildSmallbank == "": + toolLogFail(log, BuildSmallbankTool, ToolSuffix) +else: + mkPath(log, DatabaseDirectory + "/" + BankSourceDirectory) + mkPath(log, ExportBuildDirectory + "/" + SmallbankExportDirectory) + files = findFiles(log, DatabaseDirectory + "/" + BankSourceDirectory, "", ".bank") + for file in files: + sourceFile = DatabaseDirectory + "/" + BankSourceDirectory + "/" + file + if os.path.isfile(sourceFile): + destFile = ExportBuildDirectory + "/" + SmallbankExportDirectory + "/" + file[0:-len(".bank")] + ".smallbank" + if (needUpdateLogRemoveDest(log, sourceFile, destFile)): + subprocess.call([ ExecTimeout, str(SmallbankBuildTimeout), BuildSmallbank, sourceFile, destFile, DatabaseDirectory + "/" + TileRootSourceDirectory + "/" ]) +printLog(log, "") + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/smallbank/2_build.py b/code/nel/tools/build_gamedata/processes/smallbank/2_build.py old mode 100755 new mode 100644 index a13d1e843..5a6a5f9a1 --- a/code/nel/tools/build_gamedata/processes/smallbank/2_build.py +++ b/code/nel/tools/build_gamedata/processes/smallbank/2_build.py @@ -1,49 +1,49 @@ -#!/usr/bin/python -# -# \file 2_build.py -# \brief Build smallbank -# \date 2009-03-10-20-54-GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Build smallbank -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Build smallbank") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 2_build.py +# \brief Build smallbank +# \date 2009-03-10-20-54-GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Build smallbank +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Build smallbank") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/smallbank/3_install.py b/code/nel/tools/build_gamedata/processes/smallbank/3_install.py old mode 100755 new mode 100644 index 310cdaa52..c108f15c9 --- a/code/nel/tools/build_gamedata/processes/smallbank/3_install.py +++ b/code/nel/tools/build_gamedata/processes/smallbank/3_install.py @@ -1,57 +1,57 @@ -#!/usr/bin/python -# -# \file 3_install.py -# \brief Install smallbank -# \date 2009-03-10-20-54-GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Install smallbank -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Install smallbank") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -installPath = InstallDirectory + "/" + BankInstallDirectory -mkPath(log, installPath) - -printLog(log, ">>> Install smallbank <<<") -mkPath(log, ExportBuildDirectory + "/" + SmallbankExportDirectory) -copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + SmallbankExportDirectory, installPath, ".smallbank") - -printLog(log, "") -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 3_install.py +# \brief Install smallbank +# \date 2009-03-10-20-54-GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Install smallbank +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite_local import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Install smallbank") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +installPath = InstallDirectory + "/" + BankInstallDirectory +mkPath(log, installPath) + +printLog(log, ">>> Install smallbank <<<") +mkPath(log, ExportBuildDirectory + "/" + SmallbankExportDirectory) +copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + SmallbankExportDirectory, installPath, ".smallbank") + +printLog(log, "") +log.close() + + +# end of file 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 7ce690d5d..4f19f96c2 100644 --- a/code/nel/tools/build_gamedata/processes/sound/0_setup.py +++ b/code/nel/tools/build_gamedata/processes/sound/0_setup.py @@ -1,65 +1,65 @@ -#!/usr/bin/python -# -# \file 0_setup.py -# \brief setup sound -# \date 2010-05-24 13:42GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Setup sound -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Setup sound") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -# Setup source directories -printLog(log, ">>> Setup source directories <<<") -mkPath(log, SoundDirectory) -mkPath(log, SoundDfnDirectory) - -# Setup export directories -printLog(log, ">>> Setup export directories <<<") -mkPath(log, ExportBuildDirectory + "/" + SoundExportDirectory) - -# Setup build directories -printLog(log, ">>> Setup build directories <<<") - -# Setup client directories -printLog(log, ">>> Setup client directories <<<") -mkPath(log, InstallDirectory + "/" + SoundInstallDirectory) - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 0_setup.py +# \brief setup sound +# \date 2010-05-24 13:42GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Setup sound +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Setup sound") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +# Setup source directories +printLog(log, ">>> Setup source directories <<<") +mkPath(log, SoundDirectory) +mkPath(log, SoundDfnDirectory) + +# Setup export directories +printLog(log, ">>> Setup export directories <<<") +mkPath(log, ExportBuildDirectory + "/" + SoundExportDirectory) + +# Setup build directories +printLog(log, ">>> Setup build directories <<<") + +# Setup client directories +printLog(log, ">>> Setup client directories <<<") +mkPath(log, InstallDirectory + "/" + SoundInstallDirectory) + +log.close() + + +# end of file 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 066b2c256..7369972bb 100644 --- a/code/nel/tools/build_gamedata/processes/sound/1_export.py +++ b/code/nel/tools/build_gamedata/processes/sound/1_export.py @@ -1,65 +1,65 @@ -#!/usr/bin/python -# -# \file 1_export.py -# \brief Export sound -# \date 2010-05-24 13:42GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Export sound -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Export sound") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -# For each sound directory -printLog(log, ">>> Export sound <<<") -mkPath(log, ExportBuildDirectory + "/" + SoundExportDirectory) -mkPath(log, SoundDirectory) -mkPath(log, SoundDfnDirectory) -copyFilesExtNoTreeIfNeeded(log, SoundDfnDirectory, ExportBuildDirectory + "/" + SoundExportDirectory, ".dfn") -copyFilesExtNoTreeIfNeeded(log, SoundDfnDirectory, ExportBuildDirectory + "/" + SoundExportDirectory, ".typ") -copyFilesExtNoTreeIfNeeded(log, SoundDirectory, ExportBuildDirectory + "/" + SoundExportDirectory, ".mixer_config") -copyFilesExtNoTreeIfNeeded(log, SoundDirectory, ExportBuildDirectory + "/" + SoundExportDirectory, ".mp3") -copyFilesExtNoTreeIfNeeded(log, SoundDirectory, ExportBuildDirectory + "/" + SoundExportDirectory, ".ogg") -copyFilesExtNoTreeIfNeeded(log, SoundDirectory, ExportBuildDirectory + "/" + SoundExportDirectory, ".flac") -copyFilesExtNoTreeIfNeeded(log, SoundDirectory, ExportBuildDirectory + "/" + SoundExportDirectory, ".primitive") -copyFilesExtNoTreeIfNeeded(log, SoundDirectory, ExportBuildDirectory + "/" + SoundExportDirectory, ".sound_anim") - -printLog(log, "") - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 1_export.py +# \brief Export sound +# \date 2010-05-24 13:42GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Export sound +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Export sound") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +# For each sound directory +printLog(log, ">>> Export sound <<<") +mkPath(log, ExportBuildDirectory + "/" + SoundExportDirectory) +mkPath(log, SoundDirectory) +mkPath(log, SoundDfnDirectory) +copyFilesExtNoTreeIfNeeded(log, SoundDfnDirectory, ExportBuildDirectory + "/" + SoundExportDirectory, ".dfn") +copyFilesExtNoTreeIfNeeded(log, SoundDfnDirectory, ExportBuildDirectory + "/" + SoundExportDirectory, ".typ") +copyFilesExtNoTreeIfNeeded(log, SoundDirectory, ExportBuildDirectory + "/" + SoundExportDirectory, ".mixer_config") +copyFilesExtNoTreeIfNeeded(log, SoundDirectory, ExportBuildDirectory + "/" + SoundExportDirectory, ".mp3") +copyFilesExtNoTreeIfNeeded(log, SoundDirectory, ExportBuildDirectory + "/" + SoundExportDirectory, ".ogg") +copyFilesExtNoTreeIfNeeded(log, SoundDirectory, ExportBuildDirectory + "/" + SoundExportDirectory, ".flac") +copyFilesExtNoTreeIfNeeded(log, SoundDirectory, ExportBuildDirectory + "/" + SoundExportDirectory, ".primitive") +copyFilesExtNoTreeIfNeeded(log, SoundDirectory, ExportBuildDirectory + "/" + SoundExportDirectory, ".sound_anim") + +printLog(log, "") + +log.close() + + +# end of file 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 048f8f456..77637bdb8 100644 --- a/code/nel/tools/build_gamedata/processes/sound/2_build.py +++ b/code/nel/tools/build_gamedata/processes/sound/2_build.py @@ -1,49 +1,49 @@ -#!/usr/bin/python -# -# \file 2_build.py -# \brief Build sound -# \date 2010-05-24 13:42GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Build sound -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Build sound") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 2_build.py +# \brief Build sound +# \date 2010-05-24 13:42GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Build sound +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Build sound") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +log.close() + + +# end of file 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 b8078609f..f687bac1e 100644 --- a/code/nel/tools/build_gamedata/processes/sound/3_install.py +++ b/code/nel/tools/build_gamedata/processes/sound/3_install.py @@ -1,57 +1,57 @@ -#!/usr/bin/python -# -# \file 3_install.py -# \brief Install sound -# \date 2010-05-24 13:42GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Install sound -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Install sound") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -printLog(log, ">>> Install sound <<<") -srcDir = ExportBuildDirectory + "/" + SoundExportDirectory -mkPath(log, srcDir) -destDir = InstallDirectory + "/" + SoundInstallDirectory -mkPath(log, destDir) -copyFilesNoTreeIfNeeded(log, srcDir, destDir) - -printLog(log, "") -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 3_install.py +# \brief Install sound +# \date 2010-05-24 13:42GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Install sound +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite_local import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Install sound") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +printLog(log, ">>> Install sound <<<") +srcDir = ExportBuildDirectory + "/" + SoundExportDirectory +mkPath(log, srcDir) +destDir = InstallDirectory + "/" + SoundInstallDirectory +mkPath(log, destDir) +copyFilesNoTreeIfNeeded(log, srcDir, destDir) + +printLog(log, "") +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/soundbank/0_setup.py b/code/nel/tools/build_gamedata/processes/soundbank/0_setup.py index 368011d1a..cd5308fdb 100644 --- a/code/nel/tools/build_gamedata/processes/soundbank/0_setup.py +++ b/code/nel/tools/build_gamedata/processes/soundbank/0_setup.py @@ -1,65 +1,65 @@ -#!/usr/bin/python -# -# \file 0_setup.py -# \brief Setup soundbank -# \date 2009-06-03 10:47GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Setup soundbank -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Setup soundbank") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -# Setup source directories -printLog(log, ">>> Setup source directories <<<") -mkPath(log, SoundDirectory) -mkPath(log, SoundDfnDirectory) - -# Setup export directories -printLog(log, ">>> Setup export directories <<<") - -# Setup build directories -printLog(log, ">>> Setup build directories <<<") -mkPath(log, ExportBuildDirectory + "/" + SoundSheetsBuildDirectory) - -# Setup client directories -printLog(log, ">>> Setup client directories <<<") -mkPath(log, InstallDirectory + "/" + SoundInstallDirectory) - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 0_setup.py +# \brief Setup soundbank +# \date 2009-06-03 10:47GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Setup soundbank +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Setup soundbank") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +# Setup source directories +printLog(log, ">>> Setup source directories <<<") +mkPath(log, SoundDirectory) +mkPath(log, SoundDfnDirectory) + +# Setup export directories +printLog(log, ">>> Setup export directories <<<") + +# Setup build directories +printLog(log, ">>> Setup build directories <<<") +mkPath(log, ExportBuildDirectory + "/" + SoundSheetsBuildDirectory) + +# Setup client directories +printLog(log, ">>> Setup client directories <<<") +mkPath(log, InstallDirectory + "/" + SoundInstallDirectory) + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/soundbank/1_export.py b/code/nel/tools/build_gamedata/processes/soundbank/1_export.py index ffecbb4d3..5185d0970 100644 --- a/code/nel/tools/build_gamedata/processes/soundbank/1_export.py +++ b/code/nel/tools/build_gamedata/processes/soundbank/1_export.py @@ -1,49 +1,49 @@ -#!/usr/bin/python -# -# \file 1_export.py -# \brief Export soundbank -# \date 2009-06-03 10:47GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Export soundbank -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Export soundbank") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 1_export.py +# \brief Export soundbank +# \date 2009-06-03 10:47GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Export soundbank +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Export soundbank") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/soundbank/2_build.py b/code/nel/tools/build_gamedata/processes/soundbank/2_build.py index 03d2f6b07..5971c804f 100644 --- a/code/nel/tools/build_gamedata/processes/soundbank/2_build.py +++ b/code/nel/tools/build_gamedata/processes/soundbank/2_build.py @@ -1,64 +1,64 @@ -#!/usr/bin/python -# -# \file 2_build.py -# \brief Build soundbank -# \date 2009-06-03 10:47GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Build soundbank -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Build soundbank") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -# Find tools -BuildSoundbank = findTool(log, ToolDirectories, BuildSoundbankTool, ToolSuffix) -printLog(log, "") - -# build_soundbank -printLog(log, ">>> Build soundbank <<<") -if BuildSoundbank == "": - toolLogFail(log, BuildSoundbankTool, ToolSuffix) -else: - mkPath(log, SoundDirectory) - mkPath(log, SoundDfnDirectory) - mkPath(log, ExportBuildDirectory + "/" + SoundSheetsBuildDirectory) - subprocess.call([ BuildSoundbank, SoundDirectory, SoundDfnDirectory, ExportBuildDirectory + "/" + SoundSheetsBuildDirectory ]) -printLog(log, "") - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 2_build.py +# \brief Build soundbank +# \date 2009-06-03 10:47GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Build soundbank +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Build soundbank") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +# Find tools +BuildSoundbank = findTool(log, ToolDirectories, BuildSoundbankTool, ToolSuffix) +printLog(log, "") + +# build_soundbank +printLog(log, ">>> Build soundbank <<<") +if BuildSoundbank == "": + toolLogFail(log, BuildSoundbankTool, ToolSuffix) +else: + mkPath(log, SoundDirectory) + mkPath(log, SoundDfnDirectory) + mkPath(log, ExportBuildDirectory + "/" + SoundSheetsBuildDirectory) + subprocess.call([ BuildSoundbank, SoundDirectory, SoundDfnDirectory, ExportBuildDirectory + "/" + SoundSheetsBuildDirectory ]) +printLog(log, "") + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/soundbank/3_install.py b/code/nel/tools/build_gamedata/processes/soundbank/3_install.py index e8a2a6242..f9b323c8d 100644 --- a/code/nel/tools/build_gamedata/processes/soundbank/3_install.py +++ b/code/nel/tools/build_gamedata/processes/soundbank/3_install.py @@ -1,55 +1,55 @@ -#!/usr/bin/python -# -# \file 3_install.py -# \brief Install soundbank -# \date 2009-06-03 10:47GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Install soundbank -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Install soundbank") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -printLog(log, ">>> Install soundbank packed_sheets <<<") -mkPath(log, ExportBuildDirectory + "/" + SoundSheetsBuildDirectory) -mkPath(log, InstallDirectory + "/" + SoundInstallDirectory) -copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + SoundSheetsBuildDirectory, InstallDirectory + "/" + SoundInstallDirectory, ".packed_sheets") - -printLog(log, "") -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 3_install.py +# \brief Install soundbank +# \date 2009-06-03 10:47GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Install soundbank +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite_local import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Install soundbank") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +printLog(log, ">>> Install soundbank packed_sheets <<<") +mkPath(log, ExportBuildDirectory + "/" + SoundSheetsBuildDirectory) +mkPath(log, InstallDirectory + "/" + SoundInstallDirectory) +copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + SoundSheetsBuildDirectory, InstallDirectory + "/" + SoundInstallDirectory, ".packed_sheets") + +printLog(log, "") +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/swt/0_setup.py b/code/nel/tools/build_gamedata/processes/swt/0_setup.py old mode 100755 new mode 100644 index 4b947f496..f378354e5 --- a/code/nel/tools/build_gamedata/processes/swt/0_setup.py +++ b/code/nel/tools/build_gamedata/processes/swt/0_setup.py @@ -1,65 +1,65 @@ -#!/usr/bin/python -# -# \file 0_setup.py -# \brief setup swt -# \date 2009-03-10-20-23-GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Setup swt -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Setup skeleton weigths") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -# Setup source directories -printLog(log, ">>> Setup source directories <<<") -for dir in SwtSourceDirectories: - mkPath(log, DatabaseDirectory + "/" + dir) - -# Setup export directories -printLog(log, ">>> Setup export directories <<<") -mkPath(log, ExportBuildDirectory + "/" + SwtExportDirectory) - -# Setup build directories -printLog(log, ">>> Setup build directories <<<") - -# Setup client directories -printLog(log, ">>> Setup client directories <<<") -mkPath(log, InstallDirectory + "/" + SwtInstallDirectory) - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 0_setup.py +# \brief setup swt +# \date 2009-03-10-20-23-GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Setup swt +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Setup skeleton weigths") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +# Setup source directories +printLog(log, ">>> Setup source directories <<<") +for dir in SwtSourceDirectories: + mkPath(log, DatabaseDirectory + "/" + dir) + +# Setup export directories +printLog(log, ">>> Setup export directories <<<") +mkPath(log, ExportBuildDirectory + "/" + SwtExportDirectory) + +# Setup build directories +printLog(log, ">>> Setup build directories <<<") + +# Setup client directories +printLog(log, ">>> Setup client directories <<<") +mkPath(log, InstallDirectory + "/" + SwtInstallDirectory) + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/swt/1_export.py b/code/nel/tools/build_gamedata/processes/swt/1_export.py old mode 100755 new mode 100644 index 820950fe5..d2b1813a4 --- a/code/nel/tools/build_gamedata/processes/swt/1_export.py +++ b/code/nel/tools/build_gamedata/processes/swt/1_export.py @@ -1,99 +1,99 @@ -#!/usr/bin/python -# -# ################################################################# -# ## WARNING : this is a generated file, don't change it ! -# ################################################################# -# -# \file 1_export.py -# \brief Export swt -# \date 2015-01-06-16-31-GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Export swt -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Export swt") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -# Find tools -# ... - -# Export swt 3dsmax -if MaxAvailable: - # Find tools - Max = findMax(log, MaxDirectory, MaxExecutable) - printLog(log, "") - - printLog(log, ">>> Export swt 3dsmax <<<") - mkPath(log, ExportBuildDirectory + "/" + SwtExportDirectory) - for dir in SwtSourceDirectories: - mkPath(log, DatabaseDirectory + "/" + dir) - if (needUpdateDirByTagLog(log, DatabaseDirectory + "/" + dir, ".max", ExportBuildDirectory + "/" + SwtExportDirectory, ".swt")): - scriptSrc = "maxscript/swt_export.ms" - scriptDst = MaxUserDirectory + "/scripts/swt_export.ms" - outputLogfile = ScriptDirectory + "/processes/swt/log.log" - outputDirectory = ExportBuildDirectory + "/" + SwtExportDirectory - maxSourceDir = DatabaseDirectory + "/" + dir - tagList = findFiles(log, outputDirectory, "", ".swt") - tagLen = len(tagList) - if os.path.isfile(scriptDst): - os.remove(scriptDst) - tagDiff = 1 - sSrc = open(scriptSrc, "r") - sDst = open(scriptDst, "w") - for line in sSrc: - newline = line.replace("%OutputLogfile%", outputLogfile) - newline = newline.replace("%MaxSourceDirectory%", maxSourceDir) - newline = newline.replace("%OutputDirectory%", outputDirectory) - sDst.write(newline) - sSrc.close() - sDst.close() - while tagDiff > 0: - printLog(log, "MAXSCRIPT " + scriptDst) - subprocess.call([ Max, "-U", "MAXScript", "swt_export.ms", "-q", "-mi", "-mip" ]) - tagList = findFiles(log, outputDirectory, "", ".swt") - newTagLen = len(tagList) - tagDiff = newTagLen - tagLen - tagLen = newTagLen - printLog(log, "Exported " + str(tagDiff) + " .swt files!") - os.remove(scriptDst) - - - -printLog(log, "") -log.close() - - -# end of file +#!/usr/bin/python +# +# ################################################################# +# ## WARNING : this is a generated file, don't change it ! +# ################################################################# +# +# \file 1_export.py +# \brief Export swt +# \date 2015-01-06-16-31-GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Export swt +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Export swt") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +# Find tools +# ... + +# Export swt 3dsmax +if MaxAvailable: + # Find tools + Max = findMax(log, MaxDirectory, MaxExecutable) + printLog(log, "") + + printLog(log, ">>> Export swt 3dsmax <<<") + mkPath(log, ExportBuildDirectory + "/" + SwtExportDirectory) + for dir in SwtSourceDirectories: + mkPath(log, DatabaseDirectory + "/" + dir) + if (needUpdateDirByTagLog(log, DatabaseDirectory + "/" + dir, ".max", ExportBuildDirectory + "/" + SwtExportDirectory, ".swt")): + scriptSrc = "maxscript/swt_export.ms" + scriptDst = MaxUserDirectory + "/scripts/swt_export.ms" + outputLogfile = ScriptDirectory + "/processes/swt/log.log" + outputDirectory = ExportBuildDirectory + "/" + SwtExportDirectory + maxSourceDir = DatabaseDirectory + "/" + dir + tagList = findFiles(log, outputDirectory, "", ".swt") + tagLen = len(tagList) + if os.path.isfile(scriptDst): + os.remove(scriptDst) + tagDiff = 1 + sSrc = open(scriptSrc, "r") + sDst = open(scriptDst, "w") + for line in sSrc: + newline = line.replace("%OutputLogfile%", outputLogfile) + newline = newline.replace("%MaxSourceDirectory%", maxSourceDir) + newline = newline.replace("%OutputDirectory%", outputDirectory) + sDst.write(newline) + sSrc.close() + sDst.close() + while tagDiff > 0: + printLog(log, "MAXSCRIPT " + scriptDst) + subprocess.call([ Max, "-U", "MAXScript", "swt_export.ms", "-q", "-mi", "-mip" ]) + tagList = findFiles(log, outputDirectory, "", ".swt") + newTagLen = len(tagList) + tagDiff = newTagLen - tagLen + tagLen = newTagLen + printLog(log, "Exported " + str(tagDiff) + " .swt files!") + os.remove(scriptDst) + + + +printLog(log, "") +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/swt/2_build.py b/code/nel/tools/build_gamedata/processes/swt/2_build.py old mode 100755 new mode 100644 index 7ae606a0a..a03fbf94c --- a/code/nel/tools/build_gamedata/processes/swt/2_build.py +++ b/code/nel/tools/build_gamedata/processes/swt/2_build.py @@ -1,49 +1,49 @@ -#!/usr/bin/python -# -# \file 2_build.py -# \brief Build swt -# \date 2009-03-10-20-23-GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Build swt -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Build skeleton weigths") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 2_build.py +# \brief Build swt +# \date 2009-03-10-20-23-GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Build swt +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Build skeleton weigths") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/swt/3_install.py b/code/nel/tools/build_gamedata/processes/swt/3_install.py old mode 100755 new mode 100644 index b70e623f5..67acb0340 --- a/code/nel/tools/build_gamedata/processes/swt/3_install.py +++ b/code/nel/tools/build_gamedata/processes/swt/3_install.py @@ -1,57 +1,57 @@ -#!/usr/bin/python -# -# \file 3_install.py -# \brief Install swt -# \date 2009-03-10-20-23-GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Install swt -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Install skeleton weigths") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -installPath = InstallDirectory + "/" + SwtInstallDirectory -mkPath(log, installPath) - -printLog(log, ">>> Install skeleton weigths <<<") -mkPath(log, ExportBuildDirectory + "/" + SwtExportDirectory) -copyFilesNoTreeIfNeeded(log, ExportBuildDirectory + "/" + SwtExportDirectory, installPath) - -printLog(log, "") -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 3_install.py +# \brief Install swt +# \date 2009-03-10-20-23-GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Install swt +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite_local import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Install skeleton weigths") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +installPath = InstallDirectory + "/" + SwtInstallDirectory +mkPath(log, installPath) + +printLog(log, ">>> Install skeleton weigths <<<") +mkPath(log, ExportBuildDirectory + "/" + SwtExportDirectory) +copyFilesNoTreeIfNeeded(log, ExportBuildDirectory + "/" + SwtExportDirectory, installPath) + +printLog(log, "") +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/swt/maxscript/swt_export.ms b/code/nel/tools/build_gamedata/processes/swt/maxscript/swt_export.ms old mode 100755 new mode 100644 diff --git a/code/nel/tools/build_gamedata/processes/tiles/0_setup.py b/code/nel/tools/build_gamedata/processes/tiles/0_setup.py old mode 100755 new mode 100644 index e7a093723..2ffea0058 --- a/code/nel/tools/build_gamedata/processes/tiles/0_setup.py +++ b/code/nel/tools/build_gamedata/processes/tiles/0_setup.py @@ -1,65 +1,65 @@ -#!/usr/bin/python -# -# \file 0_setup.py -# \brief Setup tiles -# \date 2009-03-10-21-31-GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Setup tiles -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Setup tiles") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -# Setup source directories -printLog(log, ">>> Setup source directories <<<") -for dir in TilesSourceDirectories: - mkPath(log, DatabaseDirectory + "/" + dir) - -# Setup export directories -printLog(log, ">>> Setup export directories <<<") -mkPath(log, ExportBuildDirectory + "/" + TilesExportDirectory) - -# Setup build directories -printLog(log, ">>> Setup build directories <<<") - -# Setup client directories -printLog(log, ">>> Setup client directories <<<") -mkPath(log, InstallDirectory + "/" + TilesInstallDirectory) - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 0_setup.py +# \brief Setup tiles +# \date 2009-03-10-21-31-GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Setup tiles +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Setup tiles") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +# Setup source directories +printLog(log, ">>> Setup source directories <<<") +for dir in TilesSourceDirectories: + mkPath(log, DatabaseDirectory + "/" + dir) + +# Setup export directories +printLog(log, ">>> Setup export directories <<<") +mkPath(log, ExportBuildDirectory + "/" + TilesExportDirectory) + +# Setup build directories +printLog(log, ">>> Setup build directories <<<") + +# Setup client directories +printLog(log, ">>> Setup client directories <<<") +mkPath(log, InstallDirectory + "/" + TilesInstallDirectory) + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/tiles/1_export.py b/code/nel/tools/build_gamedata/processes/tiles/1_export.py old mode 100755 new mode 100644 index 9459b81b2..97206e330 --- a/code/nel/tools/build_gamedata/processes/tiles/1_export.py +++ b/code/nel/tools/build_gamedata/processes/tiles/1_export.py @@ -1,84 +1,84 @@ -#!/usr/bin/python -# -# \file 1_export.py -# \brief Export tiles -# \date 2009-03-10-21-31-GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Export tiles -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Export tiles") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -# Find tools -TgaToDds = findTool(log, ToolDirectories, TgaToDdsTool, ToolSuffix) -ExecTimeout = findTool(log, ToolDirectories, ExecTimeoutTool, ToolSuffix) -printLog(log, "") - -# For each tiles directory -printLog(log, ">>> Export tiles as DDS <<<") -if TgaToDds == "": - toolLogFail(log, TgaToDdsTool, ToolSuffix) -elif ExecTimeout == "": - toolLogFail(log, ExecTimeoutTool, ToolSuffix) -else: - mkPath(log, ExportBuildDirectory + "/" + TilesExportDirectory) - for dir in TilesSourceDirectories: - mkPath(log, DatabaseDirectory + "/" + dir) - files = findFiles(log, DatabaseDirectory + "/" + dir, "", ".tga") - for file in files: - sourceFile = DatabaseDirectory + "/" + dir + "/" + file - destFile = ExportBuildDirectory + "/" + TilesExportDirectory + "/" + os.path.basename(file)[0:-len(".tga")] + ".dds" - if needUpdateLogRemoveDest(log, sourceFile, destFile): - subprocess.call([ ExecTimeout, str(MapsBuildTimeout), TgaToDds, sourceFile, "-o", destFile, "-a", "5", "-m" ]) - files = findFiles(log, DatabaseDirectory + "/" + dir, "", ".png") - for file in files: - sourceFile = DatabaseDirectory + "/" + dir + "/" + file - destFile = ExportBuildDirectory + "/" + TilesExportDirectory + "/" + os.path.basename(file)[0:-len(".png")] + ".dds" - if needUpdateLogRemoveDest(log, sourceFile, destFile): - subprocess.call([ ExecTimeout, str(MapsBuildTimeout), TgaToDds, sourceFile, "-o", destFile, "-a", "5", "-m" ]) - -#printLog(log, ">>> Copy PNG tiles <<<") -#mkPath(log, ExportBuildDirectory + "/" + TilesExportDirectory) -#for dir in TilesSourceDirectories: -# mkPath(log, DatabaseDirectory + "/" + dir) -# copyFilesExtNoTreeIfNeeded(log, DatabaseDirectory + "/" + dir, ExportBuildDirectory + "/" + TilesExportDirectory, ".png") -#printLog(log, "") - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 1_export.py +# \brief Export tiles +# \date 2009-03-10-21-31-GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Export tiles +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Export tiles") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +# Find tools +TgaToDds = findTool(log, ToolDirectories, TgaToDdsTool, ToolSuffix) +ExecTimeout = findTool(log, ToolDirectories, ExecTimeoutTool, ToolSuffix) +printLog(log, "") + +# For each tiles directory +printLog(log, ">>> Export tiles as DDS <<<") +if TgaToDds == "": + toolLogFail(log, TgaToDdsTool, ToolSuffix) +elif ExecTimeout == "": + toolLogFail(log, ExecTimeoutTool, ToolSuffix) +else: + mkPath(log, ExportBuildDirectory + "/" + TilesExportDirectory) + for dir in TilesSourceDirectories: + mkPath(log, DatabaseDirectory + "/" + dir) + files = findFiles(log, DatabaseDirectory + "/" + dir, "", ".tga") + for file in files: + sourceFile = DatabaseDirectory + "/" + dir + "/" + file + destFile = ExportBuildDirectory + "/" + TilesExportDirectory + "/" + os.path.basename(file)[0:-len(".tga")] + ".dds" + if needUpdateLogRemoveDest(log, sourceFile, destFile): + subprocess.call([ ExecTimeout, str(MapsBuildTimeout), TgaToDds, sourceFile, "-o", destFile, "-a", "5", "-m" ]) + files = findFiles(log, DatabaseDirectory + "/" + dir, "", ".png") + for file in files: + sourceFile = DatabaseDirectory + "/" + dir + "/" + file + destFile = ExportBuildDirectory + "/" + TilesExportDirectory + "/" + os.path.basename(file)[0:-len(".png")] + ".dds" + if needUpdateLogRemoveDest(log, sourceFile, destFile): + subprocess.call([ ExecTimeout, str(MapsBuildTimeout), TgaToDds, sourceFile, "-o", destFile, "-a", "5", "-m" ]) + +#printLog(log, ">>> Copy PNG tiles <<<") +#mkPath(log, ExportBuildDirectory + "/" + TilesExportDirectory) +#for dir in TilesSourceDirectories: +# mkPath(log, DatabaseDirectory + "/" + dir) +# copyFilesExtNoTreeIfNeeded(log, DatabaseDirectory + "/" + dir, ExportBuildDirectory + "/" + TilesExportDirectory, ".png") +#printLog(log, "") + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/tiles/2_build.py b/code/nel/tools/build_gamedata/processes/tiles/2_build.py old mode 100755 new mode 100644 index af1349ccf..6262393a8 --- a/code/nel/tools/build_gamedata/processes/tiles/2_build.py +++ b/code/nel/tools/build_gamedata/processes/tiles/2_build.py @@ -1,49 +1,49 @@ -#!/usr/bin/python -# -# \file 2_build.py -# \brief Build tiles -# \date 2009-03-10-21-31-GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Build tiles -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Build tiles") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 2_build.py +# \brief Build tiles +# \date 2009-03-10-21-31-GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Build tiles +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Build tiles") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/tiles/3_install.py b/code/nel/tools/build_gamedata/processes/tiles/3_install.py old mode 100755 new mode 100644 index a9a31187e..1332475e9 --- a/code/nel/tools/build_gamedata/processes/tiles/3_install.py +++ b/code/nel/tools/build_gamedata/processes/tiles/3_install.py @@ -1,55 +1,55 @@ -#!/usr/bin/python -# -# \file 3_install.py -# \brief Install tiles -# \date 2009-03-10-21-31-GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Install tiles -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Install tiles") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -printLog(log, ">>> Install tiles <<<") -mkPath(log, InstallDirectory + "/" + TilesInstallDirectory) -mkPath(log, ExportBuildDirectory + "/" + TilesExportDirectory) -copyFilesNoTreeIfNeeded(log, ExportBuildDirectory + "/" + TilesExportDirectory, InstallDirectory + "/" + TilesInstallDirectory) - -printLog(log, "") -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 3_install.py +# \brief Install tiles +# \date 2009-03-10-21-31-GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Install tiles +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite_local import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Install tiles") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +printLog(log, ">>> Install tiles <<<") +mkPath(log, InstallDirectory + "/" + TilesInstallDirectory) +mkPath(log, ExportBuildDirectory + "/" + TilesExportDirectory) +copyFilesNoTreeIfNeeded(log, ExportBuildDirectory + "/" + TilesExportDirectory, InstallDirectory + "/" + TilesInstallDirectory) + +printLog(log, "") +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/veget/0_setup.py b/code/nel/tools/build_gamedata/processes/veget/0_setup.py old mode 100755 new mode 100644 index 222bc39bb..65c2f4353 --- a/code/nel/tools/build_gamedata/processes/veget/0_setup.py +++ b/code/nel/tools/build_gamedata/processes/veget/0_setup.py @@ -1,66 +1,66 @@ -#!/usr/bin/python -# -# \file 0_setup.py -# \brief setup veget -# \date 2010-09-02-08-40-GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Setup veget -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Setup veget") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -# Setup source directories -printLog(log, ">>> Setup source directories <<<") -for dir in VegetSourceDirectories: - mkPath(log, DatabaseDirectory + "/" + dir) - -# Setup export directories -printLog(log, ">>> Setup export directories <<<") -mkPath(log, ExportBuildDirectory + "/" + VegetExportDirectory) -mkPath(log, ExportBuildDirectory + "/" + VegetTagExportDirectory) - -# Setup build directories -printLog(log, ">>> Setup build directories <<<") - -# Setup client directories -printLog(log, ">>> Setup client directories <<<") -mkPath(log, InstallDirectory + "/" + VegetInstallDirectory) - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 0_setup.py +# \brief setup veget +# \date 2010-09-02-08-40-GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Setup veget +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Setup veget") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +# Setup source directories +printLog(log, ">>> Setup source directories <<<") +for dir in VegetSourceDirectories: + mkPath(log, DatabaseDirectory + "/" + dir) + +# Setup export directories +printLog(log, ">>> Setup export directories <<<") +mkPath(log, ExportBuildDirectory + "/" + VegetExportDirectory) +mkPath(log, ExportBuildDirectory + "/" + VegetTagExportDirectory) + +# Setup build directories +printLog(log, ">>> Setup build directories <<<") + +# Setup client directories +printLog(log, ">>> Setup client directories <<<") +mkPath(log, InstallDirectory + "/" + VegetInstallDirectory) + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/veget/1_export.py b/code/nel/tools/build_gamedata/processes/veget/1_export.py old mode 100755 new mode 100644 index ae8b835a3..0bb5dcbcd --- a/code/nel/tools/build_gamedata/processes/veget/1_export.py +++ b/code/nel/tools/build_gamedata/processes/veget/1_export.py @@ -1,139 +1,139 @@ -#!/usr/bin/python -# -# ################################################################# -# ## WARNING : this is a generated file, don't change it ! -# ################################################################# -# -# \file 1_export.py -# \brief Export veget -# \date 2015-01-06-16-31-GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Export veget -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -import time, sys, os, shutil, subprocess, distutils.dir_util -sys.path.append("../../configuration") - -if os.path.isfile("log.log"): - os.remove("log.log") -if os.path.isfile("temp_log.log"): - os.remove("temp_log.log") -log = open("temp_log.log", "w") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Export veget") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - - -# Find tools -# ... - -# Export veget 3dsmax -if MaxAvailable: - # Find tools - Max = findMax(log, MaxDirectory, MaxExecutable) - printLog(log, "") - - printLog(log, ">>> Export veget 3dsmax <<<") - mkPath(log, ExportBuildDirectory + "/" + VegetExportDirectory) - mkPath(log, ExportBuildDirectory + "/" + VegetTagExportDirectory) - for dir in VegetSourceDirectories: - mkPath(log, DatabaseDirectory + "/" + dir) - if (needUpdateDirByTagLog(log, DatabaseDirectory + "/" + dir, ".max", ExportBuildDirectory + "/" + VegetTagExportDirectory, ".max.tag")): - scriptSrc = "maxscript/veget_export.ms" - scriptDst = MaxUserDirectory + "/scripts/veget_export.ms" - outputLogfile = ScriptDirectory + "/processes/veget/log.log" - outputDirectory = ExportBuildDirectory + "/" + VegetExportDirectory - tagDirectory = ExportBuildDirectory + "/" + VegetTagExportDirectory - maxSourceDir = DatabaseDirectory + "/" + dir - maxRunningTagFile = tagDirectory + "/max_running.tag" - tagList = findFiles(log, tagDirectory, "", ".max.tag") - tagLen = len(tagList) - if os.path.isfile(scriptDst): - os.remove(scriptDst) - tagDiff = 1 - sSrc = open(scriptSrc, "r") - sDst = open(scriptDst, "w") - for line in sSrc: - newline = line.replace("%OutputLogfile%", outputLogfile) - newline = newline.replace("%MaxSourceDirectory%", maxSourceDir) - newline = newline.replace("%OutputDirectory%", outputDirectory) - newline = newline.replace("%TagDirectory%", tagDirectory) - sDst.write(newline) - sSrc.close() - sDst.close() - zeroRetryLimit = 3 - while tagDiff > 0: - mrt = open(maxRunningTagFile, "w") - mrt.write("moe-moe-kyun") - mrt.close() - printLog(log, "MAXSCRIPT " + scriptDst) - subprocess.call([ Max, "-U", "MAXScript", "veget_export.ms", "-q", "-mi", "-mip" ]) - if os.path.exists(outputLogfile): - try: - lSrc = open(outputLogfile, "r") - for line in lSrc: - lineStrip = line.strip() - if (len(lineStrip) > 0): - printLog(log, lineStrip) - lSrc.close() - os.remove(outputLogfile) - except Exception: - printLog(log, "ERROR Failed to read 3dsmax log") - else: - printLog(log, "WARNING No 3dsmax log") - tagList = findFiles(log, tagDirectory, "", ".max.tag") - newTagLen = len(tagList) - tagDiff = newTagLen - tagLen - tagLen = newTagLen - addTagDiff = 0 - if os.path.exists(maxRunningTagFile): - printLog(log, "FAIL 3ds Max crashed and/or file export failed!") - if tagDiff == 0: - if zeroRetryLimit > 0: - zeroRetryLimit = zeroRetryLimit - 1 - addTagDiff = 1 - else: - printLog(log, "FAIL Retry limit reached!") - else: - addTagDiff = 1 - os.remove(maxRunningTagFile) - printLog(log, "Exported " + str(tagDiff) + " .max files!") - tagDiff += addTagDiff - os.remove(scriptDst) - printLog(log, "") - - - -log.close() -if os.path.isfile("log.log"): - os.remove("log.log") -shutil.move("temp_log.log", "log.log") - - -# end of file +#!/usr/bin/python +# +# ################################################################# +# ## WARNING : this is a generated file, don't change it ! +# ################################################################# +# +# \file 1_export.py +# \brief Export veget +# \date 2015-01-06-16-31-GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Export veget +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +import time, sys, os, shutil, subprocess, distutils.dir_util +sys.path.append("../../configuration") + +if os.path.isfile("log.log"): + os.remove("log.log") +if os.path.isfile("temp_log.log"): + os.remove("temp_log.log") +log = open("temp_log.log", "w") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Export veget") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + + +# Find tools +# ... + +# Export veget 3dsmax +if MaxAvailable: + # Find tools + Max = findMax(log, MaxDirectory, MaxExecutable) + printLog(log, "") + + printLog(log, ">>> Export veget 3dsmax <<<") + mkPath(log, ExportBuildDirectory + "/" + VegetExportDirectory) + mkPath(log, ExportBuildDirectory + "/" + VegetTagExportDirectory) + for dir in VegetSourceDirectories: + mkPath(log, DatabaseDirectory + "/" + dir) + if (needUpdateDirByTagLog(log, DatabaseDirectory + "/" + dir, ".max", ExportBuildDirectory + "/" + VegetTagExportDirectory, ".max.tag")): + scriptSrc = "maxscript/veget_export.ms" + scriptDst = MaxUserDirectory + "/scripts/veget_export.ms" + outputLogfile = ScriptDirectory + "/processes/veget/log.log" + outputDirectory = ExportBuildDirectory + "/" + VegetExportDirectory + tagDirectory = ExportBuildDirectory + "/" + VegetTagExportDirectory + maxSourceDir = DatabaseDirectory + "/" + dir + maxRunningTagFile = tagDirectory + "/max_running.tag" + tagList = findFiles(log, tagDirectory, "", ".max.tag") + tagLen = len(tagList) + if os.path.isfile(scriptDst): + os.remove(scriptDst) + tagDiff = 1 + sSrc = open(scriptSrc, "r") + sDst = open(scriptDst, "w") + for line in sSrc: + newline = line.replace("%OutputLogfile%", outputLogfile) + newline = newline.replace("%MaxSourceDirectory%", maxSourceDir) + newline = newline.replace("%OutputDirectory%", outputDirectory) + newline = newline.replace("%TagDirectory%", tagDirectory) + sDst.write(newline) + sSrc.close() + sDst.close() + zeroRetryLimit = 3 + while tagDiff > 0: + mrt = open(maxRunningTagFile, "w") + mrt.write("moe-moe-kyun") + mrt.close() + printLog(log, "MAXSCRIPT " + scriptDst) + subprocess.call([ Max, "-U", "MAXScript", "veget_export.ms", "-q", "-mi", "-mip" ]) + if os.path.exists(outputLogfile): + try: + lSrc = open(outputLogfile, "r") + for line in lSrc: + lineStrip = line.strip() + if (len(lineStrip) > 0): + printLog(log, lineStrip) + lSrc.close() + os.remove(outputLogfile) + except Exception: + printLog(log, "ERROR Failed to read 3dsmax log") + else: + printLog(log, "WARNING No 3dsmax log") + tagList = findFiles(log, tagDirectory, "", ".max.tag") + newTagLen = len(tagList) + tagDiff = newTagLen - tagLen + tagLen = newTagLen + addTagDiff = 0 + if os.path.exists(maxRunningTagFile): + printLog(log, "FAIL 3ds Max crashed and/or file export failed!") + if tagDiff == 0: + if zeroRetryLimit > 0: + zeroRetryLimit = zeroRetryLimit - 1 + addTagDiff = 1 + else: + printLog(log, "FAIL Retry limit reached!") + else: + addTagDiff = 1 + os.remove(maxRunningTagFile) + printLog(log, "Exported " + str(tagDiff) + " .max files!") + tagDiff += addTagDiff + os.remove(scriptDst) + printLog(log, "") + + + +log.close() +if os.path.isfile("log.log"): + os.remove("log.log") +shutil.move("temp_log.log", "log.log") + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/veget/2_build.py b/code/nel/tools/build_gamedata/processes/veget/2_build.py old mode 100755 new mode 100644 index e3358fd39..9a0702e86 --- a/code/nel/tools/build_gamedata/processes/veget/2_build.py +++ b/code/nel/tools/build_gamedata/processes/veget/2_build.py @@ -1,49 +1,49 @@ -#!/usr/bin/python -# -# \file 2_build.py -# \brief Build veget -# \date 2010-09-02-08-40-GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Build veget -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Build veget") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 2_build.py +# \brief Build veget +# \date 2010-09-02-08-40-GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Build veget +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Build veget") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/veget/3_install.py b/code/nel/tools/build_gamedata/processes/veget/3_install.py old mode 100755 new mode 100644 index 5801e6392..b576f238d --- a/code/nel/tools/build_gamedata/processes/veget/3_install.py +++ b/code/nel/tools/build_gamedata/processes/veget/3_install.py @@ -1,57 +1,57 @@ -#!/usr/bin/python -# -# \file 3_install.py -# \brief Install veget -# \date 2010-09-02-08-40-GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Install veget -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Install veget") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -printLog(log, ">>> Install veget <<<") -exportPath = ExportBuildDirectory + "/" + VegetExportDirectory -mkPath(log, exportPath) -installPath = InstallDirectory + "/" + VegetInstallDirectory -mkPath(log, installPath) -copyFilesNoTreeIfNeeded(log, exportPath, installPath) - -printLog(log, "") -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 3_install.py +# \brief Install veget +# \date 2010-09-02-08-40-GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Install veget +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite_local import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Install veget") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +printLog(log, ">>> Install veget <<<") +exportPath = ExportBuildDirectory + "/" + VegetExportDirectory +mkPath(log, exportPath) +installPath = InstallDirectory + "/" + VegetInstallDirectory +mkPath(log, installPath) +copyFilesNoTreeIfNeeded(log, exportPath, installPath) + +printLog(log, "") +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/veget/maxscript/veget_export.ms b/code/nel/tools/build_gamedata/processes/veget/maxscript/veget_export.ms old mode 100755 new mode 100644 diff --git a/code/nel/tools/build_gamedata/processes/vegetset/0_setup.py b/code/nel/tools/build_gamedata/processes/vegetset/0_setup.py old mode 100755 new mode 100644 index c46c11b66..b80eb5c40 --- a/code/nel/tools/build_gamedata/processes/vegetset/0_setup.py +++ b/code/nel/tools/build_gamedata/processes/vegetset/0_setup.py @@ -1,65 +1,65 @@ -#!/usr/bin/python -# -# \file 0_setup.py -# \brief setup vegetset -# \date 2010-05-24 08:13GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Setup vegetset -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Setup vegetset") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -# Setup source directories -printLog(log, ">>> Setup source directories <<<") -for dir in VegetSetSourceDirectories: - mkPath(log, DatabaseDirectory + "/" + dir) - -# Setup export directories -printLog(log, ">>> Setup export directories <<<") -mkPath(log, ExportBuildDirectory + "/" + VegetSetExportDirectory) - -# Setup build directories -printLog(log, ">>> Setup build directories <<<") - -# Setup client directories -printLog(log, ">>> Setup client directories <<<") -mkPath(log, InstallDirectory + "/" + VegetSetInstallDirectory) - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 0_setup.py +# \brief setup vegetset +# \date 2010-05-24 08:13GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Setup vegetset +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Setup vegetset") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +# Setup source directories +printLog(log, ">>> Setup source directories <<<") +for dir in VegetSetSourceDirectories: + mkPath(log, DatabaseDirectory + "/" + dir) + +# Setup export directories +printLog(log, ">>> Setup export directories <<<") +mkPath(log, ExportBuildDirectory + "/" + VegetSetExportDirectory) + +# Setup build directories +printLog(log, ">>> Setup build directories <<<") + +# Setup client directories +printLog(log, ">>> Setup client directories <<<") +mkPath(log, InstallDirectory + "/" + VegetSetInstallDirectory) + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/vegetset/1_export.py b/code/nel/tools/build_gamedata/processes/vegetset/1_export.py old mode 100755 new mode 100644 index 03d70f59d..73ac832e4 --- a/code/nel/tools/build_gamedata/processes/vegetset/1_export.py +++ b/code/nel/tools/build_gamedata/processes/vegetset/1_export.py @@ -1,57 +1,57 @@ -#!/usr/bin/python -# -# \file 1_export.py -# \brief Export vegetset -# \date 2010-05-24 08:13GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Export vegetset -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Export vegetset") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -# For each vegetset directoy -printLog(log, ">>> Export vegetset <<<") -mkPath(log, ExportBuildDirectory + "/" + VegetSetExportDirectory) -for dir in VegetSetSourceDirectories: - mkPath(log, DatabaseDirectory + "/" + dir) - copyFilesExtNoTreeIfNeeded(log, DatabaseDirectory + "/" + dir, ExportBuildDirectory + "/" + VegetSetExportDirectory, ".vegetset") -printLog(log, "") - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 1_export.py +# \brief Export vegetset +# \date 2010-05-24 08:13GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Export vegetset +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Export vegetset") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +# For each vegetset directoy +printLog(log, ">>> Export vegetset <<<") +mkPath(log, ExportBuildDirectory + "/" + VegetSetExportDirectory) +for dir in VegetSetSourceDirectories: + mkPath(log, DatabaseDirectory + "/" + dir) + copyFilesExtNoTreeIfNeeded(log, DatabaseDirectory + "/" + dir, ExportBuildDirectory + "/" + VegetSetExportDirectory, ".vegetset") +printLog(log, "") + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/vegetset/2_build.py b/code/nel/tools/build_gamedata/processes/vegetset/2_build.py old mode 100755 new mode 100644 index 0aab2ecee..41c235493 --- a/code/nel/tools/build_gamedata/processes/vegetset/2_build.py +++ b/code/nel/tools/build_gamedata/processes/vegetset/2_build.py @@ -1,49 +1,49 @@ -#!/usr/bin/python -# -# \file 2_build.py -# \brief Build vegetset -# \date 2010-05-24 08:13GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Build vegetset -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Build vegetset") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 2_build.py +# \brief Build vegetset +# \date 2010-05-24 08:13GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Build vegetset +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Build vegetset") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/vegetset/3_install.py b/code/nel/tools/build_gamedata/processes/vegetset/3_install.py old mode 100755 new mode 100644 index 25ebd7677..b900542d4 --- a/code/nel/tools/build_gamedata/processes/vegetset/3_install.py +++ b/code/nel/tools/build_gamedata/processes/vegetset/3_install.py @@ -1,57 +1,57 @@ -#!/usr/bin/python -# -# \file 3_install.py -# \brief Install vegetset -# \date 2010-05-24 08:13GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Install vegetset -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Install vegetset") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -installPath = InstallDirectory + "/" + VegetSetInstallDirectory -mkPath(log, installPath) - -printLog(log, ">>> Install vegetset <<<") -mkPath(log, ExportBuildDirectory + "/" + VegetSetExportDirectory) -copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + VegetSetExportDirectory, installPath, ".vegetset") - -printLog(log, "") -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 3_install.py +# \brief Install vegetset +# \date 2010-05-24 08:13GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Install vegetset +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite_local import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Install vegetset") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +installPath = InstallDirectory + "/" + VegetSetInstallDirectory +mkPath(log, installPath) + +printLog(log, ">>> Install vegetset <<<") +mkPath(log, ExportBuildDirectory + "/" + VegetSetExportDirectory) +copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + VegetSetExportDirectory, installPath, ".vegetset") + +printLog(log, "") +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/zone/0_setup.py b/code/nel/tools/build_gamedata/processes/zone/0_setup.py old mode 100755 new mode 100644 index ab85cb515..b8528d9c9 --- a/code/nel/tools/build_gamedata/processes/zone/0_setup.py +++ b/code/nel/tools/build_gamedata/processes/zone/0_setup.py @@ -1,66 +1,66 @@ -#!/usr/bin/python -# -# \file 0_setup.py -# \brief Setup zone -# \date 2009-03-10-22-23-GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Setup zone -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Setup zone") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -# Setup source directories -printLog(log, ">>> Setup source directories <<<") -mkPath(log, DatabaseDirectory + "/" + ZoneSourceDirectory[0]) - -# Setup export directories -printLog(log, ">>> Setup export directories <<<") -mkPath(log, ExportBuildDirectory + "/" + ZoneExportDirectory) - -# Setup build directories -printLog(log, ">>> Setup build directories <<<") -mkPath(log, ExportBuildDirectory + "/" + ZoneDependBuildDirectory) -mkPath(log, ExportBuildDirectory + "/" + ZoneWeldBuildDirectory) - -# Setup client directories -printLog(log, ">>> Setup client directories <<<") -mkPath(log, InstallDirectory + "/" + ZoneInstallDirectory) - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 0_setup.py +# \brief Setup zone +# \date 2009-03-10-22-23-GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Setup zone +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Setup zone") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +# Setup source directories +printLog(log, ">>> Setup source directories <<<") +mkPath(log, DatabaseDirectory + "/" + ZoneSourceDirectory[0]) + +# Setup export directories +printLog(log, ">>> Setup export directories <<<") +mkPath(log, ExportBuildDirectory + "/" + ZoneExportDirectory) + +# Setup build directories +printLog(log, ">>> Setup build directories <<<") +mkPath(log, ExportBuildDirectory + "/" + ZoneDependBuildDirectory) +mkPath(log, ExportBuildDirectory + "/" + ZoneWeldBuildDirectory) + +# Setup client directories +printLog(log, ">>> Setup client directories <<<") +mkPath(log, InstallDirectory + "/" + ZoneInstallDirectory) + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/zone/1_export.py b/code/nel/tools/build_gamedata/processes/zone/1_export.py old mode 100755 new mode 100644 index acffe9abb..58c018cc7 --- a/code/nel/tools/build_gamedata/processes/zone/1_export.py +++ b/code/nel/tools/build_gamedata/processes/zone/1_export.py @@ -1,107 +1,107 @@ -#!/usr/bin/python -# -# ################################################################# -# ## WARNING : this is a generated file, don't change it ! -# ################################################################# -# -# \file 1_export.py -# \brief Export zone -# \date 2015-01-06-16-31-GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Export zone -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Export zone") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -# Find tools -# ... - -# Export zone 3dsmax -if MaxAvailable: - # Find tools - Max = findMax(log, MaxDirectory, MaxExecutable) - printLog(log, "") - - printLog(log, ">>> Export zone 3dsmax <<<") - mkPath(log, ExportBuildDirectory + "/" + ZoneExportDirectory) - for dir in ZoneSourceDirectory: - mkPath(log, DatabaseDirectory + "/" + dir) - if (needUpdateDirByTagLog(log, DatabaseDirectory + "/" + dir, ".max", ExportBuildDirectory + "/" + ZoneExportDirectory, ".zone")): - scriptSrc = "maxscript/zone_export.ms" - scriptDst = MaxUserDirectory + "/scripts/zone_export.ms" - outputLogfile = ScriptDirectory + "/processes/zone/log.log" - outputDirectory = ExportBuildDirectory + "/" + ZoneExportDirectory - maxSourceDir = DatabaseDirectory + "/" + dir - tagList = findFiles(log, outputDirectory, "", ".zone") - tagLen = len(tagList) - if os.path.isfile(scriptDst): - os.remove(scriptDst) - tagDiff = 1 - sSrc = open(scriptSrc, "r") - sDst = open(scriptDst, "w") - for line in sSrc: - newline = line.replace("%OutputLogfile%", outputLogfile) - newline = newline.replace("%MaxSourceDirectory%", maxSourceDir) - newline = newline.replace("%OutputDirectory%", outputDirectory) - sDst.write(newline) - sSrc.close() - sDst.close() - while tagDiff > 0: - printLog(log, "MAXSCRIPT " + scriptDst) - subprocess.call([ Max, "-U", "MAXScript", "zone_export.ms", "-q", "-mi", "-mip" ]) - tagList = findFiles(log, outputDirectory, "", ".zone") - newTagLen = len(tagList) - tagDiff = newTagLen - tagLen - tagLen = newTagLen - printLog(log, "Exported " + str(tagDiff) + " .zone files!") - os.remove(scriptDst) - - - -printLog(log, ">>> Try to copy ligo zone if any <<<") -printLog(log, "********************************") -printLog(log, "******** TODO ********") -printLog(log, "********************************") -printLog(log, "") - - - -printLog(log, "") -log.close() - - -# end of file +#!/usr/bin/python +# +# ################################################################# +# ## WARNING : this is a generated file, don't change it ! +# ################################################################# +# +# \file 1_export.py +# \brief Export zone +# \date 2015-01-06-16-31-GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Export zone +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Export zone") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +# Find tools +# ... + +# Export zone 3dsmax +if MaxAvailable: + # Find tools + Max = findMax(log, MaxDirectory, MaxExecutable) + printLog(log, "") + + printLog(log, ">>> Export zone 3dsmax <<<") + mkPath(log, ExportBuildDirectory + "/" + ZoneExportDirectory) + for dir in ZoneSourceDirectory: + mkPath(log, DatabaseDirectory + "/" + dir) + if (needUpdateDirByTagLog(log, DatabaseDirectory + "/" + dir, ".max", ExportBuildDirectory + "/" + ZoneExportDirectory, ".zone")): + scriptSrc = "maxscript/zone_export.ms" + scriptDst = MaxUserDirectory + "/scripts/zone_export.ms" + outputLogfile = ScriptDirectory + "/processes/zone/log.log" + outputDirectory = ExportBuildDirectory + "/" + ZoneExportDirectory + maxSourceDir = DatabaseDirectory + "/" + dir + tagList = findFiles(log, outputDirectory, "", ".zone") + tagLen = len(tagList) + if os.path.isfile(scriptDst): + os.remove(scriptDst) + tagDiff = 1 + sSrc = open(scriptSrc, "r") + sDst = open(scriptDst, "w") + for line in sSrc: + newline = line.replace("%OutputLogfile%", outputLogfile) + newline = newline.replace("%MaxSourceDirectory%", maxSourceDir) + newline = newline.replace("%OutputDirectory%", outputDirectory) + sDst.write(newline) + sSrc.close() + sDst.close() + while tagDiff > 0: + printLog(log, "MAXSCRIPT " + scriptDst) + subprocess.call([ Max, "-U", "MAXScript", "zone_export.ms", "-q", "-mi", "-mip" ]) + tagList = findFiles(log, outputDirectory, "", ".zone") + newTagLen = len(tagList) + tagDiff = newTagLen - tagLen + tagLen = newTagLen + printLog(log, "Exported " + str(tagDiff) + " .zone files!") + os.remove(scriptDst) + + + +printLog(log, ">>> Try to copy ligo zone if any <<<") +printLog(log, "********************************") +printLog(log, "******** TODO ********") +printLog(log, "********************************") +printLog(log, "") + + + +printLog(log, "") +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/zone/2_build.py b/code/nel/tools/build_gamedata/processes/zone/2_build.py old mode 100755 new mode 100644 index f9a31e3c4..4d19f5abc --- a/code/nel/tools/build_gamedata/processes/zone/2_build.py +++ b/code/nel/tools/build_gamedata/processes/zone/2_build.py @@ -1,156 +1,175 @@ -#!/usr/bin/python -# -# \file 2_build.py -# \brief Build zone -# \date 2009-03-10-22-23-GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Build zone -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Build zone") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -# Find tools -ZoneDependencies = findTool(log, ToolDirectories, ZoneDependenciesTool, ToolSuffix) -ZoneWelder = findTool(log, ToolDirectories, ZoneWelderTool, ToolSuffix) -ZoneElevation = findTool(log, ToolDirectories, ZoneElevationTool, ToolSuffix) -ExecTimeout = findTool(log, ToolDirectories, ExecTimeoutTool, ToolSuffix) -printLog(log, "") - -# We are in BEST mode -if BuildQuality == 1: - printLog(log, ">>> Build zone dependencies <<<") - if ZoneDependencies == "": - toolLogFail(log, ZoneDependenciesTool, ToolSuffix) - elif ExecTimeout == "": - toolLogFail(log, ExecTimeoutTool, ToolSuffix) - else: - mkPath(log, ExportBuildDirectory + "/" + ZoneExportDirectory) - mkPath(log, ExportBuildDirectory + "/" + ZoneDependBuildDirectory) - needUpdateZoneDepend = needUpdateDirByLowercaseTagLog(log, ExportBuildDirectory + "/" + ZoneExportDirectory, ".zone", ExportBuildDirectory + "/" + ZoneDependBuildDirectory, ".depend") - if needUpdateZoneDepend: - printLog(log, "DETECT UPDATE Zone->Depend") - else: - printLog(log, "DETECT SKIP Zone->Depend") - needUpdateContinentDepend = needUpdateFileDirNoSubdir(log, LeveldesignWorldDirectory + "/" + ContinentFile, ExportBuildDirectory + "/" + ZoneDependBuildDirectory) - if needUpdateContinentDepend: - printLog(log, "DETECT UPDATE Continent->Depend") - else: - printLog(log, "DETECT SKIP Continent->Depend") - needUpdateSearchPaths = needUpdateMultiDirNoSubdir(log, ExportBuildDirectory, PropertiesExportBuildSearchPaths, ExportBuildDirectory + "/" + ZoneDependBuildDirectory) - if needUpdateSearchPaths: - printLog(log, "DETECT UPDATE SearchPaths->Depend") - else: - printLog(log, "DETECT SKIP SearchPaths->Depend") - if needUpdateZoneDepend or needUpdateContinentDepend or needUpdateSearchPaths: - printLog(log, "DETECT DECIDE UPDATE") - mkPath(log, ActiveProjectDirectory + "/generated") - configFile = ActiveProjectDirectory + "/generated/zone_dependencies.cfg" - templateCf = open(ActiveProjectDirectory + "/generated/properties.cfg", "r") - cf = open(configFile, "w") - for line in templateCf: - cf.write(line) - cf.write("\n"); - cf.write("level_design_directory = \"" + LeveldesignDirectory + "\";\n"); - cf.write("level_design_world_directory = \"" + LeveldesignWorldDirectory + "\";\n"); - cf.write("level_design_dfn_directory = \"" + LeveldesignDfnDirectory + "\";\n"); - cf.write("continent_name = \"" + ContinentName + "\";\n"); - cf.write("\n"); - cf.close() - - for zoneRegion in ZoneRegions: - # zone_dependencies [properties.cfg] [firstZone.zone] [lastzone.zone] [output_dependencies.cfg] - subprocess.call([ ExecTimeout, str(ZoneBuildDependTimeout), ZoneDependencies, configFile, ExportBuildDirectory + "/" + ZoneExportDirectory + "/" + zoneRegion[0] + ".zone", ExportBuildDirectory + "/" + ZoneExportDirectory + "/" + zoneRegion[1] + ".zone", ExportBuildDirectory + "/" + ZoneDependBuildDirectory + "/doomy.depend" ]) - else: - printLog(log, "DETECT DECIDE SKIP") - printLog(log, "SKIP *") - printLog(log, "") - -# For each zone directory -#printLog(log, ">>> Build zone weld <<<") -#if ZoneWelder == "": -# toolLogFail(log, ZoneWelderTool, ToolSuffix) -#elif ExecTimeout == "": -# toolLogFail(log, ExecTimeoutTool, ToolSuffix) -#else: -# mkPath(log, ExportBuildDirectory + "/" + ZoneExportDirectory) -# mkPath(log, ExportBuildDirectory + "/" + ZoneWeldBuildDirectory) -# files = findFiles(log, ExportBuildDirectory + "/" + ZoneExportDirectory, "", ".zone") -# for file in files: -# sourceFile = ExportBuildDirectory + "/" + ZoneExportDirectory + "/" + file -# destFile = ExportBuildDirectory + "/" + ZoneWeldBuildDirectory + "/" + os.path.basename(file)[0:-len(".zone")] + ".zonew" -# if needUpdateLogRemoveDest(log, sourceFile, destFile): -# subprocess.call([ ExecTimeout, str(ZoneBuildWeldTimeout), ZoneWelder, sourceFile, destFile ]) -#printLog(log, "") - -# For each zone directory -printLog(log, ">>> Weld zone without heightmap <<<") -if ZoneWelder == "": - toolLogFail(log, ZoneWelderTool, ToolSuffix) -elif ExecTimeout == "": - toolLogFail(log, ExecTimeoutTool, ToolSuffix) -else: - mkPath(log, ExportBuildDirectory + "/" + ZoneExportDirectory) - mkPath(log, ExportBuildDirectory + "/" + ZoneWeldBuildDirectory) - files = findFiles(log, ExportBuildDirectory + "/" + ZoneExportDirectory, "", ".zonenh") - for file in files: - sourceFile = ExportBuildDirectory + "/" + ZoneExportDirectory + "/" + file - destFile = ExportBuildDirectory + "/" + ZoneWeldBuildDirectory + "/" + os.path.basename(file)[0:-len(".zonenh")] + ".zonenhw" - if needUpdateLogRemoveDest(log, sourceFile, destFile): - subprocess.call([ ExecTimeout, str(ZoneBuildWeldTimeout), ZoneWelder, sourceFile, destFile ]) -printLog(log, "") - -printLog(log, ">>> Apply zone heightmap to welded zone <<<") -if ZoneElevation == "": - toolLogFail(log, ZoneElevationTool, ToolSuffix) -else: - mkPath(log, ExportBuildDirectory + "/" + ZoneWeldBuildDirectory) - mkPath(log, DatabaseDirectory + "/" + LigoBaseSourceDirectory); - land = DatabaseDirectory + "/" + LigoBaseSourceDirectory + "/" + LigoExportLand - heightMap1 = DatabaseDirectory + "/" + LigoBaseSourceDirectory + "/" + LigoExportHeightmap1 - heightMap2 = DatabaseDirectory + "/" + LigoBaseSourceDirectory + "/" + LigoExportHeightmap2 - files = findFiles(log, ExportBuildDirectory + "/" + ZoneWeldBuildDirectory, "", ".zonenhw") - for file in files: - sourceFile = ExportBuildDirectory + "/" + ZoneWeldBuildDirectory + "/" + file - destFile = ExportBuildDirectory + "/" + ZoneWeldBuildDirectory + "/" + os.path.basename(file)[0:-len(".zonenhw")] + ".zonew" - if needUpdateLogRemoveDest(log, sourceFile, destFile): - subprocess.call([ ZoneElevation, sourceFile, destFile, "--land", land, "--heightmap", heightMap1, "--zfactor", LigoExportZFactor1, "--heightmap2", heightMap2, "--zfactor2", LigoExportZFactor2 ]) -printLog(log, "") - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 2_build.py +# \brief Build zone +# \date 2009-03-10-22-23-GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Build zone +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Build zone") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +# Find tools +ZoneDependencies = findTool(log, ToolDirectories, ZoneDependenciesTool, ToolSuffix) +ZoneWelder = findTool(log, ToolDirectories, ZoneWelderTool, ToolSuffix) +ZoneElevation = findTool(log, ToolDirectories, ZoneElevationTool, ToolSuffix) +ExecTimeout = findTool(log, ToolDirectories, ExecTimeoutTool, ToolSuffix) +printLog(log, "") + +# We are in BEST mode +if BuildQuality == 1: + printLog(log, ">>> Build zone dependencies <<<") + if ZoneDependencies == "": + toolLogFail(log, ZoneDependenciesTool, ToolSuffix) + elif ExecTimeout == "": + toolLogFail(log, ExecTimeoutTool, ToolSuffix) + else: + mkPath(log, ExportBuildDirectory + "/" + ZoneExportDirectory) + mkPath(log, ExportBuildDirectory + "/" + ZoneDependBuildDirectory) + needUpdateZoneDepend = needUpdateDirByLowercaseTagLog(log, ExportBuildDirectory + "/" + ZoneExportDirectory, ".zone", ExportBuildDirectory + "/" + ZoneDependBuildDirectory, ".depend") + if needUpdateZoneDepend: + printLog(log, "DETECT UPDATE Zone->Depend") + else: + printLog(log, "DETECT SKIP Zone->Depend") + needUpdateContinentDepend = needUpdateFileDirNoSubdir(log, LeveldesignWorldDirectory + "/" + ContinentFile, ExportBuildDirectory + "/" + ZoneDependBuildDirectory) + if needUpdateContinentDepend: + printLog(log, "DETECT UPDATE Continent->Depend") + else: + printLog(log, "DETECT SKIP Continent->Depend") + needUpdateSearchPaths = needUpdateMultiDirNoSubdir(log, ExportBuildDirectory, PropertiesExportBuildSearchPaths, ExportBuildDirectory + "/" + ZoneDependBuildDirectory) + if needUpdateSearchPaths: + printLog(log, "DETECT UPDATE SearchPaths->Depend") + else: + printLog(log, "DETECT SKIP SearchPaths->Depend") + if needUpdateZoneDepend or needUpdateContinentDepend or needUpdateSearchPaths: + printLog(log, "DETECT DECIDE UPDATE") + mkPath(log, ActiveProjectDirectory + "/generated") + configFile = ActiveProjectDirectory + "/generated/zone_dependencies.cfg" + templateCf = open(ActiveProjectDirectory + "/generated/properties.cfg", "r") + cf = open(configFile, "w") + for line in templateCf: + cf.write(line) + cf.write("\n"); + cf.write("level_design_directory = \"" + LeveldesignDirectory + "\";\n"); + cf.write("level_design_world_directory = \"" + LeveldesignWorldDirectory + "\";\n"); + cf.write("level_design_dfn_directory = \"" + LeveldesignDfnDirectory + "\";\n"); + cf.write("continent_name = \"" + ContinentName + "\";\n"); + cf.write("\n"); + cf.close() + + for zoneRegion in ZoneRegions: + # zone_dependencies [properties.cfg] [firstZone.zone] [lastzone.zone] [output_dependencies.cfg] + subprocess.call([ ExecTimeout, str(ZoneBuildDependTimeout), ZoneDependencies, configFile, ExportBuildDirectory + "/" + ZoneExportDirectory + "/" + zoneRegion[0] + ".zone", ExportBuildDirectory + "/" + ZoneExportDirectory + "/" + zoneRegion[1] + ".zone", ExportBuildDirectory + "/" + ZoneDependBuildDirectory + "/doomy.depend" ]) + else: + printLog(log, "DETECT DECIDE SKIP") + printLog(log, "SKIP *") + printLog(log, "") + +# For each zone directory +#printLog(log, ">>> Build zone weld <<<") +#if ZoneWelder == "": +# toolLogFail(log, ZoneWelderTool, ToolSuffix) +#elif ExecTimeout == "": +# toolLogFail(log, ExecTimeoutTool, ToolSuffix) +#else: +# mkPath(log, ExportBuildDirectory + "/" + ZoneExportDirectory) +# mkPath(log, ExportBuildDirectory + "/" + ZoneWeldBuildDirectory) +# files = findFiles(log, ExportBuildDirectory + "/" + ZoneExportDirectory, "", ".zone") +# for file in files: +# sourceFile = ExportBuildDirectory + "/" + ZoneExportDirectory + "/" + file +# destFile = ExportBuildDirectory + "/" + ZoneWeldBuildDirectory + "/" + os.path.basename(file)[0:-len(".zone")] + ".zonew" +# if needUpdateLogRemoveDest(log, sourceFile, destFile): +# subprocess.call([ ExecTimeout, str(ZoneBuildWeldTimeout), ZoneWelder, sourceFile, destFile ]) +#printLog(log, "") + +# For each zone directory +printLog(log, ">>> Weld zone without heightmap <<<") +if ZoneWelder == "": + toolLogFail(log, ZoneWelderTool, ToolSuffix) +elif ExecTimeout == "": + toolLogFail(log, ExecTimeoutTool, ToolSuffix) +else: + mkPath(log, ExportBuildDirectory + "/" + ZoneExportDirectory) + mkPath(log, ExportBuildDirectory + "/" + ZoneWeldBuildDirectory) + files = findFiles(log, ExportBuildDirectory + "/" + ZoneExportDirectory, "", ".zonenh") + for file in files: + sourceFile = ExportBuildDirectory + "/" + ZoneExportDirectory + "/" + file + destFile = ExportBuildDirectory + "/" + ZoneWeldBuildDirectory + "/" + os.path.basename(file)[0:-len(".zonenh")] + ".zonenhw" + if needUpdateLogRemoveDest(log, sourceFile, destFile): + subprocess.call([ ExecTimeout, str(ZoneBuildWeldTimeout), ZoneWelder, sourceFile, destFile ]) +printLog(log, "") + +printLog(log, ">>> Apply zone heightmap to welded zone <<<") +if ZoneElevation == "": + toolLogFail(log, ZoneElevationTool, ToolSuffix) +else: + mkPath(log, ExportBuildDirectory + "/" + ZoneWeldBuildDirectory) + mkPath(log, DatabaseDirectory + "/" + LigoBaseSourceDirectory); + land = DatabaseDirectory + "/" + LigoBaseSourceDirectory + "/" + LigoExportLand + heightMap1 = DatabaseDirectory + "/" + LigoBaseSourceDirectory + "/" + LigoExportHeightmap1 + heightMap2 = DatabaseDirectory + "/" + LigoBaseSourceDirectory + "/" + LigoExportHeightmap2 + files = findFiles(log, ExportBuildDirectory + "/" + ZoneWeldBuildDirectory, "", ".zonenhw") + for file in files: + sourceFile = ExportBuildDirectory + "/" + ZoneWeldBuildDirectory + "/" + file + destFile = ExportBuildDirectory + "/" + ZoneWeldBuildDirectory + "/" + os.path.basename(file)[0:-len(".zonenhw")] + ".zone" + if needUpdateLogRemoveDest(log, sourceFile, destFile): + command = [ ZoneElevation, sourceFile, destFile, "--land", land, "--heightmap", heightMap1, "--zfactor", LigoExportZFactor1, "--heightmap2", heightMap2, "--zfactor2", LigoExportZFactor2 ] + if LigoExportExtendCoords != 0: + command.append("--extendcoords") + callParallelProcess(command) + flushParallelProcesses() +printLog(log, "") + +printLog(log, ">>> Re-weld zone with heightmap <<<") +if ZoneWelder == "": + toolLogFail(log, ZoneWelderTool, ToolSuffix) +elif ExecTimeout == "": + toolLogFail(log, ExecTimeoutTool, ToolSuffix) +else: + mkPath(log, ExportBuildDirectory + "/" + ZoneWeldBuildDirectory) + files = findFiles(log, ExportBuildDirectory + "/" + ZoneWeldBuildDirectory, "", ".zone") + for file in files: + sourceFile = ExportBuildDirectory + "/" + ZoneWeldBuildDirectory + "/" + file + destFile = ExportBuildDirectory + "/" + ZoneWeldBuildDirectory + "/" + os.path.basename(file)[0:-len(".zone")] + ".zonew" + if needUpdateLogRemoveDest(log, sourceFile, destFile): + subprocess.call([ ExecTimeout, str(ZoneBuildWeldTimeout), ZoneWelder, sourceFile, destFile ]) +printLog(log, "") + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/zone/3_install.py b/code/nel/tools/build_gamedata/processes/zone/3_install.py old mode 100755 new mode 100644 index 0326abf75..c8567a2bd --- a/code/nel/tools/build_gamedata/processes/zone/3_install.py +++ b/code/nel/tools/build_gamedata/processes/zone/3_install.py @@ -1,50 +1,50 @@ -#!/usr/bin/python -# -# \file 3_install.py -# \brief Install zone -# \date 2009-03-10-22-23-GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Install zone -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Install zone") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -printLog(log, "") -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 3_install.py +# \brief Install zone +# \date 2009-03-10-22-23-GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Install zone +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite_local import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Install zone") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +printLog(log, "") +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/zone/maxscript/zone_export.ms b/code/nel/tools/build_gamedata/processes/zone/maxscript/zone_export.ms old mode 100755 new mode 100644 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 old mode 100755 new mode 100644 index 44c67935d..d5a751131 --- a/code/nel/tools/build_gamedata/processes/zone_light/0_setup.py +++ b/code/nel/tools/build_gamedata/processes/zone_light/0_setup.py @@ -1,73 +1,73 @@ -#!/usr/bin/python -# -# \file 0_setup.py -# \brief Setup zone_light -# \date 2009-03-11-13-45-GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Setup zone_light -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Setup zone_light") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -# Setup source directories -printLog(log, ">>> Setup source directories <<<") -for dir in WaterMapSourceDirectories: - mkPath(log, DatabaseDirectory + "/" + dir) - -# Setup export directories -printLog(log, ">>> Setup export directories <<<") -mkPath(log, ExportBuildDirectory + "/" + ZoneLightWaterShapesLightedExportDirectory) - -# Setup build directories -printLog(log, ">>> Setup build directories <<<") -mkPath(log, ExportBuildDirectory + "/" + ZoneWeldBuildDirectory) -mkPath(log, ExportBuildDirectory + "/" + ZoneDependBuildDirectory) -mkPath(log, ExportBuildDirectory + "/" + ZoneLightBuildDirectory) -mkPath(log, ExportBuildDirectory + "/" + ZoneLightDependBuildDirectory) -mkPath(log, ExportBuildDirectory + "/" + ZoneLightIgLandBuildDirectory) -mkPath(log, ExportBuildDirectory + "/" + IgLandBuildDirectory) - -# Setup client directories -printLog(log, ">>> Setup client directories <<<") -mkPath(log, InstallDirectory + "/" + ZoneInstallDirectory) -mkPath(log, InstallDirectory + "/" + IgInstallDirectory) -mkPath(log, InstallDirectory + "/" + WaterMapsInstallDirectory) - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 0_setup.py +# \brief Setup zone_light +# \date 2009-03-11-13-45-GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Setup zone_light +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Setup zone_light") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +# Setup source directories +printLog(log, ">>> Setup source directories <<<") +for dir in WaterMapSourceDirectories: + mkPath(log, DatabaseDirectory + "/" + dir) + +# Setup export directories +printLog(log, ">>> Setup export directories <<<") +mkPath(log, ExportBuildDirectory + "/" + ZoneLightWaterShapesLightedExportDirectory) + +# Setup build directories +printLog(log, ">>> Setup build directories <<<") +mkPath(log, ExportBuildDirectory + "/" + ZoneWeldBuildDirectory) +mkPath(log, ExportBuildDirectory + "/" + ZoneDependBuildDirectory) +mkPath(log, ExportBuildDirectory + "/" + ZoneLightBuildDirectory) +mkPath(log, ExportBuildDirectory + "/" + ZoneLightDependBuildDirectory) +mkPath(log, ExportBuildDirectory + "/" + ZoneLightIgLandBuildDirectory) +mkPath(log, ExportBuildDirectory + "/" + IgLandBuildDirectory) + +# Setup client directories +printLog(log, ">>> Setup client directories <<<") +mkPath(log, InstallDirectory + "/" + ZoneInstallDirectory) +mkPath(log, InstallDirectory + "/" + IgInstallDirectory) +mkPath(log, InstallDirectory + "/" + WaterMapsInstallDirectory) + +log.close() + + +# end of file 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 old mode 100755 new mode 100644 index 016fe826b..59167b01e --- a/code/nel/tools/build_gamedata/processes/zone_light/1_export.py +++ b/code/nel/tools/build_gamedata/processes/zone_light/1_export.py @@ -1,64 +1,64 @@ -#!/usr/bin/python -# -# \file 1_export.py -# \brief Export zone_light -# \date 2009-03-11-13-45-GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Export zone_light -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Export zone_light") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -# Find tools -#TgaToDds = findTool(log, ToolDirectories, TgaToDdsTool, ToolSuffix) -printLog(log, "") - -# Export zone_light water maps -printLog(log, ">>> Export zone_light water maps <<<") -srcDir = ExportBuildDirectory + "/" + ZoneLightWaterShapesLightedExportDirectory -mkPath(log, srcDir) -for dir in WaterMapSourceDirectories: - destDir = DatabaseDirectory + "/" + dir - mkPath(log, destDir) - copyFilesExtNoTreeIfNeeded(log, srcDir, destDir, ".tga") - copyFilesExtNoTreeIfNeeded(log, srcDir, destDir, ".png") -printLog(log, "") - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 1_export.py +# \brief Export zone_light +# \date 2009-03-11-13-45-GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Export zone_light +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Export zone_light") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +# Find tools +#TgaToDds = findTool(log, ToolDirectories, TgaToDdsTool, ToolSuffix) +printLog(log, "") + +# Export zone_light water maps +printLog(log, ">>> Export zone_light water maps <<<") +srcDir = ExportBuildDirectory + "/" + ZoneLightWaterShapesLightedExportDirectory +mkPath(log, srcDir) +for dir in WaterMapSourceDirectories: + destDir = DatabaseDirectory + "/" + dir + mkPath(log, destDir) + copyFilesExtNoTreeIfNeeded(log, srcDir, destDir, ".tga") + copyFilesExtNoTreeIfNeeded(log, srcDir, destDir, ".png") +printLog(log, "") + +log.close() + + +# end of file 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 old mode 100755 new mode 100644 index 84d2b26a4..6d08f81d4 --- a/code/nel/tools/build_gamedata/processes/zone_light/2_build.py +++ b/code/nel/tools/build_gamedata/processes/zone_light/2_build.py @@ -1,103 +1,105 @@ -#!/usr/bin/python -# -# \file 2_build.py -# \brief Build zone_light -# \date 2009-03-11-13-45-GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Build zone_light -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Build zone_light") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -# Find tools -ExecTimeout = findTool(log, ToolDirectories, ExecTimeoutTool, ToolSuffix) -ZoneLighter = findTool(log, ToolDirectories, ZoneLighterTool, ToolSuffix) -ZoneIgLighter = findTool(log, ToolDirectories, ZoneIgLighterTool, ToolSuffix) -printLog(log, "") - -# For each zone_light directory -printLog(log, ">>> Build zone_light <<<") -if ZoneLighter == "": - toolLogFail(log, ZoneLighterTool, ToolSuffix) -elif ExecTimeout == "": - toolLogfail(log, ExecTimeoutTool, ToolSuffix) -else: - srcDir = ExportBuildDirectory + "/" + ZoneWeldBuildDirectory - mkPath(log, srcDir) - destDir = ExportBuildDirectory + "/" + ZoneLightBuildDirectory - mkPath(log, destDir) - dependDir = ExportBuildDirectory + "/" + ZoneDependBuildDirectory - mkPath(log, dependDir) - files = findFiles(log, srcDir, "", ".zonew") - for file in files: - srcFile = srcDir + "/" + file - destFile = destDir + "/" + file[0:-len(".zonew")] + ".zonel" - if (needUpdateLogRemoveDest(log, srcFile, destFile)): - dependFile = dependDir + "/" + file[0:-len(".zonew")] + ".depend" - subprocess.call([ ExecTimeout, str(ZoneLightBuildTimeout), ZoneLighter, srcFile, destFile, ActiveProjectDirectory + "/generated/properties.cfg", dependFile ]) -printLog(log, "") - -# For each zone_light ig -printLog(log, ">>> Build zone_light ig <<<") -if ZoneIgLighter == "": - toolLogFail(log, ZoneIgLighterTool, ToolSuffix) -elif ExecTimeout == "": - toolLogfail(log, ExecTimeoutTool, ToolSuffix) -else: - srcDir = ExportBuildDirectory + "/" + ZoneLightBuildDirectory - mkPath(log, srcDir) - igsrcDir = ExportBuildDirectory + "/" + IgLandBuildDirectory - mkPath(log, igsrcDir) - destDir = ExportBuildDirectory + "/" + ZoneLightIgLandBuildDirectory - mkPath(log, destDir) - dependDir = ExportBuildDirectory + "/" + ZoneDependBuildDirectory - mkPath(log, dependDir) - files = findFiles(log, srcDir, "", ".zonel") - for file in files: - igsrcFile = igsrcDir + "/" + os.path.basename(file)[0:-len(".zonel")] + ".ig" - destFile = destDir + "/" + os.path.basename(file)[0:-len(".zonel")] + ".ig" - if (os.path.isfile(igsrcFile)): - if (needUpdateLogRemoveDest(log, igsrcFile, destFile)): - srcFile = srcDir + "/" + file - dependFile = dependDir + "/" + file[0:-len(".zonel")] + ".depend" - subprocess.call([ ExecTimeout, str(ZoneIgLightBuildTimeout), ZoneIgLighter, srcFile, destFile, ActiveProjectDirectory + "/generated/properties.cfg", dependFile ]) -printLog(log, "") - -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 2_build.py +# \brief Build zone_light +# \date 2009-03-11-13-45-GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Build zone_light +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Build zone_light") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +# Find tools +ExecTimeout = findTool(log, ToolDirectories, ExecTimeoutTool, ToolSuffix) +ZoneLighter = findTool(log, ToolDirectories, ZoneLighterTool, ToolSuffix) +ZoneIgLighter = findTool(log, ToolDirectories, ZoneIgLighterTool, ToolSuffix) +printLog(log, "") + +# For each zone_light directory +printLog(log, ">>> Build zone_light <<<") +if ZoneLighter == "": + toolLogFail(log, ZoneLighterTool, ToolSuffix) +elif ExecTimeout == "": + toolLogfail(log, ExecTimeoutTool, ToolSuffix) +else: + srcDir = ExportBuildDirectory + "/" + ZoneWeldBuildDirectory + mkPath(log, srcDir) + destDir = ExportBuildDirectory + "/" + ZoneLightBuildDirectory + mkPath(log, destDir) + dependDir = ExportBuildDirectory + "/" + ZoneDependBuildDirectory + mkPath(log, dependDir) + files = findFiles(log, srcDir, "", ".zonew") + for file in files: + srcFile = srcDir + "/" + file + destFile = destDir + "/" + file[0:-len(".zonew")] + ".zonel" + if (needUpdateLogRemoveDest(log, srcFile, destFile)): + dependFile = dependDir + "/" + file[0:-len(".zonew")] + ".depend" + callParallelProcess([ ExecTimeout, str(ZoneLightBuildTimeout), ZoneLighter, srcFile, destFile, ActiveProjectDirectory + "/generated/properties.cfg", dependFile ]) + flushParallelProcesses() +printLog(log, "") + +# For each zone_light ig +printLog(log, ">>> Build zone_light ig <<<") +if ZoneIgLighter == "": + toolLogFail(log, ZoneIgLighterTool, ToolSuffix) +elif ExecTimeout == "": + toolLogfail(log, ExecTimeoutTool, ToolSuffix) +else: + srcDir = ExportBuildDirectory + "/" + ZoneLightBuildDirectory + mkPath(log, srcDir) + igsrcDir = ExportBuildDirectory + "/" + IgLandBuildDirectory + mkPath(log, igsrcDir) + destDir = ExportBuildDirectory + "/" + ZoneLightIgLandBuildDirectory + mkPath(log, destDir) + dependDir = ExportBuildDirectory + "/" + ZoneDependBuildDirectory + mkPath(log, dependDir) + files = findFiles(log, srcDir, "", ".zonel") + for file in files: + igsrcFile = igsrcDir + "/" + os.path.basename(file)[0:-len(".zonel")] + ".ig" + destFile = destDir + "/" + os.path.basename(file)[0:-len(".zonel")] + ".ig" + if (os.path.isfile(igsrcFile)): + if (needUpdateLogRemoveDest(log, igsrcFile, destFile)): + srcFile = srcDir + "/" + file + dependFile = dependDir + "/" + file[0:-len(".zonel")] + ".depend" + callParallelProcess([ ExecTimeout, str(ZoneIgLightBuildTimeout), ZoneIgLighter, srcFile, destFile, ActiveProjectDirectory + "/generated/properties.cfg", dependFile ]) + flushParallelProcesses() +printLog(log, "") + +log.close() + + +# end of file 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 old mode 100755 new mode 100644 index 4e4d231a4..16ae2dd72 --- a/code/nel/tools/build_gamedata/processes/zone_light/3_install.py +++ b/code/nel/tools/build_gamedata/processes/zone_light/3_install.py @@ -1,71 +1,71 @@ -#!/usr/bin/python -# -# \file 3_install.py -# \brief Install zone_light -# \date 2009-03-11-13-45-GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Install zone_light -# -# NeL - MMORPG Framework -# Copyright (C) 2009-2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -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") -from scripts import * -from buildsite import * -from process import * -from tools import * -from directories import * - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Install zone_light") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - -printLog(log, ">>> Install zone_light zones <<<") -srcDir = ExportBuildDirectory + "/" + ZoneLightBuildDirectory -mkPath(log, srcDir) -destDir = InstallDirectory + "/" + ZoneInstallDirectory -mkPath(log, destDir) -copyFilesNoTreeIfNeeded(log, srcDir, destDir) - -printLog(log, ">>> Install zone_light water maps <<<") -srcDir = ExportBuildDirectory + "/" + ZoneLightWaterShapesLightedExportDirectory -mkPath(log, srcDir) -destDir = InstallDirectory + "/" + WaterMapsInstallDirectory -mkPath(log, destDir) -copyFilesNoTreeIfNeeded(log, srcDir, destDir) - -printLog(log, ">>> Install zone_light igs <<<") -srcDir = ExportBuildDirectory + "/" + ZoneLightIgLandBuildDirectory -mkPath(log, srcDir) -destDir = InstallDirectory + "/" + IgInstallDirectory -mkPath(log, destDir) -copyFilesNoTreeIfNeeded(log, srcDir, destDir) - -printLog(log, "") -log.close() - - -# end of file +#!/usr/bin/python +# +# \file 3_install.py +# \brief Install zone_light +# \date 2009-03-11-13-45-GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Install zone_light +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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") +from scripts import * +from buildsite_local import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Install zone_light") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +printLog(log, ">>> Install zone_light zones <<<") +srcDir = ExportBuildDirectory + "/" + ZoneLightBuildDirectory +mkPath(log, srcDir) +destDir = InstallDirectory + "/" + ZoneInstallDirectory +mkPath(log, destDir) +copyFilesNoTreeIfNeeded(log, srcDir, destDir) + +printLog(log, ">>> Install zone_light water maps <<<") +srcDir = ExportBuildDirectory + "/" + ZoneLightWaterShapesLightedExportDirectory +mkPath(log, srcDir) +destDir = InstallDirectory + "/" + WaterMapsInstallDirectory +mkPath(log, destDir) +copyFilesNoTreeIfNeeded(log, srcDir, destDir) + +printLog(log, ">>> Install zone_light igs <<<") +srcDir = ExportBuildDirectory + "/" + ZoneLightIgLandBuildDirectory +mkPath(log, srcDir) +destDir = InstallDirectory + "/" + IgInstallDirectory +mkPath(log, destDir) +copyFilesNoTreeIfNeeded(log, srcDir, destDir) + +printLog(log, "") +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/translation/a1_make_phrase_diff.py b/code/nel/tools/build_gamedata/translation/a1_make_phrase_diff.py old mode 100755 new mode 100644 index ba9293aae..9cfa6e908 --- a/code/nel/tools/build_gamedata/translation/a1_make_phrase_diff.py +++ b/code/nel/tools/build_gamedata/translation/a1_make_phrase_diff.py @@ -1,54 +1,54 @@ -#!/usr/bin/python -# -# \author Jan Boon (Kaetemi) -# -# NeL - MMORPG Framework -# Copyright (C) 2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -import time, sys, os, shutil, subprocess, distutils.dir_util -sys.path.append("../configuration") -from scripts import * -from buildsite import * -from tools import * -os.chdir(TranslationDirectory) -if os.path.isfile("log.log"): - os.remove("log.log") -log = open("log.log", "w") - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Make phrase diff") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - - -TranslationTools = findTool(log, ToolDirectories, TranslationToolsTool, ToolSuffix) -try: - subprocess.call([ TranslationTools, "make_phrase_diff" ]) -except Exception, e: - printLog(log, "<" + processName + "> " + str(e)) -printLog(log, "") - - -log.close() -if os.path.isfile("a1_make_phrase_diff.log"): - os.remove("a1_make_phrase_diff.log") -shutil.copy("log.log", "a1_make_phrase_diff_" + time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + ".log") -shutil.move("log.log", "a1_make_phrase_diff.log") - -raw_input("PRESS ANY KEY TO EXIT") +#!/usr/bin/python +# +# \author Jan Boon (Kaetemi) +# +# NeL - MMORPG Framework +# Copyright (C) 2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +import time, sys, os, shutil, subprocess, distutils.dir_util +sys.path.append("../configuration") +from scripts import * +from buildsite import * +from tools import * +os.chdir(TranslationDirectory) +if os.path.isfile("log.log"): + os.remove("log.log") +log = open("log.log", "w") + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Make phrase diff") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + + +TranslationTools = findTool(log, ToolDirectories, TranslationToolsTool, ToolSuffix) +try: + subprocess.call([ TranslationTools, "make_phrase_diff" ]) +except Exception, e: + printLog(log, "<" + processName + "> " + str(e)) +printLog(log, "") + + +log.close() +if os.path.isfile("a1_make_phrase_diff.log"): + os.remove("a1_make_phrase_diff.log") +shutil.copy("log.log", "a1_make_phrase_diff_" + time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + ".log") +shutil.move("log.log", "a1_make_phrase_diff.log") + +raw_input("PRESS ANY KEY TO EXIT") diff --git a/code/nel/tools/build_gamedata/translation/a2_merge_phrase_diff.py b/code/nel/tools/build_gamedata/translation/a2_merge_phrase_diff.py old mode 100755 new mode 100644 index 89be176c3..7eef06293 --- a/code/nel/tools/build_gamedata/translation/a2_merge_phrase_diff.py +++ b/code/nel/tools/build_gamedata/translation/a2_merge_phrase_diff.py @@ -1,54 +1,54 @@ -#!/usr/bin/python -# -# \author Jan Boon (Kaetemi) -# -# NeL - MMORPG Framework -# Copyright (C) 2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -import time, sys, os, shutil, subprocess, distutils.dir_util -sys.path.append("../configuration") -from scripts import * -from buildsite import * -from tools import * -os.chdir(TranslationDirectory) -if os.path.isfile("log.log"): - os.remove("log.log") -log = open("log.log", "w") - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Merge phrase diff") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - - -TranslationTools = findTool(log, ToolDirectories, TranslationToolsTool, ToolSuffix) -try: - subprocess.call([ TranslationTools, "merge_phrase_diff" ]) -except Exception, e: - printLog(log, "<" + processName + "> " + str(e)) -printLog(log, "") - - -log.close() -if os.path.isfile("a2_merge_phrase_diff.log"): - os.remove("a2_merge_phrase_diff.log") -shutil.copy("log.log", "a2_merge_phrase_diff_" + time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + ".log") -shutil.move("log.log", "a2_merge_phrase_diff.log") - -raw_input("PRESS ANY KEY TO EXIT") +#!/usr/bin/python +# +# \author Jan Boon (Kaetemi) +# +# NeL - MMORPG Framework +# Copyright (C) 2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +import time, sys, os, shutil, subprocess, distutils.dir_util +sys.path.append("../configuration") +from scripts import * +from buildsite import * +from tools import * +os.chdir(TranslationDirectory) +if os.path.isfile("log.log"): + os.remove("log.log") +log = open("log.log", "w") + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Merge phrase diff") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + + +TranslationTools = findTool(log, ToolDirectories, TranslationToolsTool, ToolSuffix) +try: + subprocess.call([ TranslationTools, "merge_phrase_diff" ]) +except Exception, e: + printLog(log, "<" + processName + "> " + str(e)) +printLog(log, "") + + +log.close() +if os.path.isfile("a2_merge_phrase_diff.log"): + os.remove("a2_merge_phrase_diff.log") +shutil.copy("log.log", "a2_merge_phrase_diff_" + time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + ".log") +shutil.move("log.log", "a2_merge_phrase_diff.log") + +raw_input("PRESS ANY KEY TO EXIT") diff --git a/code/nel/tools/build_gamedata/translation/a3_make_clause_diff.py b/code/nel/tools/build_gamedata/translation/a3_make_clause_diff.py old mode 100755 new mode 100644 index 3c92af90c..d907ce474 --- a/code/nel/tools/build_gamedata/translation/a3_make_clause_diff.py +++ b/code/nel/tools/build_gamedata/translation/a3_make_clause_diff.py @@ -1,54 +1,54 @@ -#!/usr/bin/python -# -# \author Jan Boon (Kaetemi) -# -# NeL - MMORPG Framework -# Copyright (C) 2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -import time, sys, os, shutil, subprocess, distutils.dir_util -sys.path.append("../configuration") -from scripts import * -from buildsite import * -from tools import * -os.chdir(TranslationDirectory) -if os.path.isfile("log.log"): - os.remove("log.log") -log = open("log.log", "w") - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Make clause diff") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - - -TranslationTools = findTool(log, ToolDirectories, TranslationToolsTool, ToolSuffix) -try: - subprocess.call([ TranslationTools, "make_clause_diff" ]) -except Exception, e: - printLog(log, "<" + processName + "> " + str(e)) -printLog(log, "") - - -log.close() -if os.path.isfile("a3_make_clause_diff.log"): - os.remove("a3_make_clause_diff.log") -shutil.copy("log.log", "a3_make_clause_diff_" + time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + ".log") -shutil.move("log.log", "a3_make_clause_diff.log") - -raw_input("PRESS ANY KEY TO EXIT") +#!/usr/bin/python +# +# \author Jan Boon (Kaetemi) +# +# NeL - MMORPG Framework +# Copyright (C) 2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +import time, sys, os, shutil, subprocess, distutils.dir_util +sys.path.append("../configuration") +from scripts import * +from buildsite import * +from tools import * +os.chdir(TranslationDirectory) +if os.path.isfile("log.log"): + os.remove("log.log") +log = open("log.log", "w") + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Make clause diff") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + + +TranslationTools = findTool(log, ToolDirectories, TranslationToolsTool, ToolSuffix) +try: + subprocess.call([ TranslationTools, "make_clause_diff" ]) +except Exception, e: + printLog(log, "<" + processName + "> " + str(e)) +printLog(log, "") + + +log.close() +if os.path.isfile("a3_make_clause_diff.log"): + os.remove("a3_make_clause_diff.log") +shutil.copy("log.log", "a3_make_clause_diff_" + time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + ".log") +shutil.move("log.log", "a3_make_clause_diff.log") + +raw_input("PRESS ANY KEY TO EXIT") diff --git a/code/nel/tools/build_gamedata/translation/a4_merge_clause_diff.py b/code/nel/tools/build_gamedata/translation/a4_merge_clause_diff.py old mode 100755 new mode 100644 index 5fc2efabe..67e308c98 --- a/code/nel/tools/build_gamedata/translation/a4_merge_clause_diff.py +++ b/code/nel/tools/build_gamedata/translation/a4_merge_clause_diff.py @@ -1,54 +1,54 @@ -#!/usr/bin/python -# -# \author Jan Boon (Kaetemi) -# -# NeL - MMORPG Framework -# Copyright (C) 2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -import time, sys, os, shutil, subprocess, distutils.dir_util -sys.path.append("../configuration") -from scripts import * -from buildsite import * -from tools import * -os.chdir(TranslationDirectory) -if os.path.isfile("log.log"): - os.remove("log.log") -log = open("log.log", "w") - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- merge clause diff") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - - -TranslationTools = findTool(log, ToolDirectories, TranslationToolsTool, ToolSuffix) -try: - subprocess.call([ TranslationTools, "merge_clause_diff" ]) -except Exception, e: - printLog(log, "<" + processName + "> " + str(e)) -printLog(log, "") - - -log.close() -if os.path.isfile("a4_merge_clause_diff.log"): - os.remove("a4_merge_clause_diff.log") -shutil.copy("log.log", "a4_merge_clause_diff_" + time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + ".log") -shutil.move("log.log", "a4_merge_clause_diff.log") - -raw_input("PRESS ANY KEY TO EXIT") +#!/usr/bin/python +# +# \author Jan Boon (Kaetemi) +# +# NeL - MMORPG Framework +# Copyright (C) 2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +import time, sys, os, shutil, subprocess, distutils.dir_util +sys.path.append("../configuration") +from scripts import * +from buildsite import * +from tools import * +os.chdir(TranslationDirectory) +if os.path.isfile("log.log"): + os.remove("log.log") +log = open("log.log", "w") + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- merge clause diff") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + + +TranslationTools = findTool(log, ToolDirectories, TranslationToolsTool, ToolSuffix) +try: + subprocess.call([ TranslationTools, "merge_clause_diff" ]) +except Exception, e: + printLog(log, "<" + processName + "> " + str(e)) +printLog(log, "") + + +log.close() +if os.path.isfile("a4_merge_clause_diff.log"): + os.remove("a4_merge_clause_diff.log") +shutil.copy("log.log", "a4_merge_clause_diff_" + time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + ".log") +shutil.move("log.log", "a4_merge_clause_diff.log") + +raw_input("PRESS ANY KEY TO EXIT") diff --git a/code/nel/tools/build_gamedata/translation/b1_make_words_diff.py b/code/nel/tools/build_gamedata/translation/b1_make_words_diff.py old mode 100755 new mode 100644 index 845a60831..6350a1695 --- a/code/nel/tools/build_gamedata/translation/b1_make_words_diff.py +++ b/code/nel/tools/build_gamedata/translation/b1_make_words_diff.py @@ -1,54 +1,54 @@ -#!/usr/bin/python -# -# \author Jan Boon (Kaetemi) -# -# NeL - MMORPG Framework -# Copyright (C) 2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -import time, sys, os, shutil, subprocess, distutils.dir_util -sys.path.append("../configuration") -from scripts import * -from buildsite import * -from tools import * -os.chdir(TranslationDirectory) -if os.path.isfile("log.log"): - os.remove("log.log") -log = open("log.log", "w") - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Make words diff") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - - -TranslationTools = findTool(log, ToolDirectories, TranslationToolsTool, ToolSuffix) -try: - subprocess.call([ TranslationTools, "make_words_diff" ]) -except Exception, e: - printLog(log, "<" + processName + "> " + str(e)) -printLog(log, "") - - -log.close() -if os.path.isfile("b1_make_words_diff.log"): - os.remove("b1_make_words_diff.log") -shutil.copy("log.log", "b1_make_words_diff_" + time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + ".log") -shutil.move("log.log", "b1_make_words_diff.log") - -raw_input("PRESS ANY KEY TO EXIT") +#!/usr/bin/python +# +# \author Jan Boon (Kaetemi) +# +# NeL - MMORPG Framework +# Copyright (C) 2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +import time, sys, os, shutil, subprocess, distutils.dir_util +sys.path.append("../configuration") +from scripts import * +from buildsite import * +from tools import * +os.chdir(TranslationDirectory) +if os.path.isfile("log.log"): + os.remove("log.log") +log = open("log.log", "w") + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Make words diff") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + + +TranslationTools = findTool(log, ToolDirectories, TranslationToolsTool, ToolSuffix) +try: + subprocess.call([ TranslationTools, "make_words_diff" ]) +except Exception, e: + printLog(log, "<" + processName + "> " + str(e)) +printLog(log, "") + + +log.close() +if os.path.isfile("b1_make_words_diff.log"): + os.remove("b1_make_words_diff.log") +shutil.copy("log.log", "b1_make_words_diff_" + time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + ".log") +shutil.move("log.log", "b1_make_words_diff.log") + +raw_input("PRESS ANY KEY TO EXIT") diff --git a/code/nel/tools/build_gamedata/translation/b2_merge_words_diff.py b/code/nel/tools/build_gamedata/translation/b2_merge_words_diff.py old mode 100755 new mode 100644 index b6048bf05..a7c7113fc --- a/code/nel/tools/build_gamedata/translation/b2_merge_words_diff.py +++ b/code/nel/tools/build_gamedata/translation/b2_merge_words_diff.py @@ -1,54 +1,54 @@ -#!/usr/bin/python -# -# \author Jan Boon (Kaetemi) -# -# NeL - MMORPG Framework -# Copyright (C) 2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -import time, sys, os, shutil, subprocess, distutils.dir_util -sys.path.append("../configuration") -from scripts import * -from buildsite import * -from tools import * -os.chdir(TranslationDirectory) -if os.path.isfile("log.log"): - os.remove("log.log") -log = open("log.log", "w") - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Merge words diff") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - - -TranslationTools = findTool(log, ToolDirectories, TranslationToolsTool, ToolSuffix) -try: - subprocess.call([ TranslationTools, "merge_words_diff" ]) -except Exception, e: - printLog(log, "<" + processName + "> " + str(e)) -printLog(log, "") - - -log.close() -if os.path.isfile("b2_merge_words_diff.log"): - os.remove("b2_merge_words_diff.log") -shutil.copy("log.log", "b2_merge_words_diff_" + time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + ".log") -shutil.move("log.log", "b2_merge_words_diff.log") - -raw_input("PRESS ANY KEY TO EXIT") +#!/usr/bin/python +# +# \author Jan Boon (Kaetemi) +# +# NeL - MMORPG Framework +# Copyright (C) 2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +import time, sys, os, shutil, subprocess, distutils.dir_util +sys.path.append("../configuration") +from scripts import * +from buildsite import * +from tools import * +os.chdir(TranslationDirectory) +if os.path.isfile("log.log"): + os.remove("log.log") +log = open("log.log", "w") + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Merge words diff") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + + +TranslationTools = findTool(log, ToolDirectories, TranslationToolsTool, ToolSuffix) +try: + subprocess.call([ TranslationTools, "merge_words_diff" ]) +except Exception, e: + printLog(log, "<" + processName + "> " + str(e)) +printLog(log, "") + + +log.close() +if os.path.isfile("b2_merge_words_diff.log"): + os.remove("b2_merge_words_diff.log") +shutil.copy("log.log", "b2_merge_words_diff_" + time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + ".log") +shutil.move("log.log", "b2_merge_words_diff.log") + +raw_input("PRESS ANY KEY TO EXIT") diff --git a/code/nel/tools/build_gamedata/translation/c1_make_string_diff.py b/code/nel/tools/build_gamedata/translation/c1_make_string_diff.py old mode 100755 new mode 100644 index 915909051..b3ed6948f --- a/code/nel/tools/build_gamedata/translation/c1_make_string_diff.py +++ b/code/nel/tools/build_gamedata/translation/c1_make_string_diff.py @@ -1,54 +1,54 @@ -#!/usr/bin/python -# -# \author Jan Boon (Kaetemi) -# -# NeL - MMORPG Framework -# Copyright (C) 2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -import time, sys, os, shutil, subprocess, distutils.dir_util -sys.path.append("../configuration") -from scripts import * -from buildsite import * -from tools import * -os.chdir(TranslationDirectory) -if os.path.isfile("log.log"): - os.remove("log.log") -log = open("log.log", "w") - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Make string diff") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - - -TranslationTools = findTool(log, ToolDirectories, TranslationToolsTool, ToolSuffix) -try: - subprocess.call([ TranslationTools, "make_string_diff" ]) -except Exception, e: - printLog(log, "<" + processName + "> " + str(e)) -printLog(log, "") - - -log.close() -if os.path.isfile("c1_make_string_diff.log"): - os.remove("c1_make_string_diff.log") -shutil.copy("log.log", "c1_make_string_diff_" + time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + ".log") -shutil.move("log.log", "c1_make_string_diff.log") - -raw_input("PRESS ANY KEY TO EXIT") +#!/usr/bin/python +# +# \author Jan Boon (Kaetemi) +# +# NeL - MMORPG Framework +# Copyright (C) 2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +import time, sys, os, shutil, subprocess, distutils.dir_util +sys.path.append("../configuration") +from scripts import * +from buildsite import * +from tools import * +os.chdir(TranslationDirectory) +if os.path.isfile("log.log"): + os.remove("log.log") +log = open("log.log", "w") + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Make string diff") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + + +TranslationTools = findTool(log, ToolDirectories, TranslationToolsTool, ToolSuffix) +try: + subprocess.call([ TranslationTools, "make_string_diff" ]) +except Exception, e: + printLog(log, "<" + processName + "> " + str(e)) +printLog(log, "") + + +log.close() +if os.path.isfile("c1_make_string_diff.log"): + os.remove("c1_make_string_diff.log") +shutil.copy("log.log", "c1_make_string_diff_" + time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + ".log") +shutil.move("log.log", "c1_make_string_diff.log") + +raw_input("PRESS ANY KEY TO EXIT") diff --git a/code/nel/tools/build_gamedata/translation/c2_merge_string_diff.py b/code/nel/tools/build_gamedata/translation/c2_merge_string_diff.py old mode 100755 new mode 100644 index 44f27a6ed..294cdd7d8 --- a/code/nel/tools/build_gamedata/translation/c2_merge_string_diff.py +++ b/code/nel/tools/build_gamedata/translation/c2_merge_string_diff.py @@ -1,54 +1,54 @@ -#!/usr/bin/python -# -# \author Jan Boon (Kaetemi) -# -# NeL - MMORPG Framework -# Copyright (C) 2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -import time, sys, os, shutil, subprocess, distutils.dir_util -sys.path.append("../configuration") -from scripts import * -from buildsite import * -from tools import * -os.chdir(TranslationDirectory) -if os.path.isfile("log.log"): - os.remove("log.log") -log = open("log.log", "w") - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Merge string diff") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - - -TranslationTools = findTool(log, ToolDirectories, TranslationToolsTool, ToolSuffix) -try: - subprocess.call([ TranslationTools, "merge_string_diff" ]) -except Exception, e: - printLog(log, "<" + processName + "> " + str(e)) -printLog(log, "") - - -log.close() -if os.path.isfile("c2_merge_string_diff.log"): - os.remove("c2_merge_string_diff.log") -shutil.copy("log.log", "c2_merge_string_diff_" + time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + ".log") -shutil.move("log.log", "c2_merge_string_diff.log") - -raw_input("PRESS ANY KEY TO EXIT") +#!/usr/bin/python +# +# \author Jan Boon (Kaetemi) +# +# NeL - MMORPG Framework +# Copyright (C) 2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +import time, sys, os, shutil, subprocess, distutils.dir_util +sys.path.append("../configuration") +from scripts import * +from buildsite import * +from tools import * +os.chdir(TranslationDirectory) +if os.path.isfile("log.log"): + os.remove("log.log") +log = open("log.log", "w") + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Merge string diff") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + + +TranslationTools = findTool(log, ToolDirectories, TranslationToolsTool, ToolSuffix) +try: + subprocess.call([ TranslationTools, "merge_string_diff" ]) +except Exception, e: + printLog(log, "<" + processName + "> " + str(e)) +printLog(log, "") + + +log.close() +if os.path.isfile("c2_merge_string_diff.log"): + os.remove("c2_merge_string_diff.log") +shutil.copy("log.log", "c2_merge_string_diff_" + time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + ".log") +shutil.move("log.log", "c2_merge_string_diff.log") + +raw_input("PRESS ANY KEY TO EXIT") diff --git a/code/nel/tools/build_gamedata/translation/d1_make_botnames_diff.py b/code/nel/tools/build_gamedata/translation/d1_make_botnames_diff.py old mode 100755 new mode 100644 index 330e9e670..473349471 --- a/code/nel/tools/build_gamedata/translation/d1_make_botnames_diff.py +++ b/code/nel/tools/build_gamedata/translation/d1_make_botnames_diff.py @@ -1,54 +1,54 @@ -#!/usr/bin/python -# -# \author Jan Boon (Kaetemi) -# -# NeL - MMORPG Framework -# Copyright (C) 2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -import time, sys, os, shutil, subprocess, distutils.dir_util -sys.path.append("../configuration") -from scripts import * -from buildsite import * -from tools import * -os.chdir(TranslationDirectory) -if os.path.isfile("log.log"): - os.remove("log.log") -log = open("log.log", "w") - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Make botnames diff") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - - -TranslationTools = findTool(log, ToolDirectories, TranslationToolsTool, ToolSuffix) -try: - subprocess.call([ TranslationTools, "make_worksheet_diff", "bot_names.txt" ]) -except Exception, e: - printLog(log, "<" + processName + "> " + str(e)) -printLog(log, "") - - -log.close() -if os.path.isfile("d1_make_botnames_diff.log"): - os.remove("d1_make_botnames_diff.log") -shutil.copy("log.log", "d1_make_botnames_diff_" + time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + ".log") -shutil.move("log.log", "d1_make_botnames_diff.log") - -raw_input("PRESS ANY KEY TO EXIT") +#!/usr/bin/python +# +# \author Jan Boon (Kaetemi) +# +# NeL - MMORPG Framework +# Copyright (C) 2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +import time, sys, os, shutil, subprocess, distutils.dir_util +sys.path.append("../configuration") +from scripts import * +from buildsite import * +from tools import * +os.chdir(TranslationDirectory) +if os.path.isfile("log.log"): + os.remove("log.log") +log = open("log.log", "w") + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Make botnames diff") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + + +TranslationTools = findTool(log, ToolDirectories, TranslationToolsTool, ToolSuffix) +try: + subprocess.call([ TranslationTools, "make_worksheet_diff", "bot_names.txt" ]) +except Exception, e: + printLog(log, "<" + processName + "> " + str(e)) +printLog(log, "") + + +log.close() +if os.path.isfile("d1_make_botnames_diff.log"): + os.remove("d1_make_botnames_diff.log") +shutil.copy("log.log", "d1_make_botnames_diff_" + time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + ".log") +shutil.move("log.log", "d1_make_botnames_diff.log") + +raw_input("PRESS ANY KEY TO EXIT") diff --git a/code/nel/tools/build_gamedata/translation/d2_merge_botnames_diff.py b/code/nel/tools/build_gamedata/translation/d2_merge_botnames_diff.py old mode 100755 new mode 100644 index e2b0dd2ec..acedda712 --- a/code/nel/tools/build_gamedata/translation/d2_merge_botnames_diff.py +++ b/code/nel/tools/build_gamedata/translation/d2_merge_botnames_diff.py @@ -1,54 +1,54 @@ -#!/usr/bin/python -# -# \author Jan Boon (Kaetemi) -# -# NeL - MMORPG Framework -# Copyright (C) 2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -import time, sys, os, shutil, subprocess, distutils.dir_util -sys.path.append("../configuration") -from scripts import * -from buildsite import * -from tools import * -os.chdir(TranslationDirectory) -if os.path.isfile("log.log"): - os.remove("log.log") -log = open("log.log", "w") - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Merge botnames diff") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - - -TranslationTools = findTool(log, ToolDirectories, TranslationToolsTool, ToolSuffix) -try: - subprocess.call([ TranslationTools, "merge_worksheet_diff", "bot_names.txt" ]) -except Exception, e: - printLog(log, "<" + processName + "> " + str(e)) -printLog(log, "") - - -log.close() -if os.path.isfile("d2_merge_botnames_diff.log"): - os.remove("d2_merge_botnames_diff.log") -shutil.copy("log.log", "d2_merge_botnames_diff_" + time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + ".log") -shutil.move("log.log", "d2_merge_botnames_diff.log") - -raw_input("PRESS ANY KEY TO EXIT") +#!/usr/bin/python +# +# \author Jan Boon (Kaetemi) +# +# NeL - MMORPG Framework +# Copyright (C) 2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +import time, sys, os, shutil, subprocess, distutils.dir_util +sys.path.append("../configuration") +from scripts import * +from buildsite import * +from tools import * +os.chdir(TranslationDirectory) +if os.path.isfile("log.log"): + os.remove("log.log") +log = open("log.log", "w") + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Merge botnames diff") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + + +TranslationTools = findTool(log, ToolDirectories, TranslationToolsTool, ToolSuffix) +try: + subprocess.call([ TranslationTools, "merge_worksheet_diff", "bot_names.txt" ]) +except Exception, e: + printLog(log, "<" + processName + "> " + str(e)) +printLog(log, "") + + +log.close() +if os.path.isfile("d2_merge_botnames_diff.log"): + os.remove("d2_merge_botnames_diff.log") +shutil.copy("log.log", "d2_merge_botnames_diff_" + time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + ".log") +shutil.move("log.log", "d2_merge_botnames_diff.log") + +raw_input("PRESS ANY KEY TO EXIT") diff --git a/code/nel/tools/build_gamedata/translation/e1_clean_string_diff.py b/code/nel/tools/build_gamedata/translation/e1_clean_string_diff.py old mode 100755 new mode 100644 index 9eafba1a6..9098e82e2 --- a/code/nel/tools/build_gamedata/translation/e1_clean_string_diff.py +++ b/code/nel/tools/build_gamedata/translation/e1_clean_string_diff.py @@ -1,54 +1,54 @@ -#!/usr/bin/python -# -# \author Lukasz Kolasa (Maczuga) -# -# NeL - MMORPG Framework -# Copyright (C) 2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -import time, sys, os, shutil, subprocess, distutils.dir_util -sys.path.append("../configuration") -from scripts import * -from buildsite import * -from tools import * -os.chdir(TranslationDirectory) -if os.path.isfile("log.log"): - os.remove("log.log") -log = open("log.log", "w") - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Clean string diff") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - - -TranslationTools = findTool(log, ToolDirectories, TranslationToolsTool, ToolSuffix) -try: - subprocess.call([ TranslationTools, "clean_string_diff" ]) -except Exception, e: - printLog(log, "<" + processName + "> " + str(e)) -printLog(log, "") - - -log.close() -if os.path.isfile("e1_clean_string_diff.log"): - os.remove("e1_clean_string_diff.log") -shutil.copy("log.log", "e1_clean_string_diff_" + time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + ".log") -shutil.move("log.log", "e1_clean_string_diff.log") - -raw_input("PRESS ANY KEY TO EXIT") +#!/usr/bin/python +# +# \author Lukasz Kolasa (Maczuga) +# +# NeL - MMORPG Framework +# Copyright (C) 2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +import time, sys, os, shutil, subprocess, distutils.dir_util +sys.path.append("../configuration") +from scripts import * +from buildsite import * +from tools import * +os.chdir(TranslationDirectory) +if os.path.isfile("log.log"): + os.remove("log.log") +log = open("log.log", "w") + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Clean string diff") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + + +TranslationTools = findTool(log, ToolDirectories, TranslationToolsTool, ToolSuffix) +try: + subprocess.call([ TranslationTools, "clean_string_diff" ]) +except Exception, e: + printLog(log, "<" + processName + "> " + str(e)) +printLog(log, "") + + +log.close() +if os.path.isfile("e1_clean_string_diff.log"): + os.remove("e1_clean_string_diff.log") +shutil.copy("log.log", "e1_clean_string_diff_" + time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + ".log") +shutil.move("log.log", "e1_clean_string_diff.log") + +raw_input("PRESS ANY KEY TO EXIT") diff --git a/code/nel/tools/build_gamedata/translation/e2_clean_words_diff.py b/code/nel/tools/build_gamedata/translation/e2_clean_words_diff.py old mode 100755 new mode 100644 index a98c7b27c..d205e5c8c --- a/code/nel/tools/build_gamedata/translation/e2_clean_words_diff.py +++ b/code/nel/tools/build_gamedata/translation/e2_clean_words_diff.py @@ -1,54 +1,54 @@ -#!/usr/bin/python -# -# \author Lukasz Kolasa (Maczuga) -# -# NeL - MMORPG Framework -# Copyright (C) 2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -import time, sys, os, shutil, subprocess, distutils.dir_util -sys.path.append("../configuration") -from scripts import * -from buildsite import * -from tools import * -os.chdir(TranslationDirectory) -if os.path.isfile("log.log"): - os.remove("log.log") -log = open("log.log", "w") - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Clean words diff") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - - -TranslationTools = findTool(log, ToolDirectories, TranslationToolsTool, ToolSuffix) -try: - subprocess.call([ TranslationTools, "clean_words_diff" ]) -except Exception, e: - printLog(log, "<" + processName + "> " + str(e)) -printLog(log, "") - - -log.close() -if os.path.isfile("e2_clean_words_diff.log"): - os.remove("e2_clean_words_diff.log") -shutil.copy("log.log", "e2_clean_words_diff_" + time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + ".log") -shutil.move("log.log", "e2_clean_words_diff.log") - -raw_input("PRESS ANY KEY TO EXIT") +#!/usr/bin/python +# +# \author Lukasz Kolasa (Maczuga) +# +# NeL - MMORPG Framework +# Copyright (C) 2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +import time, sys, os, shutil, subprocess, distutils.dir_util +sys.path.append("../configuration") +from scripts import * +from buildsite import * +from tools import * +os.chdir(TranslationDirectory) +if os.path.isfile("log.log"): + os.remove("log.log") +log = open("log.log", "w") + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Clean words diff") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + + +TranslationTools = findTool(log, ToolDirectories, TranslationToolsTool, ToolSuffix) +try: + subprocess.call([ TranslationTools, "clean_words_diff" ]) +except Exception, e: + printLog(log, "<" + processName + "> " + str(e)) +printLog(log, "") + + +log.close() +if os.path.isfile("e2_clean_words_diff.log"): + os.remove("e2_clean_words_diff.log") +shutil.copy("log.log", "e2_clean_words_diff_" + time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + ".log") +shutil.move("log.log", "e2_clean_words_diff.log") + +raw_input("PRESS ANY KEY TO EXIT") diff --git a/code/nel/tools/build_gamedata/translation/e3_clean_clause_diff.py b/code/nel/tools/build_gamedata/translation/e3_clean_clause_diff.py old mode 100755 new mode 100644 index 337ac6e99..6d2416fa7 --- a/code/nel/tools/build_gamedata/translation/e3_clean_clause_diff.py +++ b/code/nel/tools/build_gamedata/translation/e3_clean_clause_diff.py @@ -1,54 +1,54 @@ -#!/usr/bin/python -# -# \author Lukasz Kolasa (Maczuga) -# -# NeL - MMORPG Framework -# Copyright (C) 2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -import time, sys, os, shutil, subprocess, distutils.dir_util -sys.path.append("../configuration") -from scripts import * -from buildsite import * -from tools import * -os.chdir(TranslationDirectory) -if os.path.isfile("log.log"): - os.remove("log.log") -log = open("log.log", "w") - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Clean clause diff") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - - -TranslationTools = findTool(log, ToolDirectories, TranslationToolsTool, ToolSuffix) -try: - subprocess.call([ TranslationTools, "clean_clause_diff" ]) -except Exception, e: - printLog(log, "<" + processName + "> " + str(e)) -printLog(log, "") - - -log.close() -if os.path.isfile("e3_clean_clause_diff.log"): - os.remove("e3_clean_clause_diff.log") -shutil.copy("log.log", "e3_clean_clause_diff_" + time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + ".log") -shutil.move("log.log", "e3_clean_clause_diff.log") - -raw_input("PRESS ANY KEY TO EXIT") +#!/usr/bin/python +# +# \author Lukasz Kolasa (Maczuga) +# +# NeL - MMORPG Framework +# Copyright (C) 2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +import time, sys, os, shutil, subprocess, distutils.dir_util +sys.path.append("../configuration") +from scripts import * +from buildsite import * +from tools import * +os.chdir(TranslationDirectory) +if os.path.isfile("log.log"): + os.remove("log.log") +log = open("log.log", "w") + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Clean clause diff") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + + +TranslationTools = findTool(log, ToolDirectories, TranslationToolsTool, ToolSuffix) +try: + subprocess.call([ TranslationTools, "clean_clause_diff" ]) +except Exception, e: + printLog(log, "<" + processName + "> " + str(e)) +printLog(log, "") + + +log.close() +if os.path.isfile("e3_clean_clause_diff.log"): + os.remove("e3_clean_clause_diff.log") +shutil.copy("log.log", "e3_clean_clause_diff_" + time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + ".log") +shutil.move("log.log", "e3_clean_clause_diff.log") + +raw_input("PRESS ANY KEY TO EXIT") diff --git a/code/nel/tools/build_gamedata/translation/e4_clean_phrase_diff.py b/code/nel/tools/build_gamedata/translation/e4_clean_phrase_diff.py old mode 100755 new mode 100644 index 8f08d73ea..531f4218f --- a/code/nel/tools/build_gamedata/translation/e4_clean_phrase_diff.py +++ b/code/nel/tools/build_gamedata/translation/e4_clean_phrase_diff.py @@ -1,54 +1,54 @@ -#!/usr/bin/python -# -# \author Lukasz Kolasa (Maczuga) -# -# NeL - MMORPG Framework -# Copyright (C) 2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -import time, sys, os, shutil, subprocess, distutils.dir_util -sys.path.append("../configuration") -from scripts import * -from buildsite import * -from tools import * -os.chdir(TranslationDirectory) -if os.path.isfile("log.log"): - os.remove("log.log") -log = open("log.log", "w") - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Clean phrase diff") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - - -TranslationTools = findTool(log, ToolDirectories, TranslationToolsTool, ToolSuffix) -try: - subprocess.call([ TranslationTools, "clean_phrase_diff" ]) -except Exception, e: - printLog(log, "<" + processName + "> " + str(e)) -printLog(log, "") - - -log.close() -if os.path.isfile("e4_clean_phrase_diff.log"): - os.remove("e4_clean_phrase_diff.log") -shutil.copy("log.log", "e4_clean_phrase_diff_" + time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + ".log") -shutil.move("log.log", "e4_clean_phrase_diff.log") - -raw_input("PRESS ANY KEY TO EXIT") +#!/usr/bin/python +# +# \author Lukasz Kolasa (Maczuga) +# +# NeL - MMORPG Framework +# Copyright (C) 2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +import time, sys, os, shutil, subprocess, distutils.dir_util +sys.path.append("../configuration") +from scripts import * +from buildsite import * +from tools import * +os.chdir(TranslationDirectory) +if os.path.isfile("log.log"): + os.remove("log.log") +log = open("log.log", "w") + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Clean phrase diff") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + + +TranslationTools = findTool(log, ToolDirectories, TranslationToolsTool, ToolSuffix) +try: + subprocess.call([ TranslationTools, "clean_phrase_diff" ]) +except Exception, e: + printLog(log, "<" + processName + "> " + str(e)) +printLog(log, "") + + +log.close() +if os.path.isfile("e4_clean_phrase_diff.log"): + os.remove("e4_clean_phrase_diff.log") +shutil.copy("log.log", "e4_clean_phrase_diff_" + time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + ".log") +shutil.move("log.log", "e4_clean_phrase_diff.log") + +raw_input("PRESS ANY KEY TO EXIT") diff --git a/code/nel/tools/build_gamedata/translation/make_merge_all.py b/code/nel/tools/build_gamedata/translation/make_merge_all.py old mode 100755 new mode 100644 index f4dbd95fb..91fc4712b --- a/code/nel/tools/build_gamedata/translation/make_merge_all.py +++ b/code/nel/tools/build_gamedata/translation/make_merge_all.py @@ -1,67 +1,70 @@ -#!/usr/bin/python -# -# \author Jan Boon (Kaetemi) -# -# NeL - MMORPG Framework -# Copyright (C) 2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -import time, sys, os, shutil, subprocess, distutils.dir_util -sys.path.append("../configuration") -from scripts import * -from buildsite import * -from tools import * -os.chdir(TranslationDirectory) -if os.path.isfile("log.log"): - os.remove("log.log") -log = open("log.log", "w") - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Make and merge all translations") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - - -TranslationTools = findTool(log, ToolDirectories, TranslationToolsTool, ToolSuffix) -try: - subprocess.call([ TranslationTools, "make_phrase_diff" ]) - subprocess.call([ TranslationTools, "merge_phrase_diff" ]) - subprocess.call([ TranslationTools, "make_clause_diff" ]) - subprocess.call([ TranslationTools, "merge_clause_diff" ]) - subprocess.call([ TranslationTools, "make_words_diff" ]) - subprocess.call([ TranslationTools, "merge_words_diff" ]) - subprocess.call([ TranslationTools, "make_string_diff" ]) - subprocess.call([ TranslationTools, "merge_string_diff" ]) - subprocess.call([ TranslationTools, "clean_string_diff" ]) - subprocess.call([ TranslationTools, "clean_words_diff" ]) - subprocess.call([ TranslationTools, "clean_clause_diff" ]) - subprocess.call([ TranslationTools, "clean_phrase_diff" ]) - subprocess.call([ TranslationTools, "make_worksheet_diff", "bot_names.txt" ]) - subprocess.call([ TranslationTools, "merge_worksheet_diff", "bot_names.txt" ]) -except Exception, e: - printLog(log, "<" + processName + "> " + str(e)) -printLog(log, "") - - -log.close() -if os.path.isfile("make_merge_all.log"): - os.remove("make_merge_all.log") -shutil.copy("log.log", "make_merge_all_" + time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + ".log") -shutil.move("log.log", "make_merge_all.log") - -raw_input("PRESS ANY KEY TO EXIT") +#!/usr/bin/python +# +# \author Jan Boon (Kaetemi) +# +# NeL - MMORPG Framework +# Copyright (C) 2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +import time, sys, os, shutil, subprocess, distutils.dir_util +sys.path.append("../configuration") +from scripts import * +from buildsite import * +from tools import * +os.chdir(TranslationDirectory) +if os.path.isfile("log.log"): + os.remove("log.log") +log = open("log.log", "w") + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Make and merge all translations") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + + +TranslationTools = findTool(log, ToolDirectories, TranslationToolsTool, ToolSuffix) +try: + subprocess.call([ TranslationTools, "make_phrase_diff" ]) + subprocess.call([ TranslationTools, "merge_phrase_diff" ]) + subprocess.call([ TranslationTools, "make_clause_diff" ]) + subprocess.call([ TranslationTools, "merge_clause_diff" ]) + subprocess.call([ TranslationTools, "make_words_diff" ]) + subprocess.call([ TranslationTools, "merge_words_diff" ]) + subprocess.call([ TranslationTools, "make_string_diff" ]) + subprocess.call([ TranslationTools, "merge_string_diff" ]) + subprocess.call([ TranslationTools, "clean_string_diff" ]) + subprocess.call([ TranslationTools, "make_r2_string_diff" ]) + subprocess.call([ TranslationTools, "merge_r2_string_diff" ]) + subprocess.call([ TranslationTools, "clean_r2_string_diff" ]) + subprocess.call([ TranslationTools, "clean_words_diff" ]) + subprocess.call([ TranslationTools, "clean_clause_diff" ]) + subprocess.call([ TranslationTools, "clean_phrase_diff" ]) + subprocess.call([ TranslationTools, "make_worksheet_diff", "bot_names.txt" ]) + subprocess.call([ TranslationTools, "merge_worksheet_diff", "bot_names.txt" ]) +except Exception, e: + printLog(log, "<" + processName + "> " + str(e)) +printLog(log, "") + + +log.close() +if os.path.isfile("make_merge_all.log"): + os.remove("make_merge_all.log") +shutil.copy("log.log", "make_merge_all_" + time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + ".log") +shutil.move("log.log", "make_merge_all.log") + +raw_input("PRESS ANY KEY TO EXIT") diff --git a/code/nel/tools/build_gamedata/translation/make_merge_wk.py b/code/nel/tools/build_gamedata/translation/make_merge_wk.py old mode 100755 new mode 100644 index 4442232ab..43c1ac325 --- a/code/nel/tools/build_gamedata/translation/make_merge_wk.py +++ b/code/nel/tools/build_gamedata/translation/make_merge_wk.py @@ -1,112 +1,115 @@ -#!/usr/bin/python -# -# \author Jan Boon (Kaetemi) -# -# NeL - MMORPG Framework -# Copyright (C) 2014 by authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -import time, sys, os, shutil, subprocess, distutils.dir_util -sys.path.append("../configuration") -from scripts import * -from buildsite import * -from tools import * -os.chdir(TranslationDirectory) -if os.path.isfile("log.log"): - os.remove("log.log") -log = open("log.log", "w") - -printLog(log, "") -printLog(log, "-------") -printLog(log, "--- Make, merge and clean work") -printLog(log, "-------") -printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) -printLog(log, "") - - -TranslationTools = findTool(log, ToolDirectories, TranslationToolsTool, ToolSuffix) -printLog(log, ">>> Override languages.txt <<<") -if not os.path.isfile("make_merge_wk_languages.txt"): - shutil.move("languages.txt", "make_merge_wk_languages.txt") -languagesTxt = open("languages.txt", "w") -languagesTxt.write("wk\n") -languagesTxt.close() - - -printLog(log, ">>> Merge diff <<<") # This is necessary, because when we crop lines, we should only do this from untranslated files -try: - subprocess.call([ TranslationTools, "merge_phrase_diff" ]) - subprocess.call([ TranslationTools, "merge_clause_diff" ]) - subprocess.call([ TranslationTools, "merge_words_diff" ]) - subprocess.call([ TranslationTools, "merge_string_diff" ]) - subprocess.call([ TranslationTools, "merge_worksheet_diff", "bot_names.txt" ]) -except Exception, e: - printLog(log, "<" + processName + "> " + str(e)) -printLog(log, "") - - -printLog(log, ">>> Make diff <<<") -try: - subprocess.call([ TranslationTools, "make_phrase_diff" ]) - subprocess.call([ TranslationTools, "make_clause_diff" ]) - subprocess.call([ TranslationTools, "make_words_diff" ]) - subprocess.call([ TranslationTools, "make_string_diff" ]) - subprocess.call([ TranslationTools, "make_worksheet_diff", "bot_names.txt" ]) -except Exception, e: - printLog(log, "<" + processName + "> " + str(e)) - - -printLog(log, ">>> Mark diffs as translated <<<") -diffFiles = os.listdir("diff") -for diffFile in diffFiles: - if "wk_diff_" in diffFile: - printLog(log, "DIFF " + "diff/" + diffFile) - subprocess.call([ TranslationTools, "crop_lines", "diff/" + diffFile, "3" ]) - -#printLog(log, ">>> Clean diff <<<") -#try: -# subprocess.call([ TranslationTools, "clean_string_diff" ]) -# subprocess.call([ TranslationTools, "clean_phrase_diff" ]) -# subprocess.call([ TranslationTools, "clean_clause_diff" ]) -# subprocess.call([ TranslationTools, "clean_words_diff" ]) -#except Exception, e: -# printLog(log, "<" + processName + "> " + str(e)) -#printLog(log, "") - -printLog(log, ">>> Merge diff <<<") -try: - subprocess.call([ TranslationTools, "merge_phrase_diff" ]) - subprocess.call([ TranslationTools, "merge_clause_diff" ]) - subprocess.call([ TranslationTools, "merge_words_diff" ]) - subprocess.call([ TranslationTools, "merge_string_diff" ]) - subprocess.call([ TranslationTools, "merge_worksheet_diff", "bot_names.txt" ]) -except Exception, e: - printLog(log, "<" + processName + "> " + str(e)) -printLog(log, "") - - -printLog(log, ">>> Restore languages.txt <<<") -os.remove("languages.txt") -shutil.move("make_merge_wk_languages.txt", "languages.txt") - - -log.close() -if os.path.isfile("make_merge_wk.log"): - os.remove("make_merge_wk.log") -shutil.copy("log.log", "make_merge_wk_" + time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + ".log") -shutil.move("log.log", "make_merge_wk.log") - -raw_input("PRESS ANY KEY TO EXIT") +#!/usr/bin/python +# +# \author Jan Boon (Kaetemi) +# +# NeL - MMORPG Framework +# Copyright (C) 2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +import time, sys, os, shutil, subprocess, distutils.dir_util +sys.path.append("../configuration") +from scripts import * +from buildsite import * +from tools import * +os.chdir(TranslationDirectory) +if os.path.isfile("log.log"): + os.remove("log.log") +log = open("log.log", "w") + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Make, merge and clean work") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + + +TranslationTools = findTool(log, ToolDirectories, TranslationToolsTool, ToolSuffix) +printLog(log, ">>> Override languages.txt <<<") +if not os.path.isfile("make_merge_wk_languages.txt"): + shutil.move("languages.txt", "make_merge_wk_languages.txt") +languagesTxt = open("languages.txt", "w") +languagesTxt.write("wk\n") +languagesTxt.close() + + +printLog(log, ">>> Merge diff <<<") # This is necessary, because when we crop lines, we should only do this from untranslated files +try: + subprocess.call([ TranslationTools, "merge_phrase_diff" ]) + subprocess.call([ TranslationTools, "merge_clause_diff" ]) + subprocess.call([ TranslationTools, "merge_words_diff" ]) + subprocess.call([ TranslationTools, "merge_string_diff" ]) + subprocess.call([ TranslationTools, "merge_r2_string_diff" ]) + subprocess.call([ TranslationTools, "merge_worksheet_diff", "bot_names.txt" ]) +except Exception, e: + printLog(log, "<" + processName + "> " + str(e)) +printLog(log, "") + + +printLog(log, ">>> Make diff <<<") +try: + subprocess.call([ TranslationTools, "make_phrase_diff" ]) + subprocess.call([ TranslationTools, "make_clause_diff" ]) + subprocess.call([ TranslationTools, "make_words_diff" ]) + subprocess.call([ TranslationTools, "make_string_diff" ]) + subprocess.call([ TranslationTools, "make_r2_string_diff" ]) + subprocess.call([ TranslationTools, "make_worksheet_diff", "bot_names.txt" ]) +except Exception, e: + printLog(log, "<" + processName + "> " + str(e)) + + +printLog(log, ">>> Mark diffs as translated <<<") +diffFiles = os.listdir("diff") +for diffFile in diffFiles: + if "wk_diff_" in diffFile: + printLog(log, "DIFF " + "diff/" + diffFile) + subprocess.call([ TranslationTools, "crop_lines", "diff/" + diffFile, "3" ]) + +#printLog(log, ">>> Clean diff <<<") +#try: +# subprocess.call([ TranslationTools, "clean_string_diff" ]) +# subprocess.call([ TranslationTools, "clean_phrase_diff" ]) +# subprocess.call([ TranslationTools, "clean_clause_diff" ]) +# subprocess.call([ TranslationTools, "clean_words_diff" ]) +#except Exception, e: +# printLog(log, "<" + processName + "> " + str(e)) +#printLog(log, "") + +printLog(log, ">>> Merge diff <<<") +try: + subprocess.call([ TranslationTools, "merge_phrase_diff" ]) + subprocess.call([ TranslationTools, "merge_clause_diff" ]) + subprocess.call([ TranslationTools, "merge_words_diff" ]) + subprocess.call([ TranslationTools, "merge_string_diff" ]) + subprocess.call([ TranslationTools, "merge_r2_string_diff" ]) + subprocess.call([ TranslationTools, "merge_worksheet_diff", "bot_names.txt" ]) +except Exception, e: + printLog(log, "<" + processName + "> " + str(e)) +printLog(log, "") + + +printLog(log, ">>> Restore languages.txt <<<") +os.remove("languages.txt") +shutil.move("make_merge_wk_languages.txt", "languages.txt") + + +log.close() +if os.path.isfile("make_merge_wk.log"): + os.remove("make_merge_wk.log") +shutil.copy("log.log", "make_merge_wk_" + time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + ".log") +shutil.move("log.log", "make_merge_wk.log") + +raw_input("PRESS ANY KEY TO EXIT")