[Gambas-user] Run Gambas on a USB key
Benoît Minisini
gambas at ...1...
Mon Nov 2 18:49:31 CET 2009
> Benoît Minisini escribió:
> > With the revision #2401, you can define a GB_DIR environment variable
> > that points at the Gambas installation directory.
> >
> > With that, you should be able to run Gambas from your USB key, provided
> > that the destination O.S. has all the needed shared libraries installed.
> >
> > You can put all the needed shared libraries on the USB key too, and run
> > Gambas completely, by using the LD_LIBRARY_PATH environment variable.
> >
> > Regards,
>
> That's great!!
>
> Any pointers about how to accomplish this, would be greatly appreciated.
> Also if someone success with it, please post your experiences, I'm big
> ears...
>
> Regards,
>
> Jesús
>
You must:
0) Run ldd on the *.so files of all gambas components used by your application
to make a list of needed shared libraries. Don't forget to run ldd on the
interpreter.
1) Put all detected shared libraries in a folder. Let's name it "/my/ld/dir"
2) Copy a gambas installation directory in another folder. Let's name it
"/my/gambas/dir".
3) Create a script like that:
#!/bin/sh
export LD_LIBRARY_PATH=/my/ld/dir:$LD_LIBRARY_PATH
export GB_DIR=/my/gambas/dir
exec /my/application.gambas
This is just the principle. To make that cleanly, you must detect the current
directory in your script, and build /my/ld/dir and /my/gambas/dir absolute
paths from path relative to the current directory. You should check that the
running system has the good architecture too.
If somebody succeeds in doing that, please tell. A good guy would be able to
even create a wizard for the IDE that would do the job automatically. I don't
have the time for that at the moment!
Regards,
--
Benoît Minisini
More information about the User
mailing list