|
|
|
@ -24,7 +24,7 @@
|
|
|
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
import time, sys, os, shutil, subprocess, distutils.dir_util
|
|
|
|
|
import time, sys, os, shutil, subprocess, distutils.dir_util, socket
|
|
|
|
|
sys.path.append("configuration")
|
|
|
|
|
|
|
|
|
|
if os.path.isfile("log.log"):
|
|
|
|
@ -45,9 +45,10 @@ printLog(log, "-------")
|
|
|
|
|
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
|
|
|
|
|
printLog(log, "")
|
|
|
|
|
|
|
|
|
|
if not os.path.isfile(ClientDevDirectory + "/client.cfg"):
|
|
|
|
|
printLog(log, ">>> Generate client.cfg <<<")
|
|
|
|
|
cfg = open(ClientDevDirectory + "/client.cfg", "w")
|
|
|
|
|
mkPath(log, ClientDevLiveDirectory)
|
|
|
|
|
if not os.path.isfile(ClientDevLiveDirectory + "/client.cfg"):
|
|
|
|
|
printLog(log, ">>> Generate live dev client.cfg <<<")
|
|
|
|
|
cfg = open(ClientDevLiveDirectory + "/client.cfg", "w")
|
|
|
|
|
cfg.write("RootConfigFilename = \"client_default.cfg\";\n")
|
|
|
|
|
cfg.write("PreDataPath = {\n")
|
|
|
|
|
cfg.write("\t\"user\", \"patch\", \"" + DataCommonDirectory + "\", \"" + GamedevDirectory + "\", \"" + LeveldesignDirectory + "/translation/translated\", \"" + InstallDirectory + "\", \"data\", \"examples\" \n")
|
|
|
|
@ -57,6 +58,24 @@ if not os.path.isfile(ClientDevDirectory + "/client.cfg"):
|
|
|
|
|
cfg.write("DisplayLuaDebugInfo = 1;\n")
|
|
|
|
|
cfg.write("AllowDebugLua = 1;\n")
|
|
|
|
|
cfg.write("FullScreen = 0;\n")
|
|
|
|
|
cfg.flush()
|
|
|
|
|
cfg.close()
|
|
|
|
|
printLog(log, "")
|
|
|
|
|
|
|
|
|
|
mkPath(log, ClientDevDirectory)
|
|
|
|
|
if not os.path.isfile(ClientDevDirectory + "/client.cfg"):
|
|
|
|
|
printLog(log, ">>> Generate local dev client.cfg <<<")
|
|
|
|
|
cfg = open(ClientDevDirectory + "/client.cfg", "w")
|
|
|
|
|
cfgr = open(ClientDevLiveDirectory + "/client.cfg", "r")
|
|
|
|
|
for l in cfgr:
|
|
|
|
|
cfg.write(l)
|
|
|
|
|
cfgr.close()
|
|
|
|
|
cfg.write("StartupHost = \"http://" + socket.gethostname() + ":9042\";\n")
|
|
|
|
|
cfg.write("Application = {\n")
|
|
|
|
|
cfg.write(" \"dev\", \"./client_ryzom_r.exe\", \"./\" \n")
|
|
|
|
|
cfg.write("};\n")
|
|
|
|
|
cfg.flush()
|
|
|
|
|
cfg.close()
|
|
|
|
|
printLog(log, "")
|
|
|
|
|
|
|
|
|
|
printLog(log, ">>> Install data <<<")
|
|
|
|
@ -64,13 +83,17 @@ for category in InstallClientData:
|
|
|
|
|
if (category["UnpackTo"] != None):
|
|
|
|
|
printLog(log, "CATEGORY " + category["Name"])
|
|
|
|
|
targetPath = ClientDevDirectory
|
|
|
|
|
targetPathLive = ClientDevLiveDirectory
|
|
|
|
|
if (category["UnpackTo"] != ""):
|
|
|
|
|
targetPath += "/" + category["UnpackTo"]
|
|
|
|
|
targetPathLive += "/" + category["UnpackTo"]
|
|
|
|
|
mkPath(log, targetPath)
|
|
|
|
|
mkPath(log, targetPathLive)
|
|
|
|
|
for package in category["Packages"]:
|
|
|
|
|
printLog(log, "PACKAGE " + package[0])
|
|
|
|
|
mkPath(log, InstallDirectory + "/" + package[0])
|
|
|
|
|
copyFilesNoTreeIfNeeded(log, InstallDirectory + "/" + package[0], targetPath)
|
|
|
|
|
copyFilesNoTreeIfNeeded(log, InstallDirectory + "/" + package[0], targetPathLive)
|
|
|
|
|
printLog(log, "")
|
|
|
|
|
|
|
|
|
|
log.close()
|
|
|
|
|