electron / universal

Create Universal macOS applications from two x64 and arm64 Electron applications
MIT License
112 stars 43 forks source link

fix: Run app.setAppPath() with the right path #78

Closed felixrieseberg closed 11 months ago

felixrieseberg commented 11 months ago

Electron will set the appPath by looking for package.json. When using this module, this will end up being inside app.asar.

The problem is that from point on forward, APIs like webContents.loadFile() will be using this app.asar as the application's root. webContents.loadFile('renderer/index.html') will no longer work, since that file won't be inside app.asar - it'll actually be inside app-x64.asar or app-arm64.asar.

Users can handle this problem in user land, but I assume that you need to know Electron pretty darn well. I propose that we fix this directly in the default asar. The same issue also exists with app folders, which this PR fixes, too.

dsanders11 commented 11 months ago

even if these files aren't linted for some reason 😆

79

felixrieseberg commented 11 months ago

Added linting and testing to entry-asar (building off @dsanders11's PR)

continuous-auth[bot] commented 11 months ago

:tada: This PR is included in version 1.4.2 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

soroushm commented 9 months ago

we are getting an error on missing app #80 so i tried to add a pull request for it but we dont have even electron install in this package here is the #81 what do you think about it @felixrieseberg