|
Deploying your allegro game for linux |
Ariesnl
Member #2,902
November 2002
|
I finally switched to Linux (mint) for good.. 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) |
Edgar Reynaldo
Major Reynaldo
May 2007
|
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. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
Ariesnl
Member #2,902
November 2002
|
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.. Perhaps one day we will find that the human factor is more complicated than space and time (Jean luc Picard) |
Edgar Reynaldo
Major Reynaldo
May 2007
|
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
My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
Ariesnl
Member #2,902
November 2002
|
Seems to work ! I'll put up a version this week Perhaps one day we will find that the human factor is more complicated than space and time (Jean luc Picard) |
dthompson
Member #5,749
April 2005
|
I'd recommend giving these bad bois a look too: https://appimage.org/ ______________________________________________________ |
Ariesnl
Member #2,902
November 2002
|
that is a good suggestion dthompson.. btw I've added Khan to the game {"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"} Perhaps one day we will find that the human factor is more complicated than space and time (Jean luc Picard) |
bamccaig
Member #7,536
July 2006
|
Edgar Reynaldo said:
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...) -- acc.js | al4anim - Allegro 4 Animation library | Allegro 5 VS/NuGet Guide | Allegro.cc Mockup | Allegro.cc <code> Tag | Allegro 4 Timer Example (w/ Semaphores) | Allegro 5 "Winpkg" (MSVC readme) | Bambot | Blog | C++ STL Container Flowchart | Castopulence Software | Check Return Values | Derail? | Is This A Discussion? Flow Chart | Filesystem Hierarchy Standard | Clean Code Talks - Global State and Singletons | How To Use Header Files | GNU/Linux (Debian, Fedora, Gentoo) | rot (rot13, rot47, rotN) | Streaming |
Edgar Reynaldo
Major Reynaldo
May 2007
|
Okay, thanks. Wasn't sure if the ENV was inherited or not. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
|