After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 670355 - Automated install of Perl with Finance-Quote
Automated install of Perl with Finance-Quote
Status: RESOLVED FIXED
Product: GnuCash
Classification: Other
Component: Windows
git-master
Other Windows
: Normal enhancement
: ---
Assigned To: Geert Janssens
Christian Stimming
: 670339 (view as bug list)
Depends on:
Blocks: 791725
 
 
Reported: 2012-02-18 16:03 UTC by Dave Roberts
Modified: 2018-06-29 23:06 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
getperl.vbs - visual basic script to download perl msi install file (1.55 KB, patch)
2012-02-18 16:03 UTC, Dave Roberts
committed Details | Review
modified install-fq-mods.cmd (5.96 KB, patch)
2012-02-18 20:07 UTC, Dave Roberts
committed Details | Review
gnc-path-check verifies system PATH is valid (2.34 KB, patch)
2012-02-18 20:23 UTC, Dave Roberts
needs-work Details | Review

Description Dave Roberts 2012-02-18 16:03:50 UTC
Created attachment 207934 [details] [review]
getperl.vbs - visual basic script to download perl msi install file

If perl is not installed at the time of running install-fq-mods.cmd to install the Finance Quote option the install will fail.

This enhancement request is that when this condition occurs that perl is installed automatically.  I have included two files in the request.

The first is a modified install-fq-mods.cmd. The modifications download and install Strawberry Perl when no perl is detected, and then continue with the install-fq-mods.cmd script.

The second file is a visual basic script to download the perl msi installer. The msi installer for Strawberry perl 5.12.3.0 is specified. Other perl versions, or indeed sources could be installed here. 

Note other installs might need different parameters in the msiexec call (in install-fq-mods.cmd).

This enhamcement was suggested during investigation to Bug 657117 - Finance::Quote not installed properly
Comment 1 Dave Roberts 2012-02-18 20:07:23 UTC
Created attachment 207954 [details] [review]
modified install-fq-mods.cmd
Comment 2 Dave Roberts 2012-02-18 20:23:32 UTC
Created attachment 207955 [details] [review]
gnc-path-check verifies system PATH is valid

The install-fq-mods.cmd and gnc-path-check have been submitted in Bug 670339 - Enhancement Request: Avoid glib bug 670233

This version of install-fq-mods.cmd includes changes for Bug 670339 - Enhancement Request: Avoid glib bug 670233 and this enhamcement request

gnc-path-check is provided to allow both requests to be considered together.

This has been tested with a clean install of Gnucash 2.4.10, with no perl installation.

It installs Strawberry perl v5.12.3, and adds the necessary modules.

Note install-fq-mods.cmd has been modified not only to install perl, but also to use PPM for module installs for ActiveState perl (as per the previous version of install-fq-mods.cmd), and CPAN installs with all other perl installations. Note the current gnc-fq-update provided with Gnucash 2.4.10 already uses a CPAN install for modules - it's not clear why the difference of approach between gnc-fq-update and install-fq-mods.cmd.

It would make install-fq-mods.cmd much simpler only to follow a CPAN module install process, but not undertsanding the logic for using PPM I have left this for ActiveState builds only. Not ActiveState builds have issues finding PPM respoitaries for the necessary modules for some perl versions, CPAN installs seem to accomodate more perl versions.

It should work with ActiveState perl installations, but this is not tested at this time.
Comment 3 oli 2012-04-12 17:14:33 UTC
Hello,

please be aware that there is a small issue with Windows 7 64 bit installation. 

Since the PATH does includes the "Program Files (86)" sub directory on this systems. For more information please check: 

http://superuser.com/questions/119610/spaces-and-parenthesis-in-windows-path-variable-screws-up-batch-files 

I did change in install-fq-mod.cmd line 134 / 135 to 

set OLDPATH="%PATH%"
set PATH="%CD%;%PATH%"

and line 144 to

set PATH="%OLDPATH%"

this did resolve the problem the script did have with some of my PATH entries.

Regards
Comment 4 Geert Janssens 2012-05-06 21:21:58 UTC
Comment on attachment 207934 [details] [review]
getperl.vbs - visual basic script to download perl msi install file

Committed in r22169, thanks a lot!
Comment 5 Geert Janssens 2012-05-06 21:23:40 UTC
Comment on attachment 207954 [details] [review]
modified install-fq-mods.cmd

Committed in r22169, except that I commented out the part that calls gnc-path-check. More on that in the next message. Thanks a lot!
Comment 6 Geert Janssens 2012-05-06 21:29:09 UTC
Comment on attachment 207955 [details] [review]
gnc-path-check verifies system PATH is valid

The script as it is now tests for non-existing directories on the path and raises an error if it finds one. The error then causes the whole installation of finance::quote to fail.

As I mentioned in bug 657117, the glib bug you try to avoid with this script is not triggered by non-existing directories. It is triggered by a path that has two colons in it, which is illegal on Windows.

So the script as is now will abort the installation of F::Q in many cases where it would work perfectly. It is very easy to have a non-existing directory on the path.

So while I think it is good to test for situations that will F::Q to fail, I believe this test should be improved before it can be activated. Can you look into this ?
Comment 7 Geert Janssens 2012-05-06 21:32:33 UTC
(In reply to comment #3)
> Hello,
> 
> please be aware that there is a small issue with Windows 7 64 bit installation. 
> 
> Since the PATH does includes the "Program Files (86)" sub directory on this
> systems. For more information please check: 
> 
> http://superuser.com/questions/119610/spaces-and-parenthesis-in-windows-path-variable-screws-up-batch-files 
> 
> I did change in install-fq-mod.cmd line 134 / 135 to 
> 
> set OLDPATH="%PATH%"
> set PATH="%CD%;%PATH%"
> 
> and line 144 to
> 
> set PATH="%OLDPATH%"
> 
> this did resolve the problem the script did have with some of my PATH entries.
> 
> Regards

Thank you for your feedback. I have used these fixes in commit r22169. However in commit r22170 I have done more work on the installer script and removed the quotes again because they were causing other trouble. I did make sure not to run into the problem you link to though with the modified script. So it should work fine even if the path includes "Program Files (86)".
Comment 8 Geert Janssens 2012-05-06 21:33:58 UTC
*** Bug 670339 has been marked as a duplicate of this bug. ***
Comment 9 John Ralls 2018-06-29 23:06:40 UTC
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=670355. Please update any external references or bookmarks.