[Gambas-user] Gambas Version swapper (WIP)

Bruce Steers bsteers4 at gmail.com
Mon May 30 18:55:53 CEST 2022


On Mon, 30 May 2022 at 17:44, Benoit Minisini <
benoit.minisini at gambas-basic.org> wrote:

> Le 30/05/2022 à 18:40, Bruce Steers a écrit :
> > I got this program that now seems to work..
> > It's called GambasVersionSwapper
> >
> > Here's the Readme....
> >
> >   Gambas3VersionSwapper
> >
> >   By Bruce Steers
> >
> >   Description...
> >
> > A utility for swapping different versions of Gambas3.
> >
> > It simply copies or moves the gambas3 files in /usr/bin ,
> > /usr/lib/gambas3 and /usr/share/gambas3 to a directory in
> > $HOME/.config/GambasVersionSwapper/ and then can restore them.
> >
> > It can also backup/restore the files in $HOME/.local.share/gambas3 that
> > contain help files and examples/downloaded software from the farm, but
> > this folder can be very large so it is an option.
> >
> > It can also backup/restore the files in $HOME/.config/gambas3 that are
> > the gambas settings for both the IDE and any programs using the
> > Settings.class, this is also an otion not selected by default.
> >
> >
> > ## How to use...
> >
> > Load the program...
> >
> > ### Step 1:
> > Press "Save current config" or "Store current config" to make a backup
> > of the current gambas3 installation.
> >
> > The difference between "Save" and "Store" is "Save" just copies the
> > files and leaves your installed
> > gambas3 files where they are, but "Store" moves them (they are removed
> > from their location for a
> > cleaner install)
> >
> > Step 2:
> > After Saving/Storing the installation quit the program, uninstall
> > gambas3 then install a different gambas3 version.
> >
> > Step 3:
> > Repeat Step 1 to backup the new version
> >
> > A list is populated with the available saved versions and you can now
> > switch between them by either double clicking one in the list or
> > pressing the "Load Version" button.
> >
> > Notes:
> >
> > This program is primarily designed for people who compile gambas from
> > source using [the autotools method](http://gambaswiki.org/wiki/install)
> > <http://gambaswiki.org/wiki/install)>.\
> > If you have gambas installed with your package manager from either your
> > OS repositories or via the gambas PPA (apt,dnf,pacman,etc) it may work
> > but could cause issues with the installed version not matching the
> > version the package manager thinks is installed so i would not recommend
> > using it.
> >
> >
> > Files always saved/restored are...
> > * /usr/bin/gb*3
> > * /usr/bin/gambas\*
> > * /usr/lib/gambas3/\*
> > * /usr/share/gambas3/\*
> >
> > Files not saved/restored by default but can be enabled in the options
> > menu...
> > * $HOME/.config/gambas3/\*  (gambas settings files)
> > * $HOME/.local/share/gambas3/\*  (wiki help, examples, software
> > installed from farm, this folder can be very large)
> >
> > Screenshot...
> > https://bws.org.uk/images/GVS.png <https://bws.org.uk/images/GVS.png>
> >
> > Any suggestions to improve are welcome,
> > or if it's a terrible idea then why?
> >
> > I can now switch from dev to stable in a couple of seconds without
> > compiling.
> > it does what is described above copying the main gambas stuff (have i
> > missed anything?)
> >
> > Todo:
> > will probably make my own copy routine and stop using shell "cp" (and rm)
> >
> > Was thinking of making it rename old folders in the same location and
> > not copy to $HOME and delete them?
> >
> > It is VERY beta.
> > i've attached an archive, if gmail blocks it i'll reply with another but
> > it's also on gitlab...
> > git clone https://gitlab.com/bsteers4/gambasversionswapper.git
> > <https://gitlab.com/bsteers4/gambasversionswapper.git>
> >
> > Wishing Well
> > BruceS
> >
>
> Why don't you simply use symbolic links of directories instead of moving
> and/or copying files?
>
> --
> Benoît Minisini.
>

hmm, because i've never really used links so don't really have a clue what
to do.

do you mean something like simply rename the folders and make things like
/usr/lib/gambas3 a link to the folder, and the program just change the
links?
I'll have to investigate this new symbolic link territory..

Cheers
BruceS
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20220530/35064e0c/attachment.htm>


More information about the User mailing list