From 0bcb44a281c44eea01deaa4d193687e71a2efb5f Mon Sep 17 00:00:00 2001 From: Luke Sampson Date: Fri, 24 Jun 2016 07:22:04 +1000 Subject: [PATCH] implement architecture-specific shims --- lib/install.ps1 | 5 +++-- libexec/scoop-reset.ps1 | 5 ++++- libexec/scoop-update.ps1 | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/install.ps1 b/lib/install.ps1 index 9d380226..9618daac 100644 --- a/lib/install.ps1 +++ b/lib/install.ps1 @@ -37,7 +37,7 @@ function install_app($app, $architecture, $global) { pre_install $manifest $architecture run_installer $fname $manifest $architecture $dir $global ensure_install_dir_not_in_path $dir $global - create_shims $manifest $dir $global + create_shims $manifest $dir $global $architecture create_startmenu_shortcuts $manifest $dir $global if($global) { ensure_scoop_in_path $global } # can assume local scoop is in path env_add_path $manifest $dir $global @@ -538,7 +538,8 @@ function shim_def($item) { return $item, (strip_ext (fname $item)), $null } -function create_shims($manifest, $dir, $global) { +function create_shims($manifest, $dir, $global, $arch) { + $shims = arch_specific 'bin' $manifest $arch $manifest.bin | ?{ $_ -ne $null } | % { $target, $name, $arg = shim_def $_ echo "creating shim for $name" diff --git a/libexec/scoop-reset.ps1 b/libexec/scoop-reset.ps1 index d01b7a69..cfde089a 100644 --- a/libexec/scoop-reset.ps1 +++ b/libexec/scoop-reset.ps1 @@ -23,6 +23,9 @@ $version = current_version $app $dir = resolve-path (versiondir $app $version) $manifest = installed_manifest $app $version -create_shims $manifest $dir $false +$install = install_info $app $version +$architecture = $install.architecture + +create_shims $manifest $dir $false $architecture env_add_path $manifest $dir env_set $manifest $dir diff --git a/libexec/scoop-update.ps1 b/libexec/scoop-update.ps1 index fbbdc0cc..55328ac7 100644 --- a/libexec/scoop-update.ps1 +++ b/libexec/scoop-update.ps1 @@ -134,7 +134,7 @@ function update($app, $global, $quiet = $false) { pre_install $manifest $architecture run_installer $fname $manifest $architecture $dir $global ensure_install_dir_not_in_path $dir - create_shims $manifest $dir $global + create_shims $manifest $dir $global $architecture env_add_path $manifest $dir $global env_set $manifest $dir $global post_install $manifest $architecture