Bug #1668

Tips in order to improve windows installer

Added by Binnette Bin over 2 years ago. Updated about 2 years ago.

Status:Resolved Start:2014-11-17
Priority:Normal Due date:
Assigned to:Benjamin CARTON % Done:

100%

Category:Misc Spent time: -
Target version:1.1
Module: Branch:

Description

Hello, your installer "setup-weboob-1.0-x32.exe" is not working. Here are some tips to improve it.
I manage to run weboob on windows. Here are the missing elements in your windows installer.
1. Use Python 2.7.8 instead of Python 2.7.5 There is an error when installing prettytable-0.7.2, after upgrading to python 2.7.8 prettytable installation was succesfull
2. WGET WConio and run installer. weeboob needs WConio so add it in the installer. Good url is http://newcenturycomputers.net/projects/download.cgi/WConio-1.5.win32-py2.7.exe
3. WGET Gpg4win and run installer. weboob needs gpg and gpgv so add it in the installer. Good url is http://files.gpg4win.org/gpg4win-2.2.2.exe
4. install of cssselect doesn't work with your installer. But when i simply use "easy_install.exe weboob-1.0-py2.7.egg". It was installed successfully.

setup-weboob.bat - I made a lot of modifications in this file (5.7 KB) Binnette Bin, 11/20/2014 01:13 am

settings.cmd - just add a line for python version (306 Bytes) Binnette Bin, 11/20/2014 01:13 am

setup-weboob-1.1-x32.exe - here is a setup embedding my setup-weboob.bat (3.4 MB) Binnette Bin, 11/20/2014 01:13 am

gpg.diff (1.7 KB) Binnette Bin, 11/22/2014 01:09 am

Associated revisions

Revision 2aa44acd203e3854974a2fa216be5acdeeecc80d
Added by Benjamin CARTON over 2 years ago

[windows installer] fix #1668

check python version
add Gpg4win installation

History

Updated by Florent Fourcot over 2 years ago

  • Assigned to set to Benjamin CARTON

Updated by Binnette Bin over 2 years ago

Work in progress by Binnette

Updated by Binnette Bin over 2 years ago

Work done :)

Please find attached files.
If you want a diff, compare setup-weboob.bat and setting.cmd with theirs originals in git/contrib/windows-install/

Contact me in you need more informations. binnette[at]gmail[dot]com

Updated by Benjamin CARTON over 2 years ago

Thanks for the work done on the installation script, it is definitely better!

However, I have comments about changes in the script.

If python is already installed but in a different version than the one set by the script, the installation will crash.

Weboob officially supports Python 2.6 and 2.7. Therefore, limiting the version to Python 2.8 is not a good idea.
We should not end with an error if a supported version is installed.

Python 3 is not officially supported in this case, we can get error.

Then it might be interesting to test if WConio and Gpg4win are already present before downloading them.

Updated by Binnette Bin over 2 years ago

You're welcome. If you need me to work again on this installer, just ask.

About, "test if WConio and Gpg4win are already installed"", it's a little more difficult. I've look in the register, but i didn't find any key about them in /Software. That's why, i did not implement the tests.

For now, i will try to create a new bank module.

Updated by Benjamin CARTON over 2 years ago

I quickly looked at it at work, I found this : "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\GPG4Win"

Concerning WConio, it is only available for x32 version and crashes when using x64 version of python.
I sent a patch this morning that aims to remove this dependency.

Updated by Binnette Bin over 2 years ago

I still have this error after installing Gpg4win.

ERROR: Cannot find gpgv to check for repository authenticity.
You should install GPG for better security.

It seems that installing gpg4win didn't solve the error. Also there is no gpg.exe or gpgv.exe in gpg4win install folder.

Please remove the installation of gpg4win form the script since it's totally useless.
Sorry for this inconvenient.

Updated by Binnette Bin over 2 years ago

I have tried this solution : https://pythonhosted.org/python-gnupg/
But I still have the error message.

Updated by Binnette Bin over 2 years ago

I get it to work :D

First you have to install this : ftp://ftp.gnupg.org/gcrypt/binary/gnupg-w32cli-1.4.18.exe
Second you have to add "C:\Program Files (x86)\GNU\GnuPG" to env var PATH

Third, aplly my patch, rebuild, reinstall weboob and that's it !

Updated by Romain Bignon over 2 years ago

Benjamin: I let you review and integrate patches?

Updated by Benjamin CARTON over 2 years ago

I pushed a patch that include parts of your work.

http://git.symlink.me/?p=benjamin/weboob.git;a=commit;h=eb8f1a4772ee676cfdf6743c4b6a5d3fe50ee02d

The windows' installer will now :
- look at the python version in order to install or not a version that is supported by weboob.
- install Gpg4win and ask to reboot if needed ( Gpg4win automatically adds an entry into the path environement variable, but windows need to reboot in order to take it in account)

As I said, WConio is not needed any more, thanks to this patch : http://git.symlink.me/?p=benjamin/weboob.git;a=commit;h=faa3891f86b198463bc84399ab481163cb4c7733

I do not think that your gpg.diff is usefull, in fact, it is not on my computer, could you confirm ?

Updated by Binnette Bin over 2 years ago

I did not test your patch yet.
But I think, you still need to apply my patch gpg.diff

for ex in ('gpg2', 'gpg'):
fpath = os.path.join(path, ex)
if os.path.exists(fpath) and os.access(fpath, os.X_OK):
return fpath

This code will never be successful on windows. Because os.path.exists("anyPath/gpg") will never be true. In fact, the file gpg nor gpg2 don't exist on windows.

But files gpg.exe or gpg2.exe exist. So you have to add my patch, if you want this code to be successful on windows.
Do you agree ?

Updated by Benjamin CARTON over 2 years ago

My bad, you are right.
I add it.

Updated by Laurent Bachelier over 2 years ago

gpg/gpg2 are used to create signed repositories, which are unlikely to be done on Windows.

What's more interesting is gpgv usage in weboob/core/repositories.py - does gpg4win provide a gpgv.exe?

Updated by Benjamin CARTON over 2 years ago

yes gpgv.exe is provided by gpg4win

Updated by Benjamin CARTON over 2 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100

Updated by Romain Bignon about 2 years ago

  • Target version set to 1.1

Also available in: Atom PDF