No subject


Thu Oct 26 19:20:09 CEST 2017


> > I want to run my gambas2-application from USB-FLASH-DISK on the
> > computers, that do not have gambas2 installed.
> >
> > There is a folder on my USB-FLASH-DISK with my application and
> > subfolders:
> > 1) "bin", includes files "gba2", "gbc2", "gbi2", "gbx2", soft links;
> > 2) "lib", includes files "*.so.0.0.0", "*.component", "*.gambas", soft
> > links;
> > 3) "share", includes "icons/*.png", "info/*" (strange files),
> > "mime/*.xml".
> > It also includes bash-script for copying all above to system
> > folders /usr/bin/, /usr/lib/ and /usr/share.
> >
> > Can I run my application with just some command, without copying?
>=20
> Alas the interpreter relies on the /usr/bin/gbx2(or 3) symbolic link to
>  know where Gambas is installed, so you cannot run gambas from a USB disk.
>=20
> But we can imagine an environmental variable that tells where Gambas is
> installed, without relying on a symbolic link. This will solve the first
> problem.
>=20
> But now you must have all shared libraries directly or indirectly used by
> Gambas on your USB disk, which may be huge. To know them, you must run
>  "ldd" on each shared library of each component used by your project.
>=20
> And you won't be able to run Gambas executables directly as they find the
> interpreter with "#!/usr/bin/env gbr2", but by changing the PATH variable
>  so that the gbr2 symbolic link on the USB disk is found first, it will
>  run!
>=20
> I will tell you when I make the environmental variable change. His name
>  will be something like GB_DIR, or GB_ROOT.
>=20

With the revision #2401, you can define a GB_DIR environment variable that=
=20
points at the Gambas installation directory.

With that, you should be able to run Gambas from your USB key, provided tha=
t=20
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 Gam=
bas=20
completely, by using the LD_LIBRARY_PATH environment variable.

Regards,

--=20
Beno=C3=AEt Minisini




More information about the User mailing list