3505 enumerates all build-support fileNames with their generated contents to be built." |
3504 enumerates all build-support fileNames with their generated contents to be built." |
3506 |
3505 |
3507 |pairs| |
3506 |pairs| |
3508 |
3507 |
3509 pairs := OrderedCollection new. |
3508 pairs := OrderedCollection new. |
3510 self forEachFileNameAndGeneratorMethodDo:[:fileName :generator | |
3509 self fileNamesToGenerate keysDo:[:fileName | |
3511 |file| |
3510 |fileContents| |
3512 |
3511 |
3513 file := self perform:generator. |
3512 fileContents := self generateFile:fileName. |
3514 file notNil ifTrue:[ |
3513 fileContents notNil ifTrue:[ |
3515 pairs add:(Array with:fileName with:file) |
3514 pairs add:(Array with:fileName with:fileContents) |
3516 ]. |
3515 ]. |
3517 ]. |
3516 ]. |
3518 |
3517 |
3519 pairs pairsDo:aTwoArgBlock |
3518 pairs pairsDo:aTwoArgBlock |
3520 |
3519 |
3521 "Created: / 16-08-2006 / 18:37:52 / User" |
3520 "Created: / 16-08-2006 / 18:37:52 / User" |
3522 "Modified: / 19-01-2015 / 16:58:01 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
3521 "Modified: / 19-01-2015 / 16:58:01 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
3523 "Modified (comment): / 04-12-2017 / 17:40:49 / cg" |
3522 "Modified (comment): / 04-12-2017 / 17:40:49 / cg" |
3524 ! |
3523 ! |
3525 |
3524 |
3526 forEachFileNameAndGeneratorMethodDo:aTwoArgBlock |
|
3527 "helper for build-support file generation; enumerates all build-support files" |
|
3528 |
|
3529 self fileNamesToGenerate keysAndValuesDo:aTwoArgBlock |
|
3530 |
|
3531 "Modified: / 14-09-2006 / 21:02:37 / cg" |
|
3532 "Modified (comment): / 04-12-2017 / 17:40:39 / cg" |
|
3533 ! |
|
3534 |
|
3535 generateFile:filename |
3525 generateFile:filename |
3536 |action| |
3526 |action missingNames| |
|
3527 |
|
3528 (#('bc.mak' 'Make.proto' 'loadAll') includes:filename) ifTrue:[ |
|
3529 "if there are missing classes in image, the dependencies cannot be computed. |
|
3530 Warn the user" |
|
3531 |
|
3532 missingNames := self allClassNames "compiled_classNames" |
|
3533 select:[:aName | |
|
3534 |cls| |
|
3535 |
|
3536 cls := environment at:aName asSymbol. |
|
3537 cls isNil |
|
3538 ]. |
|
3539 missingNames notEmpty ifTrue:[ |
|
3540 (self confirm:(self classResources stringWithCRs:'While generating %1:\Some classes from the list of compiled classes are missing in the image:\\%2\\If you continue, you have to fix dependencies for these classes in %1 manually!!\\Continue anyway?' |
|
3541 with:filename with:(missingNames asStringWith:', '))) |
|
3542 ifFalse:[^ nil]. |
|
3543 ]. |
|
3544 ]. |
3537 |
3545 |
3538 action := self basicFileNamesToGenerate at:filename ifAbsent:[]. |
3546 action := self basicFileNamesToGenerate at:filename ifAbsent:[]. |
3539 action notNil ifTrue:[ |
3547 action notNil ifTrue:[ |
3540 ^ self perform:action |
3548 ^ self perform:action |
3541 ]. |
3549 ]. |
3542 (filename = 'app.rc' or:[filename = 'lib.rc' or:[filename = self rcFilename]]) ifTrue:[ |
3550 (filename = 'app.rc' or:[filename = 'lib.rc' or:[filename = self rcFilename]]) ifTrue:[ |
3543 ^ self generate_packageName_dot_rc |
3551 ^ self generate_packageName_dot_rc |
3544 ]. |
3552 ]. |
3545 (filename = 'loadAll') ifTrue:[ |
3553 (filename = 'loadAll') ifTrue:[ |
3546 ^ self generate_loadAll |
3554 ^ self generate_loadAll |
3547 ]. |
|
3548 (filename = 'osx/Info.plist') ifTrue:[ |
|
3549 ^ self generate_osx_info_dot_plist |
|
3550 ]. |
3555 ]. |
3551 self error:('File "%1" not appropriate (not generated) for this type of project.' bindWith:filename) |
3556 self error:('File "%1" not appropriate (not generated) for this type of project.' bindWith:filename) |
3552 |
3557 |
3553 "Modified: / 24-02-2017 / 11:53:18 / cg" |
3558 "Modified: / 24-02-2017 / 11:53:18 / cg" |
3554 ! |
3559 ! |