mirror of
https://github.com/BeamMP/BeamMP-Launcher.git
synced 2025-07-01 23:46:59 +00:00
Fix port cli argument (#142)
Fixes --port and -p by proccessing the config file before the cli arguments, before it would first set --port because it was passed and then overwrite it with the value from the config. Also removed some useless code related to cli args.
This commit is contained in:
commit
288e76594d
@ -17,5 +17,4 @@ public:
|
|||||||
static void StartProxy();
|
static void StartProxy();
|
||||||
public:
|
public:
|
||||||
static bool isDownload;
|
static bool isDownload;
|
||||||
static inline bool SkipSslVerify = false;
|
|
||||||
};
|
};
|
||||||
|
@ -232,11 +232,9 @@ void LinuxPatch() {
|
|||||||
|
|
||||||
void InitLauncher() {
|
void InitLauncher() {
|
||||||
SetConsoleTitleA(("BeamMP Launcher v" + std::string(GetVer()) + GetPatch()).c_str());
|
SetConsoleTitleA(("BeamMP Launcher v" + std::string(GetVer()) + GetPatch()).c_str());
|
||||||
InitLog();
|
|
||||||
CheckName();
|
CheckName();
|
||||||
LinuxPatch();
|
LinuxPatch();
|
||||||
CheckLocalKey();
|
CheckLocalKey();
|
||||||
ConfigInit();
|
|
||||||
CheckForUpdates(std::string(GetVer()) + GetPatch());
|
CheckForUpdates(std::string(GetVer()) + GetPatch());
|
||||||
}
|
}
|
||||||
#elif defined(__linux__)
|
#elif defined(__linux__)
|
||||||
@ -245,7 +243,6 @@ void InitLauncher() {
|
|||||||
info("BeamMP Launcher v" + GetVer() + GetPatch());
|
info("BeamMP Launcher v" + GetVer() + GetPatch());
|
||||||
CheckName();
|
CheckName();
|
||||||
CheckLocalKey();
|
CheckLocalKey();
|
||||||
ConfigInit();
|
|
||||||
CheckForUpdates(std::string(GetVer()) + GetPatch());
|
CheckForUpdates(std::string(GetVer()) + GetPatch());
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
15
src/main.cpp
15
src/main.cpp
@ -38,23 +38,10 @@ int main(int argc, const char** argv) try {
|
|||||||
|
|
||||||
curl_global_init(CURL_GLOBAL_ALL);
|
curl_global_init(CURL_GLOBAL_ALL);
|
||||||
|
|
||||||
#if defined(_WIN32)
|
|
||||||
system("cls");
|
|
||||||
#elif defined(__linux__)
|
|
||||||
system("clear");
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
GetEP(argv[0]);
|
GetEP(argv[0]);
|
||||||
|
|
||||||
for (int i = 0; i < argc; ++i) {
|
|
||||||
if (std::string_view(argv[i]) == "--skip-ssl-verify") {
|
|
||||||
info("SSL verification skip enabled");
|
|
||||||
HTTP::SkipSslVerify = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
InitLog();
|
InitLog();
|
||||||
|
ConfigInit();
|
||||||
InitOptions(argc, argv, options);
|
InitOptions(argc, argv, options);
|
||||||
InitLauncher();
|
InitLauncher();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user