简体   繁体   中英

How to create an executable installer for JavaFX aplication using Maven and Inno Setup in Netbeans 11

In netbeans 8.2 I was ablle to create an installer using native bundle. I tried doing the same in Netbeans 11 using maven and the javafx-maven-plugin.

I use install jfx:native as a build action.

Here is my pom.xml file http://maven.apache.org/maven-v4_0_0.xsd"> 4.0.0 ClienteIntegradorMaven 1.0-SNAPSHOT UTF-8 12 12 ClienteIntegradorMaven

    </properties>
    <dependencies>
        <!-- https://mvnrepository.com/artifact/com.microsoft.sqlserver/mssql-jdbc -->
        <dependency>
            <groupId>com.microsoft.sqlserver</groupId>
            <artifactId>mssql-jdbc</artifactId>
            <version>7.4.1.jre12</version>
        </dependency>

        <dependency>
            <groupId>org.openjfx</groupId>
            <artifactId>javafx-controls</artifactId>
            <version>12.0.2</version>
        </dependency>
        <dependency>
            <groupId>org.openjfx</groupId>
            <artifactId>javafx-fxml</artifactId>
            <version>12.0.2</version>
        </dependency>
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>1.2.12</version>
            <type>jar</type>
        </dependency>
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-api</artifactId>
            <version>2.11.2</version>
            <type>jar</type>
        </dependency>
    </dependencies>
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.8.1</version>
                <configuration>
                    <release>12</release>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.openjfx</groupId>
                <artifactId>javafx-maven-plugin</artifactId>
                <version>0.0.3</version>
                <configuration>
                    <release>12</release>
                    <jlinkImageName>hellofx</jlinkImageName>
                    <launcher>launcher</launcher>
                    <mainClass>clienteintegrador4.ClienteIntegrador4</mainClass>
                    <executable>C:\Program Files\Java\jdk-12.0.2\bin\java</executable>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>

You can always compile the Inno Setup script from a batch file (.bat).

Simply use the following syntax in batch file:

path\to\ISCC.exe path\to\your\file.iss

See the details: how to compile scripts using command-line compiler in Inno Setup .

So all you need is to call the batch file from Maven/Netbeans/xml.

PS I have no experiences with Maven or Netbeans (however I am an Inno Setup expert) so I cannot paste the exact solution.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM