Page 1 of 4
PBSource-Converter(v394 to v400) Released!
Posted: Wed Apr 05, 2006 7:07 pm
by AL90
Hi,
What is the PBSourceConverter?
----------------------------------------
PBSourceConverter is a Plugin based "Multi-Pass Converter" with it you can converting PurBasic-Sources.
So you can make a compatible Sourcecode for a new PureBasic-Compiler. As alternative you can also make
compatible Sourcecodes to previously versions of PureBasic. So you must only create an own PluginFile for it.
The current version of Converter contains already the Plugin "PB394 to PB400".
DownLoad Link:
http://www.codersworkshop.com/viewshowcase.php?id=839

Posted: Wed Apr 05, 2006 7:30 pm
by Inf0Byt3
Great job. I saved alot of time with your tool.
Posted: Wed Apr 05, 2006 7:34 pm
by Trond
Good idea and good job, but I still had some severe problems with my program after conversion because of an
extremely tricky usage of ExamineDirectory(), NextDirectoryEntry() and OpenPreferences(). I can't even solve it manually.

Posted: Wed Apr 05, 2006 7:45 pm
by AL90
Thanks all!
@Trond
Yes, I'm known the problems with ExamineDirectory() and so on.
I'm have also problems with it and i can't it explain.

Posted: Wed Apr 05, 2006 7:54 pm
by Trond
Actually, that code was correctly converted

, but I was using NextDirectoryEntry() in an unsupported way. I got around it by using DisableDebugger and EnableDebugger.
Posted: Wed Apr 05, 2006 9:32 pm
by Flype
This is very nice, usefull, welcome and well done !
I'm trying your converter on a big project.
Is it possible to do a rule for such case ?
( using PureCOLOR library for example )
Code: Select all
PureCOLOR_SetGadgetColor(#gList,#Black,$ffffff)
translated to :
Code: Select all
SetGadgetColor(#gList,#PB_Gadget_BackColor,$ffffff)
SetGadgetColor(#gList,#PB_Gadget_FrontColor,#Black)
2/
Is it possible to add the possibility to process a bunch of files ( convertion of all files of a project in a row ) ?
3/
In the 3.94 to 4.0, GetDatabaseLong() and GetDatabaseFloat is not converted.
Posted: Wed Apr 05, 2006 10:18 pm
by AL90
@Trond
Actually, that code was correctly converted.

I hope that.
Unsupported way? how?
@Flype
translated to :
Code:
SetGadgetColor(#gList,#PB_Gadget_BackColor,$ffffff)
SetGadgetColor(#gList,#PB_Gadget_FrontColor,#Black)
Normaly yes. you can add a new converting job for current plugin.
Is it possible to add the possibility to process a bunch of files ( convertion of all files of a project in a row ) ?
Includes? it comes in later versions.
In the 3.94 to 4.0, GetDatabaseLong() and GetDatabaseFloat is not converted.
hmm these commands are already supported by pluginfile. Get on Edit
and check the Pluginfile. Here the part of script from plugin.
Code: Select all
[BEGIN JOB]
OriginalName = GetDatabaseLong
ReplacedName = GetDatabaseLong
[ADD PARAMETER]
Position = 1
[FROM COMMAND]
CommandName = UseDatabase | OpenDatabase | OpenDatabaseRequester
Position = 1
[ALLOW #PB_ANY]
Position = 1
[END JOB]
[BEGIN JOB]
OriginalName = GetDatabaseFloat
ReplacedName = GetDatabaseFloat
[ADD PARAMETER]
Position = 1
[FROM COMMAND]
CommandName = UseDatabase | OpenDatabase | OpenDatabaseRequester
Position = 1
[ALLOW #PB_ANY]
Position = 1
[END JOB]
The values will be get so from UseDatabase and OpenDatabase. If the
value cannot recognize, the converter set a <value recognize failed>
Posted: Wed Apr 05, 2006 10:29 pm
by dracflamloc
Hey this is cool. Thanks!
Posted: Wed Apr 05, 2006 11:58 pm
by AL90
No problem.
Thanks to all for interesting to my tool.
Posted: Thu Apr 06, 2006 12:04 am
by fsw
Cool Tool
The only thing that needed to be changed manually on a 45K source code was #PB_EventMenu and #PB_EventGadget.
(they changed to #PB_Event_Menu and #PB_Event_Gadget)
Even have to congratulate Fred & Co, because the exe size changed from 100k to 80k.
Re: PBSource-Converter(v394 to v400) Released!
Posted: Thu Apr 06, 2006 12:55 am
by PB
> DownLoad Link:
>
http://www.codersworkshop.com/viewshowcase.php?id=839
I get this error when clicking the zip link on the URL above:
Code: Select all
While trying to retrieve the URL:
The following error was encountered:
Connection Failed
The system returned:
Error: Could not connect to server.
The remote host or network may be down. Please try the request again.
Your cache administrator is root.
Re: PBSource-Converter(v394 to v400) Released!
Posted: Thu Apr 06, 2006 1:03 am
by rsts
dunno - works fine for me (at 8:00PM EDT)
Great tool - many thanks for sharing with us.
cheers
Re: PBSource-Converter(v394 to v400) Released!
Posted: Thu Apr 06, 2006 1:24 am
by PB
I still can't get it, nor can I see the screenshot of it.
@AL90: Can you mirror it somewhere more reliable? Thanks!
Posted: Thu Apr 06, 2006 1:48 am
by Lyon
Here ya go PB:
Direct Download
Posted: Thu Apr 06, 2006 1:50 am
by Lyon
PS. Thanks AL90 for another great and free tool!