Skip to content

Commit

Permalink
CMP-1974 #comment Added the ability to select a desktop shortcut opti…
Browse files Browse the repository at this point in the history
…on in the dialog box during installation. Based on JDK-8261536
  • Loading branch information
AndrewDvizhok authored and Andrey_Zhidkov committed Oct 28, 2024
1 parent 7e9832f commit a6bd824
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ abstract class WindowsPlatformSettings : AbstractPlatformSettings() {
var dirChooser: Boolean = true
var perUserInstall: Boolean = false
var shortcut: Boolean = false
var shortcutPrompt: Boolean = false
var menu: Boolean = false
get() = field || menuGroup != null
var menuGroup: String? = null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,7 @@ internal fun JvmApplicationContext.configurePlatformSettings(
packageTask.winDirChooser.set(provider { win.dirChooser })
packageTask.winPerUserInstall.set(provider { win.perUserInstall })
packageTask.winShortcut.set(provider { win.shortcut })
packageTask.winShortcutPrompt.set(provider { win.shortcutPrompt })
packageTask.winMenu.set(provider { win.menu })
packageTask.winMenuGroup.set(provider { win.menuGroup })
packageTask.winUpgradeUuid.set(provider { win.upgradeUuid })
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,10 @@ abstract class AbstractJPackageTask @Inject constructor(
@get:Optional
val winShortcut: Property<Boolean?> = objects.nullableProperty()

@get:Input
@get:Optional
val winShortcutPrompt: Property<Boolean?> = objects.nullableProperty()

@get:Input
@get:Optional
val winMenu: Property<Boolean?> = objects.nullableProperty()
Expand Down Expand Up @@ -449,6 +453,7 @@ abstract class AbstractJPackageTask @Inject constructor(
cliArg("--win-dir-chooser", winDirChooser)
cliArg("--win-per-user-install", winPerUserInstall)
cliArg("--win-shortcut", winShortcut)
cliArg("--win-shortcut-prompt", winShortcutPrompt)
cliArg("--win-menu", winMenu)
cliArg("--win-menu-group", winMenuGroup)
cliArg("--win-upgrade-uuid", winUpgradeUuid)
Expand Down

0 comments on commit a6bd824

Please sign in to comment.