author | Claus Gittinger <cg@exept.de> |
Mon, 03 Sep 2012 22:29:39 +0200 | |
changeset 2910 | 8024f7e8f9f4 |
parent 2909 | da16870432b5 |
child 2911 | e12e4a47cfaa |
permissions | -rw-r--r-- |
2741 | 1 |
" |
2 |
COPYRIGHT (c) 2009 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 |
" |
|
2596 | 12 |
"{ Package: 'stx:libtool2' }" |
13 |
||
2635 | 14 |
"{ NameSpace: Tools }" |
15 |
||
2596 | 16 |
Object subclass:#ProjectBuilder |
17 |
instanceVariableNames:'package projectDefinitionClass sourceCodeManager buildDirectory |
|
2673 | 18 |
myWorkingDirectory mySTXTopDirectory myTopDirectory outputStream |
2680 | 19 |
makeExeOnly usedCompiler' |
2596 | 20 |
classVariableNames:'PreviousBuildDirectory' |
21 |
poolDictionaries:'' |
|
22 |
category:'System-Support-Projects' |
|
23 |
! |
|
24 |
||
2741 | 25 |
!ProjectBuilder class methodsFor:'documentation'! |
26 |
||
27 |
copyright |
|
28 |
" |
|
29 |
COPYRIGHT (c) 2009 by eXept Software AG |
|
30 |
All Rights Reserved |
|
31 |
||
32 |
This software is furnished under a license and may be used |
|
33 |
only in accordance with the terms of that license and with the |
|
34 |
inclusion of the above copyright notice. This software may not |
|
35 |
be provided or otherwise made available to, or used by, any |
|
36 |
other person. No title to or ownership of the software is |
|
37 |
hereby transferred. |
|
38 |
" |
|
39 |
! ! |
|
2596 | 40 |
|
2633 | 41 |
!ProjectBuilder class methodsFor:'accessing'! |
42 |
||
43 |
previousBuildDirectory |
|
44 |
^ PreviousBuildDirectory |
|
45 |
! |
|
46 |
||
47 |
previousBuildDirectory:something |
|
48 |
PreviousBuildDirectory := something. |
|
49 |
! ! |
|
50 |
||
2596 | 51 |
!ProjectBuilder class methodsFor:'examples'! |
52 |
||
2644 | 53 |
example1 |
54 |
Smalltalk loadPackage:'stx:projects/helloWorldApp' asAutoloaded:true. |
|
55 |
||
56 |
self new |
|
57 |
package:'stx:projects/helloWorldApp'; |
|
58 |
build |
|
2622 | 59 |
! |
60 |
||
2644 | 61 |
example2 |
62 |
|builder| |
|
63 |
||
64 |
Smalltalk loadPackage:'stx:clients/Demos/foxCalcApplication' asAutoloaded:true. |
|
65 |
||
66 |
builder := self new. |
|
2909 | 67 |
builder |
68 |
package:'stx:clients/Demos/foxCalcApplication'; |
|
69 |
build. |
|
2644 | 70 |
|
71 |
UserPreferences fileBrowserClass openOnDirectory:builder packageBuildDirectory. |
|
2909 | 72 |
|
73 |
"Modified: / 03-09-2012 / 19:23:53 / cg" |
|
2596 | 74 |
! ! |
75 |
||
2873 | 76 |
!ProjectBuilder class methodsFor:'queries'! |
77 |
||
78 |
defaultUsedCompiler |
|
79 |
|compiler| |
|
80 |
||
81 |
(compiler := UserPreferences current usedCompilerForBuild) notNil ifTrue:[ |
|
82 |
^ compiler |
|
83 |
]. |
|
84 |
||
85 |
OperatingSystem isMSWINDOWSlike ifTrue:[ |
|
86 |
^ 'bcc' |
|
87 |
]. |
|
88 |
^ 'gcc' |
|
89 |
||
90 |
"Created: / 21-01-2012 / 14:06:51 / cg" |
|
91 |
! |
|
92 |
||
93 |
listOfPossibleCompilers |
|
94 |
OperatingSystem isMSWINDOWSlike ifTrue:[ |
|
2909 | 95 |
^ #('bcc' 'vc' 'tcc' 'lcc' 'gcc' ) |
2873 | 96 |
]. |
97 |
^ #('gcc') |
|
98 |
||
99 |
"Created: / 21-01-2012 / 14:04:15 / cg" |
|
100 |
! ! |
|
101 |
||
2596 | 102 |
!ProjectBuilder methodsFor:'accessing'! |
103 |
||
2644 | 104 |
buildDirectory |
105 |
^ buildDirectory |
|
2622 | 106 |
! |
107 |
||
2634 | 108 |
buildDirectory:something |
109 |
buildDirectory := something. |
|
110 |
! |
|
111 |
||
2673 | 112 |
makeExeOnly:aBoolean |
113 |
makeExeOnly := aBoolean. |
|
114 |
! |
|
115 |
||
2644 | 116 |
package:aPackageIDOrSymbol |
117 |
package := aPackageIDOrSymbol asPackageId. |
|
2596 | 118 |
! |
119 |
||
2644 | 120 |
packageBuildDirectory |
121 |
"the directoray, where the deployable binary is created (xxxSetup.exe)" |
|
2622 | 122 |
|
123 |
^ buildDirectory / (package asPackageId module) / (package asPackageId directory) |
|
2635 | 124 |
! |
125 |
||
2644 | 126 |
projectDefinitionClass:something |
127 |
projectDefinitionClass := something. |
|
2680 | 128 |
! |
129 |
||
2683 | 130 |
suffixForHeaderFiles |
131 |
^ OperatingSystem isUNIXlike ifTrue:['.H'] ifFalse:['.STH'] |
|
132 |
! |
|
133 |
||
2873 | 134 |
usedCompilerForBuild:something |
2680 | 135 |
usedCompiler := something. |
2873 | 136 |
|
137 |
"Created: / 22-01-2012 / 10:50:48 / cg" |
|
2596 | 138 |
! ! |
139 |
||
140 |
!ProjectBuilder methodsFor:'building'! |
|
141 |
||
2644 | 142 |
build |
143 |
"/ intermediate - this will move into a commonly used utility class |
|
2635 | 144 |
"/ (where all the project code support will be collected). |
145 |
||
2647 | 146 |
|makeOutput| |
147 |
||
148 |
makeOutput := TextStream on:(Text new:10000). |
|
149 |
self buildWithColorizedOutputTo:makeOutput. |
|
150 |
||
151 |
TextView openWith:makeOutput contents. |
|
152 |
! |
|
153 |
||
154 |
buildWithColorizedOutputTo:makeOutput |
|
155 |
"/ intermediate - this will move into a commonly used utility class |
|
156 |
"/ (where all the project code support will be collected). |
|
157 |
||
158 |
|stdOut stdErr lock| |
|
2635 | 159 |
|
2644 | 160 |
lock := Semaphore forMutualExclusion. |
2647 | 161 |
|
2644 | 162 |
stdErr := ActorStream new |
163 |
nextPutBlock:[:char | |
|
164 |
lock critical:[ |
|
165 |
makeOutput emphasis:{#backgroundColor->Color red. #color->Color white.}. |
|
166 |
makeOutput nextPut:char. |
|
167 |
makeOutput emphasis:nil. |
|
168 |
] |
|
169 |
]; |
|
2683 | 170 |
nextPutAllBlock:[:string | |
2873 | 171 |
lock critical:[ |
172 |
"/ (string includesString:'das Ziel' )ifTrue:[self halt]. |
|
2644 | 173 |
makeOutput emphasis:{#backgroundColor->Color red. #color->Color white.}. |
2683 | 174 |
makeOutput nextPutAll:string. |
2644 | 175 |
makeOutput emphasis:nil. |
176 |
] |
|
177 |
]. |
|
178 |
stdOut := ActorStream new |
|
179 |
nextPutBlock:[:char | |
|
180 |
lock critical:[ |
|
181 |
makeOutput nextPut:char. |
|
182 |
] |
|
183 |
]; |
|
2683 | 184 |
nextPutAllBlock:[:string | |
2873 | 185 |
lock critical:[ |
186 |
"/ (string includesString:'das Ziel' )ifTrue:[self halt]. |
|
2683 | 187 |
makeOutput nextPutAll:string. |
2644 | 188 |
] |
189 |
]. |
|
2635 | 190 |
|
2644 | 191 |
self buildWithOutputTo:stdOut errorTo:stdErr. |
2873 | 192 |
|
193 |
"Modified: / 21-01-2012 / 13:49:13 / cg" |
|
2611 | 194 |
! |
195 |
||
196 |
buildWithOutputTo:stdOut errorTo:stdErr |
|
197 |
"/ intermediate - this will move into a commonly used utility class |
|
198 |
"/ (where all the project code support will be collected). |
|
199 |
||
2596 | 200 |
|module directory| |
201 |
||
202 |
projectDefinitionClass := ProjectDefinition definitionClassForPackage:package. |
|
203 |
projectDefinitionClass isNil ifTrue:[ |
|
204 |
self error:('Missing ProjectDefinition class for "',package asString,'"') |
|
205 |
]. |
|
206 |
||
207 |
"/ ensure that everything is loaded... |
|
208 |
projectDefinitionClass loadAsAutoloaded:false. |
|
209 |
projectDefinitionClass loadExtensions. |
|
210 |
projectDefinitionClass loadAllClassesAsAutoloaded:false. |
|
211 |
||
212 |
module := package module. |
|
213 |
directory := package directory. |
|
214 |
||
215 |
buildDirectory isNil ifTrue:[ |
|
2634 | 216 |
buildDirectory := PreviousBuildDirectory ifNil:[ UserPreferences current buildDirectory ]. |
217 |
buildDirectory isNil ifTrue:[ |
|
218 |
buildDirectory := Filename tempDirectory construct:'stx_build'. |
|
219 |
]. |
|
2596 | 220 |
]. |
221 |
buildDirectory := buildDirectory asFilename. |
|
222 |
||
223 |
"/ self validateBuildDirectoryIsPresent. |
|
224 |
||
225 |
PreviousBuildDirectory := buildDirectory. |
|
226 |
||
227 |
"/ UserPreferences current localBuild:true |
|
228 |
UserPreferences current localBuild ifFalse:[ |
|
229 |
SourceCodeManager notNil ifTrue:[ |
|
2861
b8c6e02e60a1
Do not call obsolete methods in SourceCodeManager class
Stefan Vogel <sv@exept.de>
parents:
2852
diff
changeset
|
230 |
sourceCodeManager := SourceCodeManagerUtilities default sourceCodeManagerFor:projectDefinitionClass. |
2596 | 231 |
] |
232 |
]. |
|
233 |
sourceCodeManager := nil. |
|
234 |
||
2598 | 235 |
myTopDirectory := |
2596 | 236 |
Smalltalk packagePath |
237 |
detect:[:aPath | |
|
238 |
(aPath asFilename / 'stx' / 'include') exists |
|
239 |
and: [ (aPath asFilename / 'stx' / 'rules') exists ]] |
|
240 |
ifNone:nil. |
|
2598 | 241 |
myTopDirectory isNil ifTrue:[ |
242 |
self error:('Cannot figure out my top directory (where stx/include and stx/rules are)') |
|
2596 | 243 |
]. |
2598 | 244 |
myTopDirectory := myTopDirectory asFilename. |
245 |
mySTXTopDirectory := myTopDirectory / 'stx'. |
|
2613
b8d38caaa884
changed: #buildWithOutputTo:errorTo:
Claus Gittinger <cg@exept.de>
parents:
2612
diff
changeset
|
246 |
|
2596 | 247 |
self setupBuildDirectory. |
2628 | 248 |
self activityNotification:'Generating stc directory...'. |
2599 | 249 |
self copySTCDirectoryForBuild. |
2628 | 250 |
self activityNotification:'Generating source files...'. |
2596 | 251 |
self generateSourceFiles. |
2672
a1cda5d8943d
changed: #buildWithOutputTo:errorTo:
Claus Gittinger <cg@exept.de>
parents:
2647
diff
changeset
|
252 |
self activityNotification:'Copying dlls for linkage...'. |
2600 | 253 |
self copyDLLsForLinkage. |
2672
a1cda5d8943d
changed: #buildWithOutputTo:errorTo:
Claus Gittinger <cg@exept.de>
parents:
2647
diff
changeset
|
254 |
self activityNotification:'Copying support files for linkage...'. |
2600 | 255 |
self copySupportFilesForLinkage. |
256 |
self copyStartupFilesFromSmalltalk. |
|
2596 | 257 |
|
2628 | 258 |
self activityNotification:'Executing make...'. |
2611 | 259 |
self makeWithOutputTo:stdOut errorTo:stdErr. |
2898 | 260 |
! ! |
261 |
||
262 |
!ProjectBuilder methodsFor:'building/private'! |
|
2596 | 263 |
|
2644 | 264 |
copyDLLsForLinkage |
2723 | 265 |
|targetBuildDir preRequisites dllRelativePaths| |
266 |
||
2644 | 267 |
|
268 |
targetBuildDir := buildDirectory / package module / package directory. |
|
269 |
||
2723 | 270 |
preRequisites := projectDefinitionClass allPreRequisites. |
271 |
OperatingSystem isUNIXlike ifTrue:[ |
|
272 |
"For now: unix Makefiles require some libs implicitely..." |
|
273 |
preRequisites := preRequisites union:#( |
|
274 |
'stx:goodies/refactoryBrowser/parser' |
|
275 |
'stx:libtool' |
|
276 |
). |
|
277 |
]. |
|
278 |
||
279 |
preRequisites do:[:eachPackageToFileout | |
|
2644 | 280 |
|packageId packageDef packageModule packageDirectory packageTargetDir |
2905 | 281 |
dllSource dllSourceDir libraryName dllRelativePath objDir| |
2644 | 282 |
|
283 |
packageId := eachPackageToFileout asPackageId. |
|
284 |
packageModule := packageId module. |
|
285 |
packageDirectory := packageId directory. |
|
286 |
packageTargetDir := (buildDirectory / packageModule / packageDirectory) recursiveMakeDirectory. |
|
287 |
||
288 |
packageDef := packageId projectDefinitionClass. |
|
289 |
libraryName := packageDef libraryName. |
|
290 |
||
291 |
"/ mhmh - take them from my tree or from the projects/smalltalk execution directory ?? |
|
292 |
dllSourceDir := myTopDirectory / packageModule / packageDirectory. |
|
2909 | 293 |
|
2644 | 294 |
OperatingSystem isMSWINDOWSlike ifTrue:[ |
2909 | 295 |
objDir := self objDirForUsedCompiler:usedCompiler. |
296 |
||
2905 | 297 |
"/ dllRelativePath := objDir,'/',(libraryName,'.dll'). |
2644 | 298 |
"/ (dllSourceDir / dllRelativePath) exists |
2905 | 299 |
dllRelativePaths := Array with:(objDir,'\', libraryName, '.dll'). |
2644 | 300 |
] ifFalse:[ |
2723 | 301 |
dllRelativePaths := Array with:(libraryName,'.so'). |
302 |
(packageModule = 'stx' and:[packageDirectory = 'libview']) ifTrue:[ |
|
303 |
dllRelativePaths := dllRelativePaths, #('XWorkstation.so' 'GLXWorkstation.so'). |
|
304 |
]. |
|
2644 | 305 |
]. |
2723 | 306 |
dllRelativePaths do:[:dllRelativePath| |
2896
6ed90332dbda
changed: #copyDLLsForLinkage
Claus Gittinger <cg@exept.de>
parents:
2895
diff
changeset
|
307 |
|source dest| |
6ed90332dbda
changed: #copyDLLsForLinkage
Claus Gittinger <cg@exept.de>
parents:
2895
diff
changeset
|
308 |
|
6ed90332dbda
changed: #copyDLLsForLinkage
Claus Gittinger <cg@exept.de>
parents:
2895
diff
changeset
|
309 |
source := dllSourceDir / dllRelativePath. |
6ed90332dbda
changed: #copyDLLsForLinkage
Claus Gittinger <cg@exept.de>
parents:
2895
diff
changeset
|
310 |
dest := packageTargetDir / dllRelativePath. |
6ed90332dbda
changed: #copyDLLsForLinkage
Claus Gittinger <cg@exept.de>
parents:
2895
diff
changeset
|
311 |
(dest exists not |
6ed90332dbda
changed: #copyDLLsForLinkage
Claus Gittinger <cg@exept.de>
parents:
2895
diff
changeset
|
312 |
or:[source fileSize ~= dest fileSize |
6ed90332dbda
changed: #copyDLLsForLinkage
Claus Gittinger <cg@exept.de>
parents:
2895
diff
changeset
|
313 |
or:[source modificationTime >= dest modificationTime |
2723 | 314 |
"/ or:[ ((dllSourceDir / dllRelativePath) sameContentsAs:(packageTargetDir / dllRelativePath)) not ] |
315 |
]]) ifTrue:[ |
|
2896
6ed90332dbda
changed: #copyDLLsForLinkage
Claus Gittinger <cg@exept.de>
parents:
2895
diff
changeset
|
316 |
Transcript showCR:'updating ',dllRelativePath. |
6ed90332dbda
changed: #copyDLLsForLinkage
Claus Gittinger <cg@exept.de>
parents:
2895
diff
changeset
|
317 |
dest directory recursiveMakeDirectory. |
6ed90332dbda
changed: #copyDLLsForLinkage
Claus Gittinger <cg@exept.de>
parents:
2895
diff
changeset
|
318 |
source copyTo:dest. |
2723 | 319 |
]. |
320 |
]. |
|
2644 | 321 |
]. |
2896
6ed90332dbda
changed: #copyDLLsForLinkage
Claus Gittinger <cg@exept.de>
parents:
2895
diff
changeset
|
322 |
|
2909 | 323 |
"Modified: / 03-09-2012 / 20:07:23 / cg" |
2644 | 324 |
! |
325 |
||
326 |
copyDirectory:relativepath |
|
327 |
"/ need rules in stx |
|
328 |
((Smalltalk projectDirectoryForPackage:'stx') asFilename construct:relativepath) |
|
329 |
recursiveCopyTo:(buildDirectory construct:'stx'). |
|
330 |
! |
|
331 |
||
332 |
copyDirectoryForBuild:subdir |
|
333 |
|targetDir targetFile| |
|
334 |
||
335 |
targetDir := buildDirectory / 'stx' / subdir. |
|
336 |
targetDir exists ifFalse:[ |
|
337 |
targetDir makeDirectory. |
|
338 |
]. |
|
339 |
(mySTXTopDirectory / subdir) directoryContentsAsFilenamesDo:[:eachFile | |
|
340 |
eachFile isDirectory ifFalse:[ |
|
341 |
targetFile := targetDir / eachFile baseName. |
|
342 |
(targetFile exists not |
|
343 |
or:[ targetFile modificationTime < eachFile modificationTime ]) ifTrue:[ |
|
344 |
self activityNotification:'copying ',eachFile pathName,'...'. |
|
345 |
eachFile copyTo:(targetDir construct:eachFile baseName) |
|
346 |
] |
|
347 |
]. |
|
348 |
]. |
|
349 |
self activityNotification:nil |
|
350 |
! |
|
351 |
||
352 |
copyResourcesForPackage:aPackage |
|
353 |
|module directory| |
|
354 |
||
355 |
module := aPackage asPackageId module. |
|
356 |
directory := aPackage asPackageId directory. |
|
357 |
||
358 |
(myTopDirectory / module / directory / 'resources' ) exists ifTrue:[ |
|
359 |
(myTopDirectory / module / directory / 'resources' ) |
|
360 |
recursiveCopyTo:(buildDirectory / module / directory) |
|
361 |
]. |
|
362 |
(myTopDirectory / module / directory / 'styles' ) exists ifTrue:[ |
|
363 |
(myTopDirectory / module / directory / 'styles' ) |
|
364 |
recursiveCopyTo:(buildDirectory / module / directory) |
|
365 |
]. |
|
366 |
! |
|
367 |
||
368 |
copySTCDirectoryForBuild |
|
369 |
|targetDir stc files| |
|
370 |
||
371 |
targetDir := buildDirectory / 'stx' / 'stc'. |
|
372 |
targetDir exists ifFalse:[ targetDir makeDirectory ]. |
|
373 |
||
374 |
stc := OperatingSystem isMSWINDOWSlike |
|
375 |
ifTrue:[ 'stc.exe' ] |
|
376 |
ifFalse:[ 'stc' ]. |
|
377 |
||
378 |
files := #( ) copyWith:stc. |
|
379 |
||
380 |
files do:[:eachFile | |
|
381 |
|sourceFile targetFile| |
|
382 |
||
383 |
sourceFile := mySTXTopDirectory / 'stc' / eachFile. |
|
384 |
targetFile := targetDir / eachFile. |
|
385 |
(targetFile exists not |
|
386 |
or:[ targetFile modificationTime < sourceFile modificationTime ]) ifTrue:[ |
|
387 |
self activityNotification:'copying ',sourceFile pathName,'...'. |
|
388 |
sourceFile copyTo:targetFile |
|
389 |
]. |
|
390 |
]. |
|
2683 | 391 |
|
392 |
OperatingSystem isUNIXlike ifTrue:[ |
|
393 |
(targetDir / 'stc') makeExecutableForAll |
|
394 |
]. |
|
395 |
||
2644 | 396 |
self activityNotification:nil |
397 |
! |
|
398 |
||
399 |
copyStartupFilesFromSmalltalk |
|
400 |
(buildDirectory / 'stx' / 'projects/smalltalk' ) exists ifFalse:[ |
|
401 |
(buildDirectory / 'stx' / 'projects/smalltalk' ) recursiveMakeDirectory. |
|
402 |
]. |
|
403 |
||
2678
cca2788228ad
added: #copySupportFilesForExecution
Claus Gittinger <cg@exept.de>
parents:
2677
diff
changeset
|
404 |
#( |
cca2788228ad
added: #copySupportFilesForExecution
Claus Gittinger <cg@exept.de>
parents:
2677
diff
changeset
|
405 |
'keyboard.rc' |
cca2788228ad
added: #copySupportFilesForExecution
Claus Gittinger <cg@exept.de>
parents:
2677
diff
changeset
|
406 |
'keyboardMacros.rc' |
cca2788228ad
added: #copySupportFilesForExecution
Claus Gittinger <cg@exept.de>
parents:
2677
diff
changeset
|
407 |
'display.rc' |
cca2788228ad
added: #copySupportFilesForExecution
Claus Gittinger <cg@exept.de>
parents:
2677
diff
changeset
|
408 |
'd_win32.rc' |
cca2788228ad
added: #copySupportFilesForExecution
Claus Gittinger <cg@exept.de>
parents:
2677
diff
changeset
|
409 |
'host.rc' |
cca2788228ad
added: #copySupportFilesForExecution
Claus Gittinger <cg@exept.de>
parents:
2677
diff
changeset
|
410 |
'h_win32.rc' |
cca2788228ad
added: #copySupportFilesForExecution
Claus Gittinger <cg@exept.de>
parents:
2677
diff
changeset
|
411 |
'smalltalk.rc' |
cca2788228ad
added: #copySupportFilesForExecution
Claus Gittinger <cg@exept.de>
parents:
2677
diff
changeset
|
412 |
'private.rc' |
2644 | 413 |
) do:[:fn | |
414 |
(myTopDirectory / 'stx' / 'projects/smalltalk' / fn) |
|
415 |
copyTo: (buildDirectory / 'stx' / 'projects/smalltalk' / fn) |
|
2678
cca2788228ad
added: #copySupportFilesForExecution
Claus Gittinger <cg@exept.de>
parents:
2677
diff
changeset
|
416 |
]. |
cca2788228ad
added: #copySupportFilesForExecution
Claus Gittinger <cg@exept.de>
parents:
2677
diff
changeset
|
417 |
|
cca2788228ad
added: #copySupportFilesForExecution
Claus Gittinger <cg@exept.de>
parents:
2677
diff
changeset
|
418 |
(myTopDirectory / 'stx' / 'doc/online/english/LICENCE_STX.html') |
cca2788228ad
added: #copySupportFilesForExecution
Claus Gittinger <cg@exept.de>
parents:
2677
diff
changeset
|
419 |
copyTo: (buildDirectory / 'stx' / 'projects/smalltalk' / 'LICENCE_STX.html'). |
2644 | 420 |
! |
421 |
||
422 |
copySupportFilesForLinkage |
|
423 |
|files| |
|
424 |
||
425 |
OperatingSystem isMSWINDOWSlike ifTrue:[ |
|
426 |
files := #( |
|
427 |
'librun/genDate.exe' |
|
428 |
'librun/main.c' |
|
2673 | 429 |
'projects/smalltalk/stx_16x16.ico' |
430 |
'projects/smalltalk/stx_32x32.ico' |
|
431 |
'projects/smalltalk/stx_splash.bmp' |
|
2644 | 432 |
). |
2905 | 433 |
|
434 |
usedCompiler = 'bcc' ifTrue:[ |
|
435 |
files := files , #( |
|
436 |
'librun/objbc/librun.dll' |
|
437 |
'support/win32/borland/cs3245.dll' |
|
438 |
'support/win32/X11.dll' |
|
439 |
'support/win32/Xext.dll' |
|
440 |
'libbc/librun.lib' |
|
441 |
'libbc/cs32i.lib' |
|
442 |
). |
|
443 |
]. |
|
444 |
usedCompiler = 'vc' ifTrue:[ |
|
445 |
files := files , #( |
|
446 |
'librun/objvc/librun.dll' |
|
447 |
'libvc/librun.lib' |
|
448 |
). |
|
449 |
]. |
|
2644 | 450 |
] ifFalse:[ |
451 |
files := #( |
|
452 |
'librun/main.c' |
|
453 |
'librun/librun.so' |
|
454 |
) |
|
455 |
]. |
|
2677
e2c24a1be97f
changed: #copySupportFilesForLinkage
Claus Gittinger <cg@exept.de>
parents:
2673
diff
changeset
|
456 |
files := files asOrderedCollection. |
e2c24a1be97f
changed: #copySupportFilesForLinkage
Claus Gittinger <cg@exept.de>
parents:
2673
diff
changeset
|
457 |
|
e2c24a1be97f
changed: #copySupportFilesForLinkage
Claus Gittinger <cg@exept.de>
parents:
2673
diff
changeset
|
458 |
OperatingSystem isMSWINDOWSlike ifTrue:[ |
e2c24a1be97f
changed: #copySupportFilesForLinkage
Claus Gittinger <cg@exept.de>
parents:
2673
diff
changeset
|
459 |
projectDefinitionClass applicationIconFileName notNil ifTrue:[ |
2678
cca2788228ad
added: #copySupportFilesForExecution
Claus Gittinger <cg@exept.de>
parents:
2677
diff
changeset
|
460 |
files add:('projects/smalltalk/',projectDefinitionClass applicationIconFileName,'.ico') |
cca2788228ad
added: #copySupportFilesForExecution
Claus Gittinger <cg@exept.de>
parents:
2677
diff
changeset
|
461 |
]. |
cca2788228ad
added: #copySupportFilesForExecution
Claus Gittinger <cg@exept.de>
parents:
2677
diff
changeset
|
462 |
projectDefinitionClass splashFileName notNil ifTrue:[ |
cca2788228ad
added: #copySupportFilesForExecution
Claus Gittinger <cg@exept.de>
parents:
2677
diff
changeset
|
463 |
files add:('projects/smalltalk/',projectDefinitionClass splashFileName,'.bmp') |
cca2788228ad
added: #copySupportFilesForExecution
Claus Gittinger <cg@exept.de>
parents:
2677
diff
changeset
|
464 |
]. |
2677
e2c24a1be97f
changed: #copySupportFilesForLinkage
Claus Gittinger <cg@exept.de>
parents:
2673
diff
changeset
|
465 |
]. |
2644 | 466 |
|
467 |
files do:[:dllRelativePath | |
|
2684 | 468 |
(mySTXTopDirectory / dllRelativePath) exists ifTrue:[ |
469 |
((buildDirectory / 'stx' / dllRelativePath) exists |
|
470 |
and:[ (mySTXTopDirectory / dllRelativePath) fileSize = (buildDirectory / 'stx' / dllRelativePath) fileSize |
|
471 |
and:[ (mySTXTopDirectory / dllRelativePath) modificationTime < (buildDirectory / 'stx' / dllRelativePath) modificationTime |
|
472 |
"/ and:[ (mySTXTopDirectory / dllRelativePath) sameContentsAs:(targetBuildDir / dllRelativePath) ] |
|
473 |
]]) ifFalse:[ |
|
474 |
(buildDirectory / 'stx' / dllRelativePath) directory recursiveMakeDirectory. |
|
475 |
(mySTXTopDirectory / dllRelativePath) copyTo:(buildDirectory / 'stx' / dllRelativePath). |
|
476 |
] |
|
477 |
] ifFalse:[ |
|
478 |
self error:'Missing file: ',dllRelativePath printString mayProceed:true. |
|
479 |
]. |
|
2614 | 480 |
]. |
2873 | 481 |
|
2905 | 482 |
"Modified: / 20-08-2012 / 17:10:37 / cg" |
2600 | 483 |
! |
484 |
||
2644 | 485 |
createHeaderFileFor:aClass in:packageTargetDir |
486 |
|instVarList classInstVarList classVarList bindings superclassFilename |
|
487 |
template file newContents oldContents| |
|
488 |
||
489 |
instVarList := StringCollection new. |
|
490 |
aClass instVarNames do:[:v | |
|
491 |
instVarList add:('OBJ %1;' bindWith:v) |
|
492 |
]. |
|
493 |
classInstVarList := StringCollection new. |
|
494 |
aClass class instVarNames do:[:v | |
|
495 |
(v includes:$_) ifTrue:[self halt]. |
|
496 |
classInstVarList add:('OBJ %1;' bindWith:v) |
|
497 |
]. |
|
498 |
classVarList := StringCollection new. |
|
499 |
aClass classVarNames do:[:v | |
|
500 |
classVarList add:('extern OBJ %1_%2;' bindWith:aClass name with:v) |
|
501 |
]. |
|
2614 | 502 |
|
2644 | 503 |
bindings := Dictionary new. |
504 |
bindings at:'ClassName' put:aClass name. |
|
505 |
aClass superclass isNil ifTrue:[ |
|
506 |
bindings at:'SuperclassName' put:'-'. |
|
2852 | 507 |
bindings at:'SuperclassFileInclude' put:''. |
2644 | 508 |
] ifFalse:[ |
509 |
bindings at:'SuperclassName' put:aClass superclass name. |
|
510 |
bindings at:'SuperclassFileName' put:(superclassFilename := Smalltalk fileNameForClass:aClass superclass). |
|
511 |
bindings at:'SuperclassFileInclude' put:('#include "%1.STH"' bindWith:superclassFilename). |
|
512 |
]. |
|
513 |
bindings at:'InstVarList' put:instVarList asString. |
|
514 |
bindings at:'ClassVarList' put:classVarList asString. |
|
515 |
bindings at:'ClassInstVarList' put:classInstVarList asString. |
|
516 |
||
517 |
template := |
|
518 |
'/* This file was generated by ProjectBuilder. */ |
|
519 |
/* !!!!!!!! Do not change by hand !!!!!!!! */ |
|
520 |
||
521 |
/* Class: %(ClassName) */ |
|
522 |
/* Superclass: %(SuperclassName) */ |
|
523 |
||
524 |
%(SuperclassFileInclude) |
|
525 |
||
526 |
/* INDIRECTGLOBALS */ |
|
527 |
#ifdef _HEADER_INST_ |
|
528 |
%(InstVarList) |
|
529 |
#endif /* _HEADER_INST_ */ |
|
530 |
||
531 |
#ifdef _HEADER_CLASS_ |
|
532 |
%(ClassVarList) |
|
533 |
#endif /* _HEADER_CLASS_ */ |
|
534 |
||
535 |
#ifdef _HEADER_CLASSINST_ |
|
536 |
%(ClassInstVarList) |
|
537 |
#endif /* _HEADER_CLASSINST_ */ |
|
538 |
'. |
|
539 |
newContents := template bindWithArguments:bindings. |
|
2683 | 540 |
file := packageTargetDir asFilename / ((Smalltalk fileNameForClass:aClass),(self suffixForHeaderFiles)). |
2644 | 541 |
(file exists not |
542 |
or:[ (oldContents := file contents) ~= newContents ]) ifTrue:[ |
|
543 |
file contents: newContents. |
|
544 |
]. |
|
2852 | 545 |
|
546 |
"Modified: / 15-08-2011 / 14:58:46 / cg" |
|
2614 | 547 |
! |
548 |
||
2644 | 549 |
generateSourceFiles |
550 |
sourceCodeManager notNil ifTrue:[ |
|
551 |
"/ check out / generate files there |
|
552 |
self generateSourceFilesByCheckingOutUsing:sourceCodeManager |
|
553 |
] ifFalse:[ |
|
554 |
"/ local build |
|
555 |
"/ fileout the project |
|
556 |
self generateSourceFilesByFilingOut |
|
557 |
] |
|
2599 | 558 |
! |
559 |
||
2644 | 560 |
generateSourceFilesByCheckingOutUsing:aSourceCodeManager |
561 |
"/ will no longer be needed/supported |
|
562 |
||
563 |
|repository stxRepository module directory| |
|
564 |
||
2868
8a4d46fd157c
changed: #generateSourceFilesByCheckingOutUsing:
Claus Gittinger <cg@exept.de>
parents:
2861
diff
changeset
|
565 |
self breakPoint:#cg. |
8a4d46fd157c
changed: #generateSourceFilesByCheckingOutUsing:
Claus Gittinger <cg@exept.de>
parents:
2861
diff
changeset
|
566 |
|
2644 | 567 |
"/ check out / generate files there |
568 |
repository := (aSourceCodeManager repositoryNameForModule:module) ifNil:[aSourceCodeManager repositoryName]. |
|
569 |
stxRepository := aSourceCodeManager repositoryName. |
|
2600 | 570 |
|
2644 | 571 |
(buildDirectory construct:'stx') exists ifFalse:[ |
572 |
(module ~= 'stx') ifTrue:[ |
|
573 |
OperatingSystem |
|
574 |
executeCommand:('cvs -d ',stxRepository,' co stx') |
|
575 |
inputFrom:nil |
|
576 |
outputTo:Transcript |
|
577 |
errorTo:Transcript |
|
578 |
inDirectory:buildDirectory |
|
579 |
onError:[:status| self error:'cvs update stx failed']. |
|
580 |
]. |
|
581 |
]. |
|
2635 | 582 |
|
2644 | 583 |
((buildDirectory construct:module) construct:'CVS') exists ifFalse:[ |
584 |
OperatingSystem |
|
585 |
executeCommand:('cvs -d ',repository,' co -l ',directory) |
|
586 |
inputFrom:nil |
|
587 |
outputTo:Transcript |
|
588 |
errorTo:Transcript |
|
589 |
inDirectory:buildDirectory |
|
590 |
onError:[:status| self error:'cvs update failed']. |
|
591 |
]. |
|
592 |
OperatingSystem |
|
593 |
executeCommand:'cvs upd -d' |
|
594 |
inputFrom:nil |
|
595 |
outputTo:Transcript |
|
596 |
errorTo:Transcript |
|
597 |
inDirectory:(buildDirectory construct:module) |
|
598 |
onError:[:status| self error:'cvs update failed']. |
|
599 |
self halt. |
|
2868
8a4d46fd157c
changed: #generateSourceFilesByCheckingOutUsing:
Claus Gittinger <cg@exept.de>
parents:
2861
diff
changeset
|
600 |
|
8a4d46fd157c
changed: #generateSourceFilesByCheckingOutUsing:
Claus Gittinger <cg@exept.de>
parents:
2861
diff
changeset
|
601 |
"Modified: / 29-12-2011 / 14:02:56 / cg" |
2600 | 602 |
! |
603 |
||
2644 | 604 |
generateSourceFilesByFilingOut |
605 |
"/ local build |
|
606 |
"/ fileout the project |
|
607 |
||
2844
5e4e46856d8d
changed: #generateSourceFilesByFilingOut
Stefan Vogel <sv@exept.de>
parents:
2793
diff
changeset
|
608 |
|fullPathName| |
5e4e46856d8d
changed: #generateSourceFilesByFilingOut
Stefan Vogel <sv@exept.de>
parents:
2793
diff
changeset
|
609 |
|
2644 | 610 |
(package module ~= 'stx') ifTrue:[ |
611 |
(buildDirectory / package module) makeDirectory. |
|
612 |
]. |
|
613 |
||
614 |
"/ file out the package(s) which are to be built |
|
615 |
((Array with:package)) |
|
616 |
do:[:eachPackageToFileout | |
|
617 |
|packageId packageModule packageDirectory packageTargetDir packageDef| |
|
618 |
||
619 |
packageId := eachPackageToFileout asPackageId. |
|
620 |
packageModule := packageId module. |
|
621 |
packageDirectory := packageId directory. |
|
622 |
packageTargetDir := (buildDirectory / packageModule / packageDirectory) recursiveMakeDirectory. |
|
623 |
||
624 |
packageDef := packageId projectDefinitionClass. |
|
625 |
(packageDef compiled_classNames_common , |
|
626 |
packageDef compiled_classNamesForPlatform) do:[:eachClassName | |
|
627 |
|cls fileName newSource| |
|
628 |
||
629 |
cls := Smalltalk classNamed:eachClassName. |
|
630 |
self assert:cls isLoaded. |
|
631 |
fileName := (Smalltalk fileNameForClass:cls),'.st'. |
|
632 |
fileName := packageTargetDir asFilename construct:fileName. |
|
633 |
fileName exists ifTrue:[ |
|
634 |
newSource := String streamContents:[:s | cls fileOutOn:s withTimeStamp:false]. |
|
635 |
newSource = fileName contentsAsString ifFalse:[ |
|
636 |
fileName contents:newSource |
|
637 |
]. |
|
638 |
] ifFalse:[ |
|
639 |
cls fileOutIn:packageTargetDir withTimeStamp:false |
|
640 |
]. |
|
641 |
]. |
|
2596 | 642 |
|
2644 | 643 |
"/ (Smalltalk allClassesInPackage:eachPackageToFileout) do:[:cls | |
644 |
"/ cls isPrivate ifFalse:[ |
|
645 |
"/ cls isLoaded ifFalse:[ |
|
646 |
"/ self halt. |
|
647 |
"/ cls autoload. |
|
648 |
"/ ]. |
|
649 |
"/ cls fileOutIn:packageTargetDir |
|
650 |
"/ ] |
|
651 |
"/ ]. |
|
652 |
||
653 |
projectDefinitionClass forEachFileNameAndGeneratedContentsDo:[:fileName :fileContents | |
|
2844
5e4e46856d8d
changed: #generateSourceFilesByFilingOut
Stefan Vogel <sv@exept.de>
parents:
2793
diff
changeset
|
654 |
fullPathName := packageTargetDir construct:fileName. |
5e4e46856d8d
changed: #generateSourceFilesByFilingOut
Stefan Vogel <sv@exept.de>
parents:
2793
diff
changeset
|
655 |
fullPathName directory exists ifFalse:[ |
5e4e46856d8d
changed: #generateSourceFilesByFilingOut
Stefan Vogel <sv@exept.de>
parents:
2793
diff
changeset
|
656 |
"take care for files like 'autopackage/default.apspec'" |
5e4e46856d8d
changed: #generateSourceFilesByFilingOut
Stefan Vogel <sv@exept.de>
parents:
2793
diff
changeset
|
657 |
fullPathName directory makeDirectory. |
5e4e46856d8d
changed: #generateSourceFilesByFilingOut
Stefan Vogel <sv@exept.de>
parents:
2793
diff
changeset
|
658 |
]. |
5e4e46856d8d
changed: #generateSourceFilesByFilingOut
Stefan Vogel <sv@exept.de>
parents:
2793
diff
changeset
|
659 |
(fullPathName exists |
5e4e46856d8d
changed: #generateSourceFilesByFilingOut
Stefan Vogel <sv@exept.de>
parents:
2793
diff
changeset
|
660 |
and:[ fullPathName contents = fileContents ]) ifFalse:[ |
5e4e46856d8d
changed: #generateSourceFilesByFilingOut
Stefan Vogel <sv@exept.de>
parents:
2793
diff
changeset
|
661 |
fullPathName contents:fileContents. |
2644 | 662 |
]. |
663 |
]. |
|
664 |
]. |
|
2596 | 665 |
|
2644 | 666 |
"/ generate header files in prerequisite packages... |
667 |
(projectDefinitionClass allPreRequisites) |
|
668 |
do:[:eachPackageToFileout | |
|
669 |
|packageId packageDef packageModule packageDirectory packageTargetDir| |
|
670 |
||
671 |
packageId := eachPackageToFileout asPackageId. |
|
672 |
packageModule := packageId module. |
|
673 |
packageDirectory := packageId directory. |
|
674 |
packageTargetDir := (buildDirectory / packageModule / packageDirectory) recursiveMakeDirectory. |
|
675 |
||
676 |
packageDef := packageId projectDefinitionClass. |
|
677 |
(packageDef compiled_classNames_common , |
|
678 |
packageDef compiled_classNamesForPlatform) do:[:eachClassName | |
|
679 |
|cls| |
|
680 |
||
681 |
cls := Smalltalk classNamed:eachClassName. |
|
682 |
"/ self assert:cls isLoaded. |
|
683 |
cls isLoaded ifTrue:[ |
|
684 |
self createHeaderFileFor:cls in:packageTargetDir |
|
685 |
]. |
|
686 |
]. |
|
687 |
self copyResourcesForPackage:eachPackageToFileout. |
|
688 |
]. |
|
689 |
||
690 |
"/ stx_libbasic2 preRequisitesForBuilding#(#'stx:libbasic') |
|
2596 | 691 |
! |
692 |
||
2909 | 693 |
makeCommandOfCompiler:usedCompiler |
694 |
usedCompiler = 'bcc' ifTrue:[ |
|
695 |
^ 'bmake'. |
|
696 |
]. |
|
697 |
usedCompiler = 'vc' ifTrue:[ |
|
698 |
^ 'vcmake'. "/ compilerFlag := '-DUSEVC' |
|
699 |
]. |
|
700 |
usedCompiler = 'lcc' ifTrue:[ |
|
701 |
^ 'lccmake'. "/ compilerFlag := '-DUSELCC' |
|
702 |
]. |
|
703 |
usedCompiler = 'tcc' ifTrue:[ |
|
704 |
^ 'tccmake'. "/ compilerFlag := '-DUSELCC' |
|
705 |
]. |
|
706 |
usedCompiler = 'gcc' ifTrue:[ |
|
707 |
^ 'make'. |
|
708 |
]. |
|
709 |
usedCompiler = 'gcc' ifTrue:[ |
|
710 |
^ 'make'. |
|
711 |
]. |
|
712 |
self error:'unknown compiler specified'. |
|
713 |
||
714 |
"Created: / 03-09-2012 / 19:46:07 / cg" |
|
715 |
! |
|
716 |
||
2644 | 717 |
makeWithOutputTo:stdOut errorTo:stdErr |
2909 | 718 |
|module directory makeCommand| |
2644 | 719 |
|
720 |
module := package module. |
|
721 |
directory := package directory. |
|
722 |
||
2680 | 723 |
makeCommand := ParserFlags makeCommand. |
2895
2b939399b83b
changed: #makeWithOutputTo:errorTo:
Claus Gittinger <cg@exept.de>
parents:
2873
diff
changeset
|
724 |
usedCompiler isNil ifTrue:[ |
2b939399b83b
changed: #makeWithOutputTo:errorTo:
Claus Gittinger <cg@exept.de>
parents:
2873
diff
changeset
|
725 |
usedCompiler := ParserFlags usedCompiler. |
2b939399b83b
changed: #makeWithOutputTo:errorTo:
Claus Gittinger <cg@exept.de>
parents:
2873
diff
changeset
|
726 |
]. |
2909 | 727 |
makeCommand := self makeCommandOfCompiler:usedCompiler. |
2873 | 728 |
|
2852 | 729 |
"/ makeCommand := makeCommand, ' TOP=', mySTXTopDirectory pathName. |
2680 | 730 |
|
2683 | 731 |
OperatingSystem isUNIXlike ifTrue:[ |
732 |
OperatingSystem |
|
2845
0d52c66fbc8e
changed: #makeWithOutputTo:errorTo:
Stefan Vogel <sv@exept.de>
parents:
2844
diff
changeset
|
733 |
executeCommand:('sh %1/rules/stmkmf' bindWith:mySTXTopDirectory pathName) |
2683 | 734 |
inputFrom:nil |
735 |
outputTo:stdOut |
|
736 |
errorTo:stdErr |
|
737 |
inDirectory:(buildDirectory / module / directory) |
|
738 |
onError:[:status| self error:'make failed']. |
|
739 |
]. |
|
740 |
||
2644 | 741 |
projectDefinitionClass isLibraryDefinition ifTrue:[ |
742 |
OperatingSystem |
|
2680 | 743 |
executeCommand:(makeCommand,' classLibRule') |
2644 | 744 |
inputFrom:nil |
745 |
outputTo:stdOut |
|
746 |
errorTo:stdErr |
|
747 |
inDirectory:(buildDirectory / module / directory) |
|
748 |
onError:[:status| self error:'make failed']. |
|
749 |
] ifFalse:[ |
|
750 |
OperatingSystem |
|
2680 | 751 |
executeCommand:(makeCommand,' exe') |
2644 | 752 |
inputFrom:nil |
753 |
outputTo:stdOut |
|
754 |
errorTo:stdErr |
|
755 |
inDirectory:(buildDirectory / module / directory) |
|
756 |
onError:[:status| self error:'make failed']. |
|
757 |
||
2673 | 758 |
(makeExeOnly ? false) ifFalse:[ |
759 |
OperatingSystem |
|
2680 | 760 |
executeCommand:(makeCommand,' setup') |
2673 | 761 |
inputFrom:nil |
762 |
outputTo:stdOut |
|
763 |
errorTo:stdErr |
|
764 |
inDirectory:(buildDirectory / module / directory) |
|
765 |
onError:[:status| self error:'make failed']. |
|
766 |
] |
|
2644 | 767 |
] |
2793 | 768 |
|
2909 | 769 |
"Modified: / 03-09-2012 / 19:47:15 / cg" |
2596 | 770 |
! |
771 |
||
2905 | 772 |
objDirForUsedCompiler |
2909 | 773 |
^ self objDirForUsedCompiler:usedCompiler |
774 |
||
775 |
"Created: / 20-08-2012 / 17:01:13 / cg" |
|
776 |
! |
|
777 |
||
778 |
objDirForUsedCompiler:usedCompiler |
|
2905 | 779 |
usedCompiler = 'bcc' ifTrue:[^ 'objbc']. |
780 |
usedCompiler = 'vc' ifTrue:[^ 'objvc']. |
|
2909 | 781 |
usedCompiler = 'tcc' ifTrue:[^ 'objtcc']. |
782 |
usedCompiler = 'lcc' ifTrue:[^ 'objlcc']. |
|
783 |
usedCompiler = 'gcc' ifTrue:[^ 'obj']. |
|
2905 | 784 |
self halt:'please fill in here'. |
785 |
^ 'objbc' |
|
786 |
||
2909 | 787 |
"Created: / 03-09-2012 / 19:55:34 / cg" |
2905 | 788 |
! |
789 |
||
2683 | 790 |
recursiveCopyDirectoryForBuild:subdir |
791 |
|targetDir| |
|
792 |
||
793 |
targetDir := buildDirectory / 'stx' / subdir. |
|
794 |
targetDir exists ifFalse:[ |
|
795 |
targetDir makeDirectory. |
|
796 |
]. |
|
797 |
(mySTXTopDirectory / subdir) directoryContentsAsFilenamesDo:[:eachFile | |
|
798 |
eachFile recursiveCopyTo:(targetDir construct:eachFile baseName) |
|
799 |
]. |
|
800 |
self activityNotification:nil |
|
801 |
! |
|
802 |
||
2644 | 803 |
setupBuildDirectory |
804 |
buildDirectory exists ifFalse:[ |
|
805 |
buildDirectory recursiveMakeDirectory. |
|
806 |
]. |
|
807 |
(buildDirectory / 'stx') exists ifFalse:[ |
|
808 |
(buildDirectory / 'stx') makeDirectory. |
|
809 |
]. |
|
810 |
||
811 |
self copyDirectoryForBuild:'include'. |
|
812 |
self copyDirectoryForBuild:'rules'. |
|
2683 | 813 |
OperatingSystem isUNIXlike ifTrue:[ |
814 |
self recursiveCopyDirectoryForBuild:'configurations'. |
|
815 |
] |
|
2611 | 816 |
! |
817 |
||
2644 | 818 |
validateBuildDirectoryIsPresent |
819 |
||
820 |
^ self. |
|
2596 | 821 |
|
2644 | 822 |
"/ [ |
823 |
"/ |default directoryIsOKForMe stc | |
|
824 |
"/ |
|
825 |
"/ default := (buildDirectory ? |
|
826 |
"/ PreviousBuildDirectory) |
|
827 |
"/ ifNil:[ UserPreferences current buildDirectory]. |
|
828 |
"/ |
|
829 |
"/ buildDirectory := Dialog requestDirectoryName:'Temporary Work-ROOT for build:' |
|
830 |
"/ default:default. |
|
831 |
"/ |
|
832 |
"/ buildDirectory isEmptyOrNil ifTrue:[^ self]. |
|
833 |
"/ buildDirectory := buildDirectory asFilename. |
|
834 |
"/ directoryIsOKForMe := true. |
|
835 |
"/ |
|
836 |
"/ buildDirectory exists ifFalse:[ |
|
837 |
"/ Dialog warn:(self classResources string:'Work directory %1 does not exist.' with:buildDirectory). |
|
838 |
"/ directoryIsOKForMe := false. |
|
839 |
"/ ] ifTrue:[ |
|
840 |
"/ (buildDirectory construct:'stx') exists ifFalse:[ |
|
841 |
"/ Dialog warn:(self classResources stringWithCRs:'Work directory must contain an stx subDirectory,\which contains (at least) the stc and include subdirectories.'). |
|
842 |
"/ directoryIsOKForMe := false. |
|
843 |
"/ ] ifTrue:[ |
|
844 |
"/ stc := (OperatingSystem isMSDOSlike) ifTrue:['stc.exe'] ifFalse:['stc']. |
|
845 |
"/ (((buildDirectory construct:'stx')construct:'stc')construct:stc) exists ifFalse:[ |
|
846 |
"/ Dialog warn:(self classResources stringWithCRs:'Work directory must contain an stc compiler in the stx/stc subDirectory.'). |
|
847 |
"/ directoryIsOKForMe := false. |
|
848 |
"/ ]. |
|
849 |
"/ ((buildDirectory construct:'stx')construct:'include') exists ifFalse:[ |
|
850 |
"/ Dialog warn:(self classResources stringWithCRs:'Work directory must have had a make run before (for include files to exists).'). |
|
851 |
"/ directoryIsOKForMe := false. |
|
852 |
"/ ]. |
|
853 |
"/ ] |
|
854 |
"/ ]. |
|
855 |
"/ directoryIsOKForMe |
|
856 |
"/ ] whileFalse |
|
2596 | 857 |
! ! |
858 |
||
859 |
!ProjectBuilder class methodsFor:'documentation'! |
|
860 |
||
2896
6ed90332dbda
changed: #copyDLLsForLinkage
Claus Gittinger <cg@exept.de>
parents:
2895
diff
changeset
|
861 |
version |
6ed90332dbda
changed: #copyDLLsForLinkage
Claus Gittinger <cg@exept.de>
parents:
2895
diff
changeset
|
862 |
^ '$Header$' |
6ed90332dbda
changed: #copyDLLsForLinkage
Claus Gittinger <cg@exept.de>
parents:
2895
diff
changeset
|
863 |
! |
6ed90332dbda
changed: #copyDLLsForLinkage
Claus Gittinger <cg@exept.de>
parents:
2895
diff
changeset
|
864 |
|
2596 | 865 |
version_CVS |
866 |
^ '$Header$' |
|
867 |
! ! |