How to build installer using deploy-ng?

I have solved the above problem by hacking the direct/showutil/dist.py code.

In the copy_with_dependencies method, and the add_dependency method, it was initially looking for subpaths of .whl files in the form of

if '.whl/' in source_path: 

So I changed it to also account for

'.whl\\'

.

I have also switched to building a 64 bit app instead, since when I build 32 bit app, a few dependencies such as panda3d.core.pyd don’t show up. In the meantime I have switched to 64 bit python.exe

Note that I am using a bash emulator on a 64 bit windows system:

When I run

 ./asteroid.exe

I get the error

Traceback (most recent call last):
  File "main.py", line 24, in <module>
  File "C:\Python27\lib\site-packages\direct\showbase\ShowBase.py", line 12, in <module>
    from panda3d.core import *
  File "panda3d.core", line 1, in <module>
ImportError: DLL load failed: %1 is not a valid Win32 application.

The contents of my build/win_amd64/ is

$ ls -lhs
total 16M
1.5M -rwxr-xr-x 1 user 197609 1.5M Jun 29 11:13 _hashlib.pyd*
4.0K drwxr-xr-x 1 user 197609    0 Jun 29 11:13 asteroids.egg-info/
1.6M -rwxr-xr-x 1 user 197609 1.6M Jun 29 11:13 asteroids.exe*
   0 drwxr-xr-x 1 user 197609    0 Jun 29 11:13 dist/
1.0K -rw-r--r-- 1 user 197609  310 Jun 29 11:35 err.txt
   0 drwxr-xr-x 1 user 197609    0 Jun 29 11:13 etc/
268K -rwxr-xr-x 1 user 197609 266K Jun 28 19:36 libp3direct.dll*
184K -rwxr-xr-x 1 user 197609 182K Jun 28 19:36 libp3interrogatedb.dll*
572K -rwxr-xr-x 1 user 197609 572K Jun 29 11:13 libpandagl.dll*
1.0K -rw-r--r-- 1 user 197609   86 Jun 29 11:09 ManualPage.url
   0 drwxr-xr-x 1 user 197609    0 Jun 29 11:13 models/
 12M -rwxr-xr-x 1 user 197609  12M Jun 28 19:36 panda3d.core.pyd*
772K -rwxr-xr-x 1 user 197609 769K Jun 28 19:36 panda3d.direct.pyd*
 12K -rwxr-xr-x 1 user 197609  12K Dec 17  2016 select.pyd*
4.0K drwxr-xr-x 1 user 197609    0 Jun 29 11:13 textures/

Calling file type gives:

$ file *.exe *.pyd *.dll
asteroids.exe:          PE32+ executable (GUI) x86-64, for MS Windows
_hashlib.pyd:           PE32+ executable (DLL) (GUI) x86-64, for MS Windows
panda3d.core.pyd:       PE32+ executable (DLL) (console) x86-64, for MS Windows
panda3d.direct.pyd:     PE32+ executable (DLL) (console) x86-64, for MS Windows
select.pyd:             PE32+ executable (DLL) (GUI) x86-64, for MS Windows
libp3direct.dll:        PE32+ executable (DLL) (console) x86-64, for MS Windows
libp3interrogatedb.dll: PE32+ executable (DLL) (console) x86-64, for MS Windows
libpandagl.dll:         PE32+ executable (DLL) (console) x86-64, for MS Windows

I have been able to successfully run win_amd64 build of questforfire game posted here: Testing deploy-ng

But when I try to run the win32 build, I get the same error


ImportError: DLL load failed: %1 is not a valid Win32 application.