Program parameters Console app

Post bugs related to the IDE here
Rinzwind
Enthusiast
Enthusiast
Posts: 700
Joined: Wed Mar 11, 2009 4:06 pm
Location: NL

Program parameters Console app

Post by Rinzwind »

c = CountProgramParameters()
Debug c


It says 0, while compiler options has "executable command line" set. When I change Executable format to MacOS, it works as intended.
Rinzwind
Enthusiast
Enthusiast
Posts: 700
Joined: Wed Mar 11, 2009 4:06 pm
Location: NL

Re: Program parameters Console app

Post by Rinzwind »

And btw, why PureBasic names the executable PureBasic.0.app? How to control naming? Only with create executable I can set the name, but it does not stick for debug etc.
Fred
Administrator
Administrator
Posts: 18335
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: Program parameters Console app

Post by Fred »

Seems to work here when the exec is set to 'console' mode:

Code: Select all

~$ ./console_test aa aaa
2
Can anybody else confirm ?

About the name, it's temporary names only using for temporary debug executable, why is it an issue ?
Rinzwind
Enthusiast
Enthusiast
Posts: 700
Joined: Wed Mar 11, 2009 4:06 pm
Location: NL

Re: Program parameters Console app

Post by Rinzwind »

I was talking about when parameters are set for testing in the compiler options and started with F5. Seems they are not passed in Console output type, but are in macOS app type.

When using custom plist and special permissions one needs a constant executable name.
Fred
Administrator
Administrator
Posts: 18335
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: Program parameters Console app

Post by Fred »

I see, so it's an IDE issue
Rinzwind
Enthusiast
Enthusiast
Posts: 700
Joined: Wed Mar 11, 2009 4:06 pm
Location: NL

Re: Program parameters Console app

Post by Rinzwind »

Fred wrote: Wed Sep 17, 2025 2:56 pm I see, so it's an IDE issue
Think so too.

About the debug executable name.. would be nice if it would just remember whatever filename (not path) was entered when choosing Create executable OR has a filename field option in Compiler settings. When end-user does Create executable he/she knows to put or copy it somewhere safe when meant for distribution. I wonder what the reasoning is for the PureBasic.x.app name? On Windows similar. Understand it when source was not saved yet, but otherwise..
Fred
Administrator
Administrator
Posts: 18335
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: Program parameters Console app

Post by Fred »

Fo example, if you have several main.pb in the IDE you will end up with the same exe name and it will not work, so the name is dynamic
Rinzwind
Enthusiast
Enthusiast
Posts: 700
Joined: Wed Mar 11, 2009 4:06 pm
Location: NL

Re: Program parameters Console app

Post by Rinzwind »

Fred wrote: Wed Sep 17, 2025 4:30 pm Fo example, if you have several main.pb in the IDE you will end up with the same exe name and it will not work, so the name is dynamic
But this main.pb's exist in different folders. I for one, always choose build exe in source folder. Anyway, an override option would be nice. As is more support for custom plist and resources. For now I run a tool that copy files over.
Post Reply