Making it Yourself
Though not recommended, and we advise against it, if you are determined to make the Free Pascal and Lazarus manually, you may continue reading. Otherwise see our setup page on how to get running quickly and easily.
This page describes the steps used to create the Windows test versions of Free Pascal 3.0.4 and Lazarus 1.6 we bundle, which you can reuse to make it yourself. Linux users can just refer to our Linux script and follow the steps there.
The steps below will walk you through checking out source code, making a compiler, configuring a new compiler, making an IDE, and finally setting up your new IDE.
Requirements
Download and unpack the required tools listed below. You can place them wherever you want, but for this guide we'll be using
C:\Development\FreePascal
as our base path.
svnfor checking out revisions of FPC and Lazarus from subversion fpc 3.0.4for building the FPC checked out from subversion
Delete the folder
C:\Development\FreePascal
if it already exists.If you don't already have a command line svn client installed, download and install sliksvn.
Download and run the setup for a minimal compiler. Give it the location
C:\Development\FreePascal\fpc-3.0.4
and add the compiler bin folder to your path.set OLDPATH=%PATH% set PATH=C:\Development\FreePascal\fpc-3.0.4\bin\i386-win32;%PATH%
Making Free Pascal
Open a new cmd terminal, change to
C:\Development\FreePascal
and get fpc 3.0 from svn. This might take a while.set BASE=C:\Development\FreePascal cd %BASE% svn co http://svn.freepascal.org/svn/fpc/tags/release_3_0_4 fpc
Change folder to fpc and make and install. Again this might take a while.
cd fpc make all & make install INSTALL_PREFIX=%BASE%\fpc
If you feel like it make some cross compilers. Even more time waiting.
make crossinstall CPU_TARGET=x86_64 OS_TARGET=win64 INSTALL_PREFIX=%BASE%\fpc make crossinstall CPU_TARGET=i386 OS_TARGET=linux INSTALL_PREFIX=%BASE%\fpc
Create a configuration file, add the new compiler to our path, test out the compiler version.
set COMPILER=%BASE%\fpc\bin\i386-win32 cd %COMPILER% fpcmkcfg -d basepath=%BASE%\fpc -o .\fpc.cfg cd %BASE% set PATH=%COMPILER%;%OLDPATH% fpc -iV
If you see
3.0.4
, then you have successfully built the full release version of Free Pascal 3.0.4.Making Lazarus
Get lazarus fixes 1.6 from svn. Yet again, this might take a while.
cd %BASE% svn co http://svn.freepascal.org/svn/lazarus/branches/fixes_1_6 lazarus
Change folder to lazarus, make, and then run lazarus. This will actually be quick.
cd lazarus make all lazarus
When lazarus runs, set the following values in the first screen which appears.
LazarusC:\Development\FreePascal\lazarus\ CompilerC:\Development\FreePascal\fpc\bin\i386-win32\fpc.exe FPC SourcesC:\Development\FreePascal\fpc MakeC:\Development\FreePascal\fpc-3.0.4\bin\i386-win32\make.exe DebuggerC:\Development\FreePascal\fpc-3.0.4\bin\i386-win32\gdb.exe
Done
You're now done. You've made Free Pascal and Lazarus yourself using subversion sources. You can install packages using "Package | Install/Uninstall Packages". You can change editor fonts, colors, tabulation, and more using "Tools | Options". Have fun with your new Free Pascal and Lazarus.