mirror of
https://github.com/BeamMP/BeamMP-Launcher.git
synced 2026-04-08 16:56:22 +00:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
406c79ef82 | ||
|
|
f104451bb9 | ||
|
|
d52def2114 | ||
|
|
d71757b56c | ||
|
|
f7d3fcf925 |
@@ -7,7 +7,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include <string>
|
#include <string>
|
||||||
void PreGame(const beammp_fs_string& GamePath);
|
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);
|
void InitGame(const beammp_fs_string& Dir);
|
||||||
beammp_fs_string GetGameDir();
|
beammp_fs_string GetGameDir();
|
||||||
void LegitimacyCheck();
|
void LegitimacyCheck();
|
||||||
|
|||||||
@@ -128,8 +128,8 @@ namespace Utils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
auto invalidLineLog = [&]{
|
auto invalidLineLog = [&]{
|
||||||
warn("Invalid INI line: " + line);
|
debug("Invalid INI line: " + line);
|
||||||
warn("Surrounding lines: \n" +
|
debug("Surrounding lines: \n" +
|
||||||
(i > 0 ? sections[i - 1] : "") + "\n" +
|
(i > 0 ? sections[i - 1] : "") + "\n" +
|
||||||
(i < sections.size() - 1 ? sections[i + 1] : ""));
|
(i < sections.size() - 1 ? sections[i + 1] : ""));
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -232,9 +232,9 @@ void LegitimacyCheck() {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
std::string CheckVer(const beammp_fs_string& dir) {
|
std::string CheckVer(const std::filesystem::path& dir) {
|
||||||
std::string temp;
|
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);
|
std::ifstream f(Path.c_str(), std::ios::binary);
|
||||||
int Size = int(std::filesystem::file_size(Path));
|
int Size = int(std::filesystem::file_size(Path));
|
||||||
std::string vec(Size, 0);
|
std::string vec(Size, 0);
|
||||||
|
|||||||
@@ -73,14 +73,18 @@ Version::Version(const std::array<uint8_t, 3>& v)
|
|||||||
}
|
}
|
||||||
|
|
||||||
beammp_fs_string GetEN() {
|
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() {
|
std::string GetVer() {
|
||||||
return "2.5";
|
return "2.5";
|
||||||
}
|
}
|
||||||
std::string GetPatch() {
|
std::string GetPatch() {
|
||||||
return ".0";
|
return ".1";
|
||||||
}
|
}
|
||||||
|
|
||||||
beammp_fs_string GetEP(const beammp_fs_char* P) {
|
beammp_fs_string GetEP(const beammp_fs_char* P) {
|
||||||
|
|||||||
Reference in New Issue
Block a user