Smalltalk.st
changeset 13785 966eb3315984
parent 13771 42c23bea6aaf
child 13787 1695a24d0fa7
equal deleted inserted replaced
13784:64c593e788bd 13785:966eb3315984
  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"
  7674 ! !
  7681 ! !
  7675 
  7682 
  7676 !Smalltalk class methodsFor:'documentation'!
  7683 !Smalltalk class methodsFor:'documentation'!
  7677 
  7684 
  7678 version
  7685 version
  7679     ^ '$Header: /cvs/stx/stx/libbasic/Smalltalk.st,v 1.977 2011-10-07 09:46:22 cg Exp $'
  7686     ^ '$Header: /cvs/stx/stx/libbasic/Smalltalk.st,v 1.978 2011-10-07 21:50:06 cg Exp $'
  7680 !
  7687 !
  7681 
  7688 
  7682 version_CVS
  7689 version_CVS
  7683     ^ '$Header: /cvs/stx/stx/libbasic/Smalltalk.st,v 1.977 2011-10-07 09:46:22 cg Exp $'
  7690     ^ '$Header: /cvs/stx/stx/libbasic/Smalltalk.st,v 1.978 2011-10-07 21:50:06 cg Exp $'
  7684 !
  7691 !
  7685 
  7692 
  7686 version_SVN
  7693 version_SVN
  7687     ^ '§ Id: Smalltalk.st 10648 2011-06-23 15:55:10Z vranyj1  §'
  7694     ^ '§ Id: Smalltalk.st 10648 2011-06-23 15:55:10Z vranyj1  §'
  7688 ! !
  7695 ! !