From b04bde2ed61bd17a878ddb7e55e00acf994714cb Mon Sep 17 00:00:00 2001 From: Markus Date: Mon, 4 Nov 2019 17:32:14 +0100 Subject: [PATCH] =?UTF-8?q?f=C3=BCge=20ifedf=20bei=20festlegen=20der=20upd?= =?UTF-8?q?ater=20links=20hinzu?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/parameterManager.h | 33 +++++++++++++++++++++++++-------- 1 file changed, 25 insertions(+), 8 deletions(-) diff --git a/src/parameterManager.h b/src/parameterManager.h index 7fae31c..194c632 100644 --- a/src/parameterManager.h +++ b/src/parameterManager.h @@ -40,16 +40,33 @@ enum Modus { struct Settings { Settings() {} Settings(std::string name) : name(name) {} - const std::string programName = "S_New4"; -#ifdef __linux - const std::string VersionFileUrl = "https://cloud.obermui.de/s/H47Xoqy2czfJzYp/download?path=%2F&files=Version-LINx86.txt"; - const std::string ProgrammFileUrl = "https://cloud.obermui.de/s/H47Xoqy2czfJzYp/download?path=%2F&files=S_New4-LINx86"; -#endif -#ifdef _WIN32 - const std::string VersionFileUrl = "https://cloud.obermui.de/s/H47Xoqy2czfJzYp/download?path=%2F&files=Version-WINx86.txt"; - const std::string ProgrammFileUrl = "https://cloud.obermui.de/s/H47Xoqy2czfJzYp/download?path=%2F&files=S_New4-WINx86.exe"; + +// Wenn das Betriebsystem x86 ist: +#if defined (_X86_) || defined (__amd64__) || defined (_M_IX86) + // Wenn das Betriebsystem LINUX ist und 64 Bit ist: + #if defined (__linux) && ( defined (_LP64) || defined (__LP64__)) + const std::string VersionFileUrl = "https://cloud.obermui.de/s/H47Xoqy2czfJzYp/download?path=%2F&files=Version-LINx86.txt"; + const std::string ProgrammFileUrl = "https://cloud.obermui.de/s/H47Xoqy2czfJzYp/download?path=%2F&files=S_New4-LINx86"; + #else + //Wenn das Betriebsystem Windows ist und 64 Bit ist + #if defined (_WIN64) + const std::string VersionFileUrl = "https://cloud.obermui.de/s/H47Xoqy2czfJzYp/download?path=%2F&files=Version-WINx86.txt"; + const std::string ProgrammFileUrl = "https://cloud.obermui.de/s/H47Xoqy2czfJzYp/download?path=%2F&files=S_New4-WINx86.exe"; + #else + //Ungültiges Betriebsystem => Error + #error Kein Windows oder Linux 64 Bit System + #endif + #endif + +//Nicht x86 Architekture +#else + #error Falsche Architektur: Der Updater Fuktion wird nicht Funktionieren! + #error Remove this 2 ErrorLines in the Code to use S_New4 without an Updater ( If your System is Linux or Windows ) + const std::string VersionFileUrl = ""; + const std::string ProgrammFileUrl = ""; #endif + std::string name, accountFilePath = "", accountNumberPath= "",