| 420 | } |
| 421 | |
| 422 | findMainExecutable () { |
| 423 | const bundleExecutables = this.machoExcutables.filter( machoEntry => { |
| 424 | if ( machoEntry.filename.includes( this.bundleExecutablePath ) ) { |
| 425 | return true |
| 426 | } |
| 427 | |
| 428 | return this.bundleExecutablePath.includes( machoEntry.filename ) |
| 429 | } ) |
| 430 | |
| 431 | if ( bundleExecutables.length > 1 ) { |
| 432 | throw new Error( 'More than one root bundleExecutable found' ) |
| 433 | } |
| 434 | |
| 435 | if ( bundleExecutables.length === 0 ) { |
| 436 | throw new Error( 'No root bundleExecutable found' ) |
| 437 | } |
| 438 | |
| 439 | return bundleExecutables[ 0 ] |
| 440 | } |
| 441 | |
| 442 | async findTargetFiles () { |
| 443 | for ( const fileEntry of this.bundleFileEntries ) { |