1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93
| @echo on
set BASEDRV=c:
set FPCNEWVERSION=2.4.1
set FPCOLDVERSION=2.2.4
set BASEINSTALL=%BASEDRV%\programs\fpc
set FPCBASEDIR=%BASEINSTALL%\%FPCNEWVERSION%
set SRCDIR=%BASEINSTALL%\fpsrc\%FPCNEWVERSION%
set PPCNAME=ppc386
set FPCTARGET=i386-win32
set FPCSTART=%BASEINSTALL%\%FPCOLDVERSION%\bin\%FPCTARGET%\%PPCNAME%
set LOGDIR=%BASEDRV%\programs
set INSTALLDIR=%FPCBASEDIR%
set BINUTILSDIR=C:\programs\Binutils
REM some random opts.
@REM set OPTS=-gl -dSAX_HTML_DEBUG -dUSE_MINGW_GDB
set OPTS=
@REM set COMMONOPTS=UPXPROG=echo COPYTREE=echo OPT="%OPTS%" GINSTALL=myinst.exe
set COMMONOPTS=UPXPROG=echo COPYTREE=echo OPT="%OPTS%"
REM Lazarus variables
set LAZSRCDIR=%BASEDRV%\programs\lazarus_svn
@REM set OPTSLAZ=-g- -O2 -CX -XX -WG
set OPTSLAZ=
set COMMONOPTSLAZ=OPT="%OPTSLAZ%"
set LAZCONFDIR=%USERPROFILE%\Local Settings\Application Data\lazarus-SVN
rem === invariant part ===
REM suppression des anciens logs
del %LOGDIR%\build_fpc_log.txt
del %LOGDIR%\install_fpc_log.txt
REM svnupdate des source FPC
TortoiseProc.exe /command:update /path:"%SRCDIR%\" /closeonend:1
REM certains fichiers des sources peuvent êtres modifiés par le processus de
REM compilation. Il faut faire un revert dessus. Malheureusement cette commande
REM nécessite un intervention manuelle avec TortoiseProc.exe
TortoiseProc.exe /command:revert /path:"%SRCDIR%\" /closeonend:1
REM on se place dans le répertoire de compilation de fpc
cd %SRCDIR%
REM ajout au path des binaires de la version FPC qui fait la compil (pour les
REM outils rm ,etc., par pour fpc.Exe)
Path=%BINUTILSDIR%;%Path%
REM ********* Compil FPC ***************
make clean all %COMMONOPTS% FPC=%FPCSTART% 1> %LOGDIR%\build_fpc_log.txt 2>&1
REM on supprime les anciens répertoires de la précédentes compil
rmdir /S /Q %FPCBASEDIR%\doc
rmdir /S /Q %FPCBASEDIR%\examples
rmdir /S /Q %FPCBASEDIR%\msg
rmdir /S /Q %FPCBASEDIR%\units
rmdir /S /Q %FPCBASEDIR%\bin
REM Ajout des outils GNU et de fpc.cfg au répertoires /bin/i386-win32
TortoiseProc.exe /command:update /path:"%BINUTILSDIR%\" /closeonend:1
tortoiseproc.exe /command:dropexport /droptarget:"%FPCBASEDIR%\bin" /path:"%BINUTILSDIR%"
cd %FPCBASEDIR%\bin
rename Binutils %FPCTARGET%
cd %SRCDIR%
copy %BASEINSTALL%\fpc.cfg %FPCBASEDIR%\bin\%FPCTARGET%\fpc.cfg
REM **** INSTALL FPC **************
make install %COMMONOPTS% INSTALL_PREFIX=%INSTALLDIR% FPC=%SRCDIR%\compiler\%PPCNAME% 1> %LOGDIR%\install_fpc_log.txt 2>&1
make clean >NUL
REM ********** INSTALL LAZARUS *********************************
REM svn update de LAZARUS
TortoiseProc.exe /command:update /path:"%LAZSRCDIR%\" /closeonend:1
REM certains fichiers des sources peuvent etres modifiés par le processus de
REM compilation. Il faut faire un revert dessus. Malheureusement cette commande
REM nécessite un intervention manuelle avec TortoiseProc.exe
TortoiseProc.exe /command:revert /path:"%LAZSRCDIR%\" /closeonend:1
REM Suppression de l'ancien répertoire UNITS de Lazarus
@REM rmdir /S /Q %LAZSRCDIR%\units
REM ****** Compil/install de LAZARUS *********************
@REM cd %LAZSRCDIR%
@REM make clean all %COMMONOPTSLAZ% FPC=%INSTALLDIR%\bin\%FPCTARGET%\fpc.exe 1> %LOGDIR%\install_laz_log.txt 2>&1
REM suppression du répertoire de config
@REM rmdir /S /Q "%LAZCONFDIR%"
PAUSE |