5 Commits

Author SHA1 Message Date
Tixx
406c79ef82 Bump version to v2.5.1 2025-07-08 13:24:32 +02:00
Tixx
f104451bb9 Switch Invalid INI line log to debug (#196)
By creating this pull request, I understand that code that is AI
generated or otherwise automatically generated may be rejected without
further discussion.
I declare that I fully understand all code I pushed into this PR, and
wrote all this code myself and own the rights to this code.
2025-07-05 20:24:43 +02:00
Tixx
d52def2114 Make new CheckVer & GetEN compatible with linux (#195)
Fixes issues for linux that came from PR #167 

---

By creating this pull request, I understand that code that is AI
generated or otherwise automatically generated may be rejected without
further discussion.
I declare that I fully understand all code I pushed into this PR, and
wrote all this code myself and own the rights to this code.
2025-07-03 23:29:07 +02:00
Tixx
d71757b56c Switch Invalid INI line log to debug 2025-06-29 12:56:24 +02:00
Tixx
f7d3fcf925 Make new CheckVer & GetEN compatible with linux 2025-06-29 10:07:34 +02:00
4 changed files with 11 additions and 7 deletions

View File

@@ -7,7 +7,7 @@
#pragma once
#include <string>
void PreGame(const beammp_fs_string& GamePath);
std::string CheckVer(const beammp_fs_string& path);
std::string CheckVer(const std::filesystem::path& path);
void InitGame(const beammp_fs_string& Dir);
beammp_fs_string GetGameDir();
void LegitimacyCheck();

View File

@@ -128,8 +128,8 @@ namespace Utils {
}
auto invalidLineLog = [&]{
warn("Invalid INI line: " + line);
warn("Surrounding lines: \n" +
debug("Invalid INI line: " + line);
debug("Surrounding lines: \n" +
(i > 0 ? sections[i - 1] : "") + "\n" +
(i < sections.size() - 1 ? sections[i + 1] : ""));
};

View File

@@ -232,9 +232,9 @@ void LegitimacyCheck() {
}
#endif
}
std::string CheckVer(const beammp_fs_string& dir) {
std::string CheckVer(const std::filesystem::path& dir) {
std::string temp;
beammp_fs_string Path = dir + beammp_wide("\\integrity.json");
std::filesystem::path Path = dir / beammp_wide("integrity.json");
std::ifstream f(Path.c_str(), std::ios::binary);
int Size = int(std::filesystem::file_size(Path));
std::string vec(Size, 0);

View File

@@ -73,14 +73,18 @@ Version::Version(const std::array<uint8_t, 3>& v)
}
beammp_fs_string GetEN() {
return beammp_wide("BeamMP-Launcher.exe");
#if defined(_WIN32)
return L"BeamMP-Launcher.exe";
#elif defined(__linux__)
return "BeamMP-Launcher";
#endif
}
std::string GetVer() {
return "2.5";
}
std::string GetPatch() {
return ".0";
return ".1";
}
beammp_fs_string GetEP(const beammp_fs_char* P) {