* Updated README with copy of Tom Verhoeff

* Added additional key
  ProjectFile=
  Any file whose name (no extension) matches this, will be renamed to __PROJNAME__
* Improved variables dialog: when there is no message, the grid
  is disabled, and the message adapted accordingly

git-svn-id: trunk@16196 -
This commit is contained in:
michael 2008-08-23 11:05:01 +00:00
parent 88e3f9b965
commit 7c20c96113
9 changed files with 300 additions and 129 deletions

View File

@ -1,8 +1,8 @@
#
# Don't edit, this file is generated by FPCMake Version 2.0.0 [2008/07/29]
# Don't edit, this file is generated by FPCMake Version 2.0.0 [2008/06/18]
#
default: all
MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-netbsd i386-solaris i386-qnx i386-netware i386-openbsd i386-wdosx i386-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-darwin x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded
MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-haiku i386-netbsd i386-solaris i386-qnx i386-netware i386-openbsd i386-wdosx i386-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-darwin x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-darwin arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded avr-embedded armeb-linux armeb-embedded
BSDs = freebsd netbsd openbsd darwin
UNIXs = linux $(BSDs) solaris qnx
LIMIT83fs = go32v2 os2 emx watcom
@ -166,6 +166,17 @@ OS_TARGET:=$(word 5,$(FPC_COMPILERINFO))
endif
FULL_TARGET=$(CPU_TARGET)-$(OS_TARGET)
FULL_SOURCE=$(CPU_SOURCE)-$(OS_SOURCE)
ifeq ($(CPU_TARGET),armeb)
ARCH=arm
override FPCOPT+=-Cb
else
ifeq ($(CPU_TARGET),armel)
ARCH=arm
override FPCOPT+=-CaEABI
else
ARCH=$(CPU_TARGET)
endif
endif
ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
TARGETSUFFIX=$(OS_TARGET)
SOURCESUFFIX=$(OS_SOURCE)
@ -187,7 +198,7 @@ endif
ifeq ($(OS_TARGET),linux)
linuxHier=1
endif
export OS_TARGET OS_SOURCE CPU_TARGET CPU_SOURCE FULL_TARGET FULL_SOURCE TARGETSUFFIX SOURCESUFFIX CROSSCOMPILE
export OS_TARGET OS_SOURCE ARCH CPU_TARGET CPU_SOURCE FULL_TARGET FULL_SOURCE TARGETSUFFIX SOURCESUFFIX CROSSCOMPILE
ifdef FPCDIR
override FPCDIR:=$(subst \,/,$(FPCDIR))
ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
@ -282,6 +293,9 @@ endif
ifeq ($(FULL_TARGET),i386-beos)
override TARGET_UNITS+=projtemplates.pas
endif
ifeq ($(FULL_TARGET),i386-haiku)
override TARGET_UNITS+=projtemplates.pas
endif
ifeq ($(FULL_TARGET),i386-netbsd)
override TARGET_UNITS+=projtemplates.pas
endif
@ -399,6 +413,9 @@ endif
ifeq ($(FULL_TARGET),arm-palmos)
override TARGET_UNITS+=projtemplates.pas
endif
ifeq ($(FULL_TARGET),arm-darwin)
override TARGET_UNITS+=projtemplates.pas
endif
ifeq ($(FULL_TARGET),arm-wince)
override TARGET_UNITS+=projtemplates.pas
endif
@ -423,6 +440,15 @@ endif
ifeq ($(FULL_TARGET),powerpc64-embedded)
override TARGET_UNITS+=projtemplates.pas
endif
ifeq ($(FULL_TARGET),avr-embedded)
override TARGET_UNITS+=projtemplates.pas
endif
ifeq ($(FULL_TARGET),armeb-linux)
override TARGET_UNITS+=projtemplates.pas
endif
ifeq ($(FULL_TARGET),armeb-embedded)
override TARGET_UNITS+=projtemplates.pas
endif
ifeq ($(FULL_TARGET),i386-linux)
override CLEAN_FILES+=$(wildcard $(COMPILER_UNITTARGETDIR)/*$(OEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(PPUEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(RSTEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*.compiled) $(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))
endif
@ -441,6 +467,9 @@ endif
ifeq ($(FULL_TARGET),i386-beos)
override CLEAN_FILES+=$(wildcard $(COMPILER_UNITTARGETDIR)/*$(OEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(PPUEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(RSTEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*.compiled) $(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))
endif
ifeq ($(FULL_TARGET),i386-haiku)
override CLEAN_FILES+=$(wildcard $(COMPILER_UNITTARGETDIR)/*$(OEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(PPUEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(RSTEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*.compiled) $(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))
endif
ifeq ($(FULL_TARGET),i386-netbsd)
override CLEAN_FILES+=$(wildcard $(COMPILER_UNITTARGETDIR)/*$(OEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(PPUEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(RSTEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*.compiled) $(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))
endif
@ -558,6 +587,9 @@ endif
ifeq ($(FULL_TARGET),arm-palmos)
override CLEAN_FILES+=$(wildcard $(COMPILER_UNITTARGETDIR)/*$(OEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(PPUEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(RSTEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*.compiled) $(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))
endif
ifeq ($(FULL_TARGET),arm-darwin)
override CLEAN_FILES+=$(wildcard $(COMPILER_UNITTARGETDIR)/*$(OEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(PPUEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(RSTEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*.compiled) $(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))
endif
ifeq ($(FULL_TARGET),arm-wince)
override CLEAN_FILES+=$(wildcard $(COMPILER_UNITTARGETDIR)/*$(OEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(PPUEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(RSTEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*.compiled) $(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))
endif
@ -582,164 +614,188 @@ endif
ifeq ($(FULL_TARGET),powerpc64-embedded)
override CLEAN_FILES+=$(wildcard $(COMPILER_UNITTARGETDIR)/*$(OEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(PPUEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(RSTEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*.compiled) $(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))
endif
ifeq ($(FULL_TARGET),avr-embedded)
override CLEAN_FILES+=$(wildcard $(COMPILER_UNITTARGETDIR)/*$(OEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(PPUEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(RSTEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*.compiled) $(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))
endif
ifeq ($(FULL_TARGET),armeb-linux)
override CLEAN_FILES+=$(wildcard $(COMPILER_UNITTARGETDIR)/*$(OEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(PPUEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(RSTEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*.compiled) $(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))
endif
ifeq ($(FULL_TARGET),armeb-embedded)
override CLEAN_FILES+=$(wildcard $(COMPILER_UNITTARGETDIR)/*$(OEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(PPUEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(RSTEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*.compiled) $(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))
endif
ifeq ($(FULL_TARGET),i386-linux)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif
ifeq ($(FULL_TARGET),i386-go32v2)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif
ifeq ($(FULL_TARGET),i386-win32)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif
ifeq ($(FULL_TARGET),i386-os2)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif
ifeq ($(FULL_TARGET),i386-freebsd)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif
ifeq ($(FULL_TARGET),i386-beos)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif
ifeq ($(FULL_TARGET),i386-haiku)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif
ifeq ($(FULL_TARGET),i386-netbsd)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif
ifeq ($(FULL_TARGET),i386-solaris)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif
ifeq ($(FULL_TARGET),i386-qnx)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif
ifeq ($(FULL_TARGET),i386-netware)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif
ifeq ($(FULL_TARGET),i386-openbsd)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif
ifeq ($(FULL_TARGET),i386-wdosx)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif
ifeq ($(FULL_TARGET),i386-darwin)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif
ifeq ($(FULL_TARGET),i386-emx)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif
ifeq ($(FULL_TARGET),i386-watcom)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif
ifeq ($(FULL_TARGET),i386-netwlibc)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif
ifeq ($(FULL_TARGET),i386-wince)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif
ifeq ($(FULL_TARGET),i386-embedded)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif
ifeq ($(FULL_TARGET),i386-symbian)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif
ifeq ($(FULL_TARGET),m68k-linux)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif
ifeq ($(FULL_TARGET),m68k-freebsd)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif
ifeq ($(FULL_TARGET),m68k-netbsd)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif
ifeq ($(FULL_TARGET),m68k-amiga)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif
ifeq ($(FULL_TARGET),m68k-atari)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif
ifeq ($(FULL_TARGET),m68k-openbsd)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif
ifeq ($(FULL_TARGET),m68k-palmos)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif
ifeq ($(FULL_TARGET),m68k-embedded)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif
ifeq ($(FULL_TARGET),powerpc-linux)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif
ifeq ($(FULL_TARGET),powerpc-netbsd)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif
ifeq ($(FULL_TARGET),powerpc-amiga)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif
ifeq ($(FULL_TARGET),powerpc-macos)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif
ifeq ($(FULL_TARGET),powerpc-darwin)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif
ifeq ($(FULL_TARGET),powerpc-morphos)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif
ifeq ($(FULL_TARGET),powerpc-embedded)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif
ifeq ($(FULL_TARGET),sparc-linux)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif
ifeq ($(FULL_TARGET),sparc-netbsd)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif
ifeq ($(FULL_TARGET),sparc-solaris)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif
ifeq ($(FULL_TARGET),sparc-embedded)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif
ifeq ($(FULL_TARGET),x86_64-linux)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif
ifeq ($(FULL_TARGET),x86_64-freebsd)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif
ifeq ($(FULL_TARGET),x86_64-darwin)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif
ifeq ($(FULL_TARGET),x86_64-win64)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif
ifeq ($(FULL_TARGET),x86_64-embedded)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif
ifeq ($(FULL_TARGET),arm-linux)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif
ifeq ($(FULL_TARGET),arm-palmos)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif
ifeq ($(FULL_TARGET),arm-darwin)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif
ifeq ($(FULL_TARGET),arm-wince)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif
ifeq ($(FULL_TARGET),arm-gba)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif
ifeq ($(FULL_TARGET),arm-nds)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif
ifeq ($(FULL_TARGET),arm-embedded)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif
ifeq ($(FULL_TARGET),arm-symbian)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif
ifeq ($(FULL_TARGET),powerpc64-linux)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif
ifeq ($(FULL_TARGET),powerpc64-darwin)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif
ifeq ($(FULL_TARGET),powerpc64-embedded)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif
ifeq ($(FULL_TARGET),avr-embedded)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif
ifeq ($(FULL_TARGET),armeb-linux)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif
ifeq ($(FULL_TARGET),armeb-embedded)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif
ifeq ($(FULL_TARGET),i386-linux)
override COMPILER_INCLUDEDIR+=./
@ -759,6 +815,9 @@ endif
ifeq ($(FULL_TARGET),i386-beos)
override COMPILER_INCLUDEDIR+=./
endif
ifeq ($(FULL_TARGET),i386-haiku)
override COMPILER_INCLUDEDIR+=./
endif
ifeq ($(FULL_TARGET),i386-netbsd)
override COMPILER_INCLUDEDIR+=./
endif
@ -876,6 +935,9 @@ endif
ifeq ($(FULL_TARGET),arm-palmos)
override COMPILER_INCLUDEDIR+=./
endif
ifeq ($(FULL_TARGET),arm-darwin)
override COMPILER_INCLUDEDIR+=./
endif
ifeq ($(FULL_TARGET),arm-wince)
override COMPILER_INCLUDEDIR+=./
endif
@ -900,6 +962,15 @@ endif
ifeq ($(FULL_TARGET),powerpc64-embedded)
override COMPILER_INCLUDEDIR+=./
endif
ifeq ($(FULL_TARGET),avr-embedded)
override COMPILER_INCLUDEDIR+=./
endif
ifeq ($(FULL_TARGET),armeb-linux)
override COMPILER_INCLUDEDIR+=./
endif
ifeq ($(FULL_TARGET),armeb-embedded)
override COMPILER_INCLUDEDIR+=./
endif
ifeq ($(FULL_TARGET),i386-linux)
override COMPILER_UNITDIR+=../../ideintf/units/$(CPU_TARGET)-$(OS_TARGET)/ ../../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/ ../../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM)/ ../../packager/units/$(CPU_TARGET)-$(OS_TARGET)/ ./
endif
@ -918,6 +989,9 @@ endif
ifeq ($(FULL_TARGET),i386-beos)
override COMPILER_UNITDIR+=../../ideintf/units/$(CPU_TARGET)-$(OS_TARGET)/ ../../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/ ../../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM)/ ../../packager/units/$(CPU_TARGET)-$(OS_TARGET)/ ./
endif
ifeq ($(FULL_TARGET),i386-haiku)
override COMPILER_UNITDIR+=../../ideintf/units/$(CPU_TARGET)-$(OS_TARGET)/ ../../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/ ../../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM)/ ../../packager/units/$(CPU_TARGET)-$(OS_TARGET)/ ./
endif
ifeq ($(FULL_TARGET),i386-netbsd)
override COMPILER_UNITDIR+=../../ideintf/units/$(CPU_TARGET)-$(OS_TARGET)/ ../../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/ ../../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM)/ ../../packager/units/$(CPU_TARGET)-$(OS_TARGET)/ ./
endif
@ -1035,6 +1109,9 @@ endif
ifeq ($(FULL_TARGET),arm-palmos)
override COMPILER_UNITDIR+=../../ideintf/units/$(CPU_TARGET)-$(OS_TARGET)/ ../../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/ ../../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM)/ ../../packager/units/$(CPU_TARGET)-$(OS_TARGET)/ ./
endif
ifeq ($(FULL_TARGET),arm-darwin)
override COMPILER_UNITDIR+=../../ideintf/units/$(CPU_TARGET)-$(OS_TARGET)/ ../../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/ ../../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM)/ ../../packager/units/$(CPU_TARGET)-$(OS_TARGET)/ ./
endif
ifeq ($(FULL_TARGET),arm-wince)
override COMPILER_UNITDIR+=../../ideintf/units/$(CPU_TARGET)-$(OS_TARGET)/ ../../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/ ../../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM)/ ../../packager/units/$(CPU_TARGET)-$(OS_TARGET)/ ./
endif
@ -1059,6 +1136,15 @@ endif
ifeq ($(FULL_TARGET),powerpc64-embedded)
override COMPILER_UNITDIR+=../../ideintf/units/$(CPU_TARGET)-$(OS_TARGET)/ ../../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/ ../../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM)/ ../../packager/units/$(CPU_TARGET)-$(OS_TARGET)/ ./
endif
ifeq ($(FULL_TARGET),avr-embedded)
override COMPILER_UNITDIR+=../../ideintf/units/$(CPU_TARGET)-$(OS_TARGET)/ ../../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/ ../../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM)/ ../../packager/units/$(CPU_TARGET)-$(OS_TARGET)/ ./
endif
ifeq ($(FULL_TARGET),armeb-linux)
override COMPILER_UNITDIR+=../../ideintf/units/$(CPU_TARGET)-$(OS_TARGET)/ ../../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/ ../../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM)/ ../../packager/units/$(CPU_TARGET)-$(OS_TARGET)/ ./
endif
ifeq ($(FULL_TARGET),armeb-embedded)
override COMPILER_UNITDIR+=../../ideintf/units/$(CPU_TARGET)-$(OS_TARGET)/ ../../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/ ../../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM)/ ../../packager/units/$(CPU_TARGET)-$(OS_TARGET)/ ./
endif
ifeq ($(FULL_TARGET),i386-linux)
override COMPILER_UNITTARGETDIR+=lib/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM)
endif
@ -1077,6 +1163,9 @@ endif
ifeq ($(FULL_TARGET),i386-beos)
override COMPILER_UNITTARGETDIR+=lib/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM)
endif
ifeq ($(FULL_TARGET),i386-haiku)
override COMPILER_UNITTARGETDIR+=lib/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM)
endif
ifeq ($(FULL_TARGET),i386-netbsd)
override COMPILER_UNITTARGETDIR+=lib/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM)
endif
@ -1194,6 +1283,9 @@ endif
ifeq ($(FULL_TARGET),arm-palmos)
override COMPILER_UNITTARGETDIR+=lib/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM)
endif
ifeq ($(FULL_TARGET),arm-darwin)
override COMPILER_UNITTARGETDIR+=lib/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM)
endif
ifeq ($(FULL_TARGET),arm-wince)
override COMPILER_UNITTARGETDIR+=lib/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM)
endif
@ -1218,6 +1310,15 @@ endif
ifeq ($(FULL_TARGET),powerpc64-embedded)
override COMPILER_UNITTARGETDIR+=lib/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM)
endif
ifeq ($(FULL_TARGET),avr-embedded)
override COMPILER_UNITTARGETDIR+=lib/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM)
endif
ifeq ($(FULL_TARGET),armeb-linux)
override COMPILER_UNITTARGETDIR+=lib/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM)
endif
ifeq ($(FULL_TARGET),armeb-embedded)
override COMPILER_UNITTARGETDIR+=lib/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM)
endif
ifdef REQUIRE_UNITSDIR
override UNITSDIR+=$(REQUIRE_UNITSDIR)
endif
@ -1507,6 +1608,11 @@ BATCHEXT=.sh
EXEEXT=
SHORTSUFFIX=be
endif
ifeq ($(OS_TARGET),haiku)
BATCHEXT=.sh
EXEEXT=
SHORTSUFFIX=hai
endif
ifeq ($(OS_TARGET),solaris)
BATCHEXT=.sh
EXEEXT=
@ -1984,6 +2090,9 @@ endif
ifeq ($(FULL_TARGET),i386-beos)
REQUIRE_PACKAGES_RTL=1
endif
ifeq ($(FULL_TARGET),i386-haiku)
REQUIRE_PACKAGES_RTL=1
endif
ifeq ($(FULL_TARGET),i386-netbsd)
REQUIRE_PACKAGES_RTL=1
endif
@ -2101,6 +2210,9 @@ endif
ifeq ($(FULL_TARGET),arm-palmos)
REQUIRE_PACKAGES_RTL=1
endif
ifeq ($(FULL_TARGET),arm-darwin)
REQUIRE_PACKAGES_RTL=1
endif
ifeq ($(FULL_TARGET),arm-wince)
REQUIRE_PACKAGES_RTL=1
endif
@ -2125,6 +2237,15 @@ endif
ifeq ($(FULL_TARGET),powerpc64-embedded)
REQUIRE_PACKAGES_RTL=1
endif
ifeq ($(FULL_TARGET),avr-embedded)
REQUIRE_PACKAGES_RTL=1
endif
ifeq ($(FULL_TARGET),armeb-linux)
REQUIRE_PACKAGES_RTL=1
endif
ifeq ($(FULL_TARGET),armeb-embedded)
REQUIRE_PACKAGES_RTL=1
endif
ifdef REQUIRE_PACKAGES_RTL
PACKAGEDIR_RTL:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /rtl/Makefile.fpc,$(PACKAGESDIR))))))
ifneq ($(PACKAGEDIR_RTL),)
@ -2152,13 +2273,13 @@ override COMPILER_UNITDIR+=$(UNITDIR_RTL)
endif
endif
ifndef NOCPUDEF
override FPCOPTDEF=$(CPU_TARGET)
override FPCOPTDEF=$(ARCH)
endif
ifneq ($(OS_TARGET),$(OS_SOURCE))
override FPCOPT+=-T$(OS_TARGET)
endif
ifneq ($(CPU_TARGET),$(CPU_SOURCE))
override FPCOPT+=-P$(CPU_TARGET)
override FPCOPT+=-P$(ARCH)
endif
ifeq ($(OS_SOURCE),openbsd)
override FPCOPT+=-FD$(NEW_BINUTILS_PATH)

View File

@ -2,7 +2,7 @@
#
# Makefile.fpc for ProjTemplates 1.0
#
# This file was generated on 20-8-08
# This file was generated on 23/08/08
[package]
name=projtemplates
@ -12,7 +12,7 @@ version=1.0
unittargetdir=lib/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM)
unitdir=../../ideintf/units/$(CPU_TARGET)-$(OS_TARGET)/ ../../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/ ../../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM)/ ../../packager/units/$(CPU_TARGET)-$(OS_TARGET)/ ./
includedir=./
options=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC
options=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
[target]
units=projtemplates.pas

View File

@ -5,15 +5,17 @@ Installing this package in the IDE adds a category to the 'File-New' dialog:
It also adds a 'New project from Template' menu item to the 'File' menu, as
well as a 'project template options' menu under the 'Tools' menu.
This menu item is visible only if the templates directory (see next paragraph)
exists and contains at least one template subdirectory.
In the 'Project template options', a directory can be selected. This project
In the 'Project template options', a directory can be selected. This directory
should contain a subdirectory per template. Each template directory contains
a template for a project: A collection of files which will be copied and
used as a new project.
During the copy, the package will scan the file/directory names and the
contents of the files for variable substitution: $(VARNAME) will be
replaced by the value of a variable $(VARNAME).
contents of the files for variable substitution: __VARNAME__ will be
replaced by the value of a variable VARNAME
By default, the engine knows 2 variables:
ProjDir : The directory where the new project will be created.
@ -34,6 +36,14 @@ The 'project.ini' file can contain a second section, called 'Project', which
can contain some info about the project. The following keywords can be found
there:
ProjectFile
Any file that has a name equal to this (no extension) is treated specially,
it is renamed to the project name. That is
ProjectFile=example
will replace example.lpi example.lpr and example.cfg with the name given
by the user. By default, the value of ProjectFile is assumed to be 'project'.
(note that the .ini file is not copied)
Name
Name of the template
Author
@ -47,4 +57,4 @@ Exclude
Comma separated list of filename extensions which should not be searched
for keyword subsitution.
The Name,Author and description will be presented in the 'File-New' dialog.
The Name and description will be presented in the 'File-New' dialog.

View File

@ -1,14 +1,15 @@
object ProjectVariablesForm: TProjectVariablesForm
Left = 268
Height = 328
Top = 219
Width = 499
HorzScrollBar.Page = 498
VertScrollBar.Page = 327
Left = 505
Height = 326
Top = 306
Width = 573
ActiveControl = BOK
Caption = 'New project from template'
ClientHeight = 326
ClientWidth = 573
OnShow = ProjectVariablesFormShow
Position = poScreenCenter
LCLVersion = '0.9.25'
object Label1: TLabel
Left = 8
Height = 23
@ -17,7 +18,6 @@ object ProjectVariablesForm: TProjectVariablesForm
Alignment = taRightJustify
AutoSize = False
Caption = '&Name for new project:'
Color = clNone
Layout = tlCenter
ParentColor = False
end
@ -29,7 +29,6 @@ object ProjectVariablesForm: TProjectVariablesForm
Alignment = taRightJustify
AutoSize = False
Caption = 'Create in &directory:'
Color = clNone
Layout = tlCenter
ParentColor = False
end
@ -37,7 +36,7 @@ object ProjectVariablesForm: TProjectVariablesForm
Left = 8
Height = 58
Top = 80
Width = 485
Width = 559
Anchors = [akTop, akLeft, akRight]
BevelInner = bvRaised
BevelOuter = bvLowered
@ -47,24 +46,23 @@ object ProjectVariablesForm: TProjectVariablesForm
end
object SGVariables: TStringGrid
Left = 10
Height = 140
Height = 138
Top = 144
Width = 483
Width = 557
Anchors = [akTop, akLeft, akRight, akBottom]
AutoFillColumns = True
ColCount = 3
DefaultColWidth = 120
ExtendedSelect = True
FixedColor = clBtnFace
Options = [goFixedVertLine, goFixedHorzLine, goVertLine, goHorzLine, goRangeSelect, goColSizing, goEditing, goAlwaysShowEditor, goDblClickAutoSize, goSmoothScroll]
RowCount = 5
ScrollBars = ssAutoBoth
TabOrder = 5
TabStop = True
end
object BOK: TButton
Left = 411
Left = 485
Height = 25
Top = 292
Top = 290
Width = 75
Anchors = [akRight, akBottom]
BorderSpacing.InnerBorder = 4
@ -75,9 +73,9 @@ object ProjectVariablesForm: TProjectVariablesForm
TabOrder = 1
end
object BCancel: TButton
Left = 323
Left = 397
Height = 25
Top = 292
Top = 290
Width = 75
Anchors = [akRight, akBottom]
BorderSpacing.InnerBorder = 4
@ -90,7 +88,7 @@ object ProjectVariablesForm: TProjectVariablesForm
Left = 152
Height = 23
Top = 16
Width = 237
Width = 311
Anchors = [akTop, akLeft, akRight]
TabOrder = 3
end
@ -98,7 +96,7 @@ object ProjectVariablesForm: TProjectVariablesForm
Left = 152
Height = 23
Top = 48
Width = 317
Width = 391
ButtonWidth = 23
NumGlyphs = 1
Anchors = [akTop, akLeft, akRight]

View File

@ -1,35 +1,37 @@
{ This is an automatically generated lazarus resource file }
LazarusResources.Add('TProjectVariablesForm','FORMDATA',[
'TPF0'#21'TProjectVariablesForm'#20'ProjectVariablesForm'#4'Left'#3#12#1#6'He'
+'ight'#3'H'#1#3'Top'#3#219#0#5'Width'#3#243#1#18'HorzScrollBar.Page'#3#242#1
+#18'VertScrollBar.Page'#3'G'#1#13'ActiveControl'#7#3'BOK'#7'Caption'#6#25'Ne'
+'w project from template'#6'OnShow'#7#24'ProjectVariablesFormShow'#8'Positio'
+'n'#7#14'poScreenCenter'#0#6'TLabel'#6'Label1'#4'Left'#2#8#6'Height'#2#23#3
+'Top'#2#16#5'Width'#3#131#0#9'Alignment'#7#14'taRightJustify'#8'AutoSize'#8#7
+'Caption'#6#22'&Name for new project:'#5'Color'#7#6'clNone'#6'Layout'#7#8'tl'
+'Center'#11'ParentColor'#8#0#0#6'TLabel'#6'Label2'#4'Left'#2#8#6'Height'#2#22
+#3'Top'#2'0'#5'Width'#3#131#0#9'Alignment'#7#14'taRightJustify'#8'AutoSize'#8
+#7'Caption'#6#21'Create in &directory:'#5'Color'#7#6'clNone'#6'Layout'#7#8't'
+'lCenter'#11'ParentColor'#8#0#0#6'TPanel'#12'PDescription'#4'Left'#2#8#6'Hei'
+'ght'#2':'#3'Top'#2'P'#5'Width'#3#229#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'a'
+'kRight'#0#10'BevelInner'#7#8'bvRaised'#10'BevelOuter'#7#9'bvLowered'#7'Capt'
+'ion'#6'ZThis project contains some additional variables. Please provide val'
+'ues for these variables'#11'FullRepaint'#8#8'TabOrder'#2#0#0#0#11'TStringGr'
+'id'#11'SGVariables'#4'Left'#2#10#6'Height'#3#140#0#3'Top'#3#144#0#5'Width'#3
+#227#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#8'akBottom'#0#15'AutoFill'
+'Columns'#9#8'ColCount'#2#3#15'DefaultColWidth'#2'x'#10'FixedColor'#7#9'clBt'
+'nFace'#7'Options'#11#15'goFixedVertLine'#15'goFixedHorzLine'#10'goVertLine'
+#10'goHorzLine'#13'goRangeSelect'#11'goColSizing'#9'goEditing'#18'goAlwaysSh'
+'owEditor'#18'goDblClickAutoSize'#14'goSmoothScroll'#0#8'RowCount'#2#5#10'Sc'
+'rollBars'#7#10'ssAutoBoth'#8'TabOrder'#2#5#7'TabStop'#9#0#0#7'TButton'#3'BO'
+'K'#4'Left'#3#155#1#6'Height'#2#25#3'Top'#3'$'#1#5'Width'#2'K'#7'Anchors'#11
+#7'akRight'#8'akBottom'#0#25'BorderSpacing.InnerBorder'#2#4#7'Caption'#6#3'&'
+'OK'#7'Default'#9#11'ModalResult'#2#1#7'OnClick'#7#8'BOKClick'#8'TabOrder'#2
+#1#0#0#7'TButton'#7'BCancel'#4'Left'#3'C'#1#6'Height'#2#25#3'Top'#3'$'#1#5'W'
+'idth'#2'K'#7'Anchors'#11#7'akRight'#8'akBottom'#0#25'BorderSpacing.InnerBor'
+'der'#2#4#6'Cancel'#9#7'Caption'#6#7'&Cancel'#11'ModalResult'#2#2#8'TabOrder'
+#2#2#0#0#5'TEdit'#12'EProjectName'#4'Left'#3#152#0#6'Height'#2#23#3'Top'#2#16
+#5'Width'#3#237#0#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#8'TabOrder'#2
+#3#0#0#14'TDirectoryEdit'#9'DEProject'#4'Left'#3#152#0#6'Height'#2#23#3'Top'
+#2'0'#5'Width'#3'='#1#11'ButtonWidth'#2#23#9'NumGlyphs'#2#1#7'Anchors'#11#5
+'akTop'#6'akLeft'#7'akRight'#0#11'ParentColor'#8#8'TabOrder'#2#4#0#0#0
'TPF0'#21'TProjectVariablesForm'#20'ProjectVariablesForm'#4'Left'#3#249#1#6'H'
+'eight'#3'F'#1#3'Top'#3'2'#1#5'Width'#3'='#2#13'ActiveControl'#7#3'BOK'#7'Ca'
+'ption'#6#25'New project from template'#12'ClientHeight'#3'F'#1#11'ClientWid'
+'th'#3'='#2#6'OnShow'#7#24'ProjectVariablesFormShow'#8'Position'#7#14'poScre'
+'enCenter'#10'LCLVersion'#6#6'0.9.25'#0#6'TLabel'#6'Label1'#4'Left'#2#8#6'He'
+'ight'#2#23#3'Top'#2#16#5'Width'#3#131#0#9'Alignment'#7#14'taRightJustify'#8
+'AutoSize'#8#7'Caption'#6#22'&Name for new project:'#6'Layout'#7#8'tlCenter'
+#11'ParentColor'#8#0#0#6'TLabel'#6'Label2'#4'Left'#2#8#6'Height'#2#22#3'Top'
+#2'0'#5'Width'#3#131#0#9'Alignment'#7#14'taRightJustify'#8'AutoSize'#8#7'Cap'
+'tion'#6#21'Create in &directory:'#6'Layout'#7#8'tlCenter'#11'ParentColor'#8
+#0#0#6'TPanel'#12'PDescription'#4'Left'#2#8#6'Height'#2':'#3'Top'#2'P'#5'Wid'
+'th'#3'/'#2#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#10'BevelInner'#7#8
+'bvRaised'#10'BevelOuter'#7#9'bvLowered'#7'Caption'#6'ZThis project contains'
+' some additional variables. Please provide values for these variables'#11'F'
+'ullRepaint'#8#8'TabOrder'#2#0#0#0#11'TStringGrid'#11'SGVariables'#4'Left'#2
+#10#6'Height'#3#138#0#3'Top'#3#144#0#5'Width'#3'-'#2#7'Anchors'#11#5'akTop'#6
+'akLeft'#7'akRight'#8'akBottom'#0#15'AutoFillColumns'#9#8'ColCount'#2#3#15'D'
+'efaultColWidth'#2'x'#14'ExtendedSelect'#9#10'FixedColor'#7#9'clBtnFace'#7'O'
+'ptions'#11#15'goFixedVertLine'#15'goFixedHorzLine'#10'goVertLine'#10'goHorz'
+'Line'#13'goRangeSelect'#11'goColSizing'#9'goEditing'#18'goAlwaysShowEditor'
+#18'goDblClickAutoSize'#14'goSmoothScroll'#0#8'RowCount'#2#5#8'TabOrder'#2#5
+#0#0#7'TButton'#3'BOK'#4'Left'#3#229#1#6'Height'#2#25#3'Top'#3'"'#1#5'Width'
+#2'K'#7'Anchors'#11#7'akRight'#8'akBottom'#0#25'BorderSpacing.InnerBorder'#2
+#4#7'Caption'#6#3'&OK'#7'Default'#9#11'ModalResult'#2#1#7'OnClick'#7#8'BOKCl'
+'ick'#8'TabOrder'#2#1#0#0#7'TButton'#7'BCancel'#4'Left'#3#141#1#6'Height'#2
+#25#3'Top'#3'"'#1#5'Width'#2'K'#7'Anchors'#11#7'akRight'#8'akBottom'#0#25'Bo'
+'rderSpacing.InnerBorder'#2#4#6'Cancel'#9#7'Caption'#6#7'&Cancel'#11'ModalRe'
+'sult'#2#2#8'TabOrder'#2#2#0#0#5'TEdit'#12'EProjectName'#4'Left'#3#152#0#6'H'
+'eight'#2#23#3'Top'#2#16#5'Width'#3'7'#1#7'Anchors'#11#5'akTop'#6'akLeft'#7
+'akRight'#0#8'TabOrder'#2#3#0#0#14'TDirectoryEdit'#9'DEProject'#4'Left'#3#152
+#0#6'Height'#2#23#3'Top'#2'0'#5'Width'#3#135#1#11'ButtonWidth'#2#23#9'NumGly'
+'phs'#2#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#11'ParentColor'#8#8
+'TabOrder'#2#4#0#0#0
]);

View File

@ -49,6 +49,7 @@ ResourceString
SVariable = 'Variable';
SValue = 'Value';
SDescription = 'Description';
SNoAdditionalVars = 'This project has no additional variables.';
{ TProjectVariablesForm }
@ -86,15 +87,23 @@ Var
begin
FVariables:=AValue;
SGVariables.RowCount:=FVariables.Count+1;
For I:=1 to FVariables.Count do
If (FVariables.Count=0) then
begin
V:='';
N:='';
FVariables.GetNameValue(I-1,N,V);
SGVariables.Cells[0,I]:=N;
SGVariables.Cells[1,I]:='';
SGVariables.Cells[2,I]:=V;
SGVariables.Enabled:=False;
PDescription.Caption:=SNoAdditionalVars;
end
else
begin
SGVariables.RowCount:=FVariables.Count+1;
For I:=1 to FVariables.Count do
begin
V:='';
N:='';
FVariables.GetNameValue(I-1,N,V);
SGVariables.Cells[0,I]:=N;
SGVariables.Cells[1,I]:='';
SGVariables.Cells[2,I]:=V;
end;
end;
end;

View File

@ -297,6 +297,7 @@ begin
If B then
begin
FN:=FProjectDirectory+FTemplate.TargetFileName(FN,FVariables);
Writeln('Project file',FN);
AFile:=AProject.CreateProjectFile(FN);
AFile.IsPartOfProject:=true;
AProject.AddFile(AFile,Not B);

View File

@ -8,6 +8,10 @@ msgstr ""
msgid "Description"
msgstr ""
#: frmtemplatevariables.snoadditionalvars
msgid "This project has no additional variables."
msgstr ""
#: frmtemplatevariables.svalue
msgid "Value"
msgstr ""

View File

@ -17,14 +17,17 @@ type
FDirectory: String;
FExclude: String;
FName: String;
FProjectFile: String;
FRecurse: Boolean;
FFiles : TStrings;
FVariables: TStrings;
function DefaultFileSubstitutes(AFileName: String): string;
function GetFileCount: Integer;
function GetFileName(FileIndex : Integer): String;
procedure SetVariables(const AValue: TStrings);
procedure GetFileList(Const Dir : String);
Protected
Function SpecialFile(Const AName : String) : Boolean;
procedure InitFromDir(Const DirName : String);
procedure CopyAndSubstituteDir(Const SrcDir,DestDir : String; Values : TStrings);
procedure CopyAndSubstituteFile(Const SrcFN,DestFN : String; Values : Tstrings);
@ -44,6 +47,7 @@ type
Property Directory : String Read FDirectory;
Property Description : String Read FDescription Write FDescription;
Property Variables : TStrings Read FVariables Write SetVariables;
Property ProjectFile : String Read FProjectFile;
Property Author : String Read FAuthor;
Property Recurse : Boolean Read FRecurse;
Property Exclude : String Read FExclude;
@ -83,7 +87,8 @@ Const
KeyDescription = 'Description';
KeyRecurse = 'Recurse';
KeyExclude = 'Exclude';
varprefixstr = '__'; // subtitution pattern is "__varname__"
KeyProjectFile = 'ProjectFile';
varprefixstr = '__'; // subtitution pattern is "__varname__"
varpostfixstr = '__';
@ -238,6 +243,7 @@ begin
inherited Create(ACollection);
FVariables:=TStringList.Create;
FFiles:=TStringList.Create;
FProjectFile:='project' // Do not localize
end;
@ -280,6 +286,7 @@ begin
begin
With TMemInifile.Create(FN) do
try
FProjectFile:=ReadString(SProject,KeyProjectFile,FProjectFile);
FName:=ReadString(SProject,KeyName,DirName);
FAuthor:=ReadString(SProject,KeyAuthor,'');
FDescription:=ReadString(SProject,KeyDescription,'');
@ -350,10 +357,19 @@ begin
end;
end;
function TProjectTemplate.DefaultFileSubstitutes(AFileName : String) : string;
begin
Result:=AFileName;
If SameFileName(ChangeFileExt(ExtractFileName(Result),''),ProjectFile) then
Result:=ExtractFilePath(Result)+VarPrefixStr+'ProjName'+varpostfixstr+ExtractFileExt(Result);
end;
function TProjectTemplate.TargetFileName(FN: String; Values: TStrings): String;
begin
Result:=ExtractRelativePath(Directory,FN);
Result:=DefaultFileSubstitutes(Result);
Result:=SubstituteString(Result,Values);
end;
@ -394,7 +410,7 @@ begin
If FindFirst(Dir+AllFilesMask,0,Info)=0 then
try
repeat
if (info.name<>'description.txt') and (info.name<>'project.ini') then
if Not SpecialFile(info.name) then
FFiles.Add(Dir+Info.Name);
Until (FindNext(Info)<>0);
finally
@ -413,12 +429,18 @@ begin
end;
end;
function TProjectTemplate.SpecialFile(const AName: String): Boolean;
begin
Result:=SameFileName(AName,'description.txt') or SameFileName(AName,'project.ini');
end;
procedure TProjectTemplate.CopyAndSubstituteDir(Const SrcDir,DestDir : String; Values: Tstrings);
Var
D1,D2 : String;
Info : TSearchRec;
N : String;
begin
D1:=IncludeTrailingPathDelimiter(SrcDir);
@ -428,9 +450,13 @@ begin
If FindFirst(D1+AllFilesMask,0,Info)=0 then
try
repeat
if (info.name<>'description.txt')
and (info.name<>'project.ini') then
CopyAndSubstituteFile(D1+Info.Name,D2+SubstituteString(Info.Name,Values),Values);
N:=Info.Name;
if Not SpecialFile(N) then
begin
// Anything that has projectfile as a name, is also substituted
N:=DefaultFileSubstitutes(N);
CopyAndSubstituteFile(D1+Info.Name,D2+SubstituteString(N,Values),Values);
end;
Until (FindNext(Info)<>0);
finally
FindClose(Info);