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 Nurse - to help with creating .rc, .ini and help files with Pureplugin based plugins

Author
Message
Duffer
21
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 10th Jan 2011 20:58 Edited at: 20th Apr 2011 20:31
This is a utility for people using PurePLUGIN to create plugins for DBPro.

For those of you who remember the excellent utility PurePLUGIN by Freddix, or care, if you've been using PurePLUGIN to create DBPro Plugins you've no doubt realised what a total and utter drag it is putting together .rc resource files when compiling your PureBasic file in to a shared dll file, perhaps renaming and then applying PPFixer to the original .dll so it works with DBPro, then also creating an INI file, then also creating basic help files, then tying the INI file to the help file(s).

I wanted to write a utility to short-cut this. A fair time ago I had a first crack. You had to flag how to interpret parameters, return variables etc in ";" rems in the .pb code. I really should have tried harder...:-

http://forum.thegamecreators.com/?m=forum_view&t=150031&b=8

I then got bored, did other things...

I eventually came back to it (see attached for download).

Parse 'your procedures' type .pb files for commands/functions

Accurately interpret .pb code so as to know whether the cdll procedures are aimed at creating functions or commands, number of parameters, type of parameters, type of any return variable - that's the first clever part

Create .rc resource file having read through .pb file

Assist with creation of end .dll. Apply PPFixer effect without having to run PPFixer on .dll

Create INI file (which allows for optional parameters commands ie. Min, Min1, Min2 with 2,3 and 4 parameters are all roled in to one line on the INI - and one help file) - that's the second clever part

Create 'help' files to tally with the INI file. I could'nt expend the effort to hard code html so I've just left them as txt files - works after a fashion. People can take that and change to colourful html if they want to

if you put ;[help],[text you want to add to explain the eventual command] in a line within a CDLL procedure in .pb purebasic code, (you can put up to 10 within a CDLL procedure) it will play out those up-to-10 lines as help lines of text regarding the command in the end help file for that command

This is still a work in progress....

If anyone has the inclination, please feel free to trial and test it...

You could probably shoe-horn it in to converting just a single .pb file for .rc and .ini and help file purposes...

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

Attachments

Login to view attachments
Duffer
21
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 10th Jan 2011 21:00
##########################
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...
Duffer
21
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 12th Jan 2011 09:12 Edited at: 16th Jan 2011 01:38
any feedback?

[edit] The help files were not playing through in to the DBPro core Help folder (if you wanted them to) and I have fixed that.

[edit] Also, the [] surrounding optional command/function parameters in the .ini keywords file and help files were not working properly, always - and I have fixed that too...

latest version of the PurePLUGIN Nurse utility posted above...

a long time dabbler with DBC and DBPro with no actual talent but lots of enthusiasm...
Duffer
21
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 20th Feb 2011 18:45 Edited at: 23rd Feb 2011 00:10
New release of PurePLUGIN Nurse attached to first post on this thread - found that the utility could not properly parse some functions returning an integer with optional parameters... corrected.

[edit] further amendment to .exe so it can safely overwrite earlier attempts at ini, dll, helpfiles...

a long time dabbler with DBC and DBPro with no actual talent but lots of enthusiasm...
bitJericho
21
Years of Service
User Offline
Joined: 9th Oct 2002
Location: United States
Posted: 20th Apr 2011 05:39 Edited at: 20th Apr 2011 05:46
I just get an error that the application was unable to start.

Windows 7 x64

Also tried to run as admin, same error.

Screen attached.

If you'd like to release it as open source I'd be happy to setup a trac project for it and fix what I can. This looks invaluable to anyone using PB to make DLLs.

If this was made in dbp it may just need to be recompiled with the newest RC release of DBP

[center]
Join the TGC Group!
http://tehcodez.groups.live.com

Attachments

Login to view attachments
Duffer
21
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 20th Apr 2011 20:13 Edited at: 20th Apr 2011 20:34
@ Jerico2day,

Desperately sorry about this. Basically I ironically compiled it using in part several of my own plugins developed using an earlier version.... I can't really distribute those now.

I'm waiting to see if DmitryK, creator of DKShop, can update that plugin for u7.7. Can we wait a week or 2? If he does, I'll recompile and submit. If he doesnt, I'll recompile in 2 weeks having moved up to u7.7 latest rc.

It's almost certainly that I've compiled using u7.6 that's causing you problems on Windows 7....

[edit] sorry just back from work and talking nonsense. Will upgrade to latest u7.7, recompile, post here then downgrade (for now) again to u7.6...

Give me a week, max 2.

(I would be deeply embarassed if I had to release my code - it is ruddy awful - but it get's job done...)

[edit]

Have posted a DBPro u7.7 rc7 version at the top.... hope it works!

As I say it's really geared to purePLUGIN and PureBASIC with DBPro... the 'YourProcedures' pb file is the one you want to interrogate for .rc (and then compile the purebasic project as a shared dll with the added .rc file as a resource) then ini and help files and the ppfixed .dll for the plugin....

Good luck and let me know what you think....

a long time dabbler with DBC and DBPro with no actual talent but lots of enthusiasm...
Duffer
21
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 25th Apr 2011 16:23
@ Jerico2day - did that improve things?

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

Login to post a reply

Server time is: 2024-04-18 10:27:30
Your offset time is: 2024-04-18 10:27:30