Skip to content

Commit

Permalink
Add windows icons
Browse files Browse the repository at this point in the history
  • Loading branch information
KuznetsovNikita committed Jan 7, 2024
1 parent 26360c5 commit 9707e1a
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
3 changes: 2 additions & 1 deletion apps/desktop/forge.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ const config: ForgeConfig = {
name: 'Tonkeeper',
authors: 'Ton Apps Group',
description: 'Your desktop wallet on The Open Network',
iconUrl: path.join(__dirname, 'public', 'icon.png')
iconUrl: path.join(process.cwd(), 'public', 'icon.ico'),
setupIcon: path.join(process.cwd(), 'public', 'icon.ico')
},
['win32']
),
Expand Down
Binary file added apps/desktop/public/icon.ico
Binary file not shown.
16 changes: 11 additions & 5 deletions apps/desktop/src/electron/mainWindow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,26 @@ export abstract class MainWindow {

const icon = (() => {
switch (process.platform) {
case "darwin": return path.join(process.cwd(), "public", "icon.icns")
case "linux": return path.join(__dirname, "../../../", "public", 'icon.png')
default: return "";
case 'darwin':
return path.join(process.cwd(), 'public', 'icon.icns');
case 'linux':
return path.join(__dirname, '../../../', 'public', 'icon.png');
case 'win32':
return path.join(process.cwd(), 'public', 'icon.ico');
default:
return '';
}
})();

// Create the browser window.
this.mainWindow = new BrowserWindow({
icon: icon,
width: process.platform == "linux" ? 438 : 450,
width: process.platform == 'linux' ? 438 : 450,
height: 700,
resizable: isDev,
autoHideMenuBar: process.platform != 'darwin',
webPreferences: {
zoomFactor: process.platform === 'darwin' ? 0.8 : undefined,
zoomFactor: process.platform !== 'linux' ? 0.8 : undefined,
preload: MAIN_WINDOW_PRELOAD_WEBPACK_ENTRY
}
});
Expand Down

0 comments on commit 9707e1a

Please sign in to comment.