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_local
import *
37 from directories
import *
40 printLog(log
, "-------")
41 printLog(log
, "--- Install copy")
42 printLog(log
, "-------")
43 printLog(log
, time
.strftime("%Y-%m-%d %H:%MGMT", time
.gmtime(time
.time())))
46 installPath
= InstallDirectory
+ "/" + CopyInstallDirectory
47 mkPath(log
, installPath
)
49 printLog(log
, ">>> Install copy <<<")
50 for dir in CopyDirectSourceDirectories
:
51 copyFilesRecursiveNoTreeIfNeeded(log
, dir, installPath
)
52 for file in CopyDirectSourceFiles
:
53 copyFileIfNeeded(log
, file, installPath
+ "/" + os
.path
.basename(file))
54 for dir in CopyLeveldesignSourceDirectories
:
55 copyFilesRecursiveNoTreeIfNeeded(log
, LeveldesignDirectory
+ "/" + dir, installPath
)
56 for file in CopyLeveldesignSourceFiles
:
57 copyFileIfNeeded(log
, LeveldesignDirectory
+ "/" + file, installPath
+ "/" + os
.path
.basename(file))
58 for dir in CopyLeveldesignWorldSourceDirectories
:
59 copyFilesRecursiveNoTreeIfNeeded(log
, LeveldesignWorldDirectory
+ "/" + dir, installPath
)
60 for file in CopyLeveldesignWorldSourceFiles
:
61 copyFileIfNeeded(log
, LeveldesignWorldDirectory
+ "/" + file, installPath
+ "/" + os
.path
.basename(file))
62 for dir in CopyLeveldesignDfnSourceDirectories
:
63 copyFilesRecursiveNoTreeIfNeeded(log
, LeveldesignDfnDirectory
+ "/" + dir, installPath
)
64 for file in CopyLeveldesignDfnSourceFiles
:
65 copyFileIfNeeded(log
, LeveldesignDfnDirectory
+ "/" + file, installPath
+ "/" + os
.path
.basename(file))
66 for dir in CopyDatabaseSourceDirectories
:
67 copyFilesRecursiveNoTreeIfNeeded(log
, DatabaseDirectory
+ "/" + dir, installPath
)
68 for file in CopyDatabaseSourceFiles
:
69 copyFileIfNeeded(log
, DatabaseDirectory
+ "/" + file, installPath
+ "/" + os
.path
.basename(file))
72 CopyWindowsExeDllCfgSourceFiles
74 CopyWindowsExeDllCfgSourceFiles
= [ ]
75 for file in CopyWindowsExeDllCfgSourceFiles
:
76 filePath
= findFileMultiDir(log
, WindowsExeDllCfgDirectories
, file)
78 copyFileIfNeeded(log
, filePath
, installPath
+ "/" + os
.path
.basename(file))