Commits

shemnon committed 2939db5

add more info and preferences fields

Comments (0)

Files changed (1)

plugin/src/main/groovy/com/bitbucket/shemnon/javafxplugin/tasks/JavaFXDeployTask.groovy

                     id: getAppID(),
                     name: getAppName(),
                     mainClass: getMainClass()
-                    //FIXME preloader
-                    //FIXME fallback
             )
             resources {
                 getInputFiles().filter() { it.file } each {
 
             }
             info(
-                title: getAppName()
+                title: getAppName(),
+                category: getCategory(),
+                copyright: getCopyright(),
+                description: getDescription(),
+                license: getLicense(),
+                vendor: getVendor()
+            )
+            preferences(
+                createPreferencesAttributes()
             )
 
             permissions(elevated: 'true')
     boolean verbose = false
 
 
+    // deplpy/info attributes
+    String category
+    String copyright
+    String description
+    String license
+    String vendor
+
+    // deploy/preferences attributes
+    Boolean installSystemWide
+    Boolean menu
+    Boolean shortcut
+
+
     @InputFiles
     FileCollection inputFiles
 
     @OutputDirectory
     File distsDir
 
+    protected Map createPreferencesAttributes() {
+        def res = [:]
+        if (getInstallSystemWide() != null) {
+            res.install = getInstallSystemWide()
+        }
+        if (getMenu() != null) {
+            res.menu = getMenu()
+        }
+        if (getShortcut() != null) {
+            res.shortcut = getShortcut()
+        }
+        return res
+    }
 
 }