Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Work in Progress / PurePlugin Assistant - Lite

Author
Message
Duffer
21
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 3rd May 2009 11:35 Edited at: 4th May 2009 17:44
Hi,

I attach a very much work-in-progress version of a program which can generate INI .ini and resource .rc files parsing your YourProcedures.pb file - you can then include the .rc when compiling the raw .dll in purebasic before you run PPFixer on it...

you can use the ini file in keywords in dbpro - by default the ini will include the pp initialized() command... you dont want that line though in two or more ini files in editor\keywords.

The only addition then is you need to put in ;[parameters],[and then the parameters in your command ie. oldstring,string,integer,integer] after the ProcedureCDLL line in the purebasic YourProcedures code and - dont forget to include oldstring as a parameter even if you're not going to see that parameter in the final command accessible by DBPro - also ;[return],and then put the variable type returned - ie. string, integer, float - after the final ProcedureReturn line in the procedure in pb but before the EndProcedure line.... if your purebasic procedurecdll is actually going to give a returable variable.

Where you are looking to generate a function type command with no incoming variable you can put ";[parameters],nowt" but don't forget to include the oldstring parameter in that line if you are not putting any parameters in to a function type command but do want a string out of it...

in your YourProcedures.pb file which you are parsing you could create a procedure like say ProcedureCDLL DF_TEST_COMMAND() - in the generated .rc resource file parsed from that it will ignore the underlines - and so the end command as seen in the .rc at the start of each line and in the .ini keywords file would be "DF TEST COMMAND" with no underlines....

Hopefully this makes some sort of sense to people who are/have used pureplugin and purebasic....

anyway here is some example purebasic YourProcedure code to give you an idea of how you have to remark your pb code to make this program work:-



excuse my appalling code here - but it gives you an idea of how it works -

the basic idea of this utility is to save you the total slog of doing the .rc file and .ini file as well as doing the cdll procedures in the yourprocedures.pb purebasic file.... saved me huge amounts of time and actually encouraged me to do a huge number of new commands for DBPro for personal use including a WIP v flexible and damn fast database command set....

and here is the attached rar zipped utility in WIP...

it dumps the .ini for DBProEditorKeywords and the .rc resource file for inclusion in the compiled purebasic dll (still needs PPFixer on the dll before it can then be put in the plugins-user DBPro folder) in the same folder as the original YourProcedures.pb file it parses...

[edit] 2.11pm 03/05/2009

Parsing of YourProcedures.pb - but with remarks to assist in parsing correct parameters and any return variable
Creating of DBPro keywords .ini file and .rc PureBasic resource file based upon parsing of YourProcedures.pb
Parsing of YourProcedures.pb without the need to put remarks in .pb file code after ProcedureCDLL lines and ProcedureReturn lines...
Parsing of YourProcedures.pb and/or DBPro Keywords .ini to create draft htm help files for the plugin commands for DBPro...

[edit] 3.33pm 04/05/2009

I have noticed that the parser just couldnt cope with a command type function dragged from the YourProcedures.pb file which had no parameters (and obviously no returned value) and so I made some further amendment.

I also noted that sometimes the stringtable miscalculated and threw in an additional "STRINGTABLE" and an additional "{" line in the resource file (parsed from the YourProcedures.pb file) at the end and I have corrected that to.

I have also added in some messages so I could monitor progress as it parses the YourProcedures.pb file... so far so good (and I've attached now the latest version).

##########################
Footnote

Don't forget to include as an #include file or as a Function or in the code of your main darkbasic file using commands generated with pureplugin lines like:-

null = pp initialized()
null = object exist(2)
null = camera exist(2)
null = light exist(2)
null = sprite exist(2)
null = bitmap exist(2)
null = image exist(2)
null = memblock exist(2)
null = sound exist(2)
null = music exist(2)
mnull$ = mid$("abcd",3)
null = file exist("abcd")

and dont either forget to put the latest pureplugin.dll in your compiler\plugins-user folder in DBPro too...

a long time dabbler with DBC and DBPro with no actual talent but lots of enthusiasm...

Attachments

Login to view attachments
Freddix
AGK Developer
21
Years of Service
User Offline
Joined: 19th Sep 2002
Location: France
Posted: 3rd May 2009 19:15
Hi Duffer,

Yeah, it's something you talked me that you wanted to develop.
It's a good job

Kindest Regards,
Frédéric Cordier

Gandalf said: "All we have to decide is what to do with the time that is given to us"
Odyssey-Creators - X-Quad Editor - 3DMapEditor
Duffer
21
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 4th May 2009 17:51 Edited at: 4th May 2009 17:52
@ all,

Can someone who has and uses pureplugin have a crack at using this on their YourProcedures.pb and let me know what you think and what you'd like to see...?

p.s. I also attach the latest version of the pureplugin.dll which is re-distributable in itself. If you are using commands in DBPro which you generated with pureplugin and PureBasic then you need (see above) to put this file in your compiler\plugins-user folder in DBPro...

a long time dabbler with DBC and DBPro with no actual talent but lots of enthusiasm...

Attachments

Login to view attachments

Login to post a reply

Server time is: 2024-04-19 12:45:17
Your offset time is: 2024-04-19 12:45:17