0

I tried to use pynsist to make a windows installer for git-cola from my Ubuntu 15.10 desktop.

I just git clone git-cola project and setup the installer according to the instruction.

Seems OK for pynsist pynsist.cfg.

Here is snippet at the end:

Output: "/home/wni/gitworkspace/git-cola/build/nsis/git-cola_2.7.exe"
Install: 6 pages (384 bytes), 4 sections (1 required) (4192 bytes), 903 instructions (25284 bytes), 609 strings (9986 bytes), 1 language table (334 bytes).
Uninstall: 2 pages (128 bytes), 
1 section (1048 bytes), 11 instructions (308 bytes), 57 strings (896 bytes), 1 language table (194 bytes).
Datablock optimizer saved 38103 bytes (~0.0%).

Using lzma compression.

EXE header size:               88064 / 73216 bytes
Install code:                   7522 / 40556 bytes
Install data:               39171671 / 87321329 bytes
Uninstall code+data:            9216 / 14775 bytes
CRC (0xCB9A7C26):                  4 / 4 bytes

Total size:                 39276477 / 87449880 bytes (44.9%)
Installer written to build/nsis/git-cola_2.7.exe

And, here is pynsist.cfg just as default:

[Application]
name=git-cola
version=2.7
entry_point=cola.main:shortcut_launch
icon=share/git-cola/icons/git-cola.ico

[Python]
version=2.7.10
bitness=32

[Include]
packages=cola
    PyQt4
    qtpy
    sip
files = share/

Then, I copy build/nsis to one WIN7 32 bit desktop, and run git-cola_2.7.exe to open the installer.

Everything seems OK till the end indicating git-cola is successfully installed upon the machine.

However, I see there is no icon on the desktop(maybe something wrong yet), then, I route to the installation folder and double click "git-cola.launch.pyw", but no response...

Here is the folder content for git-cola:

enter image description here

Here is folder for pkgs:

enter image description here

I see .dll or .exe files are there under each sub folder then.

updated:

I see in the pynsist log that : qtpy.PythonQtError: No Qt bindings could be found

So, seems pynsist didn't add python to PATH and pkgs folder under installation to PYTHONPATH.

Then, I add python executable to PATH and pkgs to PYTHONPATH, after that, issue still there.

It's successful for me to import PyQt4 within python interpreter.

However, failed to import Qt from PyQt4...

Here is content for pkgs/PyQt4:

enter image description here

So, where is wrong with my setup, is there anything wrong with any configuration?

Thanks.

Wesley

Jason C
  • 38,729
  • 14
  • 126
  • 182
Wesley
  • 1,857
  • 2
  • 16
  • 30
  • It should have made a start menu entry (Pynsist doesn't do desktop shortcuts, but you can copy the shortcut to your desktop if you want). If clicking that doesn't work either, look in the Appdata folder ([see the docs](http://pynsist.readthedocs.io/en/latest/installers.html#uncaught-exceptions)) for a log file which should show what went wrong. – Thomas K Aug 10 '16 at 22:19
  • I see no shortcut to desktop, I clicked within installation folder with no response. I see the log now indicating no QT binds and looking at the issue now. Thanks. – Wesley Aug 11 '16 at 02:51
  • A few possibilities come to mind. Where did PyQt4 and sip come from? Did you use the `fetch-pyqt-windows.sh` script to get it? Did you have another copy of Python already on your system? If so, it's possible that clicking the `.pyw` file ran it with a different Python installation. Or maybe QtPy is doing something clever that interferes with it; try editing the .pyw file and importing `PyQt4.QtCore` directly to see if that gives an error. – Thomas K Aug 11 '16 at 08:53
  • Yeah, I use fetch-pyqt-windows.sh to get the PyQt4. And I uninstalled Python on WIN7 before git-cola installation. Adding import PyQt4.QtCore to .pyw file, with the same issue. Actually, I add pkgs folder to system variable PATH manually, still with the problem... – Wesley Aug 11 '16 at 09:05
  • import PyQt4 is OK. but all failed for submodule under PyQt4 – Wesley Aug 11 '16 at 09:11
  • What is in the `pkgs\PyQt4` folder? – Thomas K Aug 11 '16 at 17:40
  • updated question by adding the pkgs/PyQt4 content. Thx. – Wesley Aug 12 '16 at 00:18
  • Aha, that's missing the `.pyd` files. Something has gone wrong with fetching PyQt4 before building the installer. It may be easier to use some [wheels I hacked together](https://pypi.org/project/PyQt4_windows_whl/#files) of PyQt4. Back on your Ubuntu machine, edit the `pynsist.cfg`, and in the `[Include]` section, add `pypi_wheels= PyQt4_windows_whl==4.11.41`. Then try freezing again. – Thomas K Aug 13 '16 at 11:55

0 Answers0