implement architecture-specific shims

This commit is contained in:
Luke Sampson
2016-06-24 07:22:04 +10:00
parent d30850a11e
commit 0bcb44a281
3 changed files with 8 additions and 4 deletions
+3 -2
View File
@@ -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"
+4 -1
View File
@@ -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
+1 -1
View File
@@ -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