Delete PureBasic_Compilation0.exe after Run from the Temp file.

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
dcr3
Enthusiast
Enthusiast
Posts: 181
Joined: Fri Aug 04, 2017 11:03 pm

Delete PureBasic_Compilation0.exe after Run from the Temp file.

Post 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.
Quin
Addict
Addict
Posts: 1131
Joined: Thu Mar 31, 2022 7:03 pm
Location: Colorado, United States
Contact:

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

Post 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?
BarryG
Addict
Addict
Posts: 4136
Joined: Thu Apr 18, 2019 8:17 am

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

Post 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).
dcr3
Enthusiast
Enthusiast
Posts: 181
Joined: Fri Aug 04, 2017 11:03 pm

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

Post 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:
BarryG
Addict
Addict
Posts: 4136
Joined: Thu Apr 18, 2019 8:17 am

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

Post 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:
dcr3
Enthusiast
Enthusiast
Posts: 181
Joined: Fri Aug 04, 2017 11:03 pm

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

Post 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.
BarryG
Addict
Addict
Posts: 4136
Joined: Thu Apr 18, 2019 8:17 am

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

Post 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
dcr3
Enthusiast
Enthusiast
Posts: 181
Joined: Fri Aug 04, 2017 11:03 pm

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

Post 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. :(
BarryG
Addict
Addict
Posts: 4136
Joined: Thu Apr 18, 2019 8:17 am

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

Post by BarryG »

Sounds like you're not re-compiling after commenting the lines, and just running the last compiled version.
fryquez
Enthusiast
Enthusiast
Posts: 391
Joined: Mon Dec 21, 2015 8:12 pm

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

Post 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.
AZJIO
Addict
Addict
Posts: 2143
Joined: Sun May 14, 2017 1:48 am

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

Post 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.
Post Reply