Skip to content

Commit 6eb3e15

Browse files
authored
App icon: use a rounded square for our Windows/Linux app icon.
2 parents ee4f828 + b07fd0c commit 6eb3e15

File tree

9 files changed

+19
-13
lines changed

9 files changed

+19
-13
lines changed

build/README.md

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
1-
# OpenCOR icon
2-
3-
The different icon files in this directory were created using `../src/renderer/src/assets/logo.svg`, which is based off the original VPH logo.
4-
5-
- `icon.png`: this is a `1024x1024` pixel version of `../src/renderer/src/assets/logo.svg`.
6-
- `icon.ico`: this is an ICO file containing multiple resolutions of `icon.png`, created using the following command:
1+
- `icon.png` is a `1024x1024` pixel version of `../src/renderer/src/assets/logo.svg`.
2+
- `icon.ico` is an ICO file containing multiple resolutions of `../src/main/assets/icon.png`, created using the following command:
73

84
```bash
9-
magick icon.png -define icon:auto-resize=16,24,32,40,48,64,128,256 icon.ico
5+
magick ../src/main/assets/icon.png -define icon:auto-resize=16,24,32,40,48,64,128,256 icon.ico
106
```
11-
- `icon.icns`: this is an ICNS file containing multiple resolutions of `icon.png`, created using the following commands:
7+
- `icon.icns` is an ICNS file containing multiple resolutions of `icon.png`, created using the following commands:
128

139
```bash
1410
OUT=TEMP-$$.iconset

build/icon.ico

1.61 KB
Binary file not shown.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"url": "git+https://github.com/opencor/webapp.git"
2424
},
2525
"type": "module",
26-
"version": "0.20251111.0",
26+
"version": "0.20251112.0",
2727
"scripts": {
2828
"archive:web": "bun src/renderer/scripts/archive.web.js",
2929
"build": "electron-vite build",

src/main/MainWindow.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,11 @@ import { autoUpdater, type ProgressInfo, type UpdateCheckResult } from 'electron
33
import path from 'node:path';
44
import process from 'node:process';
55

6-
import icon from '../../build/icon.png?asset';
7-
86
import type { ISettings } from '../renderer/src/common/common';
97
import { FULL_URI_SCHEME, LONG_DELAY, SHORT_DELAY } from '../renderer/src/common/constants';
108
import { isLinux, isMacOs, isPackaged, isWindows } from '../renderer/src/common/electron';
119

10+
import icon from './assets/icon.png?asset';
1211
import { ApplicationWindow } from './ApplicationWindow';
1312
import { electronConf, type IElectronConfState } from './index';
1413
import { enableDisableMainMenu, updateReopenMenu } from './MainMenu';

src/main/assets/README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
- `icon.png` is a rounded square version `../src/renderer/src/assets/logo.svg`, created using the following commands:
2+
3+
```bash
4+
MASK=mask-$$.png
5+
6+
magick -size 1024x1024 xc:none -draw "roundrectangle 0,0,1023,1023,192,192" $MASK
7+
magick ../../../build/icon.png -alpha set $MASK -compose DstIn -composite icon.png
8+
9+
rm -f $MASK
10+
```

src/main/assets/icon.png

214 KB
Loading

src/main/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ if (isLinux()) {
9494
}
9595

9696
fs.copyFileSync(
97-
path.join(import.meta.dirname, '../../build/icon.png'),
97+
path.join(import.meta.dirname, '../../src/main/assets/icon.png'),
9898
path.join(`${localShareOpencorFolder}/icon.png`)
9999
);
100100

src/renderer/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
},
4040
"./style.css": "./dist/opencor.css"
4141
},
42-
"version": "0.20251111.0",
42+
"version": "0.20251112.0",
4343
"scripts": {
4444
"build": "vite build",
4545
"build:lib": "vite build --config vite.lib.config.ts && cp index.d.ts dist/index.d.ts",

src/renderer/src/assets/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- `logo.svg` is based off the original VPH logo.

0 commit comments

Comments
 (0)