@bobfrankston/mailx 1.0.413 → 1.0.415
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/mailx.js +12 -7
- package/package.json +1 -1
package/bin/mailx.js
CHANGED
|
@@ -1027,20 +1027,25 @@ RFC 5322 with CRLF line endings. Bodies are quoted-printable encoded (readable i
|
|
|
1027
1027
|
}
|
|
1028
1028
|
catch { /* no saved geometry — use defaults */ }
|
|
1029
1029
|
const rootPkgVersion = JSON.parse(fs.readFileSync(path.join(import.meta.dirname, "..", "package.json"), "utf-8")).version;
|
|
1030
|
-
//
|
|
1031
|
-
//
|
|
1032
|
-
//
|
|
1033
|
-
//
|
|
1034
|
-
//
|
|
1030
|
+
// Pass the .png as the window-decode icon: msger uses the `image` crate
|
|
1031
|
+
// to decode `options.icon` for the Tao window icon, and PNG-in-ICO files
|
|
1032
|
+
// round-trip unreliably through the image-0.24 ICO decoder, which leaves
|
|
1033
|
+
// the taskbar entry showing the empty msgernative.exe default. PNG always
|
|
1034
|
+
// decodes cleanly. The .ico path is forwarded separately as
|
|
1035
|
+
// `relaunchIcon`, which msger uses for `PKEY_AppUserModel_RelaunchIconResource`
|
|
1036
|
+
// (the path is consumed verbatim — no decode — so PNG-in-ICO is fine
|
|
1037
|
+
// there). Falls back if either file is missing.
|
|
1035
1038
|
const __iconIco = path.join(clientDir, "icon.ico");
|
|
1036
1039
|
const __iconPng = path.join(clientDir, "icon.png");
|
|
1037
|
-
const
|
|
1040
|
+
const __iconPathRuntime = fs.existsSync(__iconPng) ? __iconPng : __iconIco;
|
|
1041
|
+
const __iconPathPin = fs.existsSync(__iconIco) ? __iconIco : undefined;
|
|
1038
1042
|
const handle = showService({
|
|
1039
1043
|
title: `mailx v${rootPkgVersion}`,
|
|
1040
1044
|
url: "index.html",
|
|
1041
1045
|
contentDir: clientDir,
|
|
1042
1046
|
initScript: mailxapiScript,
|
|
1043
|
-
icon:
|
|
1047
|
+
icon: __iconPathRuntime,
|
|
1048
|
+
relaunchIcon: __iconPathPin,
|
|
1044
1049
|
aumid: "com.frankston.mailx",
|
|
1045
1050
|
size: savedGeometry
|
|
1046
1051
|
? { width: savedGeometry.width, height: savedGeometry.height }
|