IDE: Change Create Temporary executable in Compiler Options

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
fsw
Addict
Addict
Posts: 1572
Joined: Tue Apr 29, 2003 9:18 pm
Location: North by Northwest

IDE: Change Create Temporary executable in Compiler Options

Post by fsw »

Hi Fred, hi Freak,
it would be nice if you guys could add a compiler option into the IDE:

IDE Dialog Window: Compiler Option
PanelGadget: Compile/Run
Frame3DGadget: Run executable with

there is the CheckBoxGadget:
Create temporary executable in the source directory

please change the CheckBoxGadget mentioned above to a OtionGadget and add the OptionGadget:
Create temporary executable in the current directory

as the current directory can be user predefined.

In my case I have a defined "current directory" where the executable is placed after compiling and all the needed files for the compiled executable are.

As it is now the executable will be created in the "user windows temp directory" or where the sources are - so I have to copy the needed files for the compiled executable either in the temp directory or where the sources are.

Please consider my feature request.

Thank you
fsw
PureGuy
Enthusiast
Enthusiast
Posts: 102
Joined: Mon Aug 30, 2010 11:51 am

Re: IDE: Change Create Temporary executable in Compiler Opti

Post by PureGuy »

I second this request, why can't we specific the directory for the temporary executable?
PureGuy
Enthusiast
Enthusiast
Posts: 102
Joined: Mon Aug 30, 2010 11:51 am

Re: IDE: Change Create Temporary executable in Compiler Opti

Post by PureGuy »

Maybe the compiler option:

"Create temporary executable in the source directory"

could be renamed to:

"Create temporary executable in the output executable directory"

Doesn't make any sense to me, creating a debug.exe in the folder were all source files are located.
Having it inside output executable directory would be useful with static linking to dll's.
collectordave
Addict
Addict
Posts: 1309
Joined: Fri Aug 28, 2015 6:10 pm
Location: Portugal

Re: IDE: Change Create Temporary executable in Compiler Opti

Post by collectordave »

+1

Just finished chasing down a "bug" where my executable worked ok until I actually created the executable as I needed a file located where the executable was run.

Just an option of where to run the temporary executable would have saved loads of time and mind twisting exercise. For any project an option of where the executable should be created or the temporary run would be great.

CD
Any intelligent fool can make things bigger and more complex. It takes a touch of genius — and a lot of courage to move in the opposite direction.
Bitblazer
Enthusiast
Enthusiast
Posts: 736
Joined: Mon Apr 10, 2017 6:17 pm
Location: Germany
Contact:

Re: IDE: Change Create Temporary executable in Compiler Opti

Post by Bitblazer »

collectordave wrote:Just finished chasing down a "bug" where my executable worked ok until I actually created the executable as I needed a file located where the executable was run.
That's why failing to open any resource, should be captured and handled instead of silently being ignored. In case of failure to open a file, i call a custom error requester which clearly states which file couldn't be opened, and which starting path and name my executable has when it happened (to instantly spot cases like a temporary executable being created). Add a errorlevel between "1" for unimportant files and "9" for crucial files, so the requester can decide if it will terminate the application after confirmation or can just continue execution. The error level is also used to add the message to the appropriate logfile/reporting system plus add a severity icon to the requester (level 1-2 - blue info, level 3-6 - yellow warning or anything above 7 is red and a fatal error with instant termination of the application).

ps: the worst case of mysterious problems i had, was when a customer copied part of the binary installation to a temp directory on a network drive ... network drives/folders can add a hole new dimension of mystery problems on some network stacks
collectordave
Addict
Addict
Posts: 1309
Joined: Fri Aug 28, 2015 6:10 pm
Location: Portugal

Re: IDE: Change Create Temporary executable in Compiler Opti

Post by collectordave »

Hi

I am not talking about when a customer runs the programme but when developing the programme. The PB IDE creates the temporary executable in a tmp folder, where your files are not. I would like a switch or option to tell the IDE where to create the temporary executable. That way you can be certain that what you are running is what it will be in the end.

So yes create error levels and handle missing files or use absolute filenames away from the executable. However a little switch to say allways run this in this folder stops that.

After seeing programmes run on linux as well, the currentdirectory is set to where the programme is called to run from so it can also create problems between OS's.

regards

CD
Any intelligent fool can make things bigger and more complex. It takes a touch of genius — and a lot of courage to move in the opposite direction.
Post Reply