Lib2PBImport 2013 - new Version

Applications, Games, Tools, User libs and useful stuff coded in PureBasic
User avatar
luis
Addict
Addict
Posts: 3876
Joined: Wed Aug 31, 2005 11:09 pm
Location: Italy

Re: Lib2PBImport 2013 - new Version

Post by luis »

Thank you for considering it :)
"Have you tried turning it off and on again ?"
A little PureBasic review
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Re: Lib2PBImport 2013 - new Version

Post by ts-soft »

I have edit my answer, please read again :wink:

If you save the export of new functions in the same file as the old, the import will be added (extra not merged)
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
User avatar
luis
Addict
Addict
Posts: 3876
Joined: Wed Aug 31, 2005 11:09 pm
Location: Italy

Re: Lib2PBImport 2013 - new Version

Post by luis »

ts-soft wrote: I think save without change the settings (all functions are selected, all parameters set to 0)
is not usefull?
Sorry in my hurry to thank you I had missed the question :)

Uhmm... I'm not sure to understand it by the way :oops:

Save the settings for the included/excluded functions ? I don't have that need right now, and considering the naming of the functions can change and they can be also added/removed... I would say probably no.
Last edited by luis on Sat Feb 02, 2013 8:34 pm, edited 1 time in total.
"Have you tried turning it off and on again ?"
A little PureBasic review
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Re: Lib2PBImport 2013 - new Version

Post by ts-soft »

Without make some settings, this tool is not usefull. You have to add the count of parameters.
I import only functions, that required, some shown functions are not usefull and will not work
(special in c++ libs) for import.
The tool is designed to append, if you select the same importfile.

I will see if i can do anythink, but i think a can't do it in a usefull way.
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
User avatar
luis
Addict
Addict
Posts: 3876
Joined: Wed Aug 31, 2005 11:09 pm
Location: Italy

Re: Lib2PBImport 2013 - new Version

Post by luis »

I think I understand what you mean now.
Using it with a dll the parameters' counters are all set to 0 so it can't be used in batch mode but it requires some editing of the counters where needed.

Initially I tried it with a .lib created by PB for the corresponding .dll always created by PB and in that case the number of parameters is not fixed to 0, the number for each function is correct.

So it would seem good in that case, but unfortunately there is another problem: the type for all parameters it's set to .i even if some are strings, and this would require some editing nevertheless, so probably it's not feasible for what I had in mind :(
"Have you tried turning it off and on again ?"
A little PureBasic review
User avatar
skywalk
Addict
Addict
Posts: 3997
Joined: Wed Dec 23, 2009 10:14 pm
Location: Boston, MA

Re: Lib2PBImport 2013 - new Version

Post by skywalk »

It is a pity you must also have the header file for a lib or dll to automate the parameter calls.
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Re: Lib2PBImport 2013 - new Version

Post by ts-soft »

luis wrote:Initially I tried it with a .lib created by PB for the corresponding .dll always created by PB and in that case the number of parameters is not fixed to 0, the number for each function is correct.
This is only true, if the stdcall convention with decoration is used in the importlib.
So it only works in very rare (only 32-Bit) libs. Most libs have removed the decoration.

Sorry, but this tool is only usefull to create a template for your import (and if required a importlib for DLL)

Greetings - Thomas
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
User avatar
luis
Addict
Addict
Posts: 3876
Joined: Wed Aug 31, 2005 11:09 pm
Location: Italy

Re: Lib2PBImport 2013 - new Version

Post by luis »

Yes, I understand, I missed that initially. My fault.

Thank you :wink:
"Have you tried turning it off and on again ?"
A little PureBasic review
IdeasVacuum
Always Here
Always Here
Posts: 6425
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: Lib2PBImport 2013 - new Version

Post by IdeasVacuum »

Owch - just got hurt not paying attention to what was being displayed - clicked the Preview button, assumed I was looking at a second window, so when I clicked the titlebar close window [x] button, Lib2PB closed, without offering to save.

It would be good if we could save the table to resume at a later date - I have a 530 function lib to import and it is taking much longer to input than I anticipated because some of the functions in the lib are missing from the vendor's header file/documentation.
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Re: Lib2PBImport 2013 - new Version

Post by ts-soft »

Okay, i will add Save- and LoadProject, but without the offering to save.
Saving on close is automatic done, if you have saved the project one time.

Greetings - Thomas
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
IdeasVacuum
Always Here
Always Here
Posts: 6425
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: Lib2PBImport 2013 - new Version

Post by IdeasVacuum »

....that will be great, thanks Thomas. 8)
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Re: Lib2PBImport 2013 - new Version

Post by ts-soft »

No problem :wink:

Done
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Re: Lib2PBImport 2013 - new Version

Post by ts-soft »

Small Bugfix:
"|" and all text after this, in comments, was not restored from projectfiles. Fixed.
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
X
Enthusiast
Enthusiast
Posts: 311
Joined: Tue Apr 04, 2006 6:27 am

Re: Lib2PBImport 2013 - new Version

Post by X »

Is it possible (for future versions) to be able to read LIB or DLL files and spit out import files with parameters?
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Re: Lib2PBImport 2013 - new Version

Post by ts-soft »

No, I can read no values which do not exist. Also in future not!
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
Post Reply