demeter icon indicating copy to clipboard operation
demeter copied to clipboard

Windows bat files should explicitly set paths

Open newville opened this issue 12 years ago • 0 comments

Hi Bruce,

Sorry that I'm not grokking the perl well enough to issue a pull request, but I think you want to change win/inno/modify_path.pl to end up with

@rem = '---Perl--- @echo off SET PATH=C:strawberry\perl\bin;C:\strawberry\c\bin;C:\strawberry\perl\site\bin;%PATH% C:\strawberry\perl\bin\perl.exe -x -S "%0" %1 %2 %3 %4 %5 %6 %7 %8 %9 > "%APPDATA%\demeter\dartemis.log" 2>&1 goto endofperl

etc, with the paths calculated from your my $app = $ARGV[0] || 'C:\strawberry'; my $target = catfile($app, 'perl', 'site', 'bin'); my $perlexe = catfile($app, 'perl', 'bin', 'perl.exe');

I think if you do this, then you could consider changing the installer to not explicitly put C:\strawberry.... into the system path. For folks who want this in their path, you could include a simple bat file that simply appended the path SET PATH=%PATH%;C:\strawberry\perl....

newville avatar Nov 30 '12 22:11 newville