mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-20 16:08:44 +00:00
Changed: Use application or current directory as root directory for patch
This commit is contained in:
parent
13c4282911
commit
12204bb7e8
1 changed files with 13 additions and 2 deletions
|
@ -47,6 +47,7 @@
|
||||||
#include "nel/misc/sha1.h"
|
#include "nel/misc/sha1.h"
|
||||||
#include "nel/misc/big_file.h"
|
#include "nel/misc/big_file.h"
|
||||||
#include "nel/misc/i18n.h"
|
#include "nel/misc/i18n.h"
|
||||||
|
#include "nel/misc/cmd_args.h"
|
||||||
|
|
||||||
#include "game_share/bg_downloader_msg.h"
|
#include "game_share/bg_downloader_msg.h"
|
||||||
|
|
||||||
|
@ -89,6 +90,8 @@ extern string R2ServerVersion;
|
||||||
std::string TheTmpInstallDirectory = "patch/client_install";
|
std::string TheTmpInstallDirectory = "patch/client_install";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
extern NLMISC::CCmdArgs Args;
|
||||||
|
|
||||||
// ****************************************************************************
|
// ****************************************************************************
|
||||||
// ****************************************************************************
|
// ****************************************************************************
|
||||||
// ****************************************************************************
|
// ****************************************************************************
|
||||||
|
@ -120,8 +123,16 @@ CPatchManager::CPatchManager() : State("t_state"), DataScanState("t_data_scan_st
|
||||||
UpdateBatchFilename = "updt_nl.sh";
|
UpdateBatchFilename = "updt_nl.sh";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// use current directory by default
|
// use application directory by default
|
||||||
setClientRootPath("./");
|
std::string rootPath = Args.getProgramPath();
|
||||||
|
|
||||||
|
if (!CFile::fileExists(rootPath + "client_default.cfg"))
|
||||||
|
{
|
||||||
|
// use current directory
|
||||||
|
rootPath = CPath::getCurrentPath();
|
||||||
|
}
|
||||||
|
|
||||||
|
setClientRootPath(rootPath);
|
||||||
|
|
||||||
VerboseLog = true;
|
VerboseLog = true;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue