As I'm not allowed to include the binary in my DbVisualizer Launcher, I thought about downloading the binary when the installer is started.
At the moment I have the code shown at the bottom.
Now just before the "Delete $2" I need to unzip the downloaded zip file to %PAL:AppDir%
As I did not understand NSIS yet, can anyone please give me a hint how to achieve this?
I thing I need some unzip plugin for nsis, like http://nsis.sourceforge.net/NsUnzip_plugin but don't know how to properly include this with my installer.
!define DBVIS_VERSION "9.1.11" !define DBVIS_URL "http://www.dbvis.com/product_download/dbvis-9.1.11/media/dbvis_windows_9_1_11.zip" Function CustomCodePreInstall MessageBox MB_OK "${PRODUCT_NAME} needs to download DbVisualizer ${DBVIS_VERSION}" FunctionEnd Function CustomCodePostInstall StrCpy $2 "$TEMP\dbvis.zip" nsisdl::download /TIMEOUT=30000 ${DBVIS_URL} $2 Pop $R0 ;Get the return value StrCmp $R0 "success" +3 MessageBox MB_OK "Download failed: $R0" Quit ExecWait $2 Delete $2 FunctionEnd
You don't need custom code for this. Use the download files section in installer.INI instead: https://portableapps.com/development/portableapps.com_format#installer
You're my hero!
How could I have missed that?
Thanks a million times.
Again thanks for that, but now I have the problem that the download fails. It seems the installer does not know about any proxy settings.
"The installer was unable to download... (Error: SendRequest Error)"
Am I missing something?
Update: I changed PortableApps proxy settings to use a local port where a putty connection is telling me when a connection attempt is made.
When I let PortableApps check for updates I see a connection comming. When I use my installer, no connection can be seen.