简体   繁体   English

如何在linux中为我的java项目创建Windows安装程序?

[英]How can I create windows installer for my java project in linux?

I wrote my project with java in IntellijIDEA. 我在IntellijIDEA中用java编写了我的项目。 I can create executable .exe file using launch4j for my project. 我可以使用launch4j为我的项目创建可执行的.exe文件。 Now I need some installer maker to create a windows installer for my project inside my linux operating system. 现在我需要一些安装程序制造商为我的linux操作系统内的项目创建一个Windows安装程序。

Is there any windows installer maker that I can use it inside linux? 是否有任何Windows安装程序制造商,我可以在Linux内使用它?

My project compiled using Oracle JDK 1.7.0_45 我的项目使用Oracle JDK 1.7.0_45编译

My OS is Ubuntu 13.10 我的操作系统是Ubuntu 13.10

Install Wine http://www.winehq.org/ 安装Wine http://www.winehq.org/

Install NSIS (Windows installer maker) on a Windows Distributions: http://nsis.sourceforge.net/Main_Page . 在Windows发行版上安装NSIS(Windows安装程序制造商): http//nsis.sourceforge.net/Main_Page

Copy the folder "C:\\Program Files\\NSIS\\" from Windows to "/usr/local/NSIS/" in Linux. 将文件夹“C:\\ Program Files \\ NSIS \\”从Windows复制到Linux中的“/ usr / local / NSIS /”。

Create a script file : "/usr/local/NSIS/makensis.sh" with the following content: 创建一个脚本文件:“/ usr / local / NSIS / madsis.sh”,其中包含以下内容:

#! /bin/bash
# makensis.sh

wine  /usr/local/makensis.exe $*

Run following commands: 运行以下命令:

sudo chmod -R a+rx /usr/local/NSIS
sudo ln -s /usr/local/NSIS/makensis.sh /usr/bin/makensis
sudo chmod -R a+rx /usr/bin/makensis

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM