Preprocessing Delphi.NET projects for Compact Framework Preview

I’ve created a Delphi Win32 project that preprocesses Delphi.NET project files so that it can enable a project to be compilable for the Compact Framework (without errors), using the Delphi for .NET Compact Framework Technology Preview.

The source and binary for the Delphi Win32 project is available on CodeCentral.

Posted by Chee Wee, Chua on September 12th, 2005 under Delphi |



33 Responses to “Preprocessing Delphi.NET projects for Compact Framework Preview”

  1. Jeremy North Says:

    Cool. I wrote an IDE addin yesterday so that I could do a build from inside the IDE and output the build info to the message view and copy the output to the shared storage folder for the emulator.

    I also wanted to be able to assign a shortcut and add the command to a toolbar.

    Can’t wait to try out your solution.

    cheers,

    Jeremy

  2. Chris Bruner Says:

    I’m soon to be starting a project involving Pocket PC’s, which run Windows Mobile 2003. Is this the same as the Compact Framework? You guys are doing so many things, I get totally lost in the acronyms.

  3. Chee Wee Chua Says:

    Hi Chris,

    In a way, it is. You need to get the Delphi for .NET Compact Framework Technology Preview and this Preprocessor application that I’ve developed helps you to remove code not supported by Compact Framework.

  4. Daniel Polistchuck Says:

    You da man!

  5. Daniel Polistchuck Says:

    One more thing… the .PAS file is missing from your CodeCentral entry… :)

  6. Chee Wee Chua Says:

    Daniel,

    Notice I didn’t say "complete" :> I’ll update the CC entry. Thanks for the feedback!

  7. Elias Says:

    Hi, I have a problem… when I use you preprocessor on a WinForm project file I have a windows error… on kernel32.dll like this…

    AppName: makecfcompatible.exe AppVer: 0.0.0.0 ModName: kernel32.dll

    ModVer: 5.1.2600.2180 Offset: 0001eb33

    What’s wrong ?

  8. Elias Says:

    Hi , found a first solution… on prev post…

    The DCCIL_CF const is wrong for me… cause my path is .. C:\Programmi\Borland\BDS\3.0\CFPreview\bin instead of your const C:\Program Files\Borland\BDS\3.0\CFPreview\bin\dccil.exe …

    Let me know if you can rebuilt the application because I have errors on compiling your project !

  9. Chee Wee Chua Says:

    Hi Elias,

    Updated the CC entry. Please download again.

  10. Justin Says:

    Hey one of my sample projects doesnt compile when i try… i get this error ,

    WinForm.pas(54) Error: E2003 Undeclared identifier: ‘SuspendLayout’

    WinForm.pas(59) Error: E2003 Undeclared identifier: ‘Name’

    WinForm.pas(60) Error: E2003 Undeclared identifier: ‘TabIndex’

    WinForm.pas(66) Error: E2003 Undeclared identifier: ‘Name’

    WinForm.pas(67) Error: E2003 Undeclared identifier: ‘TabIndex’

    WinForm.pas(73) Error: E2003 Undeclared identifier: ‘Name’

    WinForm.pas(74) Error: E2003 Undeclared identifier: ‘TabIndex’

    WinForm.pas(79) Error: E2003 Undeclared identifier: ‘AutoScaleBaseSiz

    WinForm.pas(84) Error: E2003 Undeclared identifier: ‘Name’

    WinForm.pas(86) Error: E2003 Undeclared identifier: ‘ResumeLayout’

    if i got into my form and goto the the init. components section and remove / comment out those lines it works… does your dll only process the DPR ?

    Justin

    AKA Delphian

  11. Chee Wee Chua Says:

    It’s not clear what you are doing.

    Please check whether all your files have been included in your project. If not, please include them.

    Please provide complete steps of what you’re doing, and the paths to the complete files in your project.

  12. Chee Wee Chua Says:

    Please provide complete steps of what you’re doing, and the paths to the complete files in your project.

  13. Chee Wee Chua Says:

    *** Please provide complete steps of what you’re doing, and the paths to the complete files in your project. ***

    So far, you’ve provided nothing I’ve asked for, so I can’t help you.

  14. Justin Says:

    The Path to my project is

    c:\program files\borland\dotnet\MPlayerDotNet

    I have one pas file in my project called WinForm.pas. It is included as " Winform in c:\program files\borland\dotnet\MPlayerDotNet\WinForm.Pas" in the uses section.

    I point your sample compiling app at " c:\program files\borland\dotnet\MplayerDotNet\WinFormTest.dpr"

    what else do you need ?

    Justin

  15. Chee Wee Chua Says:

    Justin,

    When did you download the preprocessor? If it’s not recently downloaded, you might want to download it again.

    Please post the contents of DCCCF.OUTTXT.

    The preprocesser processes all files, not just .dpr or .dpk

  16. Justin Says:

    Prob somewhere around the 21st of this month , have you any changes since ?

    Kind Regards

    Justin

  17. Chee Wee Chua Says:

    Please do not skip anything I write. I wrote previously, post the contents of DCCCF.OUTTXT

  18. Justin Says:

    pritty much as i posted a few posts ago..

    i suspect the error E2003 means that the file being compiled hasnt been fixed.

    Borland Delphi for .NET compiler version 17.0

    Copyright (c) 1983,2004 Borland Software Corporation

    Confidential pre-release version built Jul 6 2005 09:40:16

    .NET Framework v1.1.4322 loaded

    winformtest.dpr(1)

    winformtest.dpr(14)

    WinForm.pas(1)

    WinForm.pas(6)

    WinForm.pas(7)

    WinForm.pas(9)

    WinForm.pas(55) Error: E2003 Undeclared identifier: ‘SuspendLayout’

    WinForm.pas(60) Error: E2003 Undeclared identifier: ‘Name’

    WinForm.pas(61) Error: E2003 Undeclared identifier: ‘TabIndex’

    WinForm.pas(67) Error: E2003 Undeclared identifier: ‘Name’

    WinForm.pas(68) Error: E2003 Undeclared identifier: ‘TabIndex’

    WinForm.pas(74) Error: E2003 Undeclared identifier: ‘Name’

    WinForm.pas(75) Error: E2003 Undeclared identifier: ‘TabIndex’

    WinForm.pas(80) Error: E2003 Undeclared identifier: ‘AutoScaleBaseSize’

    WinForm.pas(85) Error: E2003 Undeclared identifier: ‘Name’

    WinForm.pas(88) Error: E2003 Undeclared identifier: ‘ResumeLayout’

    WinForm.pas(120)

    WinForm.pas(19) Hint: H2219 Private symbol ‘Button3′ declared but never used

    winformtest.dpr(14) Fatal: F2063 Could not compile used unit ‘C:\Program Files\Borland\dotnet\MPlayerDotNet\WinForm.pas’

  19. Chee Wee Chua Says:

    Post the *ENTIRE* contents of DCCCF.OUTTXT.

  20. Justin Says:

    That was the *ENTIRE* contents mate.

    If i am doing something wrong tell me as i would appreate ANY help you can give.

    Kind Regards

    justin

  21. Chee Wee Chua Says:

    The preprocessor is exactly that. A preprocessor to scan and fix all the files of a project.

    On preprocessing, it compiles the entire project once, and note the errors. The result of the compiler output (which are usually errors) are sent to DCCCF.OUTTXT.

    Then, it comments out every line on each project file that has error E2003 on it, and recompiles the project, and sends the compiler output to DCCCF.OUTTXT again.

    Hence, the entire DCCCF.OUTTXT should look like as below. As it is, the DCCCF.OUTTXT you posted shows that the compiler ran only once, which is not possible at all.

    Borland Delphi for .NET compiler version 17.0

    Copyright (c) 1983,2004 Borland Software Corporation

    Confidential pre-release version built Jul 6 2005 09:40:16

    .NET Framework v1.1.4322 loaded

    WinFormTest.dpr(1)

    WinFormTest.dpr(13)

    WinForm.pas(1)

    WinForm.pas(6)

    WinForm.pas(7)

    WinForm.pas(9)

    WinForm.pas(53) Error: E2003 Undeclared identifier: ‘SuspendLayout’

    WinForm.pas(58) Error: E2003 Undeclared identifier: ‘Name’

    WinForm.pas(59) Error: E2003 Undeclared identifier: ‘TabIndex’

    WinForm.pas(65) Error: E2003 Undeclared identifier: ‘Name’

    WinForm.pas(66) Error: E2003 Undeclared identifier: ‘TabIndex’

    WinForm.pas(72) Error: E2003 Undeclared identifier: ‘Name’

    WinForm.pas(73) Error: E2003 Undeclared identifier: ‘TabIndex’

    WinForm.pas(78) Error: E2003 Undeclared identifier: ‘AutoScaleBaseSize’

    WinForm.pas(83) Error: E2003 Undeclared identifier: ‘Name’

    WinForm.pas(85) Error: E2003 Undeclared identifier: ‘ResumeLayout’

    WinForm.pas(112)

    WinFormTest.dpr(13) Fatal: F2063 Could not compile used unit ‘WinForm.pas’

    Borland Delphi for .NET compiler version 17.0

    Copyright (c) 1983,2004 Borland Software Corporation

    Confidential pre-release version built Jul 6 2005 09:40:16

    .NET Framework v1.1.4322 loaded

    WinFormTest.dpr(1)

    WinFormTest.dpr(13)

    WinForm.pas(1)

    WinForm.pas(6)

    WinForm.pas(7)

    WinForm.pas(9)

    WinForm.pas(112)

    WinFormTest.dpr(13)

    WinFormTest.dpr(23)

    WinFormTest.dpr(85)

    199 lines, 1.80 seconds, 16804 bytes code, 0 bytes data.

  22. Justin Says:

    OK so what causes YOUR program to only be used once ? does it need to be in the path or something silly like that ?

    or maybe i need to save the text file to your apps path ?

    Kind Regards

    Justin

  23. Chee Wee Chua Says:

    Justin,

    I’m afraid it’s beyond my ability and resources to help you or troubleshoot your issue.

    If the preprocessor doesn’t help you, you’re on your own.

    Alternatively, you might want to try Jeremy North’s Compact Framework Build Helper at http://www.jed-software.com/cf.htm

  24. Justin Says:

    I’ve allready built a replacement that is directly built into the Delphi 2005 ide. ( just finished as we speak ).

  25. Rene Lindsay Says:

    The CFPreview compiler just EXPIRED!

    It now only works if I set the date back on my PC.

    Is there a newer version of the compiler available, or is Borland abandoning the CF?

  26. Rene Lindsay Says:

    I just realised:

    Unlike Delphi 2005, the Delphi 2006 compiler WILL compile to the Compact Framework as well! And it already comes with a more complete list of dcuil’s, in the lib\cf folder. Therefore the CFPreview is no longer needed. All that is needed, is the CFBuildHelper for Delphi 2006, the MakeCFCompatible.dll, and the Compact Framework SDK.

  27. Christian Pries Says:

    Delphi 2006 just installed, i miss the .net compact framework sdk. google didn’t help me, just cf 1.1 and 2.0 redist., but not the SDK i need.

    in vs.net it’s implemented, but not in Delphi,

    right? any idea?

  28. Chee Wee Chua Says:

    Hi Christian,

    Do you mean deliver? Delphi 2006 does not deliver or come with Compact Framework SDK.

    Though you can use it to develop Compact Framework applications.

    I guess I don’t really understand your question.

  29. Luiz Fabio Says:

    CFBuildHelper for Delphi 2006 needs the CFP, but it’s only avaible for Delphi 2005. There isn’t any CFP for Delphi 2006 ?

  30. Chee Wee Chua Says:

    What’s CFP? Maybe you want to ask Jeremy on his requirements?

  31. Luiz Fabio Says:

    Compact Framework Preview…. the compiler for CF

  32. Enrico Recknagel Says:

    Hello, very Nice Tool, but in German Versions - after some Updates it dosn’t work. So i renamed dccil.de (maybe the german translation of dccil messages) now it works.

  33. Dennies Chang Says:

    The download URL might become broken link, I can not get it…. :(

Leave a Comment


Server Response from: blogs2.codegear.com

 
Copyright© 1994 - 2008 Embarcadero Technologies, Inc. All rights reserved. Contact Us   Legal Notices   Privacy Policy   Report Software Piracy