🐛 Fixed the issue of package icon under Windows
This commit is contained in:
@@ -84,6 +84,11 @@ npm run build:mac # macOS universal build
|
|||||||
- [ ] Test with weekly.tw93.fun URL
|
- [ ] Test with weekly.tw93.fun URL
|
||||||
- [ ] Verify remote icon functionality (https://gw.alipayobjects.com/os/k/fw/weekly.icns)
|
- [ ] Verify remote icon functionality (https://gw.alipayobjects.com/os/k/fw/weekly.icns)
|
||||||
|
|
||||||
|
**Testing Notes:**
|
||||||
|
|
||||||
|
- Do NOT use `PAKE_NO_CONFIG_OVERWRITE=1` - this environment variable is not implemented
|
||||||
|
- For testing, simply use: `node dist/cli.js https://example.com --name TestApp --debug`
|
||||||
|
|
||||||
## Core Components
|
## Core Components
|
||||||
|
|
||||||
### CLI Tool (`bin/`)
|
### CLI Tool (`bin/`)
|
||||||
|
|||||||
5
bin/options/icon.ts
vendored
5
bin/options/icon.ts
vendored
@@ -155,8 +155,9 @@ export async function handleIcon(options: PakeAppOptions, url?: string) {
|
|||||||
return defaultPngPath;
|
return defaultPngPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
// If nothing exists, let the error bubble up
|
// If nothing exists, return empty string to let merge.ts handle default icon
|
||||||
throw new Error('No default icon found for Windows build');
|
logger.warn('✼ No default icon found, will use pake default.');
|
||||||
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
const iconPath = IS_LINUX
|
const iconPath = IS_LINUX
|
||||||
|
|||||||
3
bin/options/index.ts
vendored
3
bin/options/index.ts
vendored
@@ -62,7 +62,8 @@ export default async function handleOptions(
|
|||||||
identifier: getIdentifier(url),
|
identifier: getIdentifier(url),
|
||||||
};
|
};
|
||||||
|
|
||||||
appOptions.icon = await handleIcon(appOptions, url);
|
const iconPath = await handleIcon(appOptions, url);
|
||||||
|
appOptions.icon = iconPath || undefined;
|
||||||
|
|
||||||
return appOptions;
|
return appOptions;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user