Item8483: On Windows, unable to install files into bin due to incorrect path

pencil
Priority: Normal
Current State: Closed
Released In: 1.0.10
Target Release: patch
Applies To: Engine
Component: Configure
Branches:
Reported By: GeorgeClark
Waiting For:
Last Change By: KennethLavrsen
Copied from Item1161

As you've not closed this yet. I thought you might like some more feedback.

I could not install via configure the error being along the lines of "foswikibin/genpdf" not found to move genpdf. This suggests a faulty path setting or configure usage.

I eventually managed to run via the command line as follows:

C:\Program Files\Foswiki\Foswiki_1_0_8_pa>perl -T -I c:/PROGRA~1/Foswiki/Foswiki
_1_0_8_pa/bin GenPDFAddOn_installer.pl

### GenPDFAddOn Installer ###

This installer must be run from the root directory of your Foswiki
installation.
    * The script will not do anything without asking you for
      confirmation first (unless you used -a).
    * You can abort the script at any point and re-run it later
    * If you answer 'no' to any questions you can always re-run
      the script again later
Fetching the archive for Foswiki::Contrib::GenPDFAddOn.
Downloaded archive from http://foswiki.org/pub/Extensions to C:/Program Files/Fo
swiki/Foswiki_1_0_8_pa/GenPDFAddOn.tgz
    GenPDFAddOn_installer
    bin/
    bin/genpdf
    data/
    data/System/
    data/System/GenPDFAddOn.txt
    data/System/GenPDFAddOnDemo.txt
    data/System/GenPDFExampleHeaderFooterTopic.txt
    data/System/GenPDFExampleTitleTopic.txt
    htmldoc_force_header.patch
    lib/
    lib/Foswiki/
    lib/Foswiki/Contrib/
    lib/Foswiki/Contrib/GenPDF.pm
    lib/Foswiki/Contrib/GenPDFAddOn/
    lib/Foswiki/Contrib/GenPDFAddOn/Config.spec
    templates/
    templates/view.genpdf.tmpl
Archive unpacked
Install /data/System/GenPDFExampleTitleTopic.txt, permissions 0644
Install /data/System/GenPDFAddOnDemo.txt, permissions 0644
Install /templates/view.genpdf.tmpl, permissions 0644
Install /data/System/GenPDFAddOn.txt, permissions 0644
Install /lib/Foswiki/Contrib/GenPDF.pm, permissions 0644
Install /lib/Foswiki/Contrib/GenPDFAddOn/Config.spec, permissions 0755
Install /htmldoc_force_header.patch, permissions 0644
Install /bin/genpdf, permissions 0755
Install /data/System/GenPDFExampleHeaderFooterTopic.txt, permissions 0644

C:\Program Files\Foswiki\Foswiki_1_0_8_pa>

Running manually was not obvious, especially the -I option. I ran after updating the manifest to have a leading /.

-- JulianLevens - 08 Feb 2010

This is a different problem - the "not found" reported originally was due to the LocalSite.cfg switchboard entry not being set correctly. Your reported issue is with the plugin installer. I recreated the issue, but I don't believe it's with the plugin. Other plugins fail with the same error, and this only fails on Windows.

I'll open a new task.

-- GeorgeClark - 08 Feb 2010

This is an issue with EXTEND.pl It builds the path to the bin directory differently because there is no Foswiki Configuration variable pointing to bin.

For some reason on Windows, EXTEND.pm doesn't preserve the trailing slash leading up to bin: Changing the following line from:

    elsif ( $file =~ s#^(bin/\w+)$#$this->{root}$1$Foswiki::cfg{ScriptSuffix}# )

TO

    elsif ( $file =~ s#^(/bin/\w+)$#$this->{root}$1$Foswiki::cfg{ScriptSuffix}# )

solves the problem on windows, but I don't know why the original line works on Linux.

Changing the component from Extension / GenPDFAddOn to Engine / Configure

The underlying problem is it appears that $this->{root} has the trailing slash on Linux, and the trailing slash is missing on Windows.

-- GeorgeClark - 08 Feb 2010

Thanks George, configure is better on Windows now. I've not tested on GenPDFAddOn but KinoSearchContrib was difficult until I applied this patch.

-- JulianLevens - 06 May 2010
 

ItemTemplate edit

Summary On Windows, unable to install files into bin due to incorrect path
ReportedBy GeorgeClark
Codebase trunk
SVN Range
AppliesTo Engine
Component Configure
Priority Normal
CurrentState Closed
WaitingFor
Checkins distro:e0e5882ffacd distro:b6f41fc40d15
TargetRelease patch
ReleasedIn 1.0.10
Topic revision: r8 - 08 Sep 2010, KennethLavrsen
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy