Section "Uninstall" ... Delete $INSTDIR\PCQ_Test.class ;//delete files Delete "$DESKTOP\PCQ Application.lnk" ... SectionEnd
Once you have finished writing the script, save the file with .nsi extension. Now lets also see what's in PCQ_Test. java program. It takes a date instance from the system time and displays the current date and time to the user after formatting it and converting that to a string. The Ccode snippet is as follows:
public PCQ_Test() { Date today; DateFormat dateFormatter; dateFormatter = DateFormat.getDateInstance(DateFormat.DEFAULT); DateFormat timeFormatter = DateFormat.getTimeInstance(DateFormat.DEFAULT); today = new Date(); String showDate = dateFormatter.format(today); String showTime = timeFormatter.format(today); String message = "Hello!! Today's Date is "+showDate+" and Time is "+showTime; ... }
Compilation Now to open NSIS compiler, launch 'MakeNSISW' from Start>Programs> NSIS. This will open a complier window. To compile the script that you have created above, load the script by clicking File>Load Script option. Alternatively, the script can also be dragged onto the compiler window or by right-clicking the .nsi file and choosing 'Compile NSIS Script.' The compiler compiles the script and if it does not find any errors with the instructions the 'Test Installer' button gets enabled. If script has errors they are shown on the window and the build process is stopped. With the 'Test Installer' button we can test the installer setup that the script has created.
In conclusion NSIS not only makes installers for Java developers but also for any other application development environment, be it Macromedia Flash or .NET. Thus it's a handy tool for developers to make their applications easy for distribution.
Source: PCQuest
Get most out of your technology infrastructure investments with Dell
About CIOL | Media Kit | Site Map | Contact Us | Help | Write to us | Jobs@CyberMedia | Privacy Policy
Copyright © CyberMedia India Online Ltd. All rights reserved. Usage of content from web site is subject to Terms and Conditions.