开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜