Create a native javafx app with Inno Setup and maven

后端 未结 1 1175
悲哀的现实
悲哀的现实 2021-02-09 15:08

I\'ve a little JavaFX app and I use Maven for managing the dependencies thanks to the javafx-maven-plugin.

This plugin have an option who will build a native installer b

1条回答
  •  广开言路
    2021-02-09 15:38

    Where to put "Inno Setup" file (*.iss)?

    When using javafx-maven-plugin you can add inno setup file into:

    src/main/deploy/package/windows/project-name.iss
    

    Referencing files in iss

    If you need to reference some files in setup file your root will be on:

    target/jfx/native/bundles
    

    So for example to pack whole project use:

    ...
    [Files]
    Source: "project-name\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
    ...
    

    That will pack all files from:

    target/jfx/native/bundles/project-name/*
    

    Adding application icon

    For simple icon you can just put it in:

    src/main/deploy/package/windows/project-name.ico
    

    And in iss put this:

    ...
    [Icons]
    Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
    Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
    ...
    

    And don`t forget to define: MyAppExeName and MyAppName.

    0 讨论(0)
提交回复
热议问题