maven項目使用JavaFX生成可運行exe文件


原文:https://blog.csdn.net/qq_27503061/article/details/90612455

 

最近研究OCR技術,需要使用javafx-maven-plugin生成可運行的exe文件,但是遇到以下問題:

[INFO] Skipping 'EXE 安裝程序' because of configuration error '找不到 InnoSetup 編譯器 (iscc.exe)。'
Advice to fix:   從 http://www.jrsoftware.org 下載 InnoSetup 5 或更高版本, 然后將其添加到 PATH。
[INFO] Skipping 'MSI 安裝程序' because of configuration error '找不到 WiX 工具 (light.exe, candle.exe)。'
Advice to fix:   從 http://wix.sf.net 下載 WiX 3.0 或更高版本, 然后將其添加到 PATH。
[INFO] Skipping 'WebStart JNLP Bundler' because of configuration error 'No OutFile Specificed'
Advice to fix: Please specify the name of the JNLP Outut file in 'jnlp.outfile'

eclipse控制台錯誤信息
通過查閱大量資料,把它解決了,特記錄下來,給需要的人(包括我自己)。

首先安裝Inno Setup

通過Inno Setup官網下載、安裝對應版本,需要說明兩點:

  1. 版本:雖然控制台提示5或更高版本均可以,但是我最開始安裝的是6,最終還是失敗了;最后,我改回5就可以了。
  2. 路徑:和1有關,最開始我安裝6時,我是將目錄放在D盤的, 失敗后,卸載重裝,路徑則是選擇的是默認路徑。

安裝成功后,配置環境變量,Start --> Computer -->System Properties --> Advanced System Properties --> Environment Variables then choose System Variables, Path, and then Edit. Enter the following to add Inno Setup 5 to the Path: C:\Program Files (x86)\Inno Setup 5;, 如下圖所示:
環境變量配置
配置完成后,打開cmd,輸入iscc.exe,出現下圖,則表示安裝成功:
Inno Setup安裝

安裝WiX Toolset

通過WiX Toolset官網,下載安裝對應版本(我下載的是3.10)。

配置環境變量,Start --> Computer -->System Properties --> Advanced System Properties --> Environment Variables then choose System Variables, Path, and then Edit. Enter the following to add Inno Setup 5 to the Path: C:\Program Files (x86)\WiX Toolset v3.10\bin;, 如下圖所示:
WiX Toolset安裝步驟
配置完成后,打開cmd,分別輸入light.exe ,candle.exe,出現下圖,則表示安裝成功:
輸入light.exe:
light.exe
輸入candle.exe時:
在這里插入圖片描述

至此,需要的配置文件基本都已經安裝完畢,此時再打包時可以看見這兩個錯誤已經不存在了,如下圖所示(還有一個問題,待解決ing,請勿略它!):

成功


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM