Set copyDependentFiles = True for include files.

#66 Merged at 0652437
  1. Aaron Brice
No description
  • Issues #51: PyQt5 + python3.3 + cx_freeze4.3.2 new

Comments (6)

  1. Thomas Kluyver

    I think this makes sense.

    @Anthony Tuininga The reason for this is that includeFiles is used to copy some libraries, namely Qt plugins. It should be safe to look for dependencies of files that are not libraries (I remember this getting fixed recently on Windows)

  2. Aaron Brice author

    I dropped a text file into the Qt platforms directory and it copied over correctly.

    include_file is also supposed to be used for libraries that are loaded at runtime (in my case, libusb), I would think you'd want to check for dependencies in that case also.

  3. Aaron Brice author

    This doesn't actually fix the issue, because the dependencies for platforms/qwindow.dll get copied into platforms/libEGL.dll, and the binary can't find it..

    1. Thomas Kluyver

      According to this documentation, the first place searched for DLLs is "The directory where the executable module for the current process is located.", which should be where it's put. Am I misunderstanding? Do Qt plugins use some special means to find DLLs?

      1. Aaron Brice author

        Right. My assumption: Qt loads "platforms/qwindows.dll" at run time (I'm not an expert, they're referred to as platform plugins so I'm assuming runtime). qwindows.dll depends on libEGL.dll but that one needs to be in the library path. This pull request puts qwindows.dll dependencies in the platforms/ directory instead of the binary directory..

        Here's what I know: if libEGL.dll ends up in platforms/ after build, it doesn't work. If it ends up in the build directory with the executable it does work, with qwindows.dll under platforms/

        Not sure where to go with that. Should the destination path for dependent libraries be modified to always be the same path as the executable?

        1. Thomas Kluyver

          Ah, I see. I had what it was doing and what you thought it should be doing switched round.

          Yes, I think putting library dependencies straight in the build directory makes sense, at least on windows. We should check what is happening on Linux and Mac.