[Lazarus] porting delphi project code
waldo kitty
wkitty42 at windstream.net
Sun Jun 2 19:34:10 CEST 2013
On 6/2/2013 12:47, Juha Manninen wrote:
> On 6/2/13, waldo kitty<wkitty42 at windstream.net> wrote:
>> i'll take a look at this... i've always compiled lazarus in debug mode... i
>> guess i'll have to also add FPC-trunk to my setup...
>
> Compiling FPC trunk is different from any Lazarus compilation modes.
> You must build and install FPC trunk separately. It is a little more
> difficult than building Lazarus trunk because you must edit fpc.cfg,
> but not very difficult.
currently i use the attached script to compile FPC... i developed it from the
wiki page methods... in this case, i will simply call it as
makefpc.bat trunk
i'm going to modify it slightly so that i can also specify which ppc386.exe file
to use for the bootstrapping... i'm naming them as
05/21/2012 15:52 2,042,368 ppc386-2.6.0.exe
05/31/2013 15:02 2,051,072 ppc386-2.6.2.exe
05/31/2013 15:02 2,051,072 ppc386.exe
so my script would effectively add -%2 to the ppc386 portion of the PP=
parameter of the make line IF %2 is not empty and exists in the directory ;)
i'm not sure what you mean by needing to edit fpc.cfg, though... i do use
$FPCVERSION in my generated fpc.cfg (see attached script) but that won't work
for this particular trunk install so i'll be leaving those 14 lines with the
specific version directory number as 'trunk' in this install...
i do not have user specific fpc.cfg config files at this time...
>> i'm sure... but i can't tell if it is a bug in lazarus or if it is something
>> triggered by an abort in the conversion...
>
> It was a bug in Lazarus converter triggered by an exception during
> conversion, but it is fixed now. See my other mails.
i did see that... i'm glad that i did go ahead and report what i did :)
thank you for your hard work and responses :)
--
NOTE: No off-list assistance is given without prior approval.
Please keep mailing list traffic on the list unless
private contact is specifically requested and granted.
-------------- next part --------------
@echo off
cls
rem set our root directory first
set myRoot=c:\freepascal
if not "%myFPCver%" == "" goto FPCverdone
rem now check that we entered a FPC version number
if "%1" == "" goto error1
rem set the FPC version number we are compiling
echo set myFPCver=%1
set myFPCver=%1
:FPCverdone
if not "%myFPCpath%" == "" goto FPCpathdone
rem build our path to that version's sources
echo set myFPCpath=%myRoot%\fpc\%myFPCver%
set myFPCpath=%myRoot%\fpc\%myFPCver%
:FPCpathdone
rem check that the path exists
if not exist %myFPCpath%\nul goto error2
echo directory %myFPCpath% exists...
if not "%myFPCbinutils%" == "" goto FPCbinudone
rem set our buildutils directory
echo set myFPCbinutils=%myRoot%\binutils
set myFPCbinutils=%myRoot%\binutils
:FPCbinudone
if "%myFPCpathset%" == "TRUE" goto pathok
echo setting the path...
set PATH=%myFPCbinutils%\i386-win32;%myFPCpath%\bin\i386-win32;%PATH%
set myFPCpathset=TRUE
:pathok
rem check if the FPC examples directory exists... if yes, delete it...
if not exist %myFPCpath%\examples goto exampdone
echo ren %myFPCpath%\examples examps
ren %myFPCpath%\examples examps
rem rd /s /q %myFPCpath%\examples
:exampdone
rem now let's go and compile this version of FPC
echo.
echo compiling FPC %myFPCver%...
echo.
cd /d %myFPCpath%
echo make clean all install INSTALL_PREFIX=%myFPCpath% PP=%myFPCbinutils%\ppc386.exe DATA2INC=%myFPCpath%\utils\data2inc.exe
make clean all install INSTALL_PREFIX=%myFPCpath% PP=%myFPCbinutils%\ppc386.exe DATA2INC=%myFPCpath%\utils\data2inc.exe
rem now let's create a fpc.cfg if needed
if exist %myFPCpath%\bin\i386-win32\fpc.cfg goto end
rem create fpc.cfg because it does not exist
echo creating fpc.cfg...
cd /d %myFPCpath%\bin\i386-win32
echo fpcmkcfg -d basepath=%myFPCpath% -o .\fpc.cfg
fpcmkcfg -d basepath=%myFPCpath% -o .\fpc.cfg
goto end
:error1
echo.
echo what version of FPC are we compiling?
echo.
goto end
:error2
echo.
echo the directory for FPC %myFPCver% does not exist! please verify and try again...
echo.
set myFPCver=
set myFPCpath=
goto end
:end
cd /d %myRoot%
More information about the Lazarus
mailing list