https://kotlinlang.org logo
Title
t

theapache64

03/15/2021, 3:07 PM
Apart from the
dirChooser
flag, is there any way to define default installation directory? I read it's possible via `jpackage`'s
--install-dir
option, but how can I pass that param from
build.gradle.kts
? 🤔
o

olonho

03/15/2021, 3:20 PM
@alexey.tsvetkov ^^^
t

theapache64

03/15/2021, 4:04 PM
okay, but is there any way to pass jpackage flags from
build.gradle.kts
?
So, • if I set
installationPath
to
/some/dir
, then on windows, the files will be extracted to which directory? • also, if i want to extract the files to
AppData/Roaming/MyApp
directory in windows, and default directory in linux and mac, what should be the
installationPath
value?
a

alexey.tsvetkov

03/16/2021, 6:59 AM
@theapache64 There is no way to pass jpackage flags directly.
--install-dir
is available as a
installationPath
DSL property.
installationPath
is specified for each OS separately (I don’t think a common path would be sensible across Linux, MacOS and Windows). If you don’t provide an
installationPath
value for an OS, a default value is used.
compose.desktop {
    application {
        nativeDistributions {
            macOS {
                installationPath = "/Applications/my-app"
            }
            windows {
                installationPath = "C:\Program Files\My Application"
            }
            linux {
                 // default installationPath will be used
            }
        }
    }
}
t

theapache64

03/16/2021, 7:03 AM
Understood 👍