From ad1b53fa63efcae3886837f368e498b0658c4bca Mon Sep 17 00:00:00 2001 From: selsta Date: Mon, 17 Apr 2023 21:56:42 +0200 Subject: [PATCH] main: add ARM build tag for auto updater --- main.qml | 2 +- src/main/main.cpp | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/main.qml b/main.qml index 58483adb..608e6bd7 100644 --- a/main.qml +++ b/main.qml @@ -2186,7 +2186,7 @@ ApplicationWindow { function getBuildTag() { if (isMac) { - return "mac-x64"; + return isARM ? "mac-armv8" : "mac-x64"; } if (isWindows) { return oshelper.installed ? "install-win-x64" : "win-x64"; diff --git a/src/main/main.cpp b/src/main/main.cpp index 8be5071a..b2fc944c 100644 --- a/src/main/main.cpp +++ b/src/main/main.cpp @@ -156,6 +156,7 @@ bool isLinux = false; bool isTails = false; bool isDesktop = false; bool isOpenGL = true; +bool isARM = false; int main(int argc, char *argv[]) { @@ -177,6 +178,9 @@ int main(int argc, char *argv[]) #elif defined(Q_OS_MAC) bool isMac = true; #endif +#if defined(__aarch64__) + bool isARM = true; +#endif // detect low graphics mode (start-low-graphics-mode.bat) if(qgetenv("QMLSCENE_DEVICE") == "softwarecontext") @@ -483,6 +487,7 @@ Verify update binary using 'shasum'-compatible (SHA256 algo) output signed by tw engine.rootContext()->setContextProperty("isAndroid", isAndroid); engine.rootContext()->setContextProperty("isOpenGL", isOpenGL); engine.rootContext()->setContextProperty("isTails", isTails); + engine.rootContext()->setContextProperty("isARM", isARM); engine.rootContext()->setContextProperty("screenAvailableWidth", screenAvailableSize.width()); engine.rootContext()->setContextProperty("screenAvailableHeight", screenAvailableSize.height());