Portable Gambas Application (on USB)

Post Reply
alexchernoff
Posts: 3
Joined: Wednesday 16th May 2018 12:21pm

Portable Gambas Application (on USB)

Post by alexchernoff » Wednesday 16th May 2018 12:25pm

Hello!

I am trying to make an application that runs off a USB stick. Is it possible to inslude all Gambas components and runtimes in one place so it can run an application without installing?

Anyone done that before?

cheers!

User avatar
cogier
Site Admin
Posts: 164
Joined: Wednesday 21st September 2016 2:22pm
Location: Guernsey, Channel Islands

Re: Portable Gambas Application (on USB)

Post by cogier » Wednesday 16th May 2018 3:37pm

Welcome to the forum

This was fun! ;)

I booted a live DVD of Lubuntu 17.10 from a Linux magazine DVD.

I took a 16GB USB3 pen drive and following the instructions from here https://askubuntu.com/questions/450354/ ... -usb-drive installed Lubuntu on to the USB. Don't rush this bit or it won't work. Make sure you include a swap file, I allowed about 2 GB for this, and that you make the installer install Grub on your USB, not on the default hard drive.

Once I had a working USB I installed Gambas 3.11.2 with

Code: Select all

sudo add-apt-repository -y ppa:gambas-team/gambas3 && sudo apt-get update && sudo apt-get -y install gambas3
Using USB3 ports the install was fast and only used 3.2GB, including Gambas, so I thought I would try the whole process with Mint 18.3 complete with the Cinnamon desktop. This used 6GB but the install felt faster that using a standard hard drive. As I am more familiar with Mint I downloaded a program from the Gambas Farm, set it up to start on booting and it worked just fine.

I hope that helps, let us know how you get on.

alexchernoff
Posts: 3
Joined: Wednesday 16th May 2018 12:21pm

Re: Portable Gambas Application (on USB)

Post by alexchernoff » Wednesday 16th May 2018 6:11pm

Running an entire OS from USB is fun... But I wanted even leaner than that, so i have only the gambas bytecode application, gbr3 interpreter and the component files, nothing else. Target systems are all Linux Mint or Debian and can run a full Gambas (if installed), but I need to run the application without installing anything on the host OS.

Is that possible?

User avatar
cogier
Site Admin
Posts: 164
Joined: Wednesday 21st September 2016 2:22pm
Location: Guernsey, Channel Islands

Re: Portable Gambas Application (on USB)

Post by cogier » Friday 18th May 2018 12:11pm

I have had a think about this and whatever you do you will need to install the Gambas runtime code on the target computer and depending on what version of Gambas you are using will depend on which version you will need to install on the target machine.

It seems to me that the best way would be to install Gambas on the target machines using the ppa so that any updated versions of Gambas will update automatically with the normal software updates.

You can then just have the MyProg.gambas file on your USB drive and away you go.

Unless someone else has a better way of doing this...

alexchernoff
Posts: 3
Joined: Wednesday 16th May 2018 12:21pm

Re: Portable Gambas Application (on USB)

Post by alexchernoff » Friday 18th May 2018 4:56pm

What if all the libs of /usr/lib/gambas3 and the gbr3 interpreter were in same directory on USB as the executable? (and suppose host OS libs are all compliant with the Gambas version)

Or... alternatively... Does one have to install the entire Gambas3 package just to run an application? Maybe thgutere's a smoother, leaner way to do that. Like a "runtime" in the old days.

Cheers and good/bon/gut weekend!

stevedee
Posts: 74
Joined: Monday 20th March 2017 6:06pm

Re: Portable Gambas Application (on USB)

Post by stevedee » Saturday 19th May 2018 7:19am

Don't give up hope!

It should be possible to build most programs to run from a memory stick on Linux, just as its possible on Windows with the excellent "PortableApps.com"

In fact I think that some of the apps I'm using on Lubuntu are running OK but not integrated into the system (e.g. Shotcut, WikidPad...).

So I think the program 'just' needs to be built with all dependancies included or references to the right locations. When I say 'just' I'm not implying that this is a trivial task.

I'm a bit pushed for time at the moment, but my starting point would be to download Shotcut to a memory stick and see if it runs. Then take a close look at how its packaged.

Alternatively you could ask Benoit (http://gambas.8142.n7.nabble.com/templa ... des&user=3)

didier18
Posts: 31
Joined: Monday 19th December 2016 10:08pm

Re: Portable Gambas Application (on USB)

Post by didier18 » Saturday 19th May 2018 8:35am

Hello

alexchernoff@ if i understand what you want to do, it's create a runtime application, so that it can be executed without gambas3?

To make it simple, you need to put all the gambas3 packages that match the components you used in your application + the runtime package + all dependencies and make one of them the package.

For example if in your application you use the gb.gui.trayicon component, you will need to get the gambas3-gb-dbus-trayicon_3.11.2 package (i386 or armf or amd64).deb + the gambas3-runtime_3.11.2 package (i386 or armf or amd64).deb...
- Uncompress all".deb" packages.
- Satisfy all dependencies...
- then finally create your archive.

I don't hide from you that the search for and satisfaction of addictions is a real nightmare...
I have developed a help for this task (click on me)

Besides this help is a runtime for puppy distributions and does not need gambas3 to work ;-)

Edit
A short video example (click on me)

Have a nice day.

User avatar
jornmo
Site Admin
Posts: 154
Joined: Wednesday 21st September 2016 1:19pm
Location: Norway

Re: Portable Gambas Application (on USB)

Post by jornmo » Monday 21st May 2018 3:07pm

I think that will be a bit like bingo. Gambas depends on a great many libraries, which again depend on even more libraries. So putting Gambas on the stick along with your program will not suffice. But, you could perhaps use some containers or VMs for this purpose.

User avatar
jornmo
Site Admin
Posts: 154
Joined: Wednesday 21st September 2016 1:19pm
Location: Norway

Re: Portable Gambas Application (on USB)

Post by jornmo » Tuesday 22nd May 2018 7:55pm


Post Reply