mirror of
https://github.com/BeamMP/BeamMP-Launcher.git
synced 2025-08-16 00:06:41 +00:00
log invocation
This commit is contained in:
parent
7b59cb6f87
commit
76cfc47a2f
@ -9,8 +9,8 @@ The launcher is the way we communitcate to outside the game, it does a few autom
|
||||
In the root directory of the project,
|
||||
1. `cmake -DCMAKE_BUILD_TYPE=Release . -B bin -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows-static`
|
||||
2. `cmake --build bin --parallel --config Release`
|
||||
|
||||
Remember to change `C:/vcpkg` to wherever you have vcpkg installed.
|
||||
|
||||
Remember to change `C:/vcpkg` to wherever you have vcpkg installed.
|
||||
|
||||
## How to build - Debug
|
||||
|
||||
|
@ -10,6 +10,16 @@ void InitOptions(int argc, const char *argv[], Options &options) {
|
||||
options.argc = argc;
|
||||
options.argv = argv;
|
||||
|
||||
std::string AllOptions;
|
||||
for (int i = 0; i < argc; ++i) {
|
||||
AllOptions += std::string(argv[i]);
|
||||
if (i + 1 < argc) {
|
||||
AllOptions += " ";
|
||||
}
|
||||
}
|
||||
debug("Launcher was invoked as: '" + AllOptions + "'");
|
||||
|
||||
|
||||
if (argc > 2) {
|
||||
if (std::string(argv[1]) == "0" && std::string(argv[2]) == "0") {
|
||||
options.verbose = true;
|
||||
@ -26,7 +36,7 @@ void InitOptions(int argc, const char *argv[], Options &options) {
|
||||
while (i < argc) {
|
||||
std::string argument(argv[i]);
|
||||
if (argument == "-p" || argument == "--port") {
|
||||
if (argc > i) {
|
||||
if (i + 1 >= argc) {
|
||||
std::string error_message =
|
||||
"No port specified, resorting to default (";
|
||||
error_message += std::to_string(options.port);
|
||||
|
@ -242,7 +242,6 @@ void InitLauncher() {
|
||||
#elif defined(__linux__)
|
||||
|
||||
void InitLauncher() {
|
||||
InitLog();
|
||||
info("BeamMP Launcher v" + GetVer() + GetPatch());
|
||||
CheckName();
|
||||
CheckLocalKey();
|
||||
|
@ -54,6 +54,7 @@ int main(int argc, const char** argv) try {
|
||||
}
|
||||
}
|
||||
|
||||
InitLog();
|
||||
InitOptions(argc, argv, options);
|
||||
InitLauncher();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user