News for hackers. Stuff that matters.
Re:NSIS 3.0 ready by skrebbel on Monday August 08, 2016 @10:24AM (#12247989)
To me, NSIS is awesome and ridiculous at the same time. It's very practical and down to earth, and it's definitely miles ahead of anything that existed when NSIS got popular (hello, InstallShield!).

But the NSIS scripting language was modelled after Assembly. I mean, what? I really wonder, with delighted amazement, what went on in the heads of the people who decided to model a high level domain specific scripting language after the lowest-level language that's still human editable.

I mean, hand-editing LLVM IR is easier.

The good part is that assembly is actually good fun to write if you don't need to do large projects in it, and so is NSIS scripting. It sure is documented well enough. Nobody scripts installers fulltime for a living I guess, so it's a nice way to spice up work :-)

Re:NSIS 3.0 ready by Gracana on Monday August 08, 2016 @10:37AM (#12248098)
Oh man, this is wonderful. From the documentation: "The instructions that NSIS uses for scripting are sort of a cross between PHP and assembly. There are no real high level language constructs but the instructions themselves are (for the most part) high level, and you have handy string capability (i.e. you don't have to worry about concatenating strings, etc). You essentially have 25 registers (20 general purpose, 5 special purpose), and a stack."

I like it. Really. It's pretty simple to use the registers and stack, you can use memory (variables) however you like, and all the complex stuff is provided as "commands." It looks like it's pretty easy to create a spaghetti-code mess, but like with BASIC, you can write perfectly maintainable programs if you're inclined to do so.

Re:NSIS 3.0 ready by neko_koneko on Tuesday August 09, 2016 @06:36AM (#12253652)
> It looks like it's pretty easy to create a spaghetti-code mess

Can confirm. I currently work as a malware analyst, and I frequently have to analyze (somewhat) obfuscated malware NSIS installers.

Older version of the 7-zip software (v. 9.38) can extract and decompile NSIS installers, but in the newer versions this feature is no longer available, because some people on the 7-zip forums complained that users could unpack their installers and see hidden S/Ns. It's a pity.

Re:NSIS 3.0 ready by Gracana on Tuesday August 09, 2016 @08:12AM (#12253972)
> some people on the 7-zip forums complained that users could unpack their installers and see hidden S/Ns

wow

I'll have to look for that in the future. I guess removing the disassembler from a common piece of software raises the bar a bit, but still.. yikes.

Re:NSIS 3.0 ready by tauchunfall on Tuesday August 09, 2016 @01:22AM (#12252774)
>I like it. Really.

Me, too. I was amazed when I found out, that one can use Pop, Push and Exch [1] to clear registers for the scope of a function and restore the previous registers after leaving the function scope.

[1] http://nsis.sourceforge.net/Docs/Chapter4.html#stackinst

Re:NSIS 3.0 ready by mavhc on Monday August 08, 2016 @12:03PM (#12248791)
And people still use it over creating MSIs? Madness. I hate everything that's not an MSI as I deploy software in schools. Of course as soon as Office 2007 stopped being a normal MSI all hope was lost. If Microsoft won't use it why would anyone else?
Re:NSIS 3.0 ready by cm3 on Monday August 08, 2016 @01:16PM (#12249313)
MSI and the whole Microsoft setup engine ecosystem is very wrong and a waste of hardware resources and people's time.

I get the benefits of MSI and MSM when managing a fleet of machines, but it exhibits the same issues as Microsoft's other installers and update engines. It takes ages to do anything and during that seemingly seeks around the disk or eats up cpu for no reason. Sometimes it takes minutes or an hour just to return a failure condition at the end. If you compare the update process of a Debian install, which can update before first boot, to a Windows installation, you cannot explain what Microsoft is doing. The only explanation I've heard is that Windows doesn't have the required info in their databases and thus has to seek around the disk for a very long time.

Now, if you compare that to an NSIS installer, which admittedly doesn't support the Windows Domain deployment scenarios that MSI does, it's instant and you can understand where time is spent.

I do not understand why Microsoft doesn't fix those shortcomings.

Re:NSIS 3.0 ready by flukus on Monday August 08, 2016 @07:23PM (#12251492)
MSI is absolutely awful to deal with when you've got automated deployments. Chocalatey is much nicer.