Change Compiler Temp Folder / Can I?
-
Randy Walker
- Addict

- Posts: 1186
- Joined: Sun Jul 25, 2004 4:21 pm
- Location: USoA
- Contact:
Change Compiler Temp Folder / Can I?
Is there a setting somewhere that I can't find? I want to have the compiler use a different path than the %Temp% folder, So I can tell my AV don't bug me, or my Project development.
- - - - - - - - - - - - - - - -
Randy
I *never* claimed to be a programmer.
Randy
I *never* claimed to be a programmer.
Re: Change Compiler Temp Folder / Can I?
You should be able to launch PB via a bat file and set tmp, temp to where ever you want
purebasic.bat
purebasic.bat
Code: Select all
SET "TEMP=C:\PureBasic\Temp"
SET "TMP=C:\PureBasic\Temp"
"C:\PureBasic\PureBasic.exe"
Re: Change Compiler Temp Folder / Can I?
There's a prefs setting to create the executable in the same folder as the source file, if that's what you mean? I do that and told Windows Defender not to scan that folder. And also whitelist "PureBasic.exe" and its "Compilers" folder with your anti-virus app.
Despite doing this, you still need to put your final exe into VirusTotal.com to see what your users are going to be warned about. Then whitelist your exe with the anti-virus companies that VirusTotal shows.
Despite doing this, you still need to put your final exe into VirusTotal.com to see what your users are going to be warned about. Then whitelist your exe with the anti-virus companies that VirusTotal shows.
-
Randy Walker
- Addict

- Posts: 1186
- Joined: Sun Jul 25, 2004 4:21 pm
- Location: USoA
- Contact:
Re: Change Compiler Temp Folder / Can I?
If that's the best I can get, it will have to do. I was hoping to give it a dedicated folder. I gave up trying to deal with defender and installed Comodo Internet Security so defender would just STFU. I can manage Comodo. No dealing with defender at all. I can't imagine how you did that.BarryG wrote: Mon Nov 24, 2025 6:01 am There's a prefs setting to create the executable in the same folder as the source file, if that's what you mean? I do that and told Windows Defender not to scan that folder. And also whitelist "PureBasic.exe" and its "Compilers" folder with your anti-virus app.
Despite doing this, you still need to put your final exe into VirusTotal.com to see what your users are going to be warned about. Then whitelist your exe with the anti-virus companies that VirusTotal shows.
Thanks BarryG!!!
- - - - - - - - - - - - - - - -
Randy
I *never* claimed to be a programmer.
Randy
I *never* claimed to be a programmer.
Re: Change Compiler Temp Folder / Can I?
I go through this whitelist dance submission every time I release an update to my app.
Luckily it's not too hard as I only get two false-positives each time (usually Microsoft and McAfee), and both white-list it within a few days. I submit a week away these days, like if I submitted on Jan 1 then I'd wait till Jan 8 to publically release, so it gives both anti-virus companies a lot of time to push the white-list to their end-users.
Re: Change Compiler Temp Folder / Can I?
Yes, I asked for adjustable "compile to folder" path some time ago. And I am not the only one.
For your Info (I'm sure most of you know that):
The setting “Create temporary executable in source directory” still uses the temporary directory for <New*> (unsaved) files, since there is no source directory.
For your Info (I'm sure most of you know that):
The setting “Create temporary executable in source directory” still uses the temporary directory for <New*> (unsaved) files, since there is no source directory.
Just because it worked doesn't mean it works.
PureBasic 6.04 (x86) and <latest stable version and current alpha/beta> (x64) on Windows 11 Home. Now started with Linux (VM: Ubuntu 22.04).
PureBasic 6.04 (x86) and <latest stable version and current alpha/beta> (x64) on Windows 11 Home. Now started with Linux (VM: Ubuntu 22.04).
-
Randy Walker
- Addict

- Posts: 1186
- Joined: Sun Jul 25, 2004 4:21 pm
- Location: USoA
- Contact:
Re: Change Compiler Temp Folder / Can I?
BummerAxolotl wrote: Mon Nov 24, 2025 11:31 am Yes, I asked for adjustable "compile to folder" path some time ago. And I am not the only one.
For your Info (I'm sure most of you know that):
The setting “Create temporary executable in source directory” still uses the temporary directory for <New*> (unsaved) files, since there is no source directory.
- - - - - - - - - - - - - - - -
Randy
I *never* claimed to be a programmer.
Randy
I *never* claimed to be a programmer.
-
Randy Walker
- Addict

- Posts: 1186
- Joined: Sun Jul 25, 2004 4:21 pm
- Location: USoA
- Contact:
Re: Change Compiler Temp Folder / Can I?
The really unfortunate part here is any new changes in the PB design will not be retroactive and i am stuck in ver 5.x forever since I cannot get my code to adapt to 6.x now.
- - - - - - - - - - - - - - - -
Randy
I *never* claimed to be a programmer.
Randy
I *never* claimed to be a programmer.
Re: Change Compiler Temp Folder / Can I?
The bat file method works what's the problem?
output is redirected to the folder you chose and the compiler creates it's temp compile folder and output files under that folder.
output is redirected to the folder you chose and the compiler creates it's temp compile folder and output files under that folder.
-
Randy Walker
- Addict

- Posts: 1186
- Joined: Sun Jul 25, 2004 4:21 pm
- Location: USoA
- Contact:
Re: Change Compiler Temp Folder / Can I?
Maybe you could provide a working bat file method. I tried and could not get it working.idle wrote: Mon Nov 24, 2025 10:57 pm The bat file method works what's the problem?
output is redirected to the folder you chose and the compiler creates it's temp compile folder and output files under that folder.
- - - - - - - - - - - - - - - -
Randy
I *never* claimed to be a programmer.
Randy
I *never* claimed to be a programmer.
Re: Change Compiler Temp Folder / Can I?
the link above viewtopic.php?p=648267#p648267
make Temp folder where you want it, where you have write permission as in not program files
edit the paths and save it as purebasic.bat then you can run the bat file via cmd.exe or
edit your PB shortcut to point to the bat file.
make Temp folder where you want it, where you have write permission as in not program files
edit the paths and save it as purebasic.bat then you can run the bat file via cmd.exe or
edit your PB shortcut to point to the bat file.
-
Randy Walker
- Addict

- Posts: 1186
- Joined: Sun Jul 25, 2004 4:21 pm
- Location: USoA
- Contact:
Re: Change Compiler Temp Folder / Can I?
One little problem with that -- I had already set the compiler default to use the source directory, and that in turn corrupted every source file I ran with a line that says:
BTW... I had to add a line to that bat file so the cmd window would close automatically.
THANKS for the hint!!!
So my new bat file did not work, until I decorrupted the source file by removing that line.; CompileSourceDirectory
BTW... I had to add a line to that bat file so the cmd window would close automatically.
Code: Select all
@echo off
:: Your dedicated PureBasic temp folder
SET "TEMP=D:\PBTemp"
SET "TMP=D:\PBTemp"
:: Launch PureBasic (default installation path)
"C:\Program Files\PureBasic540\PureBasic540x64.exe"
exit
Last edited by Randy Walker on Tue Dec 09, 2025 10:31 pm, edited 1 time in total.
- - - - - - - - - - - - - - - -
Randy
I *never* claimed to be a programmer.
Randy
I *never* claimed to be a programmer.
Re: Change Compiler Temp Folder / Can I?
Yes, thanks for the hints.
Using it with my small RAM-Disk for PB compilation only.
My PBStart.cmd is a little more complex...
Since I use different PB versions via shortcuts, the launching in the script looks like this...
Using it with my small RAM-Disk for PB compilation only.
My PBStart.cmd is a little more complex...
Since I use different PB versions via shortcuts, the launching in the script looks like this...
Code: Select all
REM ... Checking existance and SET to temp temp folders.....
REM Shortcut/Script-Call uses several/different parameter: eg. <PB-Exe> /NOEXT
START %*
TIMEOUT /T 5
GOTO :EOF
REM Diplay some erros - Section
Just because it worked doesn't mean it works.
PureBasic 6.04 (x86) and <latest stable version and current alpha/beta> (x64) on Windows 11 Home. Now started with Linux (VM: Ubuntu 22.04).
PureBasic 6.04 (x86) and <latest stable version and current alpha/beta> (x64) on Windows 11 Home. Now started with Linux (VM: Ubuntu 22.04).
