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

Author Topic: SFML2: Bundling for linux release  (Read 3725 times)

0 Members and 1 Guest are viewing this topic.

MarsCoreTeam

  • Newbie
  • *
  • Posts: 33
    • View Profile
    • http://www.marsshooter.org
SFML2: Bundling for linux release
« on: September 25, 2010, 09:30:35 pm »
Hello there!

I've got pretty much the same question, as mongrol a week ago. But now it targets SFML2!
For our  project M.A.R.S. we use SFML2. Distributing executables for Windows is easy and works like a charm.
But since we are mainly developing this game under Linux, we want to provide precompiled versions for Linux as well. So there we go:

Is there any more convenient way to do this than proposed by Svenstaro?

Quote
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.


Since SFML2 is in no repository, creating Deb's is no real solution, isn't it?

Greetings,
Simon.

Btw: SFML is awesome!!!
Working on the Open Source Project M.A.R.S.

Avency

  • Full Member
  • ***
  • Posts: 113
    • View Profile
SFML2: Bundling for linux release
« Reply #1 on: September 26, 2010, 12:51:36 am »
You could use cmake to create static libraries and link against those.

Svenstaro

  • Full Member
  • ***
  • Posts: 222
    • View Profile
SFML2: Bundling for linux release
« Reply #2 on: September 27, 2010, 01:47:12 am »
Using LD_LIBRARY_PATH you get more or less the behavior you see on Windows. I figure this will let you achieve what you are trying to do easily.

You get the same disadvantages you will also get on Windows with this method: It is not nice since it isn't being maintained, tracked and updated by the system package manager and doesn't share memory if you are running multiple SFML applications.

This method is easier than static linking. If you link statically (if you also put libgcc and libstdc++ into it) you will lose exceptions as per gcc manual.

MarsCoreTeam

  • Newbie
  • *
  • Posts: 33
    • View Profile
    • http://www.marsshooter.org
SFML2: Bundling for linux release
« Reply #3 on: September 27, 2010, 12:18:07 pm »
Thanks for your advice!

I wrote the following script:
Code: [Select]

#!/bin/bash

LD_LIBRARY_PATH=${PWD}/lib/:${LD_LIBRARY_PATH}
export LD_LIBRARY_PATH
exec ${PWD}/main


For me (linux Mint 64 bit) and another PC (ubuntu 64 bit)  it worked quite well. In order to test it, you may download from Sourceforge: http://sourceforge.net/projects/mars-game/
Any feedback concerning compatibility is highly appreciated!  :wink:

Greetings, Simon.
Working on the Open Source Project M.A.R.S.

Svenstaro

  • Full Member
  • ***
  • Posts: 222
    • View Profile
SFML2: Bundling for linux release
« Reply #4 on: September 27, 2010, 01:31:14 pm »