pdeploy and installer on Seven64

Hello, I’m working with Panda 1.7.0. I’ve the following file main.py (a minimal example to show the problem):

import direct.directbase.DirectStart
run()

I build the installer with:

packp3d -o minimal.p3d
pdeploy -v 0.1 minimal.p3d installer

I obtain the installers for the various platforms. The installers for Linux and OSX work correctly (they install the program, and this runs without problems). The Windows installer runs without problems on a computer with Windows XP 32 bit.

But, on another computer (Windows Seven 64 bit) the window freezes and I obtain:

c:\Program Files (x86)\minimal>minimal.exe
Download interrupted: http://runtime.panda3d.org/images/images.xml, after 1654 of 1654 bytes.
Download interrupted: http://runtime.panda3d.org/panda3d/cmu_1.7/win32/panda3d.cmu_1.7.win32.xml, after 5129 of 5129 bytes.
Download interrupted: http://runtime.panda3d.org/panda3d/cmu_1.7/win32/panda3d.cmu_1.7.win32.xml?1276607969, after 5129 of 5129 bytes.
Download interrupted: http://runtime.panda3d.org/images/images.xml?1276607969, after 1654 of 1654 bytes.

The files reported from the error, however, are reachable from the computer (for example, I can download them with the browser).

On the same computer, running the application using the p3d file (panda3d minimal.p3d) or using the standalone executable (builded with pdeploy -c minimal.p3d standalone) works correctly.

Why does this not work? How can I solve this? Very thanks!

Hm… I think that the resulting executable tries to download some files while it’s supposed to use the files that already exist in the installation directory.
Because the target directory is not writable for the user, it fails. A workaround would be to make the installation directory writable and then running it again.

Just a theory though, I’m not sure if that’s exactly what’s going on here.

Very thanks, you detected the problem! The point is that Program Files folder is “write-protected” (it’s not a precise sentence) in Seven. Indeed, if I install in another folder (where I’ve write permission) the program works. So, the problem is that the default directory (i.e. the one proposed by the installer) is not writable in Seven. I patched DeploymentTools.py (code follows) to make the installer propose a writable directory. Thanks again!

*** DeploymentTools_1_7_0.py	2010-06-10 17:58:47.414283000 +0200
--- DeploymentTools.py	2010-06-15 18:28:55.424269000 +0200
***************
*** 577,583 ****
          # Some global info
          nsi.write('Name "%s"\n' % self.fullname)
          nsi.write('OutFile "%s"\n' % output.toOsSpecific())
!         nsi.write('InstallDir "$PROGRAMFILES\\%s"\n' % self.fullname)
          nsi.write('SetCompress auto\n')
          nsi.write('SetCompressor lzma\n')
          nsi.write('ShowInstDetails nevershow\n')
--- 577,583 ----
          # Some global info
          nsi.write('Name "%s"\n' % self.fullname)
          nsi.write('OutFile "%s"\n' % output.toOsSpecific())
!         nsi.write('InstallDir "$LOCALAPPDATA\\%s"\n' % self.fullname)
          nsi.write('SetCompress auto\n')
          nsi.write('SetCompressor lzma\n')
          nsi.write('ShowInstDetails nevershow\n')