trufanov-nok / scantailor-universal

ScanTailor Universal - a fork based on Enhanced+Featured+Master versions of ST
http://scantailor.org
Other
181 stars 16 forks source link

Fix executable name in Info.plist.in #84

Closed d235j closed 3 years ago

d235j commented 3 years ago

This corrects the executable name so that the built Mac .app works correctly.

trufanov-nok commented 3 years ago

This PR contains two commits. Could you please remove the one with deflate or make another PR?
Also - I'm not a Mac user. I was able to mount and launch the app from dmg distributive after I build it. I believe that something is broken but not sure what exactly. Shortcut to the app in some system menu? Could you briefly explain the way I can reproduce it (i'm running mac os on virtual machine)? And should I rebuild the app for Mac and regenerate dmg after this fix is applied?

d235j commented 3 years ago

This PR contains two commits. Could you please remove the one with deflate or make another PR?

That one is in #83 and was erroneously in here. I removed it.

Could you briefly explain the way I can reproduce it (i'm running mac os on virtual machine)?

When I double clicked on the .app in Finder, it fails to run. It's possible that the app was renamed. When I look at the Info.plist, the CFBundleExecutable property, which is supposed to contain the name of the executable located in Contents/MacOS, is ScanTailorUniversal, which does not match the executable name, which is scantailor-universal.

There are two ways to correct this problem: modify the Info.plist to match the executable name, or modify the build to make the executable name match the property in the Info.plist. Here I am doing the former.

Regarding renaming the app: https://developer.apple.com/documentation/bundleresources/information_property_list/cfbundleexecutable describes that this property is used to find the executable in this case.

In order to reproduce this problem, build the .app, rename it, and then attempt to double-click it.

trufanov-nok commented 3 years ago

Are you sure you're testing the latest Mac OS bundle (STU 0.2.12)? I've just checked its content in my Mac's image and its executable is stored at MacOS/ScanTailorUniversal. It's supposed to be renamed while copying into the app bundle's folder according to this line of script: https://github.com/trufanov-nok/scantailor-universal/blob/master/src/packaging/osx/makeapp.sh#L34
I made this change a week ago. P.S. The brief app bundle build process for Mac is described here: https://github.com/trufanov-nok/scantailor-universal/discussions/81

d235j commented 3 years ago

Thanks for pointing me to that documentation.

Looks like there's code in https://github.com/trufanov-nok/scantailor-universal/blob/master/src/app/CMakeLists.txt#L83 for building the .app bundle using CMake. I'll see if I can unify these instead.

I'll close this PR, but feel free to comment on it further.