diff --git a/BUILDS.md b/BUILDS.md index 898e7c50..195ffd62 100644 --- a/BUILDS.md +++ b/BUILDS.md @@ -3,14 +3,14 @@ ## Prerequisites * 64-bit OS: - the go-rfc5322 module cannot currently be compiled for 32-bit OSes -* Go 1.23.4 +* Go 1.24.0 * Bash with basic build utils: make, gcc, sed, find, grep, ... - For Windows, it is recommended to use MinGW 64bit shell from [MSYS2](https://www.msys2.org/) * GCC (Linux), msvc (Windows) or Xcode (macOS) * Windres (Windows) * libglvnd and libsecret development files (Linux) * pkg-config (Linux) -* cmake, ninja-build and Qt 6.4.3 are required to build the graphical user interface. On Linux, +* cmake, ninja-build and Qt 6.8.2 are required to build the graphical user interface. On Linux, the Mesa OpenGL development files are also needed. To enable the sending of crash reports using Sentry please set the @@ -19,7 +19,7 @@ Otherwise, the sending of crash reports will be disabled. ## Build In order to build Bridge app with Qt interface we are using -[Qt 6.4.3](https://doc.qt.io/qt-6/gettingstarted.html). +[Qt 6.8.2](https://doc.qt.io/qt-6/gettingstarted.html). Please note that qmake path must be in your `PATH` to ensure Qt to be found. Also, before you start build **on Windows**, please unset the `MSYSTEM` variable diff --git a/Makefile b/Makefile index 82cf06c3..56cbf329 100644 --- a/Makefile +++ b/Makefile @@ -189,7 +189,7 @@ ${RESOURCE_FILE}: ./dist/info.rc ./dist/${SRC_ICO} .FORCE ## Dev dependencies .PHONY: install-devel-tools install-linter install-go-mod-outdated install-git-hooks -LINTVER:="v1.61.0" +LINTVER:="v1.64.6" LINTSRC:="https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh" install-dev-dependencies: install-devel-tools install-linter install-go-mod-outdated diff --git a/go.mod b/go.mod index 2f202cad..e45682b5 100644 --- a/go.mod +++ b/go.mod @@ -1,8 +1,8 @@ module github.com/ProtonMail/proton-bridge/v3 -go 1.23 +go 1.24 -toolchain go1.23.4 +toolchain go1.24.0 require ( github.com/0xAX/notificator v0.0.0-20220220101646-ee9b8921e557 diff --git a/internal/bridge/bridge.go b/internal/bridge/bridge.go index 72cb7b2e..f5cab833 100644 --- a/internal/bridge/bridge.go +++ b/internal/bridge/bridge.go @@ -720,13 +720,13 @@ func (bridge *Bridge) verifyUsernameChange() { func GetUpdatedCachePath(gluonDBPath, gluonCachePath string) string { // If gluon cache is moved to an external drive; regex find will fail; as is expected cachePathMatches := usernameChangeRegex.FindStringSubmatch(gluonCachePath) - if cachePathMatches == nil || len(cachePathMatches) < 2 { + if len(cachePathMatches) < 2 { return "" } cacheUsername := cachePathMatches[1] dbPathMatches := usernameChangeRegex.FindStringSubmatch(gluonDBPath) - if dbPathMatches == nil || len(dbPathMatches) < 2 { + if len(dbPathMatches) < 2 { return "" } diff --git a/internal/frontend/bridge-gui/bridge-gui/DeployDarwin.cmake b/internal/frontend/bridge-gui/bridge-gui/DeployDarwin.cmake index ce32255b..49568f08 100644 --- a/internal/frontend/bridge-gui/bridge-gui/DeployDarwin.cmake +++ b/internal/frontend/bridge-gui/bridge-gui/DeployDarwin.cmake @@ -24,15 +24,33 @@ cmake_minimum_required(VERSION 3.22) install(SCRIPT ${deploy_script}) # QML -install(DIRECTORY "${QT_DIR}/qml/Qt" - DESTINATION "${CMAKE_INSTALL_PREFIX}/bridge-gui.app/Contents/MacOS") +install(DIRECTORY "${QT_DIR}/qml/Qt/labs/platform" + DESTINATION "${CMAKE_INSTALL_PREFIX}/bridge-gui.app/Contents/MacOS/Qt/labs") install(DIRECTORY "${QT_DIR}/qml/QtQml" DESTINATION "${CMAKE_INSTALL_PREFIX}/bridge-gui.app/Contents/MacOS") install(DIRECTORY "${QT_DIR}/qml/QtQuick" - DESTINATION "${CMAKE_INSTALL_PREFIX}/bridge-gui.app/Contents/MacOS") + DESTINATION "${CMAKE_INSTALL_PREFIX}/bridge-gui.app/Contents/MacOS" + PATTERN "VirtualKeyboard" EXCLUDE + PATTERN "Effects" EXCLUDE + PATTERN "LocalStorage" EXCLUDE + PATTERN "NativeStyle" EXCLUDE + PATTERN "Particles" EXCLUDE + PATTERN "Scene2D" EXCLUDE + PATTERN "Scene3D" EXCLUDE + PATTERN "Shapes" EXCLUDE + PATTERN "Timeline" EXCLUDE + PATTERN "VectorImage" EXCLUDE + + PATTERN "Controls/FluentWinUI3" EXCLUDE + PATTERN "Controls/designer" EXCLUDE + PATTERN "Controls/Fusion" EXCLUDE + PATTERN "Controls/Imagine" EXCLUDE + PATTERN "Controls/Material" EXCLUDE + PATTERN "Controls/Universal" EXCLUDE + PATTERN "Controls/iOS" EXCLUDE + PATTERN "Controls/macOS" EXCLUDE) + # FRAMEWORKS -install(DIRECTORY "${QT_DIR}/lib/QtQmlWorkerScript.framework" - DESTINATION "${CMAKE_INSTALL_PREFIX}/bridge-gui.app/Contents/Frameworks") install(DIRECTORY "${QT_DIR}/lib/QtQuickControls2Impl.framework" DESTINATION "${CMAKE_INSTALL_PREFIX}/bridge-gui.app/Contents/Frameworks") install(DIRECTORY "${QT_DIR}/lib/QtQuickLayouts.framework" @@ -43,6 +61,14 @@ install(DIRECTORY "${QT_DIR}/lib/QtQuickDialogs2QuickImpl.framework" DESTINATION "${CMAKE_INSTALL_PREFIX}/bridge-gui.app/Contents/Frameworks") install(DIRECTORY "${QT_DIR}/lib/QtQuickDialogs2Utils.framework" DESTINATION "${CMAKE_INSTALL_PREFIX}/bridge-gui.app/Contents/Frameworks") +# ADDITIONAL FRAMEWORKS FOR Qt 6.8 +install(DIRECTORY "${QT_DIR}/lib/QtQuickControls2Basic.framework" + DESTINATION "${CMAKE_INSTALL_PREFIX}/bridge-gui.app/Contents/Frameworks") +install(DIRECTORY "${QT_DIR}/lib/QtLabsPlatform.framework" + DESTINATION "${CMAKE_INSTALL_PREFIX}/bridge-gui.app/Contents/Frameworks") +install(DIRECTORY "${QT_DIR}/lib/QtQuickControls2BasicStyleImpl.framework" + DESTINATION "${CMAKE_INSTALL_PREFIX}/bridge-gui.app/Contents/Frameworks") + # PLUGINS install(FILES "${QT_DIR}/plugins/imageformats/libqsvg.dylib" DESTINATION "${CMAKE_INSTALL_PREFIX}/bridge-gui.app/Contents/PlugIns/imageformats") diff --git a/internal/frontend/bridge-gui/bridge-gui/DeployLinux.cmake b/internal/frontend/bridge-gui/bridge-gui/DeployLinux.cmake index 10e1ea16..c55cf3ca 100644 --- a/internal/frontend/bridge-gui/bridge-gui/DeployLinux.cmake +++ b/internal/frontend/bridge-gui/bridge-gui/DeployLinux.cmake @@ -54,9 +54,9 @@ AppendQt6Lib("libQt6Gui.so.6") AppendQt6Lib("libQt6Core.so.6") AppendQt6Lib("libQt6QuickTemplates2.so.6") AppendQt6Lib("libQt6DBus.so.6") -AppendQt6Lib("libicui18n.so.56") -AppendQt6Lib("libicuuc.so.56") -AppendQt6Lib("libicudata.so.56") +AppendQt6Lib("libicui18n.so.73") +AppendQt6Lib("libicuuc.so.73") +AppendQt6Lib("libicudata.so.73") AppendQt6Lib("libQt6XcbQpa.so.6") AppendQt6Lib("libQt6WaylandClient.so.6") AppendQt6Lib("libQt6WlShellIntegration.so.6") @@ -68,6 +68,10 @@ AppendQt6Lib("libQt6PrintSupport.so.6") AppendQt6Lib("libQt6Xml.so.6") AppendQt6Lib("libQt6OpenGLWidgets.so.6") AppendQt6Lib("libQt6QuickWidgets.so.6") +AppendQt6Lib("libQt6QmlMeta.so.6") +AppendQt6Lib("libQt6LabsPlatform.so.6") +AppendQt6Lib("libQt6QuickControls2Basic.so.6") +AppendQt6Lib("libQt6QuickControls2BasicStyleImpl.so.6") # QML dependencies AppendQt6Lib("libQt6QmlWorkerScript.so.6") diff --git a/internal/frontend/bridge-gui/bridge-gui/DeployWindows.cmake b/internal/frontend/bridge-gui/bridge-gui/DeployWindows.cmake index 9fb8038c..b86c604c 100644 --- a/internal/frontend/bridge-gui/bridge-gui/DeployWindows.cmake +++ b/internal/frontend/bridge-gui/bridge-gui/DeployWindows.cmake @@ -57,20 +57,36 @@ AppendVCPKGLib("re2.dll") AppendVCPKGLib("sentry.dll") AppendVCPKGLib("zlib1.dll") # QML DLLs -AppendQt6Lib("Qt6QmlWorkerScript.dll") AppendQt6Lib("Qt6Widgets.dll") AppendQt6Lib("Qt6QuickControls2Impl.dll") AppendQt6Lib("Qt6QuickLayouts.dll") AppendQt6Lib("Qt6QuickDialogs2.dll") AppendQt6Lib("Qt6QuickDialogs2QuickImpl.dll") AppendQt6Lib("Qt6QuickDialogs2Utils.dll") +AppendQt6Lib("Qt6LabsPlatform.dll") +AppendQt6Lib("Qt6QuickControls2.dll") +AppendQt6Lib("Qt6QuickControls2Basic.dll") install(FILES ${DEPLOY_LIBS} DESTINATION "${CMAKE_INSTALL_PREFIX}") # QML PlugIns install(DIRECTORY ${QT_DIR}/qml/Qt/labs/platform DESTINATION "${CMAKE_INSTALL_PREFIX}/Qt/labs/") install(DIRECTORY ${QT_DIR}/qml/QtQml DESTINATION "${CMAKE_INSTALL_PREFIX}") -install(DIRECTORY ${QT_DIR}/qml/QtQuick DESTINATION "${CMAKE_INSTALL_PREFIX}") +install(DIRECTORY ${QT_DIR}/qml/QtQuick DESTINATION "${CMAKE_INSTALL_PREFIX}" + PATTERN "Effects" EXCLUDE + PATTERN "LocalStorage" EXCLUDE + PATTERN "NativeStyle" EXCLUDE + PATTERN "Particles" EXCLUDE + PATTERN "Shapes" EXCLUDE + PATTERN "VectorImage" EXCLUDE + + PATTERN "Controls/designer" EXCLUDE + PATTERN "Controls/FluentWinUI3" EXCLUDE + PATTERN "Controls/Fusion" EXCLUDE + PATTERN "Controls/Imagine" EXCLUDE + PATTERN "Controls/Material" EXCLUDE + PATTERN "Controls/Universal" EXCLUDE + PATTERN "Controls/Windows" EXCLUDE) # crash handler utils install(PROGRAMS "${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/tools/sentry-native/crashpad_handler.exe" DESTINATION "${CMAKE_INSTALL_PREFIX}") diff --git a/internal/frontend/bridge-gui/bridge-gui/qml/ConfigurationItem.qml b/internal/frontend/bridge-gui/bridge-gui/qml/ConfigurationItem.qml index 1639ea03..625aa17f 100644 --- a/internal/frontend/bridge-gui/bridge-gui/qml/ConfigurationItem.qml +++ b/internal/frontend/bridge-gui/bridge-gui/qml/ConfigurationItem.qml @@ -58,9 +58,9 @@ Item { } ColorImage { color: root.colorScheme.text_norm - height: root.colorScheme.body_font_size + height: ProtonStyle.body_font_size source: "/qml/icons/ic-copy.svg" - sourceSize.height: root.colorScheme.body_font_size + sourceSize.height: ProtonStyle.body_font_size MouseArea { anchors.fill: parent diff --git a/internal/frontend/bridge-gui/bridge-gui/qml/GeneralSettings.qml b/internal/frontend/bridge-gui/bridge-gui/qml/GeneralSettings.qml index 19d72c3e..05c467cd 100644 --- a/internal/frontend/bridge-gui/bridge-gui/qml/GeneralSettings.qml +++ b/internal/frontend/bridge-gui/bridge-gui/qml/GeneralSettings.qml @@ -86,9 +86,9 @@ SettingsView { ColorImage { Layout.alignment: Qt.AlignCenter color: root.colorScheme.interaction_norm - height: root.colorScheme.body_font_size + height: ProtonStyle.body_font_size source: root._isAdvancedShown ? "/qml/icons/ic-chevron-down.svg" : "/qml/icons/ic-chevron-right.svg" - sourceSize.height: root.colorScheme.body_font_size + sourceSize.height: ProtonStyle.body_font_size MouseArea { anchors.fill: parent diff --git a/internal/frontend/bridge-gui/bridge-gui/qml/Proton/Toggle.qml b/internal/frontend/bridge-gui/bridge-gui/qml/Proton/Toggle.qml index 468886dd..249b1098 100644 --- a/internal/frontend/bridge-gui/bridge-gui/qml/Proton/Toggle.qml +++ b/internal/frontend/bridge-gui/bridge-gui/qml/Proton/Toggle.qml @@ -72,9 +72,9 @@ Item { ColorImage { anchors.centerIn: parent color: root.colorScheme.background_norm - height: root.colorScheme.body_font_size + height: ProtonStyle.body_font_size source: "/qml/icons/ic-check.svg" - sourceSize.height: root.colorScheme.body_font_size + sourceSize.height: ProtonStyle.body_font_size visible: root.checked } } @@ -82,9 +82,9 @@ Item { id: loader anchors.centerIn: parent color: root.colorScheme.text_norm - height: root.colorScheme.body_font_size + height: ProtonStyle.body_font_size source: "/qml/icons/Loader_16.svg" - sourceSize.height: root.colorScheme.body_font_size + sourceSize.height: ProtonStyle.body_font_size visible: root.loading RotationAnimation { diff --git a/internal/logging/pruning.go b/internal/logging/pruning.go index eb0b6d62..4f3108a8 100644 --- a/internal/logging/pruning.go +++ b/internal/logging/pruning.go @@ -212,7 +212,7 @@ func buildSessionInfoList(dir string) (map[SessionID]*sessionInfo, error) { } rx := regexp.MustCompile(`^(\d{8}_\d{9})_.*\.log$`) match := rx.FindStringSubmatch(entry.Name()) - if match == nil || len(match) < 2 { + if len(match) < 2 { continue } diff --git a/utils/credits.sh b/utils/credits.sh index 270fe30b..eedf4b44 100755 --- a/utils/credits.sh +++ b/utils/credits.sh @@ -30,7 +30,7 @@ egrep $'^\t[^=>]*$' $LOCKFILE | sed -r 's/\t([^ ]*) v.*/\1/g' > $TEMPFILE1 egrep $'^\t.*=>.*v.*$' $LOCKFILE | sed -r 's/^.*=> ([^ ]*)( v.*)?/\1/g' >> $TEMPFILE1 cat $TEMPFILE1 | egrep -v 'therecipe/qt/internal|therecipe/env_.*_512|protontech' | sort | uniq > $TEMPFILE2 # Add non vendor credits -echo -e "\nQt 6.4.3 by Qt group\n" >> $TEMPFILE2 +echo -e "\nQt 6.8.2 by Qt group\n" >> $TEMPFILE2 # join lines sed -i -e ':a' -e 'N' -e '$!ba' -e 's|\n|;|g' $TEMPFILE2