combined lazconf things for unix

git-svn-id: trunk@4483 -
This commit is contained in:
mattias 2003-08-15 14:01:20 +00:00
parent c029fd59c1
commit f88cba2a80
13 changed files with 280 additions and 379 deletions

1
.gitattributes vendored
View File

@ -349,6 +349,7 @@ ide/include/freebsd/lazconf.inc svneol=native#text/pascal
ide/include/ide.inc svneol=native#text/pascal
ide/include/linux/lazconf.inc svneol=native#text/pascal
ide/include/netbsd/lazconf.inc svneol=native#text/pascal
ide/include/unix/lazbaseconf.inc svneol=native#text/pascal
ide/include/win32/lazconf.inc svneol=native#text/pascal
ide/initialsetupdlgs.pas svneol=native#text/pascal
ide/inputfiledialog.pas svneol=native#text/pascal

View File

@ -1,5 +1,5 @@
#
# Don't edit, this file is generated by FPCMake Version 1.1 [2003/06/05]
# Don't edit, this file is generated by FPCMake Version 1.1 [2003/07/04]
#
default: all
MAKEFILETARGETS=linux go32v2 win32 os2 freebsd beos netbsd amiga atari sunos qnx netware openbsd wdosx palmos macos darwin emx
@ -910,6 +910,7 @@ REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_PASZLIB=1
REQUIRE_PACKAGES_NETDB=1
REQUIRE_PACKAGES_LIBASYNC=1
REQUIRE_PACKAGES_PTHREADS=1
REQUIRE_PACKAGES_FCL=1
REQUIRE_PACKAGES_REGEXPR=1
REQUIRE_PACKAGES_MYSQL=1
@ -922,6 +923,7 @@ REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_PASZLIB=1
REQUIRE_PACKAGES_NETDB=1
REQUIRE_PACKAGES_LIBASYNC=1
REQUIRE_PACKAGES_PTHREADS=1
REQUIRE_PACKAGES_FCL=1
REQUIRE_PACKAGES_REGEXPR=1
REQUIRE_PACKAGES_MYSQL=1
@ -934,6 +936,7 @@ REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_PASZLIB=1
REQUIRE_PACKAGES_NETDB=1
REQUIRE_PACKAGES_LIBASYNC=1
REQUIRE_PACKAGES_PTHREADS=1
REQUIRE_PACKAGES_FCL=1
REQUIRE_PACKAGES_REGEXPR=1
REQUIRE_PACKAGES_MYSQL=1
@ -946,6 +949,7 @@ REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_PASZLIB=1
REQUIRE_PACKAGES_NETDB=1
REQUIRE_PACKAGES_LIBASYNC=1
REQUIRE_PACKAGES_PTHREADS=1
REQUIRE_PACKAGES_FCL=1
REQUIRE_PACKAGES_REGEXPR=1
REQUIRE_PACKAGES_MYSQL=1
@ -958,6 +962,7 @@ REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_PASZLIB=1
REQUIRE_PACKAGES_NETDB=1
REQUIRE_PACKAGES_LIBASYNC=1
REQUIRE_PACKAGES_PTHREADS=1
REQUIRE_PACKAGES_FCL=1
REQUIRE_PACKAGES_REGEXPR=1
REQUIRE_PACKAGES_MYSQL=1
@ -1292,6 +1297,32 @@ ifdef UNITDIR_LIBASYNC
override COMPILER_UNITDIR+=$(UNITDIR_LIBASYNC)
endif
endif
ifdef REQUIRE_PACKAGES_PTHREADS
PACKAGEDIR_PTHREADS:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /pthreads/Makefile.fpc,$(PACKAGESDIR))))))
ifneq ($(PACKAGEDIR_PTHREADS),)
ifneq ($(wildcard $(PACKAGEDIR_PTHREADS)/$(OS_TARGET)),)
UNITDIR_PTHREADS=$(PACKAGEDIR_PTHREADS)/$(OS_TARGET)
else
UNITDIR_PTHREADS=$(PACKAGEDIR_PTHREADS)
endif
ifdef CHECKDEPEND
$(PACKAGEDIR_PTHREADS)/$(FPCMADE):
$(MAKE) -C $(PACKAGEDIR_PTHREADS) $(FPCMADE)
override ALLDEPENDENCIES+=$(PACKAGEDIR_PTHREADS)/$(FPCMADE)
endif
else
PACKAGEDIR_PTHREADS=
UNITDIR_PTHREADS:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /pthreads/Package.fpc,$(UNITSDIR)))))
ifneq ($(UNITDIR_PTHREADS),)
UNITDIR_PTHREADS:=$(firstword $(UNITDIR_PTHREADS))
else
UNITDIR_PTHREADS=
endif
endif
ifdef UNITDIR_PTHREADS
override COMPILER_UNITDIR+=$(UNITDIR_PTHREADS)
endif
endif
ifdef REQUIRE_PACKAGES_FCL
PACKAGEDIR_FCL:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /fcl/Makefile.fpc,$(PACKAGESDIR))))))
ifneq ($(PACKAGEDIR_FCL),)

View File

@ -3080,12 +3080,13 @@ const
var
MainDir, DirTempl, SubDirTempl, IntfDirTemplate, IfTemplate,
SubTempl: TDefineTemplate;
TargetOS, SrcPath, WidgetStr: string;
WidgetSet: TLazWidgetSet;
TargetOS, SrcOS, SrcPath, WidgetStr: string;
begin
Result:=nil;
if (LazarusSrcDir='') or (WidgetType='') then exit;
TargetOS:='$('+ExternalMacroStart+'TargetOS)';
SrcOS:='$('+ExternalMacroStart+'SrcOS)';
SrcPath:='$('+ExternalMacroStart+'SrcPath)';
// <LazarusSrcDir>
@ -3113,9 +3114,9 @@ begin
+SrcPath
,da_Define));
MainDir.AddChild(TDefineTemplate.Create('includepath addition',
Format(ctsSetsIncPathTo,['include, include/TargetOS']),
Format(ctsSetsIncPathTo,['include, include/TargetOS, include/SrcOS']),
ExternalMacroStart+'IncPath',
'include;include'+ds+TargetOS,
'include;include'+ds+TargetOS+';include'+ds+SrcOS,
da_Define));
// turn Nested comments on
MainDir.AddChild(TDefineTemplate.Create('Nested Comments',

View File

@ -804,7 +804,7 @@ begin
FFPCSourceDirHistory:=TStringList.Create;
DebuggerFilename:='';
FDebuggerFileHistory:=TStringList.Create;
TestBuildDirectory:={$ifdef win32}'c:\temp\'{$else}'/tmp/'{$endif};
TestBuildDirectory:=GetDefaultTestBuildDirectory;
FTestBuildDirHistory:=TStringList.Create;
// recent files and directories

View File

@ -1,5 +1,10 @@
// included by lazconf.pp
{***************************************************************************
lazconf.inc
freebsd specific include file for the IDE
***************************************************************************
***************************************************************************
@ -30,127 +35,13 @@ uses
linux;
{$ENDIF}
const
DefaultFPCSrcDirs: array[1..9] of string = (
'/usr/share/fpcsrc',
'/usr/fpcsrc',
'/usr/share/fpc/src',
'/usr/fpc/src',
'/usr/local/fpc/src',
'/usr/lib/fpc/src',
'/usr/local/lib/fpc/src',
'/vol/fpc/src',
'/vol/lib/fpc/src'
);
var
PrimaryConfigPath,
SecondaryConfigPath: string;
{---------------------------------------------------------------------------
getPrimaryConfigPath function
---------------------------------------------------------------------------}
function GetPrimaryConfigPath: String;
begin
Result := PrimaryConfigPath;
end;
{---------------------------------------------------------------------------
getSecondaryConfigPath function
---------------------------------------------------------------------------}
function GetSecondaryConfigPath: String;
begin
Result := SecondaryConfigPath;
end;
{---------------------------------------------------------------------------
createPrimaryConfigPath function
---------------------------------------------------------------------------}
procedure CreatePrimaryConfigPath;
begin
CreateDir(GetPrimaryConfigPath);
//MkDir(GetPrimaryConfigPath);
end;
{---------------------------------------------------------------------------
SetPrimaryConfigPath procedure
---------------------------------------------------------------------------}
procedure SetPrimaryConfigPath(const NewValue: String);
begin
PrimaryConfigPath:=FExpand(NewValue);
end;
{---------------------------------------------------------------------------
SetSecondaryConfigPath procedure
---------------------------------------------------------------------------}
procedure SetSecondaryConfigPath(const NewValue: String);
begin
SecondaryConfigPath:=FExpand(NewValue);
end;
{---------------------------------------------------------------------------
CopySecondaryConfigFile procedure
---------------------------------------------------------------------------}
procedure CopySecondaryConfigFile(const AFilename: String);
var
PrimaryFilename, SecondaryFilename: string;
SrcFS, DestFS: TFileStream;
begin
PrimaryFilename:=GetPrimaryConfigPath+PathDelim+AFilename;
SecondaryFilename:=GetSecondaryConfigPath+PathDelim+AFilename;
if not FileExists(PrimaryFilename) then begin
try
SrcFS:=TFileStream.Create(SecondaryFilename,fmOpenRead);
try
DestFS:=TFileStream.Create(PrimaryFilename,fmCreate);
try
DestFS.CopyFrom(SrcFS,SrcFS.Size);
finally
DestFS.Free;
end;
finally
SrcFS.Free;
end;
except
end;
end;
end;
function FindDefaultCompilerPath: string;
begin
Result:=SearchFileInPath('ppc386','',GetEnv('PATH'),':',
[sffDontSearchInBasePath]);
end;
function FindDefaultMakePath: string;
begin
Result:=SearchFileInPath('make','',GetEnv('PATH'),':',
[sffDontSearchInBasePath]);
end;
function CreateCompilerTestPascalFilename: string;
var
fs: TFileStream;
begin
Result:=AppendPathDelim(GetPrimaryConfigPath)+'compilertest.pas';
if not FileExists(Result) then begin
fs:=TFileStream.Create(Result,fmCreate);
fs.Free;
end;
end;
{---------------------------------------------------------------------------
procedure InternalInit;
---------------------------------------------------------------------------}
procedure InternalInit;
begin
PrimaryConfigPath:=FExpand('~/.lazarus');
SecondaryConfigPath:='/etc/lazarus';
end;
{$I ../unix/lazbaseconf.inc}
{
$Log$
Revision 1.11 2003/08/15 14:01:20 mattias
combined lazconf things for unix
Revision 1.10 2003/03/26 11:39:08 mattias
fixed rtl include path

View File

@ -2,6 +2,9 @@
{***************************************************************************
lazconf.inc
linux specific include file for the IDE
***************************************************************************
***************************************************************************
@ -30,137 +33,15 @@ uses
linux;
{$ENDIF}
const
DefaultFPCSrcDirs: array[1..9] of string = (
'/usr/share/fpcsrc',
'/usr/fpcsrc',
'/usr/share/fpc/src',
'/usr/fpc/src',
'/usr/local/fpc/src',
'/usr/lib/fpc/src',
'/usr/local/lib/fpc/src',
'/vol/fpc/src',
'/vol/lib/fpc/src'
);
var
PrimaryConfigPath,
SecondaryConfigPath: string;
{---------------------------------------------------------------------------
getPrimaryConfigPath function
---------------------------------------------------------------------------}
function GetPrimaryConfigPath: String;
begin
Result := PrimaryConfigPath;
end;
{---------------------------------------------------------------------------
getSecondaryConfigPath function
---------------------------------------------------------------------------}
function GetSecondaryConfigPath: String;
begin
Result := SecondaryConfigPath;
end;
{---------------------------------------------------------------------------
createPrimaryConfigPath function
---------------------------------------------------------------------------}
procedure CreatePrimaryConfigPath;
begin
CreateDir(GetPrimaryConfigPath);
//MkDir(GetPrimaryConfigPath);
end;
{---------------------------------------------------------------------------
SetPrimaryConfigPath procedure
---------------------------------------------------------------------------}
procedure SetPrimaryConfigPath(const NewValue: String);
begin
PrimaryConfigPath:=FExpand(NewValue);
end;
{---------------------------------------------------------------------------
SetSecondaryConfigPath procedure
---------------------------------------------------------------------------}
procedure SetSecondaryConfigPath(const NewValue: String);
begin
SecondaryConfigPath:=FExpand(NewValue);
end;
{---------------------------------------------------------------------------
CopySecondaryConfigFile procedure
---------------------------------------------------------------------------}
procedure CopySecondaryConfigFile(const AFilename: String);
var
PrimaryFilename, SecondaryFilename: string;
SrcFS, DestFS: TFileStream;
begin
PrimaryFilename:=GetPrimaryConfigPath+PathDelim+AFilename;
SecondaryFilename:=GetSecondaryConfigPath+PathDelim+AFilename;
if not FileExists(PrimaryFilename) then begin
try
SrcFS:=TFileStream.Create(SecondaryFilename,fmOpenRead);
try
DestFS:=TFileStream.Create(PrimaryFilename,fmCreate);
try
DestFS.CopyFrom(SrcFS,SrcFS.Size);
finally
DestFS.Free;
end;
finally
SrcFS.Free;
end;
except
end;
end;
end;
{---------------------------------------------------------------------------
function CreateCompilerTestPascalFilename: string;
---------------------------------------------------------------------------}
function CreateCompilerTestPascalFilename: string;
var
fs: TFileStream;
begin
Result:=AppendPathDelim(GetPrimaryConfigPath)+'compilertest.pas';
if not FileExists(Result) then begin
fs:=TFileStream.Create(Result,fmCreate);
fs.Free;
end;
end;
{---------------------------------------------------------------------------
function FindDefaultCompilerPath: string;
---------------------------------------------------------------------------}
function FindDefaultCompilerPath: string;
begin
Result:=SearchFileInPath('ppc386','',GetEnv('PATH'),':',
[sffDontSearchInBasePath]);
end;
{---------------------------------------------------------------------------
function FindDefaultMakePath: string;
---------------------------------------------------------------------------}
function FindDefaultMakePath: string;
begin
Result:=SearchFileInPath('make','',GetEnv('PATH'),':',
[sffDontSearchInBasePath]);
end;
{---------------------------------------------------------------------------
procedure InternalInit;
---------------------------------------------------------------------------}
procedure InternalInit;
begin
PrimaryConfigPath:=FExpand('~/.lazarus');
SecondaryConfigPath:='/etc/lazarus';
end;
{$I ../unix/lazbaseconf.inc}
// included by lazconf.pp
{
$Log$
Revision 1.14 2003/08/15 14:01:20 mattias
combined lazconf things for unix
Revision 1.13 2003/03/26 11:39:08 mattias
fixed rtl include path

View File

@ -1,5 +1,10 @@
// included by lazconf.pp
{***************************************************************************
lazconf.inc
netbsd specific include file for the IDE
***************************************************************************
***************************************************************************
@ -30,133 +35,13 @@ uses
linux;
{$ENDIF}
const
DefaultFPCSrcDirs: array[1..9] of string = (
'/usr/share/fpcsrc',
'/usr/fpcsrc',
'/usr/share/fpc/src',
'/usr/fpc/src',
'/usr/local/fpc/src',
'/usr/lib/fpc/src',
'/usr/local/lib/fpc/src',
'/vol/fpc/src',
'/vol/lib/fpc/src'
);
var
PrimaryConfigPath,
SecondaryConfigPath: string;
{---------------------------------------------------------------------------
getPrimaryConfigPath function
---------------------------------------------------------------------------}
function GetPrimaryConfigPath: String;
begin
Result := PrimaryConfigPath;
end;
{---------------------------------------------------------------------------
getSecondaryConfigPath function
---------------------------------------------------------------------------}
function GetSecondaryConfigPath: String;
begin
Result := SecondaryConfigPath;
end;
{---------------------------------------------------------------------------
createPrimaryConfigPath function
---------------------------------------------------------------------------}
procedure CreatePrimaryConfigPath;
begin
CreateDir(GetPrimaryConfigPath);
//MkDir(GetPrimaryConfigPath);
end;
{---------------------------------------------------------------------------
SetPrimaryConfigPath procedure
---------------------------------------------------------------------------}
procedure SetPrimaryConfigPath(const NewValue: String);
begin
PrimaryConfigPath:=FExpand(NewValue);
end;
{---------------------------------------------------------------------------
SetSecondaryConfigPath procedure
---------------------------------------------------------------------------}
procedure SetSecondaryConfigPath(const NewValue: String);
begin
SecondaryConfigPath:=FExpand(NewValue);
end;
{---------------------------------------------------------------------------
CopySecondaryConfigFile procedure
---------------------------------------------------------------------------}
procedure CopySecondaryConfigFile(const AFilename: String);
var
PrimaryFilename, SecondaryFilename: string;
SrcFS, DestFS: TFileStream;
begin
PrimaryFilename:=GetPrimaryConfigPath+PathDelim+AFilename;
SecondaryFilename:=GetSecondaryConfigPath+PathDelim+AFilename;
if not FileExists(PrimaryFilename) then begin
try
SrcFS:=TFileStream.Create(SecondaryFilename,fmOpenRead);
try
DestFS:=TFileStream.Create(PrimaryFilename,fmCreate);
try
DestFS.CopyFrom(SrcFS,SrcFS.Size);
finally
DestFS.Free;
end;
finally
SrcFS.Free;
end;
except
end;
end;
end;
function CreateCompilerTestPascalFilename: string;
var
fs: TFileStream;
begin
Result:=AppendPathDelim(GetPrimaryConfigPath)+'compilertest.pas';
if not FileExists(Result) then begin
fs:=TFileStream.Create(Result,fmCreate);
fs.Free;
end;
end;
{---------------------------------------------------------------------------
function FindDefaultCompilerPath: string;
---------------------------------------------------------------------------}
function FindDefaultCompilerPath: string;
begin
Result:=SearchFileInPath('ppc386','',GetEnv('PATH'),':',
[sffDontSearchInBasePath]);
end;
{---------------------------------------------------------------------------
function FindDefaultMakePath: string;
---------------------------------------------------------------------------}
function FindDefaultMakePath: string;
begin
Result:=SearchFileInPath('make','',GetEnv('PATH'),':',
[sffDontSearchInBasePath]);
end;
{---------------------------------------------------------------------------
procedure InternalInit;
---------------------------------------------------------------------------}
procedure InternalInit;
begin
PrimaryConfigPath:=FExpand('~/.lazarus');
SecondaryConfigPath:='/etc/lazarus';
end;
{$I ../unix/lazbaseconf.inc}
{
$Log$
Revision 1.8 2003/08/15 14:01:20 mattias
combined lazconf things for unix
Revision 1.7 2003/03/26 11:39:08 mattias
fixed rtl include path

View File

@ -0,0 +1,168 @@
// included by linux/lazconf.inc, freebsd/lazconf.inc, netbsd/lazconf.inc
{
***************************************************************************
* *
* This source 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 code 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. *
* *
* A copy of the GNU General Public License is available on the World *
* Wide Web at <http://www.gnu.org/copyleft/gpl.html>. You can also *
* obtain it by writing to the Free Software Foundation, *
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
* *
***************************************************************************
}
const
DefaultFPCSrcDirs: array[1..9] of string = (
'/usr/share/fpcsrc',
'/usr/fpcsrc',
'/usr/share/fpc/src',
'/usr/fpc/src',
'/usr/local/fpc/src',
'/usr/lib/fpc/src',
'/usr/local/lib/fpc/src',
'/vol/fpc/src',
'/vol/lib/fpc/src'
);
var
PrimaryConfigPath,
SecondaryConfigPath: string;
{---------------------------------------------------------------------------
getPrimaryConfigPath function
---------------------------------------------------------------------------}
function GetPrimaryConfigPath: String;
begin
Result := PrimaryConfigPath;
end;
{---------------------------------------------------------------------------
getSecondaryConfigPath function
---------------------------------------------------------------------------}
function GetSecondaryConfigPath: String;
begin
Result := SecondaryConfigPath;
end;
{---------------------------------------------------------------------------
createPrimaryConfigPath function
---------------------------------------------------------------------------}
procedure CreatePrimaryConfigPath;
begin
CreateDir(GetPrimaryConfigPath);
end;
{---------------------------------------------------------------------------
SetPrimaryConfigPath procedure
---------------------------------------------------------------------------}
procedure SetPrimaryConfigPath(const NewValue: String);
begin
PrimaryConfigPath:=FExpand(NewValue);
end;
{---------------------------------------------------------------------------
SetSecondaryConfigPath procedure
---------------------------------------------------------------------------}
procedure SetSecondaryConfigPath(const NewValue: String);
begin
SecondaryConfigPath:=FExpand(NewValue);
end;
{---------------------------------------------------------------------------
CopySecondaryConfigFile procedure
---------------------------------------------------------------------------}
procedure CopySecondaryConfigFile(const AFilename: String);
var
PrimaryFilename, SecondaryFilename: string;
SrcFS, DestFS: TFileStream;
begin
PrimaryFilename:=GetPrimaryConfigPath+PathDelim+AFilename;
SecondaryFilename:=GetSecondaryConfigPath+PathDelim+AFilename;
if not FileExists(PrimaryFilename) then begin
try
SrcFS:=TFileStream.Create(SecondaryFilename,fmOpenRead);
try
DestFS:=TFileStream.Create(PrimaryFilename,fmCreate);
try
DestFS.CopyFrom(SrcFS,SrcFS.Size);
finally
DestFS.Free;
end;
finally
SrcFS.Free;
end;
except
end;
end;
end;
{---------------------------------------------------------------------------
function CreateCompilerTestPascalFilename: string;
---------------------------------------------------------------------------}
function CreateCompilerTestPascalFilename: string;
var
fs: TFileStream;
begin
Result:=AppendPathDelim(GetPrimaryConfigPath)+'compilertest.pas';
if not FileExists(Result) then begin
fs:=TFileStream.Create(Result,fmCreate);
fs.Free;
end;
end;
{---------------------------------------------------------------------------
function FindDefaultCompilerPath: string;
---------------------------------------------------------------------------}
function FindDefaultCompilerPath: string;
begin
Result:=SearchFileInPath('ppc386','',GetEnv('PATH'),':',
[sffDontSearchInBasePath]);
end;
{---------------------------------------------------------------------------
function FindDefaultMakePath: string;
---------------------------------------------------------------------------}
function FindDefaultMakePath: string;
begin
Result:=SearchFileInPath('make','',GetEnv('PATH'),':',
[sffDontSearchInBasePath]);
end;
{---------------------------------------------------------------------------
function GetDefaultExecutableExt: string;
---------------------------------------------------------------------------}
function GetDefaultExecutableExt: string;
begin
Result:='';
end;
function GetDefaultTestBuildDirectory: string;
begin
Result:='/tmp/';
if not DirectoryExists(Result) then begin
if DirectoryExists('/var/tmp/') then
Result:='/var/tmp/';
end;
end;
{---------------------------------------------------------------------------
procedure InternalInit;
---------------------------------------------------------------------------}
procedure InternalInit;
begin
PrimaryConfigPath:=FExpand('~/.lazarus');
SecondaryConfigPath:='/etc/lazarus';
end;

View File

@ -100,12 +100,17 @@ end;
function FindDefaultCompilerPath: string;
begin
Result:='';
Result:=SearchFileInPath('ppc386','',GetEnv('PATH'),':',
[sffDontSearchInBasePath]);
if Result<>'' then exit;
Result:='c:\pp\bin\win32\ppc386.exe';
if not FileExists(Result) then Result:='';
end;
function FindDefaultMakePath: string;
begin
Result:='';
Result:=SearchFileInPath('make','',GetEnv('PATH'),':',
[sffDontSearchInBasePath]);
end;
function CreateCompilerTestPascalFilename: string;
@ -119,6 +124,24 @@ begin
end;
end;
{---------------------------------------------------------------------------
function GetDefaultExecutableExt: string;
---------------------------------------------------------------------------}
function GetDefaultExecutableExt: string;
begin
Result:='.exe';
end;
function GetDefaultTestBuildDirectory: string;
begin
Result:=GetEnv('TEMP');
if Result<>'' then exit;
Result:='c:\temp\';
if DirectoryExists(Result) then exit;
Result:='c:\windows\temp\';
if DirectoryExists(Result) then exit;
end;
{---------------------------------------------------------------------------
procedure InternalInit;
---------------------------------------------------------------------------}
@ -132,6 +155,9 @@ end;
{
$Log$
Revision 1.9 2003/08/15 14:01:20 mattias
combined lazconf things for unix
Revision 1.8 2003/02/06 20:46:51 mattias
default fpc src dirs and clean ups

View File

@ -65,16 +65,22 @@ uses
procedure SetSecondaryConfigPath(const NewValue: String);
procedure CopySecondaryConfigFile(const AFilename: String);
function GetDefaultTestBuildDirectory: string;
function FindDefaultCompilerPath: string;
function FindDefaultMakePath: string;
function FindDefaultFPCSrcDirectory: string;
function CheckFPCSourceDir(const ADirectory: string): boolean;
function CheckLazarusDirectory(const ADirectory: string): boolean;
// create a pascal file, which can be used to test the compiler
function CreateCompilerTestPascalFilename: string;
implementation
// returns the standard file extension (e.g '.exe')
function GetDefaultExecutableExt: string;
implementation
{$I lazconf.inc}
@ -124,6 +130,9 @@ end.
{
$Log$
Revision 1.16 2003/08/15 14:01:20 mattias
combined lazconf things for unix
Revision 1.15 2003/04/01 22:49:47 mattias
implemented global and user package links

View File

@ -169,7 +169,7 @@ begin
PassCmdLineOptions;
// set glib log handler
FLogHandlerID := g_log_set_handler(nil, $FFFFFFFF, @GLogFunc, Self);
FLogHandlerID := g_log_set_handler(nil, -1, @GLogFunc, Self);
// read gtk rc file
ParseRCFile;
@ -2137,7 +2137,7 @@ begin
{$IFDEF VerboseRawImage}
writeln('TgtkObject.GetRawImageFromGdkWindow G Width=',AnImage^.Width,' Height=',AnImage^.Height,' BitsPerPixel=',NewRawImage.Description.BitsPerPixel,' bpl=',AnImage^.bpl);
{$ENDIF}
if NewRawImage.DataSize<>AnImage^.bpl*AnImage^.Height then
if NewRawImage.DataSize<>cardinal(AnImage^.bpl)*AnImage^.Height then
RaiseGDBException('NewRawImage.DataSize<>AnImage^.bpl*AnImage^.Height');
// copy data
@ -8038,6 +8038,9 @@ end;
{ =============================================================================
$Log$
Revision 1.398 2003/08/15 14:01:20 mattias
combined lazconf things for unix
Revision 1.397 2003/08/14 10:36:55 mattias
added TSelectDirectoryDialog

View File

@ -914,7 +914,8 @@ begin
' ByteOrder=',GdkImage^.byte_order,
'');
{$ENDIF}
if (RawImage.Description.BitsPerPixel<>(GdkImage^.bpp shl 3)) then
if (RawImage.Description.BitsPerPixel<>(cardinal(GdkImage^.bpp) shl 3))
then
RaiseGDBException('TgtkObject.CreateBitmapFromRawImage Incompatible BitsPerPixel');
if (ImgDataSize<>GdkImage^.bpl*ImgHeight) then
RaiseGDBException('TgtkObject.CreateBitmapFromRawImage Incompatible DataSize');
@ -8749,6 +8750,9 @@ end;
{ =============================================================================
$Log$
Revision 1.266 2003/08/15 14:01:20 mattias
combined lazconf things for unix
Revision 1.265 2003/07/29 00:28:43 marc
+ Implemented GetCursorPos

View File

@ -98,6 +98,7 @@ begin
begin
First:=0;
Last:= FCount-1;
Larger:=False;
while First<=Last do
begin
I:=(First+Last)shr 1;