1729 prerequisitePackages do:[:packName | |
1729 prerequisitePackages do:[:packName | |
1730 out nextPutLine:'Smalltalk loadPackage:''' , packName , '''.'. |
1730 out nextPutLine:'Smalltalk loadPackage:''' , packName , '''.'. |
1731 ] |
1731 ] |
1732 ]. |
1732 ]. |
1733 |
1733 |
1734 out nextPutAll:'!! |
1734 methodsFile := self propertyAt:#methodsFile. |
|
1735 (classes size > 0 |
|
1736 or:[methodsFile size > 0]) ifTrue:[ |
|
1737 |
|
1738 out nextPutAll:'!! |
1735 |
1739 |
1736 "{ package:''' , myPackage , ''' }"!! |
1740 "{ package:''' , myPackage , ''' }"!! |
1737 |
1741 |
1738 |files| |
1742 |files| |
1739 |
1743 |
1740 ''loading package ' , myPackage , ' ...'' infoPrintCR. |
1744 ''loading package ' , myPackage , ' ...'' infoPrintCR. |
1741 |
1745 |
1742 files := #( |
1746 files := #( |
1743 '. |
1747 '. |
1744 |
1748 |
1745 classes do:[:cls | |
1749 classes do:[:cls | |
1746 |clsInfo cond fileName| |
1750 |clsInfo cond fileName| |
1747 |
1751 |
1748 clsInfo := self classInfoFor:cls. |
1752 clsInfo := self classInfoFor:cls. |
1749 cond := clsInfo conditionForInclusion. |
1753 cond := clsInfo conditionForInclusion. |
1750 (cond == #always or:[cond == #autoload]) ifTrue:[ |
1754 (cond == #always or:[cond == #autoload]) ifTrue:[ |
1751 out nextPutAll:' '''. |
1755 out nextPutAll:' '''. |
1752 fileName := clsInfo classFileName. |
1756 fileName := clsInfo classFileName. |
1753 fileName isNil ifTrue:[ |
1757 fileName isNil ifTrue:[ |
1754 fileName := cls nameWithoutNameSpacePrefix |
1758 fileName := cls nameWithoutNameSpacePrefix |
1755 ]. |
1759 ]. |
1756 (fileName endsWith:'.st') ifFalse:[ |
1760 (fileName endsWith:'.st') ifFalse:[ |
1757 fileName := fileName , '.st' |
1761 fileName := fileName , '.st' |
1758 ]. |
1762 ]. |
1759 fileName printOn:out. |
1763 fileName printOn:out. |
1760 out nextPutAll:''''; cr. |
1764 out nextPutAll:''''; cr. |
1761 ] |
1765 ] |
1762 ]. |
1766 ]. |
1763 (methodsFile := self propertyAt:#methodsFile) size > 0 ifTrue:[ |
1767 methodsFile size > 0 ifTrue:[ |
1764 out |
1768 out |
1765 nextPutAll:' '''; |
1769 nextPutAll:' '''; |
1766 nextPutAll:methodsFile; |
1770 nextPutAll:methodsFile; |
1767 nextPutAll:''''; |
1771 nextPutAll:''''; |
1768 cr. |
1772 cr. |
1769 ]. |
1773 ]. |
1770 |
1774 |
1771 out nextPutAll:') asOrderedCollection. |
1775 out nextPutAll:') asOrderedCollection. |
1772 |
1776 |
1773 "/ see if there is a classLibrary |
1777 "/ see if there is a classLibrary |
1774 (Smalltalk loadClassLibraryIfAbsent:''' , self libraryName , ''') ifTrue:[ |
1778 (Smalltalk loadClassLibraryIfAbsent:''' , self libraryName , ''') ifTrue:[ |
1775 |handle loaded| |
1779 |handle loaded| |
1776 |
1780 |
1779 handle ifNotNil:[ |
1783 handle ifNotNil:[ |
1780 loaded := Set new:(handle classes size). |
1784 loaded := Set new:(handle classes size). |
1781 handle classes do:[:c| c isMeta ifFalse:[loaded add:c classFilename]]. |
1785 handle classes do:[:c| c isMeta ifFalse:[loaded add:c classFilename]]. |
1782 '. |
1786 '. |
1783 |
1787 |
1784 methodsFile size > 0 ifTrue:[ |
1788 methodsFile size > 0 ifTrue:[ |
1785 out nextPutLine:(' loaded add:''' , methodsFile , '''.'). |
1789 out nextPutLine:(' loaded add:''' , methodsFile , '''.'). |
1786 ]. |
1790 ]. |
1787 out nextPutAll:' files := files asOrderedCollection select:[:f| (loaded includes:f) not]. |
1791 out nextPutAll:' files := files asOrderedCollection select:[:f| (loaded includes:f) not]. |
1788 ]. |
1792 ]. |
1789 ]. |
1793 ]. |
1790 |
1794 |
1791 "/ load files which are not in the classLibrary (all if there is none) |
1795 "/ load files which are not in the classLibrary (all if there is none) |
1792 files size > 0 ifTrue:[ |
1796 files size > 0 ifTrue:[ |