mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Fix the DLL search path order
The correct order on Windows is: 1. Local directory (relative to the binary) 2. $PATH 3. System dirs We insert our -L flags between 1 and 2 above. Signed-off-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
2a871fc3e4
commit
1fdbc2eaa4
1 changed files with 9 additions and 1 deletions
|
@ -2,7 +2,7 @@
|
|||
use strict;
|
||||
my %deploy;
|
||||
my $objdump = $ENV{objdump} ? $ENV{objdump} : "objdump";
|
||||
my @searchdirs = split(/:/, $ENV{PATH});
|
||||
my @searchdirs;
|
||||
|
||||
sub addDependenciesFor($) {
|
||||
open OBJDUMP, "-|", $objdump, "-p", $_[0] or die;
|
||||
|
@ -46,11 +46,19 @@ for (@ARGV) {
|
|||
if (-d $_) {
|
||||
push @searchdirs, $_;
|
||||
} elsif (-f $_) {
|
||||
# Add $_'s path to the search list too
|
||||
my $dirname = $_;
|
||||
$dirname =~ s,/[^/]+$,,;
|
||||
push @searchdirs, $dirname;
|
||||
|
||||
$deploy{$_} = $_;
|
||||
addDependenciesFor($_);
|
||||
}
|
||||
}
|
||||
|
||||
# Append PATH to @searchdirs
|
||||
@searchdirs = (@searchdirs, split(/:/, $ENV{PATH}));
|
||||
|
||||
while (1) {
|
||||
findMissingDependencies();
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue