Page 3 of 4

Re: [IDE Tool] pbOptimizer

Posted: Wed Jul 15, 2020 3:47 pm
by chi
camille wrote:That's the beginning of the "Large text file creator_pbOpt.pb" file.

With line 3 "#PB_Compiler_IsIncludeFile = #True" which pbOptimizer is complaining about
The PB-IDE is also complaining about this line... Not the fault of pbOptimizer ;)


[include.pb]

Code: Select all

Procedure Multiply(a, b)
  ProcedureReturn a * b
EndProcedure

CompilerIf #PB_Compiler_IsIncludeFile
  
  Debug "include file: " + #PB_Compiler_Filename
  
CompilerElseIf #PB_Compiler_IsMainFile
  
  Debug "main file: " + #PB_Compiler_Filename
  Debug Multiply(13, 37)
  
CompilerEndIf
[main.pb]

Code: Select all

XIncludeFile "include.pb"

Debug Multiply(13, 37)
Run both files and you'll see the difference[/size]

Re: [IDE Tool] pbOptimizer

Posted: Thu Jul 16, 2020 10:49 am
by camille
Thank you both firace + chi!

I've removed these statements and now pbOptimizer is working fine :)

Re: [IDE Tool] pbOptimizer

Posted: Fri Mar 12, 2021 5:34 pm
by chi
updated to v0.9.8.7

Re: [IDE Tool] pbOptimizer

Posted: Sat Apr 24, 2021 10:07 am
by loulou2522
I would like to use this programme. But after installation in a directory the access buttons remain greyed out and no pb files can be used.
Can you tell me what to do?
Thanks in advance

Re: [IDE Tool] pbOptimizer

Posted: Sat Apr 24, 2021 1:00 pm
by chi
@loulou2522

Hi, did you set up the pbOptimizer.exe according to the pbOptimizer_IDE_Setup.png? If so, please check that there is a space between "%FILE" and "%TEMPFILE" and you put in the double quotes. Another possibility to check is the folder where you put the exe. Do you have read/write access there? If UAC is on and you put it in "C:\Program Files (x86)\..." there is a slight chance it gets blocked :wink:.

Re: [IDE Tool] pbOptimizer

Posted: Sat Apr 24, 2021 2:44 pm
by loulou2522
thANKS ALL IS GOOD
I have just ending compilation of 42612 lignes. It seems to work well but i have a question :
- Compilation without pboptimizer size 5423 Ko with pboptimizer 5434 ko Is it normal ?
THnks

Re: [IDE Tool] pbOptimizer

Posted: Sat Apr 24, 2021 3:53 pm
by chi
loulou2522 wrote: Sat Apr 24, 2021 2:44 pm - Compilation without pboptimizer size 5423 Ko with pboptimizer 5434 ko Is it normal ?
That doesn't sound right... It should either be the same size (if no optimization took place, which is rather unlikely) or smaller than the output of the default compilation. The only scenario where the file will be larger is if you have checked "Insert NOP lines" under Settings. Other than that, you could compare the files with e.g. "CFF Explorer" and see if there are additional imports under the "Import Directory" in the optimized file... But I'm fishing here ^^

Re: [IDE Tool] pbOptimizer

Posted: Sat Apr 24, 2021 4:53 pm
by loulou2522
iin fact i realize that the executable was not created because of that
Error: Resource
PORC: \pbOptimizer.rc(51): warning: No newline at end of file.
PORC: \pbOptimizer.rc(21): error: Unknown keyword: 'VersionField1%'.
PORC: \pbOptimizer.rc(43): error: Invalid syntax.
PORC: \pbOptimizer.rc(43): error: String literal expected (found: -).
PORC: \pbOptimizer.rc(43): error: Comma expected (found: %mm).
PORC: \pbOptimizer.rc(43): error: String literal expected (found: -).
PORC: \pbOptimizer.rc(43): error: Invalid syntax.
PORC: \pbOptimizer.rc(43): error: String literal expected (found: hh).
PORC: \pbOptimizer.rc(43): error: Comma expected (found: -).
PORC: \pbOptimizer.rc(43): error: String literal expected (found: ii).
PORC: \pbOptimizer.rc(43): error: Invalid syntax.
PORC: \pbOptimizer.rc(43): error: String literal expected (found: ss).
PORC: \pbOptimizer.rc(43): error: Comma expected (found: "STRING").
PORC: \pbOptimizer.rc(44): error: String literal expected (found: value).
PORC: \pbOptimizer.rc(44): error: Invalid syntax.
PORC: \pbOptimizer.rc(44): error: String literal expected (found: ,).
PORC: \pbOptimizer.rc(44): error: Comma expected (found: "STRING").
PORC: \pbOptimizer.rc(45): error: String literal expected (found: end).
Did you know that's problem

Re: [IDE Tool] pbOptimizer

Posted: Sat Apr 24, 2021 7:42 pm
by chi
Try this... Go to compiler options, disable "Include Version Information" and compile with pbOpt. If it goes through then the problem is with the tokens you are using, which are not yet supported (see first post). If there is still an error please PM me your .rc file and version infos so I can check what's going on ;). Also, you are using PB 5.7x?

Re: [IDE Tool] pbOptimizer

Posted: Sun Apr 25, 2021 8:13 am
by loulou2522
It works by unchecking the options "Include Version Information" as you told me; Compilation was good
With main.pb exe size 4529 Kb
With PBOPTIMIZE 4192 ko
Is the optimization done ?
I use PB 5.73 64 with windows 10
I try to compile the program with "Include Version Information" also checked and the compilation was goo and with the same size
It seems that the problem come from PB OPtimizer in the last stage because it blocks on compilation

Re: [IDE Tool] pbOptimizer

Posted: Sun Apr 25, 2021 9:38 am
by chi
loulou2522 wrote: Sun Apr 25, 2021 8:13 am It works by unchecking the options "Include Version Information" as you told me; Compilation was good
Nice, so we found the problem :oops:
loulou2522 wrote: Sun Apr 25, 2021 8:13 am With main.pb exe size 4529 Kb
With PBOPTIMIZE 4192 ko
Is the optimization done ?
Okay, that's more like it. Btw you'll see all removed libraries under "Uncalled PB Libraries Removed" in the Log.
loulou2522 wrote: Sun Apr 25, 2021 8:13 am I use PB 5.73 64 with windows 10
I try to compile the program with "Include Version Information" also checked and the compilation was goo and with the same size
It seems that the problem come from PB OPtimizer in the last stage because it blocks on compilation
Was it goo or good? :twisted: Yeah, I forgot to flush the created .rc file but never got problems on my system. Going to upload a new version soon... Hope that'll fix the problem once and for all. Thank you for the bug report!

Re: [IDE Tool] pbOptimizer

Posted: Sun Apr 25, 2021 11:03 am
by loulou2522
Sorry Chti i make an error when typing the right word was good
THnaks

Re: [IDE Tool] pbOptimizer

Posted: Sun Apr 25, 2021 11:26 am
by chi
updated to v0.9.8.8
loulou2522 wrote: Sun Apr 25, 2021 11:03 am Sorry Chti i make an error when typing the right word was good
THnaks
Hehe, no problem... I knew what you meant :)

Re: [IDE Tool] pbOptimizer

Posted: Sun Apr 25, 2021 12:30 pm
by ChrisR
Hi chi
Thank you for this nice tool
My 1st test, I have encountered 2 small issues.
1. I have an Uncalled Procedures that is Removed: LoadOrder( , good
but then i have the error, the module procedure 'LoadOrder()' has been declared but not defined

2. My source uses IncludePath "Images" (could be "..\Images"), it looks good on the first pass
At starting compilation, it fails, it does not find the images included in _pbOpt.pb
The relative path does not seem to be defined

Re: [IDE Tool] pbOptimizer

Posted: Sun Apr 25, 2021 12:59 pm
by loulou2522
Hi Chi,
I try to download the new version, but I have a message thet indicates your zip files is infected. In the precedetn version there was no problem.
Can you see please ? and saying me if it's a false positive

Another problem
When i use pboptimizer i have alway the same problem with rc file
--another problem
- With pboptimizer size of the result compile file -->5490 ko
and directly compiling in PB ide ---->4120 Ko