9552
|
1 |
"
|
|
2 |
COPYRIGHT (c) 2006 by eXept Software AG
|
|
3 |
All Rights Reserved
|
|
4 |
|
|
5 |
This software is furnished under a license and may be used
|
|
6 |
only in accordance with the terms of that license and with the
|
|
7 |
inclusion of the above copyright notice. This software may not
|
|
8 |
be provided or otherwise made available to, or used by, any
|
|
9 |
other person. No title to or ownership of the software is
|
|
10 |
hereby transferred.
|
|
11 |
"
|
|
12 |
|
9532
|
13 |
"{ Package: 'stx:libbasic3' }"
|
|
14 |
|
9567
|
15 |
ProjectDefinition subclass:#ApplicationDefinition
|
9532
|
16 |
instanceVariableNames:''
|
|
17 |
classVariableNames:''
|
|
18 |
poolDictionaries:''
|
|
19 |
category:'System-Support-Projects'
|
|
20 |
!
|
|
21 |
|
9552
|
22 |
!ApplicationDefinition class methodsFor:'documentation'!
|
|
23 |
|
|
24 |
copyright
|
|
25 |
"
|
|
26 |
COPYRIGHT (c) 2006 by eXept Software AG
|
|
27 |
All Rights Reserved
|
|
28 |
|
|
29 |
This software is furnished under a license and may be used
|
|
30 |
only in accordance with the terms of that license and with the
|
|
31 |
inclusion of the above copyright notice. This software may not
|
|
32 |
be provided or otherwise made available to, or used by, any
|
|
33 |
other person. No title to or ownership of the software is
|
|
34 |
hereby transferred.
|
|
35 |
"
|
|
36 |
! !
|
9532
|
37 |
|
9535
|
38 |
!ApplicationDefinition class methodsFor:'accessing'!
|
9532
|
39 |
|
|
40 |
applicationName
|
|
41 |
|
|
42 |
^(self moduleDirectory subStrings:$/) first
|
|
43 |
|
|
44 |
"
|
9535
|
45 |
bosch_dapasx_application applicationName
|
9532
|
46 |
"
|
|
47 |
|
|
48 |
"Created: / 08-08-2006 / 20:25:39 / fm"
|
9535
|
49 |
! !
|
9532
|
50 |
|
9535
|
51 |
!ApplicationDefinition class methodsFor:'defaults'!
|
9532
|
52 |
|
9535
|
53 |
defaultDescription
|
|
54 |
^ 'an application'
|
9532
|
55 |
!
|
|
56 |
|
9535
|
57 |
guiClassFileNames
|
|
58 |
^ self guiClasses
|
|
59 |
collect:[:cls | (cls classFilename asFilename
|
|
60 |
withSuffix:(ObjectFileLoader sharedLibrarySuffix))
|
|
61 |
baseName].
|
9532
|
62 |
!
|
|
63 |
|
9535
|
64 |
guiClasses
|
|
65 |
^ DeviceWorkstation allSubclasses
|
|
66 |
select:[:cls | cls isLoaded and:[cls ~~ WinPrinter]]
|
|
67 |
!
|
9532
|
68 |
|
9535
|
69 |
needResources
|
|
70 |
^ self isGUIApplication
|
9532
|
71 |
! !
|
|
72 |
|
9535
|
73 |
!ApplicationDefinition class methodsFor:'description'!
|
9532
|
74 |
|
|
75 |
excludedFromPreRequisites
|
9578
|
76 |
"list packages which are to be explicitely excluded from the automatic constructed
|
|
77 |
prerequisites list. If empty, everything that is found along the inheritance of any of
|
|
78 |
my classes is considered to be a prerequisite package."
|
9532
|
79 |
|
9578
|
80 |
^ #()
|
|
81 |
|
|
82 |
"Modified: / 17-08-2006 / 19:48:59 / cg"
|
9532
|
83 |
!
|
|
84 |
|
|
85 |
excludedFromSubProjects
|
9578
|
86 |
"list packages which are to be explicitely excluded from the automatic constructed
|
|
87 |
subProjects list. If empty, every sub-package is included as a prerequisite."
|
9532
|
88 |
|
9578
|
89 |
^ #()
|
|
90 |
|
|
91 |
"Modified: / 17-08-2006 / 19:49:40 / cg"
|
9532
|
92 |
!
|
|
93 |
|
9535
|
94 |
isGUIApplication
|
9578
|
95 |
"Return true, if this is a GUI app.
|
|
96 |
Redefine to return false for non-GUI applications (affects inclusion of Display classes)."
|
9535
|
97 |
|
9578
|
98 |
^true
|
9535
|
99 |
|
|
100 |
"Created: / 08-08-2006 / 11:15:01 / fm"
|
9578
|
101 |
"Modified: / 17-08-2006 / 19:47:36 / cg"
|
9532
|
102 |
!
|
|
103 |
|
|
104 |
startUpClass
|
9578
|
105 |
"The name of the class which provides the entry point for the application."
|
9532
|
106 |
|
9578
|
107 |
self subclassResponsibility
|
|
108 |
|
|
109 |
"Modified: / 17-08-2006 / 20:00:22 / cg"
|
9532
|
110 |
!
|
|
111 |
|
|
112 |
startUpSelector
|
9578
|
113 |
"The name of the entry point method (in startUpClass) used to start the application."
|
9532
|
114 |
|
9578
|
115 |
^ #'start'
|
|
116 |
|
|
117 |
"Modified: / 17-08-2006 / 20:01:00 / cg"
|
|
118 |
! !
|
|
119 |
|
|
120 |
!ApplicationDefinition class methodsFor:'description - project information'!
|
|
121 |
|
|
122 |
description
|
|
123 |
"Returns a description string which will appear in nt.def / bc.def"
|
|
124 |
|
|
125 |
self module = 'stx' ifTrue:[
|
|
126 |
^ 'Smalltalk/X Application'
|
|
127 |
].
|
|
128 |
|
9587
|
129 |
^ 'Application'
|
9578
|
130 |
|
|
131 |
"Created: / 17-08-2006 / 20:52:48 / cg"
|
9587
|
132 |
"Modified: / 18-08-2006 / 16:16:01 / cg"
|
9532
|
133 |
! !
|
|
134 |
|
|
135 |
!ApplicationDefinition class methodsFor:'file generation'!
|
|
136 |
|
9535
|
137 |
fileNamesToGenerate
|
|
138 |
^ #(
|
|
139 |
"
|
9605
|
140 |
#('Make.proto' #'generate_make_dot_proto')
|
|
141 |
#('Make.spec' #'generate_make_dot_spec')
|
|
142 |
#('libInit.cc' #'generate_libInit_dot_cc')
|
9532
|
143 |
"
|
9605
|
144 |
#('bc.def' #'generate_bc_dot_def')
|
|
145 |
#('nt.mak' #'generate_nt_dot_mak')
|
|
146 |
#('modules.stx' #'generate_modules_dot_stx')
|
9532
|
147 |
"
|
9605
|
148 |
#('nt.def' #'generate_nt_dot_def')
|
|
149 |
#('abbrev.stc' #'generate_abbrev_dot_stc')
|
9535
|
150 |
"
|
9605
|
151 |
#('bmake.bat' #'generate_bmake_dot_mak')
|
9535
|
152 |
)
|
9578
|
153 |
|
|
154 |
"Modified: / 17-08-2006 / 20:03:17 / cg"
|
9623
|
155 |
!
|
|
156 |
|
|
157 |
generateFile:filename
|
|
158 |
filename = 'modules.stx' ifTrue:[
|
|
159 |
^ self generate_modules_dot_stx
|
|
160 |
].
|
|
161 |
^ super generateFile:filename
|
|
162 |
|
|
163 |
"Created: / 22-08-2006 / 18:35:40 / cg"
|
9532
|
164 |
! !
|
|
165 |
|
|
166 |
!ApplicationDefinition class methodsFor:'file templates'!
|
|
167 |
|
9535
|
168 |
bc_dot_def
|
9578
|
169 |
"the template code for the bc.def file"
|
9535
|
170 |
|
|
171 |
^
|
|
172 |
'DESCRIPTION %(DESCRIPTION)
|
|
173 |
CODE PRELOAD MOVEABLE DISCARDABLE
|
|
174 |
SEGMENTS
|
|
175 |
INITCODE PRELOAD DISCARDABLE
|
|
176 |
'
|
|
177 |
|
|
178 |
"Created: / 08-08-2006 / 12:26:58 / fm"
|
|
179 |
"Modified: / 08-08-2006 / 19:32:27 / fm"
|
9578
|
180 |
"Modified: / 17-08-2006 / 20:05:17 / cg"
|
9535
|
181 |
!
|
|
182 |
|
|
183 |
modules_dot_stx
|
9532
|
184 |
|
9535
|
185 |
^
|
9542
|
186 |
'# $','Header','$
|
9535
|
187 |
#
|
9578
|
188 |
# DO NOT EDIT
|
|
189 |
# automagically generated from the projectDefinition: ',self name,'.
|
|
190 |
#
|
|
191 |
# Warning: once you modify this file, do not rerun
|
|
192 |
# stmkmp or projectDefinition-build again - otherwise, your changes are lost.
|
|
193 |
#
|
9535
|
194 |
# This file is (currently) only used with win-95 / win-NT versions of STX.
|
|
195 |
# It lists the dll''s which are to be loaded at startup time.
|
|
196 |
#
|
|
197 |
# All classes loaded at startup time will be present as precompiled classes.
|
|
198 |
# Others will be autoloaded.
|
|
199 |
#
|
|
200 |
%(PREREQUISITE_LIBS)
|
|
201 |
%(SUBPROJECT_LIBS)
|
|
202 |
'
|
|
203 |
|
|
204 |
"Created: / 08-08-2006 / 12:26:58 / fm"
|
|
205 |
"Modified: / 08-08-2006 / 19:32:27 / fm"
|
9542
|
206 |
"Modified: / 16-08-2006 / 17:56:58 / User"
|
9578
|
207 |
"Modified: / 17-08-2006 / 20:35:38 / cg"
|
9535
|
208 |
!
|
|
209 |
|
|
210 |
nt_dot_mak
|
|
211 |
|def needResources|
|
|
212 |
|
|
213 |
needResources := false "self isGUIApplication".
|
|
214 |
|
|
215 |
def :=
|
|
216 |
'#
|
9578
|
217 |
# DO NOT EDIT
|
|
218 |
# automagically generated from the projectDefinition: ',self name,'.
|
|
219 |
#
|
|
220 |
# Warning: once you modify this file, do not rerun
|
|
221 |
# stmkmp or projectDefinition-build again - otherwise, your changes are lost.
|
9532
|
222 |
#
|
|
223 |
|
|
224 |
CFLAGS1= -WD -w-pro -w-ccc -w-rch -w-aus -w-par -x- -r- -k -y -v -vi- -c -tWDR
|
|
225 |
CFLAGS1= -w-pro -w-ccc -w-rch -w-aus -w-par -x- -r- -k -y -v -vi- -c
|
|
226 |
|
|
227 |
CFLAGS_CONSOLE=
|
|
228 |
CFLAGS_NOCONSOLE=-tWR -D_NO_VCL;WIN32GUI;WIN32 -DWIN_LOGFILE="\"%(APPLICATION)_%%d.log\""
|
|
229 |
LFLAGS_CONSOLE=-ap
|
|
230 |
LFLAGS_NOCONSOLE=-aa
|
|
231 |
CRT_STARTUP_CONSOLE=c0x32.obj
|
|
232 |
CRT_STARTUP_NOCONSOLE=c0w32.obj
|
|
233 |
|
|
234 |
CFLAGS_APPTYPE=$(CFLAGS_NOCONSOLE)
|
|
235 |
LFLAGS_APPTYPE=$(LFLAGS_NOCONSOLE)
|
|
236 |
CRT_STARTUP=$(CRT_STARTUP_NOCONSOLE)
|
|
237 |
|
9614
|
238 |
CFLAGS_LOCAL=$(CFLAGS_APPTYPE) \
|
|
239 |
-DSTARTUP_CLASS="\"%(STARTUP_CLASS)\"" \
|
|
240 |
-DSTARTUP_SELECTOR="\"%(STARTUP_SELECTOR)\"" \
|
|
241 |
-DUSE_MODULE_TABLE
|
9532
|
242 |
|
|
243 |
TOP=%(TOP)
|
|
244 |
|
|
245 |
#
|
|
246 |
OBJS=%(OBJECTS)
|
|
247 |
|
|
248 |
!!INCLUDE $(TOP)\rules\stdHeader_nt
|
|
249 |
#
|
|
250 |
MODULE=%(MODULE)
|
|
251 |
MODULE_DIR=%(MODULE_DIRECTORY)
|
|
252 |
PACKAGE=$(MODULE):$(MODULE_DIR)
|
|
253 |
LIBNAME=dummy
|
|
254 |
STCOPT="+optinline"
|
9614
|
255 |
STCLOCALOPT=''-package=$(PACKAGE)'' $(COMMONSYMBOLS) $(SEPINITCODE) $(RELOCINSTVARS) -varPrefix=$(LIBNAME)
|
9532
|
256 |
#STCLOCALOPT=""
|
|
257 |
|
|
258 |
LINKER = ilink32
|
|
259 |
|
|
260 |
# LFLAGS = -L$(TOP)\libbc;$(BCB)\lib;$(DEBUGLIBPATH) -H:0x400000 -Hc:0x100000 -S:0x40000 -Sc:0x10000 -ap -Tpe -x -Gn -v -Ao:0x10000
|
|
261 |
LFLAGS = -L$(TOP)\libbc;$(BCB)\lib -S:0x40000 -Sc:0x10000 $(LFLAGS_APPTYPE) -Tpe -x -Gn -v -Ao:0x10000
|
|
262 |
|
|
263 |
PROJECT = %(APPLICATION).exe
|
|
264 |
#ALLOBJFILES = stx.obj main.obj
|
|
265 |
ALLOBJFILES = main.obj
|
|
266 |
RESFILES = %(APPLICATION)WinRC.res
|
|
267 |
ALLOBJ = $(CRT_STARTUP) $(ALLOBJFILES) $(OBJS)
|
|
268 |
DEFFILE=bc.def
|
|
269 |
|
|
270 |
LIBFILES=$(TOP)\libbc\librun.lib
|
|
271 |
ALLLIB=$(LIBFILES) import32.lib $(RT_LIB)
|
|
272 |
|
9535
|
273 |
REQUIRED_LIBS=librun.dll %(REQUIRED_LIBS)
|
|
274 |
REQUIRED_FILES=cs3245.dll symbols.stc $(REQUIRED_LIBS)
|
9532
|
275 |
|
9535
|
276 |
REQUIRED_SUPPORT_DIRS=%(REQUIRED_SUPPORT_DIRS)
|
9532
|
277 |
|
|
278 |
ALL:: $(OBJS) $(REQUIRED_FILES) show $(PROJECT) $(REQUIRED_SUPPORT_DIRS)
|
|
279 |
|
|
280 |
setup: install_%(APPLICATION).exe
|
|
281 |
|
|
282 |
# This uses the Nullsoft Installer Package and works in Windows only
|
|
283 |
|
|
284 |
install_%(APPLICATION).exe: $(PROJECT) %(APPLICATION).nsi
|
|
285 |
makensis %(APPLICATION).nsi
|
|
286 |
|
|
287 |
new:
|
|
288 |
bmake clean
|
|
289 |
bmake
|
|
290 |
|
9535
|
291 |
%(RESOURCE_RULES)
|
9532
|
292 |
|
|
293 |
%(PREREQUISITES_LIBS)
|
|
294 |
%(SUBPROJECTS_LIBS)
|
|
295 |
|
|
296 |
show:
|
|
297 |
@echo LFLAGS= $(LFLAGS)
|
|
298 |
@echo ALLOBJ= $(ALLOBJ)
|
|
299 |
@echo PROJECT= $(PROJECT)
|
|
300 |
@echo ALLLIB= $(ALLLIB)
|
|
301 |
@echo DEFFILE= $(DEFFILE)
|
|
302 |
@echo ALLRES= $(ALLRES)
|
|
303 |
|
|
304 |
$(PROJECT): $(ALLOBJFILES) $(OBJS) $(RESFILES) $(DEFFILE)
|
|
305 |
$(BCB)\BIN\$(LINKER) $(LFLAGS) $(ALLOBJ), $(PROJECT),, $(ALLLIB), $(DEFFILE), $(RESFILES)
|
|
306 |
|
|
307 |
#$(PROJECT): $(ALLOBJFILES) $(RESFILES) $(DEFFILE)
|
|
308 |
# $(BCB)\BIN\$(LINKER) @&&!!
|
|
309 |
# $(LFLAGS) +
|
|
310 |
# $(ALLOBJ), +
|
|
311 |
# $(PROJECT),, +
|
|
312 |
# $(ALLLIB), +
|
|
313 |
# $(DEFFILE), +
|
|
314 |
# $(RESFILES)
|
|
315 |
#!!
|
|
316 |
|
|
317 |
|
|
318 |
!!INCLUDE $(TOP)\rules\stdRules_nt
|
|
319 |
|
|
320 |
#
|
|
321 |
# additional rules
|
|
322 |
#
|
|
323 |
|
|
324 |
stx.obj: $(TOP)\librun\objbc\stx.obj
|
|
325 |
copy $(TOP)\librun\objbc\stx.obj stx.obj
|
|
326 |
|
|
327 |
%(APPLICATION)WinRC.res: %(APPLICATION)WinRC.rc %(APPLICATION).ico
|
|
328 |
|
|
329 |
main.obj: buildDate.h main.c nt.mak
|
|
330 |
|
|
331 |
main.c: $(TOP)\librun\main.c
|
|
332 |
copy $(TOP)\librun\main.c main.c
|
|
333 |
|
|
334 |
buildDate.h: genDate.exe
|
|
335 |
genDate.exe
|
|
336 |
|
|
337 |
genDate.exe: $(TOP)\librun\genDate.exe
|
|
338 |
copy $(TOP)\librun\genDate.exe genDate.exe
|
|
339 |
|
|
340 |
librun.dll: $(TOP)\librun\librun.dll
|
|
341 |
copy $(TOP)\librun\librun.dll librun.dll
|
|
342 |
|
|
343 |
cs3245.dll: $(TOP)\support\win32\borland\cs3245.dll
|
|
344 |
copy $(TOP)\support\win32\borland\cs3245.dll cs3245.dll
|
|
345 |
|
|
346 |
symbols.stc: $(TOP)\include\symbols.stc
|
|
347 |
copy $(TOP)\include\symbols.stc symbols.stc
|
|
348 |
|
|
349 |
clean::
|
|
350 |
-del genDate.exe
|
|
351 |
-del c0x32.dll
|
|
352 |
-del c0x32.lib
|
|
353 |
-del buildDate.h
|
|
354 |
-del $(PROJECT)
|
|
355 |
-del install_%(APPLICATION).exe
|
|
356 |
-del stx.lib
|
|
357 |
-del stx.dll
|
|
358 |
-del librun.dll
|
|
359 |
-del cs3245.dll
|
|
360 |
-del $(REQUIRED_FILES)
|
|
361 |
-del main.c
|
|
362 |
-del *.log
|
|
363 |
-rmdir /S /Q resources
|
|
364 |
-rmdir /S /Q objbc
|
|
365 |
|
|
366 |
# BEGINMAKEDEPEND --- do not remove this line; make depend needs it
|
|
367 |
%(STARTUP_CLASS).$(O) %(STARTUP_CLASS).$(H): %(STARTUP_CLASS).st $(STCHDR) ../../../stx/include/Object.$(H)
|
|
368 |
genAbbrev:: %(STARTUP_CLASS).st
|
|
369 |
# ENDMAKEDEPEND --- do not remove this line
|
9535
|
370 |
'.
|
|
371 |
|
|
372 |
^ def.
|
9578
|
373 |
|
|
374 |
"Modified: / 17-08-2006 / 20:35:44 / cg"
|
9535
|
375 |
!
|
|
376 |
|
|
377 |
nt_dot_mak_resource_rules
|
|
378 |
^ '
|
|
379 |
|
|
380 |
RESOURCEFILES: %(APPLICATION)_RESOURCES stx_RESOURCES stx_STYLES stx_BITMAPS
|
|
381 |
|
|
382 |
%(APPLICATION)_RESOURCES: resources\%(MODULE)\%(APPLICATION)\NUL
|
|
383 |
copy ..\resources\*.rs resources\%(MODULE)\%(APPLICATION)\*.*
|
|
384 |
|
|
385 |
stx_RESOURCES: \
|
|
386 |
libbasic_RESOURCES \
|
|
387 |
libtool_RESOURCES \
|
|
388 |
libtool2_RESOURCES \
|
|
389 |
libview_RESOURCES \
|
|
390 |
libview2_RESOURCES
|
|
391 |
|
|
392 |
stx_STYLES: resources\stx\libview\NUL
|
|
393 |
copy $(TOP)\libview\styles\mswindowsXP* resources\stx\libview\*.*
|
|
394 |
copy $(TOP)\libview\styles\mswindows*.common resources\stx\libview\*.*
|
|
395 |
|
|
396 |
stx_BITMAPS: \
|
|
397 |
libwidg_BITMAPS
|
|
398 |
|
|
399 |
libwidg_BITMAPS: resources\stx\libwidg\bitmaps\NUL
|
|
400 |
copy $(TOP)\libwidg\bitmaps\*.xpm resources\stx\libwidg\bitmaps\*.*
|
|
401 |
|
|
402 |
libbasic_RESOURCES: resources\stx\libbasic\NUL
|
|
403 |
copy $(TOP)\libbasic\resources\*.rs resources\stx\libbasic\*.*
|
|
404 |
|
|
405 |
libtool_RESOURCES: resources\stx\libtool\NUL
|
|
406 |
copy $(TOP)\libtool\resources\*.rs resources\stx\libtool\*.*
|
|
407 |
|
|
408 |
libtool2_RESOURCES: resources\stx\libtool2\NUL
|
|
409 |
copy $(TOP)\libtool2\resources\*.rs resources\stx\libtool2\*.*
|
|
410 |
|
|
411 |
libview_RESOURCES: resources\stx\libview\NUL
|
|
412 |
copy $(TOP)\libview\resources\*.rs resources\stx\libview\*.*
|
|
413 |
|
|
414 |
libview2_RESOURCES: resources\stx\libview2\NUL
|
|
415 |
copy $(TOP)\libview2\resources\*.rs resources\stx\libview2\*.*
|
|
416 |
|
|
417 |
resources\stx\libbasic\NUL: resources\stx\NUL
|
|
418 |
mkdir resources\stx\libbasic
|
|
419 |
|
|
420 |
resources\stx\libtool\NUL: resources\stx\NUL
|
|
421 |
mkdir resources\stx\libtool
|
|
422 |
|
|
423 |
resources\stx\libtool2\NUL: resources\stx\NUL
|
|
424 |
mkdir resources\stx\libtool2
|
|
425 |
|
|
426 |
resources\stx\libview\NUL: resources\stx\NUL
|
|
427 |
mkdir resources\stx\libview
|
|
428 |
|
|
429 |
resources\stx\libview2\NUL: resources\stx\NUL
|
|
430 |
mkdir resources\stx\libview2
|
|
431 |
|
|
432 |
resources\stx\libwidg\bitmaps\NUL: resources\stx\libwidg\NUL
|
|
433 |
mkdir resources\stx\libwidg\bitmaps
|
|
434 |
|
|
435 |
resources\stx\libwidg\NUL: resources\stx\NUL
|
|
436 |
mkdir resources\stx\libwidg
|
|
437 |
|
|
438 |
resources\stx\NUL: resources\NUL
|
|
439 |
mkdir resources\stx
|
|
440 |
|
|
441 |
resources\%(MODULE)\%(APPLICATION)\NUL: resources\%(MODULE)\NUL
|
|
442 |
mkdir resources\%(MODULE)\%(APPLICATION)
|
|
443 |
|
|
444 |
resources\%(MODULE)\NUL: resources\NUL
|
|
445 |
mkdir resources\%(MODULE)
|
|
446 |
|
|
447 |
resources\NUL:
|
|
448 |
mkdir resources
|
|
449 |
|
|
450 |
bitmaps\NUL:
|
|
451 |
mkdir bitmaps
|
|
452 |
|
|
453 |
doc\NUL:
|
|
454 |
mkdir doc
|
|
455 |
|
|
456 |
'.
|
9532
|
457 |
!
|
|
458 |
|
|
459 |
preRequisiteLine_nt_dot_mak
|
|
460 |
|
9535
|
461 |
^'%(FILE_NAME).dll: $(TOP)\%(MODULE_DIRECTORY)\objbc\%(FILE_NAME).dll
|
|
462 |
copy $(TOP)\%(MODULE_DIRECTORY)\objbc\%(FILE_NAME).dll *.*
|
9532
|
463 |
'
|
|
464 |
!
|
|
465 |
|
|
466 |
subProjectLine_nt_dot_mak
|
|
467 |
|
|
468 |
^'%(LIBRARY_NAME).dll: $(TOP)\..\%(PATH_TO_SUB_PROJECT)\objbc\%(LIBRARY_NAME).dll
|
|
469 |
copy $(TOP)\..\%(PATH_TO_SUB_PROJECT)\objbc\%(LIBRARY_NAME).dll *.*
|
|
470 |
|
|
471 |
$(TOP)\..\%(PATH_TO_SUB_PROJECT)\objbc\%(LIBRARY_NAME).dll:
|
|
472 |
cd $(TOP)\..\%(PATH_TO_SUB_PROJECT)
|
|
473 |
bmake
|
|
474 |
-cd $(TOP)\..\%(PATH_TO_MYPROJECT)
|
|
475 |
'
|
|
476 |
! !
|
|
477 |
|
|
478 |
!ApplicationDefinition class methodsFor:'mappings'!
|
|
479 |
|
9535
|
480 |
modules_dot_stx_mappings
|
|
481 |
|d|
|
|
482 |
|
|
483 |
d := Dictionary new.
|
|
484 |
d
|
|
485 |
at: #'PREREQUISITE_LIBS' put: [self generatePreRequisiteLibs_modules_dot_stx];
|
|
486 |
at: #'SUBPROJECT_LIBS' put: [self generateSubProjectLines_modules_dot_stx ].
|
|
487 |
|
|
488 |
^ d
|
|
489 |
!
|
|
490 |
|
9532
|
491 |
nt_dot_mak_mappings
|
9535
|
492 |
|d|
|
9532
|
493 |
|
9578
|
494 |
d := super nt_dot_mak_mappings.
|
9535
|
495 |
d
|
|
496 |
at: #'APPLICATION' put: [self applicationName];
|
|
497 |
at: #'STARTUP_CLASS' put: [ self startUpClass];
|
|
498 |
at: #'STARTUP_SELECTOR' put: [self startUpSelector];
|
|
499 |
at: #'REQUIRED_LIBS' put: [self generateRequiredLibs_nt_dot_mak];
|
|
500 |
at: #'PREREQUISITES_LIBS' put: [self generatePreRequisiteLines_nt_dot_mak ];
|
|
501 |
at: #'SUBPROJECTS_LIBS' put: [self generateSubProjectLines_nt_dot_mak ].
|
|
502 |
|
|
503 |
self needResources ifTrue:[
|
|
504 |
d
|
|
505 |
at: #'REQUIRED_SUPPORT_DIRS' put: 'RESOURCEFILES'.
|
|
506 |
d
|
|
507 |
at: #'RESOURCE_RULES' put:( self replaceMappings: d
|
|
508 |
in: self nt_dot_mak_resource_rules ).
|
|
509 |
].
|
|
510 |
^ d
|
9578
|
511 |
|
|
512 |
"Modified: / 18-08-2006 / 11:43:50 / cg"
|
9532
|
513 |
!
|
|
514 |
|
|
515 |
preRequisiteLine_nt_dot_mak_mappings: aProjectID
|
|
516 |
|
|
517 |
^Dictionary new
|
9567
|
518 |
at: #'FILE_NAME' put: [self packageNameFor: aProjectID ];
|
9578
|
519 |
at: #'MODULE_DIRECTORY' put: [ (PackageId from:aProjectID) directory ];
|
9532
|
520 |
yourself
|
9567
|
521 |
|
9578
|
522 |
"Modified: / 18-08-2006 / 12:19:14 / cg"
|
9532
|
523 |
!
|
|
524 |
|
9535
|
525 |
preRequisiteLine_nt_dot_mak_mappingsForClass:aClass
|
|
526 |
|
|
527 |
^Dictionary new
|
|
528 |
at: #'FILE_NAME' put: [ aClass classFilename asFilename withoutSuffix baseName ];
|
9578
|
529 |
at: #'MODULE_DIRECTORY' put: [ (PackageId from:aClass package) directory ];
|
9535
|
530 |
yourself
|
9567
|
531 |
|
9578
|
532 |
"Modified: / 18-08-2006 / 12:18:58 / cg"
|
9535
|
533 |
!
|
|
534 |
|
9532
|
535 |
subProjectLine_nt_dot_mak_mappings: aProjectID
|
9557
|
536 |
^ Dictionary new
|
|
537 |
at: #'LIBRARY_NAME' put: [self libraryNameFor: aProjectID ];
|
|
538 |
at: #'PATH_TO_SUB_PROJECT' put: [self msdosPathToPackage: aProjectID from: self package];
|
|
539 |
at: #'PATH_TO_MYPROJECT' put: [self msdosPathToPackage: self package from: aProjectID];
|
|
540 |
yourself
|
9532
|
541 |
|
9557
|
542 |
"Modified: / 17-08-2006 / 14:28:24 / cg"
|
9532
|
543 |
! !
|
|
544 |
|
|
545 |
!ApplicationDefinition class methodsFor:'mappings support'!
|
|
546 |
|
9535
|
547 |
generatePreRequisiteLibs_modules_dot_stx
|
9578
|
548 |
^ String streamContents:[:s |
|
|
549 |
self preRequisites do:[:projectID |
|
|
550 |
(projectID startsWith:'stx:') ifTrue:[
|
|
551 |
s nextPutLine:(self packageNameFor:projectID)
|
|
552 |
] ifFalse:[
|
|
553 |
s nextPutLine:(self libraryNameFor:projectID)
|
|
554 |
]
|
|
555 |
].
|
|
556 |
self isGUIApplication ifTrue:[
|
|
557 |
self guiClassFileNames do:[:eachFilename |
|
|
558 |
s nextPutLine:(eachFilename asFilename withoutSuffix baseName)
|
9535
|
559 |
].
|
|
560 |
].
|
9578
|
561 |
].
|
9535
|
562 |
|
|
563 |
"
|
|
564 |
bosch_dapasx_application generatePreRequisiteLibs_modules_dot_stx
|
|
565 |
"
|
9567
|
566 |
|
9578
|
567 |
"Modified: / 17-08-2006 / 21:30:44 / cg"
|
9535
|
568 |
!
|
|
569 |
|
|
570 |
generatePreRequisiteLines_nt_dot_mak
|
9532
|
571 |
|
|
572 |
^ String streamContents:[:s |
|
9535
|
573 |
self preRequisites do:[:eachPackage |
|
9532
|
574 |
|mappings newObjectLine|
|
9535
|
575 |
mappings := self preRequisiteLine_nt_dot_mak_mappings: eachPackage.
|
9532
|
576 |
newObjectLine := self replaceMappings: mappings
|
|
577 |
in: self preRequisiteLine_nt_dot_mak.
|
|
578 |
s nextPutAll:newObjectLine.
|
|
579 |
s cr.
|
9535
|
580 |
].
|
|
581 |
self guiClasses do:[:eachClass |
|
|
582 |
|mappings newObjectLine|
|
|
583 |
mappings := self preRequisiteLine_nt_dot_mak_mappingsForClass: eachClass.
|
|
584 |
newObjectLine := self replaceMappings: mappings
|
|
585 |
in: self preRequisiteLine_nt_dot_mak.
|
|
586 |
s nextPutAll:newObjectLine.
|
|
587 |
s cr.
|
|
588 |
].
|
|
589 |
|
9532
|
590 |
]
|
|
591 |
"
|
|
592 |
bosch_dapasx_Application generatePreRequisiteLines_make_dot_spec
|
|
593 |
|
|
594 |
"
|
|
595 |
|
|
596 |
"Created: / 09-08-2006 / 11:24:39 / fm"
|
|
597 |
!
|
|
598 |
|
|
599 |
generateRequiredLibs_nt_dot_mak
|
9535
|
600 |
|string|
|
|
601 |
|
9578
|
602 |
^ String streamContents:[:s |
|
|
603 |
self preRequisites do:[:projectID |
|
|
604 |
s space; nextPutAll:(self packageNameFor:projectID),'.dll'
|
|
605 |
].
|
9535
|
606 |
|
9578
|
607 |
self isGUIApplication ifTrue:[
|
|
608 |
self guiClassFileNames do:[:eachFilename |
|
|
609 |
s space; nextPutAll:eachFilename
|
|
610 |
].
|
|
611 |
].
|
|
612 |
self subProjects do:[:projectID |
|
|
613 |
s space; nextPutAll:(self libraryNameFor:projectID),'.dll'
|
9535
|
614 |
].
|
9532
|
615 |
].
|
|
616 |
|
9535
|
617 |
"
|
9578
|
618 |
bosch_dapasx_application generateRequiredLibs_nt_dot_mak
|
9535
|
619 |
"
|
9567
|
620 |
|
9578
|
621 |
"Modified: / 17-08-2006 / 21:33:31 / cg"
|
9532
|
622 |
!
|
|
623 |
|
9535
|
624 |
generateSubProjectLines_modules_dot_stx
|
|
625 |
|string|
|
|
626 |
|
|
627 |
string := String streamContents:[:s |
|
|
628 |
self subProjects do:[:projectID |
|
|
629 |
(projectID startsWith:'stx:') ifTrue:[
|
9567
|
630 |
"temporary kludge"
|
|
631 |
s nextPutLine:(self packageNameFor:projectID)
|
9535
|
632 |
] ifFalse:[
|
9567
|
633 |
s nextPutLine:(self libraryNameFor:projectID)
|
9535
|
634 |
]
|
|
635 |
].
|
|
636 |
].
|
|
637 |
|
|
638 |
^ string
|
|
639 |
|
|
640 |
"
|
|
641 |
bosch_dapasx_application generateSubProjectLines_modules_dot_stx
|
|
642 |
"
|
9567
|
643 |
|
|
644 |
"Modified: / 17-08-2006 / 17:22:37 / cg"
|
9535
|
645 |
!
|
|
646 |
|
|
647 |
generateSubProjectLines_nt_dot_mak
|
9532
|
648 |
|
|
649 |
^ String streamContents:[:s |
|
|
650 |
self subProjects do:[:eachClass |
|
|
651 |
|mappings newObjectLine|
|
|
652 |
mappings := self subProjectLine_nt_dot_mak_mappings: eachClass.
|
|
653 |
newObjectLine := self replaceMappings: mappings
|
|
654 |
in: self subProjectLine_nt_dot_mak.
|
|
655 |
s nextPutAll:newObjectLine.
|
|
656 |
s cr.
|
|
657 |
]
|
|
658 |
]
|
|
659 |
"
|
9535
|
660 |
bosch_dapasx_application generateSubProjectLinesnt_dot_mak
|
9532
|
661 |
|
|
662 |
"
|
|
663 |
|
|
664 |
"Created: / 09-08-2006 / 11:24:39 / fm"
|
|
665 |
! !
|
|
666 |
|
9587
|
667 |
!ApplicationDefinition class methodsFor:'private'!
|
9532
|
668 |
|
|
669 |
searchForPreRequisites
|
|
670 |
|includedClasses requiredPackages usedClasses reasons allSubProjects|
|
|
671 |
|
|
672 |
requiredPackages := Dictionary new.
|
|
673 |
usedClasses := Dictionary new.
|
|
674 |
includedClasses := (self subProjects inject: OrderedCollection new
|
|
675 |
into:[:collection :projectID |
|
9567
|
676 |
collection addAll: (self searchForClassesWithProject: projectID asSymbol);
|
9532
|
677 |
yourself
|
|
678 |
]
|
|
679 |
) asSet.
|
|
680 |
includedClasses
|
|
681 |
do:[:cls |
|
|
682 |
cls allSuperclassesDo:[:superClass |
|
|
683 |
reasons := usedClasses at: superClass ifAbsentPut:[Set new].
|
|
684 |
reasons add: superClass name, ' - Superclass of ', cls name.
|
|
685 |
]
|
|
686 |
].
|
|
687 |
includedClasses addAll: usedClasses keys.
|
|
688 |
includedClasses
|
|
689 |
do:[:includedClass |
|
|
690 |
includedClass methodsDo:[:method |
|
|
691 |
method usedGlobals
|
|
692 |
do:[:global | |usedClass|
|
|
693 |
usedClass := Smalltalk at: global asSymbol.
|
|
694 |
(usedClass notNil and:[usedClass isClass and:[usedClass isNameSpace not]])
|
|
695 |
ifTrue:[
|
|
696 |
reasons := usedClasses at: usedClass ifAbsentPut:[Set new].
|
|
697 |
reasons add: usedClass name, ' - Referenced by ', includedClass name,'>>',method name
|
|
698 |
]
|
|
699 |
]
|
|
700 |
]
|
|
701 |
].
|
|
702 |
allSubProjects := self searchForSubProjects.
|
|
703 |
usedClasses
|
|
704 |
keysAndValuesDo:[:usedClass :reasonsPerClass |
|
|
705 |
(allSubProjects includes: usedClass package asString)
|
|
706 |
ifFalse:[
|
|
707 |
usedClass package == Project noProjectID
|
|
708 |
ifFalse:[reasons := requiredPackages at:usedClass package ifAbsentPut:[Set new].
|
|
709 |
reasons addAll:reasonsPerClass.]
|
|
710 |
].
|
|
711 |
].
|
|
712 |
^requiredPackages
|
|
713 |
|
|
714 |
"
|
|
715 |
self searchForPreRequisites
|
|
716 |
bosch_dapasx_Application searchForPreRequisites
|
|
717 |
"
|
|
718 |
|
|
719 |
"Created: / 07-08-2006 / 20:42:39 / fm"
|
|
720 |
"Modified: / 07-08-2006 / 21:56:25 / fm"
|
9567
|
721 |
"Modified: / 17-08-2006 / 17:23:25 / cg"
|
9532
|
722 |
!
|
|
723 |
|
|
724 |
searchForSubProjects
|
9578
|
725 |
|myParentPackage|
|
9532
|
726 |
|
9578
|
727 |
myParentPackage := self parentProjectFor: self package.
|
|
728 |
^ Smalltalk allProjectIDs select:[:projectID |
|
|
729 |
(self parentProjectFor: projectID) = myParentPackage].
|
|
730 |
|
|
731 |
"
|
|
732 |
self searchForSubProjects
|
|
733 |
bosch_dapasx_Application searchForSubProjects
|
|
734 |
"
|
9532
|
735 |
|
|
736 |
"Created: / 07-08-2006 / 20:42:39 / fm"
|
|
737 |
"Modified: / 07-08-2006 / 21:56:25 / fm"
|
9578
|
738 |
"Modified: / 17-08-2006 / 21:30:16 / cg"
|
9587
|
739 |
! !
|
|
740 |
|
|
741 |
!ApplicationDefinition class methodsFor:'testing'!
|
|
742 |
|
|
743 |
isProjectDefinition
|
|
744 |
^ self ~~ ApplicationDefinition
|
|
745 |
|
|
746 |
"Created: / 17-08-2006 / 14:11:56 / cg"
|
|
747 |
! !
|
|
748 |
|
|
749 |
!ApplicationDefinition class methodsFor:'update description'!
|
|
750 |
|
|
751 |
forEachMethodsCodeToCompileDo:aTwoArgBlock
|
|
752 |
super forEachMethodsCodeToCompileDo:aTwoArgBlock.
|
|
753 |
|
|
754 |
aTwoArgBlock
|
|
755 |
value:self subProjects_code
|
|
756 |
value:'description'.
|
|
757 |
|
|
758 |
aTwoArgBlock
|
|
759 |
value:self preRequisites_code
|
|
760 |
value:'description'.
|
|
761 |
|
|
762 |
"Created: / 10-08-2006 / 16:35:47 / cg"
|
|
763 |
"Modified: / 18-08-2006 / 16:22:57 / cg"
|
|
764 |
!
|
|
765 |
|
|
766 |
preRequisites_code
|
|
767 |
|preRequisites|
|
|
768 |
|
|
769 |
preRequisites := self preRequisites asSet.
|
|
770 |
preRequisites addAll: self searchForPreRequisites keys.
|
|
771 |
preRequisites removeAll: self excludedFromPreRequisites.
|
|
772 |
|
|
773 |
^ String streamContents:[:s |
|
|
774 |
s nextPutLine:'preRequisites'.
|
|
775 |
s nextPutLine:' ^ #('.
|
|
776 |
preRequisites do:[:eachPackageID |
|
|
777 |
s nextPutLine:eachPackageID asString storeString
|
|
778 |
].
|
|
779 |
s nextPutLine:')'
|
|
780 |
].
|
|
781 |
|
|
782 |
"
|
|
783 |
bosch_dapasx_Application preRequisites_code
|
|
784 |
"
|
|
785 |
|
|
786 |
"Modified: / 08-08-2006 / 19:24:34 / fm"
|
|
787 |
"Created: / 17-08-2006 / 21:28:09 / cg"
|
9532
|
788 |
!
|
|
789 |
|
9578
|
790 |
subProjects_code
|
9532
|
791 |
|subProjects|
|
9578
|
792 |
|
9532
|
793 |
subProjects := self searchForSubProjects.
|
|
794 |
subProjects removeAll: self excludedFromSubProjects.
|
9578
|
795 |
|
9532
|
796 |
^ String streamContents:[:s |
|
9578
|
797 |
s nextPutLine:'subProjects'.
|
|
798 |
s nextPutLine:' ^ #('.
|
|
799 |
subProjects do:[:eachPackageID |
|
|
800 |
s nextPutLine:eachPackageID asString storeString
|
9532
|
801 |
].
|
9578
|
802 |
s nextPutLine:')'
|
9532
|
803 |
].
|
|
804 |
|
9578
|
805 |
"
|
|
806 |
bosch_dapasx subProjectsGeneratedString
|
|
807 |
stx_goodies subProjectsGeneratedString
|
|
808 |
"
|
9532
|
809 |
|
|
810 |
"Modified: / 08-08-2006 / 19:24:34 / fm"
|
9578
|
811 |
"Created: / 17-08-2006 / 21:26:51 / cg"
|
9532
|
812 |
! !
|
|
813 |
|
|
814 |
!ApplicationDefinition class methodsFor:'documentation'!
|
|
815 |
|
|
816 |
version
|
9623
|
817 |
^ '$Header: /cvs/stx/stx/libbasic/ApplicationDefinition.st,v 1.12 2006-08-22 16:41:58 cg Exp $'
|
9532
|
818 |
! !
|