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

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