"
COPYRIGHT (c) 2006 by eXept Software AG
All Rights Reserved
This software is furnished under a license and may be used
only in accordance with the terms of that license and with the
inclusion of the above copyright notice. This software may not
be provided or otherwise made available to, or used by, any
other person. No title to or ownership of the software is
hereby transferred.
"
"{ Package: 'stx:libbasic' }"
ProjectDefinition subclass:#ApplicationDefinition
instanceVariableNames:''
classVariableNames:''
poolDictionaries:''
category:'System-Support-Projects'
!
!ApplicationDefinition class methodsFor:'documentation'!
copyright
"
COPYRIGHT (c) 2006 by eXept Software AG
All Rights Reserved
This software is furnished under a license and may be used
only in accordance with the terms of that license and with the
inclusion of the above copyright notice. This software may not
be provided or otherwise made available to, or used by, any
other person. No title to or ownership of the software is
hereby transferred.
"
!
documentation
"
subclasses provide the info on how to build executables and class libraries.
Actually, subclasses must be subclasses of either LibraryDefinition or
ApplicationDefinition.
These know how to generate all required help files for make-building.
Concrete definition classes must redefine:
classNamesAndAttributes
list of classes which are part of the dll/exe
extensionMethodNames
list of extension methods
startupClassName / startupSelector
class and selector with which the show starts
buildTarget name of the generated exe-file
should redefine:
preRequisites list of required packages
iconFileName name of a .ico file containing the applications icon
companyName name of your company - will be shown by windows explorer
as attribute of a .dll or .exe
description short description; shown by windows explorer
legalCopyright copyright message; shown by windows explorer
productName product name; shown by windows explorer
applicationName app name; shown by windows explorer
might redefine:
isConsoleApplication if true, windows-build generates a console app.
isGUIApplication if true, the GUI framework is linked in
(as opposed to a non-GUI server-like executable)
The above info might be outdated a bit - see stx_projects_smalltalk as a concrete example.
[author:]
Felix Madrid
Claus Gittinger
[see also:]
stx_projects_smalltalk
stx_libbasic
stx_libbasic2
"
! !
!ApplicationDefinition class methodsFor:'accessing'!
allPreRequisites
|setOfAllPreRequisites allPreRequisites toAdd|
setOfAllPreRequisites := Set new.
allPreRequisites := OrderedCollection new.
toAdd := OrderedCollection new.
toAdd addAll:(self preRequisites).
toAdd addAll:(self subProjects ).
[toAdd notEmpty] whileTrue:[
|aPreRequisiteProjectID def|
aPreRequisiteProjectID := toAdd removeFirst.
(setOfAllPreRequisites includes:aPreRequisiteProjectID) ifFalse:[
allPreRequisites add:aPreRequisiteProjectID.
setOfAllPreRequisites add:aPreRequisiteProjectID.
def := ProjectDefinition definitionClassForPackage:aPreRequisiteProjectID.
def isNil ifTrue:[
Transcript showCR:'ProjectDefinition ',aPreRequisiteProjectID,' is missing - cannot find its preRequisites.'.
] ifFalse:[
def preRequisites
select:[:eachSubPreRequisite | (setOfAllPreRequisites includes:eachSubPreRequisite) not]
thenDo:[:eachSubPreRequisite | toAdd add:eachSubPreRequisite ].
def subProjects
select:[:eachSubPreRequisite | (setOfAllPreRequisites includes:eachSubPreRequisite) not]
thenDo:[:eachSubPreRequisite | toAdd add:eachSubPreRequisite ].
].
]
].
^ allPreRequisites.
"
exept_expeccoNET_application allPreRequisites
"
! !
!ApplicationDefinition class methodsFor:'code generation'!
forEachMethodsCodeToCompileDo:aTwoArgBlock ignoreOldDefinition:ignoreOldDefinition
super forEachMethodsCodeToCompileDo:aTwoArgBlock ignoreOldDefinition:ignoreOldDefinition.
aTwoArgBlock
value:self subProjects_code
value:'description'.
aTwoArgBlock
value:self preRequisites_code
value:'description'.
(self class implements:#startupClassName) ifFalse:[
aTwoArgBlock
value:self startupClassName_code
value:'description - startup'.
].
(self class implements:#startupSelector) ifFalse:[
aTwoArgBlock
value:self startupSelector_code
value:'description - startup'.
].
"Created: / 10-08-2006 / 16:35:47 / cg"
"Modified: / 30-08-2006 / 19:03:48 / cg"
!
startupClassName_code
|classes startClasses mainClasses appClasses cls|
classes := self classNamesAndAttributes
collect:[:nm | Smalltalk classNamed:nm]
thenSelect:[:cls | cls notNil and:[cls isProjectDefinition not ]].
mainClasses := classes select:[:each | each theMetaclass implements:#main ].
mainClasses size == 1 ifTrue:[
^ self startupClassName_codeFor:(mainClasses first name)
].
mainClasses isEmpty ifTrue:[
startClasses := classes select:[:each | each theMetaclass implements:#start ].
startClasses size == 1 ifTrue:[
^ self startupClassName_codeFor:(startClasses first name)
].
startClasses isEmpty ifTrue:[
appClasses := classes select:[:each | each isSubclassOf:ApplicationModel ].
appClasses size == 1 ifTrue:[
^ self startupClassName_codeFor:(appClasses first name)
].
]
].
^
'startupClassName
self error:''undefined startupClass''.
^ ''<name of class here>''
'
"Modified: / 27-12-2006 / 11:43:34 / cg"
!
startupClassName_codeFor:aClassName
^
'startupClassName
^ ''',aClassName,'''
'
"Created: / 05-09-2006 / 13:40:32 / cg"
!
startupSelector_code
|clsName cls sel|
Error
handle:[:ex | ]
do:[
clsName := self startupClassName.
cls := Smalltalk classNamed:clsName.
].
sel := #'start'.
cls notNil ifTrue:[
(cls respondsTo:#open) ifTrue:[
sel := #'open'
] ifFalse:[
(cls respondsTo:#main) ifTrue:[
sel := #'main'
]
].
].
^ self startupSelector_codeFor:sel
"Modified: / 27-12-2006 / 11:45:38 / cg"
!
startupSelector_codeFor:aSelector
^
'startupSelector
^ #''',aSelector,'''
'
"Created: / 05-09-2006 / 13:41:01 / cg"
"Modified: / 15-12-2006 / 14:10:11 / cg"
!
subProjects_code
|subProjects|
subProjects :=
(self siblingsAreSubProjects)
ifTrue:[ self searchForSiblingProjects ]
ifFalse:[ self searchForSubProjects ].
subProjects removeAll: self excludedFromSubProjects.
^ String streamContents:[:s |
s nextPutLine:'subProjects'.
s nextPutLine:' ^ #('.
subProjects do:[:eachPackageID |
s nextPutLine:eachPackageID asString storeString
].
s nextPutLine:')'
].
"
bosch_dapasx subProjectsGeneratedString
stx_goodies subProjectsGeneratedString
"
"Modified: / 08-08-2006 / 19:24:34 / fm"
"Created: / 17-08-2006 / 21:26:51 / cg"
! !
!ApplicationDefinition class methodsFor:'defaults'!
buildTarget
"which target in the Makefile should be built by default?
For now, reasonable return values are 'exe', which builds the executable(s),
and 'ALL', which builds everything, including an installable package.
Here, 'ALL' is returned.
There is usually no need to redefine this default - we at exept do it for the
stx package only to speed up our own build, as we seldom need new install packages,
put often build new executables..."
^ 'ALL'
!
guiClassFileNames_unix
^ self guiClasses_unix
collect:[:cls | (cls classBaseFilename asFilename withSuffix:'so') baseName].
"Created: / 14-09-2006 / 18:13:22 / cg"
"Modified: / 12-10-2006 / 15:50:39 / cg"
!
guiClassFileNames_win32
^ self guiClasses_win32
collect:[:cls | (cls classBaseFilename asFilename withSuffix:'dll') baseName].
"Created: / 07-09-2006 / 17:23:13 / cg"
"Modified: / 12-10-2006 / 15:50:42 / cg"
!
guiClasses_unix
^ #()
"Created: / 14-09-2006 / 18:12:58 / cg"
!
guiClasses_win32
^ #()
"/ ^ Array with:XWorkstation
"Created: / 07-09-2006 / 17:22:27 / cg"
"Modified: / 14-09-2006 / 18:12:35 / cg"
!
needResources
"answer true, if this application
needs resources to be installed. This is normally true.
Even non-GUI apps need some (libbasic/resources)"
^ true
! !
!ApplicationDefinition class methodsFor:'description'!
additionalFilesToInstall
"application-specific files to be installed.
Can be redefined in subclasses."
^ #()
"Created: / 01-03-2007 / 20:02:21 / cg"
!
applicationIconFileName
"answer the base-name of the application icon (i.e. 'app' in <app>.ico)
Subclasses may redefine this"
^ self applicationName
!
applicationName
"answer the name of the application.
This is also the name of the generated .exe file.
Subclasses may redefine this"
^ self applicationNameFromPackage
"
bosch_dapasx_application applicationName
stx_projects_smalltalk applicationName
"
"Created: / 08-08-2006 / 20:25:39 / fm"
"Modified: / 30-08-2006 / 19:29:25 / cg"
!
applicationNameConsole
^ self applicationName,'_debug'
!
applicationNameFromPackage
"answer the name of the application.
This is also the name of the generated .exe file.
Subclasses may redefine this"
|m path|
m := self moduleDirectory.
path := m subStrings:$/.
path last = 'application' ifTrue:[
path size > 1 ifTrue:[
path := path copyWithoutLast:1.
].
].
^ path last
"
bosch_dapasx_application applicationName
stx_projects_smalltalk applicationName
"
"Created: / 08-08-2006 / 20:25:39 / fm"
"Modified: / 30-08-2006 / 19:29:25 / cg"
!
applicationNameNoConsole
^ self applicationName
!
commonFilesToInstall
"files installed for applications.
Do not redefine - see additionalFilesToInstall for a redefinable variant of this"
^ #(
'"*.dll"'
'"symbols.stc"'
'"modules.stx"'
'"keyboard.rc"'
'/r "resources"'
)
"Created: / 01-03-2007 / 20:05:40 / cg"
!
documentExtensions
"list extensions which should be registered with the application.
Results in the application to be started when double-clicking on such a file (win32)"
^ #()
"Created: / 15-10-2006 / 12:44:14 / cg"
!
isConsoleApplication
"Return true, if this is a console application (used with win32 only).
Console applications have stdout and stderr and open up a command-window
when started. Only console applications can interact with the user in the
command line window.
By default, GUI apps are compiled as non-console apps."
^ self isGUIApplication not
"Created: / 20-09-2006 / 11:29:24 / cg"
!
isGUIApplication
"Return true, if this is a GUI app.
Redefine to return false for non-GUI applications (affects inclusion of Display classes)."
^true
"Created: / 08-08-2006 / 11:15:01 / fm"
"Modified: / 17-08-2006 / 19:47:36 / cg"
!
isSingleThreadedApplication
"Return true, if this should be started without multiple threads.
(not possible with gui applications)"
^false
"Created: / 05-09-2006 / 13:36:18 / cg"
!
logFilenameNoConsole
"/ ^ (self applicationNameNoConsole , '_%d.log')
^ (self applicationNameNoConsole , '.log')
!
startupClassName
"The name of the class which provides the entry point for the application."
self subclassResponsibility
"Modified: / 17-08-2006 / 20:00:22 / cg"
!
startupSelector
"The name of the entry point method (in startUpClass) used to start the application."
^ #start
"Modified: / 17-08-2006 / 20:01:00 / cg"
! !
!ApplicationDefinition class methodsFor:'description - project information'!
description
"Returns a description string which will appear in nt.def / bc.def"
self module = 'stx' ifTrue:[
^ 'Smalltalk/X Application'
].
^ 'Application'
"Created: / 17-08-2006 / 20:52:48 / cg"
"Modified: / 18-08-2006 / 16:16:01 / cg"
!
docDirPath_unix
"path relative to my dir to the documentation - or nil"
^ nil
"Created: / 20-09-2006 / 17:58:44 / cg"
!
docDirPath_win32
"path relative to my dir to the documentation - or nil"
^ nil
"Created: / 20-09-2006 / 17:58:40 / cg"
!
fileDescription
"Return a description string which will appear in nt.def / bc.def and the rc-file"
^ self description , ' App'
"Created: / 14-09-2006 / 20:08:11 / cg"
!
hasLicenceToAcceptDuringInstallation
^ false
"Created: / 14-09-2006 / 22:34:00 / cg"
! !
!ApplicationDefinition class methodsFor:'file generation'!
basicFileNamesToGenerate
^ #(
#('Make.spec' #'generate_make_dot_spec')
#('Make.proto' #'generate_make_dot_proto')
#('bc.mak' #'generate_bc_dot_mak')
#('modules.stx' #'generate_modules_dot_stx')
#('modules.c' #'generate_modules_dot_c')
#('abbrev.stc' #'generate_abbrev_dot_stc')
#('bmake.bat' #'generate_bmake_dot_mak')
) , (Array
with:
(Array
with:self rcFilename
with:#'generate_packageName_dot_rc')
with:
(Array
with:self nsiFilename
with:#'generate_packageName_dot_nsi')
).
"Created: / 14-09-2006 / 14:36:00 / cg"
"Modified: / 29-09-2006 / 17:32:57 / cg"
!
generate_modules_dot_c
^self replaceMappings: self modules_dot_c_mappings
in: self modules_dot_c
"
bosch_dapasx_application generate_modules_dot_c
"
"Created: / 19-09-2006 / 22:35:27 / cg"
!
generate_modules_dot_stx
^self replaceMappings: self modules_dot_stx_mappings
in: self modules_dot_stx
"
bosch_dapasx_application generate_modules_dot_stx
"
"Modified: / 09-08-2006 / 11:31:09 / fm"
"Modified: / 11-08-2006 / 14:01:56 / cg"
!
generate_packageName_dot_nsi
^self
replaceMappings: self packageName_dot_nsi_mappings
in: self packageName_dot_nsi
"
bosch_dapasx_application generate_packageName_dot_nsi
"
"Modified: / 09-08-2006 / 11:31:09 / fm"
"Created: / 14-09-2006 / 21:08:23 / cg"
"Modified: / 15-10-2006 / 12:52:21 / cg"
!
rcFilename
^ self packageName,'WinRC.rc'.
"Created: / 07-09-2006 / 17:07:08 / cg"
!
resourceFilename
^ (self rcFilename asFilename withSuffix:'res') name
"Created: / 07-09-2006 / 17:12:53 / cg"
! !
!ApplicationDefinition class methodsFor:'file templates'!
bc_dot_def
"the template code for the bc.def file"
^
'DESCRIPTION %(DESCRIPTION)
CODE PRELOAD MOVEABLE DISCARDABLE
SEGMENTS
INITCODE PRELOAD DISCARDABLE
'
"Created: / 08-08-2006 / 12:26:58 / fm"
"Modified: / 08-08-2006 / 19:32:27 / fm"
"Modified: / 17-08-2006 / 20:05:17 / cg"
!
bc_dot_mak
"answer a template for the bc.mak makefile.
Any variable definition %(Variable) will be later replaced by the mapping.
$% characters have to be duplicated"
^ '# $','Header','$
#
# DO NOT EDIT
# automagically generated from the projectDefinition: ',self name,'.
#
# Warning: once you modify this file, do not rerun
# stmkmp or projectDefinition-build again - otherwise, your changes are lost.
#
TOP=%(TOP)
INCLUDE_TOP=$(TOP)\..
# CFLAGS1= -WD -w-pro -w-ccc -w-rch -w-aus -w-par -x- -r- -k -y -v -vi- -c -tWDR
CFLAGS1= -w-pro -w-ccc -w-rch -w-aus -w-par -x- -r- -k -y -v -vi- -c
CFLAGS_CONSOLE=-tWC -tWR -D_NO_VCL;WIN32
CFLAGS_NOCONSOLE=-tWR -D_NO_VCL;WIN32GUI;WIN32
LFLAGS_CONSOLE=-ap
LFLAGS_NOCONSOLE=-aa
CRT_STARTUP_CONSOLE=c0x32.obj
CRT_STARTUP_NOCONSOLE=c0w32.obj
# notice: the following 3 are now defined via the make-stx and make-winstx rules.
#
# CFLAGS_APPTYPE=$(CFLAGS_%(CONSOLE_OR_NOCONSOLE))
# LFLAGS_APPTYPE=$(LFLAGS_%(CONSOLE_OR_NOCONSOLE))
# CRT_STARTUP=$(CRT_STARTUP_%(CONSOLE_OR_NOCONSOLE))
CFLAGS_LOCAL=$(CFLAGS_APPTYPE) \
-DSTARTUP_CLASS="\"%(STARTUP_CLASS)\"" \
-DSTARTUP_SELECTOR="\"%(STARTUP_SELECTOR)\"" \
-DUSE_MODULE_TABLE
#
!!INCLUDE $(TOP)\rules\stdHeader_bc
!!INCLUDE Make.spec
OBJS= $(COMMON_OBJS) $(WIN32_OBJS)
#
LIBNAME=dummy
STCOPT="+optinline"
LOCALINCLUDES=%(LOCAL_INCLUDES)
STCLOCALOPT=''-package=$(PACKAGE)'' $(LOCALINCLUDES) %(HEADEROUTPUTARG) $(STCLOCALOPTIMIZATIONS) $(STCWARNINGS) $(LOCALDEFINES) $(COMMONSYMFLAG) -varPrefix=$(LIBNAME)
LINKER = ilink32
# LFLAGS = -L$(TOP)\libbc;$(BCB)\lib;$(DEBUGLIBPATH) -H:0x400000 -Hc:0x100000 -S:0x40000 -Sc:0x10000 -ap -Tpe -x -Gn -v -Ao:0x10000
LFLAGS = -L$(TOP)\libbc;$(BCB)\lib -S:0x40000 -Sc:0x10000 $(LFLAGS_APPTYPE) -Tpe -x -Gn -v -Ao:0x10000
PROJECT_CONSOLE = %(CONSOLE_APPLICATION).exe
PROJECT_NOCONSOLE = %(NOCONSOLE_APPLICATION).exe
ALLOBJFILES = main.obj
RESFILES = %(RESFILENAME)
ALLOBJ = $(CRT_STARTUP) $(ALLOBJFILES) $(OBJS)
DEFFILE=$(TOP)\rules\bc_exe.def
LIBFILES=$(TOP)\libbc\librun.lib
ALLLIB=$(LIBFILES) import32.lib $(RT_LIB)
REQUIRED_LIBS=librun.dll %(REQUIRED_LIBS)
REQUIRED_FILES=cs3245.dll symbols.stc $(REQUIRED_LIBS)
REQUIRED_SUPPORT_DIRS=%(REQUIRED_SUPPORT_DIRS)
target: %(BUILD_TARGET)
# the executable, all required files and a self-installing-installer-exe
ALL:: exe setup
exe: %(APPLICATION_OR_CONSOLEAPPLICATION) %(ADDITIONAL_TARGETS)
# the executable only
# with console
%(CONSOLE_APPLICATION):
-del main.obj
$(MAKE) -N -f bc.mak \
PROJECT=$(PROJECT_CONSOLE) \
CFLAGS_APPTYPE="$(CFLAGS_CONSOLE)" \
LFLAGS_APPTYPE="$(LFLAGS_CONSOLE)" \
CRT_STARTUP="$(CRT_STARTUP_CONSOLE)" theExe
# without console
%(NOCONSOLE_APPLICATION):
-del main.obj
$(MAKE) -N -f bc.mak \
PROJECT=$(PROJECT_NOCONSOLE) \
CFLAGS_APPTYPE="$(CFLAGS_NOCONSOLE) -DWIN_LOGFILE="\\"\"%(NOCONSOLE_LOGFILE)\\"\""" \
LFLAGS_APPTYPE="$(LFLAGS_NOCONSOLE)" \
CRT_STARTUP="$(CRT_STARTUP_NOCONSOLE)" theExe
# the executable only (internal target; needs some defines)
theExe: $(OUTDIR) $(OBJS) $(REQUIRED_FILES) show $(PROJECT)
# a nullsoft installable delivery
setup: $(REQUIRED_SUPPORT_DIRS) install_%(APPLICATION).exe
# This uses the Nullsoft Installer Package and works in Windows only
install_%(APPLICATION).exe: $(PROJECT) %(APPLICATION).nsi
$(MAKENSIS) %(APPLICATION).nsi
new:
bmake clean
bmake
RESOURCEFILES: %(APPLICATION)_RESOURCES %(APPLICATION)_BITMAPS \
stx_RESOURCES stx_STYLES stx_BITMAPS
%(RESOURCE_RULES)
%(STX_RESOURCE_RULES)
%(PREREQUISITES_LIBS)
%(SUBPROJECTS_LIBS)
show:
@echo LFLAGS= $(LFLAGS)
@echo ALLOBJ= $(ALLOBJ)
@echo PROJECT= $(PROJECT)
@echo ALLLIB= $(ALLLIB)
@echo DEFFILE= $(DEFFILE)
@echo ALLRES= $(ALLRES)
$(PROJECT_CONSOLE): $(ALLOBJFILES) $(OBJS) $(RESFILES) $(DEFFILE)
$(BCB)\BIN\$(LINKER) $(LFLAGS) $(ALLOBJ), $(PROJECT_CONSOLE),, $(ALLLIB), $(DEFFILE), $(RESFILES)
$(PROJECT_NOCONSOLE): $(ALLOBJFILES) $(OBJS) $(RESFILES) $(DEFFILE)
$(BCB)\BIN\$(LINKER) $(LFLAGS) $(ALLOBJ), $(PROJECT_NOCONSOLE),, $(ALLLIB), $(DEFFILE), $(RESFILES)
#$(PROJECT): $(ALLOBJFILES) $(RESFILES) $(DEFFILE)
# $(BCB)\BIN\$(LINKER) @&&!!
# $(LFLAGS) +
# $(ALLOBJ), +
# $(PROJECT),, +
# $(ALLLIB), +
# $(DEFFILE), +
# $(RESFILES)
#!!
!!INCLUDE $(TOP)\rules\stdRules_bc
#
# additional rules
#
%(APPLICATION)Win.res: %(APPLICATION)Win.rc %(APPLICATION).ico
main.obj: buildDate.h main.c bc.mak
main.c: $(TOP)\librun\main.c
copy $(TOP)\librun\main.c main.c
buildDate.h: $(TOP)\librun\genDate.exe
$(TOP)\librun\genDate.exe
librun.dll: $(TOP)\librun\librun.dll
copy $(TOP)\librun\librun.dll librun.dll
cs3245.dll: $(TOP)\support\win32\borland\cs3245.dll
copy $(TOP)\support\win32\borland\cs3245.dll cs3245.dll
symbols.stc: $(TOP)\include\symbols.stc
copy $(TOP)\include\symbols.stc symbols.stc
clobber::
-del librun.dll
%(ADDITIONAL_RULES)
clean::
-del genDate.exe
-del c0x32.dll
-del c0x32.lib
-del buildDate.h
-del $(PROJECT)
-del install_%(APPLICATION).exe
-del stx.lib
-del stx.dll
-del cs3245.dll
-del $(REQUIRED_FILES)
-del main.c
-del *.log
-del *.res
-rmdir /S /Q resources
-rmdir /S /Q objbc
clobber::
-del *.dll
-del *.exe
# BEGINMAKEDEPEND --- do not remove this line; make depend needs it
%(DEPENDENCIES)
# ENDMAKEDEPEND --- do not remove this line
'.
"Modified: / 01-03-2007 / 18:07:05 / cg"
!
bc_dot_mak_resource_rules
|p|
^ String streamContents:[:s |
s nextPutAll:'
%(APPLICATION)_RESOURCES: resources\%(MODULE)\%(MODULE_PATH)\NUL
-copy ..\resources\*.rs resources\%(MODULE)\%(MODULE_PATH)\..\*.*
%(APPLICATION)_BITMAPS: resources\%(MODULE)\%(MODULE_PATH)\bitmaps\NUL
-copy *.ico resources\%(MODULE)\%(MODULE_PATH)\bitmaps\*.*
-copy *.gif resources\%(MODULE)\%(MODULE_PATH)\bitmaps\*.*
resources\%(MODULE)\%(MODULE_PATH)\bitmaps\NUL: resources\%(MODULE)\%(MODULE_PATH)\NUL
mkdir resources\%(MODULE)\%(MODULE_PATH)\bitmaps
'.
p := self moduleDirectory_win32 asCollectionOfSubstringsSeparatedBy:$\.
p size to:2 by:-1 do:[:len |
|part2 part1|
part2 := (p copyTo:len) asStringWith:$\.
part1 := (p copyTo:len-1) asStringWith:$\.
s nextPutAll:'
resources\%(MODULE)\',part2,'\NUL: resources\%(MODULE)\',part1,'\NUL
mkdir resources\%(MODULE)\',part2,'
'.
].
s nextPutAll:'
resources\%(MODULE)\',p first,'\NUL: resources\%(MODULE)\NUL
mkdir resources\%(MODULE)\',p first,'
'.
"/ be careful to not include two rules for it (-> stx_resource_rules).
self module ~= 'stx' ifTrue:[
s nextPutAll:
'resources\%(MODULE)\NUL: resources\NUL
mkdir resources\%(MODULE)
'.
].
]
"Modified: / 09-02-2007 / 16:13:43 / cg"
!
bc_dot_mak_stx_resource_rules
^ '
stx_RESOURCES: \
keyboard.rc \
libbasic_RESOURCES \
libview_RESOURCES \
libtool_RESOURCES \
libtool2_RESOURCES
keyboard.rc: $(TOP)\projects\smalltalk\keyboard.rc
copy $(TOP)\projects\smalltalk\keyboard.rc *.*
stx_STYLES: resources\stx\libview\NUL
copy $(TOP)\libview\styles\mswindowsXP* resources\stx\libview\*.*
copy $(TOP)\libview\styles\mswindows*.common resources\stx\libview\*.*
stx_BITMAPS: \
libwidg_BITMAPS
libwidg_BITMAPS: resources\stx\libwidg\bitmaps\NUL
copy $(TOP)\libwidg\bitmaps\*.xpm resources\stx\libwidg\bitmaps\*.*
libbasic_RESOURCES: resources\stx\libbasic\NUL
copy $(TOP)\libbasic\resources\*.rs resources\stx\libbasic\*.*
libtool_RESOURCES: resources\stx\libtool\NUL
copy $(TOP)\libtool\resources\*.rs resources\stx\libtool\*.*
libtool2_RESOURCES: resources\stx\libtool2\NUL
copy $(TOP)\libtool2\resources\*.rs resources\stx\libtool2\*.*
libview_RESOURCES: resources\stx\libview\NUL
copy $(TOP)\libview\resources\*.rs resources\stx\libview\*.*
libview2_RESOURCES: resources\stx\libview2\NUL
copy $(TOP)\libview2\resources\*.rs resources\stx\libview2\*.*
resources\stx\libbasic\NUL: resources\stx\NUL
mkdir resources\stx\libbasic
resources\stx\libtool\NUL: resources\stx\NUL
mkdir resources\stx\libtool
resources\stx\libtool2\NUL: resources\stx\NUL
mkdir resources\stx\libtool2
resources\stx\libview\NUL: resources\stx\NUL
mkdir resources\stx\libview
resources\stx\libview2\NUL: resources\stx\NUL
mkdir resources\stx\libview2
resources\stx\libwidg\bitmaps\NUL: resources\stx\libwidg\NUL
mkdir resources\stx\libwidg\bitmaps
resources\stx\libwidg\NUL: resources\stx\NUL
mkdir resources\stx\libwidg
resources\stx\NUL: resources\NUL
mkdir resources\stx
resources\NUL:
mkdir resources
bitmaps\NUL:
mkdir bitmaps
doc\NUL:
mkdir doc
'.
"Created: / 20-09-2006 / 17:36:29 / cg"
!
buildDate_dot_h
"the template code for the buildDate.h file"
^
'#define BUILD_DATE "%(BUILDDATE)"'
"Created: / 30-08-2006 / 19:18:34 / cg"
!
classLine_modules_dot_c
^'_%(CLASS)_Init,'
"Modified: / 08-08-2006 / 15:46:05 / fm"
"Created: / 19-09-2006 / 22:49:46 / cg"
!
classLine_modules_dot_c_extern
^'extern void _%(CLASS)_Init();'
"Modified: / 08-08-2006 / 15:46:05 / fm"
"Created: / 19-09-2006 / 22:50:14 / cg"
!
defineExtenionLine_nsi_for:extension
"the template code for a single extenions definition line in the <appname>.nsi file"
^
' WriteRegStr HKCR ".',extension,'" "" "%(MODULE_KEY).%(PRODUCT_NAME).1"'
"Created: / 15-10-2006 / 12:50:00 / cg"
!
installFileLine_nsi_for:filePattern
"the template code for a single file-install pattern to be added to the <appname>.nsi file"
^
' File ',filePattern
"Created: / 01-03-2007 / 20:00:20 / cg"
!
make_dot_proto
^
'# $','Header','$
#
# DO NOT EDIT
# automagically generated from the projectDefinition: ',self name,'.
#
# Warning: once you modify this file, do not rerun
# stmkmp or projectDefinition-build again - otherwise, your changes are lost.
#
# The Makefile as generated by this Make.proto supports the following targets:
# make - compile all st-files to a classLib
# make clean - clean all temp files
# make clobber - clean all
#
# This file contains definitions for Unix based platforms.
# It shares common definitions with the win32-make in Make.spec.
#
# position (of this package) in directory hierarchy:
# (must point to ST/X top directory, for tools and includes)
TOP=%(TOP)
INCLUDE_TOP=$(TOP)/..
# subdirectories where targets are to be made:
SUBDIRS=%(SUBDIRECTORIES)
# subdirectories where Makefiles are to be made:
# (only define if different from SUBDIRS)
# ALLSUBDIRS=
# if your embedded C code requires any system includes,
# add the path(es) here:,
# ********** OPTIONAL: MODIFY the next lines ***
# LOCALINCLUDES=-Ifoo -Ibar
LOCALINCLUDES=%(LOCAL_INCLUDES)
# if you need any additional defines for embedded C code,
# add them here:,
# ********** OPTIONAL: MODIFY the next lines ***
# LOCALDEFINES=-Dfoo -Dbar -DDEBUG
LOCALDEFINES=%(LOCAL_DEFINES)
LIBNAME=%(LIBRARY_NAME)
STCLOCALOPT=''-package=$(PACKAGE)'' -I. $(LOCALINCLUDES) $(STCLOCALOPTIMIZATIONS) $(STCWARNINGS) $(LOCALDEFINES) %(HEADEROUTPUTARG) %(COMMONSYMFLAG) -varPrefix=$(LIBNAME)
# ********** OPTIONAL: MODIFY the next line ***
# additional C-libraries that should be pre-linked with the class-objects
LD_OBJ_LIBS=%(ADDITIONAL_LINK_LIBRARIES)
LOCAL_SHARED_LIBS=%(ADDITIONAL_SHARED_LINK_LIBRARIES)
# ********** OPTIONAL: MODIFY the next line ***
# additional C targets or libraries should be added below
LOCAL_EXTRA_TARGETS=
OBJS= $(COMMON_OBJS) $(UNIX_OBJS)
%(ADDITIONAL_DEFINITIONS)
all:: preMake classLibRule postMake
pre_objs:: %(ADDITIONAL_TARGETS)
%(ADDITIONAL_RULES)
# add more install actions here
install::
# add more install actions for aux-files (resources) here
installAux::
# add more preMake actions here
preMake::
# add more postMake actions here
postMake:: cleanjunk
cleanjunk::
clean::
%(TAB)-rm -f *.o *.H
clobber::
%(TAB)-rm -f *.so *.dll
',
"
$(INSTALLBASE)::
%(TAB)@test -d $@ || mkdir $@
$(INSTALLBASE)/packages:: $(INSTALLBASE)
%(TAB)@test -d $@ || mkdir $@
$(INSTALLBASE)/packages/$(MODULE):: $(INSTALLBASE)/packages
%(TAB)@test -d $@ || mkdir $@
$(INSTALLBASE)/packages/$(MODULE)/dapasx:: $(INSTALLBASE)/packages/$(MODULE)
%(TAB)@test -d $@ || mkdir $@
$(INSTALLBASE)/packages/$(MODULE)/dapasx/interactiver_editor:: $(INSTALLBASE)/packages/$(MODULE)/dapasx
%(TAB)@test -d $@ || mkdir $@
$(INSTALLBASE)/packages/$(MODULE)/$(MODULE_DIR):: $(INSTALLBASE)/packages/$(MODULE)
%(TAB)@test -d $@ || mkdir $@
"
'
# BEGINMAKEDEPEND --- do not remove this line; make depend needs it
%(DEPENDENCIES)
# ENDMAKEDEPEND --- do not remove this line
'
"Modified: / 09-08-2006 / 16:50:23 / fm"
"Created: / 29-09-2006 / 23:47:07 / cg"
!
modules_dot_c
^
'/* $','Header','$
*
* DO NOT EDIT
* automagically generated from the projectDefinition: ',self name,'.
*
* Warning: once you modify this file, do not rerun
* stmkmp or projectDefinition-build again - otherwise, your changes are lost.
*/
typedef void (*vf)();
%(EXTERN_INIT_NAME_LIST)
static vf modules[] = {
%(INIT_LIST)
(vf)0
};
vf *__modules__ = modules;
'
"Created: / 19-09-2006 / 22:36:58 / cg"
!
modules_dot_stx
^
'# $','Header','$
#
# DO NOT EDIT
# automagically generated from the projectDefinition: ',self name,'.
#
# Warning: once you modify this file, do not rerun
# stmkmp or projectDefinition-build again - otherwise, your changes are lost.
#
# This file is (currently) only used with win-95 / win-NT versions of STX.
# It lists the dll''s which are to be loaded at startup time.
#
# All classes loaded at startup time will be present as precompiled classes.
# Others will be autoloaded.
#
%(ALLPREREQUISITE_LIBS)
%(SUBPROJECT_LIBS)
'
"Created: / 08-08-2006 / 12:26:58 / fm"
"Modified: / 08-08-2006 / 19:32:27 / fm"
"Modified: / 16-08-2006 / 17:56:58 / User"
"Modified: / 17-08-2006 / 20:35:38 / cg"
!
packageName_dot_nsi
"the template code for the <appname>.nsi file"
^
'; $','Header','$
; Script generated by ProjectDefinition.
!!define PRODUCT_NAME "%(PRODUCT_NAME)"
!!define PRODUCT_FILENAME "%(PRODUCT_FILENAME)"
!!define PRODUCT_VERSION "%(PRODUCT_VERSION)"
!!define PRODUCT_PUBLISHER "%(PRODUCT_PUBLISHER)"
!!define PRODUCT_WEB_SITE "%(PRODUCT_WEBSITE)"
!!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_FILENAME}"
!!define PRODUCT_UNINST_ROOT_KEY "HKLM"
!!define STX_ROOT "%(TOP)\.."
SetCompressor lzma
; MUI 1.67 compatible ------
!!include "MUI.nsh"
; MUI Settings
!!define MUI_ABORTWARNING
%(SEMI_IF_ICON_EXISTS)!!define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\modern-install.ico"
%(SEMI_IF_NO_ICON_EXISTS)!!define MUI_ICON "%(APPLICATION_ICON).ico"
%(SEMI_IF_ICON_EXISTS)!!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico"
%(SEMI_IF_NO_ICON_EXISTS)!!define MUI_UNICON "%(APPLICATION_ICON).ico"
; Language Selection Dialog Settings
!!define MUI_LANGDLL_REGISTRY_ROOT "${PRODUCT_UNINST_ROOT_KEY}"
!!define MUI_LANGDLL_REGISTRY_KEY "${PRODUCT_UNINST_KEY}"
!!define MUI_LANGDLL_REGISTRY_VALUENAME "NSIS:Language"
; Welcome page
!!insertmacro MUI_PAGE_WELCOME
; License page
; !!define MUI_LICENSEPAGE_CHECKBOX
',(self hasLicenceToAcceptDuringInstallation
ifTrue:['!!insertmacro MUI_PAGE_LICENSE $(license)']
ifFalse:['']),'
!!insertmacro MUI_PAGE_COMPONENTS
; Directory page
!!insertmacro MUI_PAGE_DIRECTORY
; Instfiles page
!!insertmacro MUI_PAGE_INSTFILES
; Finish page
!!insertmacro MUI_PAGE_FINISH
; Uninstaller pages
!!insertmacro MUI_UNPAGE_INSTFILES
; Language files
!!insertmacro MUI_LANGUAGE "English"
!!insertmacro MUI_LANGUAGE "German"
; MUI end ------
',((self hasLicenceToAcceptDuringInstallation and:[self docDirPath_win32 notNil])
ifTrue:['
LicenseLangString license ${LANG_ENGLISH} "',self docDirPath_win32,'\licence_en.txt"
LicenseLangString license ${LANG_GERMAN} "',self docDirPath_win32,'\licence_de.txt"
']
ifFalse:['']),'
Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
VIProductVersion "${PRODUCT_VERSION}.0"
VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductName" "${PRODUCT_NAME}"
VIAddVersionKey /LANG=${LANG_ENGLISH} "CompanyName" "${PRODUCT_PUBLISHER}"
VIAddVersionKey /LANG=${LANG_ENGLISH} "FileVersion" "%(FILE_VERSION)"
VIAddVersionKey /LANG=${LANG_ENGLISH} "FileDescription" "${PRODUCT_NAME} Installer"
VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductVersion" "${PRODUCT_VERSION}"
VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalCopyright" "%(LEGAL_COPYRIGHT)"
OutFile "%(PRODUCT_FILENAME)Setup.exe"
InstallDir "%(PRODUCT_INSTALLDIR)"
ShowInstDetails show
ShowUnInstDetails show
Function .onInit
!!insertmacro MUI_LANGDLL_DISPLAY
FunctionEnd
InstType Full
InstType Partial
Section "Programme" Section1
SectionIn 1 2
SetOutPath "$INSTDIR\bin"
SetOverwrite ifnewer
File %(DELIVERED_EXECUTABLES)
%(COMMON_FILES_TO_INSTALL)
%(ADDITIONAL_FILES_TO_INSTALL)
%(FILE_EXTENSION_DEFINITION_LINES)
WriteRegStr HKCR "%(MODULE_KEY).%(PRODUCT_FILENAME).1" "" "%(PRODUCT_FILENAME) File"
WriteRegStr HKCR "%(MODULE_KEY).%(PRODUCT_FILENAME).1\DefaultIcon" "" ''$INSTDIR\bin\%(NOCONSOLE_APPLICATION).exe,0''
WriteRegStr HKCR "%(MODULE_KEY).%(PRODUCT_FILENAME).1\Shell\open" "" $(appOpen)
WriteRegStr HKCR "%(MODULE_KEY).%(PRODUCT_FILENAME).1\Shell\open\command" "" ''"$INSTDIR\bin\%(NOCONSOLE_APPLICATION).exe" -- "%1"''
SectionEnd
%(SEMI_IF_NO_DOC_EXISTS)Section "Online-Documentation for %(PRODUCT_NAME)" Section2
%(SEMI_IF_NO_DOC_EXISTS) SectionIn 1
%(SEMI_IF_NO_DOC_EXISTS) SetOutPath "$INSTDIR\doc"
%(SEMI_IF_NO_DOC_EXISTS) SetOverwrite ifnewer
%(SEMI_IF_NO_DOC_EXISTS) File /r /x CVS "${STX_ROOT}\%(MODULE)\%(APPLICATION)\doc\*"
%(SEMI_IF_NO_DOC_EXISTS)SectionEnd
;; Section "%(PRODUCT_NAME) Libraries and Demos" Section3
;; SectionIn 1
;; SetOutPath "$INSTDIR\lib"
;; SetOverwrite ifnewer
;; ; File /r /x CVS "${STX_ROOT}\%(MODULE)\%(APPLICATION)\examples\*"
;; SectionEnd
;;
;; Section "%(PRODUCT_NAME) Reports and Printing" Section4
;; SectionIn 1
;; SetOutPath "$INSTDIR\reportGenerator"
;; SetOverwrite ifnewer
;; ; File /r /x CVS "..\reportGenerator\java" "..\reportGenerator\rules" "..\reportGenerator\*.xml" "..\reportGenerator\*.xslt" "..\reportGenerator\CloseApp.exe" "..\reportGenerator\eXpecco.jpg"
;; SectionEnd
Section -AdditionalIcons
SetOutPath "$INSTDIR\bin"
WriteIniStr "$INSTDIR\${PRODUCT_FILENAME}.url" "InternetShortcut" "URL" "${PRODUCT_WEB_SITE}"
CreateDirectory "$SMPROGRAMS\${PRODUCT_FILENAME}"
CreateShortCut "$SMPROGRAMS\${PRODUCT_FILENAME}\%(APPLICATION).lnk" "$INSTDIR\bin\%(NOCONSOLE_APPLICATION)"
CreateShortCut "$DESKTOP\%(APPLICATION).lnk" "$INSTDIR\bin\%(NOCONSOLE_APPLICATION)"
CreateShortCut "$SMPROGRAMS\${PRODUCT_FILENAME}\Website.lnk" "$INSTDIR\${PRODUCT_FILENAME}.url"
CreateShortCut "$SMPROGRAMS\${PRODUCT_FILENAME}\Uninstall.lnk" "$INSTDIR\uninst.exe"
SectionEnd
Section -Post
WriteUninstaller "$INSTDIR\uninst.exe"
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)"
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\uninst.exe"
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}"
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "URLInfoAbout" "${PRODUCT_WEB_SITE}"
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "Publisher" "${PRODUCT_PUBLISHER}"
SectionEnd
LangString appOpen ${LANG_GERMAN} "Mit %(PRODUCT_NAME) öffnen"
LangString appOpen ${LANG_ENGLISH} "Open with %(PRODUCT_NAME)"
LangString DESC_Section1 ${LANG_ENGLISH} "Program components of %(PRODUCT_NAME)"
LangString DESC_Section1 ${LANG_GERMAN} "Alle Programmkomponenten von %(PRODUCT_NAME)"
%(SEMI_IF_NO_DOC_EXISTS)LangString DESC_Section2 ${LANG_ENGLISH} "Online-Documentation of %(PRODUCT_NAME)"
%(SEMI_IF_NO_DOC_EXISTS)LangString DESC_Section2 ${LANG_GERMAN} "Online-Dokumentation zu %(PRODUCT_NAME)"
;; LangString DESC_Section3 ${LANG_ENGLISH} "Libraries and Demo Projects"
;; LangString DESC_Section3 ${LANG_GERMAN} "Bibliotheken und Beispielprojekte"
;; LangString DESC_Section4 ${LANG_ENGLISH} "Logfile Printing and Report Generation"
;; LangString DESC_Section4 ${LANG_GERMAN} "Drucken und Report-Generierung aus Log-Dateien"
!!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
!!insertmacro MUI_DESCRIPTION_TEXT ${Section1} $(DESC_Section1)
%(SEMI_IF_NO_DOC_EXISTS) !!insertmacro MUI_DESCRIPTION_TEXT ${Section2} $(DESC_Section2)
;; !!insertmacro MUI_DESCRIPTION_TEXT ${Section3} $(DESC_Section3)
;; !!insertmacro MUI_DESCRIPTION_TEXT ${Section4} $(DESC_Section4)
!!insertmacro MUI_FUNCTION_DESCRIPTION_END
Function un.onUninstSuccess
HideWindow
MessageBox MB_ICONINFORMATION|MB_OK "%(PRODUCT_NAME) wurde erfolgreich deinstalliert"
FunctionEnd
Function un.onInit
!!insertmacro MUI_UNGETLANGUAGE
MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Möchten Sie %(PRODUCT_NAME) und alle seine Komponenten deinstallieren?" IDYES +2
Abort
FunctionEnd
Section Uninstall
Delete "$INSTDIR\${PRODUCT_FILENAME}.url"
Delete "$INSTDIR\uninst.exe"
Delete "$INSTDIR\*"
Delete "$SMPROGRAMS\${PRODUCT_FILENAME}\Uninstall.lnk"
Delete "$SMPROGRAMS\${PRODUCT_FILENAME}\Website.lnk"
Delete "$SMPROGRAMS\${PRODUCT_FILENAME}\%(APPLICATION).lnk"
Delete "$DESKTOP\%(APPLICATION).lnk"
RMDir "$SMPROGRAMS\${PRODUCT_FILENAME}"
RMDir /r "$INSTDIR"
DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
DeleteRegKey HKCR "%(MODULE_KEY).%(PRODUCT_FILENAME).1"
%(FILE_EXTENSION_UNDEFINITION_LINES)
SetAutoClose true
SectionEnd
'
"
bosch_dapasx_application packageName_dot_nsi
bosch_dapasx_application generateFile:'dapasx.nsi'
"
"Modified: / 09-08-2006 / 15:10:57 / fm"
"Created: / 14-09-2006 / 21:09:18 / cg"
"Modified: / 01-03-2007 / 20:13:45 / cg"
!
packageName_dot_rc
"the template code for the <appname>.rc file"
^
'//
// DO NOT EDIT
// automagically generated from the projectDefinition: ',self name,'.
//
#define IDR_MAINFRAME 128
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
%(ICONDEFINITION_LINE)
VS_VERSION_INFO VERSIONINFO
FILEVERSION %(FILE_VERSION_COMMASEPARATED)
PRODUCTVERSION %(PRODUCT_VERSION_COMMASEPARATED)
// FILEFLAGSMASK 0x3fL
FILEFLAGSMASK VS_FF_DEBUG | VS_FF_PRERELEASE
FILEFLAGS VS_FF_PRERELEASE | VS_FF_SPECIALBUILD
FILEOS VOS_NT_WINDOWS32
FILETYPE %(FILETYPE)
FILESUBTYPE VS_USER_DEFINED
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904E4"
BEGIN
VALUE "CompanyName", "%(COMPANY_NAME)\0"
VALUE "FileDescription", "%(FILE_DESCRIPTION)\0"
VALUE "FileVersion", "%(FILE_VERSION)\0"
VALUE "InternalName", "%(INTERNAL_NAME)\0"
%(LEGAL_COPYRIGHT_LINE)
VALUE "ProductName", "%(PRODUCT_NAME)\0"
VALUE "ProductVersion", "%(PRODUCT_VERSION)\0"
VALUE "ProductDate", "%(PRODUCT_DATE)\0"
END
END
BLOCK "VarFileInfo"
BEGIN // Language | Translation
VALUE "Translation", 0x409, 0x4E4 // U.S. English, Windows Multilingual
END
END
'
"
stx_libbasic3 packageName_dot_rc
stx_libbasic3 generate_packageName_dot_rc
"
"Modified: / 09-08-2006 / 15:10:57 / fm"
"Created: / 30-08-2006 / 18:41:47 / cg"
!
preRequisiteLine_bc_dot_mak
^
'%(FILE_NAME).dll: %(MODULE_DIRECTORY)\objbc\%(FILE_NAME).dll
copy %(MODULE_DIRECTORY)\objbc\%(FILE_NAME).dll *.*
%(MODULE_DIRECTORY)\objbc\%(FILE_NAME).dll:
cd %(MODULE_DIRECTORY)
bmake
cd %(BACK_DIRECTORY)
'
"Modified: / 09-02-2007 / 16:22:47 / cg"
!
subProjectLine_bc_dot_mak
^'%(LIBRARY_NAME).dll: $(TOP)\..\%(PATH_TO_SUB_PROJECT)\objbc\%(LIBRARY_NAME).dll
copy $(TOP)\..\%(PATH_TO_SUB_PROJECT)\objbc\%(LIBRARY_NAME).dll *.*
$(TOP)\..\%(PATH_TO_SUB_PROJECT)\objbc\%(LIBRARY_NAME).dll:
cd $(TOP)\..\%(PATH_TO_SUB_PROJECT)
bmake
-cd $(TOP)\..\%(PATH_TO_MYPROJECT)
'
!
undefineExtenionLine_nsi_for:extension
"the template code for a single extenions undefinition line in the <appname>.nsi file"
^
' DeleteRegKey HKCR ".',extension,'"'
"Created: / 15-10-2006 / 12:51:00 / cg"
! !
!ApplicationDefinition class methodsFor:'mappings'!
additionalFilesToInstall_dot_nsi:bindings
^ String streamContents:[:s |
self additionalFilesToInstall do:[:pattern |
s nextPutLine:((self installFileLine_nsi_for:pattern) expandPlaceholdersWith:bindings)
].
].
"Created: / 01-03-2007 / 19:59:18 / cg"
!
bc_dot_mak_mappings
|d|
d := super bc_dot_mak_mappings.
d
at: 'CONSOLE_OR_NOCONSOLE' put:(self isConsoleApplication ifTrue:'CONSOLE' ifFalse:'NOCONSOLE');
at: 'LOCAL_INCLUDES' put: (self generateLocalIncludes_win32);
at: 'APPLICATION_OR_CONSOLEAPPLICATION' put:(self isConsoleApplication ifTrue:(self applicationNameConsole) ifFalse:(self applicationNameNoConsole));
at: 'APPLICATION' put: (self applicationName);
at: 'CONSOLE_APPLICATION' put: (self applicationNameConsole);
at: 'NOCONSOLE_APPLICATION' put: (self applicationNameNoConsole);
at: 'NOCONSOLE_LOGFILE' put:(self logFilenameNoConsole);
at: 'RESFILENAME' put: (self resourceFilename );
at: 'RCFILENAME' put: (self rcFilename );
at: 'STARTUP_CLASS' put: ( self startupClassName );
at: 'STARTUP_SELECTOR' put: (self startupSelector );
at: 'REQUIRED_LIBS' put: (self generateRequiredLibs_bc_dot_mak);
at: 'PREREQUISITES_LIBS' put: (self generatePreRequisiteLines_bc_dot_mak );
at: 'DEPENDENCIES' put: (self generateDependencies_win32);
at: 'SUBPROJECTS_LIBS' put: (self generateSubProjectLines_bc_dot_mak );
at: 'BUILD_TARGET' put: (self buildTarget );
at: 'ADDITIONAL_TARGETS' put: (self additionalTargets_bc_dot_mak);
at: 'ADDITIONAL_RULES' put: (self additionalRules_bc_dot_mak);
yourself.
self needResources ifTrue:[
d
at: 'REQUIRED_SUPPORT_DIRS' put: 'RESOURCEFILES';
at: 'RESOURCE_RULES' put:( self replaceMappings: d
in: self bc_dot_mak_resource_rules );
at: 'STX_RESOURCE_RULES' put: ( self replaceMappings: d
in: self bc_dot_mak_stx_resource_rules);
yourself
].
^ d
"Modified: / 20-09-2006 / 17:37:57 / cg"
!
buildDate_dot_h_mappings
|d|
d := Dictionary new.
d
at: 'BUILDDATE' put: (Timestamp now printStringRFC1123Format ).
^ d
"Created: / 30-08-2006 / 19:19:30 / cg"
"Modified: / 14-09-2006 / 18:58:31 / cg"
!
commonFilesToInstall_dot_nsi:bindings
^ String streamContents:[:s |
self commonFilesToInstall do:[:pattern |
s nextPutLine:((self installFileLine_nsi_for:pattern) expandPlaceholdersWith:bindings)
].
].
"Created: / 01-03-2007 / 20:05:20 / cg"
!
fileExtensionDefinitionLines_dot_nsi:bindings
^ String streamContents:[:s |
self documentExtensions do:[:ext |
s nextPutAll:((self defineExtenionLine_nsi_for:ext) expandPlaceholdersWith:bindings)
].
].
"Created: / 15-10-2006 / 12:59:03 / cg"
!
fileExtensionUndefinitionLines_dot_nsi:bindings
^ String streamContents:[:s |
self documentExtensions do:[:ext |
s nextPutAll:((self undefineExtenionLine_nsi_for:ext) expandPlaceholdersWith:bindings)
].
].
"Created: / 15-10-2006 / 12:59:18 / cg"
!
modules_dot_c_mappings
|d|
d := Dictionary new.
d
at: 'INIT_LIST' put: (self generateClassLines:(self classLine_modules_dot_c));
at: 'EXTERN_INIT_NAME_LIST' put: (self generateClassLines:(self classLine_modules_dot_c_extern));
yourself.
^ d
"Created: / 19-09-2006 / 22:42:15 / cg"
!
modules_dot_stx_mappings
|d|
d := Dictionary new.
d
at: 'PREREQUISITE_LIBS' put: (self generatePreRequisiteLibs_modules_dot_stx);
at: 'ALLPREREQUISITE_LIBS' put: (self generateAllPreRequisiteLibs_modules_dot_stx);
at: 'SUBPROJECT_LIBS' put: (self generateSubProjectLines_modules_dot_stx ).
^ d
"Modified: / 14-09-2006 / 18:58:41 / cg"
!
nsiDeliveredExecutables
"by default, an executable named after the application.
Redefine, if thats not the case."
^ '"',self applicationName,'.exe','"'
"Modified: / 01-03-2007 / 20:26:50 / cg"
!
packageName_dot_nsi_mappings
|d s defLines undefLines|
d := Dictionary new.
d
at: 'TOP' put: ( self pathToTop_win32 );
at: 'APPLICATION' put: (self applicationName);
at: 'APPLICATION_ICON' put: (self applicationIconFileName);
at: 'CONSOLE_APPLICATION' put: (self applicationNameConsole);
at: 'NOCONSOLE_APPLICATION' put: (self applicationNameNoConsole);
at: 'DELIVERED_EXECUTABLES' put: (self nsiDeliveredExecutables);
at: 'MODULE' put: ( self module );
at: 'MODULE_KEY' put: ( self module asUppercaseFirst );
at: 'PRODUCT_NAME' put: (self productName);
at: 'PRODUCT_FILENAME' put: (self productFilename);
at: 'PRODUCT_VERSION' put: (self productVersion);
at: 'PRODUCT_DATE' put: (self productDate);
at: 'PRODUCT_PUBLISHER' put: (self productPublisher);
at: 'PRODUCT_WEBSITE' put: (self productWebSite);
at: 'PRODUCT_INSTALLDIR' put: (self productInstallDir);
at: 'FILETYPE' put: ( 'VFT_DLL' );
at: 'FILE_VERSION_COMMASEPARATED' put: (self fileVersionCommaSeparated);
at: 'PRODUCT_VERSION_COMMASEPARATED' put: (self productVersionCommaSeparated);
at: 'COMPANY_NAME' put: (self companyName);
at: 'FILE_DESCRIPTION' put: (self fileDescription);
at: 'FILE_VERSION' put: (self fileVersion);
at: 'LEGAL_COPYRIGHT' put: (self legalCopyright ? '');
at: 'INTERNAL_NAME' put: (self internalName).
s := self legalCopyright.
s notNil ifTrue:[
d at: 'LEGAL_COPYRIGHT_LINE' put: ' VALUE "LegalCopyright", "',s,'\0"'
].
s := self iconFileName.
s isNil ifTrue:[
d at:'SEMI_IF_NO_ICON_EXISTS' put:';; '.
d at:'SEMI_IF_ICON_EXISTS' put:''.
] ifFalse:[
d at:'SEMI_IF_NO_ICON_EXISTS' put:''.
d at:'SEMI_IF_ICON_EXISTS' put:';; '.
d at: #'ICONDEFINITION_LINE' put: 'IDR_MAINFRAME ICON DISCARDABLE "',s,'"'
].
self docDirPath_win32 isNil ifTrue:[
d at:'SEMI_IF_NO_DOC_EXISTS' put:';; '.
] ifFalse:[
d at:'SEMI_IF_NO_DOC_EXISTS' put:''.
].
defLines := self fileExtensionDefinitionLines_dot_nsi:d.
undefLines := self fileExtensionUndefinitionLines_dot_nsi:d.
d at:'FILE_EXTENSION_DEFINITION_LINES' put:defLines.
d at:'FILE_EXTENSION_UNDEFINITION_LINES' put:undefLines.
d at:'ADDITIONAL_FILES_TO_INSTALL' put:(self additionalFilesToInstall_dot_nsi:d).
d at:'COMMON_FILES_TO_INSTALL' put:(self commonFilesToInstall_dot_nsi:d).
^ d
"Created: / 14-09-2006 / 21:08:44 / cg"
"Modified: / 01-03-2007 / 20:05:03 / cg"
!
preRequisiteLine_bc_dot_mak_mappings: aProjectID
|module relPath relBackPath|
module := self module.
relPath := self msdosPathToPackage:aProjectID from:(self package).
relBackPath := Array new:(relPath asCollectionOfSubstringsSeparatedBy:$\) size withAll:'..'.
relBackPath := relBackPath asStringWith:$\.
relBackPath := relBackPath , '\',module,'\',(self moduleDirectory_win32).
^ Dictionary new
at: 'FILE_NAME' put: (self libraryNameFor: aProjectID );
at: 'MODULE_DIRECTORY' put: relPath;
at: 'BACK_DIRECTORY' put: relBackPath;
yourself
"Modified: / 09-02-2007 / 16:59:21 / cg"
!
preRequisiteLine_bc_dot_mak_mappingsForClass:aClass
|relPath relBackPath|
relPath := (PackageId from:aClass package) directory copy replaceAll:$/ with:$\.
^ Dictionary new
at: 'FILE_NAME' put: ( aClass classBaseFilename asFilename withoutSuffix baseName );
at: 'MODULE_DIRECTORY' put:relPath;
yourself
"Modified: / 09-02-2007 / 16:28:12 / cg"
!
subProjectLine_bc_dot_mak_mappings: aProjectID
^ Dictionary new
at: 'LIBRARY_NAME' put: (self libraryNameFor: aProjectID );
at: 'PATH_TO_SUB_PROJECT' put: ( (PackageId from:aProjectID) module,'\',(PackageId from:aProjectID) directory copy replaceAll:$/ with:$\ );
at: 'PATH_TO_MYPROJECT' put: (self msdosPathToPackage: self package from: aProjectID);
yourself
"Modified: / 14-09-2006 / 18:59:26 / cg"
! !
!ApplicationDefinition class methodsFor:'mappings support'!
generateAllPreRequisiteLibs_modules_dot_stx
^ String streamContents:[:s |
self allPreRequisites do:[:projectID |
s nextPutLine:(self libraryNameFor:projectID)
].
self isGUIApplication ifTrue:[
self guiClassFileNames_win32 do:[:eachFilename |
s nextPutLine:(eachFilename asFilename withoutSuffix baseName)
].
].
].
"
bosch_dapasx_application generatePreRequisiteLibs_modules_dot_stx
"
"Modified: / 07-09-2006 / 17:22:58 / cg"
!
generatePreRequisiteLibs_modules_dot_stx
^ String streamContents:[:s |
self preRequisites do:[:projectID |
s nextPutLine:(self libraryNameFor:projectID)
].
self isGUIApplication ifTrue:[
self guiClassFileNames_win32 do:[:eachFilename |
s nextPutLine:(eachFilename asFilename withoutSuffix baseName)
].
].
].
"
bosch_dapasx_application generatePreRequisiteLibs_modules_dot_stx
"
"Modified: / 07-09-2006 / 17:22:58 / cg"
!
generatePreRequisiteLines_bc_dot_mak
^ String streamContents:[:s |
self allPreRequisites do:[:eachPackage |
|mappings newObjectLine|
mappings := self preRequisiteLine_bc_dot_mak_mappings: eachPackage.
newObjectLine := self replaceMappings: mappings
in: self preRequisiteLine_bc_dot_mak.
s nextPutAll:newObjectLine.
s cr.
].
self guiClasses_win32 do:[:eachClass |
|mappings newObjectLine|
mappings := self preRequisiteLine_bc_dot_mak_mappingsForClass: eachClass.
newObjectLine := self replaceMappings: mappings
in: self preRequisiteLine_bc_dot_mak.
s nextPutAll:newObjectLine.
s cr.
].
]
"
bosch_dapasx_application generatePreRequisiteLines_bc_dot_mak
"
"Created: / 09-08-2006 / 11:24:39 / fm"
"Modified: / 14-09-2006 / 21:58:47 / cg"
!
generateRequiredLibs_bc_dot_mak
^ String streamContents:[:s |
s nextPutLine:' \'.
self allPreRequisites do:[:projectID |
s space; nextPutAll:(self libraryNameFor:projectID),'.dll'; nextPutLine:' \'.
].
self isGUIApplication ifTrue:[
self guiClassFileNames_win32 do:[:eachFilename |
s space; nextPutAll:eachFilename; nextPutLine:' \'.
].
].
"/ self subProjects do:[:projectID |
"/ s space; nextPutAll:(self libraryNameFor:projectID),'.dll'; nextPutLine:' \'.
"/ ].
s cr.
].
"
bosch_dapasx_application generateRequiredLibs_bc_dot_mak
"
"Modified: / 07-09-2006 / 17:22:51 / cg"
!
generateSubProjectLines_bc_dot_mak
^ String streamContents:[:s |
self subProjects do:[:projectID |
|mappings newObjectLine|
mappings := self subProjectLine_bc_dot_mak_mappings: projectID.
newObjectLine := self replaceMappings: mappings
in: self subProjectLine_bc_dot_mak.
s nextPutAll:newObjectLine.
s cr.
]
]
"
bosch_dapasx_application generateSubProjectLines_bc_dot_mak
"
"Created: / 09-08-2006 / 11:24:39 / fm"
"Modified: / 14-09-2006 / 18:46:09 / cg"
!
generateSubProjectLines_modules_dot_stx
|string|
string := String streamContents:[:s |
self subProjects do:[:projectID |
s nextPutLine:(self libraryNameFor:projectID)
].
].
^ string
"
bosch_dapasx_application generateSubProjectLines_modules_dot_stx
"
"Modified: / 17-08-2006 / 17:22:37 / cg"
! !
!ApplicationDefinition class methodsFor:'queries'!
canHaveExtensions
"return true, if this class allows extensions from other packages.
Private classes, namespaces and projectDefinitions dont allow this"
^ self == ApplicationDefinition
"
Smalltalk allClasses select:[:each | each canHaveExtensions not]
"
"Created: / 30-08-2006 / 15:29:49 / cg"
! !
!ApplicationDefinition class methodsFor:'sanity checks'!
validateDescription
super validateDescription.
#(
startupClassName
"/ startupSelector
) do:[:sel |
(self theMetaclass implements:sel) ifFalse:[
Dialog
warn:('The %1-method is missing from the description %2!!'
bindWith:sel allBold
with:self name allBold).
AbortSignal raise.
].
(Error catch:[ self perform:sel ]) ifTrue:[
Dialog
warn:('The %1-method needs to be edited in the description %2!!'
bindWith:sel allBold
with:self name allBold).
AbortSignal raise.
].
].
"Modified: / 19-09-2006 / 20:17:38 / cg"
! !
!ApplicationDefinition class methodsFor:'testing'!
isApplicationDefinition
^ self ~~ ApplicationDefinition
"Created: / 23-08-2006 / 15:17:38 / cg"
!
isProjectDefinition
^ self ~~ ApplicationDefinition
"Created: / 17-08-2006 / 14:11:56 / cg"
! !
!ApplicationDefinition class methodsFor:'documentation'!
version
^ '$Header: /cvs/stx/stx/libbasic/ApplicationDefinition.st,v 1.76 2007-04-11 10:30:51 cg Exp $'
! !