From 2a078b76e6ec4ec9aeee6eab491e47832046e349 Mon Sep 17 00:00:00 2001 From: James Houlahan Date: Mon, 15 Feb 2021 14:32:09 +0100 Subject: [PATCH] GODT-1045 build without Qt by default --- Makefile | 14 +++++++------- internal/frontend/qt-common/account_model.go | 2 +- internal/frontend/qt-common/accounts.go | 2 +- internal/frontend/qt-common/common.cpp | 2 +- internal/frontend/qt-common/common.go | 2 +- internal/frontend/qt-common/notification.go | 2 +- internal/frontend/qt-ie/enums.go | 2 +- internal/frontend/qt-ie/error_list.go | 2 +- internal/frontend/qt-ie/export.go | 2 +- internal/frontend/qt-ie/folder_functions.go | 2 +- internal/frontend/qt-ie/folder_structure.go | 2 +- internal/frontend/qt-ie/folder_structure_test.go | 2 +- internal/frontend/qt-ie/frontend.go | 2 +- internal/frontend/qt-ie/frontend_nogui.go | 2 +- internal/frontend/qt-ie/import.go | 2 +- internal/frontend/qt-ie/mbox.go | 2 +- internal/frontend/qt-ie/notification.go | 2 +- internal/frontend/qt-ie/path_status.go | 2 +- internal/frontend/qt-ie/transfer_rules.go | 2 +- internal/frontend/qt-ie/ui.go | 2 +- internal/frontend/qt/accountModel.go | 2 +- internal/frontend/qt/accounts.go | 2 +- internal/frontend/qt/frontend.go | 2 +- internal/frontend/qt/frontend_nogui.go | 2 +- internal/frontend/qt/helpers.go | 2 +- internal/frontend/qt/notification.go | 2 +- internal/frontend/qt/systray.go | 2 +- internal/frontend/qt/ui.go | 2 +- 28 files changed, 34 insertions(+), 34 deletions(-) diff --git a/Makefile b/Makefile index 2792a322..6439e817 100644 --- a/Makefile +++ b/Makefile @@ -33,7 +33,7 @@ BUILD_TIME:=$(shell date +%FT%T%z) BUILD_FLAGS:=-tags='${BUILD_TAGS}' BUILD_FLAGS_LAUNCHER:=${BUILD_FLAGS} -BUILD_FLAGS_NOGUI:=-tags='${BUILD_TAGS} nogui' +BUILD_FLAGS_GUI:=-tags='${BUILD_TAGS} build_qt' GO_LDFLAGS:=$(addprefix -X github.com/ProtonMail/proton-bridge/internal/constants.,Version=${APP_VERSION} Revision=${REVISION} BuildTime=${BUILD_TIME}) ifneq "${BUILD_LDFLAGS}" "" GO_LDFLAGS+=${BUILD_LDFLAGS} @@ -45,7 +45,7 @@ ifeq "${TARGET_OS}" "windows" endif BUILD_FLAGS+=-ldflags '${GO_LDFLAGS}' -BUILD_FLAGS_NOGUI+=-ldflags '${GO_LDFLAGS}' +BUILD_FLAGS_GUI+=-ldflags '${GO_LDFLAGS}' BUILD_FLAGS_LAUNCHER+=-ldflags '${GO_LDFLAGS_LAUNCHER}' DEPLOY_DIR:=cmd/${TARGET_CMD}/deploy @@ -84,7 +84,7 @@ build-ie: TARGET_CMD=Import-Export $(MAKE) build build-nogui: gofiles - go build ${BUILD_FLAGS_NOGUI} -o ${EXE_NAME} cmd/${TARGET_CMD}/main.go + go build ${BUILD_FLAGS} -o ${EXE_NAME} cmd/${TARGET_CMD}/main.go build-ie-nogui: TARGET_CMD=Import-Export $(MAKE) build-nogui @@ -137,7 +137,7 @@ endif ${EXE_TARGET}: check-has-go gofiles ${ICO_FILES} ${VENDOR_TARGET} rm -rf deploy ${TARGET_OS} ${DEPLOY_DIR} cp cmd/${TARGET_CMD}/main.go . - qtdeploy ${BUILD_FLAGS} ${QT_BUILD_TARGET} + qtdeploy ${BUILD_FLAGS_GUI} ${QT_BUILD_TARGET} mv deploy cmd/${TARGET_CMD} if [ "${EXE_QT_TARGET}" != "${EXE_TARGET}" ]; then mv ${EXE_QT_TARGET} ${EXE_TARGET}; fi rm -rf ${TARGET_OS} main.go @@ -303,12 +303,12 @@ run-qt-cli: ${EXE_TARGET} PROTONMAIL_ENV=dev ./$< ${RUN_FLAGS} -c run-nogui: clean-vendor gofiles - PROTONMAIL_ENV=dev go run ${BUILD_FLAGS_NOGUI} cmd/${TARGET_CMD}/main.go ${RUN_FLAGS} | tee last.log + PROTONMAIL_ENV=dev go run ${BUILD_FLAGS} cmd/${TARGET_CMD}/main.go ${RUN_FLAGS} | tee last.log run-nogui-cli: clean-vendor gofiles - PROTONMAIL_ENV=dev go run ${BUILD_FLAGS_NOGUI} cmd/${TARGET_CMD}/main.go ${RUN_FLAGS} -c + PROTONMAIL_ENV=dev go run ${BUILD_FLAGS} cmd/${TARGET_CMD}/main.go ${RUN_FLAGS} -c run-debug: - PROTONMAIL_ENV=dev dlv debug --build-flags "${BUILD_FLAGS_NOGUI}" cmd/${TARGET_CMD}/main.go -- ${RUN_FLAGS} + PROTONMAIL_ENV=dev dlv debug --build-flags "${BUILD_FLAGS}" cmd/${TARGET_CMD}/main.go -- ${RUN_FLAGS} run-qml-preview: $(MAKE) -C internal/frontend/qt -f Makefile.local qmlpreview diff --git a/internal/frontend/qt-common/account_model.go b/internal/frontend/qt-common/account_model.go index 0a46c738..81538b12 100644 --- a/internal/frontend/qt-common/account_model.go +++ b/internal/frontend/qt-common/account_model.go @@ -15,7 +15,7 @@ // You should have received a copy of the GNU General Public License // along with ProtonMail Bridge. If not, see . -// +build !nogui +// +build build_qt package qtcommon diff --git a/internal/frontend/qt-common/accounts.go b/internal/frontend/qt-common/accounts.go index be05a186..551ac44b 100644 --- a/internal/frontend/qt-common/accounts.go +++ b/internal/frontend/qt-common/accounts.go @@ -15,7 +15,7 @@ // You should have received a copy of the GNU General Public License // along with ProtonMail Bridge. If not, see . -// +build !nogui +// +build build_qt package qtcommon diff --git a/internal/frontend/qt-common/common.cpp b/internal/frontend/qt-common/common.cpp index e29545a6..79091f0e 100644 --- a/internal/frontend/qt-common/common.cpp +++ b/internal/frontend/qt-common/common.cpp @@ -1,4 +1,4 @@ -// +build !nogui +// +build build_qt #include "common.h" #include "_cgo_export.h" diff --git a/internal/frontend/qt-common/common.go b/internal/frontend/qt-common/common.go index 4599ed1e..37eb57b1 100644 --- a/internal/frontend/qt-common/common.go +++ b/internal/frontend/qt-common/common.go @@ -15,7 +15,7 @@ // You should have received a copy of the GNU General Public License // along with ProtonMail Bridge. If not, see . -// +build !nogui +// +build build_qt package qtcommon diff --git a/internal/frontend/qt-common/notification.go b/internal/frontend/qt-common/notification.go index 2c20eef5..869989db 100644 --- a/internal/frontend/qt-common/notification.go +++ b/internal/frontend/qt-common/notification.go @@ -15,7 +15,7 @@ // You should have received a copy of the GNU General Public License // along with ProtonMail Bridge. If not, see . -// +build !nogui +// +build build_qt package qtcommon diff --git a/internal/frontend/qt-ie/enums.go b/internal/frontend/qt-ie/enums.go index 44d1a91d..72eaa622 100644 --- a/internal/frontend/qt-ie/enums.go +++ b/internal/frontend/qt-ie/enums.go @@ -15,7 +15,7 @@ // You should have received a copy of the GNU General Public License // along with ProtonMail Bridge. If not, see . -// +build !nogui +// +build build_qt package qtie diff --git a/internal/frontend/qt-ie/error_list.go b/internal/frontend/qt-ie/error_list.go index 5e14b502..2012b3ac 100644 --- a/internal/frontend/qt-ie/error_list.go +++ b/internal/frontend/qt-ie/error_list.go @@ -15,7 +15,7 @@ // You should have received a copy of the GNU General Public License // along with ProtonMail Bridge. If not, see . -// +build !nogui +// +build build_qt package qtie diff --git a/internal/frontend/qt-ie/export.go b/internal/frontend/qt-ie/export.go index 7a3bdef3..ba2ec17c 100644 --- a/internal/frontend/qt-ie/export.go +++ b/internal/frontend/qt-ie/export.go @@ -15,7 +15,7 @@ // You should have received a copy of the GNU General Public License // along with ProtonMail Bridge. If not, see . -// +build !nogui +// +build build_qt package qtie diff --git a/internal/frontend/qt-ie/folder_functions.go b/internal/frontend/qt-ie/folder_functions.go index aada38a8..199f34bd 100644 --- a/internal/frontend/qt-ie/folder_functions.go +++ b/internal/frontend/qt-ie/folder_functions.go @@ -15,7 +15,7 @@ // You should have received a copy of the GNU General Public License // along with ProtonMail Bridge. If not, see . -// +build !nogui +// +build build_qt package qtie diff --git a/internal/frontend/qt-ie/folder_structure.go b/internal/frontend/qt-ie/folder_structure.go index c546ffca..8f6d18db 100644 --- a/internal/frontend/qt-ie/folder_structure.go +++ b/internal/frontend/qt-ie/folder_structure.go @@ -15,7 +15,7 @@ // You should have received a copy of the GNU General Public License // along with ProtonMail Bridge. If not, see . -// +build !nogui +// +build build_qt package qtie diff --git a/internal/frontend/qt-ie/folder_structure_test.go b/internal/frontend/qt-ie/folder_structure_test.go index 0fc82f8f..5ffbdbdd 100644 --- a/internal/frontend/qt-ie/folder_structure_test.go +++ b/internal/frontend/qt-ie/folder_structure_test.go @@ -15,7 +15,7 @@ // You should have received a copy of the GNU General Public License // along with ProtonMail Bridge. If not, see . -// +build !nogui +// +build build_qt package qtie diff --git a/internal/frontend/qt-ie/frontend.go b/internal/frontend/qt-ie/frontend.go index 39b9ed8b..42f1476a 100644 --- a/internal/frontend/qt-ie/frontend.go +++ b/internal/frontend/qt-ie/frontend.go @@ -15,7 +15,7 @@ // You should have received a copy of the GNU General Public License // along with ProtonMail Bridge. If not, see . -// +build !nogui +// +build build_qt package qtie diff --git a/internal/frontend/qt-ie/frontend_nogui.go b/internal/frontend/qt-ie/frontend_nogui.go index b144f8ce..b70a1583 100644 --- a/internal/frontend/qt-ie/frontend_nogui.go +++ b/internal/frontend/qt-ie/frontend_nogui.go @@ -15,7 +15,7 @@ // You should have received a copy of the GNU General Public License // along with ProtonMail Bridge. If not, see . -// +build nogui +// +build !build_qt package qtie diff --git a/internal/frontend/qt-ie/import.go b/internal/frontend/qt-ie/import.go index 1822f482..e72d38bb 100644 --- a/internal/frontend/qt-ie/import.go +++ b/internal/frontend/qt-ie/import.go @@ -15,7 +15,7 @@ // You should have received a copy of the GNU General Public License // along with ProtonMail Bridge. If not, see . -// +build !nogui +// +build build_qt package qtie diff --git a/internal/frontend/qt-ie/mbox.go b/internal/frontend/qt-ie/mbox.go index 3c11fe5f..89aadba4 100644 --- a/internal/frontend/qt-ie/mbox.go +++ b/internal/frontend/qt-ie/mbox.go @@ -16,7 +16,7 @@ // You should have received a copy of the GNU General Public License // along with ProtonMail Bridge. If not, see . -// +build !nogui +// +build build_qt package qtie diff --git a/internal/frontend/qt-ie/notification.go b/internal/frontend/qt-ie/notification.go index 2c0ab716..82b51902 100644 --- a/internal/frontend/qt-ie/notification.go +++ b/internal/frontend/qt-ie/notification.go @@ -15,7 +15,7 @@ // You should have received a copy of the GNU General Public License // along with ProtonMail Bridge. If not, see . -// +build !nogui +// +build build_qt package qtie diff --git a/internal/frontend/qt-ie/path_status.go b/internal/frontend/qt-ie/path_status.go index 28876344..70084304 100644 --- a/internal/frontend/qt-ie/path_status.go +++ b/internal/frontend/qt-ie/path_status.go @@ -15,7 +15,7 @@ // You should have received a copy of the GNU General Public License // along with ProtonMail Bridge. If not, see . -// +build !nogui +// +build build_qt package qtie diff --git a/internal/frontend/qt-ie/transfer_rules.go b/internal/frontend/qt-ie/transfer_rules.go index 9338bcce..574e6fff 100644 --- a/internal/frontend/qt-ie/transfer_rules.go +++ b/internal/frontend/qt-ie/transfer_rules.go @@ -15,7 +15,7 @@ // You should have received a copy of the GNU General Public License // along with ProtonMail Bridge. If not, see . -// +build !nogui +// +build build_qt package qtie diff --git a/internal/frontend/qt-ie/ui.go b/internal/frontend/qt-ie/ui.go index b5c42d01..2e0552a3 100644 --- a/internal/frontend/qt-ie/ui.go +++ b/internal/frontend/qt-ie/ui.go @@ -15,7 +15,7 @@ // You should have received a copy of the GNU General Public License // along with ProtonMail Bridge. If not, see . -// +build !nogui +// +build build_qt package qtie diff --git a/internal/frontend/qt/accountModel.go b/internal/frontend/qt/accountModel.go index 77663964..7f99efed 100644 --- a/internal/frontend/qt/accountModel.go +++ b/internal/frontend/qt/accountModel.go @@ -15,7 +15,7 @@ // You should have received a copy of the GNU General Public License // along with ProtonMail Bridge. If not, see . -// +build !nogui +// +build build_qt package qt diff --git a/internal/frontend/qt/accounts.go b/internal/frontend/qt/accounts.go index 296f6af6..56d1b463 100644 --- a/internal/frontend/qt/accounts.go +++ b/internal/frontend/qt/accounts.go @@ -15,7 +15,7 @@ // You should have received a copy of the GNU General Public License // along with ProtonMail Bridge. If not, see . -// +build !nogui +// +build build_qt package qt diff --git a/internal/frontend/qt/frontend.go b/internal/frontend/qt/frontend.go index e7d1a5ad..06c77c4f 100644 --- a/internal/frontend/qt/frontend.go +++ b/internal/frontend/qt/frontend.go @@ -15,7 +15,7 @@ // You should have received a copy of the GNU General Public License // along with ProtonMail Bridge. If not, see . -// +build !nogui +// +build build_qt // Package qt is the Qt User interface for Desktop bridge. // diff --git a/internal/frontend/qt/frontend_nogui.go b/internal/frontend/qt/frontend_nogui.go index 6db03ead..872c7ffd 100644 --- a/internal/frontend/qt/frontend_nogui.go +++ b/internal/frontend/qt/frontend_nogui.go @@ -15,7 +15,7 @@ // You should have received a copy of the GNU General Public License // along with ProtonMail Bridge. If not, see . -// +build nogui +// +build !build_qt package qt diff --git a/internal/frontend/qt/helpers.go b/internal/frontend/qt/helpers.go index 50b24538..1c02e73e 100644 --- a/internal/frontend/qt/helpers.go +++ b/internal/frontend/qt/helpers.go @@ -15,7 +15,7 @@ // You should have received a copy of the GNU General Public License // along with ProtonMail Bridge. If not, see . -// +build !nogui +// +build build_qt package qt diff --git a/internal/frontend/qt/notification.go b/internal/frontend/qt/notification.go index f92a5e05..84f3f664 100644 --- a/internal/frontend/qt/notification.go +++ b/internal/frontend/qt/notification.go @@ -15,7 +15,7 @@ // You should have received a copy of the GNU General Public License // along with ProtonMail Bridge. If not, see . -// +build !nogui +// +build build_qt package qt diff --git a/internal/frontend/qt/systray.go b/internal/frontend/qt/systray.go index 60f7ee00..efe6fa38 100644 --- a/internal/frontend/qt/systray.go +++ b/internal/frontend/qt/systray.go @@ -15,7 +15,7 @@ // You should have received a copy of the GNU General Public License // along with ProtonMail Bridge. If not, see . -// +build !nogui +// +build build_qt package qt diff --git a/internal/frontend/qt/ui.go b/internal/frontend/qt/ui.go index a99235a8..acb8d91b 100644 --- a/internal/frontend/qt/ui.go +++ b/internal/frontend/qt/ui.go @@ -15,7 +15,7 @@ // You should have received a copy of the GNU General Public License // along with ProtonMail Bridge. If not, see . -// +build !nogui +// +build build_qt package qt