I like this idea. It might be more complicated than it sounds though. As I 
understand it dlls and pyds are searched for differently. 

**Dlls** are usually referenced by name and searched for in all the 
directories in PATH. Note that this the system `PATH` variable given by 
`os.environ["PATH"]` and not `sys.path`. This is the case for all the 
system dlls that PyInstaller lobs in. These dlls could in theory be tucked 
away elsewhere as long as that *elsewhere* folder is added to PATH on 
initialisation. But dlls can also referenced by their full path. Moving 
these would likely break whatever Python code is looking for them. This is 
more common in 3rd party Python libraries that use `ctypes` so most of them 
should already be inside their own folder anyway but not all.

**Pyds** work exactly the same way as Python's import system and should 
therefore be in `PYTHONPATH` (which is `sys.path` in Python). Again these 
could be moved provided 
- The relative positioning of everything they reference is preserved.
- Their destination is added to `sys.path`.

An alternative option would be to add an outer folder containing the 
original build and launcher executable which would be a tiny executable 
containing a relative path to the actual executable inside your 
application. You can approximate this quite easily with a bat/shell script. 
And you could automate all this by appending code to do this to your spec 
file. 

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/b09368df-f28f-48ed-9ba9-d956a947080bn%40googlegroups.com.

Reply via email to