[IDE Tool] pbOptimizer

Applications, Games, Tools, User libs and useful stuff coded in PureBasic
User avatar
chi
Addict
Addict
Posts: 1034
Joined: Sat May 05, 2007 5:31 pm
Location: Linz, Austria

Re: [IDE Tool] pbOptimizer

Post by chi »

updated to v0.9.8.9


@ChrisR
Issue 1: Could you please send me a little snippet showing the exact problem? I can't reproduce this error on my side.
Issue 2: The problem is that PB removes the IncludePath when compiling with the /PREPROCESS switch. I'm pretty sure that's a bug (bug report incoming). Meanwhile, the only way around this is to disable "Create .pb" in the settings window (v0.9.8.9).

@loulou2522
Must be a false positive, for sure... I just tested the new version on VirusTotal with 3/68
Please send me the problematic .rc file, so I can see what's going on... Thank you!
Et cetera is my worst enemy
User avatar
ChrisR
Addict
Addict
Posts: 1150
Joined: Sun Jan 08, 2017 10:27 pm
Location: France

Re: [IDE Tool] pbOptimizer

Post by ChrisR »

chi wrote: Sun Apr 25, 2021 5:59 pm Could you please send me a little snippet showing the exact problem? I can't reproduce this error on my side.
You can reproduce with the Jsave.pbi module from here
And this piece of code

Code: Select all

Structure Struct
  Gadget.i
  Name.s
EndStructure
Global NewList ListStruct.Struct()

XIncludeFile "JSave.pbi"

Define sFilePath.s =  GetCurrentDirectory() + "Test.json"
If CreateJSON(0)
  InsertJSONList(JSONValue(0), ListStruct())
  JSave::InitObjectStr("", "Gadget, Name")
  JSave::Save(0, sFilePath)
  FreeJSON(0)
EndIf
For the 2nd case, I copied the contents of the "Images" folder to the root, it compiles but it's not ideal :wink:
Thanks for the new version, not yet tested
User avatar
chi
Addict
Addict
Posts: 1034
Joined: Sat May 05, 2007 5:31 pm
Location: Linz, Austria

Re: [IDE Tool] pbOptimizer

Post by chi »

@ChrisR
Thanks for the code! It is pretty easy to fix, just remove 1 space char between LoadOrder and ( from: Declare.i LoadOrder (prefFile$) inside JSave.pbi and it works. I wasn't expecting more than 1 space char after the procedure name (I mean, who would do that??? :lol:). Will be fixed soon!
ChrisR wrote: Sun Apr 25, 2021 6:57 pm For the 2nd case, I copied the contents of the "Images" folder to the root, it compiles but it's not ideal
You can leave "Create .pb" unchecked and get the same result as if it is checked. All I'm doing here is saving the source code with all includes into a single file and removing resolved macros and uncalled procedures, which PB will automatically remove in the next step when the .asm file is created. "Create .pb" is therefore only useful if you want to have a clean and slick version of your .pb file (but it seems to make the biggest problems ;)).
Et cetera is my worst enemy
User avatar
ChrisR
Addict
Addict
Posts: 1150
Joined: Sun Jan 08, 2017 10:27 pm
Location: France

Re: [IDE Tool] pbOptimizer

Post by ChrisR »

You were fast
chi wrote: Sun Apr 25, 2021 8:02 pm (I mean, who would do that??? :lol:). Will be fixed soon!
Probably someone who has fun with these Little spaces :lol:

Thank you for the explanation on "Create .pb".
Maybe in case of error at compile time you could ask to continue from the original source.
User avatar
chi
Addict
Addict
Posts: 1034
Joined: Sat May 05, 2007 5:31 pm
Location: Linz, Austria

Re: [IDE Tool] pbOptimizer

Post by chi »

ChrisR wrote: Sun Apr 25, 2021 9:12 pm Thank you for the explanation on "Create .pb".
Maybe in case of error at compile time you could ask to continue from the original source.
You're welcome ^^. I should probably do something like that, or give a better description somewhere in the settings...
Et cetera is my worst enemy
User avatar
chi
Addict
Addict
Posts: 1034
Joined: Sat May 05, 2007 5:31 pm
Location: Linz, Austria

Re: [IDE Tool] pbOptimizer

Post by chi »

updated to v0.9.8.10

This update should fix all problems with Constants, Version Info and RC files...
Et cetera is my worst enemy
loulou2522
Enthusiast
Enthusiast
Posts: 501
Joined: Tue Oct 14, 2014 12:09 pm

Re: [IDE Tool] pbOptimizer

Post by loulou2522 »

Thanks Chi,
Great Programm; I work with PBOPTIMIZER for a project of more than 64000 lines.
Result: The program runs normally, with less memory consumption and a slightly reduced executable size
I advise all Purebasic programmers with large projects to use "PBOPTIMIZER".
Cheers,
User avatar
chi
Addict
Addict
Posts: 1034
Joined: Sat May 05, 2007 5:31 pm
Location: Linz, Austria

Re: [IDE Tool] pbOptimizer

Post by chi »

Hehe, thanks for the nice review, loulou!
And thanks for finally getting me to correct the version info section. In retrospect, I don't know why I hesitated so long :)
Et cetera is my worst enemy
Post Reply