2548 binaryClassLibraryFilename := ObjectFileLoader |
2548 binaryClassLibraryFilename := ObjectFileLoader |
2549 binaryClassFilenameForPackage:aPackageString |
2549 binaryClassFilenameForPackage:aPackageString |
2550 inDirectory:packageDirOrNil. |
2550 inDirectory:packageDirOrNil. |
2551 |
2551 |
2552 (binaryClassLibraryFilename notNil and:[binaryClassLibraryFilename exists]) ifTrue:[ |
2552 (binaryClassLibraryFilename notNil and:[binaryClassLibraryFilename exists]) ifTrue:[ |
2553 |loadErrorOccurred incompatible| |
2553 |loadErrorOccurred| |
2554 |
2554 |
2555 loadErrorOccurred := incompatible := loadOK := false. |
2555 loadErrorOccurred := loadOK := false. |
2556 PackageNotCompatibleError handle:[:ex | |
2556 |
2557 incompatible := loadErrorOccurred := true. |
2557 [ |
2558 ] do:[ |
2558 loadOK := (ObjectFileLoader loadObjectFile:binaryClassLibraryFilename) notNil. |
2559 ObjectFileLoader objectFileLoadErrorNotification handle:[:ex | |
2559 "/ loadOK := self loadPackage:aPackageString fromClassLibrary:binaryClassLibraryFilename. |
2560 loadErrorOccurred := true. |
2560 ] on:PackageNotCompatibleError do:[:ex| |
2561 ex proceedWith:true. |
2561 ex reject. |
2562 ] do:[ |
2562 ] on:ObjectFileLoader objectFileLoadErrorNotification do:[:ex| |
2563 loadOK := (ObjectFileLoader loadObjectFile:binaryClassLibraryFilename) notNil. |
2563 loadErrorOccurred := true. |
2564 "/ loadOK := self loadPackage:aPackageString fromClassLibrary:binaryClassLibraryFilename. |
2564 ex proceedWith:true. |
2565 ]. |
|
2566 ]. |
2565 ]. |
|
2566 |
2567 (loadOK and:[loadErrorOccurred not]) ifTrue:[ |
2567 (loadOK and:[loadErrorOccurred not]) ifTrue:[ |
2568 "now, all compiled classes have been loaded. |
2568 "now, all compiled classes have been loaded. |
2569 keep classes in the package which are autoloaded as autoloaded." |
2569 keep classes in the package which are autoloaded as autoloaded." |
2570 ^ true |
2570 ^ true |
2571 ]. |
2571 ]. |
2572 |
2572 |
2573 loadErrorOccurred ifTrue:[ |
2573 loadErrorOccurred ifTrue:[ |
2574 self breakPoint:#cg. |
2574 self breakPoint:#cg. |
2575 incompatible ifFalse:[ |
2575 projectDefinitionClass := ProjectDefinition definitionClassForPackage:aPackageString. |
2576 projectDefinitionClass := ProjectDefinition definitionClassForPackage:aPackageString. |
2576 projectDefinitionClass notNil ifTrue:[ |
2577 projectDefinitionClass notNil ifTrue:[ |
2577 projectDefinitionClass |
2578 projectDefinitionClass |
2578 checkForLoad; |
2579 checkForLoad; |
2579 loadPreRequisitesAsAutoloaded:doLoadAsAutoloaded. |
2580 loadPreRequisitesAsAutoloaded:doLoadAsAutoloaded. |
2580 ]. |
2581 ]. |
|
2582 ]. |
|
2583 ]. |
2581 ]. |
2584 ]. |
2582 ]. |
2585 packageDirOrNil isNil ifTrue:[ |
2583 packageDirOrNil isNil ifTrue:[ |
2586 ^ PackageNotFoundError raiseRequestWith:aPackageString. |
2584 ^ PackageNotFoundError raiseRequestWith:aPackageString. |
2587 ]. |
2585 ]. |
2658 Smalltalk loadPackageWithId:'exept:ctypes' |
2656 Smalltalk loadPackageWithId:'exept:ctypes' |
2659 " |
2657 " |
2660 |
2658 |
2661 "Modified: / 29-07-2011 / 19:55:35 / cg" |
2659 "Modified: / 29-07-2011 / 19:55:35 / cg" |
2662 "Modified (comment): / 19-02-2019 / 16:34:46 / Claus Gittinger" |
2660 "Modified (comment): / 19-02-2019 / 16:34:46 / Claus Gittinger" |
|
2661 "Modified: / 12-03-2019 / 18:44:50 / Stefan Vogel" |
2663 ! |
2662 ! |
2664 |
2663 |
2665 loadExtensionsForPackage:aPackageId |
2664 loadExtensionsForPackage:aPackageId |
2666 | extensionsLoaded | |
2665 | extensionsLoaded | |
2667 |
2666 |
2948 loadPackage:aPackageString fromDirectory:packageDirOrStringOrNil asAutoloaded:doLoadAsAutoloaded |
2947 loadPackage:aPackageString fromDirectory:packageDirOrStringOrNil asAutoloaded:doLoadAsAutoloaded |
2949 "load a package referenced by aPackageString - a string like 'stx:libbasic'. |
2948 "load a package referenced by aPackageString - a string like 'stx:libbasic'. |
2950 The package is either located in packageDirOrStringOrNil, or in the current directory (if nil). |
2949 The package is either located in packageDirOrStringOrNil, or in the current directory (if nil). |
2951 Answer true, if the load succeeded, false if it failed" |
2950 Answer true, if the load succeeded, false if it failed" |
2952 |
2951 |
2953 |ret| |
2952 ^ PackageLoadInProgressQuery |
2954 |
2953 answerNotifyLoading:aPackageString asSymbol |
2955 PackageLoadInProgressQuery |
2954 do:[ |
2956 answerNotifyLoading:aPackageString asSymbol |
2955 self basicLoadPackage:aPackageString fromDirectory:packageDirOrStringOrNil asAutoloaded:doLoadAsAutoloaded |
2957 do:[ |
2956 ]. |
2958 ret := self basicLoadPackage:aPackageString fromDirectory:packageDirOrStringOrNil asAutoloaded:doLoadAsAutoloaded |
|
2959 ]. |
|
2960 ^ ret |
|
2961 |
2957 |
2962 " |
2958 " |
2963 Smalltalk loadPackage:'stx:goodies/communication' |
2959 Smalltalk loadPackage:'stx:goodies/communication' |
2964 " |
2960 " |
|
2961 |
|
2962 "Modified: / 12-03-2019 / 17:51:58 / Stefan Vogel" |
2965 ! |
2963 ! |
2966 |
2964 |
2967 loadPackage:packageId fromLoadAllFile:aFilename |
2965 loadPackage:packageId fromLoadAllFile:aFilename |
2968 <resource: #obsolete> |
2966 <resource: #obsolete> |
2969 "load a package from a loadAll - loader script. |
2967 "load a package from a loadAll - loader script. |