Added aqua_speed for rite geo 50 tryker
[ryzomcore.git] / nel / tools / build_gamedata / processes / cegui / 2_build.py
blob5bef5ec9099fbad8f6f8e7384b37e69109a304ce
1 #!/usr/bin/python
2 #
3 # \file 2_build.py
4 # \brief Build cegui
5 # \date 2009-03-14-17-46-GMT
6 # \author Jan Boon (Kaetemi)
7 # Build cegui
8 #
9 # NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
10 # Copyright (C) 2009-2014 by authors
12 # This program is free software: you can redistribute it and/or modify
13 # it under the terms of the GNU Affero General Public License as
14 # published by the Free Software Foundation, either version 3 of the
15 # License, or (at your option) any later version.
17 # This program is distributed in the hope that it will be useful,
18 # but WITHOUT ANY WARRANTY; without even the implied warranty of
19 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 # GNU Affero General Public License for more details.
22 # You should have received a copy of the GNU Affero General Public License
23 # along with this program. If not, see <http://www.gnu.org/licenses/>.
26 import time, sys, os, shutil, subprocess, distutils.dir_util
27 sys.path.append("../../configuration")
29 if os.path.isfile("log.log"):
30 os.remove("log.log")
31 log = open("log.log", "w")
32 from scripts import *
33 from buildsite import *
34 from process import *
35 from tools import *
36 from directories import *
38 printLog(log, "")
39 printLog(log, "-------")
40 printLog(log, "--- Build cegui")
41 printLog(log, "-------")
42 printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
43 printLog(log, "")
45 # Find tools
46 BuildImageset = findTool(log, ToolDirectories, BuildImagesetTool, ToolSuffix)
47 printLog(log, "")
49 # For each cegui imageset directory
50 printLog(log, ">>> Build cegui imagesets <<<")
51 if BuildImageset == "":
52 toolLogFail(log, BuildImagesetTool, ToolSuffix)
53 else:
54 srcDir = ExportBuildDirectory + "/" + CeguiImagesetExportDirectory
55 mkPath(log, srcDir)
56 destDir = ExportBuildDirectory + "/" + CeguiImagesetBuildDirectory
57 mkPath(log, destDir)
58 for dir in os.listdir(srcDir):
59 if (os.path.isdir(srcDir + "/" + dir)) and dir != ".svn" and dir != "*.*":
60 mkPath(log, srcDir + "/" + dir)
61 subprocess.call([ BuildImageset, destDir + "/" + dir + ".tga", srcDir + "/" + dir ])
62 printLog(log, "")
64 log.close()
67 # end of file