diff --git a/Makefile b/Makefile index 03dba515d..b4d331b72 100644 --- a/Makefile +++ b/Makefile @@ -531,6 +531,12 @@ endif NIM_SOURCES := .update.timestamp $(shell find src -type f) +STATUS_RC_FILE := status.rc + +# Building the resource files for windows to set the icon +compile_windows_resources: + windres $(STATUS_RC_FILE) -o status.o + ifeq ($(detected_OS),Windows) NIM_STATUS_CLIENT := bin/nim_status_client.exe else @@ -735,7 +741,7 @@ STATUS_CLIENT_7Z ?= pkg/Status.7z $(STATUS_CLIENT_EXE): override RESOURCES_LAYOUT := $(PRODUCTION_PARAMETERS) $(STATUS_CLIENT_EXE): OUTPUT := tmp/windows/dist/Status $(STATUS_CLIENT_EXE): INSTALLER_OUTPUT := pkg -$(STATUS_CLIENT_EXE): nim_status_client nim_windows_launcher $(NIM_WINDOWS_PREBUILT_DLLS) +$(STATUS_CLIENT_EXE): compile_windows_resources nim_status_client nim_windows_launcher $(NIM_WINDOWS_PREBUILT_DLLS) rm -rf pkg/*.exe tmp/windows/dist mkdir -p $(OUTPUT)/bin $(OUTPUT)/resources $(OUTPUT)/vendor $(OUTPUT)/resources/i18n $(OUTPUT)/bin/StatusQ cat windows-install.txt | unix2dos > $(OUTPUT)/INSTALL.txt @@ -824,7 +830,8 @@ run-macos: nim_status_client echo -e "\033[92mRunning:\033[39m bin/StatusDev.app/Contents/MacOS/nim_status_client" ./bin/StatusDev.app/Contents/MacOS/nim_status_client $(ARGS) -run-windows: nim_status_client $(NIM_WINDOWS_PREBUILT_DLLS) +run-windows: STATUS_RC_FILE = status-dev.rc +run-windows: compile_windows_resources nim_status_client $(NIM_WINDOWS_PREBUILT_DLLS) echo -e "\033[92mRunning:\033[39m bin/nim_status_client.exe" PATH="$(DOTHERSIDE_LIBDIR)":"$(STATUSGO_LIBDIR)":"$(STATUSKEYCARDGO_LIBDIR)":"$(shell pwd)"/"$(shell dirname "$(NIM_WINDOWS_PREBUILT_DLLS)")":"$(PATH)" \ ./bin/nim_status_client.exe $(ARGS) diff --git a/src/nim_status_client.nim b/src/nim_status_client.nim index 2f1736109..338f695bc 100644 --- a/src/nim_status_client.nim +++ b/src/nim_status_client.nim @@ -12,6 +12,9 @@ import app/boot/app_controller when defined(macosx) and defined(arm64): import posix +when defined(windows): + {.link: "../status.o".} + logScope: topics = "status-app" @@ -32,18 +35,14 @@ proc determineOpenUri(): string = result = OPENURI proc determineStatusAppIconPath(): string = + if main_constants.IS_MACOS or defined(windows): + return "" # not used in macOS and Windows + + # update the linux icon if defined(production): - if main_constants.IS_MACOS: - return "" # not used in macOS - elif defined(windows): - return "/../resources/status.png" - else: - return "/../status.png" - else: - if main_constants.IS_MACOS: - return "" # not used in macOS - else: - return "/../status-dev.png" + return "/../status.png" + + return "/../status-dev.png" proc prepareLogging() = # Outputs logs in the node tab diff --git a/status-dev.icns b/status-dev.icns index cf37b5046..1d8abef90 100644 Binary files a/status-dev.icns and b/status-dev.icns differ diff --git a/status-dev.ico b/status-dev.ico new file mode 100644 index 000000000..8b7d774a0 Binary files /dev/null and b/status-dev.ico differ diff --git a/status-dev.png b/status-dev.png index 5bb01d3c9..61c659543 100644 Binary files a/status-dev.png and b/status-dev.png differ diff --git a/status-dev.rc b/status-dev.rc new file mode 100644 index 000000000..46c94891a --- /dev/null +++ b/status-dev.rc @@ -0,0 +1 @@ +IDI_ICON1 ICON "status-dev.ico" \ No newline at end of file diff --git a/status-macos-dev.svg b/status-macos-dev.svg deleted file mode 100644 index 47e84c9d3..000000000 --- a/status-macos-dev.svg +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/status-macos.ico b/status-macos.ico deleted file mode 100644 index 9a517eb97..000000000 Binary files a/status-macos.ico and /dev/null differ diff --git a/status-macos.svg b/status-macos.svg index 70e319e8a..584472056 100644 --- a/status-macos.svg +++ b/status-macos.svg @@ -1,47 +1,75 @@ - - - - + + + + + + + - - - + + + - - + + - - + + - - + + - + - + + + + + + + + + + + + + + + + + + + + + + - + - + - + - + - + - + - + - - + + + + + + diff --git a/status.icns b/status.icns index 4f3960e7a..9942b5a0e 100644 Binary files a/status.icns and b/status.icns differ diff --git a/status.ico b/status.ico index 9a517eb97..238b260ef 100644 Binary files a/status.ico and b/status.ico differ diff --git a/status.png b/status.png index 22b745fbc..be8ad3057 100644 Binary files a/status.png and b/status.png differ diff --git a/status.rc b/status.rc new file mode 100644 index 000000000..855f43240 --- /dev/null +++ b/status.rc @@ -0,0 +1 @@ +IDI_ICON1 ICON "status.ico" \ No newline at end of file diff --git a/ui/imports/assets/icons/status-logo-dev.svg b/ui/imports/assets/icons/status-logo-dev.svg new file mode 100644 index 000000000..bfaca4cc9 --- /dev/null +++ b/ui/imports/assets/icons/status-logo-dev.svg @@ -0,0 +1,75 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ui/imports/assets/icons/status-logo.svg b/ui/imports/assets/icons/status-logo.svg new file mode 100644 index 000000000..9d2447b93 --- /dev/null +++ b/ui/imports/assets/icons/status-logo.svg @@ -0,0 +1,75 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +