Mark - you are a godsend - that was it! Thank you!
My setup looks a bit alien to what you pasted here though (and I may
have to revisit that at some point soon I fear) but I adapted it and -
whaddya know? Whee! It flies!
I also found the InnoSetup stuff for installing the OCX -which flew fine
as well. Just tested the install on 2 virginal systems and one that had
the 'old' OCX installed still as well - all worked like champs.
Now to fill in all the rest of the forms-code and make the reporting and
uplink features complete! I just might make my deadline after all. :)
Thanks to your timely and expert assistance.
If you happen to see anything wrong on the setup I am using below, or
could you comment on the method I am using - am I really that far off
from what you showed? ..and I CAN remove the `"dll_excludes":
"dapi.dll,mapi32.dll",` line, right? py2exe doesn't automagically add
those, and since I don't include any of those modules - it should not be
necessary to list it in the excludes.. right?
################ primary snippet of the Setup.py (the rest is the
InnoSetup pieces) [start]
class Target:
def __init__(self, **kw):
self.__dict__.update(kw)
# for the versioninfo resources
self.version = "0.2.8"
self.company_name = "BioCEDE"
self.copyright = "GPL"
self.name = "XPay Advantage"
XPayAdv_win = Target(
# used for the versioninfo resource
description = "The card present processing application for 'on' and
'offline' point of sale.",
# what to build
script = "App.py",
other_resources = [(RT_MANIFEST, 1, manifest_template %
dict(prog="XPayAdv"))],
icon_resources = [(1, "files/icon.ico")],
dest_base = "XPayAdv")
setup(
options = {"py2exe": {
"compressed": 1,
"optimize": 2,
"excludes": ["win32ui","pywin","pywin.debugger"],
"dll_excludes": "dapi.dll,mapi32.dll",
"typelibs": [
('{158336E7-3FF3-456E-912C-5985E9BBED24}',
0, 1, 1),
]
},
},
zipfile = "lib/shared.zip",
data_files=[
("files",[
"files/MTUSBHIDSwipe.ocx",
"files/BioCEDE.url",
"files/NWSoftware.url",
"files/g_biocede1_sml.gif",
"files/icon-credit-card.gif",
"files/icon.ico",
"files/nsti_logo.gif",
]
),
],
name = 'XPayAdv',
windows = [XPayAdv_win],
cmdclass = {"py2exe": build_installer},
)
################ primary snippet of the Setup.py [end]
Mark Hammond wrote:
> I think you are finding that the "gencache" stuff (ie, stuff that
>
>automatically calls makepy) won't work quite the same in py2exe.
>
>The good news is that py2exe does have support for this though! In your
>setup.py, change the py2exe options. An example from the spambayes project:
>
>py2exe_options = dict(
> packages = "spambayes.resources,encodings,spambayes.languages," \
> "spambayes.languages.es,spambayes.languages.es_AR," \
> "spambayes.languages.fr,spambayes.languages.es.DIALOGS," \
> "spambayes.languages.es_AR.DIALOGS," \
> "spambayes.languages.fr.DIALOGS",
> excludes = "win32ui,pywin,pywin.debugger", # pywin is a package, and
>still seems to be included.
> includes = "dialogs.resources.dialogs,weakref", # Outlook dynamic
>dialogs
> dll_excludes = "dapi.dll,mapi32.dll",
> typelibs = [
> ('{00062FFF-0000-0000-C000-000000000046}', 0, 9, 0),
> ('{2DF8D04C-5BFA-101B-BDE5-00AA0044DE52}', 0, 2, 1),
> ('{AC0714F2-3D04-11D1-AE7D-00A0C90F26F4}', 0, 1, 0),
> ]
>)
>
>Change the typelibs to the typelib of your control (and possibly any other
>controls used). Easiest way to determine this is to delete your
>win32com\gen_py dir, then rerun your app from the command line, then check
>what files were generated in that directory.
>
>py2exe will then generate these typelibs at build time, and include them in
>the packaged archive. DispatchWithEvents will then correctly manage to
>import these modules without attempting any generation.
>
>Mark
>
>
>
_______________________________________________
Python-win32 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-win32