265 !ProjectBuilder methodsFor:'building/private'! |
265 !ProjectBuilder methodsFor:'building/private'! |
266 |
266 |
267 copyDLLsForLinkage |
267 copyDLLsForLinkage |
268 |targetBuildDir preRequisites dllRelativeSourcePathes dllRelativeDestPathes| |
268 |targetBuildDir preRequisites dllRelativeSourcePathes dllRelativeDestPathes| |
269 |
269 |
270 |
|
271 targetBuildDir := buildDirectory / package module / package directory. |
270 targetBuildDir := buildDirectory / package module / package directory. |
272 |
271 |
273 preRequisites := projectDefinitionClass allPreRequisites. |
272 preRequisites := projectDefinitionClass allPreRequisites. |
274 OperatingSystem isUNIXlike ifTrue:[ |
273 OperatingSystem isUNIXlike ifTrue:[ |
275 "For now: unix Makefiles require some libs implicitely..." |
274 "For now: unix Makefiles require some libs implicitely..." |
280 ]. |
279 ]. |
281 |
280 |
282 preRequisites do:[:eachPackageToFileout | |
281 preRequisites do:[:eachPackageToFileout | |
283 |packageId packageDef packageModule packageDirectory packageTargetDir |
282 |packageId packageDef packageModule packageDirectory packageTargetDir |
284 dllSource dllSourceDir libraryName dllRelativePathSource |
283 dllSource dllSourceDir libraryName dllRelativePathSource |
285 dllRelativePathDest objDirSource objDirDest| |
284 dllRelativePathDest objDirSource objDirDest alternativeObjDirSource| |
286 |
285 |
287 packageId := eachPackageToFileout asPackageId. |
286 packageId := eachPackageToFileout asPackageId. |
288 packageModule := packageId module. |
287 packageModule := packageId module. |
289 packageDirectory := packageId directory. |
288 packageDirectory := packageId directory. |
290 packageTargetDir := (buildDirectory / packageModule / packageDirectory) recursiveMakeDirectory. |
289 packageTargetDir := (buildDirectory / packageModule / packageDirectory) recursiveMakeDirectory. |
295 "/ mhmh - take them from my tree or from the projects/smalltalk execution directory ?? |
294 "/ mhmh - take them from my tree or from the projects/smalltalk execution directory ?? |
296 dllSourceDir := myTopDirectory / packageModule / packageDirectory. |
295 dllSourceDir := myTopDirectory / packageModule / packageDirectory. |
297 |
296 |
298 OperatingSystem isMSWINDOWSlike ifTrue:[ |
297 OperatingSystem isMSWINDOWSlike ifTrue:[ |
299 objDirDest := self objDirForUsedCompiler:usedCompiler. |
298 objDirDest := self objDirForUsedCompiler:usedCompiler. |
300 "/ use visual-c files for tcc linkage |
299 objDirSource := objDirDest. |
301 usedCompiler = 'tcc' ifTrue:[ |
300 "/ "/ use visual-c files for tcc linkage |
302 objDirSource := self objDirForUsedCompiler:'vc'. |
301 "/ usedCompiler = 'tcc' ifTrue:[ |
303 ] ifFalse:[ |
302 "/ objDirSource := self objDirForUsedCompiler:'vc'. |
304 objDirSource := objDirDest |
303 "/ ] ifFalse:[ |
|
304 "/ objDirSource := objDirDest |
|
305 "/ ]. |
|
306 (dllSourceDir / objDirSource / (libraryName, '.dll')) exists ifFalse:[ |
|
307 alternativeObjDirSource := self objDirForUsedCompiler:'vc'. |
|
308 (dllSourceDir / alternativeObjDirSource / (libraryName, '.dll')) exists ifTrue:[ |
|
309 objDirSource := alternativeObjDirSource |
|
310 ] |
305 ]. |
311 ]. |
|
312 |
306 "/ dllRelativePath := objDir,'/',(libraryName,'.dll'). |
313 "/ dllRelativePath := objDir,'/',(libraryName,'.dll'). |
307 "/ (dllSourceDir / dllRelativePath) exists |
314 "/ (dllSourceDir / dllRelativePath) exists |
308 dllRelativeSourcePathes := Array with:(objDirSource,'\', libraryName, '.dll'). |
315 dllRelativeSourcePathes := Array with:(objDirSource,'\', libraryName, '.dll'). |
309 dllRelativeDestPathes := Array with:(objDirDest,'\', libraryName, '.dll'). |
316 dllRelativeDestPathes := Array with:(objDirDest,'\', libraryName, '.dll'). |
310 ] ifFalse:[ |
317 ] ifFalse:[ |
491 files := files , #( |
498 files := files , #( |
492 'librun/objbc/librun.dll' |
499 'librun/objbc/librun.dll' |
493 'support/win32/borland/cs3245.dll' |
500 'support/win32/borland/cs3245.dll' |
494 'support/win32/X11.dll' |
501 'support/win32/X11.dll' |
495 'support/win32/Xext.dll' |
502 'support/win32/Xext.dll' |
496 'lib_bc/librun.lib' |
503 'lib/bc/librun.lib' |
497 'lib_bc/cs32i.lib' |
504 'lib/bc/cs32i.lib' |
498 ). |
505 ). |
499 ]. |
506 ]. |
500 usedCompiler = 'vc' ifTrue:[ |
507 usedCompiler = 'vc' ifTrue:[ |
501 files := files , #( |
508 files := files , #( |
502 'librun/objvc/librun.dll' |
509 'librun/objvc/librun.dll' |
503 'lib_vc/librun.lib' |
510 'lib/vc/librun.lib' |
504 ). |
511 ). |
505 ]. |
512 ]. |
506 usedCompiler = 'tcc' ifTrue:[ |
513 usedCompiler = 'tcc' ifTrue:[ |
507 files := files , #( |
514 files := files , #( |
508 'librun/objvc/librun.dll' |
515 'librun/objvc/librun.dll' "/ linkage is against vc version!! |
509 'lib_vc/librun.lib' |
516 'lib/vc/librun.lib' |
|
517 ). |
|
518 ]. |
|
519 usedCompiler = 'lcc' ifTrue:[ |
|
520 files := files , #( |
|
521 'librun/objvc/librun.dll' "/ linkage is against vc version!! |
|
522 'lib/vc/librun.lib' |
510 ). |
523 ). |
511 ]. |
524 ]. |
512 ] ifFalse:[ |
525 ] ifFalse:[ |
513 files := #( |
526 files := #( |
514 'librun/main.c' |
527 'librun/main.c' |
539 ] ifFalse:[ |
552 ] ifFalse:[ |
540 self error:'Missing file: ',relativePath printString mayProceed:true. |
553 self error:'Missing file: ',relativePath printString mayProceed:true. |
541 ]. |
554 ]. |
542 ]. |
555 ]. |
543 |
556 |
544 "Modified: / 04-09-2012 / 11:59:53 / cg" |
557 "Modified (comment): / 05-09-2012 / 10:29:28 / cg" |
545 ! |
558 ! |
546 |
559 |
547 createHeaderFileFor:aClass in:packageTargetDir |
560 createHeaderFileFor:aClass in:packageTargetDir |
548 |instVarList classInstVarList classVarList bindings superclassFilename |
561 |instVarList classInstVarList classVarList bindings superclassFilename |
549 template file newContents oldContents| |
562 template file newContents oldContents| |