From e4cac17f3db2a2020d4afffa79b9248e51f7228d Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Sat, 23 Oct 2021 00:07:39 +0300 Subject: SL-16121 Fix viewer not cleaning up obsolete plugin modules on install --- .../installers/windows/installer_template.nsi | 23 ++++++++++++++++++++- indra/newview/installers/windows/lang_en-us.nsi | Bin 11434 -> 11802 bytes 2 files changed, 22 insertions(+), 1 deletion(-) (limited to 'indra/newview/installers/windows') diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index 8838b6d0be..668a8025bd 100644 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -605,6 +605,12 @@ FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Function RemoveProgFilesOnInst +# We do not remove whole pervious install folder on install, since +# there is a chance that viewer was installed into some important +# folder by intent or accident +# RMDir /r $INSTDIR is especially unsafe if user installed somewhere +# like Program Files + # Remove old SecondLife.exe to invalidate any old shortcuts to it that may be in non-standard locations. See MAINT-3575 Delete "$INSTDIR\$INSTEXE" Delete "$INSTDIR\$VIEWER_EXE" @@ -612,8 +618,23 @@ Delete "$INSTDIR\$VIEWER_EXE" # Remove old shader files first so fallbacks will work. See DEV-5663 RMDir /r "$INSTDIR\app_settings\shaders" -# Remove skins folder to clean up files removed during development +# Remove folders to clean up files removed during development +RMDir /r "$INSTDIR\app_settings" RMDir /r "$INSTDIR\skins" +RMDir /r "$INSTDIR\vmp_icons" + +# Remove llplugin, plugins can crash or malfunction if they +# find modules from different versions +RMDir /r "$INSTDIR\llplugin" + +IfErrors 0 PREINSTALLCLEAN + StrCmp $SKIP_DIALOGS "true" PREINSTALLCLEAN + MessageBox MB_OKCANCEL $(CloseSecondLifeInstRM) IDOK PREINSTALLCLEAN IDCANCEL PREINSTALLFAIL + +PREINSTALLFAIL: + Quit + +PREINSTALLCLEAN: # We are no longer including release notes with the viewer, so remove them. Delete "$SMPROGRAMS\$INSTSHORTCUT\SL Release Notes.lnk" diff --git a/indra/newview/installers/windows/lang_en-us.nsi b/indra/newview/installers/windows/lang_en-us.nsi index ea680f08e4..f75ecfaf08 100644 Binary files a/indra/newview/installers/windows/lang_en-us.nsi and b/indra/newview/installers/windows/lang_en-us.nsi differ -- cgit v1.2.3 From 3614083377a9bc00da057acbd9caaaa95f7a4c2a Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Mon, 25 Oct 2021 21:02:33 +0300 Subject: SL-16121 Fix intaller complaining about missing string --- indra/newview/installers/windows/lang_da.nsi | Bin 11760 -> 12128 bytes indra/newview/installers/windows/lang_de.nsi | 1 + indra/newview/installers/windows/lang_es.nsi | Bin 12744 -> 13112 bytes indra/newview/installers/windows/lang_fr.nsi | Bin 13262 -> 13628 bytes indra/newview/installers/windows/lang_it.nsi | Bin 12480 -> 12850 bytes indra/newview/installers/windows/lang_ja.nsi | Bin 9644 -> 10016 bytes indra/newview/installers/windows/lang_pl.nsi | Bin 12080 -> 12448 bytes indra/newview/installers/windows/lang_pt-br.nsi | Bin 12892 -> 13272 bytes indra/newview/installers/windows/lang_ru.nsi | Bin 12216 -> 12586 bytes indra/newview/installers/windows/lang_tr.nsi | Bin 12126 -> 12496 bytes indra/newview/installers/windows/lang_zh.nsi | Bin 9082 -> 9460 bytes 11 files changed, 1 insertion(+) (limited to 'indra/newview/installers/windows') diff --git a/indra/newview/installers/windows/lang_da.nsi b/indra/newview/installers/windows/lang_da.nsi index f462c82078..0b5ae2b714 100644 Binary files a/indra/newview/installers/windows/lang_da.nsi and b/indra/newview/installers/windows/lang_da.nsi differ diff --git a/indra/newview/installers/windows/lang_de.nsi b/indra/newview/installers/windows/lang_de.nsi index eebcf027a8..e67bc9e22c 100755 --- a/indra/newview/installers/windows/lang_de.nsi +++ b/indra/newview/installers/windows/lang_de.nsi @@ -64,6 +64,7 @@ LangString MissingSSE2 ${LANG_GERMAN} "Dieses Gerät verfügt möglicherweise ni ; closesecondlife function (install) LangString CloseSecondLifeInstDP ${LANG_GERMAN} "Warten auf die Beendigung von Second Life ..." LangString CloseSecondLifeInstMB ${LANG_GERMAN} "Second Life kann nicht installiert oder ersetzt werden, wenn es bereits läuft.$\n$\nBeenden Sie, was Sie gerade tun und klicken Sie OK, um Second Life zu beenden.$\nKlicken Sie CANCEL, um die Installation abzubrechen." +LangString CloseSecondLifeInstRM ${LANG_GERMAN} "Second Life failed to remove some files from a previous install.$\n$\nSelect OK to continue.$\nSelect CANCEL to cancel installation." ; closesecondlife function (uninstall) LangString CloseSecondLifeUnInstDP ${LANG_GERMAN} "Warten auf die Beendigung von Second Life ..." diff --git a/indra/newview/installers/windows/lang_es.nsi b/indra/newview/installers/windows/lang_es.nsi index 8a81110069..2b9fa61199 100755 Binary files a/indra/newview/installers/windows/lang_es.nsi and b/indra/newview/installers/windows/lang_es.nsi differ diff --git a/indra/newview/installers/windows/lang_fr.nsi b/indra/newview/installers/windows/lang_fr.nsi index f038c0e419..4e256a3af9 100755 Binary files a/indra/newview/installers/windows/lang_fr.nsi and b/indra/newview/installers/windows/lang_fr.nsi differ diff --git a/indra/newview/installers/windows/lang_it.nsi b/indra/newview/installers/windows/lang_it.nsi index bd16d8318f..bf4f51e326 100755 Binary files a/indra/newview/installers/windows/lang_it.nsi and b/indra/newview/installers/windows/lang_it.nsi differ diff --git a/indra/newview/installers/windows/lang_ja.nsi b/indra/newview/installers/windows/lang_ja.nsi index 71edde1992..02d9ae2b40 100755 Binary files a/indra/newview/installers/windows/lang_ja.nsi and b/indra/newview/installers/windows/lang_ja.nsi differ diff --git a/indra/newview/installers/windows/lang_pl.nsi b/indra/newview/installers/windows/lang_pl.nsi index 05977847b9..4c254b4b2c 100644 Binary files a/indra/newview/installers/windows/lang_pl.nsi and b/indra/newview/installers/windows/lang_pl.nsi differ diff --git a/indra/newview/installers/windows/lang_pt-br.nsi b/indra/newview/installers/windows/lang_pt-br.nsi index 0e7cbeacda..1e9e0b07d2 100755 Binary files a/indra/newview/installers/windows/lang_pt-br.nsi and b/indra/newview/installers/windows/lang_pt-br.nsi differ diff --git a/indra/newview/installers/windows/lang_ru.nsi b/indra/newview/installers/windows/lang_ru.nsi index d55aacc971..8ca1fc3d14 100755 Binary files a/indra/newview/installers/windows/lang_ru.nsi and b/indra/newview/installers/windows/lang_ru.nsi differ diff --git a/indra/newview/installers/windows/lang_tr.nsi b/indra/newview/installers/windows/lang_tr.nsi index 4746f84482..db6f417fc2 100755 Binary files a/indra/newview/installers/windows/lang_tr.nsi and b/indra/newview/installers/windows/lang_tr.nsi differ diff --git a/indra/newview/installers/windows/lang_zh.nsi b/indra/newview/installers/windows/lang_zh.nsi index 397bd0ac81..fad714e83b 100755 Binary files a/indra/newview/installers/windows/lang_zh.nsi and b/indra/newview/installers/windows/lang_zh.nsi differ -- cgit v1.2.3 From 94daedaaedd3eceb8cf41a2238ee10fe6280f37c Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 28 Jan 2022 20:04:59 +0200 Subject: SL-16681 Better handling of locked files by NSIS Installer 1. When SL window closes it doesn't mean that process died so gave it a bit more time to terminate 2. Added a retry logic in case first run happened too early for some reason 3. Replaced ok/cancel on locked file with abort/retry/ignorei --- .../installers/windows/installer_template.nsi | 32 +++++++++++++++++---- indra/newview/installers/windows/lang_da.nsi | Bin 12128 -> 11992 bytes indra/newview/installers/windows/lang_de.nsi | 2 +- indra/newview/installers/windows/lang_en-us.nsi | Bin 11802 -> 11666 bytes indra/newview/installers/windows/lang_es.nsi | Bin 13112 -> 12976 bytes indra/newview/installers/windows/lang_fr.nsi | Bin 13628 -> 13492 bytes indra/newview/installers/windows/lang_it.nsi | Bin 12850 -> 12714 bytes indra/newview/installers/windows/lang_ja.nsi | Bin 10016 -> 9880 bytes indra/newview/installers/windows/lang_pl.nsi | Bin 12448 -> 12312 bytes indra/newview/installers/windows/lang_pt-br.nsi | Bin 13272 -> 13136 bytes indra/newview/installers/windows/lang_ru.nsi | Bin 12586 -> 12450 bytes indra/newview/installers/windows/lang_tr.nsi | Bin 12496 -> 12360 bytes indra/newview/installers/windows/lang_zh.nsi | Bin 9460 -> 9324 bytes 13 files changed, 27 insertions(+), 7 deletions(-) (limited to 'indra/newview/installers/windows') diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index 668a8025bd..7513908cb4 100644 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -561,10 +561,17 @@ Function CloseSecondLife LOOP: FindWindow $0 "Second Life" "" - IntCmp $0 0 DONE + IntCmp $0 0 SLEEP Sleep 500 Goto LOOP - + + SLEEP: + # Second life window just closed, but program might not be fully done yet + # and OS might have not released some locks, wait a bit more to make sure + # all file handles were released. + # If something still isn't unlocked, it will trigger a notification from + # RemoveProgFilesOnInst + Sleep 1000 DONE: Pop $0 Return @@ -611,6 +618,12 @@ Function RemoveProgFilesOnInst # RMDir /r $INSTDIR is especially unsafe if user installed somewhere # like Program Files +# Set retry counter. All integers are strings. +Push $0 +StrCpy $0 0 + +PREINSTALLREMOVE: + # Remove old SecondLife.exe to invalidate any old shortcuts to it that may be in non-standard locations. See MAINT-3575 Delete "$INSTDIR\$INSTEXE" Delete "$INSTDIR\$VIEWER_EXE" @@ -627,19 +640,26 @@ RMDir /r "$INSTDIR\vmp_icons" # find modules from different versions RMDir /r "$INSTDIR\llplugin" -IfErrors 0 PREINSTALLCLEAN - StrCmp $SKIP_DIALOGS "true" PREINSTALLCLEAN - MessageBox MB_OKCANCEL $(CloseSecondLifeInstRM) IDOK PREINSTALLCLEAN IDCANCEL PREINSTALLFAIL +IntOp $0 $0 + 1 + +IfErrors 0 PREINSTALLDONE + IntCmp $0 1 PREINSTALLREMOVE #try again once + StrCmp $SKIP_DIALOGS "true" PREINSTALLDONE + MessageBox MB_ABORTRETRYIGNORE $(CloseSecondLifeInstRM) IDABORT PREINSTALLFAIL IDRETRY PREINSTALLREMOVE + # MB_ABORTRETRYIGNORE does not accept IDIGNORE + Goto PREINSTALLDONE PREINSTALLFAIL: Quit -PREINSTALLCLEAN: +PREINSTALLDONE: # We are no longer including release notes with the viewer, so remove them. Delete "$SMPROGRAMS\$INSTSHORTCUT\SL Release Notes.lnk" Delete "$INSTDIR\releasenotes.txt" +Pop $0 + FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; diff --git a/indra/newview/installers/windows/lang_da.nsi b/indra/newview/installers/windows/lang_da.nsi index 0b5ae2b714..648ddbfb85 100644 Binary files a/indra/newview/installers/windows/lang_da.nsi and b/indra/newview/installers/windows/lang_da.nsi differ diff --git a/indra/newview/installers/windows/lang_de.nsi b/indra/newview/installers/windows/lang_de.nsi index e67bc9e22c..188c30197a 100755 --- a/indra/newview/installers/windows/lang_de.nsi +++ b/indra/newview/installers/windows/lang_de.nsi @@ -64,7 +64,7 @@ LangString MissingSSE2 ${LANG_GERMAN} "Dieses Gerät verfügt möglicherweise ni ; closesecondlife function (install) LangString CloseSecondLifeInstDP ${LANG_GERMAN} "Warten auf die Beendigung von Second Life ..." LangString CloseSecondLifeInstMB ${LANG_GERMAN} "Second Life kann nicht installiert oder ersetzt werden, wenn es bereits läuft.$\n$\nBeenden Sie, was Sie gerade tun und klicken Sie OK, um Second Life zu beenden.$\nKlicken Sie CANCEL, um die Installation abzubrechen." -LangString CloseSecondLifeInstRM ${LANG_GERMAN} "Second Life failed to remove some files from a previous install.$\n$\nSelect OK to continue.$\nSelect CANCEL to cancel installation." +LangString CloseSecondLifeInstRM ${LANG_GERMAN} "Second Life failed to remove some files from a previous install." ; closesecondlife function (uninstall) LangString CloseSecondLifeUnInstDP ${LANG_GERMAN} "Warten auf die Beendigung von Second Life ..." diff --git a/indra/newview/installers/windows/lang_en-us.nsi b/indra/newview/installers/windows/lang_en-us.nsi index f75ecfaf08..0639d51e10 100644 Binary files a/indra/newview/installers/windows/lang_en-us.nsi and b/indra/newview/installers/windows/lang_en-us.nsi differ diff --git a/indra/newview/installers/windows/lang_es.nsi b/indra/newview/installers/windows/lang_es.nsi index 2b9fa61199..ee30651a38 100755 Binary files a/indra/newview/installers/windows/lang_es.nsi and b/indra/newview/installers/windows/lang_es.nsi differ diff --git a/indra/newview/installers/windows/lang_fr.nsi b/indra/newview/installers/windows/lang_fr.nsi index 4e256a3af9..7cd90ec314 100755 Binary files a/indra/newview/installers/windows/lang_fr.nsi and b/indra/newview/installers/windows/lang_fr.nsi differ diff --git a/indra/newview/installers/windows/lang_it.nsi b/indra/newview/installers/windows/lang_it.nsi index bf4f51e326..194062da9a 100755 Binary files a/indra/newview/installers/windows/lang_it.nsi and b/indra/newview/installers/windows/lang_it.nsi differ diff --git a/indra/newview/installers/windows/lang_ja.nsi b/indra/newview/installers/windows/lang_ja.nsi index 02d9ae2b40..a54005ba14 100755 Binary files a/indra/newview/installers/windows/lang_ja.nsi and b/indra/newview/installers/windows/lang_ja.nsi differ diff --git a/indra/newview/installers/windows/lang_pl.nsi b/indra/newview/installers/windows/lang_pl.nsi index 4c254b4b2c..355d806866 100644 Binary files a/indra/newview/installers/windows/lang_pl.nsi and b/indra/newview/installers/windows/lang_pl.nsi differ diff --git a/indra/newview/installers/windows/lang_pt-br.nsi b/indra/newview/installers/windows/lang_pt-br.nsi index 1e9e0b07d2..97f5d2b44a 100755 Binary files a/indra/newview/installers/windows/lang_pt-br.nsi and b/indra/newview/installers/windows/lang_pt-br.nsi differ diff --git a/indra/newview/installers/windows/lang_ru.nsi b/indra/newview/installers/windows/lang_ru.nsi index 8ca1fc3d14..65a9f4846d 100755 Binary files a/indra/newview/installers/windows/lang_ru.nsi and b/indra/newview/installers/windows/lang_ru.nsi differ diff --git a/indra/newview/installers/windows/lang_tr.nsi b/indra/newview/installers/windows/lang_tr.nsi index db6f417fc2..e71886cc66 100755 Binary files a/indra/newview/installers/windows/lang_tr.nsi and b/indra/newview/installers/windows/lang_tr.nsi differ diff --git a/indra/newview/installers/windows/lang_zh.nsi b/indra/newview/installers/windows/lang_zh.nsi index fad714e83b..f5f0c6cbdf 100755 Binary files a/indra/newview/installers/windows/lang_zh.nsi and b/indra/newview/installers/windows/lang_zh.nsi differ -- cgit v1.2.3