mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-31 19:23:24 +00:00
Ignore the Windows system directories when searching for DLLs
We don't want to deploy kernel32.dll or such. Signed-off-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
1fdbc2eaa4
commit
336acb3e18
1 changed files with 13 additions and 0 deletions
|
@ -3,6 +3,7 @@ use strict;
|
|||
my %deploy;
|
||||
my $objdump = $ENV{objdump} ? $ENV{objdump} : "objdump";
|
||||
my @searchdirs;
|
||||
my @systemdirs = (qr|^c:/windows|i, qr|^c:/winnt|i, qr|/c/windows|i, qr|/c/winnt|);
|
||||
|
||||
sub addDependenciesFor($) {
|
||||
open OBJDUMP, "-|", $objdump, "-p", $_[0] or die;
|
||||
|
@ -59,6 +60,18 @@ for (@ARGV) {
|
|||
# Append PATH to @searchdirs
|
||||
@searchdirs = (@searchdirs, split(/:/, $ENV{PATH}));
|
||||
|
||||
# Remove system dirs from @searchdirs
|
||||
@searchdirs = grep {
|
||||
my $sys = 0;
|
||||
for my $rx (@systemdirs) {
|
||||
if ($_ =~ $rx) {
|
||||
$sys = 1;
|
||||
last;
|
||||
}
|
||||
}
|
||||
!$sys;
|
||||
} @searchdirs;
|
||||
|
||||
while (1) {
|
||||
findMissingDependencies();
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue