using maven-nsis-plugin and linux

written by juan on April 20th, 2005 @ 12:00 AM

(also known as) generating a windows distribution of your project using linux. maven ships with a plugin called maven-nsis-plugin that is very useful to create installation distributions using NSIS (fabulous) installer. You might say ".exe distributions for a java project! why bother?", The nice thing about .exe distribution is that makes the user's life easier. For example to run the program the only thing she needs to click is the shortcut created by the instaler. Switch to windows every time i need to generate a release of jiol is a bit uncomfortable to me. Earlier this day, something brought my attention back to WINE, so i decided to try to install wine and try to generate jiol windows release with it. I started with a clean .wine directory and installed nsis v206 using wine to the c:\Program Files\NSIS directory. gentoo default configuration of wine creates a z: disk unit that is mapped to / that make easier all the mappings . After generating the data that will be distributed (maven dist?), run the goals nsis:generate-setup and nsis:generate-project for your project, and run this little script:
----8<--------------8<----------
for i in target/setup.nsi target/project.nsh
do
   tmpfile=nsis-script.tmp
   cat $i|sed 's/\/home\/juan/z:&/g' > $tmpfile
   mv $tmpfile $i
done
----8<--------------8<----------
And voilá¡!, all the path gets fixed so you can now run makensis.exe as
wine "c:/Program Files/NSIS/makensisw".exe z:/home/juan/workspace/jiol/target/setup.nsi
to get the installer! Note that i tried to avoid using an external script, but i found no way of doing this without changing the plugin.

Comments are closed

Options:

Size

Colors