• javafx 打包成可执行文件


    javapackager 插件支持mavenGradle githup上有详细wiki

    打包win执行文件时需要安装 Inno Setup (iscc)WIX Toolset (candle and light)

    详细wiki

    • 快速安装Inno Setup和WIX Toolset

      • 使用管理员权限打开powershell

      • 在 powershell 中执行 Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))

      • 执行 choco -? 确认choco安装成功

      • 在powershell 中执行choco install -y innosetup wixtoolset

            <plugin>
                        <groupId>io.github.fvarrui</groupId>
                        <artifactId>javapackager</artifactId>
                        <version>1.6.6</version>
                        <executions>
                            <execution>
                                <phase>package</phase>
                                <goals>
                                    <goal>package</goal>
                                </goals>
                                <configuration>
                                    <version>程序版本</version>
                                    <organizationName>组织名称</organizationName>
                                    <name>程序名称</name>
                                    <mainClass>mainClassPath</mainClass>
                                          <!--是否绑定默认jre-->    
                                    <bundleJre>true</bundleJre>
                                      <!--是否绑自定义jre-->    
                                    <customizedJre>false</customizedJre>
                                    <description>程序描述</description>
                                    <displayName>程序显示名称</displayName>
                                        <!--程序图标路径-->    
                                      <assetsDir>path/app.icns</assetsDir>
                                      <!--是否需要管理员权限安装-->    
                                    <administratorRequired>false</administratorRequired>
                                      <!--打包mac程序时使用-->    
                                    <macConfig>
                                        <icnsFile>path/app.icns</icnsFile>
                           <backgroundImage>path/favicon.png</backgroundImage>
                                    </macConfig>
                                        <!--打包win程序时使用-->    
                                    <winConfig>
                                        <icoFile>path/app.ico</icoFile>
                                      <!--生成exe安装文件-->    
                                        <generateSetup>true</generateSetup>
                                        <!--生成msi安装文件-->
                                        <generateMsi>false</generateMsi>
                                        <!--安装文件语言选项-->
                                        <setupLanguages>
                                            <english>compiler:Default.isl</english>
                                            <!--简体中文需要到innosetup官网下载-->
                                        <chinese>compiler:Languages\ChineseSimplified.isl</chinese>
                                        </setupLanguages>
                                    </winConfig>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>

         

  • 相关阅读:
    MySQL -- 表联结
    Unittest方法 -- 项目实现自动发送邮件
    Linux工作中常用命令
    Requests方法 -- Token获取操作
    Requests方法 -- 关联用例执行
    Requests方法 -- Blog流程类进行关联
    Requests方法 -- 参数化
    defer和async的区别
    js函数收藏:获取cookie值
    XSHELL使用技巧总结
  • 原文地址:https://www.cnblogs.com/itniwota/p/16485533.html
Copyright © 2020-2023  润新知