Remove downloadToRAM param.

And make Universal-Updater fully touch usable.
This commit is contained in:
SuperSaiyajinStackZ
2019-12-23 01:10:26 +01:00
parent 34bcfd113b
commit 350401b357
16 changed files with 138 additions and 72 deletions
+5 -5
View File
@@ -39,8 +39,8 @@ enum DownloadError {
DL_ERROR_GIT,
};
Result downloadToFile(std::string url, std::string path, bool downloadToRAM);
Result downloadFromRelease(std::string url, std::string asset, std::string path, bool includePrereleases, bool downloadToRAM);
Result downloadToFile(std::string url, std::string path);
Result downloadFromRelease(std::string url, std::string asset, std::string path, bool includePrereleases);
void displayProgressBar();
@@ -69,7 +69,7 @@ void doneMsg(void);
* item is that to get from the API. (Ex. "tag_name")
* @return the string from the API.
*/
std::string getLatestRelease(std::string repo, std::string item, bool downloadToRAM);
std::string getLatestRelease(std::string repo, std::string item);
/**
* Get info from the GitHub API about a Commit.
@@ -77,7 +77,7 @@ std::string getLatestRelease(std::string repo, std::string item, bool downloadTo
* item is that to get from the API. (Ex. "sha")
* @return the string from the API.
*/
std::string getLatestCommit(std::string repo, std::string item, bool downloadToRAM);
std::string getLatestCommit(std::string repo, std::string item);
/**
* Get info from the GitHub API about a Commit.
@@ -86,4 +86,4 @@ std::string getLatestCommit(std::string repo, std::string item, bool downloadToR
* item is that to get from the API. (Ex. "message")
* @return the string from the API.
*/
std::string getLatestCommit(std::string repo, std::string array, std::string item, bool downloadToRAM);
std::string getLatestCommit(std::string repo, std::string array, std::string item);
+5
View File
@@ -26,6 +26,8 @@
#include "screens/screen.hpp"
#include "utils/structs.hpp"
class FTPScreen : public screen
{
public:
@@ -34,4 +36,7 @@ public:
private:
int ftpEnabled = 1;
std::vector<Structs::ButtonPos> arrowPos = {
{0, 215, 25, 25, -1}, // Back Arrow.
};
};
+1
View File
@@ -50,6 +50,7 @@ private:
{170, 100, 140, 35, -1}, // ScriptCreator.
{10, 160, 140, 35, -1}, // Language.
{170, 160, 140, 35, -1}, // Colors.
{0, 215, 25, 25, -1}, // Back Arrow.
};
};
+1
View File
@@ -51,6 +51,7 @@ private:
std::vector<Structs::ButtonPos> arrowPos = {
{295, 0, 25, 25, -1}, // Arrow Up.
{295, 215, 25, 25, -1}, // Arrow Down.
{0, 215, 25, 25, -1}, // Back Arrow.
};
};
+1
View File
@@ -62,6 +62,7 @@ private:
std::vector<Structs::ButtonPos> arrowPos = {
{295, 0, 25, 25, -1}, // Arrow Up.
{295, 215, 25, 25, -1}, // Arrow Down.
{0, 215, 25, 25, -1}, // Back Arrow.
};
};
+7 -1
View File
@@ -84,7 +84,13 @@ private:
};
std::vector<Structs::ButtonPos> barPos = {
{0, 215, 320, 25, -1},
{100, 215, 100, 25, -1},
};
std::vector<Structs::ButtonPos> arrowPos = {
{0, 0, 25, 25, -1}, // Previous Arrow.
{295, 0, 25, 25, -1}, // Next Arrow.
{0, 215, 25, 25, -1}, // Back Arrow.
};
};
+1
View File
@@ -49,6 +49,7 @@ private:
std::vector<Structs::ButtonPos> arrowPos = {
{295, 0, 25, 25, -1}, // Arrow Up.
{295, 215, 25, 25, -1}, // Arrow Down.
{0, 215, 25, 25, -1}, // Back Arrow.
};
};
+2 -2
View File
@@ -35,8 +35,8 @@ 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, bool downloadToRAM, std::string message);
void downloadFile(std::string file, std::string output, bool downloadToRAM, std::string message);
void downloadRelease(std::string repo, std::string file, std::string output, bool includePrereleases, std::string message);
void downloadFile(std::string file, std::string output, std::string message);
void removeFile(std::string file, std::string message);
void installFile(std::string file, std::string message);