runbay 0.1.6 → 0.1.8
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/out/main/index.js +17 -9
- package/package.json +1 -1
package/out/main/index.js
CHANGED
|
@@ -729,12 +729,15 @@ async function applySelfUpdate() {
|
|
|
729
729
|
const install = `call npm install -g ${PKG}@${target}${registryFlag}`;
|
|
730
730
|
const body = [
|
|
731
731
|
"@echo off",
|
|
732
|
-
"ping -n
|
|
733
|
-
// le temps que l'app se ferme
|
|
734
|
-
|
|
735
|
-
|
|
732
|
+
"ping -n 9 127.0.0.1 >nul",
|
|
733
|
+
// le temps que l'app se ferme ET que Windows relâche ses fichiers
|
|
734
|
+
// `||` et non « if errorlevel 1 » : npm sort en code NÉGatif sur EBUSY
|
|
735
|
+
// (-4082), qu'« errorlevel 1 » (qui teste « ≥ 1 ») ne voyait pas comme une
|
|
736
|
+
// erreur — la seconde tentative ne partait jamais. Tout code non nul = on
|
|
737
|
+
// retente, en ligne cette fois (fichiers pas encore relâchés, cache périmé,
|
|
738
|
+
// registre pas encore propagé).
|
|
739
|
+
`${install} > "${log}" 2>&1 || (`,
|
|
736
740
|
" ping -n 31 127.0.0.1 >nul",
|
|
737
|
-
// le registre met parfois une minute à propager une publication prouvée
|
|
738
741
|
`${install} --prefer-online >> "${log}" 2>&1`,
|
|
739
742
|
")",
|
|
740
743
|
relaunch,
|
|
@@ -945,9 +948,11 @@ function createWindow() {
|
|
|
945
948
|
// Fond peint dans la couleur du thème : pas de flash clair/sombre avant le 1er rendu.
|
|
946
949
|
backgroundColor: settings.theme === "light" ? "#f5f6f7" : "#111214",
|
|
947
950
|
title: "RunBay",
|
|
948
|
-
//
|
|
949
|
-
//
|
|
950
|
-
|
|
951
|
+
// Fichier d'icône embarqué dans le paquet (barre de titre + barre des tâches).
|
|
952
|
+
// L'app est lancée depuis npm comme un simple dossier : l'exe est Electron,
|
|
953
|
+
// qui n'a pas de visage à lui — on lui donne le nôtre. Windows préfère le
|
|
954
|
+
// .ico (plusieurs tailles), les autres plateformes le .png du tray.
|
|
955
|
+
icon: appIconPath(process.platform === "win32" ? "icon.ico" : "icon.png"),
|
|
951
956
|
webPreferences: {
|
|
952
957
|
preload: node_path.join(__dirname, "../preload/index.js"),
|
|
953
958
|
sandbox: false
|
|
@@ -1003,8 +1008,11 @@ function createWindow() {
|
|
|
1003
1008
|
mainWindow.loadFile(node_path.join(__dirname, "../renderer/index.html"));
|
|
1004
1009
|
}
|
|
1005
1010
|
}
|
|
1011
|
+
function appIconPath(fileName) {
|
|
1012
|
+
return electron.app.isPackaged ? node_path.join(process.resourcesPath, fileName) : node_path.join(__dirname, "../../build", fileName);
|
|
1013
|
+
}
|
|
1006
1014
|
function createTray() {
|
|
1007
|
-
const iconPath =
|
|
1015
|
+
const iconPath = appIconPath("icon.png");
|
|
1008
1016
|
tray = new electron.Tray(electron.nativeImage.createFromPath(iconPath));
|
|
1009
1017
|
refreshTrayTip();
|
|
1010
1018
|
tray.setContextMenu(
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "runbay",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.8",
|
|
4
4
|
"description": "Not an installer. A launcher. Detect, launch, update and uninstall apps installed from the command line (npm, pnpm, yarn, bun, scoop) — in one modern window.",
|
|
5
5
|
"main": "./out/main/index.js",
|
|
6
6
|
"bin": {
|