Releasing game with binaries and libraries included

Started by Imerion, October 18, 2009, 03:20:31 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Imerion

I recently finished a game made with Bennu which I want to put on my page for everyone to download. However, I would prefer if I could include the Bennu runtime and the modules/libraries with the game, so whoever download the game won't have to install the whole Bennu package in order to be able to play the game. Any idea how to do that? The most convenient way would be to simply include a folder called "Runtime" or "Lib" or something like that in which all Bennu files are located. But I don't know which files to include and how to make my program look for the files there. Simply using : import "lib\mod_x.so" doesn't seem to work.

Anyone who knows? I tried looking for examples, but found none.
Try my games : Neotron Games

panreyes

What I do is to copy all of Bennu's files (core,externals,libs) to the project's folder, then I rename the bgdi to something according the dcb and then I use packator to get an EXE of everything.
http://www.pixjuegos.com/descargas/PakAtor.exe

Sandman

Why not include the install?

The modules you want to import need to be in a folder in the PATH on Windows (or the same directory as the exe) and on Linux it needs to be in a folder in some other environment variable.
-- Sandman

Imerion

QuoteWhat I do is to copy all of Bennu's files (core,externals,libs) to the project's folder, then I rename the bgdi to something according the dcb and then I use packator to get an EXE of everything.
http://www.pixjuegos.com/descargas/PakAtor.exe

I tried this for the Windows version, and it worked fine. I have loads of files in the main folder, but I guess that is ok. It didn't work with the Linux version though.

QuoteWhy not include the install?

The modules you want to import need to be in a folder in the PATH on Windows (or the same directory as the exe) and on Linux it needs to be in a folder in some other environment variable.

Including the install would make the package quite big and would be rather unconvenient. I want it to be as simple as unzip and run and I really hate it myself when programs and games ask me to install all sorts of other things on my computer. With Fenix, all I needed to do was to include the interpreter and rename it to the same name as the dcb.
But how about pointing out where the libraries are in a start-script or something? The GP2X Wiz port of Bennu does that. Perhaps that can be done on Linux as well, since the Wiz is Linux based?
Try my games : Neotron Games

Sandman

Sure is possible, just reuse that script. But if you ask me, I find an installer or even a link to the installer better, because you only have ONE Bennu on your machine this way (if everyone does it like this). You don't see Java applications have these problems, they just assume you have Java installed.
-- Sandman

Windgate

I always include the necesary DLL files in my projects, you can see how I do it if you download any of my tutorial-videogame-examples:

http://trinit.es/videojuegos/Videojuego%20Tema%204.zip

I solve it with a INCLUDE "import.prg" where I list all the IMPORT "mod_xxx" needed, the DLLs are loaded from a local folder that comes with the videogame.

I started programming Bennu by doing this...
Iván García Subero. Programador, profesor de informática, monitor de actividades culturales y presidente de TRINIT Asociación de Informáticos de Zaragoza. http://trinit.es

Imerion

QuoteSure is possible, just reuse that script. But if you ask me, I find an installer or even a link to the installer better, because you only have ONE Bennu on your machine this way (if everyone does it like this). You don't see Java applications have these problems, they just assume you have Java installed.

I tried reusing that script, but it didn't work. (See below). I can understand what you mean by only having one Bennu version installed. Problem is most people won't bother in that case i'm afraid. It is the same for me with Java. As you mention all java applications assume Java is installed. That is why I never use any Java-based software. To do that, I have to install a >100MB gigantic package, which I don't want to have installed on my computer since I never use Java myself otherwise. And if I remove that program, Java will remain and keep taking up space until I remove it as well.
If I remove a programs folder (or it's package) I want all files associated with it to be gone. Package's do this mostly, but not completely. Most Windows installers don't do that at all and leaves lots of stuff around the file system. Therefore, my favorite solution is to include all the files needed for the game in the games folder, so removing the folder will remove all traces of it.

QuoteI always include the necesary DLL files in my projects, you can see how I do it if you download any of my tutorial-videogame-examples:

http://trinit.es/videojuegos/Videojuego%20Tema%204.zip

I solve it with a INCLUDE "import.prg" where I list all the IMPORT "mod_xxx" needed, the DLLs are loaded from a local folder that comes with the videogame.

I started programming Bennu by doing this...

Thanks, that is just what I was looking for. It only worked for the Windows version though. Still can't get it to work in Linux. I made a script like this :

[code language="bash"]#!/bin/sh
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/Libs
PATH=$PATH:
Libs/bgdc Game.prg
Libs/bgdi Game.dcb[/code]

But it still tells me it cannot find the libraries.
Try my games : Neotron Games

josebita

Quote from: Imerion on October 18, 2009, 04:01:00 PM
Thanks, that is just what I was looking for. It only worked for the Windows version though. Still can't get it to work in Linux. I made a script like this :

[code language="bash"]#!/bin/sh
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/Libs
PATH=$PATH:
Libs/bgdc Game.prg
Libs/bgdi Game.dcb[/code]

But it still tells me it cannot find the libraries.

Try this:

[code language="bash"]#!/bin/sh
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:Libs
PATH=$PATH:
Libs/bgdc Game.prg
Libs/bgdi Game.dcb[/code]
Without the slash.

DCelso

To distribute your game in a standarlone linux version you need the next structure directories and files:

bgdruntime/bgdi
bgdruntime/jpeg.so
bgdruntime/libbgdrtm.so
bgdruntime/libblit.so
bgdruntime/libdraw.so
bgdruntime/libfont.so
bgdruntime/libgrbase.so
bgdruntime/libjoy.so
bgdruntime/libkey.so
bgdruntime/libmouse.so
bgdruntime/libpng-3.so
bgdruntime/libpng1.so
bgdruntime/libpng12-0.so
bgdruntime/librender.so
bgdruntime/libscroll.so
bgdruntime/libsdlhandler.so
bgdruntime/libtext.so
bgdruntime/libvideo.so
bgdruntime/libwm.so
bgdruntime/mod_blendop.so
bgdruntime/mod_cd.so
bgdruntime/mod_crypt.so
bgdruntime/mod_debug.so
bgdruntime/mod_dir.so
bgdruntime/mod_draw.so
bgdruntime/mod_effects.so
bgdruntime/mod_file.so
bgdruntime/mod_flic.so
bgdruntime/mod_grproc.so
bgdruntime/mod_joy.so
bgdruntime/mod_key.so
bgdruntime/mod_m7.so
bgdruntime/mod_map.so
bgdruntime/mod_math.so
bgdruntime/mod_mem.so
bgdruntime/mod_mouse.so
bgdruntime/mod_path.so
bgdruntime/mod_proc.so
bgdruntime/mod_rand.so
bgdruntime/mod_regex.so
bgdruntime/mod_say.so
bgdruntime/mod_screen.so
bgdruntime/mod_scroll.so
bgdruntime/mod_sort.so
bgdruntime/mod_sound.so
bgdruntime/mod_string.so
bgdruntime/mod_sys.so
bgdruntime/mod_text.so
bgdruntime/mod_time.so
bgdruntime/mod_timers.so
bgdruntime/mod_video.so
bgdruntime/mod_wm.so
bgdruntime/ogg.so
bgdruntime/SDL.so
bgdruntime/SDL_image.so
bgdruntime/SDL_mixer.so
bgdruntime/vorbis.so
bgdruntime/vorbisfile.so
bgdruntime/zlib.so
bgdruntime/zlib1.so

run_me.sh
Game.dcb

When Game.dcb is your dcb of your game
And run_me.sh is a script that has the next lines

#!/bin/sh
LD_LIBRARY_PATH=./bgdruntime:$LD_LIBRARY_PATH
PATH=./bgdruntime:$PATH
bgdi Game.dcb

You must put the original variable at the end of the line because if you would have another version of BennuGD installed in your system, the systen would use it instead your standarlone version of linux..
And you must put the directory in the path too. It causes that you can run it in any directory without the necessity to put the full path.
Monstruos Diabólicos

"A PAck of classic GAMEs For BennuGD" en desarrollo
http://code.google.com/p/apagame4be/

Imerion

Now I got it to work! Thanks DCelso, that method worked fine. It also seems that I could not use the version packaged in the PPA. No idea why, but it wouldn't look for the libraries in any other place than the original. The version from this page worked all right though. josebita, you might want to take a look at your PPA. I believe I have the latest version of the packages, but the files are different somehow.
Try my games : Neotron Games

Imerion

Seems I posted to fast. The downloaded version was RC10, the version from the PPA was RC8. Perhaps that is why the RC8 version didn't work but the RC10 version did. That feature was added later on. Anyway, thanks everyone for the help! Ill release the game soon if you want to try it.
Try my games : Neotron Games

DCelso

Monstruos Diabólicos

"A PAck of classic GAMEs For BennuGD" en desarrollo
http://code.google.com/p/apagame4be/

Sandman

Quote from: Windgate on October 18, 2009, 02:40:49 PM
I solve it with a INCLUDE "import.prg" where I list all the IMPORT "mod_xxx" needed, the DLLs are loaded from a local folder that comes with the videogame.
You can also create a file called "game.import" or "game.imp" if your main prg is called "game.prg" and list the modules there.

Quote from: Imerion on October 18, 2009, 04:01:00 PM
I can understand what you mean by only having one Bennu version installed. Problem is most people won't bother in that case i'm afraid.
You can have multiple packages, catering to all the needs of your customers. A package for someone who has the Bennu VM installed (multiplatform), a package for Windows user, a package for Linux user.

Quote from: Imerion on October 18, 2009, 04:01:00 PM
It is the same for me with Java. As you mention all java applications assume Java is installed. That is why I never use any Java-based software. To do that, I have to install a >100MB gigantic package, which I don't want to have installed on my computer since I never use Java myself otherwise. And if I remove that program, Java will remain and keep taking up space until I remove it as well.
Are you serious you call 100MB gigantic? In these times of terabytes? Just to visualize it: you can fit 10000 of those Java installs on a 1TB drive. That's just an argument for the sake of having an argument. Secondly, if you use your method, you get a 100MB 'gigantic' file for every piece of software that uses it. Of course it's easier to just include it in the package, but don't come with an argument about space usage then.

Quote from: Imerion on October 18, 2009, 04:01:00 PM
If I remove a programs folder (or it's package) I want all files associated with it to be gone. Package's do this mostly, but not completely. Most Windows installers don't do that at all and leaves lots of stuff around the file system. Therefore, my favorite solution is to include all the files needed for the game in the games folder, so removing the folder will remove all traces of it.
Most Windows installers clean up the filesystem very nicely and ask if you want to keep any files. The Windows Installer system is a handy tool for making installers. It provides a safe (well relatively... it's still Windows) environment, tracks changes and can create restore points automatically. If a Windows Installer did not do this right, it is because the *creator* of the installer didn't do it right. This doesn't mean *your* installer has to be bad. Their use in amateur games is of course limited, so an archive containing the game suffices.

Well, I take it you're not a fan of a BennuGD.msi. Too bad really, I'm of the opinion it's the future. Maybe my views are too broad.
-- Sandman

SplinterGU

#13
well 100mb is too much for me too.

cool msi, yes...
Download Lastest BennuGD Release: http://www.bennugd.org/node/2

josebita

The packages in the PPA are RC10 now, and should've been RC9 by when you posted. Have you updated your system lately?

Also, are you saying that the packages from the PPA don't work at all or that they didn't work for the kind of install you're doing?