enhance: optimize installation

This commit is contained in:
Wendong-Fan 2025-12-03 01:04:08 +08:00
parent 502eed3a89
commit bf1c01ad80
2 changed files with 3 additions and 9 deletions

View file

@ -1354,6 +1354,9 @@ async function createWindow() {
log.info('Window is ready, processing queued protocol URLs...');
processQueuedProtocolUrls();
// Wait for React components to mount and register event listeners
await new Promise(resolve => setTimeout(resolve, 500));
// Now check and install dependencies
let res:PromiseReturnType = await checkAndInstallDepsOnUpdate({ win });
if (!res.success) {

View file

@ -155,15 +155,6 @@ export const useInstallationSetup = () => {
if (installationStatus.success && installationStatus.isInstalling) {
startInstallation();
} else if (initState !== 'done' && toolResult) {
if (toolResult.success && !toolResult.isInstalled) {
console.log('[useInstallationSetup] Tools missing and not installing. Starting installation...');
try {
await performInstallation();
} catch (installError) {
console.error('[useInstallationSetup] Installation failed:', installError);
}
}
}
} catch (err) {
console.error('[useInstallationSetup] Failed to check installation status:', err);