forked from markus/S_New4
change to diferned download urls
This commit is contained in:
parent
27b33bfad4
commit
2a76c4c10e
@ -40,7 +40,8 @@ struct Settings {
|
||||
Settings(std::string name) : name(name) {}
|
||||
|
||||
const std::string programName = "S_New4";
|
||||
const std::string VersionFileUrl = "https://cloud.obermui.de/s/cLRYJQAMqWDFt5g/download";
|
||||
const std::string VersionFileUrl = "https://cloud.obermui.de/s/H47Xoqy2czfJzYp/download?path=%2F&files=Version.txt";
|
||||
const std::string ProgrammFileUrl = "https://cloud.obermui.de/s/H47Xoqy2czfJzYp/download?path=%2F&files=S_New4";
|
||||
|
||||
std::string name,
|
||||
accountFilePath = "/tmp/a",
|
||||
|
@ -27,7 +27,7 @@ int ProgramManager::start(Settings *settings)
|
||||
return 174;
|
||||
}
|
||||
|
||||
settings->modus = UPDATE_MODUS;
|
||||
//settings->modus = UPDATE_MODUS;
|
||||
|
||||
|
||||
switch (settings->modus) {
|
||||
@ -968,8 +968,6 @@ int ProgramManager::newsModus(Settings *settings)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#include <zip.h>
|
||||
|
||||
int ProgramManager::updateModus(Settings *settings)
|
||||
{
|
||||
std::cout << "Check newst Version..." << std::endl;
|
||||
@ -1003,15 +1001,8 @@ int ProgramManager::updateModus(Settings *settings)
|
||||
|
||||
std::cout << "Lade Dateien herunter..." << std::endl;
|
||||
|
||||
std::string downloadUrl;
|
||||
std::getline(strstream, downloadUrl);
|
||||
if(downloadUrl.find("/download") == std::string::npos) {
|
||||
std::cout << " => Error: Gedownloadete Datei hat ungültigen DownloadLink: '" << downloadUrl << "'" << std::endl;
|
||||
return 3;
|
||||
}
|
||||
|
||||
std::string downloadedFilePath = settings->cacheDir + "NeusteVersion" + ((settings->pathSymbol == '\\') ? ".exe" : "");
|
||||
if( pageManager.downLoadToFile(downloadedFilePath, downloadUrl) != 0) {
|
||||
if( pageManager.downLoadToFile(downloadedFilePath, settings->ProgrammFileUrl) != 0) {
|
||||
if(settings->debugMode)
|
||||
std::cerr << "Download new Version failed" << std::endl;
|
||||
return 3;
|
||||
|
Loading…
Reference in New Issue
Block a user