mirror of
https://github.com/BeamMP/BeamMP-Launcher.git
synced 2026-02-16 02:30:44 +00:00
add command-line options
This commit is contained in:
@@ -26,7 +26,6 @@ extern int ClientID;
|
||||
extern int LastPort;
|
||||
extern bool ModLoaded;
|
||||
extern bool Terminate;
|
||||
extern int DEFAULT_PORT;
|
||||
extern uint64_t UDPSock;
|
||||
extern uint64_t TCPSock;
|
||||
extern std::string Branch;
|
||||
|
||||
17
include/Options.h
Normal file
17
include/Options.h
Normal file
@@ -0,0 +1,17 @@
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
struct Options {
|
||||
std::string executable_name = "BeamMP-Launcher.exe";
|
||||
unsigned int port = 4444;
|
||||
bool verbose = false;
|
||||
bool no_download = false;
|
||||
bool no_launch = false;
|
||||
char **game_arguments = nullptr;
|
||||
int game_arguments_length = 0;
|
||||
};
|
||||
|
||||
void InitOptions(int argc, char *argv[], Options &options);
|
||||
|
||||
extern Options options;
|
||||
@@ -10,12 +10,11 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
void InitLauncher(int argc, char* argv[]);
|
||||
void InitLauncher();
|
||||
std::string GetEP(char* P = nullptr);
|
||||
std::string GetGamePath();
|
||||
std::string GetVer();
|
||||
std::string GetPatch();
|
||||
std::string GetEN();
|
||||
void ConfigInit();
|
||||
extern bool Dev;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user