From 58b5941bbed60eaa71f82e1fb4b3ae925676b99a Mon Sep 17 00:00:00 2001 From: Nuno Date: Wed, 6 Jan 2021 19:32:42 +0100 Subject: [PATCH 1/3] Flag to use preset folders --- nel/tools/build_gamedata/0_setup.py | 191 ++++++++++++++++------------ 1 file changed, 112 insertions(+), 79 deletions(-) diff --git a/nel/tools/build_gamedata/0_setup.py b/nel/tools/build_gamedata/0_setup.py index de868d8eb..cd1a4dace 100755 --- a/nel/tools/build_gamedata/0_setup.py +++ b/nel/tools/build_gamedata/0_setup.py @@ -30,6 +30,7 @@ sys.path.append("configuration") parser = argparse.ArgumentParser(description='Ryzom Core - Build Gamedata - Setup') parser.add_argument('--noconf', '-nc', action='store_true') parser.add_argument('--noverify', '-nv', action='store_true') +parser.add_argument('--preset', '-p', action='store_true') # parser.add_argument('--haltonerror', '-eh', action='store_true') parser.add_argument('--includeproject', '-ipj', nargs='+') parser.add_argument('--excludeproject', '-epj', nargs='+') @@ -64,127 +65,158 @@ if not args.noconf: except NameError: BuildQuality = 1 try: - ToolDirectories + if not args.preset: + ToolDirectories except NameError: - ToolDirectories = [ 'R:/build/dev/bin/Release', 'R:/external/bin' ] + ToolDirectories = [ 'R:/distribution/nel_tools_win_x64-distribution', 'R:/distribution/ryzom_tools_win_x64-distribution' ] try: ToolSuffix except NameError: ToolSuffix = ".exe" try: - ScriptDirectory + if not args.preset: + ScriptDirectory except NameError: ScriptDirectory = "R:/code/nel/tools/build_gamedata" try: - WorkspaceDirectory + if not args.preset: + WorkspaceDirectory except NameError: WorkspaceDirectory = "R:/leveldesign/workspace" try: - DatabaseDirectory + if not args.preset: + DatabaseDirectory except NameError: DatabaseDirectory = "R:/graphics" try: - SoundDirectory + if not args.preset: + SoundDirectory except NameError: SoundDirectory = "R:/sound" try: - SoundDfnDirectory + if not args.preset: + SoundDfnDirectory except NameError: SoundDfnDirectory = "R:/sound/DFN" try: - ExportBuildDirectory + if not args.preset: + ExportBuildDirectory except NameError: ExportBuildDirectory = "R:/pipeline/export" try: - InstallDirectory + if not args.preset: + InstallDirectory except NameError: InstallDirectory = "R:/pipeline/install" try: - ClientDevDirectory + if not args.preset: + ClientDevDirectory except NameError: ClientDevDirectory = "R:/pipeline/client_dev" try: - ClientPatchDirectory + if not args.preset: + ClientPatchDirectory except NameError: ClientPatchDirectory = "R:/pipeline/client_patch" try: - ClientInstallDirectory + if not args.preset: + ClientInstallDirectory except NameError: ClientInstallDirectory = "R:/pipeline/client_install" try: - ShardInstallDirectory + if not args.preset: + ShardInstallDirectory except NameError: ShardInstallDirectory = "R:/pipeline/shard" try: - WorldEditInstallDirectory + if not args.preset: + WorldEditInstallDirectory except NameError: WorldEditInstallDirectory = "R:/pipeline/worldedit" try: - LeveldesignDirectory + if not args.preset: + WorldEditorFilesDirectory + except NameError: + WorldEditorFilesDirectory = "R:/code/ryzom/common/data_leveldesign/leveldesign/world_editor_files" + try: + if not args.preset: + LeveldesignDirectory except NameError: LeveldesignDirectory = "R:/leveldesign" try: - LeveldesignDfnDirectory + if not args.preset: + LeveldesignDfnDirectory except NameError: LeveldesignDfnDirectory = "R:/leveldesign/DFN" try: - LeveldesignWorldDirectory + if not args.preset: + LeveldesignWorldDirectory except NameError: LeveldesignWorldDirectory = "R:/leveldesign/world" try: - PrimitivesDirectory + if not args.preset: + PrimitivesDirectory except NameError: PrimitivesDirectory = "R:/leveldesign/primitives" try: - GamedevDirectory + if not args.preset: + LeveldesignDataCommonDirectory except NameError: - GamedevDirectory = "R:/code/ryzom/client/data/gamedev" - try: - DataShardDirectory - except NameError: - DataShardDirectory = "R:/code/ryzom/server/data_shard" + LeveldesignDataCommonDirectory = "R:/leveldesign/common" try: - DataCommonDirectory + if not args.preset: + LeveldesignDataShardDirectory except NameError: - DataCommonDirectory = "R:/code/ryzom/common/data_common" + LeveldesignDataShardDirectory = "R:/leveldesign/shard" try: - LeveldesignDataShardDirectory + if not args.preset: + TranslationDirectory except NameError: - LeveldesignDataShardDirectory = "R:/leveldesign/shard" + TranslationDirectory = "R:/leveldesign/translation" try: - LeveldesignDataCommonDirectory + if not args.preset: + GamedevDirectory except NameError: - LeveldesignDataCommonDirectory = "R:/leveldesign/common" + GamedevDirectory = "R:/code/ryzom/client/data/gamedev" try: - TranslationDirectory + if not args.preset: + DataCommonDirectory except NameError: - TranslationDirectory = "R:/leveldesign/translation" + DataCommonDirectory = "R:/code/ryzom/common/data_common" try: - WorldEditorFilesDirectory + if not args.preset: + DataShardDirectory except NameError: - WorldEditorFilesDirectory = "R:/code/ryzom/common/data_leveldesign/leveldesign/world_editor_files" + DataShardDirectory = "R:/code/ryzom/server/data_shard" try: - WindowsExeDllCfgDirectories + if not args.preset: + WindowsExeDllCfgDirectories except NameError: - WindowsExeDllCfgDirectories = [ 'C:/Program Files (x86)/Microsoft Visual Studio 9.0/VC/redist/x86', 'R:/external/bin', 'R:/build/dev/bin/Release', 'R:/code/ryzom/client', 'R:/code/nel/lib', 'R:/code/ryzom/bin', 'R:/code/ryzom/tools/client/client_config/bin' ] + # TODO: Separate 64bit and 32bit + WindowsExeDllCfgDirectories = [ '', 'R:/build/fv_x64/bin/Release', 'R:/distribution/external_x64', 'R:/code/ryzom/client', '', '', '' ] try: - LinuxServiceExecutableDirectory + if not args.preset: + LinuxServiceExecutableDirectory except NameError: LinuxServiceExecutableDirectory = "R:/build/gcc_server/bin" try: - LinuxClientExecutableDirectory + if not args.preset: + LinuxClientExecutableDirectory except NameError: LinuxClientExecutableDirectory = "R:/build/gcc_client/bin" try: - PatchmanCfgAdminDirectory + if not args.preset: + PatchmanCfgAdminDirectory except NameError: PatchmanCfgAdminDirectory = "R:/patchman/admin_install" try: - PatchmanCfgDefaultDirectory + if not args.preset: + PatchmanCfgDefaultDirectory except NameError: PatchmanCfgDefaultDirectory = "R:/patchman/default" try: - PatchmanBridgeServerDirectory + if not args.preset: + PatchmanBridgeServerDirectory except NameError: PatchmanBridgeServerDirectory = "R:/pipeline/bridge_server" try: @@ -232,44 +264,45 @@ if not args.noconf: printLog(log, "Use -- if you need to insert an empty value.") printLog(log, "") BuildQuality = int(askVar(log, "Build Quality", str(BuildQuality))) - ToolDirectories[0] = askVar(log, "[IN] Primary Tool Directory", ToolDirectories[0]).replace("\\", "/") - ToolDirectories[1] = askVar(log, "[IN] Secondary Tool Directory", ToolDirectories[1]).replace("\\", "/") - ToolSuffix = askVar(log, "Tool Suffix", ToolSuffix) - ScriptDirectory = askVar(log, "[IN] Script Directory", os.getcwd().replace("\\", "/")).replace("\\", "/") - WorkspaceDirectory = askVar(log, "[IN] Workspace Directory", WorkspaceDirectory).replace("\\", "/") - DatabaseDirectory = askVar(log, "[IN] Database Directory", DatabaseDirectory).replace("\\", "/") - SoundDirectory = askVar(log, "[IN] Sound Directory", SoundDirectory).replace("\\", "/") - SoundDfnDirectory = askVar(log, "[IN] Sound DFN Directory", SoundDfnDirectory).replace("\\", "/") - 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("\\", "/") - 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("\\", "/") - 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("\\", "/") - LeveldesignWorldDirectory = askVar(log, "[IN] Leveldesign World Directory", LeveldesignWorldDirectory).replace("\\", "/") - PrimitivesDirectory = askVar(log, "[IN] Primitives Directory", PrimitivesDirectory).replace("\\", "/") - GamedevDirectory = askVar(log, "[IN] Gamedev Directory", GamedevDirectory).replace("\\", "/") - DataShardDirectory = askVar(log, "[IN] Data Shard Directory", DataShardDirectory).replace("\\", "/") - DataCommonDirectory = askVar(log, "[IN] Data Common Directory", DataCommonDirectory).replace("\\", "/") - TranslationDirectory = askVar(log, "[IN] Translation Directory", TranslationDirectory).replace("\\", "/") - LeveldesignDataShardDirectory = askVar(log, "[IN] Leveldesign Data Shard Directory", LeveldesignDataShardDirectory).replace("\\", "/") - LeveldesignDataCommonDirectory = askVar(log, "[IN] Leveldesign Data Common Directory", LeveldesignDataCommonDirectory).replace("\\", "/") - WorldEditorFilesDirectory = askVar(log, "[IN] World Editor Files Directory", WorldEditorFilesDirectory).replace("\\", "/") - WindowsExeDllCfgDirectories[0] = askVar(log, "[IN] Primary Windows exe/dll/cfg Directory", WindowsExeDllCfgDirectories[0]).replace("\\", "/") - WindowsExeDllCfgDirectories[1] = askVar(log, "[IN] Secondary Windows exe/dll/cfg Directory", WindowsExeDllCfgDirectories[1]).replace("\\", "/") - WindowsExeDllCfgDirectories[2] = askVar(log, "[IN] Tertiary Windows exe/dll/cfg Directory", WindowsExeDllCfgDirectories[2]).replace("\\", "/") - WindowsExeDllCfgDirectories[3] = askVar(log, "[IN] Quaternary Windows exe/dll/cfg Directory", WindowsExeDllCfgDirectories[3]).replace("\\", "/") - WindowsExeDllCfgDirectories[4] = askVar(log, "[IN] Quinary Windows exe/dll/cfg Directory", WindowsExeDllCfgDirectories[4]).replace("\\", "/") - WindowsExeDllCfgDirectories[5] = askVar(log, "[IN] Senary Windows exe/dll/cfg Directory", WindowsExeDllCfgDirectories[5]).replace("\\", "/") - WindowsExeDllCfgDirectories[6] = askVar(log, "[IN] Septenary Windows exe/dll/cfg Directory", WindowsExeDllCfgDirectories[6]).replace("\\", "/") - LinuxServiceExecutableDirectory = askVar(log, "[IN] Linux Service Executable Directory", LinuxServiceExecutableDirectory).replace("\\", "/") - LinuxClientExecutableDirectory = askVar(log, "[IN] Linux Client Executable Directory", LinuxClientExecutableDirectory).replace("\\", "/") - PatchmanCfgAdminDirectory = askVar(log, "[IN] Patchman Cfg Admin Directory", PatchmanCfgAdminDirectory).replace("\\", "/") - PatchmanCfgDefaultDirectory = askVar(log, "[IN] Patchman Cfg Default Directory", PatchmanCfgDefaultDirectory).replace("\\", "/") - PatchmanBridgeServerDirectory = askVar(log, "[OUT] Patchman Bridge Server Patch Directory", PatchmanBridgeServerDirectory).replace("\\", "/") + if not args.preset: + ToolDirectories[0] = askVar(log, "[IN] Primary Tool Directory", ToolDirectories[0]).replace("\\", "/") + ToolDirectories[1] = askVar(log, "[IN] Secondary Tool Directory", ToolDirectories[1]).replace("\\", "/") + ToolSuffix = askVar(log, "Tool Suffix", ToolSuffix) + ScriptDirectory = askVar(log, "[IN] Script Directory", os.getcwd().replace("\\", "/")).replace("\\", "/") + WorkspaceDirectory = askVar(log, "[IN] Workspace Directory", WorkspaceDirectory).replace("\\", "/") + DatabaseDirectory = askVar(log, "[IN] Database Directory", DatabaseDirectory).replace("\\", "/") + SoundDirectory = askVar(log, "[IN] Sound Directory", SoundDirectory).replace("\\", "/") + SoundDfnDirectory = askVar(log, "[IN] Sound DFN Directory", SoundDfnDirectory).replace("\\", "/") + 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("\\", "/") + 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("\\", "/") + 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("\\", "/") + LeveldesignWorldDirectory = askVar(log, "[IN] Leveldesign World Directory", LeveldesignWorldDirectory).replace("\\", "/") + PrimitivesDirectory = askVar(log, "[IN] Primitives Directory", PrimitivesDirectory).replace("\\", "/") + GamedevDirectory = askVar(log, "[IN] Gamedev Directory", GamedevDirectory).replace("\\", "/") + DataShardDirectory = askVar(log, "[IN] Data Shard Directory", DataShardDirectory).replace("\\", "/") + DataCommonDirectory = askVar(log, "[IN] Data Common Directory", DataCommonDirectory).replace("\\", "/") + TranslationDirectory = askVar(log, "[IN] Translation Directory", TranslationDirectory).replace("\\", "/") + LeveldesignDataShardDirectory = askVar(log, "[IN] Leveldesign Data Shard Directory", LeveldesignDataShardDirectory).replace("\\", "/") + LeveldesignDataCommonDirectory = askVar(log, "[IN] Leveldesign Data Common Directory", LeveldesignDataCommonDirectory).replace("\\", "/") + WorldEditorFilesDirectory = askVar(log, "[IN] World Editor Files Directory", WorldEditorFilesDirectory).replace("\\", "/") + WindowsExeDllCfgDirectories[0] = askVar(log, "[IN] Primary Windows exe/dll/cfg Directory", WindowsExeDllCfgDirectories[0]).replace("\\", "/") + WindowsExeDllCfgDirectories[1] = askVar(log, "[IN] Secondary Windows exe/dll/cfg Directory", WindowsExeDllCfgDirectories[1]).replace("\\", "/") + WindowsExeDllCfgDirectories[2] = askVar(log, "[IN] Tertiary Windows exe/dll/cfg Directory", WindowsExeDllCfgDirectories[2]).replace("\\", "/") + WindowsExeDllCfgDirectories[3] = askVar(log, "[IN] Quaternary Windows exe/dll/cfg Directory", WindowsExeDllCfgDirectories[3]).replace("\\", "/") + WindowsExeDllCfgDirectories[4] = askVar(log, "[IN] Quinary Windows exe/dll/cfg Directory", WindowsExeDllCfgDirectories[4]).replace("\\", "/") + WindowsExeDllCfgDirectories[5] = askVar(log, "[IN] Senary Windows exe/dll/cfg Directory", WindowsExeDllCfgDirectories[5]).replace("\\", "/") + WindowsExeDllCfgDirectories[6] = askVar(log, "[IN] Septenary Windows exe/dll/cfg Directory", WindowsExeDllCfgDirectories[6]).replace("\\", "/") + LinuxServiceExecutableDirectory = askVar(log, "[IN] Linux Service Executable Directory", LinuxServiceExecutableDirectory).replace("\\", "/") + LinuxClientExecutableDirectory = askVar(log, "[IN] Linux Client Executable Directory", LinuxClientExecutableDirectory).replace("\\", "/") + PatchmanCfgAdminDirectory = askVar(log, "[IN] Patchman Cfg Admin Directory", PatchmanCfgAdminDirectory).replace("\\", "/") + PatchmanCfgDefaultDirectory = askVar(log, "[IN] Patchman Cfg Default Directory", PatchmanCfgDefaultDirectory).replace("\\", "/") + PatchmanBridgeServerDirectory = askVar(log, "[OUT] Patchman Bridge Server Patch Directory", PatchmanBridgeServerDirectory).replace("\\", "/") SignToolExecutable = askVar(log, "Sign Tool Executable", SignToolExecutable).replace("\\", "/") SignToolSha1 = askVar(log, "Sign Tool Signature SHA1", SignToolSha1) SignToolTimestamp = askVar(log, "Sign Tool Timestamp Authority", SignToolTimestamp) From 9d303b2a9a69c2ea936fe39c21c1f75163eede4e Mon Sep 17 00:00:00 2001 From: kaetemi Date: Wed, 2 Jun 2021 12:46:57 +0800 Subject: [PATCH 2/3] Preload data in dev client as well, ref kaetemi/ryzomclassic#168 --- nel/tools/build_gamedata/b1_client_dev.py | 3 ++- ryzom/client/src/client_cfg.cpp | 3 +++ ryzom/client/src/client_cfg.h | 2 ++ ryzom/client/src/init_main_loop.cpp | 28 +++++++++++++++++------ 4 files changed, 28 insertions(+), 8 deletions(-) diff --git a/nel/tools/build_gamedata/b1_client_dev.py b/nel/tools/build_gamedata/b1_client_dev.py index a23ee693c..3e9a5d488 100755 --- a/nel/tools/build_gamedata/b1_client_dev.py +++ b/nel/tools/build_gamedata/b1_client_dev.py @@ -50,8 +50,9 @@ if not os.path.isfile(ClientDevDirectory + "/client.cfg"): cfg = open(ClientDevDirectory + "/client.cfg", "w") cfg.write("RootConfigFilename = \"client_default.cfg\";\n") cfg.write("PreDataPath = {\n") - cfg.write("\t\"" + InstallDirectory + "\", \"user\", \"patch\", \"data\", \"examples\" \n") + cfg.write("\t\"user\", \"patch\", \"" + DataCommonDirectory + "\", \"" + GamedevDirectory + "\", \"" + LeveldesignDirectory + "/translation/translated\", \"" + InstallDirectory + "\", \"data\", \"examples\" \n") cfg.write("};\n") + cfg.write("PreLoadPath = \"" + InstallDirectory + "\";\n") cfg.write("PatchWanted = 0;\n") cfg.write("DisplayLuaDebugInfo = 1;\n") cfg.write("AllowDebugLua = 1;\n") diff --git a/ryzom/client/src/client_cfg.cpp b/ryzom/client/src/client_cfg.cpp index db38c1177..f67c4e1db 100644 --- a/ryzom/client/src/client_cfg.cpp +++ b/ryzom/client/src/client_cfg.cpp @@ -1314,6 +1314,9 @@ void CClientConfig::setValues() // Data Path no recurse. READ_STRINGVECTOR_FV(DataPathNoRecurse); + // Pre-load path + READ_STRING_DEV(PreLoadPath); + // Streamed package path READ_STRING_FV(StreamedPackagePath); diff --git a/ryzom/client/src/client_cfg.h b/ryzom/client/src/client_cfg.h index 28d42a45d..22fe46f61 100644 --- a/ryzom/client/src/client_cfg.h +++ b/ryzom/client/src/client_cfg.h @@ -391,6 +391,8 @@ struct CClientConfig std::vector DataPath; /// Data Path no recurse. std::vector DataPathNoRecurse; + /// Pre-load path + std::string PreLoadPath; /// Streamed package path std::string StreamedPackagePath; /// Streamed package hosts diff --git a/ryzom/client/src/init_main_loop.cpp b/ryzom/client/src/init_main_loop.cpp index 8d5badcd2..9d1ebf784 100644 --- a/ryzom/client/src/init_main_loop.cpp +++ b/ryzom/client/src/init_main_loop.cpp @@ -1071,14 +1071,18 @@ void initMainLoop() ProgressBar.pushCropedValues (0, 0.25f); if(!DBG_DisablePreloadShape) { - Driver->getShapeBank()->preLoadShapesFromDirectory(PreLoadCacheName, "data/3d/common/characters/shapes", "*.shape", false, &ProgressBar); + Driver->getShapeBank()->preLoadShapesFromDirectory(PreLoadCacheName, + ClientCfg.PreLoadPath.empty() ? "data/3d/common/characters/shapes" : ClientCfg.PreLoadPath + "/characters_shapes", + "*.shape", false, &ProgressBar); } ProgressBar.popCropedValues (); ProgressBar.progress (0.25f); ProgressBar.pushCropedValues (0.25f,0.5f); if(!DBG_DisablePreloadShape) { - Driver->getShapeBank()->preLoadShapesFromDirectory(PreLoadCacheName, "data/3d/common/characters/skeletons", "*.skel", false, &ProgressBar); + Driver->getShapeBank()->preLoadShapesFromDirectory(PreLoadCacheName, + ClientCfg.PreLoadPath.empty() ? "data/3d/common/characters/skeletons" : ClientCfg.PreLoadPath + "/characters_skeletons", + "*.skel", false, &ProgressBar); } ProgressBar.popCropedValues (); } @@ -1126,14 +1130,18 @@ void initMainLoop() ProgressBar.pushCropedValues (0.5f, 0.75f); if(!DBG_DisablePreloadShape) { - Driver->getShapeBank()->preLoadShapesFromDirectory(PreLoadCacheName, "data/3d/common/fauna/shapes", "*.shape", false, &ProgressBar); + Driver->getShapeBank()->preLoadShapesFromDirectory(PreLoadCacheName, + ClientCfg.PreLoadPath.empty() ? "data/3d/common/fauna/shapes" : ClientCfg.PreLoadPath + "/fauna_shapes", + "*.shape", false, &ProgressBar); } ProgressBar.popCropedValues (); ProgressBar.progress (0.75f); ProgressBar.pushCropedValues (0.75f,1); if(!DBG_DisablePreloadShape) { - Driver->getShapeBank()->preLoadShapesFromDirectory(PreLoadCacheName, "data/3d/common/fauna/skeletons", "*.skel", false, &ProgressBar); + Driver->getShapeBank()->preLoadShapesFromDirectory(PreLoadCacheName, + ClientCfg.PreLoadPath.empty() ? "data/3d/common/fauna/skeletons" : ClientCfg.PreLoadPath + "/fauna_skeletons", + "*.skel", false, &ProgressBar); } ProgressBar.popCropedValues (); } @@ -1174,14 +1182,18 @@ void initMainLoop() ProgressBar.pushCropedValues (0.0f, 0.5f); if(!DBG_DisablePreloadShape) { - Driver->getShapeBank()->preLoadShapesFromDirectory(PreLoadCacheNameFX, "data/3d/common/sfx", "*.ps", true, &ProgressBar, preloadFXTextures); + Driver->getShapeBank()->preLoadShapesFromDirectory(PreLoadCacheNameFX, + ClientCfg.PreLoadPath.empty() ? "data/3d/common/sfx" : ClientCfg.PreLoadPath + "/sfx", + "*.ps", true, &ProgressBar, preloadFXTextures); } ProgressBar.popCropedValues (); ProgressBar.progress (0.5f); ProgressBar.pushCropedValues (0.5f,1); if(!DBG_DisablePreloadShape) { - Driver->getShapeBank()->preLoadShapesFromDirectory(PreLoadCacheNameFX, "data/3d/common/sfx", "*.shape", true, &ProgressBar, preloadFXTextures); + Driver->getShapeBank()->preLoadShapesFromDirectory(PreLoadCacheNameFX, + ClientCfg.PreLoadPath.empty() ? "data/3d/common/sfx" : ClientCfg.PreLoadPath + "/sfx", + "*.shape", true, &ProgressBar, preloadFXTextures); } ProgressBar.popCropedValues (); } @@ -1214,7 +1226,9 @@ void initMainLoop() ProgressBar.pushCropedValues (0.0f, 1.f); if(!DBG_DisablePreloadShape) { - Driver->getShapeBank()->preLoadShapesFromDirectory(PreLoadCacheNameObjects, "data/3d/common/objects", "*.shape", true, &ProgressBar, preloadObjectTextures); + Driver->getShapeBank()->preLoadShapesFromDirectory(PreLoadCacheNameObjects, + ClientCfg.PreLoadPath.empty() ? "data/3d/common/objects" : ClientCfg.PreLoadPath + "/objects", + "*.shape", true, &ProgressBar, preloadObjectTextures); } ProgressBar.popCropedValues (); } From a227dccbb8f697c0892b76857a8fd960d4e435a8 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Thu, 3 Jun 2021 08:49:57 +0800 Subject: [PATCH 3/3] Fix PHP setup script --- web/public_php/setup/header.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/public_php/setup/header.php b/web/public_php/setup/header.php index cefc30a01..11d64213a 100644 --- a/web/public_php/setup/header.php +++ b/web/public_php/setup/header.php @@ -33,7 +33,7 @@ function printalert($type, $message) { print ''; } function is__writable($path) { - if ($path{strlen($path) - 1} == '/') { + if ($path[strlen($path) - 1] == '/' || $path[strlen($path) - 1] == '\\') { return is__writable($path.uniqid(mt_rand()).'.tmp'); }