Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix .dll bundling with S11 changes
  • Loading branch information
retupmoca committed Mar 30, 2015
1 parent f22283a commit 702cd06
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions lib/GTK/NativeLib.pm6
Expand Up @@ -86,19 +86,20 @@ sub gobject-lib is export {
$lib
}

my $path = Str;
sub find-bundled($lib is copy) {
# if we can't find one, assume there's a system install
if $path.defined {
return $path ~ $lib;
}
my $base = "lib/GTK/$lib";
for @*INC {
if ($_ ~ '/GTK/' ~ $lib).IO.f {
$path = $_ ~ '/GTK/';
$lib = $_ ~ '/GTK/' ~ $lib;
if my @files = ($_.files($base) || $_.files("blib/$base")) {
my $files = @files[0]<files>;
my $tmp = $files{$base} || $files{"blib/$base"};

# copy to a temp dir
$tmp.IO.copy($*SPEC.tmpdir ~ '\\' ~ $lib);
$lib = $*SPEC.tmpdir ~ '\\' ~ $lib;

last;
}
$path = '';
}

$lib;
Expand Down

0 comments on commit 702cd06

Please sign in to comment.