@@ -13,15 +13,35 @@ module.exports = {
1313 console . error ( 'Build directory not found! Run "npm run build" first.' ) ;
1414 throw new Error ( 'Build directory not found' ) ;
1515 }
16-
16+
1717 // Check if index.html exists in build
1818 const indexPath = path . join ( buildPath , 'index.html' ) ;
1919 if ( ! fs . existsSync ( indexPath ) ) {
2020 console . error ( 'index.html not found in build directory!' ) ;
2121 throw new Error ( 'Build files not found' ) ;
2222 }
23-
23+
2424 console . log ( 'Build files found, proceeding with packaging...' ) ;
25+ } ,
26+ postPackage : async ( forgeConfig , options ) => {
27+ // Post-package hook to ensure icon is properly set
28+ if ( process . platform === 'darwin' ) {
29+ const { execSync } = require ( 'child_process' ) ;
30+ const appPath = path . join ( options . outputPaths [ 0 ] , 'Wave.app' ) ;
31+
32+ console . log ( '[POST-PACKAGE] Updating app bundle icon...' ) ;
33+
34+ // Touch the app to update modification time (helps macOS recognize changes)
35+ try {
36+ execSync ( `touch "${ appPath } "` ) ;
37+ console . log ( '[POST-PACKAGE] Updated app modification time' ) ;
38+ } catch ( error ) {
39+ console . warn ( '[POST-PACKAGE] Failed to touch app:' , error . message ) ;
40+ }
41+
42+ console . log ( '[POST-PACKAGE] Icon setup complete' ) ;
43+ console . log ( '[POST-PACKAGE] Note: If you see an old icon, run: npm run clear-cache' ) ;
44+ }
2545 }
2646 } ,
2747 packagerConfig : {
@@ -71,7 +91,7 @@ module.exports = {
7191 / ^ \/ c r e a t e _ d m g _ b g \. p y $ / ,
7292 / ^ \/ b u i l d R e s o u r c e s \/ / ,
7393 ] ,
74- icon : './src/assets/wave-logo' ,
94+ icon : './src/assets/wave-logo.icns ' ,
7595 // Code signing configuration
7696 osxSign : process . env . MAC_CODESIGN_IDENTITY ? {
7797 identity : process . env . MAC_CODESIGN_IDENTITY ,
0 commit comments