--- a/ProjectBuilder.st Mon Sep 03 22:29:39 2012 +0200
+++ b/ProjectBuilder.st Tue Sep 04 00:34:29 2012 +0200
@@ -262,7 +262,7 @@
!ProjectBuilder methodsFor:'building/private'!
copyDLLsForLinkage
- |targetBuildDir preRequisites dllRelativePaths|
+ |targetBuildDir preRequisites dllRelativeSourcePathes dllRelativeDestPathes|
targetBuildDir := buildDirectory / package module / package directory.
@@ -278,7 +278,8 @@
preRequisites do:[:eachPackageToFileout |
|packageId packageDef packageModule packageDirectory packageTargetDir
- dllSource dllSourceDir libraryName dllRelativePath objDir|
+ dllSource dllSourceDir libraryName dllRelativePathSource
+ dllRelativePathDest objDirSource objDirDest|
packageId := eachPackageToFileout asPackageId.
packageModule := packageId module.
@@ -292,35 +293,41 @@
dllSourceDir := myTopDirectory / packageModule / packageDirectory.
OperatingSystem isMSWINDOWSlike ifTrue:[
- objDir := self objDirForUsedCompiler:usedCompiler.
-
+ objDirDest := self objDirForUsedCompiler:usedCompiler.
+ "/ use visual-c files for tcc linkage
+ usedCompiler = 'tcc' ifTrue:[
+ objDirSource := self objDirForUsedCompiler:'vc'.
+ ] ifFalse:[
+ objDirSource := objDirDest
+ ].
"/ dllRelativePath := objDir,'/',(libraryName,'.dll').
"/ (dllSourceDir / dllRelativePath) exists
- dllRelativePaths := Array with:(objDir,'\', libraryName, '.dll').
+ dllRelativeSourcePathes := Array with:(objDirSource,'\', libraryName, '.dll').
+ dllRelativeDestPathes := Array with:(objDirDest,'\', libraryName, '.dll').
] ifFalse:[
- dllRelativePaths := Array with:(libraryName,'.so').
+ dllRelativeSourcePathes := Array with:(libraryName,'.so').
(packageModule = 'stx' and:[packageDirectory = 'libview']) ifTrue:[
- dllRelativePaths := dllRelativePaths, #('XWorkstation.so' 'GLXWorkstation.so').
+ dllRelativeSourcePathes := dllRelativeSourcePathes, #('XWorkstation.so' 'GLXWorkstation.so').
].
].
- dllRelativePaths do:[:dllRelativePath|
+ dllRelativeSourcePathes with:dllRelativeDestPathes do:[:dllRelativeSourcePath :dllRelativeDestPath|
|source dest|
- source := dllSourceDir / dllRelativePath.
- dest := packageTargetDir / dllRelativePath.
+ source := dllSourceDir / dllRelativeSourcePath.
+ dest := packageTargetDir / dllRelativeDestPath.
(dest exists not
or:[source fileSize ~= dest fileSize
or:[source modificationTime >= dest modificationTime
"/ or:[ ((dllSourceDir / dllRelativePath) sameContentsAs:(packageTargetDir / dllRelativePath)) not ]
]]) ifTrue:[
- Transcript showCR:'updating ',dllRelativePath.
+ Transcript showCR:'updating ',dllRelativeDestPath.
dest directory recursiveMakeDirectory.
source copyTo:dest.
].
].
].
- "Modified: / 03-09-2012 / 20:07:23 / cg"
+ "Modified: / 04-09-2012 / 00:30:21 / cg"
!
copyDirectory:relativepath
@@ -447,6 +454,12 @@
'libvc/librun.lib'
).
].
+ usedCompiler = 'tcc' ifTrue:[
+ files := files , #(
+ 'librun/objvc/librun.dll'
+ 'libvc/librun.lib'
+ ).
+ ].
] ifFalse:[
files := #(
'librun/main.c'
@@ -479,7 +492,7 @@
].
].
- "Modified: / 20-08-2012 / 17:10:37 / cg"
+ "Modified: / 04-09-2012 / 00:25:26 / cg"
!
createHeaderFileFor:aClass in:packageTargetDir