[Updater]: Changed URL link

This commit is contained in:
JerryALT 2024-03-13 23:59:43 +03:00
parent 4d7c824b30
commit 6a9c44cbd9
4 changed files with 7 additions and 11 deletions

View File

@ -2,7 +2,6 @@
namespace Components
{
const auto changeLogFile = "https://master.iw3spmod.site/iw3sp_data/CHANGELOG.md";
Changelog::Changelog_t Changelog::changeLogData;
float TEXT_ALPHA;
ImGuiWindowFlags changeLogWindowFlags;
@ -235,7 +234,7 @@ namespace Components
{
if (strlen(Dvars::Functions::Dvar_FindVar("fs_game")->current.string) == 0 && !Game::CL_IsCgameInitialized())
{
const auto changeLog = Utils::HTTP::GetData(changeLogFile, {}, {}, false);
const auto changeLog = Utils::HTTP::GetData(URL_MASTER + "iw3sp_data/CHANGELOG.md"s, {}, {}, false);
if (!changeLog.has_value())
{
changeLogData.status = CHANGELOG_ERROR;

View File

@ -85,7 +85,7 @@ namespace Components
std::optional<std::string> Updater::DownloadFile(const std::string& name)
{
return Utils::HTTP::GetData(MASTER + name + "?" + Updater::get_time_str(), {}, {}, true);
return Utils::HTTP::GetData(URL_MASTER + name + "?" + Updater::get_time_str(), {}, {}, true);
}
std::vector<std::string> Updater::FindGarbageFiles(const std::vector<std::string>& update_files)
@ -279,9 +279,7 @@ namespace Components
Scheduler::Once([]
{
const auto host = "https://master.iw3spmod.site/files.json";
const auto files_data = Utils::HTTP::GetData(host, {}, {}, false);
const auto files_data = Utils::HTTP::GetData(URL_MASTER + "files.json"s, {}, {}, false);
if (UpdateCancelled())
{
@ -395,7 +393,7 @@ namespace Components
{
Scheduler::Once([]
{
// Deleting our .dll after when game has been re-launched :>
// Deleting our garbage files after auto-updating :>
Updater::DeleteOldFiles();
}, Scheduler::Pipeline::MAIN);

View File

@ -1,8 +1,5 @@
#pragma once
#define MASTER "https://master.iw3spmod.site/"
#define FILES_PATH "files.json"
namespace Components
{
class Updater : public Component

View File

@ -5,3 +5,5 @@
#define MAX_OSPATH 256
#define ASSET_TYPE_WEAPON_LIMIT 2400
#define URL_MASTER "https://jerryalt.codeberg.page/"