4 # \brief setup properties
5 # \date 2010-05-24 13:42GMT
6 # \author Jan Boon (Kaetemi)
7 # Python port of game data build pipeline.
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"):
32 log
= open("log.log", "w")
34 from buildsite
import *
37 from directories
import *
40 printLog(log
, "-------")
41 printLog(log
, "--- Setup properties")
42 printLog(log
, "-------")
43 printLog(log
, time
.strftime("%Y-%m-%d %H:%MGMT", time
.gmtime(time
.time())))
48 mkPath(log
, ActiveProjectDirectory
+ "/generated")
49 zlp
= open(ActiveProjectDirectory
+ "/generated/properties.cfg", "w")
51 zlp
.write("// Search pathes\n")
52 zlp
.write("search_pathes = \n")
54 for searchPath
in PropertiesExportBuildSearchPaths
:
55 zlp
.write("\t\"" + ExportBuildDirectory
+ "/" + searchPath
+ "\",\n")
58 ps
= open(ActiveProjectDirectory
+ "/properties_base.cfg", "r")
61 SmallbankExportDirectory
63 SmallbankExportDirectory
= "_invalid"
67 FarbankBuildDirectory
= "_invalid"
71 EcosystemName
= "_invalid"
75 EcosystemPath
= "_invalid"
79 ContinentName
= "_invalid"
83 ContinentPath
= "_invalid"
87 ContinentSheet
= ContinentName
91 BankTileBankName
= "_invalid"
95 IgLandBuildDirectory
= "_invalid"
99 IgOtherBuildDirectory
= "_invalid"
101 RbankOutputBuildDirectory
103 RbankOutputBuildDirectory
= "_invalid"
107 RbankRbankName
= "_invalid"
108 newline
= line
.replace("%ExportBuildDirectory%", ExportBuildDirectory
)
109 newline
= newline
.replace("%LeveldesignDirectory%", LeveldesignDirectory
)
110 newline
= newline
.replace("%LeveldesignWorldDirectory%", LeveldesignWorldDirectory
)
111 newline
= newline
.replace("%LeveldesignDfnDirectory%", LeveldesignDfnDirectory
)
112 newline
= newline
.replace("%SmallbankExportDirectory%", SmallbankExportDirectory
)
113 newline
= newline
.replace("%FarbankBuildDirectory%", FarbankBuildDirectory
)
114 newline
= newline
.replace("%EcosystemName%", EcosystemName
)
115 newline
= newline
.replace("%EcosystemPath%", EcosystemPath
)
116 newline
= newline
.replace("%ContinentName%", ContinentName
)
117 newline
= newline
.replace("%ContinentPath%", ContinentPath
)
118 newline
= newline
.replace("%CommonName%", CommonName
)
119 newline
= newline
.replace("%CommonPath%", CommonPath
)
120 newline
= newline
.replace("%ContinentSheet%", ContinentSheet
)
121 newline
= newline
.replace("%BankTileBankName%", BankTileBankName
)
122 newline
= newline
.replace("%IgLandBuildDirectory%", IgLandBuildDirectory
)
123 newline
= newline
.replace("%IgOtherBuildDirectory%", IgOtherBuildDirectory
)
124 newline
= newline
.replace("%RbankOutputBuildDirectory%", RbankOutputBuildDirectory
)
125 newline
= newline
.replace("%RbankRbankName%", RbankRbankName
)
126 newline
= newline
.replace("%BuildQuality%", str(BuildQuality
))
129 if (BuildQuality
== 1):
130 ps
= open(ActiveProjectDirectory
+ "/properties_final.cfg", "r")
132 ps
= open(ActiveProjectDirectory
+ "/properties_draft.cfg", "r")