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

Author Topic: Where to deliver shared libaries during installation ?  (Read 1733 times)

0 Members and 1 Guest are viewing this topic.

emmu

  • Newbie
  • *
  • Posts: 2
    • View Profile
Where to deliver shared libaries during installation ?
« on: July 23, 2013, 11:19:40 pm »
Hello all,

i finished a Plattformer Game  in C++ and SFML. Now i want to share it public for Windows and Linux. Now my Question is, what to do with the SFML libaries who are required for the game. Its easy to link it static but i think its a little bit uncommon on Linux.

Do you have a suggestion how to store the libaries on the enduser system while installation of my game?

I think on Linux i write a little script who check first and if the libaries not exist copy them  in the standardpath /usr/local/lib. But where to make it on Windows Systems ?

How you handle it?

best regards

Emmu
« Last Edit: July 23, 2013, 11:21:22 pm by emmu »

Atani

  • Newbie
  • *
  • Posts: 30
    • MSN Messenger - atanisoft@hotmail.com
    • AOL Instant Messenger - AtaniSYSOP
    • Yahoo Instant Messenger - atanisoft
    • View Profile
    • Email
Re: Where to deliver shared libaries during installation ?
« Reply #1 on: July 23, 2013, 11:23:46 pm »
For windows, you can package the dll files in the same directory as your main program and they will be picked up automatically.

For linux, it would depend on your packaging.  If you are releasing via rpm/deb/etc you can set a dependency on the packages providing the runtime library bits you require.  Another option is to specify LD_LIBRARY_PATH in a sh script to point to your own lib directory, don't overwrite the value but append it as:
LD_LIBRARY_PATH=<my lib dir>:$LD_LIBRARY_PATH

I would not recommend polluting /usr/local/lib with any pre-compiled libraries you deliver unless they are part of your game!

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11033
    • View Profile
    • development blog
    • Email
Re: Where to deliver shared libaries during installation ?
« Reply #2 on: July 23, 2013, 11:24:48 pm »
I think on Linux i write a little script who check first and if the libaries not exist copy them  in the standardpath /usr/local/lib.
You probably don't want to do that, since you'll probably need superuser rights and it might override the existing libraries. But I can't say what best practice is on Linux.

But where to make it on Windows Systems ?
You simply put the DLLs next to the exe.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

emmu

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Where to deliver shared libaries during installation ?
« Reply #3 on: July 23, 2013, 11:47:11 pm »
Oh - thanks you two! That helps me a lot.