[lazarus] Lazarus-win32-HowTo-0.1

Jeffrey A. Wormsley daworm at cdc.net
Sat Jul 3 17:44:59 EDT 1999



Ok, here is my first draft of the Win32 HowTo.  Any comments will be
appreciated.

-----8< Cut Here >8------

Lazarus-win32-HowTo-0.1

Thanks to:
  Cliff Baeseman - For tremndous help getting me started
  Sergio A. Kessler - For the linux version of this document, which was my
guide
  Mike Z. - For providing the links to get the TK DLL's
  and all of the Lazarus development team who endured my seemingly endless
questions!



                      Installing Lazarus on a Windows 95/98 System

This is a decription of the steps that I took to get Lazarus set up on my
system.  It may seem like a lot more downloads than are absolutely
necessary, and it probably is, but it works, and that is the most important
thing.

First, you need to download a lot of files.  The files you will need and
their locations are listed below.  I suggest creating a directory to store
all of these for future reference.  Mine is \Install\Lazarus, with each
package getting their own subdirectory under that.  These are the latest
version as of this writing.  You may want to check the parent
page/directory to see if newer versions are available.

FPC       -
ftp://tflily.fys.kuleuven.ac.be/pub/fpc/dist/Win32/win3209912full.zip
GTK DLL's - http://user.sgic.fi/~tml/gimp/win32/gtk+-19990621.zip
	    http://user.sgic.fi/~tml/gimp/win32/glib-19990621.zip
CVS       -
http://download.cyclic.com/pub/cvs-1.10/windows/cvs-1.10-win.zip

1. Installing the sofware

Extract the FPC installation file to a temporary directory and run Install.
 Unless you are terminally short on hard drive space, I suggest you install
everything.  Use the suggested path, but feel free to change the drive
letter.  At the end of the install, a box will appear telling you to add a
directory to your path.  Write this down somewhere, we'll come to this
later.

Next, extract the GTK DLL files.  Where you extract these files is up to
you, but it will need to be on your path.  If you want, you can extract
them to your Windows directory, and it will be there automatically.  If you
want to keep it seperate for ease of uninstall or update, then add this
path to the note you made for FPC.

Finally, extract the CVS zip to the location you want to run it from.  Add
this path to your list.

2. Updating your AUTOEXEC.BAT file.

You need to add all of the paths noted above to your path statement.  If
you installed anything into a path with long file names, you need to use
the short name to add it to the path.  Just open a dos box in the directory
above and type DIR /AD /P to get the short directory name.  Here is an
example of my path line...

path
c:\windows\command;c:\batch;D:\PROGRA~1\CVS;E:\pp\bin\win32;e:\pp\gtkdll

Next, you need to set a few environment variables.  These will depend on
where you installed things, but aren't hard to figure out.

First, the CVS requires three entries.  Here are my settings.  The CVSROOT
***must*** be set exactly as shown.  The other two depend on where you
installed CVS.

SET CVSROOT=:pserver:cvs at tflily.fys.kuleuven.ac.be:/usr/local/CVS
SET HOMEDRIVE=D:
SET HOMEPATH=\PROGRA~1\CVS

Last, we need to set the FPCDIR directory.  If you followed the anove
instructions and let FC install to the \pp directory, all you will need to
change here is the drive letter.

SET FPCDIR=e:/pp/source

Note that I used / instead of \.  I had problems using the normal DOS style
seperator, but they went away when I changed to the /, so since it doesn't
matter to FPC, I left them that way.  If you use the \, and later have
problems building files because they can't be found, change to the / and it
should work.

Now, you will need to reboot for these changes to take affect.

3. Downloading the Lazarus code from CVS

In a DOS box, switch to the Free Pascal source directory. For me this was
e:\pp\source.  Now log on to CVS.  You should only need to do this once.

 cvs login

You should get a connect message inicating success.  If not, double check
that your PATH and all three environment variables are set correctly.  You
can test with the following:

 echo %PATH% <ENTER>
 echo %HOMEDRIVE% <ENTER>
 echo %HOMEPATH% <ENTER>
 echo %CVSROOT% <ENTER>
 echo %FPCDIR% <ENTER>

Now check out the code modules.  See the Lazarus-developer-HowTo for the
complete list of modules available, but for now these will be all you need.

 cvs -z3 checkout base gtk api fcl docs lazarus

This will take a while.

4. Create a compiled units directory

Starting from your Free Pascal source directory:

 md units <ENTER>
 cd units <ENTER>
 md win32 <ENTER>

5. Create a batch file for rebuilding your compiler.

First, back up your release version of the compiler.  Go to the
\pp\bin\win32 directory and copy ppc386.exe to ppc386r.exe (r for release).
 Don't rename, copy.

Now create the following batch file.  Here's mine.  Change line 2 to
reflect the correct drive for your Free Pascal installation.

 @echo off
 e:
 cd \pp\bin\win32
 del ppc386.exe
 ren ppc386r.exe ppc386.exe
 echo y | del \pp\source\units\win32\*.*
 cd \pp\source\compiler
 make cycle
 cd ..
 copy rtl\win32\*.o \opt\fpc\units\win32 >NUL
 copy rtl\win32\*.ppu \opt\fpc\units\win32 >NUL
 cd \pp\bin\win32
 ren ppc386.exe ppc386r.exe
 copy \pp\source\compiler\ppc386.exe .
 copy /Y base\*.* . >NUL

6. Create a batch file for updating your sources.

Each time you do this, you will be on the bleeding edge of development.  

 @echo off
 e:
 cd \pp\source
 cvs -z3 update base gtk api fcl docs lazarus

7. Compile everything

Now is the time to see if all this has paid off.  Here is a batch file that
can be handy for automating this task, or just do each step manually.

 @echo off
 e:
 cd \pp\source\fcl
 make
 cd \pp\source\gtk
 make
 cd \pp\source\lazarus
 make

8. Periodic maintenance

Every so often you may want to get caught up with the current code.  To do
this, just use the batch file for updating source you created in step 6,
then rebuild your compiler with the batch file from step 5, and finally use
the batch file from step 7 to put it all together.  You may want to archive
your setup before you do this, as there may be problems with the new code
you download, and you will want a way to get back to where you were.

Good luck,
  Jeff

(C) Copyright 1999, Jeffrey Alan Wormsley






More information about the Lazarus mailing list