17 Apr, 2011, RoFAdmin wrote in the 1st comment:
Votes: 0
Hello Everyone-

So in the process of writing my Codebase I had an question that i was unsure of the answer, and im sure there will be those of you out here who know it.

I want to distribute my codebase, but i do not want to distribute the core source for it, but i would distribute the source for the modules.
The core itself is little more then managers for Network, Memory, Database, and basic core functionality to build a game on top of. THe modules themselves are everything that actually make the game, its commands, etc.

The code is C++ and compiles no errors, no warnings with strict rule enforcement on the three separate platforms of linux i have tested it on (CentOS, Ubuntu and Red Hat) assuming you already have mysql installed properly.

My question is this even possible to just distribute the executable on linux? Im not a linux guru or even a regular linux user so im not sure of this?

Ive looked around on the net and come across other people attempting to do the same thing but haven't found any clear or concise answers yet.

One solution i found pretty much said i would have to generate the executable file on each OS i wished to target, and have people choose the one
compiled on their OS. So i would have to compile on CentOS, Ubuntu, etc etc and put those files up for download. No one said if this acctually works well, or if it was a good way to go? This solution seems like i would also have to compile 64bit and non 64 bit versions as well. Which to me means if im targeting say only 5 versions of linux means i have to make 10 executables….

Another solution i found is Ermine which looks like it does what i want, but they list no pricing for thier software and only say contact us for a quote. Plus it seems like it does a whole lot more then i need.

Thanks for the help in advance folks.

_-Menser-_
17 Apr, 2011, quixadhal wrote in the 2nd comment:
Votes: 0
It's possible, assuming you static link, and stick to the lowest common denominator. Convincing people to run binaries from a source which is not accountable is another matter.
17 Apr, 2011, Rarva.Riendf wrote in the 3rd comment:
Votes: 0
'One solution i found pretty much said i would have to generate the executable file on each OS i wished to target, and have people choose the one
compiled on their OS. So i would have to compile on CentOS, Ubuntu, etc etc and put those files up for download.'

Yep basically the only solution that actually works in real life.
17 Apr, 2011, Kline wrote in the 4th comment:
Votes: 0
I have used very little software on a *nix platform that was closed source binary only. Only glFTPD and proprietary graphics drivers come to mind.
17 Apr, 2011, Vigud wrote in the 5th comment:
Votes: 0
Just two versions: 32-bit and 64-bit can cover all Linux distributions. Linux distributions are not different operating systems; the only problem with differences between distributions is that dynamic linking is trickier than static linking, but it's not impossible. For examples, see Linux installers for QuakeLive plugin, Adobe Flash plugin and Nvidia gfx drivers.
17 Apr, 2011, Runter wrote in the 6th comment:
Votes: 0
I'm curious as to why you might want to do this? Is it security to prevent people from obtaining the "secret sauce?" Anywho, my advice would be to compile and distribute the whole thing…and give them access to a scripting language… if you really want to go down that route, anyways.
18 Apr, 2011, Steel wrote in the 7th comment:
Votes: 0
quixadhal said:
It's possible, assuming you static link, and stick to the lowest common denominator. Convincing people to run binaries from a source which is not accountable is another matter.


The problem with static linking is that you need to check EVERYTHING that gets linked in and make sure that the license allows static linking. LGPL libraries, for example, will require that you provide all your .o files and the source code for the LGPL libraries to your users.
18 Apr, 2011, Rarva.Riendf wrote in the 8th comment:
Votes: 0
Vigud said:
Linux distributions are not different operating systems

Actually yes they are. You cannot even assume the same Kernel version among them….
18 Apr, 2011, Vigud wrote in the 9th comment:
Votes: 0
I hear you.
18 Apr, 2011, quixadhal wrote in the 10th comment:
Votes: 0
You already HAVE all the ".o" files when you statically link, that's kinda the point. Also, *YOU* don't need to make sure of anything… that's the compiler's job. You do still have to provide the source to the viral license LGPL stuff, but it shouldn't be too hard to track down.

Basically, link normally and use 'ldd' to show all the libraries you're linking against. Go get the source to all of them and put them on your web server. Now re-link statically and add the binaries. You shouldn't need to provide more than a single 32-bit version as 32-bit binaries run on 64-bit platforms. I also assume you're fine with just using ELF format, since anyone using a.out is on dinosaur hardware anyways.

Also, kernel versions really don't make any difference from an application's point of view, especially one that's statically linked. Unless you're doing weird things like using /proc, how would the application even know the kernel version?

It's not rocket science guys. It is a pain, and many people just won't trust a static binary from someone who has no accountability. I'll use binary-only graphic drivers, because at the end of the day, Nvidia/ATI/etc can be called to the carpet if they distribute something harmful. But, some random "internet" persona? Not so much…
18 Apr, 2011, Vigud wrote in the 11th comment:
Votes: 0
Quote
You shouldn't need to provide more than a single 32-bit version as 32-bit binaries run on 64-bit platforms.
But that requires additional stuff, and not everybody has them, so while making an extra binary targeting 64-bit systems is not a problem, it will spare you many questions about your stuff not working right off the bat.
19 Apr, 2011, Cratylus wrote in the 12th comment:
Votes: 0
RoFAdmin said:
I want to distribute my codebase, but i do not want to distribute the core source for it


Release the compiled Windows version.

-Crat
http://lpmuds.net
19 Apr, 2011, Kline wrote in the 13th comment:
Votes: 0
Cratylus said:
Release the compiled Windows version.

-Crat
http://lpmuds.net


While Crat's comments will probably be taken a bit tongue-in-cheek, it actually is sound advice. Many more people on Windows are willing to run arbitrary and untrusted binaries they find on the internet, for better or worse (as compared to those who use a *nix for a primary OS). Also, many would be "new MUD admins" typically stem from a Windows background and end up mucking about with Cygwin or VMs trying to get anything to work properly the first go-round. There are very few native Windows game servers in the MUD realm; design something nice and maybe you could claim a piece of that niche.
19 Apr, 2011, Cratylus wrote in the 14th comment:
Votes: 0
Kline said:
While Crat's comments will probably be taken a bit tongue-in-cheek, it actually is sound advice.


And as with many of my utterances, meant both ways.

I distribute my own codebase with a native Windows binary included (along with the unix friendly source) and to my intense bemusement,
I have borne witness to a great majority of new users saying their first i3 intermud "hello world" from a Windows version of DS.

Windows is just too normal to ignore as a valid platform for people to screw around and learn code.

As to the specific question involving distributing closed source for Linux, see the contortions VirtualBox goes through: http://www.virtualbox.org/wiki/Linux_Dow...

So yeah. Unless you have that kind of time, release for Windows.

-Crat
http://lpmuds.net
19 Apr, 2011, Runter wrote in the 15th comment:
Votes: 0
I agree that it's a good idea to not dismiss windows. Even if just to allow people easier access to your product. New programmers are more likely to have access and knowledge of windows than linux.
19 Apr, 2011, Vigud wrote in the 16th comment:
Votes: 0
Quote
As to the specific question involving distributing closed source for Linux, see the contortions VirtualBox goes through: http://www.virtualbox.org/wiki/Linux_Dow...
All I can see there is one binary for all distributions plus a bunch of packages for specific Linux distributions (and even specific versions of them) that make the program installed properly, but that's because the definition of a proper install varies from distro to distro. I guess I wouldn't want any MUD installed on my system.
19 Apr, 2011, oenone wrote in the 17th comment:
Votes: 0
skype provides 8 different binary distribution formats: native Packaging formats for Ubuntu 32-bit, Ubuntu 64-bit, Debian 32-bit, Debian 64-bit, Fedora 13+, and OpenSUSE 11+, plus a generic dynamically linked and a statically linked version. To get the dynamically linked version running, you have to install all needed libraries and make sure the loader finds them. The statically linked version should work on nearly all linuxes. The native packages are just for easy install/deinstall (+dependency management).
19 Apr, 2011, Steel wrote in the 18th comment:
Votes: 0
quixadhal said:
You already HAVE all the ".o" files when you statically link, that's kinda the point. Also, *YOU* don't need to make sure of anything… that's the compiler's job. You do still have to provide the source to the viral license LGPL stuff, but it shouldn't be too hard to track down.


I *think* you're replying to me, so I'm going to assume that's the case. The OP doesn't seem to want to distribute anything except his executable, so it seemed reasonable to point out that he'd have to distribute his object files if he statically linked LGPL libraries. It wasn't an issue of whether he'd have the .o files, himself. As for the second part, I don't see what you're trying to say–the compiler obviously can't check licenses for you, and that's where the "make sure" phrase was used.
19 Apr, 2011, RoFAdmin wrote in the 19th comment:
Votes: 0
Hey everyone-

SO yes cratylus did make a valid observation that windows might be the more "accepted" platform to go with if i plan on distributing a binary, and that thought had occurred to me, but i wish this to be a pretty much linux only project. Here is why.

1) This code as it stands will not work the way it is written with windows or cygwin. I would have to write additional segments of code to handle the compatibility to for those platforms. In addition since it uses MySql, anyone who wanted to make use of it on Cygwin (Assuming i did port it) would have to figure out how to get MySql compiled and installed on cygwin. No easy task from my own experiments and is already outside the scope of the "ima Newbie Coder!" person.

2) Anyone who is serious about starting a MUD will at some point have to get a host. Windows hosts are FAR more expensive the linux hosts. You could argue they could run it from their home connection, but then i would argue then they arent really serious about having a legitimate mud.

3) Im honestly not really concerned if anyone does actually make use of my project. I like what i have done enough, think its very robust, and others may find it useful and ingenious, however if the world thinks it sucks cause the core is an exe, well then so be it, no bothers to me cause im still making use of it. My goal was never to write an engine for everyone else to use, but to write an engine for me to use and tell everyone else hey if you like my toy you can play with it too.


Now i do have a few questions for people. A few of you stated "i would never install a binary on my linux machine". Why is that? Do you have java installed on your linux machine? Have you installed Java Apps cause those are essentially binaries as well. How come you feel its acceptable for windows to just distribute binaries, but on a linux machine if someone does that your like WHOOAAAA hold up? To me it really doesnt make sense, other then perhaps when people are using linux they feel empowered and not havig to configure, compile and install the code yourself takes away abit of the "empowerment".

Someone had mentioned something about accountability. Well it would be distributed soly by me, through my website, which of course has my full name, email address, etc etc on it. Im not to sure incorporating a vile bug or evil code along with my base would be such a smart idea.

But yes i would like input on this please.
19 Apr, 2011, Cratylus wrote in the 20th comment:
Votes: 0
RoFAdmin said:
3) Im honestly not really concerned if anyone does actually make use of my project. I like what i have done enough, think its very robust, and others may find it useful and ingenious, however if the world thinks it sucks cause the core is an exe, well then so be it, no bothers to me cause im still making use of it.


What if it sucks independent of whether it's closed?

Suppose someone jumps on board and uses your secret sauce, then discovers she really needs functionality your
modules do not provide. Or there is a bug that requires a workaround. Or Linux distros now handle time() in a way
you did not foresee. Or, etc etc. And let's say you got a job and a life and a family and stopped caring about
maintaining your secret sauce.

What then? Too bad?

RoFAdmin said:
My goal was never to write an engine for everyone else to use, but to write an engine for me to use and tell everyone else hey if you like my toy you can play with it too.


I think that's great.


RoFAdmin said:
A few of you stated "i would never install a binary on my linux machine". Why is that? Do you have java installed on your linux machine?


I think this objection is somewhat misunderstood. I think most Linux users actually do install binaries, all the time, not
even paying attention to the credentials of the software involved, trusting their distro or repository to be like some
kind of cyber Fort Knox. Not likely, probably an unsafe habit, and widespread. However, it is an error to extrapolate
from this that "Linux users should be ok with running any binary". That is a leap too far.

Distros and repos are certainly not 100% safe and should be trusted sparingly if at all. However, a distro-approved
package is a far far cry from "hey I'm just some guy on the interbutts, run my closed binary. No it's fine, I'm legit.
And my contact info is totally for real. Plus if you sue me because I screwed you up, even intentionally, I'm
totally good for it and you can recover damages because I'm easy to find and have loads of bucks and time
to help you sort out what my secret stuff broke."

Note: I happen to be a totally legit distributor of a compiled exe on the interbutt. But it would not surprise me
or offend me to discover that someone doesn't find my word good enough to run the binary.

-Crat
http://lpmuds.net
0.0/84