Skip to content

Commit 720c57a

Browse files
committed
mui2: Improve some messages
Show a message while waiting the uninstall of old version, or while executing install.exe or uninstal.exe.
1 parent 75e34c5 commit 720c57a

File tree

1 file changed

+237
-0
lines changed

1 file changed

+237
-0
lines changed
Lines changed: 237 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,237 @@
1+
From cdf80e62e230dad25b676f2dd12d6f328304b507 Mon Sep 17 00:00:00 2001
2+
From: "K.Takata" <kentkt@csc.jp>
3+
Date: Mon, 8 Oct 2018 11:59:48 +0900
4+
Subject: [PATCH 30/30] nsis: Improve some messages
5+
6+
Show a message while waiting the uninstall of old version, or while
7+
executing install.exe or uninstal.exe.
8+
---
9+
nsis/gvim.nsi | 44 +++++++++++++++++++++++++++++++++++++++
10+
nsis/lang/dutch.nsi | 9 ++++++++
11+
nsis/lang/english.nsi | 9 ++++++++
12+
nsis/lang/german.nsi | 9 ++++++++
13+
nsis/lang/italian.nsi | 9 ++++++++
14+
nsis/lang/japanese.nsi | 9 ++++++++
15+
nsis/lang/simpchinese.nsi | 9 ++++++++
16+
nsis/lang/tradchinese.nsi | 9 ++++++++
17+
8 files changed, 107 insertions(+)
18+
19+
diff --git a/nsis/gvim.nsi b/nsis/gvim.nsi
20+
index 1e93c733f..3a61a9652 100644
21+
--- a/nsis/gvim.nsi
22+
+++ b/nsis/gvim.nsi
23+
@@ -183,6 +183,47 @@ ReserveFile ${VIMSRC}\installw32.exe
24+
##########################################################
25+
# Functions
26+
27+
+# Update the message in the (un)install files page
28+
+# Based on http://nsis.sourceforge.net/DetailUpdate
29+
+!macro _DetailUpdate un
30+
+Function ${un}DetailUpdate
31+
+ Exch $R0
32+
+ Push $R1
33+
+ Push $R2
34+
+ Push $R3
35+
+
36+
+ FindWindow $R2 `#32770` `` $HWNDPARENT
37+
+ GetDlgItem $R1 $R2 1006
38+
+ SendMessage $R1 ${WM_SETTEXT} 0 `STR:$R0`
39+
+ GetDlgItem $R1 $R2 1016
40+
+
41+
+ System::Call *(&t${NSIS_MAX_STRLEN}R0)i.R2
42+
+ System::Call *(i0,i0,i0,i0,i0,iR2,i${NSIS_MAX_STRLEN},i0,i0)i.R3
43+
+
44+
+ !define /ifndef LVM_GETITEMCOUNT 0x1004
45+
+ !define /ifndef LVM_SETITEMTEXT 0x102E
46+
+ SendMessage $R1 ${LVM_GETITEMCOUNT} 0 0 $R0
47+
+ IntOp $R0 $R0 - 1
48+
+ System::Call user32::SendMessage(iR1,i${LVM_SETITEMTEXT},iR0,iR3)
49+
+
50+
+ System::Free $R3
51+
+ System::Free $R2
52+
+
53+
+ Pop $R3
54+
+ Pop $R2
55+
+ Pop $R1
56+
+ Pop $R0
57+
+FunctionEnd
58+
+!macroend
59+
+!insertmacro _DetailUpdate ""
60+
+!insertmacro _DetailUpdate "un."
61+
+!macro DetailUpdate un Text
62+
+ Push `${Text}`
63+
+ Call ${un}DetailUpdate
64+
+!macroend
65+
+!define DetailUpdate `!insertmacro DetailUpdate ""`
66+
+!define un.DetailUpdate `!insertmacro DetailUpdate "un."`
67+
+
68+
# Get parent directory
69+
# Share this function both on installer and uninstaller
70+
!macro GetParent un
71+
@@ -285,6 +326,7 @@ Section "$(str_section_old_ver)" id_section_old_ver
72+
# run the install program to check for already installed versions
73+
SetOutPath $TEMP
74+
File /oname=install.exe ${VIMSRC}\installw32.exe
75+
+ ${DetailUpdate} "$(str_msg_wait_uninst)"
76+
${Do}
77+
nsExec::Exec "$TEMP\install.exe -uninstall-check"
78+
Pop $3
79+
@@ -652,6 +694,7 @@ SectionEnd
80+
##########################################################
81+
Section -call_install_exe
82+
SetOutPath $0
83+
+ ${DetailUpdate} "$(str_msg_registering)"
84+
nsExec::Exec "$0\install.exe $1"
85+
Pop $3
86+
SectionEnd
87+
@@ -883,6 +926,7 @@ Section "un.$(str_unsection_register)" id_unsection_register
88+
!endif
89+
90+
# delete the context menu entry and batch files
91+
+ ${un.DetailUpdate} "$(str_msg_unregistering)"
92+
nsExec::Exec "$0\uninstal.exe -nsis"
93+
Pop $3
94+
95+
diff --git a/nsis/lang/dutch.nsi b/nsis/lang/dutch.nsi
96+
index 3628c3445..64f8cd851 100644
97+
--- a/nsis/lang/dutch.nsi
98+
+++ b/nsis/lang/dutch.nsi
99+
@@ -221,6 +221,15 @@ LangString str_msg_rm_exe_fail ${LANG_DUTCH} \
100+
LangString str_msg_rm_root_fail ${LANG_DUTCH} \
101+
"WAARSCHUWING: Kan $\"$vim_install_root$\" niet verwijderen omdat het niet leeg is!"
102+
103+
+LangString str_msg_wait_uninst ${LANG_DUTCH} \
104+
+ "Waiting the old version to be uninstalled..."
105+
+
106+
+LangString str_msg_registering ${LANG_DUTCH} \
107+
+ "Registering..."
108+
+
109+
+LangString str_msg_unregistering ${LANG_DUTCH} \
110+
+ "Unregistering..."
111+
+
112+
113+
##############################################################################
114+
# Dialog Box {{{1
115+
diff --git a/nsis/lang/english.nsi b/nsis/lang/english.nsi
116+
index 7acbfe990..159e4ab85 100644
117+
--- a/nsis/lang/english.nsi
118+
+++ b/nsis/lang/english.nsi
119+
@@ -230,6 +230,15 @@ LangString str_msg_rm_exe_fail ${LANG_ENGLISH} \
120+
LangString str_msg_rm_root_fail ${LANG_ENGLISH} \
121+
"WARNING: Cannot remove $\"$vim_install_root$\", it is not empty!"
122+
123+
+LangString str_msg_wait_uninst ${LANG_ENGLISH} \
124+
+ "Waiting the old version to be uninstalled..."
125+
+
126+
+LangString str_msg_registering ${LANG_ENGLISH} \
127+
+ "Registering..."
128+
+
129+
+LangString str_msg_unregistering ${LANG_ENGLISH} \
130+
+ "Unregistering..."
131+
+
132+
133+
##############################################################################
134+
# Dialog Box {{{1
135+
diff --git a/nsis/lang/german.nsi b/nsis/lang/german.nsi
136+
index a828d183a..ffa3897d8 100644
137+
--- a/nsis/lang/german.nsi
138+
+++ b/nsis/lang/german.nsi
139+
@@ -221,6 +221,15 @@ LangString str_msg_rm_root_fail ${LANG_GERMAN} \
140+
"Achtung: Kann Verzeichnis $\"$vim_install_root$\" nicht entfernen, \
141+
weil es nicht leer ist!"
142+
143+
+LangString str_msg_wait_uninst ${LANG_GERMAN} \
144+
+ "Waiting the old version to be uninstalled..."
145+
+
146+
+LangString str_msg_registering ${LANG_GERMAN} \
147+
+ "Registering..."
148+
+
149+
+LangString str_msg_unregistering ${LANG_GERMAN} \
150+
+ "Unregistering..."
151+
+
152+
153+
##############################################################################
154+
# Dialog Box {{{1
155+
diff --git a/nsis/lang/italian.nsi b/nsis/lang/italian.nsi
156+
index 7b63ba627..5aa10454f 100644
157+
--- a/nsis/lang/italian.nsi
158+
+++ b/nsis/lang/italian.nsi
159+
@@ -230,6 +230,15 @@ LangString str_msg_rm_exe_fail ${LANG_ITALIAN} \
160+
LangString str_msg_rm_root_fail ${LANG_ITALIAN} \
161+
"AVVISO: Non posso cancellare $\"$vim_install_root$\", non è vuota!"
162+
163+
+LangString str_msg_wait_uninst ${LANG_ITALIAN} \
164+
+ "Waiting the old version to be uninstalled..."
165+
+
166+
+LangString str_msg_registering ${LANG_ITALIAN} \
167+
+ "Registering..."
168+
+
169+
+LangString str_msg_unregistering ${LANG_ITALIAN} \
170+
+ "Unregistering..."
171+
+
172+
173+
##############################################################################
174+
# Dialog Box {{{1
175+
diff --git a/nsis/lang/japanese.nsi b/nsis/lang/japanese.nsi
176+
index 0393aa757..67078a0df 100644
177+
--- a/nsis/lang/japanese.nsi
178+
+++ b/nsis/lang/japanese.nsi
179+
@@ -223,6 +223,15 @@ LangString str_msg_rm_exe_fail ${LANG_JAPANESE} \
180+
LangString str_msg_rm_root_fail ${LANG_JAPANESE} \
181+
"WARNING: Cannot remove $\"$vim_install_root$\", it is not empty!"
182+
183+
+LangString str_msg_wait_uninst ${LANG_JAPANESE} \
184+
+ "古いバージョンがアンインストールされるのを待っています..."
185+
+
186+
+LangString str_msg_registering ${LANG_JAPANESE} \
187+
+ "登録中..."
188+
+
189+
+LangString str_msg_unregistering ${LANG_JAPANESE} \
190+
+ "登録解除中..."
191+
+
192+
193+
##############################################################################
194+
# Dialog Box {{{1
195+
diff --git a/nsis/lang/simpchinese.nsi b/nsis/lang/simpchinese.nsi
196+
index 38b98df6a..a4e2c990a 100644
197+
--- a/nsis/lang/simpchinese.nsi
198+
+++ b/nsis/lang/simpchinese.nsi
199+
@@ -217,6 +217,15 @@ LangString str_msg_rm_root_fail ${LANG_SIMPCHINESE} \
200+
"警告:无法删除 Vim 安装目录“$vim_install_root”,\
201+
该目录下仍有其他文件。"
202+
203+
+LangString str_msg_wait_uninst ${LANG_SIMPCHINESE} \
204+
+ "Waiting the old version to be uninstalled..."
205+
+
206+
+LangString str_msg_registering ${LANG_SIMPCHINESE} \
207+
+ "Registering..."
208+
+
209+
+LangString str_msg_unregistering ${LANG_SIMPCHINESE} \
210+
+ "Unregistering..."
211+
+
212+
213+
##############################################################################
214+
# Dialog Box {{{1
215+
diff --git a/nsis/lang/tradchinese.nsi b/nsis/lang/tradchinese.nsi
216+
index b5a4c7c8a..63eea8438 100644
217+
--- a/nsis/lang/tradchinese.nsi
218+
+++ b/nsis/lang/tradchinese.nsi
219+
@@ -218,6 +218,15 @@ LangString str_msg_rm_root_fail ${LANG_TRADCHINESE} \
220+
"警告:無法刪除 Vim 安裝資料夾「$vim_install_root」,\
221+
該資料夾下仍有其他檔案。"
222+
223+
+LangString str_msg_wait_uninst ${LANG_TRADCHINESE} \
224+
+ "Waiting the old version to be uninstalled..."
225+
+
226+
+LangString str_msg_registering ${LANG_TRADCHINESE} \
227+
+ "Registering..."
228+
+
229+
+LangString str_msg_unregistering ${LANG_TRADCHINESE} \
230+
+ "Unregistering..."
231+
+
232+
233+
##############################################################################
234+
# Dialog Box {{{1
235+
--
236+
2.17.0
237+

0 commit comments

Comments
 (0)