How to distribute 64-bit build?BlitzMax Forums/BlitzMax NG/How to distribute 64-bit build?
| Hi all, so another noob question. I read this thread: http://www.blitzbasic.com/Community/posts.php?topic=106416|
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?)
| 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".
| 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:
linux-vdso.so.1 => (0x00007ffe0ff8f000) libGL.so.1 => /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1 (0x00007f59e464b000) libGLU.so.1 => /usr/lib/x86_64-linux-gnu/libGLU.so.1 (0x00007f59e43dd000) libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f59e41d8000) libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f59e3ed4000) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f59e3bce000) libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f59e39af000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f59e35ea000) libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f59e33d4000) /lib64/ld-linux-x86-64.so.2 (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:
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.
| Thanks all. So I ran ldd on my game and got this:|
jake@jake-virtual-machine:~/Desktop/Jake/Regency Solitaire/source$ ldd ./RegencySolitaire linux-vdso.so.1 => (0x00007ffe334a1000) libGL.so.1 => /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1 (0x00007f856b020000) libGLU.so.1 => /usr/lib/x86_64-linux-gnu/libGLU.so.1 (0x00007f856adb2000) libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f856abad000) libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f856a8a9000) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f856a5a3000) libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f856a384000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f8569fbf000) libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x00007f8569d95000) libglapi.so.0 => /usr/lib/x86_64-linux-gnu/libglapi.so.0 (0x00007f8569b66000) libXext.so.6 => /usr/lib/x86_64-linux-gnu/libXext.so.6 (0x00007f8569954000) libXdamage.so.1 => /usr/lib/x86_64-linux-gnu/libXdamage.so.1 (0x00007f8569751000) libXfixes.so.3 => /usr/lib/x86_64-linux-gnu/libXfixes.so.3 (0x00007f856954a000) libX11-xcb.so.1 => /usr/lib/x86_64-linux-gnu/libX11-xcb.so.1 (0x00007f8569348000) libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007f8569013000) libxcb-glx.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-glx.so.0 (0x00007f8568dfb000) libxcb-dri2.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-dri2.so.0 (0x00007f8568bf6000) libxcb-dri3.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-dri3.so.0 (0x00007f85689f3000) libxcb-present.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-present.so.0 (0x00007f85687ef000) libxcb-sync.so.1 => /usr/lib/x86_64-linux-gnu/libxcb-sync.so.1 (0x00007f85685e9000) libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007f85683ca000) libxshmfence.so.1 => /usr/lib/x86_64-linux-gnu/libxshmfence.so.1 (0x00007f85681c7000) libXxf86vm.so.1 => /usr/lib/x86_64-linux-gnu/libXxf86vm.so.1 (0x00007f8567fc1000) libdrm.so.2 => /usr/lib/x86_64-linux-gnu/libdrm.so.2 (0x00007f8567db3000) libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f8567b9c000) /lib64/ld-linux-x86-64.so.2 (0x000055750ad71000) libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007f8567998000) libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (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.
| 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.
| 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. |