configure tools %ProjectFile

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
jassing
Addict
Addict
Posts: 1885
Joined: Wed Feb 17, 2010 12:00 am

configure tools %ProjectFile

Post by jassing »

Would be nice to have a %PROJECTFILE token.
User avatar
HeX0R
Addict
Addict
Posts: 1189
Joined: Mon Sep 20, 2004 7:12 am
Location: Hell

Re: configure tools %ProjectFile

Post by HeX0R »

Tools can make use of the PB_TOOL_Project environment variable.
And there is also %PROJECT
jassing
Addict
Addict
Posts: 1885
Joined: Wed Feb 17, 2010 12:00 am

Re: configure tools %ProjectFile

Post by jassing »

%PROJECT is only the directory....
What if there are multiple projects in the same directory?
User avatar
HeX0R
Addict
Addict
Posts: 1189
Joined: Mon Sep 20, 2004 7:12 am
Location: Hell

Re: configure tools %ProjectFile

Post by HeX0R »

jassing wrote: Sat May 11, 2024 1:11 am %PROJECT is only the directory....
What if there are multiple projects in the same directory?
The environment variable contains path and filename!
jassing
Addict
Addict
Posts: 1885
Joined: Wed Feb 17, 2010 12:00 am

Re: configure tools %ProjectFile

Post by jassing »

HeX0R wrote: Mon May 13, 2024 8:20 pm The environment variable contains path and filename!
not here,6,10lts, 6.11b2 x64

I created a simple tool:

Code: Select all

MessageRequester("test",PeekS(GetCommandLine_()))
created a tool to pass %PROJECT.

I switched to a file in the project.
I ran the tool.
I got the directory only.
The Info Button wrote:%PROJECT : The directory where the project file resides if there is an
open project.
User avatar
HeX0R
Addict
Addict
Posts: 1189
Joined: Mon Sep 20, 2004 7:12 am
Location: Hell

Re: configure tools %ProjectFile

Post by HeX0R »

I was talking about environment variables!

Code: Select all

MessageRequester("test",GetEnvironmentVariable("PB_TOOL_Project"))
jassing
Addict
Addict
Posts: 1885
Joined: Wed Feb 17, 2010 12:00 am

Re: configure tools %ProjectFile

Post by jassing »

I was unaware of that.. thanks!
Post Reply