Incorrect POSIX Permissions On Mac Build From Windows
by Christopher Ellis · in Torque Game Builder · 05/06/2010 (1:36 pm) · 3 replies
I've been having a recurring problem when I build my game for Mac using my Windows machine - the game would not launch on a Mac once built and transfered over.
Upon further examination, I found that it was because the Unix/POSIX-style permissions for the files were all set to 644 (rw-rw-r--). This included the executable file, "TGBGame," found at "GAME.app/Contents/MacOS/TGBGame." With the executable permission not set on this file, the OS refused to launch the game.
Solving this problem was a simple matter of running "chmod +x" on the file. For good measure, I just went to the root directory of the game (where the .app and all supporting files were contained), and ran:
chmod -R a+rx *
Thus ensuring that all files were set to be readable and executable, if need be.
-------
While this solved the problem, it's obviously not an ideal solution. Ideally, the game should build for Mac with the correct permissions set to allow it's execution without further finagling.
Is this possible to implement in Torque - to build the Mac version with correct unix-style file permissions? If not, is there a way to change unix-style permissions of the files within Windows before distributing it?
Upon further examination, I found that it was because the Unix/POSIX-style permissions for the files were all set to 644 (rw-rw-r--). This included the executable file, "TGBGame," found at "GAME.app/Contents/MacOS/TGBGame." With the executable permission not set on this file, the OS refused to launch the game.
Solving this problem was a simple matter of running "chmod +x" on the file. For good measure, I just went to the root directory of the game (where the .app and all supporting files were contained), and ran:
chmod -R a+rx *
Thus ensuring that all files were set to be readable and executable, if need be.
-------
While this solved the problem, it's obviously not an ideal solution. Ideally, the game should build for Mac with the correct permissions set to allow it's execution without further finagling.
Is this possible to implement in Torque - to build the Mac version with correct unix-style file permissions? If not, is there a way to change unix-style permissions of the files within Windows before distributing it?
About the author
#2
Dropbox is already a MUST HAVE free online file sync service for many reasons. I love it and I suggest everybody to use it (this is my referral url ^^) but it's also a solution for your problem.
The current 0.8 beta version added xattrs support during file syncronization: this means you can create a folder inside Windows, synching it with Mac, modify properly the executable bit on files you prefer, and from then on if you update those files under Windows, they will not loose executable bit on Mac anymore! And, while you are using file sync, you will not need to transfer files manually anymore !
Please note xattrs support is not present inside the current 0.7.110 stable relese. Anyway, I just installed the 0.8.52 beta release on Ubuntu 10.4 64 bit and it works fine. You can find the beta links at this dropbox official forum post.
Happy synching to all ^^
05/07/2010 (10:40 am)
Ronny is right, but now there's a good workaround, very much better then running custom shell script every time you update your project.Dropbox is already a MUST HAVE free online file sync service for many reasons. I love it and I suggest everybody to use it (this is my referral url ^^) but it's also a solution for your problem.
The current 0.8 beta version added xattrs support during file syncronization: this means you can create a folder inside Windows, synching it with Mac, modify properly the executable bit on files you prefer, and from then on if you update those files under Windows, they will not loose executable bit on Mac anymore! And, while you are using file sync, you will not need to transfer files manually anymore !
Please note xattrs support is not present inside the current 0.7.110 stable relese. Anyway, I just installed the 0.8.52 beta release on Ubuntu 10.4 64 bit and it works fine. You can find the beta links at this dropbox official forum post.
Happy synching to all ^^
#3
05/07/2010 (11:13 am)
The same can be achieved by having a Linux server somewhere too, of course :)
Torque 3D Owner Ronny Bangsund
Torque Cheerleaders