@rehpic/vcli 0.1.0-beta.49.1 → 0.1.0-beta.50.1
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/dist/index.js +10 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -195,6 +195,16 @@ function buildMenu() {
|
|
|
195
195
|
return { items, actions };
|
|
196
196
|
}
|
|
197
197
|
async function startMenuBar() {
|
|
198
|
+
try {
|
|
199
|
+
const { fileURLToPath: fileURLToPath3 } = await import("url");
|
|
200
|
+
const { dirname: dirname2, join: pjoin } = await import("path");
|
|
201
|
+
const { chmodSync } = await import("fs");
|
|
202
|
+
const systrayIndex = fileURLToPath3(import.meta.resolve("systray2"));
|
|
203
|
+
const binName = process.platform === "darwin" ? "tray_darwin_release" : process.platform === "win32" ? "tray_windows_release.exe" : "tray_linux_release";
|
|
204
|
+
const trayBin = pjoin(dirname2(systrayIndex), "traybin", binName);
|
|
205
|
+
chmodSync(trayBin, 493);
|
|
206
|
+
} catch {
|
|
207
|
+
}
|
|
198
208
|
const icon = loadIconBase64();
|
|
199
209
|
const { items, actions } = buildMenu();
|
|
200
210
|
const systray = new SysTray({
|