On 7/14/13 2:02 PM, David O. wrote:
> I used cx_Freeze to convert a simple app designed in Dabo to a (Windows)
> exe package
> just to see the possibilities in developing commercially with Dabo. My very
> simple app (no db connection)
> (Simple_app.py) code is an adaptation of the example Hello_msg in the Dabo
> tutorial pdf from the dabo website.
None of the executable building solutions (py2exe, cx_freeze, or PyInstaller)
are
going to work out of the box with a Dabo application, but all of them can be
made to
work once you understand what's happening.
I used py2exe for many years with my commercial Dabo app, but it started
failing when
Vista came around and development had stopped. So I switched to cx_freeze but
then
couldn't get version info attached to the exe so I switched to PyInstaller.
Anthony
at cx_freeze in the meantime got version info working for me which was my only
showstopper but I'd already moved on. I think either cx_freeze or PyInstaller
are
good choices.
> After running cx_Freeze using the setup.py (codes below), my application
> compiled sucessfully but my attempt to
> run the generated exe file produced an error dialog containing the
> following error message :
(be glad you got an error message) :)
> ***Start error message***
>
> Traceback(most recent call last):
> File "C:\Python27\lib\site-packages\cx_Freeze\initscripts\Console.py", line
> 27 in <module>
> exec code in m.__dict__
> File "Simple_app.py", line 3, in <module>
> File
> "C:\Python27\lib\site-packages\dabo-0.9.13-py2.7.egg\dabo\__init__.py",
> line 186, in <module>
> dLocalize.install("dabo")
> File
> "C:\Python27\lib\site-packages\dabo-0.9.13-py2.7.egg\dabo\dLocalize.py",
> line 79, in install
> setLanguage(_defaultLanguage, _defaultEncoding)
> File
> "C:\Python27\lib\site-packages\dabo-0.9.13-py2.7.egg\dabo\dLocalize.py",
> line 113, in setLanguage
> daboTranslation = gettext.translation("dabo", daboLocaleDir,
> languages=["en"], codeset = charset)
> File "C:Python27\Lib\gettext.py", line 469, in translation
> raise IOError(ENOENT, 'No translation file found for domain', domain)
> IOError: [Errno 2] No translation file for domain: 'dabo'
>
> **End Error message **
This is because Dabo depends on the dabo locale directory being found at
runtime, but
cx_freeze didn't know to include it in the bundle.
> I do not have sufficient knowledge to know what's wrong so I'd like help in
> this direction but I'm surprised I'm having difficulty
> with such a simple app. I only used cxFreeze because of suggestions
> gathered online, though I have also tried py2exe unsuccesfully.
> Any suggestions regarding converting/compiling Dabo apps to exe would be
> appreciated even if I do not have to use cxFreeze.
> Thanks.
Take a look in dabo/ide/wizards/AppWizard/spec-setup.py.txt (or run
dabo/ide/wizards/AppWizard and then look at the generated setup.py). This is for
py2exe, however you'll see how to include localeDir and iconDir into your
bundle but
the mechanism in cx_freeze may be slightly different (I can't remember).
I hope this helps. I've been distributing my commercial Dabo application since
2007.
Paul
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/[email protected]