Added aqua_speed for rite geo 50 tryker
[ryzomcore.git] / nel / tools / build_gamedata / b1_client_dev.py
blob3e9a5d4883d91e080ceff80f5d92deb90c36067b
1 #!/usr/bin/python
2 #
3 # \file b1_client_dev.py
4 # \brief Install to client dev
5 # \date 2009-02-18 16:19GMT
6 # \author Jan Boon (Kaetemi)
7 # Python port of game data build pipeline.
8 # Install to client dev
9 #
10 # NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
11 # Copyright (C) 2009-2014 by authors
13 # This program is free software: you can redistribute it and/or modify
14 # it under the terms of the GNU Affero General Public License as
15 # published by the Free Software Foundation, either version 3 of the
16 # License, or (at your option) any later version.
18 # This program is distributed in the hope that it will be useful,
19 # but WITHOUT ANY WARRANTY; without even the implied warranty of
20 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 # GNU Affero General Public License for more details.
23 # You should have received a copy of the GNU Affero General Public License
24 # along with this program. If not, see <http://www.gnu.org/licenses/>.
27 import time, sys, os, shutil, subprocess, distutils.dir_util
28 sys.path.append("configuration")
30 if os.path.isfile("log.log"):
31 os.remove("log.log")
32 log = open("log.log", "w")
33 from scripts import *
34 from buildsite import *
35 from tools import *
37 sys.path.append(WorkspaceDirectory)
38 from projects import *
40 # Log error
41 printLog(log, "")
42 printLog(log, "-------")
43 printLog(log, "--- Install to client dev")
44 printLog(log, "-------")
45 printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
46 printLog(log, "")
48 if not os.path.isfile(ClientDevDirectory + "/client.cfg"):
49 printLog(log, ">>> Generate client.cfg <<<")
50 cfg = open(ClientDevDirectory + "/client.cfg", "w")
51 cfg.write("RootConfigFilename = \"client_default.cfg\";\n")
52 cfg.write("PreDataPath = {\n")
53 cfg.write("\t\"user\", \"patch\", \"" + DataCommonDirectory + "\", \"" + GamedevDirectory + "\", \"" + LeveldesignDirectory + "/translation/translated\", \"" + InstallDirectory + "\", \"data\", \"examples\" \n")
54 cfg.write("};\n")
55 cfg.write("PreLoadPath = \"" + InstallDirectory + "\";\n")
56 cfg.write("PatchWanted = 0;\n")
57 cfg.write("DisplayLuaDebugInfo = 1;\n")
58 cfg.write("AllowDebugLua = 1;\n")
59 cfg.write("FullScreen = 0;\n")
60 printLog(log, "")
62 printLog(log, ">>> Install data <<<")
63 for category in InstallClientData:
64 if (category["UnpackTo"] != None):
65 printLog(log, "CATEGORY " + category["Name"])
66 targetPath = ClientDevDirectory
67 if (category["UnpackTo"] != ""):
68 targetPath += "/" + category["UnpackTo"]
69 mkPath(log, targetPath)
70 for package in category["Packages"]:
71 printLog(log, "PACKAGE " + package[0])
72 mkPath(log, InstallDirectory + "/" + package[0])
73 copyFilesNoTreeIfNeeded(log, InstallDirectory + "/" + package[0], targetPath)
74 printLog(log, "")
76 log.close()
77 if os.path.isfile("b1_client_dev.log"):
78 os.remove("b1_client_dev.log")
79 shutil.copy("log.log", time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + "_client_dev.log")
80 shutil.move("log.log", "b1_client_dev.log")