I've written what amounts to a GUI front end for mkisofs.exe using
wxpython.  When I try to compile it with pyinstaller on Windows,
referencing just my script in the spec file, it works fine.  Of
course, all the paths are hard coded to files such as mkisofs.exe that
are already on disk.  Now I want to take the next step and include
those files in the single file output from pyinstaller.   I don't
quite understand the manual's instructions on how to include other
files by treating them as data files, but I tried adding this to my
spec file:
collect = COLLECT([('mkisofs.exe','c:/fdu-build/mkisofs.exe','DATA')])

But when I run Build.py, it fails in building the TOC, saying
"building COLLECT outCOLLECT4.toc
Traceback (most recent call last):
(bunch of traceback statements)
File "C:\Pyhon25\lib\os.py", line 171 in makedirs
  makedir(name, mode)
WindowsError: [Error 123] The filename, directory name, or volume
label syntax is incorrect: 'C:\\fdu-build\dist_C:'"

So, then I tried the approach suggested at
http://www.mail-archive.com/[email protected]/msg01210.html,
adding
'a.data += [('c:\\fdu-build\mkisofs.exe','DATA','/temp/mkisofs.exe')]'
to the spec file.  But that produces this error:
'AttributeError: Analysis instance has no attribute 'data'.

Here's my complete spec file including the a.data attempt:
# -*- mode: python -*-
a = Analysis([os.path.join(HOMEPATH,'support\\_mountzlib.py'),
os.path.join(HOMEPATH,'support\\useUnicode.py'), 'makeisogui.py'],
             pathex=['C:\\fdu-build'])
a.data += [('/fdu-build/mkisofs.exe','DATA','/temp/mkisofs.exe')]
pyz = PYZ(a.pure)
exe = EXE( pyz,
          a.scripts,
          a.binaries,
          a.zipfiles,
          a.datas,
          name=os.path.join('dist', 'makeisogui.exe'),
          debug=False,
          strip=False,
          upx=True,
          console=True )


Eventually, I'll need to add about ten other (static) files, but for
now I'm just trying to make it work with one.  I've tried it with
drive letters, without, etc., but can't figure out what I'm doing
wrong.  Any ideas?  Thanks.

Peter

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/pyinstaller?hl=en.

Reply via email to