mirror of
https://github.com/ScoopInstaller/Scoop.git
synced 2026-08-25 23:57:05 +00:00
implement architecture-specific shims
This commit is contained in:
+3
-2
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user