-py2exe_keywords = {}
-py2exe_data_files = []
-if os.name == 'nt':
- import py2exe
- py2exe_keywords['console'] = [
- { "script": "openerp-server",
- "icon_resources": [(1, join("pixmaps","openerp-icon.ico"))],
- }]
- py2exe_keywords['options'] = {
- "py2exe": {
- "skip_archive": 1,
- "optimize": 2,
- "dist_dir": 'dist',
- "packages": [
- "lxml", "lxml.builder", "lxml._elementpath", "lxml.etree",
- "lxml.objectify", "decimal", "xml", "xml", "xml.dom", "xml.xpath",
- "encodings", "dateutil", "pychart", "PIL", "pyparsing",
- "pydot", "asyncore","asynchat", "reportlab", "vobject",
- "HTMLParser", "select", "mako", "poplib",
- "imaplib", "smtplib", "email", "yaml", "DAV",
- "uuid", "commands", "openerp", "simplejson", "vatnumber"
- ],
- "excludes" : ["Tkconstants","Tkinter","tcl"],
- }
- }
- # TODO is it still necessary now that we don't use the library.zip file?
- def data_files():
- '''For Windows, we consider all the addons as data files.
- It seems also that package_data below isn't honored by py2exe.'''
- files = []
- os.chdir('openerp')
- for (dp, dn, names) in os.walk('addons'):
- files.append((join('openerp',dp), map(lambda x: join('openerp', dp, x), names)))
- os.chdir('..')
- files.append(('openerp', [join('openerp', 'import_xml.rng'),]))
+ if os.name == 'nt':
+ r["Microsoft.VC90.CRT"] = glob.glob('C:\Microsoft.VC90.CRT\*.*')
+
+ import babel
+ # Add data, but also some .py files py2exe won't include automatically.
+ # TODO This should probably go under `packages`, instead of `data`,
+ # but this will work fine (especially since we don't use the ZIP file
+ # approach).
+ r["babel/localedata"] = glob.glob(os.path.join(os.path.dirname(babel.__file__), "localedata", '*'))
+ others = ['global.dat', 'numbers.py', 'support.py']
+ r["babel"] = map(lambda f: os.path.join(os.path.dirname(babel.__file__), f), others)
+ others = ['frontend.py', 'mofile.py']
+ r["babel/messages"] = map(lambda f: os.path.join(os.path.dirname(babel.__file__), "messages", f), others)