- Home /
Compiling Universal App in windows which won't run on my Mac
Hi I have compiled my application on windows using unity 2.6.1f3 to a mac universal binary. When I copy the app to my mac and try to run it nothing happens at all. I checked the Mac player log file and no errors are generated.
I checked inside the /Contents folder of the app and in the MacOS/ folder. The file in that folder which should be a unix binary file shows up as a Document instead. I suspect this has something to do with it, but am unsure how to change the type of the file or why unity is compiling it this way.
My application works perfectly when compiled for windows or the web player.
Any pointers would be appreciated
Thanks.
Answer by Mike 3 · Jul 31, 2010 at 05:03 AM
There seems to have been a bug in 2.6 which doesn't set the permissions for the executable inside the app
If you do
chmod 755 /PathToYourApp/Contents/MacOS/YourBuildName
from a mac, it should fix it immediately
Hmmm there are a bunch of other files that should be unix executables too although they don't seem to matter. What is unusual is that if I compile on windows then copy to the $$anonymous$$ac the files show as documents rather than unix executables. But if I then copy back to windows and then back to the $$anonymous$$ac again they show as Unix executables????!!!!:)
YESSSS! $$anonymous$$ichael, you are an awesome human being. This has been messing with me for months, and I wasn't computer-literate enough to understand your answer. I did some research, came back to your answer, and it worked!
In order to save others some time, I thought I'd explain how to do this long-form.
For those of you who have no idea what "chmod" is, and couldn't understand how this was supposed to be implemented, the suggestion above is to: 1. open your Ter$$anonymous$$al, and type "chmod 755/" 2. then you need to figure out the path to your build, and add that to the file path, which began with "chmod 755/" 3. you have to go all the way to the root ter$$anonymous$$al file inside your .app file. So, right click on your .app build file and select show package contents. Double-click the Contents folder, then $$anonymous$$acOS, and then you'll see the whole path at the bottom of your folder window. If you can't see a path, enable that in your view settings. Transcribe that list of locations into the form described by $$anonymous$$ichael:
chmod 755 /PathToYourApp/Contents/$$anonymous$$acOS/YourBuildName
In practice, the final path I entered into the Ter$$anonymous$$al looked like this:
chmod 755/$$anonymous$$acintosh HD/Users/Gabe/Desktop/Devil's Dating Service the Game $$anonymous$$ac OSX/Contents/$$anonymous$$acOS/Run Tree Run!
Hit return, and it should open your file. Hallelujah!!
You can drag the file into the Ter$$anonymous$$al window after typing "chmod 755 ", which saves having to type out the path.
Answer by cncguy · Aug 01, 2010 at 08:33 AM
It also seems that if you copy the app from windows to Mac then back to windows and then back to the Mac again the problem goes away. Go Figure?? but it works.
Whoever gave me a negative vote - I realise this sounds rediculous but it is actually a fact.