On Mon, Mar 20, 2017 at 12:28 PM, Owen Walker <[email protected]>
wrote:

>
> I like your second suggestion, because it is easier for on the recipient
> than the first.  The only trouble is that when I use the command:
>
> "pyinstaller --clean -y --onefile --add-data wavFiles;wavFiles
> myscript.py" and I get a single file myscript.exe in the build folder, and
> when I click on this folder, myscript runs, but the wave files don't work.
>
> What am I doing wrong?
>
>
The only cause I can image for this -- and anybody else? puh-leeze feel
free to jump in here? -- I'm afraid we have been fooling ourselves about
the onedir version "working".

It works, but the script is not actually using the wav files that have been
nicely bundled into the folder. It must be using the original wav files
wherever they are.

And when the script is running in the context of a folder recreated in temp
space, it no longer finds the originals -- for reasons we can speculate
about if I'm right.

To find out, re-bundle as one dir:  pyinstaller --clean -y --oneDIR
--add-data wavFiles;wavFiles myscript.py

and then deliberately go into the dist\myscript folder and rename or delete
the copied wav files in there. I'm betting dist\myscrip\myscript.exe will
still run, because it is finding the original wavFiles\*.wav wherever they
are and never did use the bundled ones.

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/pyinstaller.
For more options, visit https://groups.google.com/d/optout.

Reply via email to