Commits

Virgil Dupras committed 11c9ae6

Generate ".m" UI units (along with their headers) instead of ".h"-only units.

  • Participants
  • Parent commits 3f8a77e

Comments (0)

Files changed (2)

         os.mkdir('cocoalib/autogen')
     if not op.exists('cocoa/autogen'):
         os.mkdir('cocoa/autogen')
-    xibless.generate('cocoalib/ui/progress.py', 'cocoalib/autogen/ProgressController_UI.h')
-    xibless.generate('cocoalib/ui/about.py', 'cocoalib/autogen/HSAboutBox_UI.h')
-    xibless.generate('cocoalib/ui/fairware_reminder.py', 'cocoalib/autogen/HSFairwareReminder_UI.h')
-    xibless.generate('cocoalib/ui/demo_reminder.py', 'cocoalib/autogen/HSDemoReminder_UI.h')
-    xibless.generate('cocoalib/ui/enter_code.py', 'cocoalib/autogen/HSEnterCode_UI.h')
-    xibless.generate('cocoalib/ui/error_report.py', 'cocoalib/autogen/HSErrorReportWindow_UI.h')
-    xibless.generate('cocoa/ui/edit_pane.py', 'cocoa/autogen/PMEditPane_UI.h')
-    xibless.generate('cocoa/ui/build_pane.py', 'cocoa/autogen/PMBuildPane_UI.h')
-    xibless.generate('cocoa/ui/page_pane.py', 'cocoa/autogen/PMPageController_UI.h')
-    xibless.generate('cocoa/ui/main_window.py', 'cocoa/autogen/PMMainWindow_UI.h')
-    xibless.generate('cocoa/ui/main_menu.py', 'cocoa/autogen/PMMainMenu_UI.h')
+    xibless.generate('cocoalib/ui/progress.py', 'cocoalib/autogen/ProgressController_UI')
+    xibless.generate('cocoalib/ui/about.py', 'cocoalib/autogen/HSAboutBox_UI')
+    xibless.generate('cocoalib/ui/fairware_reminder.py', 'cocoalib/autogen/HSFairwareReminder_UI')
+    xibless.generate('cocoalib/ui/demo_reminder.py', 'cocoalib/autogen/HSDemoReminder_UI')
+    xibless.generate('cocoalib/ui/enter_code.py', 'cocoalib/autogen/HSEnterCode_UI')
+    xibless.generate('cocoalib/ui/error_report.py', 'cocoalib/autogen/HSErrorReportWindow_UI')
+    xibless.generate('cocoa/ui/edit_pane.py', 'cocoa/autogen/PMEditPane_UI')
+    xibless.generate('cocoa/ui/build_pane.py', 'cocoa/autogen/PMBuildPane_UI')
+    xibless.generate('cocoa/ui/page_pane.py', 'cocoa/autogen/PMPageController_UI')
+    xibless.generate('cocoa/ui/main_window.py', 'cocoa/autogen/PMMainWindow_UI')
+    xibless.generate('cocoa/ui/main_menu.py', 'cocoa/autogen/PMMainMenu_UI')
 
 def build_cocoa(dev):
     print("Building the cocoa layer")
     objp.p2o.generate_python_proxy_code('cocoalib/cocoa/CocoaProxy.h', 'build/CocoaProxy.m')
     build_cocoa_ext("CocoaProxy", 'cocoalib/cocoa',
         ['cocoalib/cocoa/CocoaProxy.m', 'build/CocoaProxy.m', 'build/ObjP.m',
-            'cocoalib/HSErrorReportWindow.m'],
+            'cocoalib/HSErrorReportWindow.m', 'cocoalib/autogen/HSErrorReportWindow_UI.m'],
         ['AppKit', 'CoreServices'],
         ['cocoalib', 'cocoalib/autogen'])
 

File cocoa/wscript

     cocoalib_uses = ['HSGeometry', 'Dialogs', 'HSAboutBox', 'HSFairwareReminder', 'NSEventAdditions',
         'Utils', 'HSPyUtil', 'ProgressController', 'views/HSTableView', 'controllers/HSColumns',
         'controllers/HSGUIController', 'controllers/HSTable', 'controllers/HSTextField']
-    cocoalib_src = [cocoalib_node.find_node(usename + '.m') for usename in cocoalib_uses]
+    cocoalib_src = [cocoalib_node.find_node(usename + '.m') for usename in cocoalib_uses] + cocoalib_node.ant_glob('autogen/*.m')
     project_folders = ['autogen', 'controllers', 'views']
     project_src = sum([ctx.srcnode.ant_glob('%s/*.m' % folder) for folder in project_folders], ctx.srcnode.ant_glob('*.m'))