[Gambas-user] Making an app gtk/qt switchable
tmorehen at ajm-software.com
Sat Nov 14 23:04:00 CET 2020
One way would be to use a two stage approach to starting your programs.
The first stage would be a stub program, and could be written in gambas
or even a bash script. It would run the second stage program, compiled
with gb.gui, with the appropriate environment variable set.
The launcher program could be written generically, looking at arg to
get the name of the second stage program to run ie launcher is named
gbApp.gambas and stage 2 is gbApp1.gambas
gbApp, at its simplest:
Shell "GB_GUI=" & Application.Args & " " &
On 2020-11-14 2:34 p.m., Bruce Steers wrote:
> Greetings all.
> I'm trying to set an arg/option in my app to choose gui system.
> I've added an arg --gui with options gtk gtk3 qt4 or qt5.
> It has a Startup.module before FMain where the arg is read
> Env["GB_GUI"] = "gb." & LCase(sGuiArg)
> But it don't work :(
> so i thought i could use Component.Load("gb." & LCase(sGuiArg))
> which i guess i could if i could remove the default bg.gui component
> in the IDE but i can't, gotta have one of them.
> Loading the component gives a segmentation 11 fault.
> And there does not seem to be a Component.Unload() option.
> I'm out of ideas...
> Is it even possible to do?
> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the User