@@ -175,6 +175,7 @@ async function main() {
175175 extraResource : [
176176 path . join ( ROOT , "resources" , "trayTemplate.png" ) ,
177177 path . join ( ROOT , "resources" , "trayTemplate@2x.png" ) ,
178+ path . join ( ROOT , "LICENSE" ) ,
178179 ] . filter ( ( p ) => fs . existsSync ( p ) ) ,
179180 } ) ;
180181
@@ -185,6 +186,10 @@ async function main() {
185186
186187 // Ensure tray icons land in Resources (packager extraResource is fine; belt & suspenders)
187188 const resDir = path . join ( appPath , "Contents" , "Resources" ) ;
189+ const appLicense = path . join ( resDir , "LICENSE" ) ;
190+ if ( ! fs . existsSync ( appLicense ) ) {
191+ throw new Error ( "Packaged app is missing the MIT license notice" ) ;
192+ }
188193 for ( const f of [ "trayTemplate.png" , "trayTemplate@2x.png" ] ) {
189194 const src = path . join ( ROOT , "resources" , f ) ;
190195 if ( fs . existsSync ( src ) ) fs . copyFileSync ( src , path . join ( resDir , f ) ) ;
@@ -250,6 +255,7 @@ async function main() {
250255 const stagedApp = path . join ( stage , `${ PRODUCT } .app` ) ;
251256 run ( "ditto" , [ appPath , stagedApp ] ) ;
252257 run ( "ln" , [ "-s" , "/Applications" , path . join ( stage , "Applications" ) ] ) ;
258+ fs . copyFileSync ( path . join ( ROOT , "LICENSE" ) , path . join ( stage , "LICENSE.txt" ) ) ;
253259
254260 fs . writeFileSync (
255261 path . join ( stage , "Install.txt" ) ,
0 commit comments