4 # \brief Run all build processes
5 # \date 2009-02-18 09:22GMT
6 # \author Jan Boon (Kaetemi)
7 # Python port of game data build pipeline.
8 # Run all build processes
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
, argparse
28 sys
.path
.append("../configuration")
30 parser
= argparse
.ArgumentParser()
31 parser
.add_argument('--includeprocess', '-ipc', nargs
='+')
32 parser
.add_argument('--excludeprocess', '-epc', nargs
='+')
33 args
= parser
.parse_args()
35 if os
.path
.isfile("log.log"):
37 log
= open("log.log", "w")
39 from buildsite
import *
42 from directories
import *
46 printLog(log
, "-------")
47 printLog(log
, "--- Run the build processes")
48 printLog(log
, "-------")
49 printLog(log
, time
.strftime("%Y-%m-%d %H:%MGMT", time
.gmtime(time
.time())))
52 for processName
in ProcessToComplete
:
53 if ((args
.includeprocess
== None or processName
in args
.includeprocess
) and (args
.excludeprocess
== None or not processName
in args
.excludeprocess
)):
54 printLog(log
, "PROCESS " + processName
)
57 subprocess
.call([ "python", "2_build.py" ])
59 printLog(log
, "<" + processName
+ "> " + str(e
))
62 processLog
= open(processName
+ "/log.log", "r")
63 processLogData
= processLog
.read()
65 log
.write(processLogData
)
67 printLog(log
, "<" + processName
+ "> " + str(e
))
68 # subprocess.call("idle.bat")
70 printLog(log
, "IGNORE PROCESS " + processName
)