mirror of
https://github.com/DarkStore-3DS/DarkStore.git
synced 2026-07-03 00:39:02 +00:00
Download previous versions (#20)
* WIP: Start adding downloading pervious versions * Oops this was in here * Properly add Download previous Releases. * Finally fix it. Co-authored-by: StackZ <47382115+SuperSaiyajinStackZ@users.noreply.github.com>
This commit is contained in:
@@ -30,7 +30,17 @@
|
||||
#include "common.hpp"
|
||||
|
||||
#define APP_TITLE "Universal-Updater"
|
||||
#define VERSION_STRING "2.2.1"
|
||||
#define VERSION_STRING "2.3.0"
|
||||
|
||||
// The Release Fetch struct.
|
||||
struct ReleaseFetch {
|
||||
std::string Target;
|
||||
std::string TagName;
|
||||
std::string ReleaseName;
|
||||
std::string Created;
|
||||
std::string Published;
|
||||
bool PreRelease;
|
||||
};
|
||||
|
||||
enum DownloadError {
|
||||
DL_ERROR_NONE = 0,
|
||||
@@ -38,10 +48,11 @@ enum DownloadError {
|
||||
DL_ERROR_ALLOC,
|
||||
DL_ERROR_STATUSCODE,
|
||||
DL_ERROR_GIT,
|
||||
DL_CANCEL, // No clue if that's needed tho.
|
||||
};
|
||||
|
||||
Result downloadToFile(std::string url, std::string path);
|
||||
Result downloadFromRelease(std::string url, std::string asset, std::string path, bool includePrereleases);
|
||||
Result downloadFromRelease(std::string url, std::string asset, std::string path, std::string Message, bool includePrereleases, bool showVersions);
|
||||
|
||||
void displayProgressBar();
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ namespace ScriptHelper {
|
||||
int getNum(nlohmann::json json, const std::string &key, const std::string &key2);
|
||||
|
||||
// Script Functions.
|
||||
void downloadRelease(std::string repo, std::string file, std::string output, bool includePrereleases, std::string message);
|
||||
void downloadRelease(std::string repo, std::string file, std::string output, bool includePrereleases, bool showVersions, std::string message);
|
||||
void downloadFile(std::string file, std::string output, std::string message);
|
||||
|
||||
void removeFile(std::string file, std::string message);
|
||||
|
||||
Reference in New Issue
Block a user