简体   繁体   中英

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

I wrote my project with java in IntellijIDEA. I can create executable .exe file using launch4j for my project. Now I need some installer maker to create a windows installer for my project inside my linux operating system.

Is there any windows installer maker that I can use it inside linux?

My project compiled using Oracle JDK 1.7.0_45

My OS is Ubuntu 13.10

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

Install NSIS (Windows installer maker) on a Windows Distributions: http://nsis.sourceforge.net/Main_Page .

Copy the folder "C:\\Program Files\\NSIS\\" from Windows to "/usr/local/NSIS/" in Linux.

Create a script file : "/usr/local/NSIS/makensis.sh" with the following content:

#! /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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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