diff --git a/Info.plist b/Info.plist index a78f4a27a9..b5e434afe3 100644 --- a/Info.plist +++ b/Info.plist @@ -7,7 +7,7 @@ CFBundleExecutable nim_status_client CFBundleIconFile - status-icon.icns + status.icns CFBundleIdentifier im.Status.NimStatusClient CFBundleInfoDictionaryVersion diff --git a/Info.runner.plist b/Info.runner.plist index 63fb11df6c..a410f99884 100644 --- a/Info.runner.plist +++ b/Info.runner.plist @@ -7,7 +7,7 @@ CFBundleExecutable nim_status_client.sh CFBundleIconFile - status-icon.icns + status.icns CFBundleIdentifier im.Status.NimStatusClient CFBundleInfoDictionaryVersion diff --git a/Makefile b/Makefile index 49d4f7a93e..64990e7370 100644 --- a/Makefile +++ b/Makefile @@ -310,7 +310,7 @@ $(STATUS_CLIENT_DMG): nim_status_client $(DMG_TOOL) cp bin/nim_status_client $(MACOS_OUTER_BUNDLE)/Contents/MacOS/ cp nim_status_client.sh $(MACOS_OUTER_BUNDLE)/Contents/MacOS/ chmod +x $(MACOS_OUTER_BUNDLE)/Contents/MacOS/nim_status_client.sh - cp status-icon.icns $(MACOS_OUTER_BUNDLE)/Contents/Resources/ + cp status.icns $(MACOS_OUTER_BUNDLE)/Contents/Resources/ cp status.svg $(MACOS_OUTER_BUNDLE)/Contents/ cp -R resources.rcc $(MACOS_OUTER_BUNDLE)/Contents/ cp -R $(FLEETS) $(MACOS_OUTER_BUNDLE)/Contents/ @@ -443,19 +443,17 @@ clean: | clean-common run: rcc $(RUN_TARGET) -STATUS_MACOS_DEV_ICON ?= tmp/macos/status-dev-icon.rsrc +ICON_TOOL := node_modules/.bin/fileicon + +$(ICON_TOOL): + echo -e "\e[92mInstalling:\e[39m fileicon" + npm i + NIM_STATUS_CLIENT_DEV ?= t STATUS_PORT ?= 30306 -$(STATUS_MACOS_DEV_ICON): - mkdir -p tmp/macos - cp status-dev-icon.icns tmp/macos/ - sips -i tmp/macos/status-dev-icon.icns - DeRez -only icns tmp/macos/status-dev-icon.icns > tmp/macos/status-dev-icon.rsrc - -set-status-macos-dev-icon: - Rez -append tmp/macos/status-dev-icon.rsrc -o bin/nim_status_client - SetFile -a C bin/nim_status_client +set-status-macos-dev-icon: $(ICON_TOOL) + npx fileicon set bin/nim_status_client status-dev.icns run-linux: echo -e "\e[92mRunning:\e[39m bin/nim_status_client" @@ -464,7 +462,7 @@ run-linux: STATUS_PORT="$(STATUS_PORT)" \ ./bin/nim_status_client -run-macos: $(STATUS_MACOS_DEV_ICON) set-status-macos-dev-icon +run-macos: set-status-macos-dev-icon echo -e "\e[92mRunning:\e[39m bin/nim_status_client" NIM_STATUS_CLIENT_DEV="$(NIM_STATUS_CLIENT_DEV)" \ STATUS_PORT="$(STATUS_PORT)" \ diff --git a/package-lock.json b/package-lock.json index 6b9ac21649..ec618588e5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -301,6 +301,12 @@ "strip-eof": "^1.0.0" } }, + "fileicon": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/fileicon/-/fileicon-0.2.4.tgz", + "integrity": "sha512-2gipEXOI2jvh6yp7FN/SZ5M67fbLknZ+Q3kizBQupe+4w12z51WnmCBiiGfdeMZzUmhCTPSJuCK/Sl1kEyWmhA==", + "dev": true + }, "find-up": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", diff --git a/package.json b/package.json index 701c15534c..4d1a00908c 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,8 @@ "private": true, "files": [], "devDependencies": { - "create-dmg": "status-im/create-dmg" + "create-dmg": "status-im/create-dmg", + "fileicon": "0.2.4" }, "engines": { "node": ">=8" diff --git a/status-dev-icon.icns b/status-dev.icns similarity index 100% rename from status-dev-icon.icns rename to status-dev.icns diff --git a/status-icon.icns b/status.icns similarity index 100% rename from status-icon.icns rename to status.icns