vlc | branch: master | Ludovic Fauvet <[email protected]> | Fri Jun 21 20:27:58 2013 +0200| [cf3c401743dc0de9bc27992ab3f1314aab98490e] | committer: Ludovic Fauvet
msi: remove older (nsis) version before install If a pre-2.1 version is detected it will be uninstalled silently before proceeding. > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=cf3c401743dc0de9bc27992ab3f1314aab98490e --- extras/package/win32/msi/product.wxs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/extras/package/win32/msi/product.wxs b/extras/package/win32/msi/product.wxs index 7cde324..6cb97f4 100644 --- a/extras/package/win32/msi/product.wxs +++ b/extras/package/win32/msi/product.wxs @@ -43,6 +43,9 @@ </Condition> <MajorUpgrade Schedule="afterInstallInitialize" DowngradeErrorMessage="A later version of [ProductName] is already installed. Setup will now exit."/> + <Property Id="NSISLOCATION"> + <RegistrySearch Id="NSISLOCATION" Type="raw" Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\Uninstall\VLC media player" Name="UninstallString" /> + </Property> <Icon Id="vlc.ico" SourceFile="$(var.SourceDir)/vlc.ico"/> @@ -326,10 +329,18 @@ <InstallExecuteSequence> <!-- <RemoveExistingProducts After="InstallValidate" /> --> + <Custom Action="ExecVLCNSISUninstall" Before="InstallValidate">NSISLOCATION AND NOT Installed</Custom> <Custom Action="ExecVLCCacheGen" Before="InstallFinalize">REINSTALL OR NOT Installed</Custom> <Custom Action="SetExecVLCCacheGen" Before="ExecVLCCacheGen">REINSTALL OR NOT Installed</Custom> </InstallExecuteSequence> + <!-- Uninstall an older version of VLC (using NSIS) --> + <CustomAction Id = "ExecVLCNSISUninstall" + Directory = "APPLICATIONFOLDER" + ExeCommand = "[NSISLOCATION] /S" + Execute = "immediate" + Impersonate = "no" + Return = "check" /> <!-- Launch silently vlc-cache-gen.exe during install --> <CustomAction Id = "SetExecVLCCacheGen" Property = "ExecVLCCacheGen" _______________________________________________ vlc-commits mailing list [email protected] http://mailman.videolan.org/listinfo/vlc-commits
