Skip to content

Commit

Permalink
fix configuration issue on windows
Browse files Browse the repository at this point in the history
also update iss script
  • Loading branch information
bruceravel committed Jul 29, 2015
1 parent d058099 commit 6b172e8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
9 changes: 7 additions & 2 deletions lib/Demeter/Config.pm
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,17 @@ sub BUILD {
my ($self) = @_;
#return $Demeter::mode->config if $Demeter::mode->config;

## we are assuming that gnuplot has been placed in a specific
## location relative to the perl executable:
## $^X ($EXECUTABLE_NAME) = C:\strawberry\perl\bin\perl.exe
## gnuplot location = C:\strawberry\c\bin\gnuplot\bin\perl.exe
## thus perl_base is C:\strawberry, see line 268
if ($self->is_windows) {
my ($volume,$directories,$fname) = File::Spec->splitpath( $INC{'Demeter.pm'} );
my ($volume,$directories,$fname) = File::Spec->splitpath( $^X );
#$directories =~ s{\A[/\\]}{};
$directories =~ s{[/\\]\z}{};
my @dir = File::Spec->splitdir( $directories );
pop @dir; pop @dir; pop @dir; # perl\site\lib
pop @dir; pop @dir; # perl\bin
$self->perl_base(File::Spec->catdir($volume, @dir));
};

Expand Down
6 changes: 3 additions & 3 deletions win/inno/strawberry.iss
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#define MyAppURL "http://bruceravel.github.io/demeter"
#define Demeter "Demeter with Strawberry Perl"
#define Bits "64"
#define Pre "pre4"
#define Pre "pre1"

; SEE THE DOCUMENTATION FOR DETAILS ON CREATING .ISS SCRIPT FILES!
; using ISC 5.4.2(a)
Expand All @@ -30,8 +30,8 @@ Compression=lzma2
SolidCompression=yes
SourceDir=c:\strawberry
OutputDir=c:\output\{#MyAppVersion}
OutputBaseFilename={#MyInstName}_{#MyAppVersion}_({#Bits})_{#Pre}
;OutputBaseFilename={#MyInstName}_{#MyAppVersion}_({#Bits})
;OutputBaseFilename={#MyInstName}_{#MyAppVersion}_({#Bits})_{#Pre}
OutputBaseFilename={#MyInstName}_{#MyAppVersion}_({#Bits})
AppComments=XAS Data Processing and Analysis
AppContact={#MyAppURL}
AppCopyright=Demeter is copyright (c) 2006-2015 Bruce Ravel; Ifeffit is copyright (c) 2008, Matt Newville; Larch is copyright (c) 2015, Matt Newville and Tom Trainor; Perl is copyright 1987-2011, Larry Wall
Expand Down

0 comments on commit 6b172e8

Please sign in to comment.