fix various commandline argument related things

This commit is contained in:
Lion Kortlepel
2024-10-07 00:33:43 +02:00
parent 0eba745d4c
commit 7b59cb6f87
7 changed files with 42 additions and 20 deletions

View File

@@ -3,18 +3,22 @@
#include <string>
struct Options {
#if defined(_WIN32)
std::string executable_name = "BeamMP-Launcher.exe";
#elif defined(__linux__)
std::string executable_name = "BeamMP-Launcher";
#endif
unsigned int port = 4444;
bool verbose = false;
bool no_download = false;
bool no_update = false;
bool no_launch = false;
char **game_arguments = nullptr;
const char **game_arguments = nullptr;
int game_arguments_length = 0;
char** argv = nullptr;
const char** argv = nullptr;
int argc = 0;
};
void InitOptions(int argc, char *argv[], Options &options);
void InitOptions(int argc, const char *argv[], Options &options);
extern Options options;

View File

@@ -11,10 +11,9 @@
#include <vector>
void InitLauncher();
std::string GetEP(char* P = nullptr);
std::string GetEP(const char* P = nullptr);
std::string GetGamePath();
std::string GetVer();
std::string GetPatch();
std::string GetEN();
void ConfigInit();