beryx-gist / badass-runtime-example-javafx

A small JavaFX application that shows how to use the Badass Runtime Plugin
Apache License 2.0
26 stars 3 forks source link

How to create an another version of javafx app ? #25

Closed ghost closed 3 years ago

ghost commented 4 years ago

How to create an another version of javafx app ?

when I update my javafx app it comes like this

Capture

how to create an another version?

Srijan-Sengupta commented 4 years ago

This error you are getting because you have installed another application with the same version. To fix this issue,

  1. You may uninstall the last program with the same name and then install the new one.
  2. You may change the packaging version to some other version and run jpackage
Srijan-Sengupta commented 4 years ago

In your build.gradle file's Installer options, you will need to add "--version","2.0" You may change 2.0 according to your version number

On Sun, Nov 1, 2020, 10:48 AM parasuraam notifications@github.com wrote:

How to create an another version of javafx app ?

when I update my javafx app it comes like this

[image: Capture] https://user-images.githubusercontent.com/67687893/97795699-2cf91b00-1c01-11eb-8aad-c811ba7c26da.PNG

how to create an another version?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/beryx-gist/badass-runtime-example-javafx/issues/25, or unsubscribe https://github.com/notifications/unsubscribe-auth/AM7LWIMESQTE4JKKDX6QU2DSNTVRDANCNFSM4TGJZABQ .

ghost commented 4 years ago

build.gradle

plugins {
id 'application'
id 'org.openjfx.javafxplugin' version '0.0.9'
id 'org.beryx.runtime' version '1.11.3'
}

repositories {
mavenCentral()
}

javafx {
modules = ['javafx.controls', 'javafx.fxml']
}

application {
 mainClassName = "org.example.hellofx.Launcher"
 applicationName = 'hellofx'
 }

  runtime {
    options = ['--strip-debug', '--compress', '2', '--no-header-files', '--no-man-pages']
    launcher {
    noConsole = true
    }
    jpackage {
    def currentOs = org.gradle.internal.os.OperatingSystem.current()
    def imgType = currentOs.windows ? 'ico' : currentOs.macOsX ? 'icns' : 'png'
    imageOptions += ['--icon', "src/main/resources/hellofx.$imgType"]
    installerOptions += ['--resource-dir', "src/main/resources"]
    installerOptions += ['--vendor', 'Acme Corporation']
    if(currentOs.windows) {
        installerOptions += ['--win-per-user-install', '--win-dir-chooser', '--win-menu', '--win-shortcut']
    }
}
}

how to change the version in build.gradle file?

Srijan-Sengupta commented 4 years ago
plugins {
id 'application'
id 'org.openjfx.javafxplugin' version '0.0.9'
id 'org.beryx.runtime' version '1.11.3'
}

repositories {
mavenCentral()
}

javafx {
modules = ['javafx.controls', 'javafx.fxml']
}

application {
 mainClassName = "org.example.hellofx.Launcher"
 applicationName = 'hellofx'
 }

  runtime {
    options = ['--strip-debug', '--compress', '2', '--no-header-files', '--no-man-pages']
    launcher {
    noConsole = true
    }
    jpackage {
    def currentOs = org.gradle.internal.os.OperatingSystem.current()
    def imgType = currentOs.windows ? 'ico' : currentOs.macOsX ? 'icns' : 'png'
    imageOptions += ['--icon', "src/main/resources/hellofx.$imgType"]
    installerOptions += ['--resource-dir', "src/main/resources"]
    installerOptions += ['--vendor', 'Acme Corporation']
    appVersion = '2.0'
    if(currentOs.windows) {
        installerOptions += ['--win-per-user-install', '--win-dir-chooser', '--win-menu', '--win-shortcut']
    }
}
}

Sorry @parasuraam I was wrong a bit but after reading the documentation, I became sure. I would request @parasuraam to read the docs carefully here is the link: https://badass-runtime-plugin.beryx.org/releases/latest/

Srijan-Sengupta commented 4 years ago

Did it work @parasuraam ?

ghost commented 3 years ago

@Srijan-Sengupta Thanks . It worked.