249 self copySTCDirectoryForBuild. |
249 self copySTCDirectoryForBuild. |
250 self activityNotification:'Generating source files...'. |
250 self activityNotification:'Generating source files...'. |
251 self generateSourceFiles. |
251 self generateSourceFiles. |
252 self activityNotification:'Copying dlls for linkage...'. |
252 self activityNotification:'Copying dlls for linkage...'. |
253 self copyDLLsForLinkage. |
253 self copyDLLsForLinkage. |
254 self activityNotification:'Copying support files for linkage...'. |
254 self activityNotification:'Copying support files for compilation and linkage...'. |
|
255 self copySupportFilesForCompilation. |
255 self copySupportFilesForLinkage. |
256 self copySupportFilesForLinkage. |
256 self copyStartupFilesFromSmalltalk. |
257 self copyStartupFilesFromSmalltalk. |
257 |
258 |
258 self activityNotification:'Executing make...'. |
259 self activityNotification:'Executing make...'. |
259 self makeWithOutputTo:stdOut errorTo:stdErr. |
260 self makeWithOutputTo:stdOut errorTo:stdErr. |
|
261 |
|
262 "Modified: / 04-09-2012 / 00:49:52 / cg" |
260 ! ! |
263 ! ! |
261 |
264 |
262 !ProjectBuilder methodsFor:'building/private'! |
265 !ProjectBuilder methodsFor:'building/private'! |
263 |
266 |
264 copyDLLsForLinkage |
267 copyDLLsForLinkage |
371 recursiveCopyTo:(buildDirectory / module / directory) |
374 recursiveCopyTo:(buildDirectory / module / directory) |
372 ]. |
375 ]. |
373 ! |
376 ! |
374 |
377 |
375 copySTCDirectoryForBuild |
378 copySTCDirectoryForBuild |
|
379 "copy stc files to the build directory" |
|
380 |
376 |targetDir stc files| |
381 |targetDir stc files| |
377 |
382 |
378 targetDir := buildDirectory / 'stx' / 'stc'. |
383 targetDir := buildDirectory / 'stx' / 'stc'. |
379 targetDir exists ifFalse:[ targetDir makeDirectory ]. |
384 targetDir exists ifFalse:[ targetDir makeDirectory ]. |
380 |
385 |
399 OperatingSystem isUNIXlike ifTrue:[ |
404 OperatingSystem isUNIXlike ifTrue:[ |
400 (targetDir / 'stc') makeExecutableForAll |
405 (targetDir / 'stc') makeExecutableForAll |
401 ]. |
406 ]. |
402 |
407 |
403 self activityNotification:nil |
408 self activityNotification:nil |
|
409 |
|
410 "Modified (comment): / 04-09-2012 / 00:49:19 / cg" |
404 ! |
411 ! |
405 |
412 |
406 copyStartupFilesFromSmalltalk |
413 copyStartupFilesFromSmalltalk |
|
414 "copy additional smalltalk startup files to the build directory" |
|
415 |
407 (buildDirectory / 'stx' / 'projects/smalltalk' ) exists ifFalse:[ |
416 (buildDirectory / 'stx' / 'projects/smalltalk' ) exists ifFalse:[ |
408 (buildDirectory / 'stx' / 'projects/smalltalk' ) recursiveMakeDirectory. |
417 (buildDirectory / 'stx' / 'projects/smalltalk' ) recursiveMakeDirectory. |
409 ]. |
418 ]. |
410 |
419 |
411 #( |
420 #( |
422 copyTo: (buildDirectory / 'stx' / 'projects/smalltalk' / fn) |
431 copyTo: (buildDirectory / 'stx' / 'projects/smalltalk' / fn) |
423 ]. |
432 ]. |
424 |
433 |
425 (myTopDirectory / 'stx' / 'doc/online/english/LICENCE_STX.html') |
434 (myTopDirectory / 'stx' / 'doc/online/english/LICENCE_STX.html') |
426 copyTo: (buildDirectory / 'stx' / 'projects/smalltalk' / 'LICENCE_STX.html'). |
435 copyTo: (buildDirectory / 'stx' / 'projects/smalltalk' / 'LICENCE_STX.html'). |
|
436 |
|
437 "Modified (comment): / 04-09-2012 / 00:48:47 / cg" |
|
438 ! |
|
439 |
|
440 copySupportFilesForCompilation |
|
441 "copy the tcc compiler to the build directory" |
|
442 |
|
443 |files| |
|
444 |
|
445 files := #(). |
|
446 |
|
447 OperatingSystem isMSWINDOWSlike ifTrue:[ |
|
448 usedCompiler = 'tcc' ifTrue:[ |
|
449 files := files , #( |
|
450 'support/tcc' |
|
451 ). |
|
452 ]. |
|
453 ] ifFalse:[ |
|
454 files := files , #( |
|
455 ) |
|
456 ]. |
|
457 files := files asOrderedCollection. |
|
458 |
|
459 files do:[:relativePath | |
|
460 (mySTXTopDirectory / relativePath) exists ifTrue:[ |
|
461 ((buildDirectory / 'stx' / relativePath) exists |
|
462 and:[ (mySTXTopDirectory / relativePath) fileSize = (buildDirectory / 'stx' / relativePath) fileSize |
|
463 and:[ (mySTXTopDirectory / relativePath) modificationTime < (buildDirectory / 'stx' / relativePath) modificationTime |
|
464 "/ and:[ (mySTXTopDirectory / dllRelativePath) sameContentsAs:(targetBuildDir / dllRelativePath) ] |
|
465 ]]) ifFalse:[ |
|
466 (mySTXTopDirectory / relativePath) recursiveCopyTo:(buildDirectory / 'stx' / relativePath). |
|
467 ] |
|
468 ] ifFalse:[ |
|
469 self error:'Missing directory: ',relativePath printString mayProceed:true. |
|
470 ]. |
|
471 ]. |
|
472 |
|
473 "Created: / 04-09-2012 / 00:47:49 / cg" |
427 ! |
474 ! |
428 |
475 |
429 copySupportFilesForLinkage |
476 copySupportFilesForLinkage |
|
477 "copy additional files which are req'd for linkage to the build directory" |
|
478 |
430 |files| |
479 |files| |
431 |
480 |
432 OperatingSystem isMSWINDOWSlike ifTrue:[ |
481 OperatingSystem isMSWINDOWSlike ifTrue:[ |
433 files := #( |
482 files := #( |
434 'librun/genDate.exe' |
483 'librun/genDate.exe' |
490 ] ifFalse:[ |
539 ] ifFalse:[ |
491 self error:'Missing file: ',dllRelativePath printString mayProceed:true. |
540 self error:'Missing file: ',dllRelativePath printString mayProceed:true. |
492 ]. |
541 ]. |
493 ]. |
542 ]. |
494 |
543 |
495 "Modified: / 04-09-2012 / 00:25:26 / cg" |
544 "Modified (comment): / 04-09-2012 / 00:48:24 / cg" |
496 ! |
545 ! |
497 |
546 |
498 createHeaderFileFor:aClass in:packageTargetDir |
547 createHeaderFileFor:aClass in:packageTargetDir |
499 |instVarList classInstVarList classVarList bindings superclassFilename |
548 |instVarList classInstVarList classVarList bindings superclassFilename |
500 template file newContents oldContents| |
549 template file newContents oldContents| |