mirror of
https://github.com/ScoopInstaller/Scoop.git
synced 2026-09-27 15:56:51 +00:00
Allow architecture specific shortcuts for special cases like dont-sleep or mpc-hc
This commit is contained in:
+1
-1
@@ -44,7 +44,7 @@ function install_app($app, $architecture, $global, $suggested) {
|
||||
ensure_install_dir_not_in_path $dir $global
|
||||
$dir = link_current $dir
|
||||
create_shims $manifest $dir $global $architecture
|
||||
create_startmenu_shortcuts $manifest $dir $global
|
||||
create_startmenu_shortcuts $manifest $dir $global $architecture
|
||||
install_psmodule $manifest $dir $global
|
||||
if($global) { ensure_scoop_in_path $global } # can assume local scoop is in path
|
||||
env_add_path $manifest $dir $global
|
||||
|
||||
+6
-4
@@ -1,6 +1,7 @@
|
||||
# Creates shortcut for the app in the start menu
|
||||
function create_startmenu_shortcuts($manifest, $dir, $global) {
|
||||
$manifest.shortcuts | ?{ $_ -ne $null } | % {
|
||||
function create_startmenu_shortcuts($manifest, $dir, $global, $arch) {
|
||||
$shortcuts = @(arch_specific 'shortcuts' $manifest $arch)
|
||||
$shortcuts | ?{ $_ -ne $null } | % {
|
||||
$target = $_.item(0)
|
||||
$name = $_.item(1)
|
||||
startmenu_shortcut "$dir\$target" $name
|
||||
@@ -28,8 +29,9 @@ function startmenu_shortcut($target, $shortcutName) {
|
||||
}
|
||||
|
||||
# Removes the Startmenu shortcut if it exists
|
||||
function rm_startmenu_shortcuts($manifest, $global) {
|
||||
$manifest.shortcuts | ?{ $_ -ne $null } | % {
|
||||
function rm_startmenu_shortcuts($manifest, $global, $arch) {
|
||||
$shortcuts = @(arch_specific 'shortcuts' $manifest $arch)
|
||||
$shortcuts | ?{ $_ -ne $null } | % {
|
||||
$name = $_.item(1)
|
||||
$shortcut = "$(shortcut_folder)\$name.lnk"
|
||||
write-host "Removing shortcut $(friendly_path $shortcut)"
|
||||
|
||||
@@ -68,7 +68,7 @@ foreach($app in $apps) {
|
||||
|
||||
run_uninstaller $manifest $architecture $dir
|
||||
rm_shims $manifest $global $architecture
|
||||
rm_startmenu_shortcuts $manifest $global
|
||||
rm_startmenu_shortcuts $manifest $global $architecture
|
||||
|
||||
# If a junction was used during install, that will have been used
|
||||
# as the reference directory. Otherwise it will just be the version
|
||||
|
||||
@@ -97,6 +97,9 @@
|
||||
"pre_install": {
|
||||
"$ref": "#/definitions/stringOrArrayOfStrings"
|
||||
},
|
||||
"shortcuts": {
|
||||
"$ref": "#/definitions/arrayOfArrayOfStrings"
|
||||
},
|
||||
"uninstaller": {
|
||||
"$ref": "#/definitions/uninstaller"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user