Increased Portability

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
Sirius-2337
User
User
Posts: 59
Joined: Sat May 14, 2011 10:39 am

Increased Portability

Post by Sirius-2337 »

Hi everyone
I'd wish that paths to additional compilers (from older PB versions) are saved relativ to the PB directory,
because if you install PB on a USB storage with drive letter F: and then add some compilers
PB will not find these compilers if the USB storage gets another drive letter (i.e. G:).
MachineCode
Addict
Addict
Posts: 1482
Joined: Tue Feb 22, 2011 1:16 pm

Re: Increased Portability

Post by MachineCode »

Use the "/portable" command line switch to solve your issue. That's what it's for.
Microsoft Visual Basic only lasted 7 short years: 1991 to 1998.
PureBasic: Born in 1998 and still going strong to this very day!
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Re: Increased Portability

Post by ts-soft »

@Sirius-2337 +1

@MachineCode
/portable works only for relative paths, additional compilers stored with fixed paths
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
MachineCode
Addict
Addict
Posts: 1482
Joined: Tue Feb 22, 2011 1:16 pm

Re: Increased Portability

Post by MachineCode »

I mean have every version required (with whatever compiler) in its own folder, and then just use "/portable" when needed.
Microsoft Visual Basic only lasted 7 short years: 1991 to 1998.
PureBasic: Born in 1998 and still going strong to this very day!
DarkDragon
Addict
Addict
Posts: 2344
Joined: Mon Jun 02, 2003 9:16 am
Location: Germany
Contact:

Re: Increased Portability

Post by DarkDragon »

MachineCode wrote:I mean have every version required (with whatever compiler) in its own folder, and then just use "/portable" when needed.
This is a workaround, but not a good one: you can't use one IDE for all compilers then.
bye,
Daniel
Zach
Addict
Addict
Posts: 1675
Joined: Sun Dec 12, 2010 12:36 am
Location: Somewhere in the midwest
Contact:

Re: Increased Portability

Post by Zach »

Why not just store the compilers in sub-directories inside the PB directory, then?
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Re: Increased Portability

Post by ts-soft »

Zach wrote:Why not just store the compilers in sub-directories inside the PB directory, then?
Compilerpaths in Preferences are stored with fix path, so no difference.
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
Zach
Addict
Addict
Posts: 1675
Joined: Sun Dec 12, 2010 12:36 am
Location: Somewhere in the midwest
Contact:

Re: Increased Portability

Post by Zach »

Ohhh.. I misunderstood what was said.

But, is it still stored in a preference file or something that can be edited? Could try that route?
Sirius-2337
User
User
Posts: 59
Joined: Sat May 14, 2011 10:39 am

Re: Increased Portability

Post by Sirius-2337 »

I tried to change the path to be relative to the PureBasic directory, but it didn't work.
Little John
Addict
Addict
Posts: 4779
Joined: Thu Jun 07, 2007 3:25 pm
Location: Berlin, Germany

Re: Increased Portability

Post by Little John »

External tools called from the "Tools" menu in the IDE are also not always portable. I've tested it several times on Windows XP x86, even now with PB 4.60 RC 1.

In the "Edit Tool Setting" window, a relative commandline only works if the respective program is located in a subdirectory of the PureBasic directory, e.g.

Code: Select all

Tools\Lpp.exe
But a relative commandline such as

Code: Select all

..\Notepad++\notepad++.exe
leads to an error, although notepad++.exe does exist at that location.

Regards, Little John
Post Reply