2596
|
1 |
"{ Package: 'stx:libtool2' }"
|
|
2 |
|
|
3 |
Object subclass:#ProjectBuilder
|
|
4 |
instanceVariableNames:'package projectDefinitionClass sourceCodeManager buildDirectory
|
2598
|
5 |
myWorkingDirectory mySTXTopDirectory myTopDirectory'
|
2596
|
6 |
classVariableNames:'PreviousBuildDirectory'
|
|
7 |
poolDictionaries:''
|
|
8 |
category:'System-Support-Projects'
|
|
9 |
!
|
|
10 |
|
|
11 |
|
|
12 |
!ProjectBuilder class methodsFor:'examples'!
|
|
13 |
|
|
14 |
example1
|
|
15 |
Smalltalk loadPackage:'stx:projects/helloWorldApp' asAutoloaded:true.
|
|
16 |
|
|
17 |
self new
|
|
18 |
package:'stx:projects/helloWorldApp';
|
|
19 |
build
|
|
20 |
! !
|
|
21 |
|
|
22 |
!ProjectBuilder methodsFor:'accessing'!
|
|
23 |
|
|
24 |
package:aPackageIDOrSymbol
|
|
25 |
package := aPackageIDOrSymbol asPackageId.
|
|
26 |
!
|
|
27 |
|
|
28 |
projectDefinitionClass:something
|
|
29 |
projectDefinitionClass := something.
|
|
30 |
! !
|
|
31 |
|
|
32 |
!ProjectBuilder methodsFor:'building'!
|
|
33 |
|
|
34 |
build
|
|
35 |
"/ intermediate - this will move into a commonly used utility class
|
|
36 |
"/ (where all the project code support will be collected).
|
|
37 |
|
|
38 |
|module directory|
|
|
39 |
|
|
40 |
projectDefinitionClass := ProjectDefinition definitionClassForPackage:package.
|
|
41 |
projectDefinitionClass isNil ifTrue:[
|
|
42 |
self error:('Missing ProjectDefinition class for "',package asString,'"')
|
|
43 |
].
|
|
44 |
|
|
45 |
"/ ensure that everything is loaded...
|
|
46 |
projectDefinitionClass loadAsAutoloaded:false.
|
|
47 |
projectDefinitionClass loadExtensions.
|
|
48 |
projectDefinitionClass loadAllClassesAsAutoloaded:false.
|
|
49 |
|
|
50 |
module := package module.
|
|
51 |
directory := package directory.
|
|
52 |
|
|
53 |
buildDirectory := PreviousBuildDirectory ifNil:[ UserPreferences current buildDirectory ].
|
|
54 |
buildDirectory isNil ifTrue:[
|
|
55 |
buildDirectory := Filename tempDirectory construct:'stx_build'.
|
|
56 |
].
|
|
57 |
buildDirectory := buildDirectory asFilename.
|
|
58 |
|
|
59 |
"/ self validateBuildDirectoryIsPresent.
|
|
60 |
|
|
61 |
PreviousBuildDirectory := buildDirectory.
|
|
62 |
|
|
63 |
"/ UserPreferences current localBuild:true
|
|
64 |
UserPreferences current localBuild ifFalse:[
|
|
65 |
SourceCodeManager notNil ifTrue:[
|
|
66 |
sourceCodeManager := SourceCodeManagerUtilities sourceCodeManagerFor:projectDefinitionClass.
|
|
67 |
]
|
|
68 |
].
|
|
69 |
sourceCodeManager := nil.
|
|
70 |
|
2598
|
71 |
myTopDirectory :=
|
2596
|
72 |
Smalltalk packagePath
|
|
73 |
detect:[:aPath |
|
|
74 |
(aPath asFilename / 'stx' / 'include') exists
|
|
75 |
and: [ (aPath asFilename / 'stx' / 'rules') exists ]]
|
|
76 |
ifNone:nil.
|
2598
|
77 |
myTopDirectory isNil ifTrue:[
|
|
78 |
self error:('Cannot figure out my top directory (where stx/include and stx/rules are)')
|
2596
|
79 |
].
|
2598
|
80 |
myTopDirectory := myTopDirectory asFilename.
|
|
81 |
mySTXTopDirectory := myTopDirectory / 'stx'.
|
2596
|
82 |
|
|
83 |
self setupBuildDirectory.
|
2599
|
84 |
self copySTCDirectoryForBuild.
|
2596
|
85 |
self generateSourceFiles.
|
2600
|
86 |
self copyDLLsForLinkage.
|
|
87 |
self copySupportFilesForLinkage.
|
|
88 |
self copyStartupFilesFromSmalltalk.
|
2596
|
89 |
|
|
90 |
OperatingSystem
|
2599
|
91 |
executeCommand:(ParserFlags makeCommand,' exe')
|
2596
|
92 |
inputFrom:nil
|
|
93 |
outputTo:Transcript
|
|
94 |
errorTo:Transcript
|
2599
|
95 |
inDirectory:(buildDirectory / module / directory)
|
2596
|
96 |
onError:[:status| self error:'make failed'].
|
|
97 |
|
|
98 |
"Created: / 09-08-2006 / 18:37:19 / fm"
|
|
99 |
"Modified: / 09-08-2006 / 19:55:50 / fm"
|
|
100 |
"Modified: / 22-09-2006 / 17:37:11 / cg"
|
|
101 |
!
|
|
102 |
|
2600
|
103 |
copyDLLsForLinkage
|
|
104 |
|targetBuildDir|
|
|
105 |
|
|
106 |
targetBuildDir := buildDirectory / package module / package directory.
|
|
107 |
|
|
108 |
(projectDefinitionClass allPreRequisites)
|
|
109 |
do:[:eachPackageToFileout |
|
|
110 |
|packageId packageDef packageModule packageDirectory packageTargetDir
|
|
111 |
dllSource dllSourceDir libraryName dllRelativePath|
|
|
112 |
|
|
113 |
packageId := eachPackageToFileout asPackageId.
|
|
114 |
packageModule := packageId module.
|
|
115 |
packageDirectory := packageId directory.
|
|
116 |
packageTargetDir := (buildDirectory / packageModule / packageDirectory) recursiveMakeDirectory.
|
|
117 |
|
|
118 |
packageDef := packageId projectDefinitionClass.
|
|
119 |
libraryName := packageDef libraryName.
|
|
120 |
|
|
121 |
"/ mhmh - take them from my tree or from the projects/smalltalk execution directory ??
|
|
122 |
dllSourceDir := myTopDirectory / packageModule / packageDirectory.
|
|
123 |
OperatingSystem isMSWINDOWSlike ifTrue:[
|
|
124 |
"/ dllRelativePath := 'objvc','/',(libraryName,'.dll').
|
|
125 |
"/ (dllSourceDir / dllRelativePath) exists
|
|
126 |
false ifFalse:[
|
|
127 |
dllRelativePath := 'objbc','/',(libraryName,'.dll').
|
|
128 |
]
|
|
129 |
] ifFalse:[
|
|
130 |
dllRelativePath := libraryName,'.so'.
|
|
131 |
].
|
|
132 |
((packageTargetDir / dllRelativePath) exists
|
|
133 |
and:[ (dllSourceDir / dllRelativePath) fileSize = (packageTargetDir / dllRelativePath) fileSize
|
|
134 |
and:[ (dllSourceDir / dllRelativePath) modificationTime < (packageTargetDir / dllRelativePath) modificationTime
|
|
135 |
"/ and:[ (dllSourceDir / dllRelativePath) sameContentsAs:(packageTargetDir / dllRelativePath) ]
|
|
136 |
]]) ifFalse:[
|
|
137 |
(packageTargetDir / dllRelativePath) directory recursiveMakeDirectory.
|
|
138 |
(dllSourceDir / dllRelativePath) copyTo:(packageTargetDir / dllRelativePath).
|
|
139 |
]
|
|
140 |
].
|
|
141 |
!
|
|
142 |
|
2596
|
143 |
copyDirectory:relativepath
|
|
144 |
"/ need rules in stx
|
|
145 |
((Smalltalk projectDirectoryForPackage:'stx') asFilename construct:relativepath)
|
|
146 |
recursiveCopyTo:(buildDirectory construct:'stx').
|
|
147 |
!
|
|
148 |
|
|
149 |
copyDirectoryForBuild:subdir
|
2598
|
150 |
|targetDir targetFile|
|
2596
|
151 |
|
|
152 |
targetDir := buildDirectory / 'stx' / subdir.
|
|
153 |
targetDir exists ifFalse:[
|
|
154 |
targetDir makeDirectory.
|
2598
|
155 |
].
|
|
156 |
(mySTXTopDirectory / subdir) directoryContentsAsFilenamesDo:[:eachFile |
|
|
157 |
eachFile isDirectory ifFalse:[
|
|
158 |
targetFile := targetDir / eachFile baseName.
|
|
159 |
(targetFile exists not
|
|
160 |
or:[ targetFile modificationTime < eachFile modificationTime ]) ifTrue:[
|
|
161 |
self activityNotification:'copying ',eachFile pathName,'...'.
|
2596
|
162 |
eachFile copyTo:(targetDir construct:eachFile baseName)
|
|
163 |
]
|
|
164 |
].
|
|
165 |
].
|
2598
|
166 |
self activityNotification:nil
|
|
167 |
!
|
|
168 |
|
2600
|
169 |
copyResourcesForPackage:aPackage
|
|
170 |
|module directory|
|
|
171 |
|
|
172 |
module := aPackage asPackageId module.
|
|
173 |
directory := aPackage asPackageId directory.
|
|
174 |
|
|
175 |
(myTopDirectory / module / directory / 'resources' ) exists ifTrue:[
|
|
176 |
(myTopDirectory / module / directory / 'resources' )
|
|
177 |
recursiveCopyTo:(buildDirectory / module / directory)
|
|
178 |
].
|
|
179 |
(myTopDirectory / module / directory / 'styles' ) exists ifTrue:[
|
|
180 |
(myTopDirectory / module / directory / 'styles' )
|
|
181 |
recursiveCopyTo:(buildDirectory / module / directory)
|
|
182 |
].
|
|
183 |
!
|
|
184 |
|
2599
|
185 |
copySTCDirectoryForBuild
|
|
186 |
|targetDir stc files|
|
|
187 |
|
|
188 |
targetDir := buildDirectory / 'stx' / 'stc'.
|
|
189 |
targetDir exists ifFalse:[ targetDir makeDirectory ].
|
|
190 |
|
|
191 |
stc := OperatingSystem isMSWINDOWSlike
|
|
192 |
ifTrue:[ 'stc.exe' ]
|
|
193 |
ifFalse:[ 'stc' ].
|
|
194 |
|
|
195 |
files := #( ) copyWith:stc.
|
|
196 |
|
|
197 |
files do:[:eachFile |
|
|
198 |
|sourceFile targetFile|
|
|
199 |
|
|
200 |
sourceFile := mySTXTopDirectory / 'stc' / eachFile.
|
|
201 |
targetFile := targetDir / eachFile.
|
|
202 |
(targetFile exists not
|
|
203 |
or:[ targetFile modificationTime < sourceFile modificationTime ]) ifTrue:[
|
|
204 |
self activityNotification:'copying ',sourceFile pathName,'...'.
|
|
205 |
sourceFile copyTo:targetFile
|
|
206 |
].
|
|
207 |
].
|
|
208 |
self activityNotification:nil
|
|
209 |
!
|
|
210 |
|
2600
|
211 |
copyStartupFilesFromSmalltalk
|
|
212 |
(buildDirectory / 'stx' / 'projects/smalltalk' ) exists ifFalse:[
|
|
213 |
(buildDirectory / 'stx' / 'projects/smalltalk' ) recursiveMakeDirectory.
|
|
214 |
].
|
|
215 |
|
|
216 |
#( 'keyboard.rc' 'keyboardMacros.rc' 'display.rc' 'd_win32.rc'
|
|
217 |
'host.rc' 'h_win32.rc'
|
|
218 |
) do:[:fn |
|
|
219 |
(myTopDirectory / 'stx' / 'projects/smalltalk' / fn)
|
|
220 |
copyTo: (buildDirectory / 'stx' / 'projects/smalltalk' / fn)
|
|
221 |
]
|
|
222 |
!
|
|
223 |
|
|
224 |
copySupportFilesForLinkage
|
|
225 |
|files|
|
|
226 |
|
|
227 |
OperatingSystem isMSWINDOWSlike ifTrue:[
|
|
228 |
files := #(
|
|
229 |
'support/win32/borland/cs3245.dll'
|
|
230 |
'support/win32/X11.dll'
|
|
231 |
'support/win32/Xext.dll'
|
|
232 |
'librun/librun.dll'
|
|
233 |
'libbc/librun.lib'
|
|
234 |
'libbc/cs32i.lib'
|
|
235 |
'librun/genDate.exe'
|
|
236 |
'librun/main.c'
|
|
237 |
).
|
|
238 |
] ifFalse:[
|
|
239 |
files := #(
|
|
240 |
'librun/genDate'
|
|
241 |
'librun/main.c'
|
|
242 |
'librun/librun.so'
|
|
243 |
)
|
|
244 |
].
|
|
245 |
|
|
246 |
files do:[:dllRelativePath |
|
|
247 |
((buildDirectory / 'stx' / dllRelativePath) exists
|
|
248 |
and:[ (mySTXTopDirectory / dllRelativePath) fileSize = (buildDirectory / 'stx' / dllRelativePath) fileSize
|
|
249 |
and:[ (mySTXTopDirectory / dllRelativePath) modificationTime < (buildDirectory / 'stx' / dllRelativePath) modificationTime
|
|
250 |
"/ and:[ (mySTXTopDirectory / dllRelativePath) sameContentsAs:(targetBuildDir / dllRelativePath) ]
|
|
251 |
]]) ifFalse:[
|
|
252 |
(buildDirectory / 'stx' / dllRelativePath) directory recursiveMakeDirectory.
|
|
253 |
(mySTXTopDirectory / dllRelativePath) copyTo:(buildDirectory / 'stx' / dllRelativePath).
|
|
254 |
]
|
|
255 |
].
|
|
256 |
!
|
|
257 |
|
2598
|
258 |
createHeaderFileFor:aClass in:packageTargetDir
|
|
259 |
|instVarList classInstVarList classVarList bindings superclassFilename
|
|
260 |
template file newContents oldContents|
|
|
261 |
|
|
262 |
instVarList := StringCollection new.
|
|
263 |
aClass instVarNames do:[:v |
|
|
264 |
instVarList add:('OBJ %1;' bindWith:v)
|
|
265 |
].
|
|
266 |
classInstVarList := StringCollection new.
|
|
267 |
aClass class instVarNames do:[:v |
|
|
268 |
(v includes:$_) ifTrue:[self halt].
|
|
269 |
classInstVarList add:('OBJ %1;' bindWith:v)
|
|
270 |
].
|
|
271 |
classVarList := StringCollection new.
|
|
272 |
aClass classVarNames do:[:v |
|
|
273 |
classVarList add:('extern OBJ %1_%2;' bindWith:aClass name with:v)
|
|
274 |
].
|
|
275 |
|
|
276 |
bindings := Dictionary new.
|
|
277 |
bindings at:'ClassName' put:aClass name.
|
|
278 |
aClass superclass isNil ifTrue:[
|
|
279 |
bindings at:'SuperclassName' put:'-'.
|
|
280 |
bindings at:'SuperclassFileInclude' put:nil.
|
|
281 |
] ifFalse:[
|
|
282 |
bindings at:'SuperclassName' put:aClass superclass name.
|
|
283 |
bindings at:'SuperclassFileName' put:(superclassFilename := Smalltalk fileNameForClass:aClass superclass).
|
|
284 |
bindings at:'SuperclassFileInclude' put:('#include "%1.STH"' bindWith:superclassFilename).
|
|
285 |
].
|
|
286 |
bindings at:'InstVarList' put:instVarList asString.
|
|
287 |
bindings at:'ClassVarList' put:classVarList asString.
|
|
288 |
bindings at:'ClassInstVarList' put:classInstVarList asString.
|
|
289 |
|
|
290 |
template :=
|
|
291 |
'/* This file was generated by ProjectBuilder. */
|
|
292 |
/* !!!!!!!! Do not change by hand !!!!!!!! */
|
|
293 |
|
|
294 |
/* Class: %(ClassName) */
|
|
295 |
/* Superclass: %(SuperclassName) */
|
|
296 |
|
|
297 |
%(SuperclassFileInclude)
|
|
298 |
|
|
299 |
/* INDIRECTGLOBALS */
|
|
300 |
#ifdef _HEADER_INST_
|
|
301 |
%(InstVarList)
|
|
302 |
#endif /* _HEADER_INST_ */
|
|
303 |
|
|
304 |
#ifdef _HEADER_CLASS_
|
|
305 |
%(ClassVarList)
|
|
306 |
#endif /* _HEADER_CLASS_ */
|
|
307 |
|
|
308 |
#ifdef _HEADER_CLASSINST_
|
|
309 |
%(ClassInstVarList)
|
|
310 |
#endif /* _HEADER_CLASSINST_ */
|
|
311 |
'.
|
|
312 |
newContents := template bindWithArguments:bindings.
|
|
313 |
file := packageTargetDir asFilename / ((Smalltalk fileNameForClass:aClass),'.STH').
|
|
314 |
(file exists not
|
|
315 |
or:[ (oldContents := file contents) ~= newContents ]) ifTrue:[
|
|
316 |
file contents: newContents.
|
|
317 |
].
|
2596
|
318 |
!
|
|
319 |
|
|
320 |
generateSourceFiles
|
|
321 |
sourceCodeManager notNil ifTrue:[
|
|
322 |
"/ check out / generate files there
|
|
323 |
self generateSourceFilesByCheckingOutUsing:sourceCodeManager
|
|
324 |
] ifFalse:[
|
|
325 |
"/ local build
|
|
326 |
"/ fileout the project
|
|
327 |
self generateSourceFilesByFilingOut
|
|
328 |
]
|
|
329 |
!
|
|
330 |
|
|
331 |
generateSourceFilesByCheckingOutUsing:aSourceCodeManager
|
|
332 |
"/ will no longer be needed/supported
|
|
333 |
|
|
334 |
|repository stxRepository module directory|
|
|
335 |
|
|
336 |
self halt.
|
|
337 |
"/ check out / generate files there
|
|
338 |
repository := (aSourceCodeManager repositoryNameForModule:module) ifNil:[aSourceCodeManager repositoryName].
|
|
339 |
stxRepository := aSourceCodeManager repositoryName.
|
|
340 |
|
|
341 |
(buildDirectory construct:'stx') exists ifFalse:[
|
|
342 |
(module ~= 'stx') ifTrue:[
|
|
343 |
OperatingSystem
|
|
344 |
executeCommand:('cvs -d ',stxRepository,' co stx')
|
|
345 |
inputFrom:nil
|
|
346 |
outputTo:Transcript
|
|
347 |
errorTo:Transcript
|
|
348 |
inDirectory:buildDirectory
|
|
349 |
onError:[:status| self error:'cvs update stx failed'].
|
|
350 |
].
|
|
351 |
].
|
|
352 |
|
|
353 |
((buildDirectory construct:module) construct:'CVS') exists ifFalse:[
|
|
354 |
OperatingSystem
|
|
355 |
executeCommand:('cvs -d ',repository,' co -l ',directory)
|
|
356 |
inputFrom:nil
|
|
357 |
outputTo:Transcript
|
|
358 |
errorTo:Transcript
|
|
359 |
inDirectory:buildDirectory
|
|
360 |
onError:[:status| self error:'cvs update failed'].
|
|
361 |
].
|
|
362 |
OperatingSystem
|
|
363 |
executeCommand:'cvs upd -d'
|
|
364 |
inputFrom:nil
|
|
365 |
outputTo:Transcript
|
|
366 |
errorTo:Transcript
|
|
367 |
inDirectory:(buildDirectory construct:module)
|
|
368 |
onError:[:status| self error:'cvs update failed'].
|
|
369 |
self halt.
|
|
370 |
!
|
|
371 |
|
|
372 |
generateSourceFilesByFilingOut
|
|
373 |
"/ local build
|
|
374 |
"/ fileout the project
|
|
375 |
|
|
376 |
(package module ~= 'stx') ifTrue:[
|
|
377 |
(buildDirectory / package module) makeDirectory.
|
|
378 |
].
|
|
379 |
|
2599
|
380 |
"/ file out the package(s) which are to be built
|
2598
|
381 |
((Array with:package))
|
2596
|
382 |
do:[:eachPackageToFileout |
|
2598
|
383 |
|packageId packageModule packageDirectory packageTargetDir packageDef|
|
2596
|
384 |
|
2598
|
385 |
packageId := eachPackageToFileout asPackageId.
|
|
386 |
packageModule := packageId module.
|
|
387 |
packageDirectory := packageId directory.
|
2596
|
388 |
packageTargetDir := (buildDirectory / packageModule / packageDirectory) recursiveMakeDirectory.
|
|
389 |
|
2598
|
390 |
packageDef := packageId projectDefinitionClass.
|
|
391 |
(packageDef compiled_classNames_common ,
|
|
392 |
packageDef compiled_classNamesForPlatform) do:[:eachClassName |
|
|
393 |
|cls|
|
|
394 |
|
|
395 |
cls := Smalltalk classNamed:eachClassName.
|
|
396 |
self assert:cls isLoaded.
|
|
397 |
cls fileOutIn:packageTargetDir
|
2596
|
398 |
].
|
2598
|
399 |
|
|
400 |
"/ (Smalltalk allClassesInPackage:eachPackageToFileout) do:[:cls |
|
|
401 |
"/ cls isPrivate ifFalse:[
|
|
402 |
"/ cls isLoaded ifFalse:[
|
|
403 |
"/ self halt.
|
|
404 |
"/ cls autoload.
|
|
405 |
"/ ].
|
|
406 |
"/ cls fileOutIn:packageTargetDir
|
|
407 |
"/ ]
|
|
408 |
"/ ].
|
2599
|
409 |
|
|
410 |
projectDefinitionClass forEachFileNameAndGeneratedContentsDo:[:fileName :fileContents |
|
|
411 |
((packageTargetDir / fileName) exists
|
|
412 |
and:[ (packageTargetDir / fileName) contents = fileContents ]) ifFalse:[
|
|
413 |
(packageTargetDir / fileName) contents:fileContents.
|
|
414 |
].
|
|
415 |
].
|
2598
|
416 |
].
|
2599
|
417 |
|
|
418 |
"/ generate header files in prerequisite packages...
|
2598
|
419 |
(projectDefinitionClass allPreRequisites)
|
|
420 |
do:[:eachPackageToFileout |
|
|
421 |
|packageId packageDef packageModule packageDirectory packageTargetDir|
|
|
422 |
|
|
423 |
packageId := eachPackageToFileout asPackageId.
|
|
424 |
packageModule := packageId module.
|
|
425 |
packageDirectory := packageId directory.
|
|
426 |
packageTargetDir := (buildDirectory / packageModule / packageDirectory) recursiveMakeDirectory.
|
|
427 |
|
|
428 |
packageDef := packageId projectDefinitionClass.
|
|
429 |
(packageDef compiled_classNames_common ,
|
|
430 |
packageDef compiled_classNamesForPlatform) do:[:eachClassName |
|
|
431 |
|cls|
|
|
432 |
|
|
433 |
cls := Smalltalk classNamed:eachClassName.
|
2600
|
434 |
"/ self assert:cls isLoaded.
|
2598
|
435 |
cls isLoaded ifTrue:[
|
|
436 |
self createHeaderFileFor:cls in:packageTargetDir
|
|
437 |
].
|
|
438 |
].
|
2600
|
439 |
self copyResourcesForPackage:eachPackageToFileout.
|
2596
|
440 |
].
|
|
441 |
|
|
442 |
"/ stx_libbasic2 preRequisitesForBuilding#(#'stx:libbasic')
|
|
443 |
!
|
|
444 |
|
|
445 |
setupBuildDirectory
|
|
446 |
buildDirectory exists ifFalse:[
|
|
447 |
buildDirectory recursiveMakeDirectory.
|
|
448 |
].
|
|
449 |
(buildDirectory / 'stx') exists ifFalse:[
|
|
450 |
(buildDirectory / 'stx') makeDirectory.
|
|
451 |
].
|
|
452 |
|
|
453 |
self copyDirectoryForBuild:'include'.
|
|
454 |
self copyDirectoryForBuild:'rules'.
|
|
455 |
!
|
|
456 |
|
|
457 |
validateBuildDirectoryIsPresent
|
|
458 |
|
|
459 |
^ self.
|
|
460 |
|
|
461 |
"/ [
|
|
462 |
"/ |default directoryIsOKForMe stc |
|
|
463 |
"/
|
|
464 |
"/ default := (buildDirectory ?
|
|
465 |
"/ PreviousBuildDirectory)
|
|
466 |
"/ ifNil:[ UserPreferences current buildDirectory].
|
|
467 |
"/
|
|
468 |
"/ buildDirectory := Dialog requestDirectoryName:'Temporary Work-ROOT for build:'
|
|
469 |
"/ default:default.
|
|
470 |
"/
|
|
471 |
"/ buildDirectory isEmptyOrNil ifTrue:[^ self].
|
|
472 |
"/ buildDirectory := buildDirectory asFilename.
|
|
473 |
"/ directoryIsOKForMe := true.
|
|
474 |
"/
|
|
475 |
"/ buildDirectory exists ifFalse:[
|
|
476 |
"/ Dialog warn:(self classResources string:'Work directory %1 does not exist.' with:buildDirectory).
|
|
477 |
"/ directoryIsOKForMe := false.
|
|
478 |
"/ ] ifTrue:[
|
|
479 |
"/ (buildDirectory construct:'stx') exists ifFalse:[
|
|
480 |
"/ Dialog warn:(self classResources stringWithCRs:'Work directory must contain an stx subDirectory,\which contains (at least) the stc and include subdirectories.').
|
|
481 |
"/ directoryIsOKForMe := false.
|
|
482 |
"/ ] ifTrue:[
|
|
483 |
"/ stc := (OperatingSystem isMSDOSlike) ifTrue:['stc.exe'] ifFalse:['stc'].
|
|
484 |
"/ (((buildDirectory construct:'stx')construct:'stc')construct:stc) exists ifFalse:[
|
|
485 |
"/ Dialog warn:(self classResources stringWithCRs:'Work directory must contain an stc compiler in the stx/stc subDirectory.').
|
|
486 |
"/ directoryIsOKForMe := false.
|
|
487 |
"/ ].
|
|
488 |
"/ ((buildDirectory construct:'stx')construct:'include') exists ifFalse:[
|
|
489 |
"/ Dialog warn:(self classResources stringWithCRs:'Work directory must have had a make run before (for include files to exists).').
|
|
490 |
"/ directoryIsOKForMe := false.
|
|
491 |
"/ ].
|
|
492 |
"/ ]
|
|
493 |
"/ ].
|
|
494 |
"/ directoryIsOKForMe
|
|
495 |
"/ ] whileFalse
|
|
496 |
! !
|
|
497 |
|
|
498 |
!ProjectBuilder class methodsFor:'documentation'!
|
|
499 |
|
|
500 |
version_CVS
|
|
501 |
^ '$Header$'
|
|
502 |
! !
|