mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-13 08:59:27 +02:00
* more properties fixed
git-svn-id: trunk@14156 -
This commit is contained in:
parent
517ac768f0
commit
851b00f8e9
30
.gitattributes
vendored
30
.gitattributes
vendored
@ -127,7 +127,7 @@ compiler/cp850.pas svneol=native#text/plain
|
||||
compiler/cp866.pas svneol=native#text/plain
|
||||
compiler/cp8859_1.pas svneol=native#text/plain
|
||||
compiler/cp8859_5.pas svneol=native#text/plain
|
||||
compiler/crefs.pas -text
|
||||
compiler/crefs.pas svneol=native#text/plain
|
||||
compiler/cresstr.pas svneol=native#text/plain
|
||||
compiler/cstreams.pas svneol=native#text/plain
|
||||
compiler/cutils.pas svneol=native#text/plain
|
||||
@ -6170,8 +6170,8 @@ rtl/embedded/arm/at91sam7x256.pp svneol=native#text/plain
|
||||
rtl/embedded/arm/lpc21x4.pp svneol=native#text/plain
|
||||
rtl/embedded/arm/stm32f103.pp svneol=native#text/plain
|
||||
rtl/embedded/check.inc svneol=native#text/plain
|
||||
rtl/embedded/empty.cfg -text
|
||||
rtl/embedded/rtl.cfg -text
|
||||
rtl/embedded/empty.cfg svneol=native#text/plain
|
||||
rtl/embedded/rtl.cfg svneol=native#text/plain
|
||||
rtl/embedded/sysdir.inc svneol=native#text/plain
|
||||
rtl/embedded/sysfile.inc svneol=native#text/plain
|
||||
rtl/embedded/sysheap.inc svneol=native#text/plain
|
||||
@ -7090,7 +7090,7 @@ rtl/symbian/Makefile svneol=native#text/plain
|
||||
rtl/symbian/Makefile.fpc svneol=native#text/plain
|
||||
rtl/symbian/bindings/pbeexe.cpp -text
|
||||
rtl/symbian/buildrtl.pp svneol=native#text/plain
|
||||
rtl/symbian/symbian.pas -text svneol=unset#text/plain
|
||||
rtl/symbian/symbian.pas svneol=native#text/plain
|
||||
rtl/symbian/symbianinc/e32def.inc svneol=native#text/plain
|
||||
rtl/symbian/symbianinc/e32err.inc svneol=native#text/plain
|
||||
rtl/symbian/symbianinc/e32std.inc svneol=native#text/plain
|
||||
@ -7100,8 +7100,8 @@ rtl/symbian/sysheap.inc svneol=native#text/plain
|
||||
rtl/symbian/sysos.inc svneol=native#text/plain
|
||||
rtl/symbian/sysosh.inc svneol=native#text/plain
|
||||
rtl/symbian/system.pp svneol=native#text/plain
|
||||
rtl/symbian/uiq.pas -text svneol=unset#text/plain
|
||||
rtl/symbian/uiqclasses.pas -text svneol=unset#text/plain
|
||||
rtl/symbian/uiq.pas svneol=native#text/plain
|
||||
rtl/symbian/uiqclasses.pas svneol=native#text/plain
|
||||
rtl/symbian/uiqinc/qikapplication.inc svneol=native#text/plain
|
||||
rtl/symbian/uiqinc/qikapplicationoo.inc svneol=native#text/plain
|
||||
rtl/ucmaps/8859-1.txt svneol=native#text/plain
|
||||
@ -11171,15 +11171,15 @@ utils/kalyptus/kalyptus -text
|
||||
utils/kalyptus/kalyptusCxxToPas.pm -text
|
||||
utils/kalyptus/kalyptusDataDict.pm -text
|
||||
utils/mksymbian/Makefile svneol=native#text/plain
|
||||
utils/mksymbian/Makefile.fpc -text
|
||||
utils/mksymbian/cfgfile.pas -text
|
||||
utils/mksymbian/cmdline.pas -text
|
||||
utils/mksymbian/compiler.pas -text
|
||||
utils/mksymbian/constants.pas -text
|
||||
utils/mksymbian/mksymbian.lpi -text
|
||||
utils/mksymbian/mksymbian.pas -text
|
||||
utils/mksymbian/projectparser.pas -text
|
||||
utils/mksymbian/sdkutil.pas -text
|
||||
utils/mksymbian/Makefile.fpc svneol=native#text/plain
|
||||
utils/mksymbian/cfgfile.pas svneol=native#text/plain
|
||||
utils/mksymbian/cmdline.pas svneol=native#text/plain
|
||||
utils/mksymbian/compiler.pas svneol=native#text/plain
|
||||
utils/mksymbian/constants.pas svneol=native#text/plain
|
||||
utils/mksymbian/mksymbian.lpi svneol=native#text/plain
|
||||
utils/mksymbian/mksymbian.pas svneol=native#text/plain
|
||||
utils/mksymbian/projectparser.pas svneol=native#text/plain
|
||||
utils/mksymbian/sdkutil.pas svneol=native#text/plain
|
||||
utils/postw32.pp svneol=native#text/plain
|
||||
utils/ppdep.pp svneol=native#text/plain
|
||||
utils/ptop.pp svneol=native#text/plain
|
||||
|
@ -1,65 +1,65 @@
|
||||
{
|
||||
Copyright (c) 2007 by Pierre Muller
|
||||
|
||||
Common reference types
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
****************************************************************************
|
||||
}
|
||||
|
||||
unit crefs;
|
||||
|
||||
{$i fpcdefs.inc}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
globtype,
|
||||
cclasses;
|
||||
|
||||
type
|
||||
|
||||
TrefItem = class (TLinkedListItem)
|
||||
refinfo : tfileposinfo;
|
||||
constructor create(const ARefInfo : tfileposinfo);
|
||||
Function GetCopy:TLinkedListItem;virtual;reintroduce;
|
||||
end;
|
||||
|
||||
TRefLinkedList = class(TLinkedList)
|
||||
procedure WriteToPPU;
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
||||
constructor TRefItem.Create(const ARefInfo : tfileposinfo);
|
||||
begin
|
||||
Inherited Create;
|
||||
RefInfo:=ARefInfo;
|
||||
end;
|
||||
|
||||
Function TRefItem.GetCopy : TLinkedListItem;
|
||||
var
|
||||
NR : TRefItem;
|
||||
begin
|
||||
NR.Create(RefInfo);
|
||||
GetCopy:=NR;
|
||||
end;
|
||||
|
||||
procedure TRefLinkedList.WriteToPPU;
|
||||
begin
|
||||
end;
|
||||
|
||||
begin
|
||||
end.
|
||||
{
|
||||
Copyright (c) 2007 by Pierre Muller
|
||||
|
||||
Common reference types
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
****************************************************************************
|
||||
}
|
||||
|
||||
unit crefs;
|
||||
|
||||
{$i fpcdefs.inc}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
globtype,
|
||||
cclasses;
|
||||
|
||||
type
|
||||
|
||||
TrefItem = class (TLinkedListItem)
|
||||
refinfo : tfileposinfo;
|
||||
constructor create(const ARefInfo : tfileposinfo);
|
||||
Function GetCopy:TLinkedListItem;virtual;reintroduce;
|
||||
end;
|
||||
|
||||
TRefLinkedList = class(TLinkedList)
|
||||
procedure WriteToPPU;
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
||||
constructor TRefItem.Create(const ARefInfo : tfileposinfo);
|
||||
begin
|
||||
Inherited Create;
|
||||
RefInfo:=ARefInfo;
|
||||
end;
|
||||
|
||||
Function TRefItem.GetCopy : TLinkedListItem;
|
||||
var
|
||||
NR : TRefItem;
|
||||
begin
|
||||
NR.Create(RefInfo);
|
||||
GetCopy:=NR;
|
||||
end;
|
||||
|
||||
procedure TRefLinkedList.WriteToPPU;
|
||||
begin
|
||||
end;
|
||||
|
||||
begin
|
||||
end.
|
||||
|
@ -1,2 +1,2 @@
|
||||
# template for an rtl with all features disabled
|
||||
-Sf-
|
||||
# template for an rtl with all features disabled
|
||||
-Sf-
|
||||
|
@ -1,35 +1,35 @@
|
||||
# first, disable all
|
||||
-Sf-
|
||||
# uncomment to enable the stuff you want to use
|
||||
|
||||
# include full heap management into the rtl
|
||||
# -SfHEAP
|
||||
|
||||
# include support for init final code of units into the rtl
|
||||
# -SfINITFINAL
|
||||
|
||||
# -SfCLASSES
|
||||
# -SfEXCEPTIONS
|
||||
# -SfEXITCODE
|
||||
# -SfANSISTRINGS
|
||||
# -SfWIDESTRINGS
|
||||
# -SfTEXTIO
|
||||
# -SfCONSOLEIO
|
||||
# -SfFILEIO
|
||||
# -SfRANDOM
|
||||
# -SfVARIANTS
|
||||
# -SfOBJECTS
|
||||
# -SfDYNARRAYS
|
||||
# -SfTHREADING
|
||||
# -SfCOMMANDARGS
|
||||
# -SfPROCESSES
|
||||
# -SfSTACKCHECK
|
||||
# -SfDYNLIBS
|
||||
|
||||
# include exit code support
|
||||
-SfEXITCODE
|
||||
|
||||
# arm is powerful enough to handle a softfpu
|
||||
#ifdef CPUARM
|
||||
-SfSOFTFPU
|
||||
#endif CPUARM
|
||||
# first, disable all
|
||||
-Sf-
|
||||
# uncomment to enable the stuff you want to use
|
||||
|
||||
# include full heap management into the rtl
|
||||
# -SfHEAP
|
||||
|
||||
# include support for init final code of units into the rtl
|
||||
# -SfINITFINAL
|
||||
|
||||
# -SfCLASSES
|
||||
# -SfEXCEPTIONS
|
||||
# -SfEXITCODE
|
||||
# -SfANSISTRINGS
|
||||
# -SfWIDESTRINGS
|
||||
# -SfTEXTIO
|
||||
# -SfCONSOLEIO
|
||||
# -SfFILEIO
|
||||
# -SfRANDOM
|
||||
# -SfVARIANTS
|
||||
# -SfOBJECTS
|
||||
# -SfDYNARRAYS
|
||||
# -SfTHREADING
|
||||
# -SfCOMMANDARGS
|
||||
# -SfPROCESSES
|
||||
# -SfSTACKCHECK
|
||||
# -SfDYNLIBS
|
||||
|
||||
# include exit code support
|
||||
-SfEXITCODE
|
||||
|
||||
# arm is powerful enough to handle a softfpu
|
||||
#ifdef CPUARM
|
||||
-SfSOFTFPU
|
||||
#endif CPUARM
|
||||
|
@ -1,39 +1,39 @@
|
||||
{
|
||||
This file is part of the Free Pascal run time library.
|
||||
Copyright (c) 2007 by contributors of the Free Pascal Compiler
|
||||
|
||||
Symbian OS unit that adds common types, constants and functions
|
||||
for the Symbian API
|
||||
|
||||
See the file COPYING.FPC, included in this distribution,
|
||||
for details about the copyright.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
**********************************************************************}
|
||||
unit symbian;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses ctypes;
|
||||
|
||||
{$include e32def.inc}
|
||||
{$include e32err.inc}
|
||||
{.$include e32const.inc}
|
||||
{.$include e32cmn.inc}
|
||||
{.$include e32std.inc}
|
||||
|
||||
{ e32std.h header file }
|
||||
|
||||
{ User class }
|
||||
|
||||
function User_InfoPrint(aString: PChar): TInt; cdecl; external;
|
||||
|
||||
implementation
|
||||
|
||||
end.
|
||||
|
||||
{
|
||||
This file is part of the Free Pascal run time library.
|
||||
Copyright (c) 2007 by contributors of the Free Pascal Compiler
|
||||
|
||||
Symbian OS unit that adds common types, constants and functions
|
||||
for the Symbian API
|
||||
|
||||
See the file COPYING.FPC, included in this distribution,
|
||||
for details about the copyright.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
**********************************************************************}
|
||||
unit symbian;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses ctypes;
|
||||
|
||||
{$include e32def.inc}
|
||||
{$include e32err.inc}
|
||||
{.$include e32const.inc}
|
||||
{.$include e32cmn.inc}
|
||||
{.$include e32std.inc}
|
||||
|
||||
{ e32std.h header file }
|
||||
|
||||
{ User class }
|
||||
|
||||
function User_InfoPrint(aString: PChar): TInt; cdecl; external;
|
||||
|
||||
implementation
|
||||
|
||||
end.
|
||||
|
||||
|
@ -1,34 +1,34 @@
|
||||
{
|
||||
This file is part of the Free Pascal run time library.
|
||||
Copyright (c) 2007 by contributors of the Free Pascal Compiler
|
||||
|
||||
Symbian OS unit that adds common types, constants and functions
|
||||
for the UIQ API
|
||||
|
||||
See the file COPYING.FPC, included in this distribution,
|
||||
for details about the copyright.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
**********************************************************************}
|
||||
unit uiq;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses ctypes;
|
||||
|
||||
{$include e32def.inc}
|
||||
{$include e32err.inc}
|
||||
{.$include e32const.inc}
|
||||
{.$include e32cmn.inc}
|
||||
{$include e32std.inc}
|
||||
|
||||
|
||||
implementation
|
||||
|
||||
end.
|
||||
|
||||
{
|
||||
This file is part of the Free Pascal run time library.
|
||||
Copyright (c) 2007 by contributors of the Free Pascal Compiler
|
||||
|
||||
Symbian OS unit that adds common types, constants and functions
|
||||
for the UIQ API
|
||||
|
||||
See the file COPYING.FPC, included in this distribution,
|
||||
for details about the copyright.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
**********************************************************************}
|
||||
unit uiq;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses ctypes;
|
||||
|
||||
{$include e32def.inc}
|
||||
{$include e32err.inc}
|
||||
{.$include e32const.inc}
|
||||
{.$include e32cmn.inc}
|
||||
{$include e32std.inc}
|
||||
|
||||
|
||||
implementation
|
||||
|
||||
end.
|
||||
|
||||
|
@ -1,39 +1,39 @@
|
||||
{
|
||||
This file is part of the Free Pascal run time library.
|
||||
Copyright (c) 2007 by contributors of the Free Pascal Compiler
|
||||
|
||||
Symbian OS unit that adds common types, constants and functions
|
||||
for the Symbian API
|
||||
|
||||
See the file COPYING.FPC, included in this distribution,
|
||||
for details about the copyright.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
**********************************************************************}
|
||||
unit uiqclasses;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses ctypes;
|
||||
|
||||
{$include e32def.inc}
|
||||
{$include e32err.inc}
|
||||
{.$include e32const.inc}
|
||||
{.$include e32cmn.inc}
|
||||
{.$include e32std.inc}
|
||||
|
||||
{ e32std.h header file }
|
||||
|
||||
{ User class }
|
||||
|
||||
function User_InfoPrint(aString: PChar): TInt; cdecl; external;
|
||||
|
||||
implementation
|
||||
|
||||
end.
|
||||
|
||||
{
|
||||
This file is part of the Free Pascal run time library.
|
||||
Copyright (c) 2007 by contributors of the Free Pascal Compiler
|
||||
|
||||
Symbian OS unit that adds common types, constants and functions
|
||||
for the Symbian API
|
||||
|
||||
See the file COPYING.FPC, included in this distribution,
|
||||
for details about the copyright.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
**********************************************************************}
|
||||
unit uiqclasses;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses ctypes;
|
||||
|
||||
{$include e32def.inc}
|
||||
{$include e32err.inc}
|
||||
{.$include e32const.inc}
|
||||
{.$include e32cmn.inc}
|
||||
{.$include e32std.inc}
|
||||
|
||||
{ e32std.h header file }
|
||||
|
||||
{ User class }
|
||||
|
||||
function User_InfoPrint(aString: PChar): TInt; cdecl; external;
|
||||
|
||||
implementation
|
||||
|
||||
end.
|
||||
|
||||
|
@ -1,24 +1,24 @@
|
||||
#
|
||||
# Makefile.fpc for Free Pascal Symbian Build Tool
|
||||
#
|
||||
|
||||
[target]
|
||||
programs=mksymbian
|
||||
|
||||
[clean]
|
||||
units=cfgfile cmdline compiler constants projectparser sdkutil
|
||||
|
||||
[require]
|
||||
packages=
|
||||
|
||||
[compiler]
|
||||
|
||||
[install]
|
||||
fpcpackage=y
|
||||
|
||||
[default]
|
||||
fpcdir=../..
|
||||
|
||||
[rules]
|
||||
.NOTPARALLEL:
|
||||
mksymbian$(EXEEXT): mksymbian.pas
|
||||
#
|
||||
# Makefile.fpc for Free Pascal Symbian Build Tool
|
||||
#
|
||||
|
||||
[target]
|
||||
programs=mksymbian
|
||||
|
||||
[clean]
|
||||
units=cfgfile cmdline compiler constants projectparser sdkutil
|
||||
|
||||
[require]
|
||||
packages=
|
||||
|
||||
[compiler]
|
||||
|
||||
[install]
|
||||
fpcpackage=y
|
||||
|
||||
[default]
|
||||
fpcdir=../..
|
||||
|
||||
[rules]
|
||||
.NOTPARALLEL:
|
||||
mksymbian$(EXEEXT): mksymbian.pas
|
||||
|
@ -1,37 +1,37 @@
|
||||
{
|
||||
cfgfile.pas
|
||||
|
||||
Config file methods
|
||||
|
||||
Copyright (C) 2006-2007 Felipe Monteiro de Carvalho
|
||||
|
||||
This file is part of MkSymbian build tool.
|
||||
|
||||
MkSymbian is free software;
|
||||
you can redistribute it and/or modify it under the
|
||||
terms of the GNU General Public License version 2
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
MkSymbian is distributed in the hope
|
||||
that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
Please note that the General Public License version 2 does not permit
|
||||
incorporating MkSymbian into proprietary programs.
|
||||
}
|
||||
unit cfgfile;
|
||||
|
||||
{$ifdef fpc}
|
||||
{$mode delphi}{$H+}
|
||||
{$endif}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils;
|
||||
|
||||
implementation
|
||||
|
||||
end.
|
||||
|
||||
{
|
||||
cfgfile.pas
|
||||
|
||||
Config file methods
|
||||
|
||||
Copyright (C) 2006-2007 Felipe Monteiro de Carvalho
|
||||
|
||||
This file is part of MkSymbian build tool.
|
||||
|
||||
MkSymbian is free software;
|
||||
you can redistribute it and/or modify it under the
|
||||
terms of the GNU General Public License version 2
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
MkSymbian is distributed in the hope
|
||||
that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
Please note that the General Public License version 2 does not permit
|
||||
incorporating MkSymbian into proprietary programs.
|
||||
}
|
||||
unit cfgfile;
|
||||
|
||||
{$ifdef fpc}
|
||||
{$mode delphi}{$H+}
|
||||
{$endif}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils;
|
||||
|
||||
implementation
|
||||
|
||||
end.
|
||||
|
||||
|
@ -1,139 +1,139 @@
|
||||
{
|
||||
cmdline.pas
|
||||
|
||||
Command line parsing methods
|
||||
|
||||
Copyright (C) 2006-2007 Felipe Monteiro de Carvalho
|
||||
|
||||
This file is part of MkSymbian build tool.
|
||||
|
||||
MkSymbian is free software;
|
||||
you can redistribute it and/or modify it under the
|
||||
terms of the GNU General Public License version 2
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
MkSymbian is distributed in the hope
|
||||
that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
Please note that the General Public License version 2 does not permit
|
||||
incorporating MkSymbian into proprietary programs.
|
||||
}
|
||||
unit cmdline;
|
||||
|
||||
{$ifdef fpc}
|
||||
{$mode delphi}{$H+}
|
||||
{$endif}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils,
|
||||
constants;
|
||||
|
||||
type
|
||||
|
||||
{ TCmdLine }
|
||||
|
||||
TCmdLine = class(TObject)
|
||||
public
|
||||
procedure Usage;
|
||||
procedure ShowPath;
|
||||
procedure ParseCmdLineOptions(var opts: TMkSymbianOptions);
|
||||
end;
|
||||
|
||||
var
|
||||
vCmdLine: TCmdLine;
|
||||
|
||||
implementation
|
||||
|
||||
uses sdkutil, projectparser;
|
||||
|
||||
{ TCmdLine }
|
||||
|
||||
{*******************************************************************
|
||||
* TCmdLine.Usage ()
|
||||
*
|
||||
* DESCRIPTION: Shows a usage message for the tool
|
||||
*
|
||||
* PARAMETERS: None
|
||||
*
|
||||
* RETURNS: Nothing
|
||||
*
|
||||
*******************************************************************}
|
||||
procedure TCmdLine.Usage;
|
||||
begin
|
||||
WriteLn('mksymbian - Build tool for Free Pascal for SymbianOS');
|
||||
WriteLn('');
|
||||
WriteLn('The parameters you specifyed are wrong.');
|
||||
WriteLn('');
|
||||
WriteLn('Usage: mksymbian [command] [project file]');
|
||||
WriteLn('');
|
||||
WriteLn('Possible commands: ');
|
||||
WriteLn('');
|
||||
WriteLn('build - Builds an application');
|
||||
WriteLn('bindings - Builds the c++ bindings for pascal');
|
||||
WriteLn('showpath - Show the paths the tool is using');
|
||||
WriteLn('');
|
||||
end;
|
||||
|
||||
{*******************************************************************
|
||||
* TCmdLine.ShowPath ()
|
||||
*
|
||||
* DESCRIPTION: Shows in which paths (sdk, fpc, etc) mksymbian is using
|
||||
*
|
||||
* PARAMETERS: None
|
||||
*
|
||||
* RETURNS: Nothing
|
||||
*
|
||||
*******************************************************************}
|
||||
procedure TCmdLine.ShowPath;
|
||||
begin
|
||||
WriteLn('mksymbian - Build tool for Free Pascal for SymbianOS');
|
||||
WriteLn('');
|
||||
WriteLn('SDK Version: ' + vSDKUtil.StrSDKVersion);
|
||||
WriteLn('Location of SDK: ' + vSDKUtil.SDKFolder);
|
||||
WriteLn('Location of Free Pascal Compiler: ' + vProject.CompilerPath);
|
||||
WriteLn('');
|
||||
end;
|
||||
|
||||
{*******************************************************************
|
||||
* TCmdLine.ParseCmdLineOptions ()
|
||||
*
|
||||
* DESCRIPTION: Parses the command line options utilized to call mksymbian
|
||||
*
|
||||
* PARAMETERS: None
|
||||
*
|
||||
* RETURNS: Nothing
|
||||
*
|
||||
*******************************************************************}
|
||||
procedure TCmdLine.ParseCmdLineOptions(var opts: TMkSymbianOptions);
|
||||
begin
|
||||
FillChar(opts, SizeOf(TMkSymbianOptions), #0);
|
||||
|
||||
if (ParamCount = 0) then
|
||||
begin
|
||||
Usage;
|
||||
Exit;
|
||||
end;
|
||||
|
||||
opts.ProjectFile := ParamStr(2);
|
||||
|
||||
if CompareText(ParamStr(1), paramBuild) = 0 then opts.task := stBuildApp
|
||||
else if CompareText(ParamStr(1), paramBindings) = 0 then opts.task := stBuildBindings
|
||||
else if CompareText(ParamStr(1), paramShowPath) = 0 then
|
||||
begin
|
||||
opts.task := stNothing;
|
||||
vProject.ParseFile;
|
||||
ShowPath;
|
||||
end
|
||||
else
|
||||
begin
|
||||
opts.task := stNothing;
|
||||
Usage;
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
{
|
||||
cmdline.pas
|
||||
|
||||
Command line parsing methods
|
||||
|
||||
Copyright (C) 2006-2007 Felipe Monteiro de Carvalho
|
||||
|
||||
This file is part of MkSymbian build tool.
|
||||
|
||||
MkSymbian is free software;
|
||||
you can redistribute it and/or modify it under the
|
||||
terms of the GNU General Public License version 2
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
MkSymbian is distributed in the hope
|
||||
that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
Please note that the General Public License version 2 does not permit
|
||||
incorporating MkSymbian into proprietary programs.
|
||||
}
|
||||
unit cmdline;
|
||||
|
||||
{$ifdef fpc}
|
||||
{$mode delphi}{$H+}
|
||||
{$endif}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils,
|
||||
constants;
|
||||
|
||||
type
|
||||
|
||||
{ TCmdLine }
|
||||
|
||||
TCmdLine = class(TObject)
|
||||
public
|
||||
procedure Usage;
|
||||
procedure ShowPath;
|
||||
procedure ParseCmdLineOptions(var opts: TMkSymbianOptions);
|
||||
end;
|
||||
|
||||
var
|
||||
vCmdLine: TCmdLine;
|
||||
|
||||
implementation
|
||||
|
||||
uses sdkutil, projectparser;
|
||||
|
||||
{ TCmdLine }
|
||||
|
||||
{*******************************************************************
|
||||
* TCmdLine.Usage ()
|
||||
*
|
||||
* DESCRIPTION: Shows a usage message for the tool
|
||||
*
|
||||
* PARAMETERS: None
|
||||
*
|
||||
* RETURNS: Nothing
|
||||
*
|
||||
*******************************************************************}
|
||||
procedure TCmdLine.Usage;
|
||||
begin
|
||||
WriteLn('mksymbian - Build tool for Free Pascal for SymbianOS');
|
||||
WriteLn('');
|
||||
WriteLn('The parameters you specifyed are wrong.');
|
||||
WriteLn('');
|
||||
WriteLn('Usage: mksymbian [command] [project file]');
|
||||
WriteLn('');
|
||||
WriteLn('Possible commands: ');
|
||||
WriteLn('');
|
||||
WriteLn('build - Builds an application');
|
||||
WriteLn('bindings - Builds the c++ bindings for pascal');
|
||||
WriteLn('showpath - Show the paths the tool is using');
|
||||
WriteLn('');
|
||||
end;
|
||||
|
||||
{*******************************************************************
|
||||
* TCmdLine.ShowPath ()
|
||||
*
|
||||
* DESCRIPTION: Shows in which paths (sdk, fpc, etc) mksymbian is using
|
||||
*
|
||||
* PARAMETERS: None
|
||||
*
|
||||
* RETURNS: Nothing
|
||||
*
|
||||
*******************************************************************}
|
||||
procedure TCmdLine.ShowPath;
|
||||
begin
|
||||
WriteLn('mksymbian - Build tool for Free Pascal for SymbianOS');
|
||||
WriteLn('');
|
||||
WriteLn('SDK Version: ' + vSDKUtil.StrSDKVersion);
|
||||
WriteLn('Location of SDK: ' + vSDKUtil.SDKFolder);
|
||||
WriteLn('Location of Free Pascal Compiler: ' + vProject.CompilerPath);
|
||||
WriteLn('');
|
||||
end;
|
||||
|
||||
{*******************************************************************
|
||||
* TCmdLine.ParseCmdLineOptions ()
|
||||
*
|
||||
* DESCRIPTION: Parses the command line options utilized to call mksymbian
|
||||
*
|
||||
* PARAMETERS: None
|
||||
*
|
||||
* RETURNS: Nothing
|
||||
*
|
||||
*******************************************************************}
|
||||
procedure TCmdLine.ParseCmdLineOptions(var opts: TMkSymbianOptions);
|
||||
begin
|
||||
FillChar(opts, SizeOf(TMkSymbianOptions), #0);
|
||||
|
||||
if (ParamCount = 0) then
|
||||
begin
|
||||
Usage;
|
||||
Exit;
|
||||
end;
|
||||
|
||||
opts.ProjectFile := ParamStr(2);
|
||||
|
||||
if CompareText(ParamStr(1), paramBuild) = 0 then opts.task := stBuildApp
|
||||
else if CompareText(ParamStr(1), paramBindings) = 0 then opts.task := stBuildBindings
|
||||
else if CompareText(ParamStr(1), paramShowPath) = 0 then
|
||||
begin
|
||||
opts.task := stNothing;
|
||||
vProject.ParseFile;
|
||||
ShowPath;
|
||||
end
|
||||
else
|
||||
begin
|
||||
opts.task := stNothing;
|
||||
Usage;
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,124 +1,124 @@
|
||||
{
|
||||
constants.pas
|
||||
|
||||
Constants
|
||||
|
||||
Copyright (C) 2006-2007 Felipe Monteiro de Carvalho
|
||||
|
||||
This file is part of MkSymbian build tool.
|
||||
|
||||
MkSymbian is free software;
|
||||
you can redistribute it and/or modify it under the
|
||||
terms of the GNU General Public License version 2
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
MkSymbian is distributed in the hope
|
||||
that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
Please note that the General Public License version 2 does not permit
|
||||
incorporating MkSymbian into proprietary programs.
|
||||
}
|
||||
unit constants;
|
||||
|
||||
{$ifdef fpc}
|
||||
{$mode delphi}{$H+}
|
||||
{$endif}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils;
|
||||
|
||||
type
|
||||
|
||||
{ Options from the command line }
|
||||
|
||||
TMkSymbianTask = (stNothing, stBuildApp, stBuildBindings);
|
||||
|
||||
TMkSymbianOptions = record
|
||||
Task: TMkSymbianTask;
|
||||
ProjectFile: string;
|
||||
end;
|
||||
|
||||
{ Constants and types for the SDK version }
|
||||
type
|
||||
TSDKVersion = (sdkUIQ21, sdkUIQ3);
|
||||
|
||||
const
|
||||
Str_UIQ21 = 'UIQ 2.1';
|
||||
Str_UIQ3 = 'UIQ 3';
|
||||
|
||||
{ Commands }
|
||||
|
||||
const
|
||||
paramBuild = 'build';
|
||||
paramBindings = 'bindings';
|
||||
paramShowPath = 'showpath';
|
||||
|
||||
{ Paths on the SDK }
|
||||
const
|
||||
{ UIQ 2 Paths }
|
||||
Str_Path_UIQ2_ARM_BINUTILS = 'epoc32\gcc\bin\';
|
||||
Str_Path_UIQ2_Makmake = 'epoc32\tools\makmake.pl';
|
||||
|
||||
{ UIQ 3 Paths }
|
||||
Str_Path_CWTools = 'epoc32\tools\nokia_compiler\Symbian_Tools\Command_Line_Tools\';
|
||||
Str_Path_RComp = 'epoc32\tools\rcomp.exe';
|
||||
Str_Path_Cpp = 'epoc32\tools\scpp.exe';
|
||||
Str_Path_Resource_Files = 'epoc32\release\winscw\udeb\Z\resource\apps\';
|
||||
Str_Path_Emulator_Registration = 'epoc32\release\winscw\udeb\Z\private\10003a3f\apps\';
|
||||
|
||||
{ Other constants }
|
||||
const
|
||||
UID_SOURCE_FILENAME = 'QUID.cpp';
|
||||
UID_OBJECT_FILENAME = 'QUID.o';
|
||||
|
||||
STR_ASSEMBLER_EXT = '.S';
|
||||
STR_OBJECT_EXT = '.o';
|
||||
|
||||
STR_RESOURCE_TMP_EXT = '.pprsc';
|
||||
STR_RESOURCE_EXT = '.rsc';
|
||||
|
||||
{ Strings from the project file }
|
||||
const
|
||||
{ Sections }
|
||||
STR_PRJ_Main = 'Main';
|
||||
STR_PRJ_FPC = 'FPC';
|
||||
STR_PRJ_UIDs = 'UIDs';
|
||||
STR_PRJ_Files = 'Files';
|
||||
STR_PRJ_Objects = 'Objects';
|
||||
STR_PRJ_RTLObjects = 'RTLObjects';
|
||||
|
||||
{ Identifiers }
|
||||
STR_PRJ_EXEName = 'EXEName';
|
||||
STR_PRJ_Language = 'Language';
|
||||
STR_PRJ_CompilerDir = 'CompilerDir';
|
||||
STR_PRJ_ProjectType = 'ProjectType';
|
||||
STR_PRJ_SDK = 'SDK';
|
||||
STR_PRJ_SDKVersion = 'SDKVersion';
|
||||
STR_PRJ_Emulator = 'Emulator';
|
||||
|
||||
STR_PRJ_CompilerPath = 'CompilerPath';
|
||||
STR_PRJ_AssemblerPath = 'AssemblerPath';
|
||||
STR_PRJ_RTLUnitsDir = 'RTLUnitsDir';
|
||||
|
||||
STR_PRJ_UID2 = 'UID2';
|
||||
STR_PRJ_UID3 = 'UID3';
|
||||
|
||||
STR_PRJ_MainSource = 'mainsource';
|
||||
STR_PRJ_MainResource = 'mainresource';
|
||||
STR_PRJ_RegResource = 'regresource';
|
||||
|
||||
STR_PRJ_File = 'file';
|
||||
|
||||
{ Options }
|
||||
|
||||
STR_OPT_Cpp = 'C++';
|
||||
STR_OPT_Pascal = 'Pascal';
|
||||
|
||||
implementation
|
||||
|
||||
end.
|
||||
|
||||
{
|
||||
constants.pas
|
||||
|
||||
Constants
|
||||
|
||||
Copyright (C) 2006-2007 Felipe Monteiro de Carvalho
|
||||
|
||||
This file is part of MkSymbian build tool.
|
||||
|
||||
MkSymbian is free software;
|
||||
you can redistribute it and/or modify it under the
|
||||
terms of the GNU General Public License version 2
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
MkSymbian is distributed in the hope
|
||||
that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
Please note that the General Public License version 2 does not permit
|
||||
incorporating MkSymbian into proprietary programs.
|
||||
}
|
||||
unit constants;
|
||||
|
||||
{$ifdef fpc}
|
||||
{$mode delphi}{$H+}
|
||||
{$endif}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils;
|
||||
|
||||
type
|
||||
|
||||
{ Options from the command line }
|
||||
|
||||
TMkSymbianTask = (stNothing, stBuildApp, stBuildBindings);
|
||||
|
||||
TMkSymbianOptions = record
|
||||
Task: TMkSymbianTask;
|
||||
ProjectFile: string;
|
||||
end;
|
||||
|
||||
{ Constants and types for the SDK version }
|
||||
type
|
||||
TSDKVersion = (sdkUIQ21, sdkUIQ3);
|
||||
|
||||
const
|
||||
Str_UIQ21 = 'UIQ 2.1';
|
||||
Str_UIQ3 = 'UIQ 3';
|
||||
|
||||
{ Commands }
|
||||
|
||||
const
|
||||
paramBuild = 'build';
|
||||
paramBindings = 'bindings';
|
||||
paramShowPath = 'showpath';
|
||||
|
||||
{ Paths on the SDK }
|
||||
const
|
||||
{ UIQ 2 Paths }
|
||||
Str_Path_UIQ2_ARM_BINUTILS = 'epoc32\gcc\bin\';
|
||||
Str_Path_UIQ2_Makmake = 'epoc32\tools\makmake.pl';
|
||||
|
||||
{ UIQ 3 Paths }
|
||||
Str_Path_CWTools = 'epoc32\tools\nokia_compiler\Symbian_Tools\Command_Line_Tools\';
|
||||
Str_Path_RComp = 'epoc32\tools\rcomp.exe';
|
||||
Str_Path_Cpp = 'epoc32\tools\scpp.exe';
|
||||
Str_Path_Resource_Files = 'epoc32\release\winscw\udeb\Z\resource\apps\';
|
||||
Str_Path_Emulator_Registration = 'epoc32\release\winscw\udeb\Z\private\10003a3f\apps\';
|
||||
|
||||
{ Other constants }
|
||||
const
|
||||
UID_SOURCE_FILENAME = 'QUID.cpp';
|
||||
UID_OBJECT_FILENAME = 'QUID.o';
|
||||
|
||||
STR_ASSEMBLER_EXT = '.S';
|
||||
STR_OBJECT_EXT = '.o';
|
||||
|
||||
STR_RESOURCE_TMP_EXT = '.pprsc';
|
||||
STR_RESOURCE_EXT = '.rsc';
|
||||
|
||||
{ Strings from the project file }
|
||||
const
|
||||
{ Sections }
|
||||
STR_PRJ_Main = 'Main';
|
||||
STR_PRJ_FPC = 'FPC';
|
||||
STR_PRJ_UIDs = 'UIDs';
|
||||
STR_PRJ_Files = 'Files';
|
||||
STR_PRJ_Objects = 'Objects';
|
||||
STR_PRJ_RTLObjects = 'RTLObjects';
|
||||
|
||||
{ Identifiers }
|
||||
STR_PRJ_EXEName = 'EXEName';
|
||||
STR_PRJ_Language = 'Language';
|
||||
STR_PRJ_CompilerDir = 'CompilerDir';
|
||||
STR_PRJ_ProjectType = 'ProjectType';
|
||||
STR_PRJ_SDK = 'SDK';
|
||||
STR_PRJ_SDKVersion = 'SDKVersion';
|
||||
STR_PRJ_Emulator = 'Emulator';
|
||||
|
||||
STR_PRJ_CompilerPath = 'CompilerPath';
|
||||
STR_PRJ_AssemblerPath = 'AssemblerPath';
|
||||
STR_PRJ_RTLUnitsDir = 'RTLUnitsDir';
|
||||
|
||||
STR_PRJ_UID2 = 'UID2';
|
||||
STR_PRJ_UID3 = 'UID3';
|
||||
|
||||
STR_PRJ_MainSource = 'mainsource';
|
||||
STR_PRJ_MainResource = 'mainresource';
|
||||
STR_PRJ_RegResource = 'regresource';
|
||||
|
||||
STR_PRJ_File = 'file';
|
||||
|
||||
{ Options }
|
||||
|
||||
STR_OPT_Cpp = 'C++';
|
||||
STR_OPT_Pascal = 'Pascal';
|
||||
|
||||
implementation
|
||||
|
||||
end.
|
||||
|
||||
|
@ -1,79 +1,79 @@
|
||||
<?xml version="1.0"?>
|
||||
<CONFIG>
|
||||
<ProjectOptions>
|
||||
<PathDelim Value="\"/>
|
||||
<Version Value="6"/>
|
||||
<General>
|
||||
<Flags>
|
||||
<MainUnitHasUsesSectionForAllUnits Value="False"/>
|
||||
<MainUnitHasCreateFormStatements Value="False"/>
|
||||
<MainUnitHasTitleStatement Value="False"/>
|
||||
</Flags>
|
||||
<SessionStorage Value="InProjectDir"/>
|
||||
<MainUnit Value="0"/>
|
||||
<IconPath Value="./"/>
|
||||
<TargetFileExt Value=".exe"/>
|
||||
</General>
|
||||
<VersionInfo>
|
||||
<ProjectVersion Value=""/>
|
||||
</VersionInfo>
|
||||
<PublishOptions>
|
||||
<Version Value="2"/>
|
||||
<IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
|
||||
<ExcludeFileFilter Value="*.(bak|ppu|ppw|o|so);*~;backup"/>
|
||||
</PublishOptions>
|
||||
<RunParams>
|
||||
<local>
|
||||
<FormatVersion Value="1"/>
|
||||
<LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>
|
||||
</local>
|
||||
</RunParams>
|
||||
<Units Count="7">
|
||||
<Unit0>
|
||||
<Filename Value="mksymbian.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="mksymbian"/>
|
||||
</Unit0>
|
||||
<Unit1>
|
||||
<Filename Value="cmdline.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="cmdline"/>
|
||||
</Unit1>
|
||||
<Unit2>
|
||||
<Filename Value="constants.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="constants"/>
|
||||
</Unit2>
|
||||
<Unit3>
|
||||
<Filename Value="cfgfile.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="cfgfile"/>
|
||||
</Unit3>
|
||||
<Unit4>
|
||||
<Filename Value="sdkutil.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="sdkutil"/>
|
||||
</Unit4>
|
||||
<Unit5>
|
||||
<Filename Value="compiler.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="compiler"/>
|
||||
</Unit5>
|
||||
<Unit6>
|
||||
<Filename Value="projectparser.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="projectparser"/>
|
||||
</Unit6>
|
||||
</Units>
|
||||
</ProjectOptions>
|
||||
<CompilerOptions>
|
||||
<Version Value="5"/>
|
||||
<PathDelim Value="\"/>
|
||||
<CodeGeneration>
|
||||
<Generate Value="Faster"/>
|
||||
</CodeGeneration>
|
||||
<Other>
|
||||
<CompilerPath Value="$(CompPath)"/>
|
||||
</Other>
|
||||
</CompilerOptions>
|
||||
</CONFIG>
|
||||
<?xml version="1.0"?>
|
||||
<CONFIG>
|
||||
<ProjectOptions>
|
||||
<PathDelim Value="\"/>
|
||||
<Version Value="6"/>
|
||||
<General>
|
||||
<Flags>
|
||||
<MainUnitHasUsesSectionForAllUnits Value="False"/>
|
||||
<MainUnitHasCreateFormStatements Value="False"/>
|
||||
<MainUnitHasTitleStatement Value="False"/>
|
||||
</Flags>
|
||||
<SessionStorage Value="InProjectDir"/>
|
||||
<MainUnit Value="0"/>
|
||||
<IconPath Value="./"/>
|
||||
<TargetFileExt Value=".exe"/>
|
||||
</General>
|
||||
<VersionInfo>
|
||||
<ProjectVersion Value=""/>
|
||||
</VersionInfo>
|
||||
<PublishOptions>
|
||||
<Version Value="2"/>
|
||||
<IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
|
||||
<ExcludeFileFilter Value="*.(bak|ppu|ppw|o|so);*~;backup"/>
|
||||
</PublishOptions>
|
||||
<RunParams>
|
||||
<local>
|
||||
<FormatVersion Value="1"/>
|
||||
<LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>
|
||||
</local>
|
||||
</RunParams>
|
||||
<Units Count="7">
|
||||
<Unit0>
|
||||
<Filename Value="mksymbian.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="mksymbian"/>
|
||||
</Unit0>
|
||||
<Unit1>
|
||||
<Filename Value="cmdline.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="cmdline"/>
|
||||
</Unit1>
|
||||
<Unit2>
|
||||
<Filename Value="constants.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="constants"/>
|
||||
</Unit2>
|
||||
<Unit3>
|
||||
<Filename Value="cfgfile.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="cfgfile"/>
|
||||
</Unit3>
|
||||
<Unit4>
|
||||
<Filename Value="sdkutil.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="sdkutil"/>
|
||||
</Unit4>
|
||||
<Unit5>
|
||||
<Filename Value="compiler.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="compiler"/>
|
||||
</Unit5>
|
||||
<Unit6>
|
||||
<Filename Value="projectparser.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="projectparser"/>
|
||||
</Unit6>
|
||||
</Units>
|
||||
</ProjectOptions>
|
||||
<CompilerOptions>
|
||||
<Version Value="5"/>
|
||||
<PathDelim Value="\"/>
|
||||
<CodeGeneration>
|
||||
<Generate Value="Faster"/>
|
||||
</CodeGeneration>
|
||||
<Other>
|
||||
<CompilerPath Value="$(CompPath)"/>
|
||||
</Other>
|
||||
</CompilerOptions>
|
||||
</CONFIG>
|
||||
|
@ -1,94 +1,94 @@
|
||||
{
|
||||
mksymbian.pas
|
||||
|
||||
Main program file
|
||||
|
||||
Copyright (C) 2006-2007 Felipe Monteiro de Carvalho
|
||||
|
||||
This file is part of MkSymbian build tool.
|
||||
|
||||
MkSymbian is free software;
|
||||
you can redistribute it and/or modify it under the
|
||||
terms of the GNU General Public License version 2
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
MkSymbian is distributed in the hope
|
||||
that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
Please note that the General Public License version 2 does not permit
|
||||
incorporating MkSymbian into proprietary programs.
|
||||
}
|
||||
program mksymbian;
|
||||
|
||||
{$ifdef fpc}
|
||||
{$mode delphi}{$H+}
|
||||
{$endif}
|
||||
|
||||
{$apptype console}
|
||||
|
||||
uses
|
||||
Classes, SysUtils,
|
||||
cmdline, constants, cfgfile, sdkutil, compiler, projectparser;
|
||||
|
||||
var
|
||||
opts: TMkSymbianOptions;
|
||||
begin
|
||||
|
||||
vProject := TProject.Create;
|
||||
vSDKUtil := TSDKUtil.Create;
|
||||
vCmdLine := TCmdLine.Create;
|
||||
vCompiler := TCompiler.Create;
|
||||
|
||||
try
|
||||
vCmdLine.ParseCmdLineOptions(opts);
|
||||
|
||||
vCompiler.opts := opts;
|
||||
vProject.opts := opts;
|
||||
|
||||
case opts.task of
|
||||
|
||||
stBuildApp:
|
||||
begin
|
||||
vProject.ParseFile;
|
||||
|
||||
{ compilation }
|
||||
|
||||
if CompareText(vProject.Language, STR_OPT_Cpp) = 0 then
|
||||
vCompiler.MakeBuildCpp
|
||||
else
|
||||
vCompiler.MakeBuildPascal;
|
||||
|
||||
if vSDKUtil.SDKVersion = sdkUIQ3 then
|
||||
begin
|
||||
{ Main resource file }
|
||||
|
||||
vCompiler.BuildResource(vProject.MainResource);
|
||||
|
||||
vCompiler.InstallResource(vProject.MainResource);
|
||||
|
||||
{ Registration resource file }
|
||||
|
||||
vCompiler.BuildResource(vProject.RegResource);
|
||||
|
||||
vCompiler.RegisterInEmulator;
|
||||
end;
|
||||
end;
|
||||
|
||||
stBuildBindings:
|
||||
begin
|
||||
vProject.ParseFile;
|
||||
|
||||
vCompiler.MakeBuildBindings;
|
||||
end;
|
||||
end;
|
||||
|
||||
finally
|
||||
vCmdLine.Free;
|
||||
vSDKUtil.Free;
|
||||
vCompiler.Free;
|
||||
vProject.Free;
|
||||
end;
|
||||
end.
|
||||
|
||||
{
|
||||
mksymbian.pas
|
||||
|
||||
Main program file
|
||||
|
||||
Copyright (C) 2006-2007 Felipe Monteiro de Carvalho
|
||||
|
||||
This file is part of MkSymbian build tool.
|
||||
|
||||
MkSymbian is free software;
|
||||
you can redistribute it and/or modify it under the
|
||||
terms of the GNU General Public License version 2
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
MkSymbian is distributed in the hope
|
||||
that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
Please note that the General Public License version 2 does not permit
|
||||
incorporating MkSymbian into proprietary programs.
|
||||
}
|
||||
program mksymbian;
|
||||
|
||||
{$ifdef fpc}
|
||||
{$mode delphi}{$H+}
|
||||
{$endif}
|
||||
|
||||
{$apptype console}
|
||||
|
||||
uses
|
||||
Classes, SysUtils,
|
||||
cmdline, constants, cfgfile, sdkutil, compiler, projectparser;
|
||||
|
||||
var
|
||||
opts: TMkSymbianOptions;
|
||||
begin
|
||||
|
||||
vProject := TProject.Create;
|
||||
vSDKUtil := TSDKUtil.Create;
|
||||
vCmdLine := TCmdLine.Create;
|
||||
vCompiler := TCompiler.Create;
|
||||
|
||||
try
|
||||
vCmdLine.ParseCmdLineOptions(opts);
|
||||
|
||||
vCompiler.opts := opts;
|
||||
vProject.opts := opts;
|
||||
|
||||
case opts.task of
|
||||
|
||||
stBuildApp:
|
||||
begin
|
||||
vProject.ParseFile;
|
||||
|
||||
{ compilation }
|
||||
|
||||
if CompareText(vProject.Language, STR_OPT_Cpp) = 0 then
|
||||
vCompiler.MakeBuildCpp
|
||||
else
|
||||
vCompiler.MakeBuildPascal;
|
||||
|
||||
if vSDKUtil.SDKVersion = sdkUIQ3 then
|
||||
begin
|
||||
{ Main resource file }
|
||||
|
||||
vCompiler.BuildResource(vProject.MainResource);
|
||||
|
||||
vCompiler.InstallResource(vProject.MainResource);
|
||||
|
||||
{ Registration resource file }
|
||||
|
||||
vCompiler.BuildResource(vProject.RegResource);
|
||||
|
||||
vCompiler.RegisterInEmulator;
|
||||
end;
|
||||
end;
|
||||
|
||||
stBuildBindings:
|
||||
begin
|
||||
vProject.ParseFile;
|
||||
|
||||
vCompiler.MakeBuildBindings;
|
||||
end;
|
||||
end;
|
||||
|
||||
finally
|
||||
vCmdLine.Free;
|
||||
vSDKUtil.Free;
|
||||
vCompiler.Free;
|
||||
vProject.Free;
|
||||
end;
|
||||
end.
|
||||
|
||||
|
@ -1,125 +1,125 @@
|
||||
{
|
||||
projectparser.pas
|
||||
|
||||
Parses the project file
|
||||
|
||||
Copyright (C) 2006-2007 Felipe Monteiro de Carvalho
|
||||
|
||||
This file is part of MkSymbian build tool.
|
||||
|
||||
MkSymbian is free software;
|
||||
you can redistribute it and/or modify it under the
|
||||
terms of the GNU General Public License version 2
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
MkSymbian is distributed in the hope
|
||||
that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
Please note that the General Public License version 2 does not permit
|
||||
incorporating MkSymbian into proprietary programs.
|
||||
}
|
||||
unit projectparser;
|
||||
|
||||
{$ifdef fpc}
|
||||
{$mode delphi}{$H+}
|
||||
{$endif}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, IniFiles,
|
||||
constants;
|
||||
|
||||
type
|
||||
|
||||
{ TProject }
|
||||
|
||||
TProject = class(TObject)
|
||||
public
|
||||
opts: TMkSymbianOptions;
|
||||
{ Main section }
|
||||
ExeName, Language, ProjectType, SDK, SDKVersion: string;
|
||||
Emulator: Boolean;
|
||||
{ FPC section }
|
||||
CompilerPath, AssemblerPath, RTLUnitsDir: string;
|
||||
{ UIDs section }
|
||||
UID2, UID3: string;
|
||||
{ Files section }
|
||||
MainSource, MainSourceNoExt, MainSourceAsm, MainSourceObj,
|
||||
MainResource, RegResource: string;
|
||||
{ Objects section }
|
||||
ObjectFiles: TStringList;
|
||||
public
|
||||
constructor Create;
|
||||
destructor Destroy; override;
|
||||
procedure ParseFile;
|
||||
end;
|
||||
|
||||
var
|
||||
vProject: TProject;
|
||||
|
||||
implementation
|
||||
|
||||
{ TProject }
|
||||
|
||||
constructor TProject.Create;
|
||||
begin
|
||||
inherited Create;
|
||||
|
||||
ObjectFiles := TStringList.Create;
|
||||
end;
|
||||
|
||||
destructor TProject.Destroy;
|
||||
begin
|
||||
ObjectFiles.Free;
|
||||
|
||||
inherited Destroy;
|
||||
end;
|
||||
|
||||
{*******************************************************************
|
||||
* TProject.ParseFile ()
|
||||
*
|
||||
* DESCRIPTION: Parses the project file
|
||||
*
|
||||
* PARAMETERS: None
|
||||
*
|
||||
* RETURNS: Nothing
|
||||
*
|
||||
*******************************************************************}
|
||||
procedure TProject.ParseFile;
|
||||
var
|
||||
IniFile: TIniFile;
|
||||
begin
|
||||
IniFile := TIniFile.Create(opts.ProjectFile);
|
||||
try
|
||||
ExeName := IniFile.ReadString(STR_PRJ_Files, STR_PRJ_ExeName, 'default.exe');
|
||||
Language := IniFile.ReadString(STR_PRJ_Files, STR_PRJ_Language, 'Pascal');
|
||||
ProjectType := IniFile.ReadString(STR_PRJ_Files, STR_PRJ_ProjectType, 'EXE');
|
||||
SDK := IniFile.ReadString(STR_PRJ_Files, STR_PRJ_SDK, 'UIQ');
|
||||
SDKVersion := IniFile.ReadString(STR_PRJ_Files, STR_PRJ_SDKVersion, '2.1');
|
||||
Emulator := IniFile.ReadBool(STR_PRJ_Files, STR_PRJ_Emulator, False);
|
||||
|
||||
CompilerPath := IniFile.ReadString(STR_PRJ_FPC, STR_PRJ_CompilerPath, 'C:\Programas\fpc21\compiler\ppc386.exe');
|
||||
AssemblerPath := IniFile.ReadString(STR_PRJ_FPC, STR_PRJ_AssemblerPath, 'C:\Programas\lazarus20\fpc\2.1.5\bin\i386-win32\as.exe');
|
||||
RTLUnitsDir := IniFile.ReadString(STR_PRJ_FPC, STR_PRJ_RTLUnitsDir, 'C:\Programas\fpc21\rtl\units\i386-symbian\');
|
||||
|
||||
UID2 := IniFile.ReadString(STR_PRJ_UIDs, STR_PRJ_UID2, '0x100039CE');
|
||||
UID3 := IniFile.ReadString(STR_PRJ_UIDs, STR_PRJ_UID3, '0xE1000002');
|
||||
|
||||
MainSource := IniFile.ReadString(STR_PRJ_Files, STR_PRJ_MainSource, 'default.pas');
|
||||
MainSourceNoExt := ExtractFileExt(MainSource);
|
||||
MainSourceAsm := ChangeFileExt(MainSource, STR_ASSEMBLER_EXT);
|
||||
MainSourceObj := ChangeFileExt(MainSource, STR_OBJECT_EXT);
|
||||
MainResource := IniFile.ReadString(STR_PRJ_Files, STR_PRJ_MainResource, 'default.rss');
|
||||
RegResource := IniFile.ReadString(STR_PRJ_Files, STR_PRJ_RegResource, 'default_reg.rss');
|
||||
|
||||
IniFile.ReadSection(STR_PRJ_Objects, ObjectFiles);
|
||||
finally
|
||||
IniFile.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
{
|
||||
projectparser.pas
|
||||
|
||||
Parses the project file
|
||||
|
||||
Copyright (C) 2006-2007 Felipe Monteiro de Carvalho
|
||||
|
||||
This file is part of MkSymbian build tool.
|
||||
|
||||
MkSymbian is free software;
|
||||
you can redistribute it and/or modify it under the
|
||||
terms of the GNU General Public License version 2
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
MkSymbian is distributed in the hope
|
||||
that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
Please note that the General Public License version 2 does not permit
|
||||
incorporating MkSymbian into proprietary programs.
|
||||
}
|
||||
unit projectparser;
|
||||
|
||||
{$ifdef fpc}
|
||||
{$mode delphi}{$H+}
|
||||
{$endif}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, IniFiles,
|
||||
constants;
|
||||
|
||||
type
|
||||
|
||||
{ TProject }
|
||||
|
||||
TProject = class(TObject)
|
||||
public
|
||||
opts: TMkSymbianOptions;
|
||||
{ Main section }
|
||||
ExeName, Language, ProjectType, SDK, SDKVersion: string;
|
||||
Emulator: Boolean;
|
||||
{ FPC section }
|
||||
CompilerPath, AssemblerPath, RTLUnitsDir: string;
|
||||
{ UIDs section }
|
||||
UID2, UID3: string;
|
||||
{ Files section }
|
||||
MainSource, MainSourceNoExt, MainSourceAsm, MainSourceObj,
|
||||
MainResource, RegResource: string;
|
||||
{ Objects section }
|
||||
ObjectFiles: TStringList;
|
||||
public
|
||||
constructor Create;
|
||||
destructor Destroy; override;
|
||||
procedure ParseFile;
|
||||
end;
|
||||
|
||||
var
|
||||
vProject: TProject;
|
||||
|
||||
implementation
|
||||
|
||||
{ TProject }
|
||||
|
||||
constructor TProject.Create;
|
||||
begin
|
||||
inherited Create;
|
||||
|
||||
ObjectFiles := TStringList.Create;
|
||||
end;
|
||||
|
||||
destructor TProject.Destroy;
|
||||
begin
|
||||
ObjectFiles.Free;
|
||||
|
||||
inherited Destroy;
|
||||
end;
|
||||
|
||||
{*******************************************************************
|
||||
* TProject.ParseFile ()
|
||||
*
|
||||
* DESCRIPTION: Parses the project file
|
||||
*
|
||||
* PARAMETERS: None
|
||||
*
|
||||
* RETURNS: Nothing
|
||||
*
|
||||
*******************************************************************}
|
||||
procedure TProject.ParseFile;
|
||||
var
|
||||
IniFile: TIniFile;
|
||||
begin
|
||||
IniFile := TIniFile.Create(opts.ProjectFile);
|
||||
try
|
||||
ExeName := IniFile.ReadString(STR_PRJ_Files, STR_PRJ_ExeName, 'default.exe');
|
||||
Language := IniFile.ReadString(STR_PRJ_Files, STR_PRJ_Language, 'Pascal');
|
||||
ProjectType := IniFile.ReadString(STR_PRJ_Files, STR_PRJ_ProjectType, 'EXE');
|
||||
SDK := IniFile.ReadString(STR_PRJ_Files, STR_PRJ_SDK, 'UIQ');
|
||||
SDKVersion := IniFile.ReadString(STR_PRJ_Files, STR_PRJ_SDKVersion, '2.1');
|
||||
Emulator := IniFile.ReadBool(STR_PRJ_Files, STR_PRJ_Emulator, False);
|
||||
|
||||
CompilerPath := IniFile.ReadString(STR_PRJ_FPC, STR_PRJ_CompilerPath, 'C:\Programas\fpc21\compiler\ppc386.exe');
|
||||
AssemblerPath := IniFile.ReadString(STR_PRJ_FPC, STR_PRJ_AssemblerPath, 'C:\Programas\lazarus20\fpc\2.1.5\bin\i386-win32\as.exe');
|
||||
RTLUnitsDir := IniFile.ReadString(STR_PRJ_FPC, STR_PRJ_RTLUnitsDir, 'C:\Programas\fpc21\rtl\units\i386-symbian\');
|
||||
|
||||
UID2 := IniFile.ReadString(STR_PRJ_UIDs, STR_PRJ_UID2, '0x100039CE');
|
||||
UID3 := IniFile.ReadString(STR_PRJ_UIDs, STR_PRJ_UID3, '0xE1000002');
|
||||
|
||||
MainSource := IniFile.ReadString(STR_PRJ_Files, STR_PRJ_MainSource, 'default.pas');
|
||||
MainSourceNoExt := ExtractFileExt(MainSource);
|
||||
MainSourceAsm := ChangeFileExt(MainSource, STR_ASSEMBLER_EXT);
|
||||
MainSourceObj := ChangeFileExt(MainSource, STR_OBJECT_EXT);
|
||||
MainResource := IniFile.ReadString(STR_PRJ_Files, STR_PRJ_MainResource, 'default.rss');
|
||||
RegResource := IniFile.ReadString(STR_PRJ_Files, STR_PRJ_RegResource, 'default_reg.rss');
|
||||
|
||||
IniFile.ReadSection(STR_PRJ_Objects, ObjectFiles);
|
||||
finally
|
||||
IniFile.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
|
@ -1,102 +1,102 @@
|
||||
{
|
||||
sdkutil.pas
|
||||
|
||||
SDK utility methods
|
||||
|
||||
Copyright (C) 2006-2007 Felipe Monteiro de Carvalho
|
||||
|
||||
This file is part of MkSymbian build tool.
|
||||
|
||||
MkSymbian is free software;
|
||||
you can redistribute it and/or modify it under the
|
||||
terms of the GNU General Public License version 2
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
MkSymbian is distributed in the hope
|
||||
that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
Please note that the General Public License version 2 does not permit
|
||||
incorporating MkSymbian into proprietary programs.
|
||||
}
|
||||
unit sdkutil;
|
||||
|
||||
{$ifdef fpc}
|
||||
{$mode delphi}{$H+}
|
||||
{$endif}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, registry, constants;
|
||||
|
||||
type
|
||||
|
||||
{ TSDKUtil }
|
||||
|
||||
TSDKUtil = class(TObject)
|
||||
public
|
||||
SDKFolder, SDKPartialFolder, StrSDKVersion: string;
|
||||
SDKVersion: TSDKVersion;
|
||||
constructor Create;
|
||||
procedure LocateUIQ2SDK;
|
||||
procedure LocateUIQ3SDK;
|
||||
end;
|
||||
|
||||
var
|
||||
vSDKUtil: TSDKUtil;
|
||||
|
||||
implementation
|
||||
|
||||
uses projectparser;
|
||||
|
||||
{ TSDKUtil }
|
||||
|
||||
constructor TSDKUtil.Create;
|
||||
begin
|
||||
StrSDKVersion := vProject.SDK + ' ' + vProject.SDKVersion;
|
||||
|
||||
if StrSDKVersion = Str_UIQ21 then SDKVersion := sdkUIQ21
|
||||
else if StrSDKVersion = Str_UIQ3 then SDKVersion := sdkUIQ3;
|
||||
|
||||
case SDKVersion of
|
||||
sdkUIQ21: LocateUIQ2SDK;
|
||||
sdkUIQ3: LocateUIQ3SDK;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TSDKUtil.LocateUIQ2SDK;
|
||||
begin
|
||||
SDKPartialFolder := '\Programas\UIQ21\';
|
||||
SDKFolder := 'C:' + SDKPartialFolder;
|
||||
end;
|
||||
|
||||
procedure TSDKUtil.LocateUIQ3SDK;
|
||||
var
|
||||
Reg: TRegistry;
|
||||
BufferStr: string;
|
||||
begin
|
||||
Reg := TRegistry.Create;
|
||||
|
||||
try
|
||||
Reg.RootKey := HKEY_LOCAL_MACHINE;
|
||||
if Reg.OpenKey('\SOFTWARE\Symbian\UIQ\SDK\UIQ3SDK', False) then
|
||||
begin
|
||||
BufferStr := Reg.ReadString('InstallPath');
|
||||
SDKFolder := IncludeTrailingBackslash(BufferStr);
|
||||
SDKPartialFolder := Copy(SDKFolder, 3, Length(SDKFolder) - 2);
|
||||
end
|
||||
else
|
||||
begin
|
||||
WriteLn(' ERROR: Could not locate the SDK, using default values');
|
||||
SDKPartialFolder := '\Symbian\UIQ3SDK\';
|
||||
SDKFolder := 'C:' + SDKPartialFolder;
|
||||
end;
|
||||
finally
|
||||
Reg.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
{
|
||||
sdkutil.pas
|
||||
|
||||
SDK utility methods
|
||||
|
||||
Copyright (C) 2006-2007 Felipe Monteiro de Carvalho
|
||||
|
||||
This file is part of MkSymbian build tool.
|
||||
|
||||
MkSymbian is free software;
|
||||
you can redistribute it and/or modify it under the
|
||||
terms of the GNU General Public License version 2
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
MkSymbian is distributed in the hope
|
||||
that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
Please note that the General Public License version 2 does not permit
|
||||
incorporating MkSymbian into proprietary programs.
|
||||
}
|
||||
unit sdkutil;
|
||||
|
||||
{$ifdef fpc}
|
||||
{$mode delphi}{$H+}
|
||||
{$endif}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, registry, constants;
|
||||
|
||||
type
|
||||
|
||||
{ TSDKUtil }
|
||||
|
||||
TSDKUtil = class(TObject)
|
||||
public
|
||||
SDKFolder, SDKPartialFolder, StrSDKVersion: string;
|
||||
SDKVersion: TSDKVersion;
|
||||
constructor Create;
|
||||
procedure LocateUIQ2SDK;
|
||||
procedure LocateUIQ3SDK;
|
||||
end;
|
||||
|
||||
var
|
||||
vSDKUtil: TSDKUtil;
|
||||
|
||||
implementation
|
||||
|
||||
uses projectparser;
|
||||
|
||||
{ TSDKUtil }
|
||||
|
||||
constructor TSDKUtil.Create;
|
||||
begin
|
||||
StrSDKVersion := vProject.SDK + ' ' + vProject.SDKVersion;
|
||||
|
||||
if StrSDKVersion = Str_UIQ21 then SDKVersion := sdkUIQ21
|
||||
else if StrSDKVersion = Str_UIQ3 then SDKVersion := sdkUIQ3;
|
||||
|
||||
case SDKVersion of
|
||||
sdkUIQ21: LocateUIQ2SDK;
|
||||
sdkUIQ3: LocateUIQ3SDK;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TSDKUtil.LocateUIQ2SDK;
|
||||
begin
|
||||
SDKPartialFolder := '\Programas\UIQ21\';
|
||||
SDKFolder := 'C:' + SDKPartialFolder;
|
||||
end;
|
||||
|
||||
procedure TSDKUtil.LocateUIQ3SDK;
|
||||
var
|
||||
Reg: TRegistry;
|
||||
BufferStr: string;
|
||||
begin
|
||||
Reg := TRegistry.Create;
|
||||
|
||||
try
|
||||
Reg.RootKey := HKEY_LOCAL_MACHINE;
|
||||
if Reg.OpenKey('\SOFTWARE\Symbian\UIQ\SDK\UIQ3SDK', False) then
|
||||
begin
|
||||
BufferStr := Reg.ReadString('InstallPath');
|
||||
SDKFolder := IncludeTrailingBackslash(BufferStr);
|
||||
SDKPartialFolder := Copy(SDKFolder, 3, Length(SDKFolder) - 2);
|
||||
end
|
||||
else
|
||||
begin
|
||||
WriteLn(' ERROR: Could not locate the SDK, using default values');
|
||||
SDKPartialFolder := '\Symbian\UIQ3SDK\';
|
||||
SDKFolder := 'C:' + SDKPartialFolder;
|
||||
end;
|
||||
finally
|
||||
Reg.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user