Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NSIS - download and decompress zip file from the internet

Tags:

unzip

nsis

I would like to create NSIS installer that during the installation process checks on the www whether there is a newer application version (number). If in the network exists newer version than version provided witch installer, the installer should to download application zip file, unpack it and install the downloaded application instead of application provided with installer.

The questions are:

  • how to download file from the internet (www)?
  • how to unzip downloaded zip file?
like image 478
Przemysław Michalski Avatar asked Nov 17 '10 17:11

Przemysław Michalski


2 Answers

As an addendum to Stu's answer, it's really important to point out that ZipDLL, while a great plug-in, is released under the GPL. If you're releasing a commercial product, you can't legally include it with your product. Additionally, the only available copy requires that you modify the source, which engages the "modification" sections of the GPL.

Nsisunz is released under an extremely open license -- just include the license text shown on the source page to distribute it, and make sure to mark any direct modification in source.

like image 160
colin.t.welch Avatar answered Nov 18 '22 18:11

colin.t.welch


A bit late to the party, but now (with the new Windows) there are a lot of useful functions in the PowerShell. One of them does the no-hassle uncompression of the .zip files. The only downside (for me, at least) is that it is not possible to avoid extracting the directory structure (flatten out the files). Otherwise it is easy:

powershell.exe Expand-Archive <filename> <target_dir>
like image 32
YePhIcK Avatar answered Nov 18 '22 17:11

YePhIcK