mirror of
https://github.com/BeamMP/BeamMP-Launcher.git
synced 2025-07-01 15:36:10 +00:00
Add no-update flag
This commit is contained in:
parent
2ddb576e72
commit
467c8dc584
@ -7,6 +7,7 @@ struct Options {
|
||||
unsigned int port = 4444;
|
||||
bool verbose = false;
|
||||
bool no_download = false;
|
||||
bool no_update = false;
|
||||
bool no_launch = false;
|
||||
char **game_arguments = nullptr;
|
||||
int game_arguments_length = 0;
|
||||
|
@ -46,12 +46,15 @@ void InitOptions(int argc, char *argv[], Options &options) {
|
||||
options.verbose = true;
|
||||
} else if (argument == "--no-download") {
|
||||
options.no_download = true;
|
||||
} else if (argument == "--no-update") {
|
||||
options.no_update = true;
|
||||
} else if (argument == "--no-launch") {
|
||||
options.no_launch = true;
|
||||
} else if (argument == "--dev") {
|
||||
options.verbose = true;
|
||||
options.no_download = true;
|
||||
options.no_launch = true;
|
||||
options.no_update = true;
|
||||
} else if (argument == "--") {
|
||||
options.game_arguments = &argv[i + 1];
|
||||
options.game_arguments_length = argc - i - 1;
|
||||
|
@ -170,7 +170,7 @@ void CheckForUpdates(const std::string& CV) {
|
||||
|
||||
std::string FileHash = hashpp::get::getFileHash(hashpp::ALGORITHMS::SHA2_256, EP);
|
||||
|
||||
if (FileHash != LatestHash && IsOutdated(Version(VersionStrToInts(GetVer() + GetPatch())), Version(VersionStrToInts(LatestVersion))) && !options.no_download) {
|
||||
if (FileHash != LatestHash && IsOutdated(Version(VersionStrToInts(GetVer() + GetPatch())), Version(VersionStrToInts(LatestVersion))) && !options.no_update) {
|
||||
info("Launcher update found!");
|
||||
#if defined(__linux__)
|
||||
error("Auto update is NOT implemented for the Linux version. Please update manually ASAP as updates contain security patches.");
|
||||
|
Loading…
x
Reference in New Issue
Block a user