Building with deploy-ng for Windows

I am relatively new to Panda3d, so I apologize in advance if my question is uninformed.

I am trying to use deploy-ng on Ubuntu 17.04 to make builds for Linux and 64-bit Windows. My installed panda3d version is

panda3d==1.10.0.dev1146+deployng.108

My requirements.txt is

-i https://archive.panda3d.org/branches/deploy-ng/panda3d/
panda3d==1.10.0.dev1146+deployng.108

Doing

python setup.py build_apps

produces a working Linux build, but gives this error for the Windows build:

  Could not find a version that satisfies the requirement panda3d==1.10.0.dev1146+deployng.108 (from -r ./requirements.txt (line 2)) (from versions: 1.10.0.dev1101+g82f08b1, 1.10.0.dev1101+g923ff14, 1.10.0.dev1115+g3a2435b, 1.10.0.dev1115+gdb0267a, 1.10.0.dev1115+gf374c0b, 1.10.0.dev1129+gc155e84, 1.10.0.dev1137+deployng.102, 1.10.0.dev1146+deployng.103, 1.10.0.dev1146+deployng.104)
No matching distribution found for panda3d==1.10.0.dev1146+deployng.108 (from -r ./requirements.txt (line 2))

Why can’t it find 1.10.0.dev1146+deployng.108 for Windows?

What version of Python are you using on Windows? I suspect there isn’t a 1.10.0.dev1146+deployng.108 build for that particular version.

I have kicked off Python 2.7 and 3.5 builds for deployng.109 (you’d have to bump the version in your requirements.txt), and there are already 3.6 wheels built for 109. You can see the available wheels for deploy-ng here: archive.panda3d.org/branches/deploy-ng/panda3d/

I’m using Python 2.7.13 on both Windows and Linux. I’m making both the Windows and Linux builds on Linux.

I changed the version to 109 in requirements.txt and ran my setup.py again. This time it downloaded successfully. When I try to run the Windows build, it fails:

Traceback (most recent call last):
  File "client.py", line 6, in <module>
  File "/home/hpoggie/Overlord/build/__whl_cache__/panda3d-1.10.0.dev1146+deployng.109-cp27-cp27m-win_amd64.whl/direct/showbase/ShowBase.py", line 12, in <module>
ImportError: No module named core

It seems like it’s not bundling the module core. I’ve had this problem with several different panda3d builds before, and I thought having the latest version would fix this problem, but apparently not. The module imports correctly if I run it normally.

The whl should have the panda3d.core module. More likely is that the binary built by deploy-ng cannot find it. Is there a panda3d.core.dll in the same directory as the exe generated by deploy-ng? How are you launching the exe?

There’s no panda3d.core.dll in the directory with the exe file. I’m running the exe from a terminal using cygwin.

Are you also building the exe (i.e., running python setup.py build_apps) using the Cygwin terminal? If so, I suspect deploy-ng isn’t finding the correct library dependencies when run with Cygwin.

I’m running setup.py on Linux and copying it over to a Windows machine.

Ah, then it may be a cross-building issue. I’ll see if I can reproduce the issue.

I managed to reproduce the issues and checked in a fix. Please update to the latest (dev1182+deployng.112) on the host.

Since you are using cygwin, it is worth noting that if you extract the zip file containing the application using cygwin’s unzip, you may get an “unable to start correctly” (0xc0000022) error when trying to run the executable in Windows. This is because cygwin tools do not set the Windows ACLs necessary for executable permissions to be available to the process.

I just ran the build on Windows. Everything appears to be working properly.