mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-22 13:39:30 +02:00
started gtk2 interface
git-svn-id: trunk@3695 -
This commit is contained in:
parent
735191d158
commit
45be5148ad
@ -168,8 +168,12 @@ ResourceString
|
||||
ctsSetsIncPathTo = 'sets IncPath to %s';
|
||||
ctsSetsSrcPathTo = 'sets SrcPath to %s';
|
||||
ctsNamedDirectory = '%s Directory';
|
||||
ctsAbstractWidgetPath = 'abstract widget path';
|
||||
ctsWidgetDirectory = 'Widget Directory';
|
||||
ctsGtkIntfDirectory = 'gtk interface directory';
|
||||
ctsIfLCLWidgetTypeEqualsGtk2 = 'If LCLWidgetType=gtk2 then';
|
||||
ctsDefineMacroGTK2 = 'Define macro gtk2';
|
||||
ctsGtk2IntfDirectory = 'gtk2 interface directory';
|
||||
ctsGnomeIntfDirectory = 'gnome interface directory';
|
||||
ctsComponentsDirectory = 'Components Directory';
|
||||
ctsCustomComponentsDirectory = 'Custom Components Directory';
|
||||
ctsToolsDirectory = 'Tools Directory';
|
||||
|
@ -2292,7 +2292,9 @@ function TDefinePool.CreateLazarusSrcTemplate(
|
||||
const LazarusSrcDir, WidgetType: string): TDefineTemplate;
|
||||
const
|
||||
ds: char = PathDelim;
|
||||
var MainDir, DirTempl, SubDirTempl: TDefineTemplate;
|
||||
var
|
||||
MainDir, DirTempl, SubDirTempl, IntfDirTemplate,
|
||||
IfTemplate: TDefineTemplate;
|
||||
TargetOS, SrcPath: string;
|
||||
begin
|
||||
Result:=nil;
|
||||
@ -2341,11 +2343,6 @@ begin
|
||||
// lcl
|
||||
DirTempl:=TDefineTemplate.Create('LCL',Format(ctsNamedDirectory,['LCL']),
|
||||
'','lcl',da_Directory);
|
||||
DirTempl.AddChild(TDefineTemplate.Create('WidgetPath',
|
||||
Format(ctsAddsDirToSourcePath,[ctsAbstractWidgetPath]),
|
||||
ExternalMacroStart+'SrcPath',
|
||||
'interfaces'+ds+'abstract'+ds+';'+SrcPath,
|
||||
da_Define));
|
||||
DirTempl.AddChild(TDefineTemplate.Create('IncludePath',
|
||||
Format(ctsIncludeDirectoriesPlusDirs,['include']),
|
||||
ExternalMacroStart+'IncPath',
|
||||
@ -2353,13 +2350,46 @@ begin
|
||||
MainDir.AddChild(DirTempl);
|
||||
|
||||
// lcl/interfaces
|
||||
SubDirTempl:=TDefineTemplate.Create('Widget Directory',
|
||||
SubDirTempl:=TDefineTemplate.Create('WidgetDirectory',
|
||||
ctsWidgetDirectory,'','interfaces',da_Directory);
|
||||
// add lcl to the source path of all widget set directories
|
||||
SubDirTempl.AddChild(TDefineTemplate.Create('LCL Path',
|
||||
Format(ctsAddsDirToSourcePath,['lcl']),ExternalMacroStart+'SrcPath',
|
||||
LazarusSrcDir+ds+'lcl;'+SrcPath,da_DefineRecurse));
|
||||
DirTempl.AddChild(SubDirTempl);
|
||||
|
||||
// lcl/interfaces/gtk
|
||||
IntfDirTemplate:=TDefineTemplate.Create('gtkIntfDirectory',
|
||||
ctsGtkIntfDirectory,'','gtk',da_Directory);
|
||||
// if $(LCLWidgetType)=gtk2
|
||||
IfTemplate:=TDefineTemplate.Create('IF LCLWidgetType=gtk2',
|
||||
ctsIfLCLWidgetTypeEqualsGtk2,'','$(LCLWidgetType)=gtk2',da_If);
|
||||
// then define gtk2
|
||||
IfTemplate.AddChild(TDefineTemplate.Create('Define gtk2',
|
||||
ctsDefineMacroGTK2,'gtk2','',da_Define));
|
||||
IntfDirTemplate.AddChild(IfTemplate);
|
||||
SubDirTempl.AddChild(IntfDirTemplate);
|
||||
|
||||
// lcl/interfaces/gtk2
|
||||
IntfDirTemplate:=TDefineTemplate.Create('gtk2IntfDirectory',
|
||||
ctsGtk2IntfDirectory,'','gtk2',da_Directory);
|
||||
// add '../gtk' to the SrcPath
|
||||
IntfDirTemplate.AddChild(TDefineTemplate.Create('SrcPath',
|
||||
Format(ctsAddsDirToSourcePath,['gtk']),ExternalMacroStart+'SrcPath',
|
||||
'..'+ds+'gtk;'+SrcPath,da_Define));
|
||||
SubDirTempl.AddChild(IntfDirTemplate);
|
||||
|
||||
// lcl/interfaces/gnome
|
||||
IntfDirTemplate:=TDefineTemplate.Create('gnomeIntfDirectory',
|
||||
ctsGnomeIntfDirectory,'','gnome',da_Directory);
|
||||
// add '../gtk' to the SrcPath
|
||||
IntfDirTemplate.AddChild(TDefineTemplate.Create('SrcPath',
|
||||
Format(ctsAddsDirToSourcePath,['gtk']),ExternalMacroStart+'SrcPath',
|
||||
'..'+ds+'gtk;'+SrcPath,da_Define));
|
||||
SubDirTempl.AddChild(IntfDirTemplate);
|
||||
|
||||
// lcl/interfaces/win32
|
||||
// no special
|
||||
|
||||
// components
|
||||
DirTempl:=TDefineTemplate.Create('Components',ctsComponentsDirectory,
|
||||
|
@ -39,7 +39,7 @@ uses
|
||||
|
||||
type
|
||||
TMakeMode = (mmNone, mmBuild, mmCleanBuild);
|
||||
TLCLPlatform = (lpGtk, lpGnome, lpWin32);
|
||||
TLCLPlatform = (lpGtk, lpGtk2, lpGnome, lpWin32);
|
||||
|
||||
TBuildLazarusOptions = class
|
||||
private
|
||||
@ -123,7 +123,7 @@ const
|
||||
'None', 'Build', 'Clean+Build'
|
||||
);
|
||||
LCLPlatformNames: array[TLCLPlatform] of string = (
|
||||
'gtk', 'gnome', 'win32'
|
||||
'gtk', 'gtk2', 'gnome', 'win32'
|
||||
);
|
||||
|
||||
|
||||
@ -466,7 +466,7 @@ begin
|
||||
Left:=BuildLCLRadioGroup.Left+BuildLCLRadioGroup.Width+10;
|
||||
Top:=BuildLCLRadioGroup.Top;
|
||||
Width:=Parent.ClientHeight-Left-BuildLCLRadioGroup.Left;
|
||||
Height:=100;
|
||||
Height:=120;
|
||||
Caption:='LCL interface';
|
||||
for LCLInterface:=Low(TLCLPlatform) to High(TLCLPlatform) do begin
|
||||
Items.Add(LCLPlatformNames[LCLInterface]);
|
||||
|
@ -3171,9 +3171,10 @@ begin
|
||||
with Items do begin
|
||||
Add('gnome');
|
||||
Add('gtk');
|
||||
Add('gtk2');
|
||||
Add('win32');
|
||||
end;
|
||||
Columns:=3;
|
||||
Columns:=Items.Count;
|
||||
ItemIndex:=1;
|
||||
Visible:=true;
|
||||
end;
|
||||
|
@ -8,6 +8,8 @@ interfaces
|
||||
|
|
||||
+--- gtk
|
||||
|
|
||||
+--- gtk2
|
||||
|
|
||||
+--- qt
|
||||
|
|
||||
+--- win32
|
||||
@ -19,7 +21,10 @@ interfaces/gnome:
|
||||
All gnome 1.x specific code goes here.
|
||||
|
||||
interfaces/gtk:
|
||||
All gtk 1.x specific code goes here.
|
||||
All gtk 1.x specific code goes here. (With some specials for gtk2.x)
|
||||
|
||||
interfaces/gtk2:
|
||||
All gtk 2.x specific code goes here.
|
||||
|
||||
interfaces/qt:
|
||||
All QT specific code goes here.
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Don't edit, this file is generated by FPCMake Version 1.1 [2002/09/20]
|
||||
# Don't edit, this file is generated by FPCMake Version 1.1 [2002/09/21]
|
||||
#
|
||||
default: all
|
||||
MAKEFILETARGETS=linux go32v2 win32 os2 freebsd beos netbsd amiga atari sunos qnx netware openbsd wdosx
|
||||
@ -247,7 +247,7 @@ endif
|
||||
endif
|
||||
export LCL_PLATFORM
|
||||
override DEFAULT_DIR=$(LCL_PLATFORM)
|
||||
override TARGET_DIRS+=gtk win32 gnome
|
||||
override TARGET_DIRS+=gtk gtk2 win32 gnome
|
||||
ifdef REQUIRE_UNITSDIR
|
||||
override UNITSDIR+=$(REQUIRE_UNITSDIR)
|
||||
endif
|
||||
@ -1138,6 +1138,7 @@ fpc_makefile_sub2: $(addsuffix _makefile_dirs,$(TARGET_DIRS) $(TARGET_EXAMPLEDIR
|
||||
fpc_makefile_dirs: fpc_makefile_sub1 fpc_makefile_sub2
|
||||
fpc_makefiles: fpc_makefile fpc_makefile_dirs
|
||||
TARGET_DIRS_GTK=1
|
||||
TARGET_DIRS_GTK2=1
|
||||
TARGET_DIRS_WIN32=1
|
||||
TARGET_DIRS_GNOME=1
|
||||
ifdef TARGET_DIRS_GTK
|
||||
@ -1183,6 +1184,49 @@ gtk:
|
||||
$(MAKE) -C gtk all
|
||||
.PHONY: gtk_all gtk_debug gtk_smart gtk_release gtk_examples gtk_shared gtk_install gtk_sourceinstall gtk_exampleinstall gtk_distinstall gtk_zipinstall gtk_zipsourceinstall gtk_zipexampleinstall gtk_zipdistinstall gtk_clean gtk_distclean gtk_cleanall gtk_info gtk_makefiles gtk
|
||||
endif
|
||||
ifdef TARGET_DIRS_GTK2
|
||||
gtk2_all:
|
||||
$(MAKE) -C gtk2 all
|
||||
gtk2_debug:
|
||||
$(MAKE) -C gtk2 debug
|
||||
gtk2_smart:
|
||||
$(MAKE) -C gtk2 smart
|
||||
gtk2_release:
|
||||
$(MAKE) -C gtk2 release
|
||||
gtk2_examples:
|
||||
$(MAKE) -C gtk2 examples
|
||||
gtk2_shared:
|
||||
$(MAKE) -C gtk2 shared
|
||||
gtk2_install:
|
||||
$(MAKE) -C gtk2 install
|
||||
gtk2_sourceinstall:
|
||||
$(MAKE) -C gtk2 sourceinstall
|
||||
gtk2_exampleinstall:
|
||||
$(MAKE) -C gtk2 exampleinstall
|
||||
gtk2_distinstall:
|
||||
$(MAKE) -C gtk2 distinstall
|
||||
gtk2_zipinstall:
|
||||
$(MAKE) -C gtk2 zipinstall
|
||||
gtk2_zipsourceinstall:
|
||||
$(MAKE) -C gtk2 zipsourceinstall
|
||||
gtk2_zipexampleinstall:
|
||||
$(MAKE) -C gtk2 zipexampleinstall
|
||||
gtk2_zipdistinstall:
|
||||
$(MAKE) -C gtk2 zipdistinstall
|
||||
gtk2_clean:
|
||||
$(MAKE) -C gtk2 clean
|
||||
gtk2_distclean:
|
||||
$(MAKE) -C gtk2 distclean
|
||||
gtk2_cleanall:
|
||||
$(MAKE) -C gtk2 cleanall
|
||||
gtk2_info:
|
||||
$(MAKE) -C gtk2 info
|
||||
gtk2_makefiles:
|
||||
$(MAKE) -C gtk2 makefiles
|
||||
gtk2:
|
||||
$(MAKE) -C gtk2 all
|
||||
.PHONY: gtk2_all gtk2_debug gtk2_smart gtk2_release gtk2_examples gtk2_shared gtk2_install gtk2_sourceinstall gtk2_exampleinstall gtk2_distinstall gtk2_zipinstall gtk2_zipsourceinstall gtk2_zipexampleinstall gtk2_zipdistinstall gtk2_clean gtk2_distclean gtk2_cleanall gtk2_info gtk2_makefiles gtk2
|
||||
endif
|
||||
ifdef TARGET_DIRS_WIN32
|
||||
win32_all:
|
||||
$(MAKE) -C win32 all
|
||||
|
@ -8,7 +8,7 @@
|
||||
main=lcl
|
||||
|
||||
[target]
|
||||
dirs=gtk win32 gnome
|
||||
dirs=gtk gtk2 win32 gnome
|
||||
|
||||
[default]
|
||||
dir=$(LCL_PLATFORM)
|
||||
|
Loading…
Reference in New Issue
Block a user