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

Author Topic: How to make standalone .deb package of app using self-compiled sfml  (Read 2034 times)

0 Members and 2 Guests are viewing this topic.

netrick

  • Full Member
  • ***
  • Posts: 174
    • View Profile
So I have an app which uses sfml compiled by me (because I needed two fixes that appeared after sfml 2 release). My question is how can I make a debian/ubuntu package which will provide my app and all the required shared libs (sfml and its dependencies)?

The only solution I can think of is to static link everything, but that's a lot of time finding out how to static link every dependency. I think there must be some better way. Maybe it's possible to put every .so file in app directory and tell the executable to look for libs in its directory? I think cx_freeze uses this approach on linux.

Mario

  • SFML Team
  • Hero Member
  • *****
  • Posts: 879
    • View Profile
Re: How to make standalone .deb package of app using self-compiled sfml
« Reply #1 on: June 21, 2013, 10:57:53 am »
More like an ugly hack, but for my LD26 game I just wrote a small shell script as a wrapper, which launches the game and tells it to specifically look for dependencies in the current directory:

#/bin/sh
LD_LIBRARY_PATH="." ./game

Although keep in mind that this is far from being perfect and might be nothing for something that's supposed to be called from a different working directory (i.e. installed).

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11032
    • View Profile
    • development blog
    • Email
AW: How to make standalone .deb package of app using self-compiled sfml
« Reply #2 on: June 21, 2013, 12:24:04 pm »
It's not an ugly hack at all, but the way many games deploy on Linux platforms, where you need a certain version of a library. ;)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/