diff --git a/INSTALL.md b/INSTALL.md index ac210c887f..90e8712b19 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -20,6 +20,7 @@ To produce an executable installer on Windows, the following are required: - [Inetc Plug-in for Nullsoft](http://nsis.sourceforge.net/Inetc_plug-in) - 1.0 - [NSISpcre Plug-in for Nullsoft](http://nsis.sourceforge.net/NSISpcre_plug-in) - 1.0 - [nsisSlideshow Plug-in for Nullsoft](http://nsis.sourceforge.net/NsisSlideshow_plug-in) - 1.7 +- [Nsisunz plug-in for Nullsoft](http://nsis.sourceforge.net/Nsisunz_plug-in) Run the `package` target to create an executable installer using the Nullsoft Scriptable Install System. diff --git a/cmake/templates/NSIS.template.in b/cmake/templates/NSIS.template.in index bfedccdd2e..fc9b9ab03d 100644 --- a/cmake/templates/NSIS.template.in +++ b/cmake/templates/NSIS.template.in @@ -1005,6 +1005,23 @@ Function HandlePostInstallOptions ${EndIf} FunctionEnd +Function OptionallyDownloadCampaignServerless + ${If} $CampaignName != "" + InitPluginsDir + + NSISdl::download_quiet http://cdn.highfidelity.com/installer/serverless/$CampaignName.zip $PLUGINSDIR\$CampaignName.zip + + ${If} ${FileExists} $PLUGINSDIR\$CampaignName.zip + ; replace the installed serverless content with the campaign content + + RMDir /r "$INSTDIR\resources\serverless" + CreateDirectory "$INSTDIR\resources\serverless" + nsisunz::Unzip "$PLUGINSDIR\$CampaignName.zip" "$INSTDIR\resources\serverless" + ${EndIf} + + ${Endif} +FunctionEnd + ;-------------------------------- ;Installer Sections @@ -1158,6 +1175,9 @@ Section "-Core installation" @CPACK_NSIS_EXTRA_INSTALL_COMMANDS@ + ; see if we have a campaign that we might need to grab special content for + Call OptionallyDownloadCampaignServerless + ; Handle whichever post install options were set Call HandlePostInstallOptions