How to setup the TR4W Delphi Development Environment - n4af/TR4W GitHub Wiki

This is to document how to go about creating an environment to do development and/or testing on the TR4W code.

First this that is required is a Delphi development environment.

https://archive.org/details/delphi_7_ent_en

I started with the following webpage that discusses how to download the Delphi 7 Personal Edition (which is free). http://delphifocus.blogspot.com/2009/07/delphi-7-personal-official-download.html

One note is that the links in this page document how the original download locations moved, so to download Delphi: go to this link: http://www.mediafire.com/download.php?5qbzq7jjdoff4bm

The above link will take you to a mirror site to download Delphi_Personal.zip. Note that the Google Chrome browser had an issue downloading this file as it thought it was malware. I had to disable Malware protection in Chrome to download it. I ran the file though my Virus Scanner before I opened it. If you need a great, FREE, Windows virus scanner, try ClamAV available here: http://sourceforge.net/projects/clamav/files/clamav/win32/

After I extracted the Delphi ZIP file, I ran the Install.exe program.

Note that on Windows 7, the OS will report compatibility issues with this program. I just had the Install program run anyway. We will handle the compatibility issues later when we run Delphi itself.

The installer will come up and ask for a serial number. If you recall the original page I sent you to, it has a key on it. Email the team if you have trouble finding this...

At this point, just go through the default options.

Now Delphi should be installed, but when you run it, Windows 7 will again give you a compatibility error. (Actually, I did not run into the errors this timer, but I will so I will update this part later).

You should now have Delphi running. So now let's turn our attention to getting the latest software from GitHub (the version control system).

GitHub is a sourcecode control system that used git as its interface. First thing you should so is download a git client from here: http://git-scm.com/download/win Then if you want a Windows front-end to Git, you can download a Windows git client here: http://www.sourcetreeapp.com/download/ . Since you are reading this file, you can also access GitHub through the web interface.

Howie recommends a Delphi addin called GExperts: http://www.gexperts.org. It adds hotkeys and other features you may find helpful during your development. You can find more about that here: http://git-scm.com/download/win

You also have to install a Network/Internet control package called Indy. tO DO THAT, PROCEED AS FOLLOWS:

  • Grab the latest project from the GitHub https://github.com/IndySockets/Indy
  • Unzip the Indy Git Repository into a folder (c:\Indy for example).
  • Open a command prompt, and go to the directory above (c:\Indy in my example).
  • cd Lib and run fulld_7.bat. This will build the Indy DCUs.
  • In the directories settings below, add this directory to the search path.

#Setting up Search Paths once installed, you need to set up your directories: Menu Project/Options/Directories

Just to get started with the source, you can download it from https://github.com/n4af/TR4W

  • Object code is on my D: drive in directory 'newsrc' so mine is something like-
  • OUTPUT DIRECTORY: D:\newsrc\tr4w\target <<< where tr4w.exe is generated to
  • ORDERED LIST OF SEARCH PATHS:
  • D:\newsrc\tr4w\target
  • D:\newsrc\include\D7 <<< indy files for UDP (or the directory you used above).
  • D:\newsrc\tr4w\src\lang <<< Language files for translation
  • D:\newsrc\tr4w\src\trdos <<< older files from TR
  • D:\newsrc\tr4w\src\utils <<< delphi utilities tr4w utilities in 'tree' or 'k1ea'
  • D:\newsrc\tr4w\src <<< tr4w source

I took the default for Unit Aliases - I think the other project options are also defaults