Commits

Ronald Oussoren committed d3a274f

Use momc to compile the data model before building the application.

Thanks to bbum: http://www.pycs.net/bbum/2005/5/1/#200505011

NOTE: We should hide the call to momc in a convenience function, or somehow
teach py2app/distutils how to compile a xcdatamodel file.

Comments (0)

Files changed (2)

Examples/CoreData/OutlineEdit/MyDocument.mom

Binary file removed.

Examples/CoreData/OutlineEdit/setup.py

 """
 from distutils.core import setup
 import py2app
+import os
+
 
 plist = dict(
     NSMainNibFile="MainMenu",
     ],
 )
 
+# XXX: This should be hidden in a helper module
+compiler='/Library/Application Support/Apple/Developer Tools/Plug-ins/XDCoreDataModel.xdplugin/Contents/Resources/momc'
+os.system("'%s' MyDocument.xcdatamodel MyDocument.mom"%(compiler,))
+
 setup(
+    name='PyOutlineEdit',
     app=["main.py"],
     data_files=["English.lproj", 'MyDocument.mom'],
     options=dict(py2app=dict(plist=plist)),