wailsapp / wails

Create beautiful applications using Go
https://wails.io
MIT License
25.26k stars 1.22k forks source link

v2.9.2 can't build runnable .app on macOS when 'name' and 'outputfilename' are different #3786

Closed tramamte closed 1 month ago

tramamte commented 1 month ago

Description

from v2.9.2, on macOS, wails uses 'outputfilename' value to make a binary file. But still the CFBundleExecutable is set to {{.Name}} in the Info.plist. So, when 'name' and 'outputfilename' are different, the .app cannot be executed.

Screenshot 2024-09-27 at 1 49 32 PM

The CFBundleExecutable should be set to 'outputfilename'. The 'buildassets', however, only exports 'Name' and 'Info'. https://github.com/wailsapp/wails/blob/master/v2/pkg/buildassets/buildassets.go#L109

leaanthony commented 1 month ago

Nice catch. Are you able to raise a PR for this?

nickisworking commented 1 month ago

@leaanthony Hello, I'm a team member of @tramamte and I would like to raise a PR for this issue.

It seems very clear, but I'll leave a few additional comments according to the contribution guide.

  1. First of all, I have confirmed that the bug is reproducible in my environment as well.
    • If thname and outputfilename in wails.json are different, the app cannot be executed.
image image
  1. The result of wails doctor is as follows image
raguay commented 1 month ago

I'm also having this issue. I can't use Modal File Manager anymore since I recompiled it using 2.9.2 and it will not run. It says the program is incomplete. Wails doctor shows the same as the person before me.

raguay commented 1 month ago

I was able to fix it as above. Make the program name and output name the same. Interesting.

tramamte commented 1 month ago

@raguay As I mentioned above, there is no issue, if the 'name' and 'outputfilename' are same. And because wails v2.9.1 ignored 'outputfilename', it also had no issue.

nickisworking commented 1 month ago

@raguay @tramamte

Yes. Plus, I have also figured out that It works well even if the case is different. e.g) test/Test 🤔🤔

leaanthony commented 1 month ago

I think this is something we should fix. Should be no need to manually keep these the same