packaging dukescript as native windows app

116 Views Asked by At

Recently I read on Dukescript page

DukeScript’s is pure client technology: You write your application and it’s business logic in Java which is compiled to Java bytecode. The bytecode is running in a normal JVM. If you deploy the application to the Desktop, the JVM is HotSpot, and you deploy an executable, e.g. an exe on Windows.

How can I package a native desktop app using Dukescript for Windows platform since no native package option is enabled at the project properties?

2

There are 2 best solutions below

1
On BEST ANSWER

Solved! I created an article about it, the essential steps are as follows:

  1. Created a new dukescript application with the following specifications:
  • used the sample hello world project with knockout
  • named it nativeds
  • no plataforms selected so only javafx version will be avalible
  1. Addeded a plugin generated at http://javafx-maven-plugin.github.io/

maven plugin tag:

<plugin>
    <groupId>com.zenjava</groupId>
    <artifactId>javafx-maven-plugin</artifactId>
    <version>8.1.4</version>
    <configuration>
        <mainClass>org.javapro.nativeds.Main</mainClass>
        <verbose>true</verbose>
        <vendor>javapro.org</vendor>
        <nativeReleaseVersion>0.1</nativeReleaseVersion>
        <additionalAppResources>${project.basedir}/src/main/webapp</additionalAppResources>
    </configuration>
    <executions>
        <execution>
            <!-- required before build-native -->
            <id>create-jfxjar</id>
            <phase>package</phase>
            <goals>
                <goal>build-jar</goal>
            </goals>
        </execution>
        <execution>
            <id>create-native</id>
            <phase>package</phase>
            <goals>
                <goal>build-native</goal>
            </goals>
        </execution>
    </executions>
</plugin>

Thanks for your help.

0
On

You use JavaFX native packaging, Ant+InnoSetup or straight output from a NetBeans project (haven't tried the latter but I believe it works). The limitation is that you need a 32 bit jvm if you want to package it for 32bit on a 64 bit Windows. I'll post a link to an Ant script later