Linux: Fix missing icon error

This commit is contained in:
Natsumi
2025-08-01 16:56:16 +12:00
parent 592983673d
commit 7946ff63ae

View File

@@ -184,16 +184,20 @@ ipcMain.handle('app:restart', () => {
ipcMain.handle('app:getWristOverlayWindow', () => {
if (wristOverlayWindow && wristOverlayWindow.webContents) {
return !wristOverlayWindow.webContents.isLoading() &&
wristOverlayWindow.webContents.isPainting();
return (
!wristOverlayWindow.webContents.isLoading() &&
wristOverlayWindow.webContents.isPainting()
);
}
return false;
});
ipcMain.handle('app:getHmdOverlayWindow', () => {
if (hmdOverlayWindow && hmdOverlayWindow.webContents) {
return !hmdOverlayWindow.webContents.isLoading() &&
hmdOverlayWindow.webContents.isPainting();
return (
!hmdOverlayWindow.webContents.isLoading() &&
hmdOverlayWindow.webContents.isPainting()
);
}
return false;
});
@@ -611,6 +615,10 @@ async function createDesktopFile() {
// Download the icon and save it to the target directory
const iconPath = path.join(homePath, '.local/share/icons/VRCX.png');
if (!fs.existsSync(iconPath)) {
const iconDir = path.dirname(iconPath);
if (!fs.existsSync(iconDir)) {
fs.mkdirSync(iconDir, { recursive: true });
}
const iconUrl =
'https://raw.githubusercontent.com/vrcx-team/VRCX/master/VRCX.png';
await downloadIcon(iconUrl, iconPath)