Page 1 of 2
"Executable created"
Posted: Fri Dec 16, 2016 6:29 am
by marcoagpinto
Fred?!
There is a need to show in the status part when one creates an executable:
"05:28 Executable created"
because sometimes I can't tell if I saved a newer executable over the old one.
Re: "Executable created"
Posted: Fri Dec 16, 2016 6:40 am
by coder14
You could check the modified date of the exe file properties.

Re: "Executable created"
Posted: Fri Dec 16, 2016 6:57 am
by DarkDragon
coder14 wrote:You could check the modified date of the exe file properties.

That would be different already at the first byte written to it. It would not tell whether or not the creation has finished. There should really be some kind of decent notification.
Re: "Executable created"
Posted: Fri Dec 16, 2016 7:40 am
by coder14
DarkDragon wrote:coder14 wrote:You could check the modified date of the exe file properties.

That would be different already at the first byte written to it. It would not tell whether or not the creation has finished. There should really be some kind of decent notification.
Then it should be "Executable created successfully!"

Re: "Executable created"
Posted: Fri Dec 16, 2016 7:42 am
by Mistrel
Compilation is so fast though that compilation will be done by the time he brings his file explorer into the foreground.
But if you're compiling anything that has complex dependencies then you would want to move to command line compiling, imo. Compilation is I/O blocking so you'll know that it's done once the process ends.
Re: "Executable created"
Posted: Fri Dec 16, 2016 8:39 am
by Marc56us
2 Solutions:
File > Preferences > Debugger > [X] Display Timestamp in Error log
Log show:
[08:25:06] Waiting for executable to start...
[08:25:06] Executable type: Windows - x86 (32bit, Unicode)
[08:25:06] Executable started.
(That mean new EXE is created at 08:25:06)
Another solution: Make a little program that display message box with and time of exe
Sample:
(Edit: new version OK)
Code: Select all
EnableExplicit
Define EXE_Name$ = ProgramParameter(0)
Define EXE_Timestamp$ = FormatDate("%dd/%mm/%yyyy - %hh:%ii:%ss",
GetFileDate(EXE_Name$, #PB_Date_Modified))
MessageRequester("Info", "EXE: " + EXE_Name$ + #CRLF$ + EXE_Timestamp$)
Tool configuration:
Commandline: <your exe>
Arguments:
%EXECUTABLE
...
...
Event to trigger the tool:
After Compile/run
(on right)
[X]Wait until tool quits
Re: "Executable created"
Posted: Fri Dec 16, 2016 10:01 am
by DarkDragon
Mistrel wrote:Compilation is so fast though that compilation will be done by the time he brings his file explorer into the foreground.
Depends on your output device. On SD Cards or USB Sticks the output might be a bit slow. Also for big projects it must be slower than for small projects.
Marc56us wrote:2 Solutions:
These are workarounds and no solutions. I would move this topic to bug reports in all OS.
Re: "Executable created"
Posted: Fri Dec 16, 2016 10:58 am
by Marc56us
marcoagpinto wrote:There is a need to show in the status part when one creates an executable:
"05:28 Executable created"
because sometimes I can't tell if I saved a newer executable over the old one.
DarkDragon wrote:I would move this topic to bug reports in all OS.
This is not a bug, this is a feature request, so still good here in "Feature Requests and Wishlists" (IMHO)

Re: "Executable created"
Posted: Fri Dec 16, 2016 11:09 am
by DarkDragon
Marc56us wrote:DarkDragon wrote:I would move this topic to bug reports in all OS.
This is not a bug, this is a feature request, so still good here in "Feature Requests and Wishlists" (IMHO)
Do you know the halting problem? I see a similarity between this and the humans sitting in front of the executable.
In usability engineering courses one would learn to show progress to the user, otherwise he might forget what he wants to do afterwards because he starts thinking about when it will end.
Re: "Executable created"
Posted: Fri Dec 16, 2016 11:33 am
by Dude
Marc56us wrote:File > Preferences > Debugger > [X] Display Timestamp in Error log
That doesn't do anything when you're creating a final executable, which was the request.
Re: "Executable created"
Posted: Fri Dec 16, 2016 11:39 am
by Marc56us
Dude wrote:Marc56us wrote:File > Preferences > Debugger > [X] Display Timestamp in Error log
That doesn't do anything when you're creating a final executable, which was the request.
You're right,
but a
bug is something that blocks a program or do error(s)

Apart from small programs,
always work with the project manager (even with one single source file)
The project manager displays more information than the IDE on its own.
You can't do anything else in IDE until compilation (create EXE) ended. This is the safety way.
What's missing is a confirmation message when the EXE already exists and will be overwrited
(yes, here, there is a bug)
And still, not really a bug since it does not block, but there should be a messagebox.
Re: "Executable created"
Posted: Fri Dec 16, 2016 12:00 pm
by TI-994A
Marc56us wrote:What's missing is a confirmation message when the EXE already exists and will be overwrited...
This behaviour exists on OSX.

Re: "Executable created"
Posted: Fri Dec 16, 2016 5:08 pm
by Zebuddi123
Hi to all Executable creation notification tool, only tested on windows 10.
Maybe of interest/use to some.
Tool paramaters
Arguments: %EXECUTABLE
Hide from tool menu: Checked
Event to trigger the tool: After executable created.
Zebuddi.
Code:
Code: Select all
CompilerSelect #PB_Compiler_Processor
CompilerCase #PB_Processor_x86
Structure MY_NOTIFYICONDATA
cbSize.l
hwnd.i
uId.l
uFlags.l
uCallbackMessage.l
hIcon.i
szTip.s{128}
dwState.l
dwStateMask.l
szInfo.s{256}
StructureUnion
uTimeout.l
uVersion.l
EndStructureUnion
szInfoTitle.s{64}
dwInfoFlags.i
guidItem.GUID
hBalloonIcon.i
EndStructure
CompilerCase #PB_Processor_x64
Structure MY_NOTIFYICONDATA
cbSize.l
PB_Alignment1.b[4]
hWnd.i
uID.l
uFlags.l
uCallbackMessage.l
PB_Alignment2.b[4]
hIcon.i
szTip.s{128}
dwState.l
dwStateMark.l
szInfo.s{256}
StructureUnion
uTimeout.l
uVersion.l
EndStructureUnion
szInfoTitle.s{64}
dwInfoFlags.l
guidItem.GUID
hBalloonIcon.i
EndStructure
CompilerEndSelect
ExeFile.s = ProgramParameter(0)
Procedure.s GetMachineArchHack(file.s)
Protected dos_stub_end
If ReadFile(0,file)
FileSeek(0,$84)
pe_mach_arch.s = ReadString(0, #PB_Ascii)
CloseFile(0)
If Len(pe_mach_arch) > 0
If pe_mach_arch = Chr(76) + Chr(1) + Chr(5)
ProcedureReturn "x86"
ElseIf pe_mach_arch = Chr(100) + Chr(8224) + Chr(6)
ProcedureReturn "x64"
Else
ProcedureReturn "Unknown machine type."
EndIf
Else
ProcedureReturn "Failed to read Machine Architecture. "
EndIf
EndIf
EndProcedure
If Len(ExeFile) > 0
If Bool(FindString(ExeFile, "PureBasic_Compilation")) = #False
LoadImage(0, #PB_Compiler_Home + "\Examples\Sources - Advanced\Waponez II\Waponez.ico")
ni.MY_NOTIFYICONDATA
ni\cbSize = SizeOf(MY_NOTIFYICONDATA)
ni\uID = 10
ni\uFlags = #NIF_ICON| #NIF_INFO | #NIF_MESSAGE |#NIF_TIP
ni\hIcon = ImageID(0)
ni\uCallbackMessage = #WM_NOTIFYICON
ni\uTimeout = 10
ni\uVersion = #NOTIFYICON_VERSION
ni\szInfoTitle = GetMachineArchHack(ExeFile) + " Executable Created"
ni\dwInfoFlags = #NIIF_INFO
Shell_NotifyIcon_(#NIM_ADD, ni)
ni\szInfo = "Compilation of " + GetFilePart(ExeFile) + " Complete " + #CRLF$ + FormatDate("%dd/%mm/%yyyy - %hh:%ii:%ss", GetFileDate(ExeFile, #PB_Date_Modified)) + #CRLF$ +"OK."
Shell_NotifyIcon_(#NIM_MODIFY, ni)
Shell_NotifyIcon_(#NIM_DELETE, ni)
EndIf
EndIf
End
Re: "Executable created"
Posted: Fri Dec 16, 2016 7:38 pm
by DarkDragon
Marc56us wrote:Dude wrote:Marc56us wrote:File > Preferences > Debugger > [X] Display Timestamp in Error log
That doesn't do anything when you're creating a final executable, which was the request.
You're right,
but a
bug is something that blocks a program or do error(s)
And blocking the user is not a bug? I mean the user won't know when it is finished. He can only guess it. There is no deterministic way for a usual user to tell whether or not the creation has finished. In theory he could wait an infinite amount of time and never get a hint that it is finished. At least not without external tools.
Halting problem.
Re: "Executable created"
Posted: Fri Dec 16, 2016 7:43 pm
by Mistrel
DarkDragon wrote:There is no deterministic way for a usual user to tell whether or not the creation has finished.
When I compile I get that popup with the progress bar. Does this not include the time it takes to write the executable to disk?