From 96cc2770c646d5bdf68be2960c3f7893b296689f Mon Sep 17 00:00:00 2001
From: Tank_Master <tank.master@phoenixviewer.com>
Date: Sat, 14 Feb 2015 19:34:10 -0800
Subject: [PATCH] Add option to remove user settings and cache files at
 uninstall, with message Removed function to delete use stored password file
 Removed no longer used RemoveCacheFilesDP from language files Added message
 to English language file for prompt when asking to remove user files -Note:
 this needs translations in other languages added

---
 .../installers/windows/installer_template.nsi |  53 +++++++-----------
 indra/newview/installers/windows/lang_da.nsi  | Bin 8032 -> 7816 bytes
 indra/newview/installers/windows/lang_de.nsi  | Bin 9352 -> 9090 bytes
 .../newview/installers/windows/lang_en-us.nsi | Bin 8126 -> 8448 bytes
 indra/newview/installers/windows/lang_es.nsi  | Bin 8770 -> 8458 bytes
 indra/newview/installers/windows/lang_fr.nsi  | Bin 9036 -> 8748 bytes
 indra/newview/installers/windows/lang_it.nsi  | Bin 8378 -> 8102 bytes
 indra/newview/installers/windows/lang_ja.nsi  | Bin 7294 -> 7052 bytes
 indra/newview/installers/windows/lang_pl.nsi  | Bin 8432 -> 8136 bytes
 .../newview/installers/windows/lang_pt-br.nsi | Bin 8794 -> 8522 bytes
 indra/newview/installers/windows/lang_ru.nsi  | Bin 8150 -> 7898 bytes
 indra/newview/installers/windows/lang_tr.nsi  | Bin 8272 -> 8006 bytes
 indra/newview/installers/windows/lang_zh.nsi  | Bin 6804 -> 6576 bytes
 13 files changed, 21 insertions(+), 32 deletions(-)

diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi
index 22a73368584..49500ab80d7 100755
--- a/indra/newview/installers/windows/installer_template.nsi
+++ b/indra/newview/installers/windows/installer_template.nsi
@@ -363,14 +363,9 @@ Delete "$INSTDIR\$INSTSHORTCUT.lnk"
 Delete "$INSTDIR\Uninstall $INSTSHORTCUT.lnk"
 
 # Clean up cache and log files, but leave them in-place for non AGNI installs.
+Call un.UserSettingsFiles
 
-!ifdef UNINSTALL_SETTINGS
-Call un.DocumentsAndSettingsFolder
-!endif
-
-# Remove stored password on uninstall
-Call un.RemovePassword
-
+# Remove the main instalation directory
 Call un.ProgramFiles
 
 SectionEnd 				
@@ -691,14 +686,17 @@ FunctionEnd
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; Delete files in \Users\<User>\AppData\
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-Function un.DocumentsAndSettingsFolder
+Function un.UserSettingsFiles
 
-# Delete files in \Users\<User>\AppData\Roaming\SecondLife
+# Ask if user wants to keep data files or not
+MessageBox MB_YESNO|MB_ICONQUESTION $(RemoveDataFilesMB) IDYES Remove IDNO Keep
+
+Remove:
 Push $0
 Push $1
 Push $2
 
-  DetailPrint "Deleting Second Life files"
+  DetailPrint "Deleting Second Life data files"
 
   StrCpy $0 0	# Index number used to iterate via EnumRegKey
 
@@ -712,15 +710,18 @@ Push $2
 # Required since ProfileImagePath is of type REG_EXPAND_SZ
     ExpandEnvStrings $2 $2
 
+# Delete files in \Users\<User>\AppData\Roaming\SecondLife
 # Remove all settings files but leave any other .txt files to preserve the chat logs
-;    RMDir /r "$2\Application Data\SecondLife\logs"
-    RMDir /r "$2\Application Data\SecondLife\browser_profile"
-    RMDir /r "$2\Application Data\SecondLife\user_settings"
-    Delete  "$2\Application Data\SecondLife\*.xml"
-    Delete  "$2\Application Data\SecondLife\*.bmp"
-    Delete  "$2\Application Data\SecondLife\search_history.txt"
-    Delete  "$2\Application Data\SecondLife\plugin_cookies.txt"
-    Delete  "$2\Application Data\SecondLife\typed_locations.txt"
+;    RMDir /r "$2\AppData\Roaming\SecondLife\logs"
+    RMDir /r "$2\AppData\Roaming\SecondLife\browser_profile"
+    RMDir /r "$2\AppData\Roaming\SecondLife\user_settings"
+    Delete  "$2\AppData\Roaming\SecondLife\*.xml"
+    Delete  "$2\AppData\Roaming\SecondLife\*.bmp"
+    Delete  "$2\AppData\Roaming\SecondLife\search_history.txt"
+    Delete  "$2\AppData\Roaming\SecondLife\plugin_cookies.txt"
+    Delete  "$2\AppData\Roaming\SecondLife\typed_locations.txt"
+# Delete files in \Users\<User>\AppData\Local\SecondLife
+    RmDir /r  "$2\AppData\Local\SecondLife"							#Delete the cache folder
 
   CONTINUE:
     IntOp $0 $0 + 1
@@ -731,26 +732,14 @@ Pop $2
 Pop $1
 Pop $0
 
-# Delete files in Program Data folder
+# Delete files in ProgramData\Secondlife
 Push $0
   ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" "Common AppData"
   StrCmp $0 "" +2
   RMDir /r "$0\SecondLife"
 Pop $0
 
-FunctionEnd
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Delete the stored password for the current Windows user
-;; DEV-10821 -- Unauthorised user can gain access to an SL account after a real user has uninstalled
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-Function un.RemovePassword
-
-DetailPrint "Removing Second Life password"
-
-SetShellVarContext current
-Delete "$APPDATA\SecondLife\user_settings\password.dat"
-SetShellVarContext all
+Keep:
 
 FunctionEnd
 
diff --git a/indra/newview/installers/windows/lang_da.nsi b/indra/newview/installers/windows/lang_da.nsi
index 1080fd2e3d6c147301201480e406ab8df9b2f6b7..83e1a3ea9417bd1565c93b90b5c8070d66548415 100755
GIT binary patch
delta 12
TcmaE0*I~P1j`ZddnKw)TCXNMs

delta 126
zcmeCMePFj?j<jeILn=cqLq0<pkWOYu1mX;a)X6)gRVVv#@CZA@L>Sx{G8uA!YKkY@
zbE-=QgV`kvB|woP1_dOYjxxfsDM0hG8A^fXrZVIK)hGa2i3|lm2;^_>mHy2H0G<XN
A&j0`b

diff --git a/indra/newview/installers/windows/lang_de.nsi b/indra/newview/installers/windows/lang_de.nsi
index fd59bf8f71d372bbfa839e22e1c2384b5dd4f5c5..dbf4bc84bf0d421f288a3bab80df920d74c3a592 100755
GIT binary patch
delta 12
TcmeD1Y;xZarLZ|cQG*!(AB_Yg

delta 204
zcmZp2@9^9Zr7-y(7msi<Ln1>mLk2@CLmERSLk^HGp3KN1EguAA<uc?mlmTgHxEeRO
znvH_$^*#*W7>dEVOBwPQ(is$h>T<wl6am=?T?z~?K$#MtNtr;L2b9YMlP*B>vl&W(
r_JBk|@(Ms+9zzO{b_J^`28)8sgxCO5r^legz{|kJz`HqEL7y1_BTFfx

diff --git a/indra/newview/installers/windows/lang_en-us.nsi b/indra/newview/installers/windows/lang_en-us.nsi
index 4cf605e398a96ae99d69a0b0d2bde3e4a8b2b844..c06e5ac00d7ae554e1631eb52a20051de40e69a1 100755
GIT binary patch
delta 393
zcmYjN!AiqG5PgWP9;DbqjF8%HMCjSGhk)oG^eD(;(<ZnkvN4JW(I4<M;CBe#{SeQd
z{0V)tsUizAZ)f(sH#_gy)A8$9(z9rADbM3LYKd}qOqmVlu(*Mh@6lA;=GMl^>YnYz
ziA9Aa&T$&DLrF$~2eS4hjVAIk9voUYo<AL;1>ZS3sJdr%K{2P3p;ImCPV%VJ7~F-f
zLxuyK(W8qqdZ?3G#R@ffoz?~M6;ICBb4JxH>1c4zPRm@-?Uo%ASOt+M){3WQ$!dkB
zAKD8YMYj9vNuw(WAL%6PK(ac%42RKC85R)6C$q&h*W$_05q_(dsN!8e_0Lk$-T3Wu
H^s)8>HXu-+

delta 152
zcmZp0+GoGvm9%IPLn=cqLq0<pkWOYu1mX;a)XB0khQiJ;9)lZ0CPNNTzIbvXpQf}6
zkOktE07df{(is$x^j(w_wR8cRmdsEJG&L0{U&2rfRFMc|r2y$*us)bhkW3m-bq-K2
Mm7!>}xZF!70HG5i9smFU

diff --git a/indra/newview/installers/windows/lang_es.nsi b/indra/newview/installers/windows/lang_es.nsi
index bfc1bf724835e5074e5aa23eefe4a37eb4ce06be..f4f07863320303096cfc7699f60d2b2c648454c5 100755
GIT binary patch
delta 12
TcmX@)(&e<lNN#hM{0$}mB8~*<

delta 213
zcmeBjI^?p!NN(~S4j#^AhD3&Bh75+($^LSx@<9x#47m*X3}ryt879Nv#*oR70~9Hq
z+$g2ZnFHkI0&(7CLm}b%M1~@;{!E~re1>8M1%?!$N(G=8#N3xab|O%BE|{OnkO!nw
zpejK;1)y9aRDBUc0Z?xVnC}8qlgv;G)CW>k0ya4j$VvgK4F;<!0l9&NA)TRkv#i`(
FCIAhTEq(w1

diff --git a/indra/newview/installers/windows/lang_fr.nsi b/indra/newview/installers/windows/lang_fr.nsi
index c2ee17fbd450bf95a8d648dd9b717e47d6b93acf..1b5dbfc975a95531ef1a5585b21e597b1a6528a2 100755
GIT binary patch
delta 12
TcmX@(w#H?Hk^JT$g<nhnByR;J

delta 186
zcmZ4Ea>i|gk-TUTLn=cqLq0<pkWOYu1mX;a)XDzxs*`;<d4!!|A`ET}nG88VHN}(X
z%c+Y7Gn6tE03k?sF%V_~O~{*kU0y!6ltBSu4v?J!G$9YDLIJEB#LtK7NCoOvU~mEQ
mlYyq?0!_+eC;_WX1=0!(0YIHaK%C3)0>}s3v{_l6lNkW37bvFy

diff --git a/indra/newview/installers/windows/lang_it.nsi b/indra/newview/installers/windows/lang_it.nsi
index cb97335488b1d4c849a74ff79ac66a46849f4e17..a456e6e417245359990b607df0bea13ccedf4455 100755
GIT binary patch
delta 12
UcmdnxxXgaTI+@LfWPdOL04Mwf=Kufz

delta 189
zcmZ2xzsqsMI+@8UICwad84?+i88R4BC!dy4o&14=N7xxA!r;b`$&ka4%1}I6kYBq#
zks%MLG8HJ215{B3l*<Q-q%tTlqyWiGAe{zPuK-jBH5DidQUlQg5iepWK@xERnv%>=
l%8&~b%LB?319gCGN&(WrK(P`a%mnh&nHY*U&zE6m1^|Q#DAND{

diff --git a/indra/newview/installers/windows/lang_ja.nsi b/indra/newview/installers/windows/lang_ja.nsi
index 3fbf434b6a948599addc753fb6a78449a18acbaa..fc5f4fabcaa40200374c21f84ed3c599dc814a95 100755
GIT binary patch
delta 16
Xcmexo(PO@$L~?QfGt1^IDG??BIamd5

delta 163
zcmeA%|7WqGL{hYfA(bJQA)lcPNGCHS0&xaI>g0)%s+0F|@(4S_L>Sx{G8uA!YKkW(
z@@q#ZFt`BqBr}u(^`<i9F_bVAGbjMn<}suI>0qE(2@qxi`RQPps|G6#UK<=R$TL`L
v@Yvw6!FGeE23HLh8Y}^dPBJ)d@XFwi!3hIhzsYh!Vv_@ySvFTliZB5Hp0F-v

diff --git a/indra/newview/installers/windows/lang_pl.nsi b/indra/newview/installers/windows/lang_pl.nsi
index 1564c2529357421c1684240a26327e6f71b7a6d4..a172f0cdeb4d23c48da7c6d29426696df1cd14fc 100755
GIT binary patch
delta 12
Tcmez1c*1_e3YpCpWEGeJDmMji

delta 231
zcmX?M|G{y?3Yp1q96Z9w42cZM3>gfm3~3CR3^_o$cyb}Pw0sbdmCKONPzI!(;cDFA
zY6Jz<CkwE!)E5KQlmq4SfHJ8J3Je86Gcp;n89oC=LA*quDVYqCjLAR}#Ls6)VJHIg
ztAKh^8M1()8bBAoT%if%gLI|=RptQIrUF%0flYP+iX=0X0?kVW>MUU>2C7OF12R*9
Wj9{Q(2@qxi`RNSBn`g@CGXnq}1~2mf

diff --git a/indra/newview/installers/windows/lang_pt-br.nsi b/indra/newview/installers/windows/lang_pt-br.nsi
index 8e858c8742361246c852e75bd89bf8bda236695a..9ef252d2324343f40939e33574b079afc3a45d66 100755
GIT binary patch
delta 12
TcmccRa>{8#l-%Yl`43D0Cw2va

delta 174
zcmX@*bjxK!l-y(~P9DKzhD3&Bh75*OhBSsuh8%{}$qPkg<%59yT!wsxG9c{?SK$Ux
z!B9LopUarvm7xNtGl!uRD4NHRGI_4NxPJ;zy#i1aW~KsACJ`u703?eUO2BLvpt;FF
jUAaKDc|fsZpnM|81Rxy@6e|HjkcsIG#hbn5{xbmpt&1jW

diff --git a/indra/newview/installers/windows/lang_ru.nsi b/indra/newview/installers/windows/lang_ru.nsi
index 8b98ed50326b95f43e9c5ade4e87d9cfb8af2078..d7c728d3e2240dbe2c9804460d813a699deb2246 100755
GIT binary patch
delta 12
Tcmca+f6I1*ip*vO*=<Y!Bw7T;

delta 194
zcmca*d(D1>ii~IxLn=cqLq0<pkWOYu1mX;a)X9!As+03Lc!Zr{A`ET}nG88VHN}%R
zN^90DvzV|LuvoL0ve>d%07(S~7a-pfC}PKA1msz<__BBaMHCn;Sj>T>J&<kBVg*#I
zz_6OZ1!!L~Ln+YSRE9i;5{6<11)x273@Jc57${Z(gqc8oI#6aegAxNT0~Z)u1LaeI
M@;RF|Wi~Pa0K(KGu>b%7

diff --git a/indra/newview/installers/windows/lang_tr.nsi b/indra/newview/installers/windows/lang_tr.nsi
index 7c41811b30e09f0afe17687ebd612ab89450dbc8..97c602f4fca304170cb41c209e3583d9f290a323 100755
GIT binary patch
delta 12
TcmccMaLjIloy=wrSq^3ZBUuDO

delta 174
zcmX?RcfnzUoy=q{4j#^AhD3&Bh75+($<Z>Z@<9x#47m*X3}ryt879Nv#*oR70~9Hq
zT*#>z=mcctFr<UYRE8o31+Z!b21kZUppGJ-9Een4$Of~D8NLB|e;D!@Qh++LfhH*c
oMe-Pu!1_U^W=|HB6&5vQRA49u+mi{D%><g2&rq~kUq+l60GS{rVgLXD

diff --git a/indra/newview/installers/windows/lang_zh.nsi b/indra/newview/installers/windows/lang_zh.nsi
index e89a1e7e5181b7a3940ae85bc96a68bdcaca636e..39c005a683ff6e99f85fead67ed79a4a30567f4c 100755
GIT binary patch
delta 12
TcmbPYy1{rupZMk?2_+@~A+H2u

delta 143
zcmdmBJjHZFpZH`eb{@`ThD3&Bh75+($*aXx<%1Yf8FCr&8OngPGfalTjUkgE2PjfJ
zc_W{pPja?KxK>cgGzA71pvq*1QlO4hhCGH6hGGT<pq@O26d)Z86e|J3OdvlUEYqI)
Z&Cf1U*RQ2)by`F;h{t5Gxk2232>}1AB+~!@

-- 
GitLab