5781 fileInClassLibrary:aClassLibraryName inPackage:packageID |
5781 fileInClassLibrary:aClassLibraryName inPackage:packageID |
5782 "find an object file containing a binary class library in some standard places |
5782 "find an object file containing a binary class library in some standard places |
5783 and load it. This installs all of its contained classes. |
5783 and load it. This installs all of its contained classes. |
5784 Return true if ok, false if not. |
5784 Return true if ok, false if not. |
5785 Notice: the argument may not have an extension (by purpose); |
5785 Notice: the argument may not have an extension (by purpose); |
5786 the sharedLib extension (.dll / .so / .sl) is added here, to |
5786 the sharedLib extension (.dll / .so / .sl) is added here, to |
5787 make the caller independent of the underlying operatingSystem." |
5787 make the caller independent of the underlying operatingSystem." |
5788 |
5788 |
5789 |baseName handle libraryFilename packagePath| |
5789 |baseName handle libraryFilename packagePath| |
5790 |
5790 |
5791 ObjectFileLoader isNil ifTrue:[^ false]. |
5791 ObjectFileLoader isNil ifTrue:[^ false]. |
5792 |
5792 |
5793 baseName := aClassLibraryName asFilename withSuffix:(ObjectFileLoader sharedLibrarySuffix). |
5793 baseName := aClassLibraryName asFilename withSuffix:(ObjectFileLoader sharedLibrarySuffix). |
5794 baseName exists ifTrue:[ |
5794 baseName exists ifTrue:[ |
5795 "/ load local file first... |
5795 "/ load local file first... |
5796 handle := ObjectFileLoader loadObjectFile:baseName. |
5796 handle := ObjectFileLoader loadObjectFile:baseName. |
5797 ]. |
5797 ]. |
5798 handle isNil ifTrue:[ |
5798 handle isNil ifTrue:[ |
5799 packagePath := self getPackageDirectoryForPackage:packageID. |
5799 packagePath := self getPackageDirectoryForPackage:packageID. |
5800 packagePath isNil ifTrue:[^ false]. |
5800 packagePath isNil ifTrue:[^ false]. |
5801 packagePath := packagePath asFilename. |
5801 packagePath := packagePath asFilename. |
5802 libraryFilename := packagePath / baseName. |
5802 libraryFilename := packagePath / baseName. |
5803 libraryFilename exists ifFalse:[ |
5803 libraryFilename exists ifFalse:[ |
5804 "in windows (with Borland compiler, DLLs in development environment are under objbc" |
5804 libraryFilename := nil. |
5805 libraryFilename := packagePath / 'objbc' / baseName. |
5805 #('objbc' 'objvc') do:[:eachPossibleCompiledCodeDir | |
5806 ]. |
5806 "in windows, with Borland compiler, DLLs in development environment are under objbc; |
5807 libraryFilename exists ifTrue:[ |
5807 with MSVC, they are under objvc" |
5808 handle := ObjectFileLoader loadObjectFile:libraryFilename pathName. |
5808 libraryFilename isNil ifTrue:[ |
5809 ]. |
5809 libraryFilename := packagePath / eachPossibleCompiledCodeDir / baseName. |
|
5810 libraryFilename exists ifFalse:[ libraryFilename := nil ] |
|
5811 ]. |
|
5812 ]. |
|
5813 ]. |
|
5814 libraryFilename exists ifTrue:[ |
|
5815 handle := ObjectFileLoader loadObjectFile:libraryFilename pathName. |
|
5816 ]. |
5810 ]. |
5817 ]. |
5811 |
5818 |
5812 "/ handle notNil ifTrue:[ |
5819 "/ handle notNil ifTrue:[ |
5813 "/ Transcript showCR:(' Smalltalk: loaded %1.' bindWith:libraryFilename pathName). |
5820 "/ Transcript showCR:(' Smalltalk: loaded %1.' bindWith:libraryFilename pathName). |
5814 "/ ]. |
5821 "/ ]. |
5818 Smalltalk fileInClassLibrary:'libtable' |
5825 Smalltalk fileInClassLibrary:'libtable' |
5819 Smalltalk fileInClassLibrary:'binary/libwidg3' |
5826 Smalltalk fileInClassLibrary:'binary/libwidg3' |
5820 Smalltalk fileInClassLibrary:'refactoryBrowser' inPackage:'stx:goodies/refactoryBrowser' |
5827 Smalltalk fileInClassLibrary:'refactoryBrowser' inPackage:'stx:goodies/refactoryBrowser' |
5821 " |
5828 " |
5822 |
5829 |
5823 "Modified: 8.1.1997 / 17:58:56 / cg" |
5830 "Modified: / 07-10-2011 / 23:49:47 / cg" |
5824 ! |
5831 ! |
5825 |
5832 |
5826 fileInSourceFile:filename lazy:loadLazy silent:beSilent |
5833 fileInSourceFile:filename lazy:loadLazy silent:beSilent |
5827 |
5834 |
5828 "Try all available programming languages" |
5835 "Try all available programming languages" |