feat(build): add icon generation and external binary bundling

- Add scripts to generate application icons in multiple formats (ICO, ICNS, PNG)
- Implement download scripts for uv and Node.js binaries for cross-platform support
- Update build configuration to use new icon resources and bundled binaries
- Remove old loading screen and unused build configurations
- Fix application icon path resolution to use app resources directory
This commit is contained in:
duanshuwen
2026-04-08 07:25:25 +08:00
parent 49a8c0c1d6
commit eb9acae071
132 changed files with 1289 additions and 817920 deletions

View File

@@ -589,7 +589,9 @@ function createLogo() {
if (logo != null) {
return logo;
}
logo = path$1.join(__dirname, "/public/logo.ico");
const appPath = electron.app.getAppPath();
const iconPath = path$1.join(appPath, "resources", "icons", "icon.ico");
logo = iconPath;
return logo;
}
class ThemeService {
@@ -753,34 +755,16 @@ class WindowService {
}
}
_addLoadingView(window2, size) {
let loadingView = new electron.WebContentsView();
let rendererIsReady = false;
window2.contentView?.addChildView(loadingView);
loadingView.setBounds({
x: 0,
y: 0,
width: size.width,
height: size.height
});
{
loadingView.webContents.loadURL(`${"http://localhost:5173"}/loading.html`);
}
const onRendererIsReady = (e) => {
if (e.sender !== window2?.webContents || rendererIsReady) return;
rendererIsReady = true;
window2.contentView.removeChildView(loadingView);
electron.ipcMain.removeListener(IPC_EVENTS.RENDERER_IS_READY, onRendererIsReady);
loadingView = void 0;
};
electron.ipcMain.on(IPC_EVENTS.RENDERER_IS_READY, onRendererIsReady);
return (cb) => loadingView?.webContents.once("dom-ready", () => {
loadingView?.webContents.insertCSS(`body {
background-color: ${themeManager.isDark ? "#2C2C2C" : "#FFFFFF"} !important;
--stop-color-start: ${themeManager.isDark ? "#A0A0A0" : "#7F7F7F"} !important;
--stop-color-end: ${themeManager.isDark ? "#A0A0A0" : "#7F7F7F"} !important;
}`);
return (cb) => {
cb();
});
};
}
_applySizeConstraints(win, size) {
if (size.maxHeight && size.maxWidth) {
@@ -796,7 +780,7 @@ class WindowService {
}
}
_loadWindowTemplate(window2, name) {
const page = name === WINDOW_NAMES.LOADING ? "loading" : "index";
const page = "index";
this._loadPage(window2, page);
}
_handleCloseWindowState(target, really) {

File diff suppressed because one or more lines are too long

Binary file not shown.