Allegro.cc - Online Community

Allegro.cc Forums » Programming Questions » Deploying your allegro game for linux

This thread is locked; no one can reply to it. rss feed Print
Deploying your allegro game for linux
Ariesnl
Member #2,902
November 2002
avatar

I finally switched to Linux (mint) for good..
And I use Code:: blocks as an IDE, so I'm not realy used to makefiles.

Can anyone tell me step by step how I should bundle my game so others can install and play the game ?

I have no problem with releasing my code, it's open source anyway !

Perhaps one day we will find that the human factor is more complicated than space and time (Jean luc Picard)
Current project: [Star Trek Project ] Join if you want ;-)

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

Static link as much as you can (You can't static link everything) and then use ldd to determine which .so libraries your program depends on. Package those with your game, and use a startup script to add the library path to LD_LIBRARY_PATH at runtime.

Ariesnl
Member #2,902
November 2002
avatar

I found this nice command: ldd file | grep "=> /" | awk '{print $3}' | xargs -I '{}' cp -v '{}' /destination

So all used .so libs are now in a "shared" folder in the root of my release version..
Now how would that startup script look like ?

Perhaps one day we will find that the human factor is more complicated than space and time (Jean luc Picard)
Current project: [Star Trek Project ] Join if you want ;-)

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

It's really simple :

runme

export OLD_PATH=$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=./shared/:$LD_LIBRARY_PATH
./mygame
export LD_LIBRARY_PATH=$OLD_PATH

Ariesnl
Member #2,902
November 2002
avatar

Seems to work !
Thnx..

I'll put up a version this week ;D;)

Perhaps one day we will find that the human factor is more complicated than space and time (Jean luc Picard)
Current project: [Star Trek Project ] Join if you want ;-)

dthompson
Member #5,749
April 2005
avatar

I'd recommend giving these bad bois a look too: https://appimage.org/

______________________________________________________
I'm on the web. You may have been told my domain was freakdesign.bafsoft.net, but these were lies.
This isn't a game!

Ariesnl
Member #2,902
November 2002
avatar

that is a good suggestion dthompson..

btw I've added Khan to the game ;D

{"name":"1k0.jpg","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/5\/d\/5d597f042927deb810c7d9edf079df31.jpg","w":1024,"h":768,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/5\/d\/5d597f042927deb810c7d9edf079df31"}1k0.jpg

Perhaps one day we will find that the human factor is more complicated than space and time (Jean luc Picard)
Current project: [Star Trek Project ] Join if you want ;-)

bamccaig
Member #7,536
July 2006
avatar

export LD_LIBRARY_PATH=$OLD_PATH

No need to restore it. The script is executed in a subprocess with its own copy of the environment. When the script exits the process ends and the shell that spawned it takes control again with its original environment.

(That is not generally the case with batch scripting in DOS/Windows, but in Unix-like systems I think all of the shells operate that way...)

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

Go to: