开发者

Mac OS X 10.5 App "not supported on this architecture" cured by copying?

开发者 https://www.devze.com 2022-12-25 12:58 出处:网络
I have an app that updates itself over the internet, and the updated copy won\'t run on PowerPC machines (G5) running Leopard (10.5.8).Double-clicking the app produces a message sa开发者_开发百科ying

I have an app that updates itself over the internet, and the updated copy won't run on PowerPC machines (G5) running Leopard (10.5.8). Double-clicking the app produces a message sa开发者_开发百科ying "You can't open the application "appname" because it is not supported on this architecture." But here's the weird part: if I duplicate the app using the Finder or using a cp -R command, then the duplicate runs fine! And yet, if I do ls -laeR on both apps, the results are identical. I restarted the machine, and the difference between the two copies was still there.

Sometimes, renaming the app made it run. After a few tries, I managed to rename it back to the original name and still have it run.

If this was just on one machine, I'd dismiss it as disk corruption, cosmic rays, or a voodoo hex, but it was reported by a customer and then I reproduced it on my own machine.

Any ideas what could cause this behavior?


It turns out that the Launch Services database had somehow flagged the app as unsupported, which I verified by using the semi-secret lsregister command line tool to dump the database. Anything that would change the mod date of the app, such as touch, sufficed to make Launch Services wake up and smell the coffee.


Sounds to me like an extended attribute or some other aspect that isn't being carried over to the duplicate of the program files.

Maybe try looking into running the xattr command on the output of ls -laeR on the app bundle?

0

精彩评论

暂无评论...
验证码 换一张
取 消