5 # \date 2009-03-14-17-46-GMT
6 # \author Jan Boon (Kaetemi)
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"):
31 log
= open("log.log", "w")
33 from buildsite
import *
36 from directories
import *
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())))
46 BuildImageset
= findTool(log
, ToolDirectories
, BuildImagesetTool
, ToolSuffix
)
49 # For each cegui imageset directory
50 printLog(log
, ">>> Build cegui imagesets <<<")
51 if BuildImageset
== "":
52 toolLogFail(log
, BuildImagesetTool
, ToolSuffix
)
54 srcDir
= ExportBuildDirectory
+ "/" + CeguiImagesetExportDirectory
56 destDir
= ExportBuildDirectory
+ "/" + CeguiImagesetBuildDirectory
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 ])