[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


So you want to make a linux build with Unity

All things Desktop Dungeons

So you want to make a linux build with Unity

Postby GoatBot on Fri May 30, 2014 11:08 am

User avatar
GoatBot
 
Posts: 0
Joined: Wed Jun 01, 2011 4:01 pm

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

Postby Andir on Tue Jun 03, 2014 11:39 am

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
Andir
 
Posts: 1
Joined: Tue Jun 03, 2014 11:34 am

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

Postby yochaigal on Tue Jun 03, 2014 11:45 am

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!
yochaigal
 
Posts: 1
Joined: Tue Jun 03, 2014 11:42 am

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

Postby KillaW0lf04 on Tue Jun 03, 2014 12:05 pm

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.
KillaW0lf04
 
Posts: 1
Joined: Tue Jun 03, 2014 12:02 pm

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

Postby Aequitas on Tue Jun 03, 2014 1:09 pm

Thanks for the feedback, I'll make that change to the post!
User avatar
Aequitas
Site Admin
 
Posts: 85
Joined: Fri Mar 25, 2011 3:26 pm

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

Postby dislekcia on Tue Jun 03, 2014 1:15 pm

User avatar
dislekcia
 
Posts: 2321
Joined: Fri Mar 25, 2011 5:58 pm
Location: Cape Town, South Africa

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

Postby dislekcia on Tue Jun 03, 2014 1:16 pm

User avatar
dislekcia
 
Posts: 2321
Joined: Fri Mar 25, 2011 5:58 pm
Location: Cape Town, South Africa

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

Postby Toost Inc. on Tue Jun 03, 2014 1:31 pm

Toost Inc.
 
Posts: 1
Joined: Tue Jun 03, 2014 1:06 pm

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

Postby DrMcCoy on Tue Jun 03, 2014 1:58 pm

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.
User avatar
DrMcCoy
 
Posts: 1
Joined: Tue Jun 03, 2014 1:30 pm

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

Postby M@yeulC on Tue Jun 03, 2014 2:20 pm

M@yeulC
 
Posts: 1
Joined: Tue Jun 03, 2014 2:05 pm

Next

Return to Desktop Dungeons

Who is online

Users browsing this forum: No registered users and 29 guests