Small bug with jaPBe and PB 4.10 b.

Everything else that doesn't fall into one of the other PB categories.
Chris
User
User
Posts: 60
Joined: Wed Jun 11, 2003 4:54 pm
Location: Somewhere... But i can see you!

Small bug with jaPBe and PB 4.10 b.

Post by Chris »

There is a small bug with jaPBe and version 4.10 beta 2 or beta 3 of PureBasic.
At each compilation, a program named Purebasicxxx.exe is created in the temporary folder "C:\Documents and Settings\YourName\Local Settings\Temp", but this program is not deleted when jaPBe is closed.

After some time, it can make a lot of programs, and therefore, a lot of useless megabytes in this folder.

I have created a plugin who delete the temporary files when jaPBe is closed.

Compile this code as "TmpRemover.exe" (or another name), put the exe in the folder "plugins", then restart jaPBe.

Choose "TmpRemover Plugin" in the menu "Tools - Config tools", and choose "jaPBe End" in "Trigger".

The temporary files will be deleted each time jaPBe is closed.

(Text translated from the French by a software. sorry ) :wink:

Code: Select all

;-Global
Global jaPBe_Handle
Global jaPBe_Version

#timeout=5000
#mywm_Plugin_Cancel = #WM_USER+18

If OpenWindow(1,0,200,200,200,"jaPBe-Plugin",#PB_Window_Invisible)
  a$=ProgramParameter()
  If a$="jaPBe"
    jaPBe_Handle = Val(ProgramParameter())
    jaPBe_Version$ = ProgramParameter()
    
    If ExamineDirectory(0, GetTemporaryDirectory(), "*.exe")  
      While NextDirectoryEntry(0)
        If DirectoryEntryType(0) = #PB_DirectoryEntry_File
          If FindString(LCase(DirectoryEntryName(0)), "purebasic", 1)
            DeleteFile(GetTemporaryDirectory() + DirectoryEntryName(0))
          EndIf
        EndIf
      Wend
      FinishDirectory(0)
    EndIf
    
    PostMessage_(jaPBe_Handle,#mywm_Plugin_Cancel,0,WindowID(1))
  Else
    MessageRequester("jaPBe Plugin","This is a jaPBe-Plugin"+Chr(10)+"You can't run it without jaPBe",0)
  EndIf
  CloseWindow(1)
Else
  MessageRequester("jaPBe Plugin","Can't open a window!",0)
EndIf

End
My english is bad !!!... It's normal, i'm french :lol:
My english is not really the English.
It's the FrogLish (Froggy's English) ;)
User avatar
Rook Zimbabwe
Addict
Addict
Posts: 4322
Joined: Tue Jan 02, 2007 8:16 pm
Location: Cypress TX
Contact:

Post by Rook Zimbabwe »

Excellent work!!! Though I only use the internal IDE I have considered playing afround with JPABE, a silly question... Are you using XP or VISTA?

And whatever translation program you are using seems to be working well! :D
Binarily speaking... it takes 10 to Tango!!!

Image
http://www.bluemesapc.com/
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Re: Small bug with jaPBe and PB 4.10 b.

Post by gnozal »

Chris wrote:There is a small bug with jaPBe and version 4.10 beta 2 or beta 3 of PureBasic.
At each compilation, a program named Purebasicxxx.exe is created in the temporary folder "C:\Documents and Settings\YourName\Local Settings\Temp", but this program is not deleted when jaPBe is closed.
That's strange, because these temporary EXE files are deleted when jaPBe quits (at least on my PC's).

Code: Select all

Procedure ExitCompiler() ; In Compiler.pbi
  EnableCompilerCommands(#False)
  If CompilerProcessID 
...
    ForEach CreatedCompileRunEXE()
      DeleteFile(CreatedCompileRunEXE())
    Next
...
  EndIf
EndProcedure
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
Post Reply