Browse Source

CMP-1974 #comment Added the ability to select a desktop shortcut option in the dialog box during installation. Based on JDK-8261536

pull/5156/head
Andrei Zhidkov 4 weeks ago committed by Andrey_Zhidkov
parent
commit
a6bd824e4e
  1. 1
      gradle-plugins/compose/src/main/kotlin/org/jetbrains/compose/desktop/application/dsl/PlatformSettings.kt
  2. 1
      gradle-plugins/compose/src/main/kotlin/org/jetbrains/compose/desktop/application/internal/configureJvmApplication.kt
  3. 5
      gradle-plugins/compose/src/main/kotlin/org/jetbrains/compose/desktop/application/tasks/AbstractJPackageTask.kt

1
gradle-plugins/compose/src/main/kotlin/org/jetbrains/compose/desktop/application/dsl/PlatformSettings.kt

@ -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

1
gradle-plugins/compose/src/main/kotlin/org/jetbrains/compose/desktop/application/internal/configureJvmApplication.kt

@ -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 })

5
gradle-plugins/compose/src/main/kotlin/org/jetbrains/compose/desktop/application/tasks/AbstractJPackageTask.kt

@ -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()
@ -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)

Loading…
Cancel
Save