Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Bundling for linux release  (Read 3142 times)

0 Members and 1 Guest are viewing this topic.

mongrol

  • Newbie
  • *
  • Posts: 29
    • View Profile
Bundling for linux release
« on: September 10, 2010, 06:48:51 am »
Hi folks,
Can someone tell me how I should be building my linux game to run standalone on other peoples machines without them having to install SFML separately? I assume this involves either bundling the lib.so files or statically linking. What's the standard way of distributing a release on linux?

Xorlium

  • Jr. Member
  • **
  • Posts: 84
    • View Profile
Bundling for linux release
« Reply #1 on: September 10, 2010, 07:06:01 am »
Well, the standard thing to do is to make a .deb or .rpm that doesn't contain the library in question, but rather is required. Most distro's package manager install the requirements when you try to install the package.

mongrol

  • Newbie
  • *
  • Posts: 29
    • View Profile
Bundling for linux release
« Reply #2 on: September 12, 2010, 12:24:23 am »
Hmm, that´s not going to happen. This is a rough techdemo release and there´ll be fast beta style iterations over the coming year. Ive tried bundling the libs in the current directory but it looks like my compiled (I use cmake on linux) binary expects them in /usr/lib. I presume static compiling is the easiest way to acheive what Iḿ after.

Svenstaro

  • Full Member
  • ***
  • Posts: 222
    • View Profile
Bundling for linux release
« Reply #3 on: September 13, 2010, 03:12:19 am »
Most distros have usable SFML packages. If for whatever reason want to do the work yourself, launch the game in a wrapper script using LD_LIBRARY_PATH=path/to/local/libs and put the shared libraries at that path. This approach is dirty and frowned upon. Static linking, the alternative, is error prone.

Really, why not just rely on the distros' SFML packages?

mongrol

  • Newbie
  • *
  • Posts: 29
    • View Profile
Bundling for linux release
« Reply #4 on: September 13, 2010, 05:44:40 am »
If I rely on the distro's SFML package then I can't provide a binary in a tar.gz file as I don't know where the SFML libs will be on the users particular distro. Clearly my only real option at this stage is to provide a source bundle and have them build it myself like most linux releases. I always wondered why Linux binaries outside of distro's never were popular and now I can see why.

Thanks for your help.

Svenstaro

  • Full Member
  • ***
  • Posts: 222
    • View Profile
Bundling for linux release
« Reply #5 on: September 13, 2010, 01:32:07 pm »
If the libs are packaged by the distro you will not have to worry about anything. They will be automatically found. You do not have to put them in place tediously like in Windows.

If you want your own libs with the binary, use the way I described in my last post. It will get you quasi-Windows behavior.

Also, what is the issue with users being able to build their own binaries? I think it is by far the most convenient way and it is easy to package.

 

anything