DelphiFAQ Home Search:

Porting InfoPower 4 to Delphi 5

 

comments2 comments. Current rating: 5 stars (2 votes). Leave comments and/ or rate it.

Jeff Overcash (TeamB) explains how to port InfoPower 4 to Delphi 5:

Open ip40_d4.dpk and answer yes to the upgrade question.
View source and change the package ip40_d4 to ip40_d5 on the first line and
change the description to Delphi 5 on line 25.
Open up the options for the package and add to the search path the source
directory. Optionally you can make the Unit output path set to the lib
directory. Also Optional is to remove the DCP directory and allow it to goto
the default Projects\bpl directory.
Next do a file save as ip40_d5.dpk (note these four steps will be done for each
of the packages).

Open the wwlfDef.pas file. At the end add

{$IFDEF VER130}
{$define wwDelphi3Up}
{$define wwDelphi4Up}
{$define wwDelphi5Up}
{$ENDIF}

File wwQuery.pas

line 372 insert before the {$ifdef wwDelphi4Up}

{$ifdef wwDelphi5Up}
if Datatype=ftBCD then
begin
if BCDToCurr(TBcd(Pointer(FFilterFieldBuffer)^), tempValue) then
FFilterParam.AsBCD := tempValue
else FFilterParam.AsBCD := 0;
end
else
{$else}

and add an {$endif} after the wwDelphi4Up stuff (line 390).
Note I think this is correct. I don't use BCD datatypes so this could be incorrect since it is
not tested. If it needs modifying I'll post that later.

File wwQbe.pas

line 586 insert before the {$ifdef wwDelphi4Up}

{$ifdef wwDelphi5Up}
if Datatype=ftBCD then
begin
if BCDToCurr(TBcd(Pointer(FFilterFieldBuffer)^), tempValue) then
FFilterParam.AsBCD := tempValue
else FFilterParam.AsBCD := 0;
end
else
{$else}

and add an {$endif} after the wwDelphi4Up stuff (line 604). (same warning as
before) Note I think this is correct. I don't use BCD datatypes so this could
be incorrect since it is not tested. If it needs modifying I'll post that
later.


File wwStorep.pas

line 313 insert before the {$ifdef wwDelphi4Up}

{$ifdef wwDelphi5Up}
if Datatype=ftBCD then
begin
if BCDToCurr(TBcd(Pointer(FFilterFieldBuffer)^), tempValue) then
FFilterParam.AsBCD := tempValue
else FFilterParam.AsBCD := 0;
end
else
{$else}

and add an {$endif} after the wwDelphi4Up stuff (line 331). (same warning as
before) Note I think this is correct. I don't use BCD datatypes so this could
be incorrect since it is not tested. If it needs modifying I'll post that
later.

File wwTable.pas

line 1176 insert before the {$ifdef wwDelphi4Up}

{$ifdef wwDelphi5Up}
if Datatype=ftBCD then
begin
if BCDToCurr(TBcd(Pointer(FFilterFieldBuffer)^), tempValue) then
FFilterParam.AsBCD := tempValue
else FFilterParam.AsBCD := 0;
end
else
{$else}

and add an {$endif} after the wwDelphi4Up stuff (line 1194). (same warning as
before) Note I think this is correct. I don't use BCD datatypes so this could
be incorrect since it is not tested. If it needs modifying I'll post that
later.

File wwDBNavigator

line 536 change

var Selections: TComponentList;
to
var Selections: {$ifdef wwDelphi5Up} TDesignerSelectionList {$else}
TComponentList {$endif};

line 540 change

var CompList: TComponentList;
to
var CompList: {$ifdef wwDelphi5Up} TDesignerSelectionList {$else}
TComponentList {$endif};

line 543

CompList := TComponentList.Create;
to
CompList := {$ifdef wwDelphi5Up} TDesignerSelectionList.Create {$else}
TComponentList.Create {$endif};

line 561

var NewSelections: TComponentList;
to
var NewSelections: {$ifdef wwDelphi5Up} TDesignerSelectionList {$else}
TComponentList {$endif};

line 564

NewSelections := TComponentList.Create;
to
NewSelections := {$ifdef wwDelphi5Up} TDesignerSelectionList.Create {$else}
TComponentList.Create {$endif};

line 608

Selections := TComponentList.Create;
to
Selections := {$ifdef wwDelphi5Up} TDesignerSelectionList.Create
{$else} TComponentList.Create {$endif};

Now just compile the package. You will get a couple of out of range warnings,
but they can be ignored.

Next open ip40d_d4.dpk and answer yes to the upgrade question.
View source and change the package ip40d_d4 to ip40d_d5 on the first line and
change the description to Delphi 5 on line 25.
Change the requires to be ip40_d5 on line 30.
Open up the options for the package and add to the search path the source
directory. Optionally you can make the Unit output path set to the lib
directory. Also Optional is to remove the DCP directory and allow it to goto
the default Projects\bpl directory.
Next do a file save as ip40d_d5.dpk

changes

File wwCollectionEditor.pas

line 185

Selections: TComponentList;
to
Selections: {$ifdef wwDelphi5Up} TDesignerSelectionList {$else}
TComponentList {$endif};

line 195

Selections := TComponentList.Create;
to
Selections := {$ifdef wwDelphi5Up} TDesignerSelectionList.Create {$else}
TComponentList.Create {$endif};

line 308

var Selections: Tcomponentlist;
to
var Selections: {$ifdef wwDelphi5Up} TDesignerSelectionList {$else}
TComponentList {$endif};

line 314

Selections := TComponentList.Create;
to
Selections := {$ifdef wwDelphi5Up} TDesignerSelectionList.Create {$else}
TComponentList.Create {$endif};

line 324

var Selections: TComponentList;
to
var Selections: {$ifdef wwDelphi5Up} TDesignerSelectionList {$else}
TComponentList {$endif};

line 336
Selections := TComponentList.Create;
to
Selections := {$ifdef wwDelphi5Up} TDesignerSelectionList.Create {$else}
TComponentList.Create {$endif};

File wwDBNavEdit

line 122

var Selections: TComponentList;
to
var Selections: {$ifdef wwDelphi5Up} TDesignerSelectionList {$else}
TComponentList {$endif};

line 130

Selections := TComponentList.Create;
to
Selections := {$ifdef wwDelphi5Up} TDesignerSelectionList.Create {$else}
TComponentList.Create {$endif};

Compile and install the package.

The following is for Enterprise owners.

Next open ip40client.dpk and answer yes to the upgrade question.
View source and change the package ip40client to ip40client_d5 on the first line
and change the description to Delphi 5 on line 25.
Change the requires to be ip40_d5 on line 29.
Open up the options for the package and add to the search path the source
directory. Optionally you can make the Unit output path set to the lib
directory. Also Optional is to remove the DCP directory and allow it to goto
the default Projects\bpl directory.
Next do a file save as ip40client_d5.dpk

File wwProvider.pas

remove BdeProv from line 16 of the uses clause.


File wwClient

line 187

sqlString:= provider.DataRequest(VarArrayOf(['w2wGetFieldInfo']));
to
sqlString:=
AppServer.AS_DataRequest(ProviderName,VarArrayOf(['w2wGetFieldInfo']));

Compile and install.


Content-type: text/html

Comments:

2006-01-21, 14:42:05
hubert@anemaat.nl from Netherlands  
rating
This was a great help for me to build the IP packages to D2005.
Due to the fact that I could not build the Woll2Woll packages in D2005, I did not buy D2006.
2006-04-05, 01:12:57
anonymous from India  
rating
Can you please tell me where do I find Wwkeycb.pas, Wwtable.pas these pascal unit files?

You can reply your valuable inputs on ajpatil@mail.com

Sincerely,
Abhijeet.

 

 

NEW: Optional: Register   Login
Email address (not necessary):

Rate as
Hide my email when showing my comment.
Please notify me once a day about new comments on this topic.
Please provide a valid email address if you select this option, or post under a registered account.
 

Show city and country
Show country only
Hide my location
You can mark text as 'quoted' by putting [quote] .. [/quote] around it.
Please type in the code:

Please do not post inappropriate pictures. Inappropriate pictures include pictures of minors and nudity.
The owner of this web site reserves the right to delete such material.

photo Add a picture: