diff --git a/Application/Application.vcxproj b/Application/Application.vcxproj index 78b9f050..1919a98e 100644 --- a/Application/Application.vcxproj +++ b/Application/Application.vcxproj @@ -118,6 +118,11 @@ xcopy /Q /S /Y ..\Build\Themes ..\testbench\x64\release\Layouts + + + PreserveNewest + + diff --git a/Application/Rainmeter.exe.config b/Application/Rainmeter.exe.config new file mode 100644 index 00000000..d8bc5ec1 --- /dev/null +++ b/Application/Rainmeter.exe.config @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/Build/Installer/Installer.nsi b/Build/Installer/Installer.nsi index a97d9445..5f67a8ce 100644 --- a/Build/Installer/Installer.nsi +++ b/Build/Installer/Installer.nsi @@ -619,31 +619,33 @@ Section ${EndIf} ${EndIf} - ; Download and install .NET if required - ReadRegDWORD $0 HKLM "SOFTWARE\Microsoft\NET Framework Setup\NDP\v2.0.50727" "Install" - ${If} $0 <> 1 - ${If} $Install64Bit <> 1 - NSISdl::download /TIMEOUT=30000 "http://download.microsoft.com/download/5/6/7/567758a3-759e-473e-bf8f-52154438565a/dotnetfx.exe" "$PLUGINSDIR\dotnetfx.exe" - ${Else} - NSISdl::download /TIMEOUT=30000 "http://download.microsoft.com/download/a/3/f/a3f1bf98-18f3-4036-9b68-8e6de530ce0a/NetFx64.exe" "$PLUGINSDIR\dotnetfx.exe" - ${EndIf} - Pop $0 + ${IfNot} ${AtLeastWinVista} + ; Download and install .NET if required + ReadRegDWORD $0 HKLM "SOFTWARE\Microsoft\NET Framework Setup\NDP\v2.0.50727" "Install" + ${If} $0 <> 1 + ${If} $Install64Bit <> 1 + NSISdl::download /TIMEOUT=30000 "http://download.microsoft.com/download/5/6/7/567758a3-759e-473e-bf8f-52154438565a/dotnetfx.exe" "$PLUGINSDIR\dotnetfx.exe" + ${Else} + NSISdl::download /TIMEOUT=30000 "http://download.microsoft.com/download/a/3/f/a3f1bf98-18f3-4036-9b68-8e6de530ce0a/NetFx64.exe" "$PLUGINSDIR\dotnetfx.exe" + ${EndIf} + Pop $0 - ${If} $0 == "success" - ExecWait '"$PLUGINSDIR\dotnetfx.exe" /q:a /c:"install /q"' $0 - Delete "$PLUGINSDIR\dotnetfx.exe" + ${If} $0 == "success" + ExecWait '"$PLUGINSDIR\dotnetfx.exe" /q:a /c:"install /q"' $0 + Delete "$PLUGINSDIR\dotnetfx.exe" - ${If} $0 = 3010 - SetRebootFlag true - ${ElseIf} $0 <> 0 + ${If} $0 = 3010 + SetRebootFlag true + ${ElseIf} $0 <> 0 + MessageBox MB_OK|MB_ICONSTOP "$(DOTNETINSTERROR)" + Quit + ${EndIf} + ${ElseIf} $0 == "cancel" + Quit + ${Else} MessageBox MB_OK|MB_ICONSTOP "$(DOTNETINSTERROR)" Quit ${EndIf} - ${ElseIf} $0 == "cancel" - Quit - ${Else} - MessageBox MB_OK|MB_ICONSTOP "$(DOTNETINSTERROR)" - Quit ${EndIf} ${EndIf} ${EndIf} @@ -713,7 +715,6 @@ SkipIniMove: ${EndIf} ; Cleanup old stuff - Delete "$INSTDIR\Rainmeter.exe.config" Delete "$INSTDIR\Rainmeter.chm" Delete "$INSTDIR\Default.ini" Delete "$INSTDIR\Launcher.exe" @@ -746,6 +747,7 @@ SkipIniMove: ${Else} !insertmacro InstallFiles "x64" ${EndIf} + File "..\..\Application\Rainmeter.exe.config" RMDir /r "$INSTDIR\Languages" SetOutPath "$INSTDIR\Languages" @@ -991,6 +993,7 @@ Section Uninstall RMDir /r "$INSTDIR\Fonts" Delete "$INSTDIR\Rainmeter.dll" Delete "$INSTDIR\Rainmeter.exe" + Delete "$INSTDIR\Rainmeter.exe.config" Delete "$INSTDIR\SkinInstaller.exe" Delete "$INSTDIR\uninst.exe"