Generate separate dev client for local and remote dev

ryzomclassic-develop
kaetemi 3 years ago
parent 0045696546
commit a3626de8bb
No known key found for this signature in database
GPG Key ID: 9873C4D40BB479BC

@ -136,6 +136,12 @@ if not args.noconf:
ClientDevDirectory
except NameError:
ClientDevDirectory = "R:/pipeline/client_dev"
try:
if args.preset:
DummyUnknownName
ClientDevLiveDirectory
except NameError:
ClientDevLiveDirectory = "R:/pipeline/client_dev_live"
try:
if args.preset:
DummyUnknownName
@ -154,6 +160,12 @@ if not args.noconf:
ShardInstallDirectory
except NameError:
ShardInstallDirectory = "R:/pipeline/shard"
try:
if args.preset:
DummyUnknownName
ShardDevDirectory
except NameError:
ShardDevDirectory = "R:/pipeline/shard_dev"
try:
if args.preset:
DummyUnknownName
@ -320,9 +332,11 @@ if not args.noconf:
ExportBuildDirectory = askVar(log, "[OUT] Export Build Directory", ExportBuildDirectory).replace("\\", "/")
InstallDirectory = askVar(log, "[OUT] Install Directory", InstallDirectory).replace("\\", "/")
ClientDevDirectory = askVar(log, "[OUT] Client Dev Directory", ClientDevDirectory).replace("\\", "/")
ClientDevLiveDirectory = askVar(log, "[OUT] Client Dev Live Directory", ClientDevLiveDirectory).replace("\\", "/")
ClientPatchDirectory = askVar(log, "[OUT] Client Patch Directory", ClientPatchDirectory).replace("\\", "/")
ClientInstallDirectory = askVar(log, "[OUT] Client Install Directory", ClientInstallDirectory).replace("\\", "/")
ShardInstallDirectory = askVar(log, "[OUT] Shard Data Install Directory", ShardInstallDirectory).replace("\\", "/")
ShardDevDirectory = askVar(log, "[OUT] Shard Dev Directory", ShardDevDirectory).replace("\\", "/")
WorldEditInstallDirectory = askVar(log, "[OUT] World Edit Data Install Directory", WorldEditInstallDirectory).replace("\\", "/")
LeveldesignDirectory = askVar(log, "[IN] Leveldesign Directory", LeveldesignDirectory).replace("\\", "/")
LeveldesignDfnDirectory = askVar(log, "[IN] Leveldesign DFN Directory", LeveldesignDfnDirectory).replace("\\", "/")
@ -413,9 +427,11 @@ if not args.noconf:
sf.write("# Install directories\n")
sf.write("InstallDirectory = \"" + str(InstallDirectory) + "\"\n")
sf.write("ClientDevDirectory = \"" + str(ClientDevDirectory) + "\"\n")
sf.write("ClientDevLiveDirectory = \"" + str(ClientDevLiveDirectory) + "\"\n")
sf.write("ClientPatchDirectory = \"" + str(ClientPatchDirectory) + "\"\n")
sf.write("ClientInstallDirectory = \"" + str(ClientInstallDirectory) + "\"\n")
sf.write("ShardInstallDirectory = \"" + str(ShardInstallDirectory) + "\"\n")
sf.write("ShardDevDirectory = \"" + str(ShardDevDirectory) + "\"\n")
sf.write("WorldEditInstallDirectory = \"" + str(WorldEditInstallDirectory) + "\"\n")
sf.write("\n")
sf.write("# Utility directories\n")
@ -505,6 +521,7 @@ printLog(log, "")
# Additional directories
printLog(log, ">>> Setup additional directories <<<")
mkPath(log, ClientDevDirectory)
mkPath(log, ClientDevLiveDirectory)
mkPath(log, ClientPatchDirectory)
mkPath(log, ClientInstallDirectory)

@ -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()

Loading…
Cancel
Save