Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there any NSIS Best Practices or Coding Standards around?

I'm creating several NSIS installers and as my expertise in this thing grows up I'm no longer happy with just making things work, I would like to see if there are some best practices or coding standards around this language, like how to write conditionals, variable names, unistallers, etc..

like image 741
levhita Avatar asked Oct 22 '08 23:10

levhita


1 Answers

As far as I know, there is no specific coding standard for NSIS available -- but there are a lot of tutorials and examples to learn from. As with every other language you're trying to master, I think reading other's code helps a lot and inspires you to think in different directions.

From my own experience with NSIS, I can also suggest to tidy up your installer scripts regularly. As you learn new things, old workarounds become obsolete and can be replaced by proper solutions. Also watch out for new developments. Before we were able to use nsDialogs, InstallOptions was the way to go when it came to user-defined dialogs -- and now it's so much easier to do with less code.

Since you're aiming at creating several installers, I'd also try to reuse as much code as possible in the different installers. Modularising shared functionality is possible with .nsh files and fosters a good and clean code base.

like image 169
fhe Avatar answered Nov 11 '22 00:11

fhe