mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-08 07:21:34 +02:00
MG: moved jitform to a special directory
git-svn-id: trunk@3477 -
This commit is contained in:
parent
f47cc0335c
commit
ffd74ad961
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -120,6 +120,7 @@ designer/designermenu.pp svneol=native#text/pascal
|
||||
designer/designerprocs.pas svneol=native#text/pascal
|
||||
designer/filesystem.pp svneol=native#text/pascal
|
||||
designer/graphpropedits.pas svneol=native#text/pascal
|
||||
designer/jitform/jitform.pas svneol=native#text/pascal
|
||||
designer/jitforms.pp svneol=native#text/pascal
|
||||
designer/menueditorform.pas svneol=native#text/pascal
|
||||
designer/menupropedit.pp svneol=native#text/pascal
|
||||
|
98
Makefile
98
Makefile
@ -1,8 +1,8 @@
|
||||
#
|
||||
# Don't edit, this file is generated by FPCMake Version 1.1 [2002/04/23]
|
||||
# Don't edit, this file is generated by FPCMake Version 1.1 [2002/09/20]
|
||||
#
|
||||
default: all
|
||||
MAKEFILETARGETS=linux go32v2 win32 os2 freebsd beos netbsd amiga atari sunos qnx netware
|
||||
MAKEFILETARGETS=linux go32v2 win32 os2 freebsd beos netbsd amiga atari sunos qnx netware openbsd wdosx
|
||||
override PATH:=$(subst \,/,$(PATH))
|
||||
ifeq ($(findstring ;,$(PATH)),)
|
||||
inUnix=1
|
||||
@ -42,6 +42,9 @@ endif
|
||||
ifeq ($(OS_TARGET),netbsd)
|
||||
BSDhier=1
|
||||
endif
|
||||
ifeq ($(OS_TARGET),openbsd)
|
||||
BSDhier=1
|
||||
endif
|
||||
ifdef inUnix
|
||||
BATCHEXT=.sh
|
||||
else
|
||||
@ -206,7 +209,7 @@ endif
|
||||
export LCL_PLATFORM
|
||||
endif
|
||||
RCPP?=$(strip $(firstword $(wildcard $(addsuffix /cpp$(SRCEXEEXT), $(SEARCHPATH)))))
|
||||
override TARGET_DIRS+=lcl components
|
||||
override TARGET_DIRS+=lcl components designer/jitform
|
||||
override TARGET_PROGRAMS+=lazarus
|
||||
override TARGET_EXAMPLEDIRS+=examples
|
||||
override CLEAN_FILES+=$(wildcard ./designer/*$(OEXT)) $(wildcard ./designer/*$(PPUEXT)) $(wildcard ./debugger/*$(OEXT)) $(wildcard ./debugger/*$(PPUEXT))
|
||||
@ -214,7 +217,7 @@ override INSTALL_BASEDIR=lib/lazarus
|
||||
override DIST_DESTDIR=$(BASEDIR)/dist
|
||||
override COMPILER_OPTIONS+=-gl
|
||||
override COMPILER_INCLUDEDIR+=include include/$(OS_TARGET)
|
||||
override COMPILER_UNITDIR+=lcl/units lcl/units/$(LCL_PLATFORM) designer debugger components/units .
|
||||
override COMPILER_UNITDIR+=lcl/units lcl/units/$(LCL_PLATFORM) designer designer/units debugger components/units .
|
||||
override COMPILER_TARGETDIR+=.
|
||||
ifdef REQUIRE_UNITSDIR
|
||||
override UNITSDIR+=$(REQUIRE_UNITSDIR)
|
||||
@ -232,9 +235,15 @@ endif
|
||||
ifeq ($(OS_TARGET),netbsd)
|
||||
UNIXINSTALLDIR=1
|
||||
endif
|
||||
ifeq ($(OS_TARGET),openbsd)
|
||||
UNIXINSTALLDIR=1
|
||||
endif
|
||||
ifeq ($(OS_TARGET),sunos)
|
||||
UNIXINSTALLDIR=1
|
||||
endif
|
||||
ifeq ($(OS_TARGET),qnx)
|
||||
UNIXINSTALLDIR=1
|
||||
endif
|
||||
else
|
||||
ifeq ($(OS_SOURCE),linux)
|
||||
UNIXINSTALLDIR=1
|
||||
@ -245,9 +254,15 @@ endif
|
||||
ifeq ($(OS_SOURCE),netbsd)
|
||||
UNIXINSTALLDIR=1
|
||||
endif
|
||||
ifeq ($(OS_SOURCE),openbsd)
|
||||
UNIXINSTALLDIR=1
|
||||
endif
|
||||
ifeq ($(OS_TARGET),sunos)
|
||||
UNIXINSTALLDIR=1
|
||||
endif
|
||||
ifeq ($(OS_TARGET),qnx)
|
||||
UNIXINSTALLDIR=1
|
||||
endif
|
||||
endif
|
||||
ifndef INSTALL_PREFIX
|
||||
ifdef PREFIX
|
||||
@ -457,6 +472,12 @@ HASSHAREDLIB=1
|
||||
FPCMADE=fpcmade.netbsd
|
||||
ZIPSUFFIX=netbsd
|
||||
endif
|
||||
ifeq ($(OS_TARGET),openbsd)
|
||||
EXEEXT=
|
||||
HASSHAREDLIB=1
|
||||
FPCMADE=fpcmade.openbsd
|
||||
ZIPSUFFIX=openbsd
|
||||
endif
|
||||
ifeq ($(OS_TARGET),win32)
|
||||
PPUEXT=.ppw
|
||||
OEXT=.ow
|
||||
@ -482,7 +503,7 @@ ECHO=echo
|
||||
endif
|
||||
ifeq ($(OS_TARGET),amiga)
|
||||
EXEEXT=
|
||||
PPUEXT=.ppa
|
||||
PPUEXT=.ppu
|
||||
ASMEXT=.asm
|
||||
OEXT=.o
|
||||
SMARTEXT=.sl
|
||||
@ -491,7 +512,7 @@ SHAREDLIBEXT=.library
|
||||
FPCMADE=fpcmade.amg
|
||||
endif
|
||||
ifeq ($(OS_TARGET),atari)
|
||||
PPUEXT=.ppt
|
||||
PPUEXT=.ppu
|
||||
ASMEXT=.s
|
||||
OEXT=.o
|
||||
SMARTEXT=.sl
|
||||
@ -813,6 +834,8 @@ REQUIRE_PACKAGES_PASZLIB=1
|
||||
REQUIRE_PACKAGES_INET=1
|
||||
REQUIRE_PACKAGES_FCL=1
|
||||
REQUIRE_PACKAGES_REGEXPR=1
|
||||
REQUIRE_PACKAGES_MYSQL=1
|
||||
REQUIRE_PACKAGES_IBASE=1
|
||||
endif
|
||||
ifeq ($(OS_TARGET),amiga)
|
||||
REQUIRE_PACKAGES_RTL=1
|
||||
@ -844,6 +867,21 @@ REQUIRE_PACKAGES_PASZLIB=1
|
||||
REQUIRE_PACKAGES_FCL=1
|
||||
REQUIRE_PACKAGES_REGEXPR=1
|
||||
endif
|
||||
ifeq ($(OS_TARGET),openbsd)
|
||||
REQUIRE_PACKAGES_RTL=1
|
||||
REQUIRE_PACKAGES_PASZLIB=1
|
||||
REQUIRE_PACKAGES_INET=1
|
||||
REQUIRE_PACKAGES_FCL=1
|
||||
REQUIRE_PACKAGES_REGEXPR=1
|
||||
REQUIRE_PACKAGES_MYSQL=1
|
||||
REQUIRE_PACKAGES_IBASE=1
|
||||
endif
|
||||
ifeq ($(OS_TARGET),wdosx)
|
||||
REQUIRE_PACKAGES_RTL=1
|
||||
REQUIRE_PACKAGES_PASZLIB=1
|
||||
REQUIRE_PACKAGES_FCL=1
|
||||
REQUIRE_PACKAGES_REGEXPR=1
|
||||
endif
|
||||
ifdef REQUIRE_PACKAGES_RTL
|
||||
PACKAGEDIR_RTL:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /rtl/$(OS_TARGET)/Makefile.fpc,$(PACKAGESDIR))))))
|
||||
ifneq ($(PACKAGEDIR_RTL),)
|
||||
@ -1032,6 +1070,9 @@ endif
|
||||
ifneq ($(OS_TARGET),$(OS_SOURCE))
|
||||
override FPCOPT+=-T$(OS_TARGET)
|
||||
endif
|
||||
ifeq ($(OS_SOURCE),openbsd)
|
||||
override FPCOPT+=-FD$(NEW_BINUTILS_PATH)
|
||||
endif
|
||||
ifdef UNITDIR
|
||||
override FPCOPT+=$(addprefix -Fu,$(UNITDIR))
|
||||
endif
|
||||
@ -1494,6 +1535,7 @@ fpc_makefile_dirs: fpc_makefile_sub1 fpc_makefile_sub2
|
||||
fpc_makefiles: fpc_makefile fpc_makefile_dirs
|
||||
TARGET_DIRS_LCL=1
|
||||
TARGET_DIRS_COMPONENTS=1
|
||||
TARGET_DIRS_DESIGNER/JITFORM=1
|
||||
ifdef TARGET_DIRS_LCL
|
||||
lcl_all:
|
||||
$(MAKE) -C lcl all
|
||||
@ -1580,6 +1622,49 @@ components:
|
||||
$(MAKE) -C components all
|
||||
.PHONY: components_all components_debug components_smart components_release components_examples components_shared components_install components_sourceinstall components_exampleinstall components_distinstall components_zipinstall components_zipsourceinstall components_zipexampleinstall components_zipdistinstall components_clean components_distclean components_cleanall components_info components_makefiles components
|
||||
endif
|
||||
ifdef TARGET_DIRS_DESIGNER/JITFORM
|
||||
designer/jitform_all:
|
||||
$(MAKE) -C designer/jitform all
|
||||
designer/jitform_debug:
|
||||
$(MAKE) -C designer/jitform debug
|
||||
designer/jitform_smart:
|
||||
$(MAKE) -C designer/jitform smart
|
||||
designer/jitform_release:
|
||||
$(MAKE) -C designer/jitform release
|
||||
designer/jitform_examples:
|
||||
$(MAKE) -C designer/jitform examples
|
||||
designer/jitform_shared:
|
||||
$(MAKE) -C designer/jitform shared
|
||||
designer/jitform_install:
|
||||
$(MAKE) -C designer/jitform install
|
||||
designer/jitform_sourceinstall:
|
||||
$(MAKE) -C designer/jitform sourceinstall
|
||||
designer/jitform_exampleinstall:
|
||||
$(MAKE) -C designer/jitform exampleinstall
|
||||
designer/jitform_distinstall:
|
||||
$(MAKE) -C designer/jitform distinstall
|
||||
designer/jitform_zipinstall:
|
||||
$(MAKE) -C designer/jitform zipinstall
|
||||
designer/jitform_zipsourceinstall:
|
||||
$(MAKE) -C designer/jitform zipsourceinstall
|
||||
designer/jitform_zipexampleinstall:
|
||||
$(MAKE) -C designer/jitform zipexampleinstall
|
||||
designer/jitform_zipdistinstall:
|
||||
$(MAKE) -C designer/jitform zipdistinstall
|
||||
designer/jitform_clean:
|
||||
$(MAKE) -C designer/jitform clean
|
||||
designer/jitform_distclean:
|
||||
$(MAKE) -C designer/jitform distclean
|
||||
designer/jitform_cleanall:
|
||||
$(MAKE) -C designer/jitform cleanall
|
||||
designer/jitform_info:
|
||||
$(MAKE) -C designer/jitform info
|
||||
designer/jitform_makefiles:
|
||||
$(MAKE) -C designer/jitform makefiles
|
||||
designer/jitform:
|
||||
$(MAKE) -C designer/jitform all
|
||||
.PHONY: designer/jitform_all designer/jitform_debug designer/jitform_smart designer/jitform_release designer/jitform_examples designer/jitform_shared designer/jitform_install designer/jitform_sourceinstall designer/jitform_exampleinstall designer/jitform_distinstall designer/jitform_zipinstall designer/jitform_zipsourceinstall designer/jitform_zipexampleinstall designer/jitform_zipdistinstall designer/jitform_clean designer/jitform_distclean designer/jitform_cleanall designer/jitform_info designer/jitform_makefiles designer/jitform
|
||||
endif
|
||||
TARGET_EXAMPLEDIRS_EXAMPLES=1
|
||||
ifdef TARGET_EXAMPLEDIRS_EXAMPLES
|
||||
examples_all:
|
||||
@ -1660,6 +1745,7 @@ all: lcl components ide
|
||||
cleanide:
|
||||
$(DEL) $(wildcard *$(OEXT))
|
||||
$(DEL) $(wildcard *$(PPUEXT))
|
||||
$(DEL) $(wildcard *$(RSTEXT))
|
||||
$(DEL) $(wildcard ./designer/*$(OEXT))
|
||||
$(DEL) $(wildcard ./designer/*$(PPUEXT))
|
||||
$(DEL) $(wildcard ./debugger/*$(OEXT))
|
||||
|
@ -11,17 +11,19 @@ packages=fcl regexpr
|
||||
|
||||
[target]
|
||||
programs=lazarus
|
||||
dirs=lcl components
|
||||
dirs=lcl components designer/jitform
|
||||
exampledirs=examples
|
||||
|
||||
[compiler]
|
||||
options=-gl
|
||||
unitdir=lcl/units lcl/units/$(LCL_PLATFORM) designer debugger components/units .
|
||||
unitdir=lcl/units lcl/units/$(LCL_PLATFORM) designer designer/units debugger \
|
||||
components/units .
|
||||
includedir=include include/$(OS_TARGET)
|
||||
targetdir=.
|
||||
|
||||
[clean]
|
||||
files=$(wildcard ./designer/*$(OEXT)) $(wildcard ./designer/*$(PPUEXT)) $(wildcard ./debugger/*$(OEXT)) $(wildcard ./debugger/*$(PPUEXT))
|
||||
files=$(wildcard ./designer/*$(OEXT)) $(wildcard ./designer/*$(PPUEXT)) \
|
||||
$(wildcard ./debugger/*$(OEXT)) $(wildcard ./debugger/*$(PPUEXT))
|
||||
|
||||
[install]
|
||||
basedir=lib/lazarus
|
||||
@ -62,6 +64,7 @@ all: lcl components ide
|
||||
cleanide:
|
||||
$(DEL) $(wildcard *$(OEXT))
|
||||
$(DEL) $(wildcard *$(PPUEXT))
|
||||
$(DEL) $(wildcard *$(RSTEXT))
|
||||
$(DEL) $(wildcard ./designer/*$(OEXT))
|
||||
$(DEL) $(wildcard ./designer/*$(PPUEXT))
|
||||
$(DEL) $(wildcard ./debugger/*$(OEXT))
|
||||
|
@ -1,8 +1,8 @@
|
||||
#
|
||||
# Don't edit, this file is generated by FPCMake Version 1.1 [2002/04/22]
|
||||
# Don't edit, this file is generated by FPCMake Version 1.1 [2002/09/20]
|
||||
#
|
||||
default: all
|
||||
MAKEFILETARGETS=linux go32v2 win32 os2 freebsd beos netbsd amiga atari sunos qnx netware
|
||||
MAKEFILETARGETS=linux go32v2 win32 os2 freebsd beos netbsd amiga atari sunos qnx netware openbsd wdosx
|
||||
override PATH:=$(subst \,/,$(PATH))
|
||||
ifeq ($(findstring ;,$(PATH)),)
|
||||
inUnix=1
|
||||
@ -42,6 +42,9 @@ endif
|
||||
ifeq ($(OS_TARGET),netbsd)
|
||||
BSDhier=1
|
||||
endif
|
||||
ifeq ($(OS_TARGET),openbsd)
|
||||
BSDhier=1
|
||||
endif
|
||||
ifdef inUnix
|
||||
BATCHEXT=.sh
|
||||
else
|
||||
@ -213,9 +216,15 @@ endif
|
||||
ifeq ($(OS_TARGET),netbsd)
|
||||
UNIXINSTALLDIR=1
|
||||
endif
|
||||
ifeq ($(OS_TARGET),openbsd)
|
||||
UNIXINSTALLDIR=1
|
||||
endif
|
||||
ifeq ($(OS_TARGET),sunos)
|
||||
UNIXINSTALLDIR=1
|
||||
endif
|
||||
ifeq ($(OS_TARGET),qnx)
|
||||
UNIXINSTALLDIR=1
|
||||
endif
|
||||
else
|
||||
ifeq ($(OS_SOURCE),linux)
|
||||
UNIXINSTALLDIR=1
|
||||
@ -226,9 +235,15 @@ endif
|
||||
ifeq ($(OS_SOURCE),netbsd)
|
||||
UNIXINSTALLDIR=1
|
||||
endif
|
||||
ifeq ($(OS_SOURCE),openbsd)
|
||||
UNIXINSTALLDIR=1
|
||||
endif
|
||||
ifeq ($(OS_TARGET),sunos)
|
||||
UNIXINSTALLDIR=1
|
||||
endif
|
||||
ifeq ($(OS_TARGET),qnx)
|
||||
UNIXINSTALLDIR=1
|
||||
endif
|
||||
endif
|
||||
ifndef INSTALL_PREFIX
|
||||
ifdef PREFIX
|
||||
@ -424,6 +439,12 @@ HASSHAREDLIB=1
|
||||
FPCMADE=fpcmade.netbsd
|
||||
ZIPSUFFIX=netbsd
|
||||
endif
|
||||
ifeq ($(OS_TARGET),openbsd)
|
||||
EXEEXT=
|
||||
HASSHAREDLIB=1
|
||||
FPCMADE=fpcmade.openbsd
|
||||
ZIPSUFFIX=openbsd
|
||||
endif
|
||||
ifeq ($(OS_TARGET),win32)
|
||||
PPUEXT=.ppw
|
||||
OEXT=.ow
|
||||
@ -449,7 +470,7 @@ ECHO=echo
|
||||
endif
|
||||
ifeq ($(OS_TARGET),amiga)
|
||||
EXEEXT=
|
||||
PPUEXT=.ppa
|
||||
PPUEXT=.ppu
|
||||
ASMEXT=.asm
|
||||
OEXT=.o
|
||||
SMARTEXT=.sl
|
||||
@ -458,7 +479,7 @@ SHAREDLIBEXT=.library
|
||||
FPCMADE=fpcmade.amg
|
||||
endif
|
||||
ifeq ($(OS_TARGET),atari)
|
||||
PPUEXT=.ppt
|
||||
PPUEXT=.ppu
|
||||
ASMEXT=.s
|
||||
OEXT=.o
|
||||
SMARTEXT=.sl
|
||||
@ -735,6 +756,9 @@ endif
|
||||
ifneq ($(OS_TARGET),$(OS_SOURCE))
|
||||
override FPCOPT+=-T$(OS_TARGET)
|
||||
endif
|
||||
ifeq ($(OS_SOURCE),openbsd)
|
||||
override FPCOPT+=-FD$(NEW_BINUTILS_PATH)
|
||||
endif
|
||||
ifdef UNITDIR
|
||||
override FPCOPT+=$(addprefix -Fu,$(UNITDIR))
|
||||
endif
|
||||
|
@ -2422,9 +2422,13 @@ begin
|
||||
,da_Define));
|
||||
MainDir.AddChild(TDefineTemplate.Create(
|
||||
'Component path addition',
|
||||
Format(ctsAddsDirToSourcePath,['designer, debugger, synedit,codetools']),
|
||||
Format(ctsAddsDirToSourcePath,['designer, jitform, debugger, synedit, codetools']),
|
||||
ExternalMacroStart+'SrcPath',
|
||||
'components'+ds+'synedit;components'+ds+'codetools;designer;debugger;'
|
||||
'designer;'
|
||||
+'designer'+ds+'jitform;'
|
||||
+'debugger;'
|
||||
+'components'+ds+'synedit;'
|
||||
+'components'+ds+'codetools;'
|
||||
+SrcPath
|
||||
,da_Define));
|
||||
MainDir.AddChild(TDefineTemplate.Create('includepath addition',
|
||||
@ -2509,7 +2513,8 @@ begin
|
||||
DirTempl.AddChild(TDefineTemplate.Create('components path addition',
|
||||
Format(ctsAddsDirToSourcePath,['synedit']),
|
||||
ExternalMacroStart+'SrcPath',
|
||||
'..'+ds+'components'+ds+'synedit;'+'..'+ds+'components'+ds+'codetools;'
|
||||
'..'+ds+'components'+ds+'synedit;'+'..'+ds+'components'+ds+'codetools;'
|
||||
+'jitform;'
|
||||
+SrcPath
|
||||
,da_Define));
|
||||
DirTempl.AddChild(TDefineTemplate.Create('includepath addition',
|
||||
|
1497
designer/jitform/Makefile
Normal file
1497
designer/jitform/Makefile
Normal file
File diff suppressed because it is too large
Load Diff
44
designer/jitform/Makefile.fpc
Normal file
44
designer/jitform/Makefile.fpc
Normal file
@ -0,0 +1,44 @@
|
||||
# $Id$
|
||||
#
|
||||
# Makefile.fpc for Lazarus for Free Pascal
|
||||
#
|
||||
|
||||
[package]
|
||||
name=lazarus/jitform
|
||||
version=0.8a
|
||||
|
||||
[compiler]
|
||||
unitdir=../../lcl/units/$(LCL_PLATFORM) ../../lcl/units .
|
||||
unittargetdir=../units
|
||||
options=-gl
|
||||
|
||||
[target]
|
||||
units=jitform
|
||||
|
||||
[clean]
|
||||
files=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))
|
||||
|
||||
[require]
|
||||
packages=fcl
|
||||
|
||||
[default]
|
||||
lcldir=../../lcl
|
||||
|
||||
[prerules]
|
||||
# LCL Platform
|
||||
ifndef LCL_PLATFORM
|
||||
ifeq ($(OS_TARGET),win32)
|
||||
LCL_PLATFORM=win32
|
||||
else
|
||||
LCL_PLATFORM=gtk
|
||||
endif
|
||||
endif
|
||||
export LCL_PLATFORM
|
||||
|
||||
[rules]
|
||||
.PHONY: cleartarget all
|
||||
|
||||
cleartarget:
|
||||
-$(DEL) $(COMPILER_UNITTARGETDIR)/jitform$(PPUEXT)
|
||||
|
||||
all: cleartarget jitform$(PPUEXT)
|
79
designer/jitform/jitform.pas
Normal file
79
designer/jitform/jitform.pas
Normal file
@ -0,0 +1,79 @@
|
||||
{
|
||||
***************************************************************************
|
||||
* *
|
||||
* 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. *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
Author: Mattias Gaertner
|
||||
|
||||
Abstract:
|
||||
TJITForm - just-in-time form.
|
||||
|
||||
This TForm descendent is used by the IDE as a template for creating forms
|
||||
at run time (the designed forms).
|
||||
Because the IDE does wild things with this form, like creating an own class
|
||||
for each TJITForm and dynamically creating methods for it, you can't use
|
||||
some special compiling modes like -pg (gprof) with it.
|
||||
Therefore this unit is kept in a directory of its own.
|
||||
}
|
||||
unit JITForm;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, Forms;
|
||||
|
||||
type
|
||||
// TJITForm is a template TForm descendent class that can be altered at
|
||||
// runtime
|
||||
TJITForm = class (TForm)
|
||||
protected
|
||||
class function NewInstance : TObject; override;
|
||||
public
|
||||
end;
|
||||
|
||||
TJITFormClass = class of TJITForm;
|
||||
|
||||
implementation
|
||||
|
||||
// Define a dummy component to set the csDesigning flag which can not set by a
|
||||
// TForm, because SetDesigning is protected.
|
||||
type
|
||||
TSetDesigningComponent = class(TComponent)
|
||||
public
|
||||
class procedure SetDesigningOfControl(AComponent: TComponent; Value: Boolean);
|
||||
end;
|
||||
|
||||
procedure TSetDesigningComponent.SetDesigningOfControl(
|
||||
AComponent: TComponent; Value: Boolean);
|
||||
begin
|
||||
AComponent.SetDesigning(Value);
|
||||
end;
|
||||
|
||||
{ TJITForm }
|
||||
|
||||
function TJITForm.NewInstance: TObject;
|
||||
begin
|
||||
Result:=inherited NewInstance;
|
||||
TSetDesigningComponent.SetDesigningOfControl(TComponent(Result),true);
|
||||
end;
|
||||
|
||||
|
||||
end.
|
||||
|
@ -45,7 +45,7 @@ uses
|
||||
{$IFDEF IDE_MEM_CHECK}
|
||||
MemCheck,
|
||||
{$ENDIF}
|
||||
Classes, SysUtils, CompReg, Forms, Controls, LCLLinux, Dialogs;
|
||||
Classes, SysUtils, CompReg, Forms, Controls, LCLLinux, Dialogs, JITForm;
|
||||
|
||||
type
|
||||
//----------------------------------------------------------------------------
|
||||
@ -143,46 +143,8 @@ begin
|
||||
Result:=MyFindGlobalComponentProc(AName);
|
||||
end;
|
||||
|
||||
type
|
||||
//----------------------------------------------------------------------------
|
||||
// TJITForm is a template TForm descendent class that can be altered at
|
||||
// runtime
|
||||
TJITForm = class (TForm)
|
||||
protected
|
||||
class function NewInstance : TObject; override;
|
||||
public
|
||||
constructor Create(TheOwner: TComponent); override;
|
||||
end;
|
||||
|
||||
TJITFormClass = class of TJITForm;
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
// Define a dummy component to set the csDesigning flag which can not set by a
|
||||
// TForm, because SetDesigning is protected.
|
||||
type
|
||||
TSetDesigningComponent = class(TComponent)
|
||||
public
|
||||
class procedure SetDesigningOfControl(AComponent: TComponent; Value: Boolean);
|
||||
end;
|
||||
|
||||
procedure TSetDesigningComponent.SetDesigningOfControl(
|
||||
AComponent: TComponent; Value: Boolean);
|
||||
begin
|
||||
AComponent.SetDesigning(Value);
|
||||
end;
|
||||
|
||||
{ TJITForm }
|
||||
|
||||
function TJITForm.NewInstance: TObject;
|
||||
begin
|
||||
Result:=inherited NewInstance;
|
||||
TSetDesigningComponent.SetDesigningOfControl(TComponent(Result),true);
|
||||
end;
|
||||
|
||||
constructor TJITForm.Create(TheOwner: TComponent);
|
||||
begin
|
||||
inherited Create(TheOwner);
|
||||
end;
|
||||
|
||||
{ TJITForms }
|
||||
|
||||
|
1
designer/units/CONTENT.TXT
Normal file
1
designer/units/CONTENT.TXT
Normal file
@ -0,0 +1 @@
|
||||
jitform unit files
|
@ -43,6 +43,7 @@ type
|
||||
|
||||
TBuildLazarusOptions = class
|
||||
private
|
||||
fBuildJITForm: TMakeMode;
|
||||
fBuildLCL: TMakeMode;
|
||||
fBuildComponents: TMakeMode;
|
||||
fBuildSynEdit: TMakeMode;
|
||||
@ -63,6 +64,7 @@ type
|
||||
read fBuildComponents write fBuildComponents;
|
||||
property BuildSynEdit: TMakeMode read fBuildSynEdit write fBuildSynEdit;
|
||||
property BuildCodeTools: TMakeMode read fBuildCodeTools write fBuildCodeTools;
|
||||
property BuildJITForm: TMakeMode read fBuildJITForm write fBuildJITForm;
|
||||
property BuildIDE: TMakeMode read fBuildIDE write fBuildIDE;
|
||||
property BuildExamples: TMakeMode read fBuildExamples write fBuildExamples;
|
||||
property CleanAll: boolean read fCleanAll write fCleanAll;
|
||||
@ -81,6 +83,7 @@ type
|
||||
BuildCodeToolsRadioGroup: TRadioGroup;
|
||||
BuildIDERadioGroup: TRadioGroup;
|
||||
BuildExamplesRadioGroup: TRadioGroup;
|
||||
BuildJITFormCheckBox: TCheckBox;
|
||||
OptionsLabel: TLabel;
|
||||
OptionsEdit: TEdit;
|
||||
LCLInterfaceRadioGroup: TRadioGroup;
|
||||
@ -173,6 +176,35 @@ var
|
||||
Tool.CmdLineParams:='OPT='''+ExtraOpts+''' '+Tool.CmdLineParams;
|
||||
end;
|
||||
|
||||
function CreateJITFormOptions: string;
|
||||
var
|
||||
p, StartPos: integer;
|
||||
begin
|
||||
Result:=Options.ExtraOptions;
|
||||
// delete profiler option
|
||||
p:=Pos('-pg',Result);
|
||||
if (p>0)
|
||||
and ((p+3>length(Result)) or (Result[p+3]=' ')) // option end
|
||||
and ((p=1) or (Result[p-1]=' ')) then begin
|
||||
// profiler option found
|
||||
StartPos:=p;
|
||||
while (StartPos>1) and (Result[StartPos-1]=' ') do
|
||||
dec(StartPos);
|
||||
System.Delete(Result,StartPos,p-StartPos+3);
|
||||
end;
|
||||
end;
|
||||
|
||||
function DoBuildJITForm: TModalResult;
|
||||
begin
|
||||
// build IDE jitform
|
||||
Tool.Title:='Build JITForm';
|
||||
Tool.WorkingDirectory:='$(LazarusDir)/designer/jitform';
|
||||
SetMakeParams(Options.BuildJITForm,CreateJITFormOptions,
|
||||
Options.TargetOS);
|
||||
Result:=ExternalTools.Run(Tool,Macros);
|
||||
if Result<>mrOk then exit;
|
||||
end;
|
||||
|
||||
begin
|
||||
Result:=mrCancel;
|
||||
Tool:=TExternalToolOptions.Create;
|
||||
@ -231,6 +263,10 @@ begin
|
||||
if Result<>mrOk then exit;
|
||||
end;
|
||||
end;
|
||||
if Options.BuildJITForm<>mmNone then begin
|
||||
Result:=DoBuildJITForm;
|
||||
if Result<>mrOk then exit;
|
||||
end;
|
||||
if Options.BuildIDE<>mmNone then begin
|
||||
// build IDE
|
||||
Tool.Title:='Build IDE';
|
||||
@ -438,6 +474,17 @@ begin
|
||||
end;
|
||||
Visible:=true;
|
||||
end;
|
||||
|
||||
BuildJITFormCheckBox:=TCheckBox.Create(Self);
|
||||
with BuildJITFormCheckBox do begin
|
||||
Name:='BuildJITFormCheckBox';
|
||||
Parent:=Self;
|
||||
SetBounds(LCLInterfaceRadioGroup.Left,
|
||||
LCLInterfaceRadioGroup.Top+LCLInterfaceRadioGroup.Height+50,
|
||||
LCLInterfaceRadioGroup.Width,Height);
|
||||
Caption:='Build JITForm';
|
||||
Visible:=true;
|
||||
end;
|
||||
|
||||
OkButton:=TButton.Create(Self);
|
||||
with OkButton do begin
|
||||
@ -471,6 +518,7 @@ begin
|
||||
BuildSynEditRadioGroup.ItemIndex:=0;
|
||||
BuildCodeToolsRadioGroup.ItemIndex:=0;
|
||||
BuildIDERadioGroup.ItemIndex:=1;
|
||||
BuildJITFormCheckBox.Checked:=true;
|
||||
BuildExamplesRadioGroup.ItemIndex:=1;
|
||||
OptionsEdit.Text:='';
|
||||
end;
|
||||
@ -526,6 +574,11 @@ begin
|
||||
Top:=BuildLCLRadioGroup.Top;
|
||||
Width:=Parent.ClientWidth-Left-10;
|
||||
end;
|
||||
with BuildJITFormCheckBox do
|
||||
BuildJITFormCheckBox.SetBounds(LCLInterfaceRadioGroup.Left,
|
||||
LCLInterfaceRadioGroup.Top+LCLInterfaceRadioGroup.Height+50,
|
||||
LCLInterfaceRadioGroup.Width,Height);
|
||||
|
||||
OkButton.SetBounds(Self.ClientWidth-180,Self.ClientHeight-38,80,25);
|
||||
CancelButton.SetBounds(Self.ClientWidth-90,OkButton.Top,
|
||||
OkButton.Width,OkButton.Height);
|
||||
@ -552,6 +605,7 @@ begin
|
||||
BuildExamplesRadioGroup.ItemIndex:=MakeModeToInt(Options.BuildExamples);
|
||||
OptionsEdit.Text:=Options.ExtraOptions;
|
||||
LCLInterfaceRadioGroup.ItemIndex:=ord(Options.LCLPlatform);
|
||||
BuildJITFormCheckBox.Checked:=Options.BuildJITForm in [mmBuild, mmCleanBuild];
|
||||
TargetOSEdit.Text:=Options.TargetOS;
|
||||
end;
|
||||
|
||||
@ -567,6 +621,10 @@ begin
|
||||
Options.BuildExamples:=IntToMakeMode(BuildExamplesRadioGroup.ItemIndex);
|
||||
Options.ExtraOptions:=OptionsEdit.Text;
|
||||
Options.LCLPlatform:=TLCLPlatform(LCLInterfaceRadioGroup.ItemIndex);
|
||||
if BuildJITFormCheckBox.Checked then
|
||||
Options.BuildJITForm:=mmBuild
|
||||
else
|
||||
Options.BuildJITForm:=mmNone;
|
||||
Options.TargetOS:=TargetOSEdit.Text;
|
||||
end;
|
||||
|
||||
@ -596,6 +654,7 @@ begin
|
||||
XMLConfig.SetValue(Path+'BuildComponents/Value',MakeModeNames[fBuildComponents]);
|
||||
XMLConfig.SetValue(Path+'BuildSynEdit/Value',MakeModeNames[fBuildSynEdit]);
|
||||
XMLConfig.SetValue(Path+'BuildCodeTools/Value',MakeModeNames[fBuildCodeTools]);
|
||||
XMLConfig.SetValue(Path+'BuildJITForm/Value',MakeModeNames[fBuildJITForm]);
|
||||
XMLConfig.SetValue(Path+'BuildIDE/Value',MakeModeNames[fBuildIDE]);
|
||||
XMLConfig.SetValue(Path+'BuildExamples/Value',MakeModeNames[fBuildExamples]);
|
||||
XMLConfig.SetValue(Path+'CleanAll/Value',fCleanAll);
|
||||
@ -615,6 +674,8 @@ begin
|
||||
MakeModeNames[fBuildSynEdit]));
|
||||
fBuildCodeTools:=StrToMakeMode(XMLConfig.GetValue(Path+'BuildCodeTools/Value',
|
||||
MakeModeNames[fBuildCodeTools]));
|
||||
fBuildJITForm:=StrToMakeMode(XMLConfig.GetValue(Path+'BuildJITForm/Value',
|
||||
MakeModeNames[fBuildJITForm]));
|
||||
fBuildIDE:=StrToMakeMode(XMLConfig.GetValue(Path+'BuildIDE/Value',
|
||||
MakeModeNames[fBuildIDE]));
|
||||
fBuildExamples:=StrToMakeMode(XMLConfig.GetValue(Path+'BuildExamples/Value',
|
||||
|
Loading…
Reference in New Issue
Block a user