Page 1 of 1

changing the debug compile location?

Posted: Sat Jun 12, 2021 3:30 pm
by pdwyer
Currently when I hit run in the IDE in windows I get a "PureBasic_Compilation0.exe" created and run from "C:\Users\myId\AppData\Local\Temp"
I can't see a way to change the location of the file from windows temp to something else. Is this possible? eg "C:\pb_temp\

Like many other people I have some false positive on anti virus and I'd like to compile to a different temp location that I can add to the exclusion list of the AV software. I don't really want to exclude windows temp.

Is this possible?

Re: changing the debug compile location?

Posted: Sat Jun 12, 2021 3:33 pm
by STARGĂ…TE
There is an option in the compiler settings:
"Create temporary executable in the source directory"
Image

Re: changing the debug compile location?

Posted: Sat Jun 12, 2021 4:12 pm
by skywalk
That only works if the code was stored to disk prior to compiling.
I asked for a feature to define the temp path to avoid antivirus issues.

Re: changing the debug compile location?

Posted: Sat Jun 12, 2021 4:45 pm
by mk-soft
I also miss that function a bit. Is something for features request

Re: changing the debug compile location?

Posted: Sat Jun 12, 2021 4:46 pm
by pdwyer
Thank you !!!

This will work for me :D

Re: changing the debug compile location?

Posted: Sat Jun 12, 2021 10:13 pm
by helpy
On windows you could create a batch file "start_purebasic.cmd":

Code: Select all

@echo off
setlocal
set TEMP=Path\To\New\PB_TEMP_DIRECTORY
set TMP=%TEMP%
start "Call PureBasic IDE" /B "Path\To\PureBasic\PureBasic.exe"
endlocal
goto :EOF
This way you change the environment variables for temporary directory.
This works for me!

Some hints:
All tools which are called by the PureBasic IDE will then also use this new temporary directory.
If PB programs will be started by the IDE then the PB command GetTemporaryDirectory() will return this new temporary directory.