0

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?

Ruslan López
  • 4,433
  • 2
  • 26
  • 37

2 Answers2

1

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

ZiglioUK
  • 2,573
  • 4
  • 27
  • 32
0

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.

Ruslan López
  • 4,433
  • 2
  • 26
  • 37
  • Good one! as far as I remember that plugin had the limitation of not being able to produce 32bit versions on 64bit jvms. It is possible, if you need to, but you need to run the Ant script from the command line and reference to a 32bit version of tools and jvm – ZiglioUK Aug 18 '16 at 11:23