[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 120: preg_filter(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 120: preg_filter(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 120: preg_filter(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 120: preg_filter(): The /e modifier is no longer supported, use preg_replace_callback instead
QCF Design Community • View topic - So you want to make a linux build with Unity
Page 1 of 2

So you want to make a linux build with Unity

PostPosted: Fri May 30, 2014 11:08 am
by GoatBot

Re: So you want to make a linux build with Unity

PostPosted: Tue Jun 03, 2014 11:39 am
by Andir
Posting this because the original author couldn't register here:

Well I can't reply because their cocking forum registration requires you to know what animal the forum bot is and only gives you three chances to get that right before it tells you to bugger off and try again later. Bollocks to that.

I wanted to reply because chmod 777 YourGame.x86 (suggested in the second point) is an awful idea. That makes a file not only executable but writeable by anybody on the system. They could replace your game with a script that just deleted your home files. Awesome, eh..? No. Use this instead:

chmod +x YourGame.x86

Re: So you want to make a linux build with Unity

PostPosted: Tue Jun 03, 2014 11:45 am
by yochaigal
Please do not tell people to use chmod 777 filename.sh - that makes it executable to ALL users; in general considered bad practice. Use chmod +x filename.sh.

Otherwise, great write-up! Thanks for making Linux games!

Re: So you want to make a linux build with Unity

PostPosted: Tue Jun 03, 2014 12:05 pm
by KillaW0lf04
You should avoid using `chmod 777 YourGame.x86` because this enables writing, reading and executing for *anyone* on the system. This means that any guest user can just rewrite the executable with a malicious script and no one would be able to stop him.

What you really want to do is `chmod +x YourGame.x86` which just adds an execute flag for everyone.

Re: So you want to make a linux build with Unity

PostPosted: Tue Jun 03, 2014 1:09 pm
by Aequitas
Thanks for the feedback, I'll make that change to the post!

Re: So you want to make a linux build with Unity

PostPosted: Tue Jun 03, 2014 1:15 pm
by dislekcia

Re: So you want to make a linux build with Unity

PostPosted: Tue Jun 03, 2014 1:16 pm
by dislekcia

Re: So you want to make a linux build with Unity

PostPosted: Tue Jun 03, 2014 1:31 pm
by Toost Inc.

Re: So you want to make a linux build with Unity

PostPosted: Tue Jun 03, 2014 1:58 pm
by DrMcCoy
Ah, the chmod 777 issue has already been fixed since I first saw the article. :)
It said "Comments are closed" at the time, so I didn't comment.

There's another two issues:

4) Don't use `getconf LONG_BIT`. That will also return 64 for a lot of other 64bit non-x86 architectures. Like ia64 and sparc64. Use `uname -m` instead; it'll return "x86_64" for 64bit x86 systems or "i686" for 32bit ones. Well, theoretically, it can also return i386, i486 and i586, but you probably won't release binaries compiled for those either (and i386 has been removed from the kernel with 3.8).

5) "LANG=en" is not really a valid locale. A locale consists of language, region and encoding, like "en_US.UTF-8". "LANG=en" might work, but might also not work.

Note, there's also the special locale "C" (alternative name "POSIX"). This probably does not apply to Unity3D, but if you're doing plain C or C++, it might be wise to set LC_ALL to POSIX; otherwise the glibc will do funky things for some string conversion functions, like the printf and scanf function families. The string "3.3" might or might not sscanf to the float 3.3; alternatively, the string "3,3" might sscanf to the float 3.3.

Re: So you want to make a linux build with Unity

PostPosted: Tue Jun 03, 2014 2:20 pm
by M@yeulC