Using pyinstaller misses some files from UnityPy
pramberg451 opened this issue · comments
Not sure if this is an issue that directly involves UnityPy but after creating an executable of my UnityPy project with pyinstaller and running it, it exits with the error that it can't find resources/uncompressed.tpk.
You fix this by passing these additional parameters to PyInstaller:
--add-data 'pathToPython/Lib/site-packages/UnityPy/resources/uncompressed.tpk;UnityPy/resources'
or, equivalently, setting this in the spec file:
a = Analysis(
...
datas=[('pathToPython/Lib/site-packages/UnityPy/resources/uncompressed.tpk', 'UnityPy/resources')],
...
)
Of course, I assume an official PyInstaller hook could be provided to do this automatically, but to be fair, this isn’t exactly a bug.
Thanks that fixed it for me. I'll close this issue.