Delphi 6 IDE guide to build Dev-PHP 2.1

2008-06-17
2012-12-07
1 2 > >> (Page 1 of 2)
  • tooldeveloper

    tooldeveloper - 2008-06-17

    NOTE: The below was also submitted to the project documentation and might be found there if it is accepted.
    ----------------------------------------------------------------------------------

    This is a quick installation guide for setting up a Delphi 6 development
    environment to compile Dev-PHP source code. This document was targeted at
    the 2.1 branch of the source code and refers to the directory structure used
    there.

    The following assumptions apply:
      a. You have already installed and updated Delphi 6 and patched to Update 2.
      b. You have an installed Subversion client.

     
    Before starting this process download the following files first:
    1. If you have not already done so, then download the Dev-PHP installation
       "Dev-PHP 2.0 IDE FullPackage" from the project downloads at Sourceforge
       (https://sourceforge.net/project/showfiles.php?group_id=54728)
    2. Download the Mozilla ActiveX control from:
       http://www.iol.ie/~locka/mozilla/mozilla.htm
       At the time of this writing the file is named MozillaControl11712.exe and
       can be downloaded directly from:
       http://www.iol.ie/~locka/mozilla/MozillaControl1712.exe
    3. Also click on the "Troubleshooting" link on the same Mozilla ActiveX control
       page, scrolls down the page, and download the "C runtime DLLs" found at:
       http://www.iol.ie/~locka/mozilla/runtime60.zip

      
    C Runtime DLL installation  
    1. Unzip the C runtime DLLs to a folder. You will see two DLLs named
       "MSVCP60.DLL" and "MSVCRT.DLL"
    2. Check your system folder (winnt\system32 or windows\system32) to see if you
       already have these two files and if so make a backup copy of them.der
    3. Copy the two files into your system32 folder. If you cannot copy them
       because they are in use then you can try rebooting first, and immediately
       copying them into the folder. Try shutting down all services, programs
       (including those in your system tray), and then try copying them in. If it
       still doesn't work then then you must find a method of replacing the file.
       One example is to write a small Delphi program using the MoveFileEx API call
       to push the rename off to the next reboot. Ex.
            {$APPTYPE CONSOLE}
            program MoveFileEx;
            uses SysUtils, Windows;
            begin
              Windows.MoveFileEx( pchar(ParamStr(1)), pchar(ParamStr(2)),
                      MOVEFILE_DELAY_UNTIL_REBOOT or MOVEFILE_REPLACE_EXISTING );
            end.
           
         Example of use:
           MoveFileEx c:\cruntimedlls\msvcrt.dll c:\winnt\system32\msvcrt.dll
    4. Verify that the copy was completed successfully and that the files are
       correct by using MD5, file compare, diff, whatever method suits you.
    5. Reboot (if necessary).  If you do not reboot then when you try to register
       the ActiveX control in the next section it is probable that it will fail
       with errors complaining about not finding the Mozilla Layout Libraries
       and/or an missing export from MSVCRT.DLL. Even with a newer MSVCRT.DLL it
       may still complain about the missing export so it is a good idea to use the
       ones supplied in the CRuntime.zip file.
     
     
    Mozilla WebBrowser ActiveX control installation
    1. Execute the Mozilla ActiveX control installation. The assumption is that it
       is installed into the default folder
       "C:\Program Files\Mozilla ActiveX Control v1.7.12"

      
    Dev-PHP Full package installation 
    1. Install the "Dev-PHP 2.0 IDE FullPackage" that you downloaded. It is assumed
       that you installed to the default folder "c:\Program Files\Dev-PHP2".
    2. Run Dev-PHP, open the "General Options" menu item from the "Options" menu.
    3. Navigate to the "Parser" tab.
    4. click on the "Declare Mozctlx" button
    5. Navigate to the Mozilla ActiveX control folder where you installed the
       control. The default is "C:\Program Files\Mozilla ActiveX Control v1.7.12".
    6. Select the MozCtlX.DLL
    7. At this point you should see the
       "DLLRegisterServer ...MozCtlx.DLL succeeded." message.
       If not then the most probable issue is that the Runtime DLLs are not the
       versions mentioned above.
    8. Shut down Dev-PHP

    Subversion download and preparation for compiling
    1. Download a current copy of the source from svn://www.mswil.ch/devphp using
       your subversion client. One option is to download your copy so that the
       root is set to the name of the branch as a subdirectory under the program
       folder where you installed the Dev-PHP program in the steps above. The rest
       of this document assumes that you have downloaded the source for the branch
       that you want to build into the C:\Program Files\Dev-PHP2 folder, ex.
       "C:\Program Files\Dev-PHP2\Branches_2.1".
    2. Create a DCU folder in the Dev-PHP2 folder to store the compiled unit files,
       ex. C:\Program Files\Dev-PHP2\DCU

    NOTE regarding Indy 8 components installed with Delphi 6:
    A default installation of Delphi 6 comes pre-installed with the Internet
    Direct (Indy) Internet components version 8. That version is not compatible
    with the Indy 10 components required by Dev-PHP and it will have to be removed
    from the component palette in order to compile Dev-PHP. To remove Indy 8:
    1. Open the "Install Packages..." menu item from the "Component" menu
    2. Find the "Internet Direct (Indy) for D6 Property and Component Editors"
       entry and highlight it
    3. Click on the "Remove" button.
    4. A dialog will popup that mentons that the runtime "Indy" package will also
       be removed.

      
    Delphi 6 - Setting up the Mozilla Browser control
    1. Open Delphi 6
    2. Select "Import ActiveX Control..." from the "Components" menu.
    3. Scroll down to find the "MozillaControl 1.0 Type Library (Version 1.0)"
       entry and highlight it.
    4. Click on the Install button.
    5. Keep clicking Yes or OK until the control is installed.
    6. Do not close the Delphi IDE.

    Delphi 6 Dev-PHP Components Project Group preparation
    1. File -> Open Project.
    2. Navigate to the "C:\Program Files\Dev-PHP2\Component" folder
    3. Open the "allcomponents.bpg" project group.
    4. Right click on the "dclIndyCore60.dpl" and select "Options"
    5. Select the "Directories/Conditionals tab and setup a search path to the
       "C:\Program Files\Dev-PHP2\Branches_2.1\Component\Indy10\Core" folder
    6. Click OK button to close project options
    7. Right click on the "dws2ClassesLibrary.dpl" and select "Options"
    8. Select the "Directories/Conditionals tab and setup a search path to the
       "C:\Program Files\Dev-PHP2\Branches_2.1\Component\dws\dws2rel
       \Libraries\ClassesLib" folder.
    9. Click OK button to close project options
    10. Right click on the "VirtualTreesD6D.dpl" and select "Options"
    11. Select the "Directories/Conditionals tab and setup a search path to the
        "C:\Program Files\Dev-PHP2\Branches_2.1\Component\Virtual Treeview\Source"
        folder.
    12. Click OK button to close project options
    13. Right click on the "VirtualShellToolsD6.dpl" and select "Options"
    14. Select the "Directories/Conditionals tab and setup a search path to the
        "C:\Program Files\Dev-PHP2\Branches_2.1\Component\VirtualShellTools\Include"
        folder.
    15. Click OK button to close project options
    16. Right click on the "VirtualShellToolsD6D.dpl" and select "Options"
    17. Select the "Directories/Conditionals tab and setup a search path to the
        "C:\Program Files\Dev-PHP2\Branches_2.1\Component\VirtualShellTools\Include"
        folder.
    18. Click OK button to close project options
    19. Do not close the Delphi IDE.

    Delphi 6 - Building the project group
    1. Select the "Build All Projects" menu option from the "Project" menu.
    2. If you have "warnings" turned on you will see a number of warnings from the
       different modules but no errors during the build. If you do see errors
       go back through the preparation steps above and recheck each module.

      
    Delphi 6 - Installing the components
    1. Right click on each of the following packages and Install them:
        dclCoreIndy60.bpl,
        dclIndyProtocols60.bpl
        idRunnerD6.bpl
        tb_2k.bpl
        tb2kdsgn_d6.bpl
        tbxdsgn_d6.bpl
        Utilities_d6.bpl
        xdom_3_1Delphi6.bpl
        dcldws2.bpl
        dws2classesLibrary.bpl
        php4delphiD6.bpl
        SynEdit_D6.bpl
        ThemeManagerD6D.bpl
        VirtualTreesD6D.bpl
        VirtualShellToolsD6D.bpl
        DoscommandPack.bpl
        devFileMonitorPkg.bpl
        WebServPack.bpl
        SynWeb_D6.bpl
    2. Close the AllComponents.bpg project group and save each of the modified
    projects.

    Compile Dev-PHP
    1. Finally, open the Dev-php.bpg project group file from the Source folder
    C:\Program Files\Dev-php2\branches_2.1\source
    2. Build the project.
    3. At this point any errors that you encounter during the build should be
       related to interim checkins rather than environment settings.

       
    Good luck!
     
    Michael P. Schneider
    tooldeveloper at the users.sourceforge.net
    Last updated: Tuesday June 17, 2008

     
    • Frederic Da Vitoria

      Wow! Impressive!

      One question: I went through almost the same steps as you did, tooldeveloper. Does anyone see any reason not to commit the directory modifications done in "Delphi 6 Dev-PHP Components Project Group preparation" (provided of course we use relative instead of absolute paths)?
      - 5 : ..\core
      - 8 : ..\ClassesLib

      It seems this data is stored in the cfg and/or dof files.

      BTW, my items 11 and 14 are empty (when I corrected the installation, I cleared them)... And I had to clear the path in devFileMonitor.bpl too.

      It shouldn't matter, but I am using the French version of Delphi 6. In a few days/weeks, I'll reinstall XP completely, and I'll reinstall Delphi too, so I'll have an opportunity to test the install procedure on an fresh system.

       
    • tooldeveloper

      tooldeveloper - 2008-06-17

      Thank you for the kind words. Pierre asked me to document my experience with getting Dev-PHP to build so viola...  (and yes I spelled it incorrectly for comedic effect *grin*)

      Yes, overridden search paths are stored in the DOF files. When the Delphi IDE builds the project it will regenerate the CFG file and replicate the path into that file.

      Re: Relative paths
      I prefer relative paths but for the purposes of documentation it has been my experience that using a hard path is more easily understood, especially when you take into account developers at varying levels of proficiency and developers whose primary language is not the language used in the guide. The guide could be enhanced to mention relative paths. YMMV.

      --Michael

       
      • Frederic Da Vitoria

        My question wasn't clear enough (although you are right, the documentation could be enhanced), my question was really: shouldn't the DOF files (with relative paths) be sent to the repository, thus avoiding for future downloaders the need to change the paths?

         
    • Pierre Fauconnier

      Hi Michael,

      Excellent work !
      Your contribution is accepted, of course.
      Months ago, (about 1 year ago) I started to write
      http://devphp.wiki.sourceforge.net/devphp2_tech
      and http://devphp.wiki.sourceforge.net/devphp2_tech.1
      ... then I stopped.

      The wiki of Dev-PHP is 'open'.
      Not as powerful as MediaWiki, nevertheless there is a discussion page.
      (I'm sure that both Frederic and you will appreciate it)
      Feel free to create a great guide ;)

      Congratulations,
      Pierre.

       
    • tooldeveloper

      tooldeveloper - 2008-06-17

      I would be happy to move this guide over there along with integrating any content already there.  At least there I can more easily fix the errors...(teach me to document at 3AM *grin*)

      --Michael

       
      • Pierre Fauconnier

        Another sense of humor - just trying to understand yours :-\ > document my experience with getting Dev-PHP to build so viola
        <s>voila</s> viola
        I guess that you were also speaking about viola engine.
        I agree with you, Dev-PHP could be better built *smile*

        > Teach me to document at 3AM
        When airmen are talking about 3AM, they mean right (as opposed to the left)
        teach me to document right (properly ?)

        Since I had a look at your skills profile, I believe that /you/ could be a teacher, here :)

         
    • tooldeveloper

      tooldeveloper - 2008-06-18

      This guide has been updated and moved to the wiki.

      --Michael

       
    • Angelo2007

      Angelo2007 - 2008-12-10

      i use tortoise svn.

      and i cannot acces to the svn.. whats wrong=??

      i us the url

      svn://www.mswil.ch/devphp

      and i get the error

      Error * Connection closed unexpectedly

       
    • Angelo2007

      Angelo2007 - 2008-12-10

      please check the url

      svn://www.mswil.ch/devphp

      i cand donwnload nothing, using the tortoise svn

      i get this error

      Error * Connection closed unexpectedly

      so thanks.

       
      • Urs Mäder

        Urs Mäder - 2008-12-10

        hello

        svn should now work.
        the error was a planned downtime from our energy dealer.

        thnx for your messages.

        urs maeder

         
    • Angelo2007

      Angelo2007 - 2008-12-10

      thanks all works, fine...:D

       
  • Angelo2007

    Angelo2007 - 2010-03-10

    for now i can´t acces to the svn

    i get this error

    svnlook: DB_VERSION_MISMATCH: Database environment version mismatch
    svnlook: bdb: Program version 4.8 doesn't match environment version 4.6

     
  • Pierre Fauconnier

    Hi angelo2007,

    > for now i can't access to the svn
    You're right. This issue will be fixed asap: Urs Maëder is very efficient :)
    For your information, we're porting Dev-PHP to Delphi-2009, so there are two branches
    see svn://www.mswil.ch/devphp/branch/

    Regards,
    Pierre.

     
  • Angelo2007

    Angelo2007 - 2010-03-11

    hello pf18387

    al the developer of devphp are amazing..

    thanks fot the update

     
  • Anonymous - 2010-04-04

    Dev PHP is written in Delphi 5 ?

     
  • Angelo2007

    Angelo2007 - 2010-04-04

    x4er0

    Dev PHP is written in delphi 6, and you need delphi 6 to compile. succefull
    but since delpho 6 to delphi 2010, it posible compile, but you need no check the components
    o update the component to newest versions to delphi 6

     
  • Anonymous - 2010-04-04

    Thank you for your quick reply:)
    I have another question, probably already downloaded all the files and I can't find the latest version of the source, whether it is even available?

     
  • Angelo2007

    Angelo2007 - 2010-04-06

    x4er0

    always make an svn check out to get the lastest version of the source code.

     
  • Anonymous - 2010-04-06

    Thank's Guys for answer :)
    But how can i download files from svn :/ ?

     
  • Anonymous - 2010-04-07

    Ok, I'm stupid guy only, because i don't read "TortoiseSVN" :)

     
  • Anonymous - 2010-04-24

    Why php or xdebuger not working if i have all files ?
    Who can give me working files to stabel version from svn ?

     
  • Pierre Fauconnier

    > Why php or xdebuger not working if i have all files ?
    Be more specific.

    > Who can give me working files to stabel version from svn ?
    I can do that.
    Two main branches (as stated by http://www.mswil.ch/websvn/ )
    1- devphp
    2- devphp_editor
    The devphp branch has two branches into its "branch" folder
    1a- D2009
    1b- Delphi6

    Since the beginning, the latest revision of each branch corresponded to the last known stable state.

    Regards,
    Pierre.

     
  • Anonymous - 2010-04-24

    hmm, look Pierre maybe you don't understand me, i have stable viersion from branch Delphi6 and all file php-cgi and xdebuger.
    I want debug one page for test and i have a error http://img99.imageshack.us/i/errorgi.jpg/
    I don't know why because, i don't touch source in debug.

     
1 2 > >> (Page 1 of 2)

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks