fix(win): load window icon from ICO on disk + buffer PNG (1.0.6)
Release / release (push) Successful in 5m8s

nativeImage from paths inside app.asar often yields empty images on Windows.
Ship icon.ico via extraResources and read with createFromBuffer; setIcon on boot + app windows.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Ivan Fontosh
2026-05-12 08:24:14 +08:00
parent 1840227be6
commit 2037144a5c
6 changed files with 166 additions and 91 deletions
@@ -22,10 +22,11 @@ void test('createWindows: закрытие редактора завершает
void test('createWindows: иконка окна (pack PNG, затем window PNG; SVG только вне win32)', () => {
const src = readCreateWindows();
assert.ok(src.includes('resolveWindowIconPath'));
assert.ok(src.includes('app-pack-icon.png'));
assert.ok(src.includes('app-window-icon.png'));
assert.ok(src.includes('app-logo.svg'));
assert.ok(src.includes('loadBrandingWindowIcon'));
const branding = fs.readFileSync(path.join(here, 'brandingIcon.ts'), 'utf8');
assert.ok(branding.includes('app-pack-icon.png'));
assert.ok(branding.includes('app-window-icon.png'));
assert.ok(branding.includes('tryDarwinSvgPaths'));
});
void test('createWindows: пульт поверх экрана просмотра (дочернее окно)', () => {