GNOME Bugzilla – Bug 670355
Automated install of Perl with Finance-Quote
Last modified: 2018-06-29 23:06:40 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
Created attachment 207954 [details] [review] modified install-fq-mods.cmd
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.
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 on attachment 207934 [details] [review] getperl.vbs - visual basic script to download perl msi install file Committed in r22169, thanks a lot!
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 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 ?
(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)".
*** Bug 670339 has been marked as a duplicate of this bug. ***
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.