How to distribute 64-bit build?

BlitzMax Forums/BlitzMax NG/How to distribute 64-bit build?

Grey Alien(Posted 2016) [#1]
Hi all, so another noob question. I read this thread:

But I'm still none the wiser.

I've compiled the game with NG and have an .exe and my data folder. Is that all I need? Or do I need to include some dependencies somehow?

Should I zip it or tarball or whatever it (can I do that natively in Ubuntu 14.04 or do I need an app to do it?)


Derron(Posted 2016) [#2]
You define for what distribution you provide your game. And with your distribution definition, you get the guidelines to follow.

If you have dependencies to fulfill, create a .deb (for debian-based distros) - think of it as an "setup.exe". If you think the users are able to satisfy dependencies on their own, you just "zip" your game+assets (or tar.gz ...).

The second option (zip) is like an "portable app" (without libs).

Ok, so what does it need?

Install the VM-Software of your choice (eg. VirtualBox) install the Linux Distribution you want to target in a VM. Create a Snapshot (so you could go back each time). And then check what you need to install to make it work there... and this is, what you write in a "Installation.txt/readme.txt" or what is defined in your deb-package then (think Dawlane is surely able to write more about that).

Maybe he is now able to provide his "package maker script".


Brucey(Posted 2016) [#3]
If your game doesn't have any obvious outside dependencies, you can probably get away with a tar.gz (or tar.xz, or whatever is favourite at the moment)

For example, here's an example of library dependencies for a 64-bit BlitzMax app: =>  (0x00007ffe0ff8f000) => /usr/lib/x86_64-linux-gnu/mesa/ (0x00007f59e464b000) => /usr/lib/x86_64-linux-gnu/ (0x00007f59e43dd000) => /lib/x86_64-linux-gnu/ (0x00007f59e41d8000) => /usr/lib/x86_64-linux-gnu/ (0x00007f59e3ed4000) => /lib/x86_64-linux-gnu/ (0x00007f59e3bce000) => /lib/x86_64-linux-gnu/ (0x00007f59e39af000) => /lib/x86_64-linux-gnu/ (0x00007f59e35ea000) => /lib/x86_64-linux-gnu/ (0x00007f59e33d4000)
	/lib64/ (0x0000563572ccf000)

This particular app uses SDL and plays audio, but there's no specific audio libraries required here in the list - SDL loads these at runtime.
So in this case you could assume that the app would have a good chance to run on a basic Ubuntu installation.

To find runtime shared library dependencies, you can run the following command against your binary:
ldd <appname>

where <appname> might be something like ./MyGame
(note the dot-slash prefix for pointing to binaries in the local directory. Otherwise you can use a full-path)

If you are intending to ship your game as part of a packaged distribution, you may want to ask them if they have any specific requirements as far as packaging is concerned.

Grey Alien(Posted 2016) [#4]
Thanks all. So I ran ldd on my game and got this:
jake@jake-virtual-machine:~/Desktop/Jake/Regency Solitaire/source$ ldd ./RegencySolitaire =>  (0x00007ffe334a1000) => /usr/lib/x86_64-linux-gnu/mesa/ (0x00007f856b020000) => /usr/lib/x86_64-linux-gnu/ (0x00007f856adb2000) => /lib/x86_64-linux-gnu/ (0x00007f856abad000) => /usr/lib/x86_64-linux-gnu/ (0x00007f856a8a9000) => /lib/x86_64-linux-gnu/ (0x00007f856a5a3000) => /lib/x86_64-linux-gnu/ (0x00007f856a384000) => /lib/x86_64-linux-gnu/ (0x00007f8569fbf000) => /lib/x86_64-linux-gnu/ (0x00007f8569d95000) => /usr/lib/x86_64-linux-gnu/ (0x00007f8569b66000) => /usr/lib/x86_64-linux-gnu/ (0x00007f8569954000) => /usr/lib/x86_64-linux-gnu/ (0x00007f8569751000) => /usr/lib/x86_64-linux-gnu/ (0x00007f856954a000) => /usr/lib/x86_64-linux-gnu/ (0x00007f8569348000) => /usr/lib/x86_64-linux-gnu/ (0x00007f8569013000) => /usr/lib/x86_64-linux-gnu/ (0x00007f8568dfb000) => /usr/lib/x86_64-linux-gnu/ (0x00007f8568bf6000) => /usr/lib/x86_64-linux-gnu/ (0x00007f85689f3000) => /usr/lib/x86_64-linux-gnu/ (0x00007f85687ef000) => /usr/lib/x86_64-linux-gnu/ (0x00007f85685e9000) => /usr/lib/x86_64-linux-gnu/ (0x00007f85683ca000) => /usr/lib/x86_64-linux-gnu/ (0x00007f85681c7000) => /usr/lib/x86_64-linux-gnu/ (0x00007f8567fc1000) => /usr/lib/x86_64-linux-gnu/ (0x00007f8567db3000) => /lib/x86_64-linux-gnu/ (0x00007f8567b9c000)
	/lib64/ (0x000055750ad71000) => /usr/lib/x86_64-linux-gnu/ (0x00007f8567998000) => /usr/lib/x86_64-linux-gnu/ (0x00007f8567791000)

That's quite a big list. That's from a clean Ubuntu 14.04 + a script from Brucey's site to install dependencies for NG.

I'll verify if my exe runs on a vanilla setup and report back.

Derron(Posted 2016) [#5]
If it does not run... call ldd ./RegencySolitaire on that vanilla setup.

It then lists again the libraries...but on the right hand it does no longer show the found path...
these are the libs which need to get installed in addition.

Btw ignore these entries like the first line...they are special files.


Grey Alien(Posted 2016) [#6]
Turns out it does run on vanilla 14.04 without updated libs according to Brucey, so yay! That means a reasonably complex game using Brucey's SDL for gfx/sound doesn't need anything extra. Just the exe and data.