infratec wrote: Mon Apr 28, 2025 11:24 am
Why not
To build the executable, the file is compiled and during this, the constant is replaced by the filename.
You can use this and #PB_Compiler_Line for writing better log files.
Wait; I must being misunderstanding something: why does the executable need to contain that info?
Also, I cannot find it searching the binary!
Edit: "I must being misunderstanding something"
Last edited by Piero on Mon Apr 28, 2025 12:26 pm, edited 1 time in total.
Piero wrote: Mon Apr 28, 2025 11:29 amwhy does the executable need to contain that info?
Because you told it to. The constant is replaced by its name, as expected.
The real question is why a single MessageRequester compiles an executable of 487 KB. So much added extra info. Surely PureBasic can go back to the good old days where a MessageRequester executable was only 6 KB (using PureBasic 5.73). That's the version I use for my own little tools now.
Piero wrote: Mon Apr 28, 2025 11:29 amwhy does the executable need to contain that info?
Because you told it to. The constant is replaced by its name, as expected.
The real question is why a single MessageRequester compiles an executable of 487 KB. So much added extra info. Surely PureBasic can go back to the good old days where a MessageRequester executable was only 6 KB (using PureBasic 5.73). That's the version I use for my own little tools now.
Thank you!
My Fault
PS: I was alarmed because I couldn't find it into the binary (probably because of unicode)
Last edited by Piero on Mon Apr 28, 2025 11:48 am, edited 1 time in total.
BarryG wrote: Mon Apr 28, 2025 11:34 am
The real question is why a single MessageRequester compiles an executable of 487 KB. So much added extra info. Surely PureBasic can go back to the good old days where a MessageRequester executable was only 6 KB (using PureBasic 5.73). That's the version I use for my own little tools now.
Hm...
with PB 6.21b5 x86 asm backend on Win 10 x64 it generates an exe with 119.808 bytes
And if I check the compiler option 'Use shared UCRT' the exe is 17.920 bytes.
When 6.20 stable drops I highly recommend checking it out, as long as you're okay with your apps being stuck to Windows 10 and above when you check this box, the UCRT will give you binaries like the days of PB before the new toolchain. And, if you want to support older OSs, just uncheck it and rebuild! PureBasic is beautiful.
BarryG wrote: Mon Apr 28, 2025 11:34 am
The real question is why a single MessageRequester compiles an executable of 487 KB. So much added extra info. Surely PureBasic can go back to the good old days where a MessageRequester executable was only 6 KB (using PureBasic 5.73). That's the version I use for my own little tools now.
It also depends on the platform : on my Mac, the compiled app's size is 119 Kb
MacBook Pro 16" M4 Pro - 24 Gb - MacOS 15.4.1 - Iphone 15 Pro Max - iPad at home
...and unfortunately... Windows at work...
I found the UCRT option on 6.21 Beta 6 in the Compiler Options. It reduced the little MessageRequester program from 150k to 24.6k. That's still a fair bit more than the 6k the PB5.3 and 5.7 and even 6.04 generated. I tried it on my own programs. One module went from 8053k to 7729k, another from 9016k to 8692k. It felt as if the exe's seemed to fire up more quickly, too.
I am old school. Efficient programs only contain the code they need.