Page 1 of 1

Delete PureBasic_Compilation0.exe after Run from the Temp file.

Posted: Wed Feb 21, 2024 7:53 pm
by dcr3
Hi.

On the next Beta Version, if there is one, can you add deletion, of
the PureBasic_Compilation0.exe and of it's files, from the Temp file,
after Run on the Compiler tab.

Re: Delete PureBasic_Compilation0.exe after Run from the Temp file.

Posted: Wed Mar 13, 2024 3:58 am
by Quin
I'm slightly confused what you want here.

IIRC, the executable is deleted whenever your temp folder gets cleaned, right? Do you want something different?

Re: Delete PureBasic_Compilation0.exe after Run from the Temp file.

Posted: Wed Mar 13, 2024 4:08 am
by BarryG
PureBasic_Compilation0.exe and its files get deleted when you quit the IDE. You can't delete it while it's running (same for any file).

Re: Delete PureBasic_Compilation0.exe after Run from the Temp file.

Posted: Wed Mar 13, 2024 12:35 pm
by dcr3
dcr3 wrote: Wed Feb 21, 2024 7:53 pm add deletion, of
the PureBasic_Compilation0.exe and of it's files, from the Temp file,
after Run on the Compiler tab
:mrgreen:

Re: Delete PureBasic_Compilation0.exe after Run from the Temp file.

Posted: Wed Mar 13, 2024 1:12 pm
by BarryG
BarryG wrote: Wed Mar 13, 2024 4:08 amYou can't delete it while it's running (same for any file).
This includes after being run from the Compiler tab. :wink:

Re: Delete PureBasic_Compilation0.exe after Run from the Temp file.

Posted: Wed Mar 13, 2024 2:46 pm
by dcr3
BarryG wrote: Wed Mar 13, 2024 1:12 pm BarryG wrote: ↑Wed Mar 13, 2024 4:08 am
You can't delete it while it's running (same for any file).

This includes after being run from the Compiler tab. :wink:

Code: Select all

OpenWindow(0,0,0,150,60, "",#PB_Window_SystemMenu|#PB_Window_ScreenCentered)
  ButtonGadget(1,30,10,90,40, "Button_1") ;1
 ;ButtonGadget(1,30,10,90,40, "What Have We Got Here.??");2
  Repeat:Event = WaitWindowEvent():Until Event = #PB_Event_CloseWindow 
  

Just copy and paste the above code.

1. Run it. Then close it, the code you just Run, Not the PureBasic IDE.

2. Insert Comment on the line ButtonGadget(1,30,10,90,40, "Button_1") ;1

3. Remove Comment on the line ;ButtonGadget(1,30,10,90,40, "What Have We Got Here.??");2

4. Run it again, what do you see.

Is this clear.?

Unless there something not quite right in my computer system.

Re: Delete PureBasic_Compilation0.exe after Run from the Temp file.

Posted: Thu Mar 14, 2024 12:45 am
by BarryG
dcr3 wrote: Wed Mar 13, 2024 2:46 pm

Code: Select all

OpenWindow(0,0,0,150,60, "",#PB_Window_SystemMenu|#PB_Window_ScreenCentered)
  ButtonGadget(1,30,10,90,40, "Button_1") ;1
 ;ButtonGadget(1,30,10,90,40, "What Have We Got Here.??");2
  Repeat:Event = WaitWindowEvent():Until Event = #PB_Event_CloseWindow  

Just copy and paste the above code.

1. Run it. Then close it, the code you just Run, Not the PureBasic IDE.

2. Insert Comment on the line ButtonGadget(1,30,10,90,40, "Button_1") ;1

3. Remove Comment on the line ;ButtonGadget(1,30,10,90,40, "What Have We Got Here.??");2

4. Run it again, what do you see.

Is this clear.?

Unless there something not quite right in my computer system.
This is what I get after I follow your steps, as expected. What do you get?

Image

[Resolved]Delete PureBasic_Compilation0.exe after Run from the Temp file.

Posted: Thu Mar 14, 2024 8:49 am
by dcr3
BarryG wrote: Thu Mar 14, 2024 12:45 am This is what I get after I follow your steps, as expected. What do you get?

Image
I get "Button_1". :?

Thanks BarryG.

I guess there is something not quite right in my system. :(

Re: Delete PureBasic_Compilation0.exe after Run from the Temp file.

Posted: Thu Mar 14, 2024 9:01 am
by BarryG
Sounds like you're not re-compiling after commenting the lines, and just running the last compiled version.

Re: Delete PureBasic_Compilation0.exe after Run from the Temp file.

Posted: Thu Mar 14, 2024 11:59 am
by fryquez
That sounds like a really annoying problem. Without error message you can't be sure what code your running.

If would use Process Monitor and check if the second compilation actually being executed and what the exit codes of the processes are.

Re: Delete PureBasic_Compilation0.exe after Run from the Temp file.

Posted: Thu Mar 14, 2024 1:28 pm
by AZJIO
There are items in the menu:
Compile/Run
Run

Compile/Run - compiles the file if necessary, that is, the code has been changed. And then runs the file
Run - runs the file without compilation

For some reason, several files are formed in the %Temp% folder, I think if you compile several sources on different tabs, then files with a new number will be created. This prevents the files from being recompiled.