fix(Makefile): Bugfixes and minor improvements (#10423)

This commit is contained in:
Igor Sirotin 2023-04-25 18:01:19 +03:00 committed by GitHub
parent e6f88758dc
commit 70e8370aae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 23 additions and 11 deletions

View File

@ -147,10 +147,10 @@ QML_DEBUG_PORT ?= 49152
ifneq ($(QML_DEBUG), false) ifneq ($(QML_DEBUG), false)
DOTHERSIDE_CMAKE_PARAMS := -DCMAKE_BUILD_TYPE=Debug -DQML_DEBUG_PORT=$(QML_DEBUG_PORT) DOTHERSIDE_CMAKE_PARAMS := -DCMAKE_BUILD_TYPE=Debug -DQML_DEBUG_PORT=$(QML_DEBUG_PORT)
DOTHERSIDE_BUILD_CMD := cmake --build . --config Debug $(HANDLE_OUTPUT) DOTHERSIDE_BUILD_CMD := cmake --build . --config Debug
else else
DOTHERSIDE_CMAKE_PARAMS := -DCMAKE_BUILD_TYPE=Release DOTHERSIDE_CMAKE_PARAMS := -DCMAKE_BUILD_TYPE=Release
DOTHERSIDE_BUILD_CMD := cmake --build . --config Release $(HANDLE_OUTPUT) DOTHERSIDE_BUILD_CMD := cmake --build . --config Release
endif endif
MONITORING ?= false MONITORING ?= false
@ -265,6 +265,7 @@ $(STATUSQ_CMAKE_CACHE): | deps
$(STATUSQ_CMAKE_CONFIG_PARAMS) \ $(STATUSQ_CMAKE_CONFIG_PARAMS) \
-B $(STATUSQ_BUILD_PATH) \ -B $(STATUSQ_BUILD_PATH) \
-S ui/StatusQ \ -S ui/StatusQ \
-Wno-dev \
$(HANDLE_OUTPUT) $(HANDLE_OUTPUT)
statusq-configure: | $(STATUSQ_CMAKE_CACHE) statusq-configure: | $(STATUSQ_CMAKE_CACHE)
@ -273,8 +274,7 @@ statusq-build: | statusq-configure
echo -e "\033[92mBuilding:\033[39m StatusQ" echo -e "\033[92mBuilding:\033[39m StatusQ"
cmake --build $(STATUSQ_BUILD_PATH) \ cmake --build $(STATUSQ_BUILD_PATH) \
--target StatusQ \ --target StatusQ \
--config Release --config Release \
-DCMAKE_BUILD_TYPE=Release \
$(HANDLE_OUTPUT) $(HANDLE_OUTPUT)
statusq-install: | statusq-build statusq-install: | statusq-build
@ -322,18 +322,29 @@ $(DOTHERSIDE): | deps
-DENABLE_DOCS=OFF \ -DENABLE_DOCS=OFF \
-DENABLE_TESTS=OFF \ -DENABLE_TESTS=OFF \
.. $(HANDLE_OUTPUT) && \ .. $(HANDLE_OUTPUT) && \
$(DOTHERSIDE_BUILD_CMD) $(DOTHERSIDE_BUILD_CMD) \
$(HANDLE_OUTPUT)
dotherside: $(DOTHERSIDE)
dotherside-clean:
$(MAKE) -C vendor/DOtherSide/build --no-print-directory clean
STATUSGO := vendor/status-go/build/bin/libstatus.$(LIBSTATUS_EXT) STATUSGO := vendor/status-go/build/bin/libstatus.$(LIBSTATUS_EXT)
STATUSGO_LIBDIR := $(shell pwd)/$(shell dirname "$(STATUSGO)") STATUSGO_LIBDIR := $(shell pwd)/$(shell dirname "$(STATUSGO)")
export STATUSGO_LIBDIR export STATUSGO_LIBDIR
status-go: $(STATUSGO)
$(STATUSGO): | deps $(STATUSGO): | deps
echo -e $(BUILD_MSG) "status-go" echo -e $(BUILD_MSG) "status-go"
+ cd vendor/status-go && \ + cd vendor/status-go && \
$(MAKE) statusgo-shared-library $(STATUSGO_MAKE_PARAMS) $(HANDLE_OUTPUT) $(MAKE) statusgo-shared-library $(STATUSGO_MAKE_PARAMS) $(HANDLE_OUTPUT)
status-go: $(STATUSGO)
status-go-clean:
echo -e "\033[92mCleaning:\033[39m status-go"
rm -f $(STATUSGO)
STATUSKEYCARDGO := vendor/status-keycard-go/build/libkeycard/libkeycard.$(LIBSTATUS_EXT) STATUSKEYCARDGO := vendor/status-keycard-go/build/libkeycard/libkeycard.$(LIBSTATUS_EXT)
STATUSKEYCARDGO_LIBDIR := $(shell pwd)/$(shell dirname "$(STATUSKEYCARDGO)") STATUSKEYCARDGO_LIBDIR := $(shell pwd)/$(shell dirname "$(STATUSKEYCARDGO)")
export STATUSKEYCARDGO_LIBDIR export STATUSKEYCARDGO_LIBDIR
@ -349,7 +360,7 @@ QRCODEGEN := vendor/QR-Code-generator/c/libqrcodegen.a
$(QRCODEGEN): | deps $(QRCODEGEN): | deps
echo -e $(BUILD_MSG) "QR-Code-generator" echo -e $(BUILD_MSG) "QR-Code-generator"
+ cd vendor/QR-Code-generator/c && \ + cd vendor/QR-Code-generator/c && \
$(MAKE) $(QRCODEGEN_MAKE_PARAMS) $(MAKE) $(QRCODEGEN_MAKE_PARAMS) $(HANDLE_OUTPUT)
FLEETS := fleets.json FLEETS := fleets.json
$(FLEETS): $(FLEETS):
@ -713,9 +724,8 @@ pkg-windows: check-pkg-target-windows $(STATUS_CLIENT_EXE)
zip-windows: check-pkg-target-windows $(STATUS_CLIENT_7Z) zip-windows: check-pkg-target-windows $(STATUS_CLIENT_7Z)
clean: | clean-common statusq-clean clean: | clean-common statusq-clean status-go-clean dotherside-clean
rm -rf bin/* node_modules bottles/* pkg/* tmp/* $(STATUSGO) $(STATUSKEYCARDGO) rm -rf bin/* node_modules bottles/* pkg/* tmp/* $(STATUSKEYCARDGO)
+ $(MAKE) -C vendor/DOtherSide/build --no-print-directory clean
+ $(MAKE) -C vendor/QR-Code-generator/c/ --no-print-directory clean + $(MAKE) -C vendor/QR-Code-generator/c/ --no-print-directory clean
clean-git: clean-git:

View File

@ -32,6 +32,9 @@ find_package(Qt5 COMPONENTS
add_subdirectory(../../vendor/SortFilterProxyModel SortFilterProxyModel) add_subdirectory(../../vendor/SortFilterProxyModel SortFilterProxyModel)
add_subdirectory(../../vendor/qzxing/src qzxing) add_subdirectory(../../vendor/qzxing/src qzxing)
target_compile_options(qzxing PRIVATE -w)
target_compile_options(SortFilterProxyModel PRIVATE -w)
### StatusQ library ### StatusQ library
### TODO: Move to a subdirectory for readability and better structure ### TODO: Move to a subdirectory for readability and better structure

View File

@ -216,6 +216,5 @@
<file>StatusQ/Controls/StatusLinkText.qml</file> <file>StatusQ/Controls/StatusLinkText.qml</file>
<file>StatusQ/Core/Utils/ModelChangeGuard.qml</file> <file>StatusQ/Core/Utils/ModelChangeGuard.qml</file>
<file>StatusQ/Core/Utils/StackViewStates.qml</file> <file>StatusQ/Core/Utils/StackViewStates.qml</file>
<file>StatusQ/Components/StatusDraggableListItem.qml</file>
</qresource> </qresource>
</RCC> </RCC>