home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / chapm20.zip / ChapBas.cha next >
Text File  |  1995-06-22  |  3KB  |  113 lines

  1. CHAPMAN
  2. Version: 2.0
  3. Name: 'ChapMan Base'
  4. Time: '22.06.95 21.18.59'
  5.  
  6. OrganizationOnly: false
  7.  
  8. SubapplicationNames...: 'ChapMan User-Interface' 
  9.     'ChapMan VST Goodies' . 
  10. SubapplicationFilenames...: ChapUI ChapGood . 
  11.  
  12. ExtraSymbols...: . 
  13.  
  14. FileName: ChapBas
  15.  
  16. Comments: 
  17.     'This application comprises all ChapMan base applications, but the 
  18. Registration applications. These must be loaded as a SLL or filed in 
  19. separately. This application will also be packaged as an SLL.'
  20.  
  21. 'Init Code:' ''
  22.  
  23. 'Finalize Code:' ''
  24.  
  25. 'Class Template:' <default>
  26.  
  27. 'Method Template:' <default>
  28.  
  29. 'Method Comment Template:' <default>
  30.  
  31. Copyright: <default>
  32.  
  33. LibraryBuilderScripts...: 'ChapMan Base System' . 
  34.  
  35. 'LibraryBuilderScript ChapMan Base System:' 
  36.     '| sll app apps unresolved libName libDir |
  37.  
  38. "Set some variables and open an object library with feedback window."
  39. app := ChApplication atName: ''ChapMan Base''.
  40. libName := ''Chap?20''.
  41. libName := libName collect: [:c | c = $? 
  42.     ifTrue: [SmalltalkLibrary platformLetter]
  43.     ifFalse: [c]].
  44. libDir := Directory pathName: ''d:\st\chapman''.
  45. File 
  46.     remove: libDir fullDirName, libName, ''.sll'' ifAbsent: [];
  47.     remove: libDir fullDirName, libName, ''.sml'' ifAbsent: [].
  48. sll := SmalltalkLibraryBuilder new: libName.
  49. sll directory: libDir.
  50. sll description: ''ChapMan Base System''.
  51. sll windowFeedback.
  52. (apps := OrderedCollection with: app) addAll: app allSubApplications.
  53.  
  54. "Set various options."
  55. sll includeSource: true.
  56. sll sourceSeparate.
  57.  
  58. "Add classes, methods and remap class variables."
  59. apps do: [:eachApp |
  60.     eachApp ownedClasses do: [:eachClass |
  61.         sll addClass: eachClass.
  62.         true ifTrue: [
  63.             eachClass classPool associationsDo: [:assoc |
  64.                 sll remap: assoc to: (Association key: assoc key value: nil)]
  65.             ]
  66.         ]
  67.     ].
  68. apps do: [:eachApp |
  69.     eachApp requiredClasses do: [:eachClass |
  70.         (eachApp methodsForClass: eachClass) do: [:method |
  71.             sll addMethod: (eachClass compiledMethodAt: method)].
  72.         (eachApp methodsForClass: eachClass class) do: [:method |
  73.             sll addMethod: (eachClass class compiledMethodAt: method)].
  74.         ]
  75.     ].
  76.  
  77. "Add other objects."
  78. "E.g.: sll addGlobalNamed: #TestGlobal."
  79.  
  80. "Define Imports."
  81. "E.g.: sll addImport: ClassReader fromLibray: nil."
  82.  
  83. "Set bind action."
  84. "E.g.: sll bindAction: [ChApplication initialize]."
  85.  
  86. "Set unbind action."
  87. "E.g.: sll unbindAction: [ChApplication deinitialize]."
  88.  
  89. "Do remappings."
  90. "E.g.: sll remap: Test1 to: Test2."
  91.  
  92. "Write the library file."
  93. sll writeFile.
  94.  
  95. "Optionally inspect the library."
  96. false ifTrue: [
  97.     DictionaryInspector new 
  98.         openOn: sll interestingImports;
  99.         label: ''Library Imports''.
  100.     [
  101.     DictionaryInspector new
  102.         openOn: (SmalltalkLibraryBinder contentsOf: libDir fullDirName, libName);
  103.         label: ''Library Contents''
  104.     ] on: FileError do: [
  105.         MessageBox message: ''Couldn''''t open the library file to retrieve information. '',
  106.             ''If you want to see it, make sure that the target directory is on the PATH and try again.''
  107.         ]
  108.     ]
  109.  
  110. '
  111.  
  112. OwnedClasses...: . 
  113. RequiredClasses...: .