summaryrefslogtreecommitdiffstats
path: root/nsis
diff options
context:
space:
mode:
authorRestorer <69863286+RestorerZ@users.noreply.github.com>2024-03-28 09:19:44 +0000
committerGitHub <noreply@github.com>2024-03-28 10:19:44 +0100
commit74a23318467aecbb8e21535c6e8a27a257a0a14a (patch)
tree18aa3df1fbf7bef9e50a25f9a26e0b0da159713a /nsis
parentb75825f749cf87feb9ae8e7e5327bd2efe707c86 (diff)
NSIS: Possibility to include translated license and README.txt files (#14311)
* NSIS: Possibility to include translated license and README.txt files * fixed a missing semicolon * Disable always show dialog choice language Signed-off-by: RestorerZ <restorer@mail2k.ru> Signed-off-by: Christian Brabandt <cb@256bit.org>
Diffstat (limited to 'nsis')
-rw-r--r--nsis/README.txt4
-rw-r--r--nsis/gvim.nsi116
-rw-r--r--nsis/lang/README.txt34
-rw-r--r--nsis/lang/danish.nsi15
-rw-r--r--nsis/lang/dutch.nsi14
-rw-r--r--nsis/lang/english.nsi13
-rw-r--r--nsis/lang/german.nsi15
-rw-r--r--nsis/lang/greek.nsi15
-rw-r--r--nsis/lang/italian.nsi15
-rw-r--r--nsis/lang/japanese.nsi15
-rw-r--r--nsis/lang/russian.nsi14
-rw-r--r--nsis/lang/serbian.nsi15
-rw-r--r--nsis/lang/simpchinese.nsi16
-rw-r--r--nsis/lang/tradchinese.nsi16
-rw-r--r--nsis/lang/turkish.nsi21
15 files changed, 329 insertions, 9 deletions
diff --git a/nsis/README.txt b/nsis/README.txt
index c0b0376bfc..79c1952133 100644
--- a/nsis/README.txt
+++ b/nsis/README.txt
@@ -54,8 +54,8 @@ To build the installable .exe file:
7. On MS Windows do "nmake.exe -f Make_mvc.mak uganda.nsis.txt" in runtime/doc.
On Unix-like system do "make runtime/doc/uganda.nsis.txt" in top directory
- or "make uganda.nsis.txt" in runtime/doc, and be sure to convert the file
- "uganda.nsis.txt" to DOS file format.
+ or "make uganda.nsis.txt" in runtime/doc. The created files
+ "uganda.nsis.???" will be automatically converted to DOS file format.
8. Get gettext and iconv DLLs from the following site:
https://github.com/mlocati/gettext-iconv-windows/releases
diff --git a/nsis/gvim.nsi b/nsis/gvim.nsi
index 754e9ca28e..7d866ff7c6 100644
--- a/nsis/gvim.nsi
+++ b/nsis/gvim.nsi
@@ -1,6 +1,6 @@
# NSIS file to create a self-installing exe for Vim.
# It requires NSIS version 3.0 or later.
-# Last Change: 2024 Mar 18
+# Last Change: 2024 Mar 20
Unicode true
@@ -157,9 +157,9 @@ RequestExecutionLevel highest
!define MUI_COMPONENTSPAGE_SMALLDESC
!define MUI_LICENSEPAGE_CHECKBOX
-!define MUI_FINISHPAGE_RUN
-!define MUI_FINISHPAGE_RUN_FUNCTION LaunchApplication
-!define MUI_FINISHPAGE_RUN_TEXT $(str_show_readme)
+!define MUI_FINISHPAGE_SHOWREADME
+!define MUI_FINISHPAGE_SHOWREADME_TEXT $(str_show_readme)
+!define MUI_FINISHPAGE_SHOWREADME_FUNCTION LaunchApplication
# This adds '\Vim' to the user choice automagically. The actual value is
# obtained below with CheckOldVim.
@@ -183,7 +183,7 @@ SilentInstall normal
# Installer pages
!insertmacro MUI_PAGE_WELCOME
-!insertmacro MUI_PAGE_LICENSE "${VIMRT}\doc\uganda.nsis.txt"
+!insertmacro MUI_PAGE_LICENSE $(page_lic_file)
!insertmacro MUI_PAGE_COMPONENTS
Page custom SetCustom ValidateCustom
#!define MUI_PAGE_CUSTOMFUNCTION_LEAVE VimFinalCheck
@@ -365,7 +365,7 @@ FunctionEnd
Function LaunchApplication
SetOutPath $0
- ShellExecAsUser::ShellExecAsUser "" "$0\gvim.exe" '-R "$0\README.txt"'
+ ShellExecAsUser::ShellExecAsUser "" "$0\gvim.exe" '-R "$0\$(vim_readme_file)"'
FunctionEnd
##########################################################
@@ -615,6 +615,110 @@ SectionGroupEnd
Section "$(str_section_nls)" id_section_nls
SectionIn 1 3
+#; FIXME: When adding new translations, do not forget to make changes here.
+ SetOutPath $0
+!if /FileExists ..\README.dax.txt
+ ${If} $Language = ${LANG_DANISH}
+ File ..\README.dax.txt
+ ${EndIf}
+!endif
+!if /FileExists ..\README.nlx.txt
+ ${If} $Language = ${LANG_DUTCH}
+ File ..\README.nlx.txt
+ ${EndIf}
+!endif
+!if /FileExists ..\README.dex.txt
+ ${If} $Language = ${LANG_GERMAN}
+ File ..\README.dex.txt
+ ${EndIf}
+!endif
+!if /FileExists ..\README.itx.txt
+ ${If} $Language = ${LANG_ITALIAN}
+ File ..\README.itx.txt
+ ${EndIf}
+!endif
+!if /FileExists ..\README.jax.txt
+ ${If} $Language = ${LANG_JAPANESE}
+ File ..\README.jax.txt
+ ${EndIf}
+!endif
+!if /FileExists ..\README.rux.txt
+ ${If} $Language = ${LANG_RUSSIAN}
+ File ..\README.rux.txt
+ ${EndIf}
+!endif
+!if /FileExists ..\README.srx.txt
+ ${If} $Language = ${LANG_SERBIAN}
+ File ..\README.srx.txt
+ ${EndIf}
+!endif
+!if /FileExists ..\README.cnx.txt
+ ${If} $Language = ${LANG_SIMPCHINESE}
+ File ..\README.cnx.txt
+ ${EndIf}
+!endif
+!if /FileExists ..\README.twx.txt
+ ${If} $Language = ${LANG_TRADCHINESE}
+ File ..\README.twx.txt
+ ${EndIf}
+!endif
+!if /FileExists ..\README.trx.txt
+ ${OrIf} $Language = ${LANG_TURKISH}
+ File ..\README.trx.txt
+ ${EndIf}
+!endif
+#; FIXME: When adding new translations, do not forget to make changes here.
+ SetOutPath $0\doc
+!if /FileExists "${VIMRT}\doc\uganda.dax"
+ ${If} $Language = ${LANG_DANISH}
+ File ${VIMRT}\doc\uganda.dax
+ ${EndIf}
+!endif
+!if /FileExists "${VIMRT}\doc\uganda.nlx"
+ ${If} $Language = ${LANG_DUTCH}
+ File ${VIMRT}\doc\uganda.nlx
+ ${EndIf}
+!endif
+!if /FileExists "${VIMRT}\doc\uganda.dex"
+ ${If} $Language = ${LANG_GERMAN}
+ File ${VIMRT}\doc\uganda.dex
+ ${EndIf}
+!endif
+!if /FileExists "${VIMRT}\doc\uganda.itx"
+ ${If} $Language = ${LANG_ITALIAN}
+ File ${VIMRT}\doc\uganda.itx
+ ${EndIf}
+!endif
+!if /FileExists "${VIMRT}\doc\uganda.jax"
+ ${If} $Language = ${LANG_JAPANESE}
+ File ${VIMRT}\doc\uganda.jax
+ ${EndIf}
+!endif
+!if /FileExists "${VIMRT}\doc\uganda.rux"
+ ${If} $Language = ${LANG_RUSSIAN}
+ File ${VIMRT}\doc\uganda.rux
+ ${EndIf}
+!endif
+!if /FileExists "${VIMRT}\doc\uganda.srx"
+ ${If} $Language = ${LANG_SERBIAN}
+ File ${VIMRT}\doc\uganda.srx
+ ${EndIf}
+!endif
+!if /FileExists "${VIMRT}\doc\uganda.cnx"
+ ${If} $Language = ${LANG_SIMPCHINESE}
+ File ${VIMRT}\doc\uganda.cnx
+ ${EndIf}
+!endif
+!if /FileExists "${VIMRT}\doc\uganda.twx"
+ ${If} $Language = ${LANG_TRADCHINESE}
+ File ${VIMRT}\doc\uganda.twx
+ ${EndIf}
+!endif
+!if /FileExists "${VIMRT}\doc\uganda.trx"
+ ${If} $Language = ${LANG_TURKISH}
+ File ${VIMRT}\doc\uganda.trx
+ ${EndIf}
+!endif
SetOutPath $0\lang
File /r /x Makefile ${VIMRT}\lang\*.*
SetOutPath $0
diff --git a/nsis/lang/README.txt b/nsis/lang/README.txt
new file mode 100644
index 0000000000..68ff1124ca
--- /dev/null
+++ b/nsis/lang/README.txt
@@ -0,0 +1,34 @@
+This directory contains a file with text strings for gVim installer.
+It also contains files with translations of the text strings for gVim installer
+into different languages.
+
+For translators.
+
+If you want to prepare a translation for the gVim installer, use the file
+"english.nsi" as a master file. See the other translation files in this
+directory.
+Note that in the definition of the MUI_LANGUAGE macro, the name of the language
+to be translated must be the English name of the language.
+The name of the file with the translation must match the name of the target
+language.
+Also, when translating strings, pay attention to some restrictions on the
+allowable length of strings. For example:
+ component description field - 117 characters;
+ description above the drop-down lists on the .vimrc page - 53 characters;
+ drop-down lists on the .vimrc page - 55 characters.
+Characters in this case mean characters of the English alphabet.
+
+If you do not yet have a translated "uganda.txt" file and a main "README.txt"
+file, set the following values:
+
+for the license file
+LicenseLangString page_lic_file 0 "${VIMRT}\doc\uganda.nsis.txt"
+
+for the readme.txt file
+LangString vim_readme_file 0 "README.txt"
+
+Once you have the translations of these files, then set the values for these
+variables similarly to what is done in the other translation files.
+Also add the appropriate entries to the "gvim.nsi" file as done for other
+languages.
+
diff --git a/nsis/lang/danish.nsi b/nsis/lang/danish.nsi
index b365413c1d..ceb18be2f1 100644
--- a/nsis/lang/danish.nsi
+++ b/nsis/lang/danish.nsi
@@ -3,6 +3,7 @@
# danish.nsi: Danish language strings for gvim NSIS installer.
#
# Locale ID : 1030
+# Locale Name : da
# fileencoding : UTF-8
# Author : scootergrisen
@@ -15,6 +16,20 @@ LangString ^SetupCaption ${LANG_DANISH} "$(^Name) Setup"
LangString ^UninstallCaption ${LANG_DANISH} "$(^Name) Uninstall"
##############################################################################
+# Translated license file for the license page {{{1
+##############################################################################
+
+LicenseLangString page_lic_file 0 "${VIMRT}\doc\uganda.nsis.txt"
+#LicenseLangString page_lic_file ${LANG_DANISH} "${VIMRT}\doc\uganda.nsis.dax"
+
+##############################################################################
+# Translated README.txt file, which is opened after installation {{{1
+##############################################################################
+
+LangString vim_readme_file 0 "README.txt"
+#LangString vim_readme_file ${LANG_DANISH} "README.dax.txt"
+
+##############################################################################
# MUI Configuration Strings {{{1
##############################################################################
diff --git a/nsis/lang/dutch.nsi b/nsis/lang/dutch.nsi
index 1d1322411e..49b1ed07c9 100644
--- a/nsis/lang/dutch.nsi
+++ b/nsis/lang/dutch.nsi
@@ -18,6 +18,20 @@ LangString ^UninstallCaption ${LANG_DUTCH} \
"$(^Name) Uninstall"
##############################################################################
+# Translated license file for the license page {{{1
+##############################################################################
+
+LicenseLangString page_lic_file 0 "${VIMRT}\doc\uganda.nsis.txt"
+#LicenseLangString page_lic_file ${LANG_DUTCH} "${VIMRT}\doc\uganda.nsis.nlx"
+
+##############################################################################
+# Translated README.txt file, which is opened after installation {{{1
+##############################################################################
+
+LangString vim_readme_file 0 "README.txt"
+#LangString vim_readme_file ${LANG_DUTCH} "README.nlx.txt"
+
+##############################################################################
# MUI Configuration Strings {{{1
##############################################################################
diff --git a/nsis/lang/english.nsi b/nsis/lang/english.nsi
index e1be985e15..6f69f58df1 100644
--- a/nsis/lang/english.nsi
+++ b/nsis/lang/english.nsi
@@ -3,6 +3,7 @@
# english.nsi: English language strings for gvim NSIS installer.
#
# Locale ID : 1033
+# Locale Name : en
# fileencoding : UTF-8
# Author : Guopeng Wen, Ken Takata
@@ -17,6 +18,18 @@ LangString ^UninstallCaption ${LANG_ENGLISH} \
"$(^Name) Uninstall"
##############################################################################
+# License file for the license page {{{1
+##############################################################################
+
+LicenseLangString page_lic_file ${LANG_ENGLISH} "${VIMRT}\doc\uganda.nsis.txt"
+
+##############################################################################
+# README.txt file, which is opened after installation {{{1
+##############################################################################
+
+LangString vim_readme_file ${LANG_ENGLISH} "README.txt"
+
+##############################################################################
# MUI Configuration Strings {{{1
##############################################################################
diff --git a/nsis/lang/german.nsi b/nsis/lang/german.nsi
index b976ef4a2f..92b92d9b0c 100644
--- a/nsis/lang/german.nsi
+++ b/nsis/lang/german.nsi
@@ -3,6 +3,7 @@
# german.nsi : German language strings for gvim NSIS installer.
#
# Locale ID : 1031
+# Locale Name : de
# fileencoding : UTF-8
# Author : Christian Brabandt, tux
@@ -17,6 +18,20 @@ LangString ^UninstallCaption ${LANG_GERMAN} \
"$(^Name) Uninstall"
##############################################################################
+# Translated license file for the license page {{{1
+##############################################################################
+
+LicenseLangString page_lic_file 0 "uganda.nsis.txt"
+#LicenseLangString page_lic_file ${LANG_GERMAN} "${VIMRT}\doc\uganda.nsis.dex"
+
+##############################################################################
+# Translated README.txt file, which is opened after installation {{{1
+##############################################################################
+
+LangString vim_readme_file 0 "README.txt"
+#LangString vim_readme_file ${LANG_GERMAN} "README.dex.txt"
+
+##############################################################################
# MUI Configuration Strings {{{1
##############################################################################
diff --git a/nsis/lang/greek.nsi b/nsis/lang/greek.nsi
index 5175dd5d62..b92d3f326b 100644
--- a/nsis/lang/greek.nsi
+++ b/nsis/lang/greek.nsi
@@ -3,6 +3,7 @@
# greek.nsi: Greek language strings for gvim NSIS installer.
#
# Locale ID : 1032
+# Locale Name : el
# fileencoding : UTF-8
# Author : Christos Longros
@@ -17,6 +18,20 @@ LangString ^UninstallCaption ${LANG_GREEK} \
"$(^Name) Uninstall"
##############################################################################
+# Translated license file for the license page {{{1
+##############################################################################
+
+LicenseLangString page_lic_file 0 "${VIMRT}\doc\uganda.nsis.txt"
+#LicenseLangString page_lic_file ${LANG_GREEK} "${VIMRT}\doc\uganda.nsis.elx"
+
+##############################################################################
+# Translated README.txt file, which is opened after installation {{{1
+##############################################################################
+
+LangString vim_readme_file 0 "README.txt"
+#LangString vim_readme_file ${LANG_GREEK} "README.elx.txt"
+
+##############################################################################
# MUI Configuration Strings {{{1
##############################################################################
diff --git a/nsis/lang/italian.nsi b/nsis/lang/italian.nsi
index 029737f035..5f326809a7 100644
--- a/nsis/lang/italian.nsi
+++ b/nsis/lang/italian.nsi
@@ -3,6 +3,7 @@
# italian.nsi : Italian language strings for gvim NSIS installer.
#
# Locale ID : 1040
+# Locale Name : it
# fileencoding : UTF-8
# Author : Antonio Colombo, bovirus - revision: 12.05.2023
@@ -17,6 +18,20 @@ LangString ^UninstallCaption ${LANG_ITALIAN} \
"$(^Name) Uninstall"
##############################################################################
+# Translated license file for the license page {{{1
+##############################################################################
+
+LicenseLangString page_lic_file 0 "${VIMRT}\doc\uganda.nsis.txt"
+#LicenseLangString page_lic_file ${LANG_ITALIAN} "${VIMRT}\doc\uganda.nsis.itx"
+
+##############################################################################
+# Translated README.txt file, which is opened after installation {{{1
+##############################################################################
+
+LangString vim_readme_file 0 "README.txt"
+#LangString vim_readme_file ${LANG_ITALIAN} "README.itx.txt"
+
+##############################################################################
# MUI Configuration Strings {{{1
##############################################################################
diff --git a/nsis/lang/japanese.nsi b/nsis/lang/japanese.nsi
index 58f4dccc1b..d290355d10 100644
--- a/nsis/lang/japanese.nsi
+++ b/nsis/lang/japanese.nsi
@@ -3,6 +3,7 @@
# japanese.nsi: Japanese language strings for gvim NSIS installer.
#
# Locale ID : 1041
+# Locale Name : ja
# fileencoding : UTF-8
# Author : Ken Takata
@@ -27,6 +28,20 @@ LangString ^InstallBtn ${LANG_JAPANESE} \
"インストール(&I)"
##############################################################################
+# Translated license file for the license page {{{1
+##############################################################################
+
+LicenseLangString page_lic_file 0 "${VIMRT}\doc\uganda.nsis.txt"
+#LicenseLangString page_lic_file ${LANG_JAPANESE} "${VIMRT}\doc\uganda.nsis.jax"
+
+##############################################################################
+# Translated README.txt file, which is opened after installation {{{1
+##############################################################################
+
+LangString vim_readme_file 0 "README.txt"
+#LangString vim_readme_file ${LANG_JAPANESE} "README.jax.txt"
+
+##############################################################################
# MUI Configuration Strings {{{1
##############################################################################
diff --git a/nsis/lang/russian.nsi b/nsis/lang/russian.nsi
index e4b01e3ad0..876bef2b89 100644
--- a/nsis/lang/russian.nsi
+++ b/nsis/lang/russian.nsi
@@ -3,7 +3,7 @@
# russian.nsi: Russian language strings for gvim NSIS installer.
#
# Locale ID : 1049
-# Locale name : ru-RU
+# Locale name : ru
# fileencoding : UTF-8
# Author : Restorer
@@ -18,6 +18,18 @@ LangString ^UninstallCaption ${LANG_RUSSIAN} \
"$(^Name) Uninstall"
##############################################################################
+# Translated license file for the license page {{{1
+##############################################################################
+
+LicenseLangString page_lic_file ${LANG_RUSSIAN} "${VIMRT}\doc\uganda.nsis.rux"
+
+##############################################################################
+# Translated README.txt file, which is opened after installation {{{1
+##############################################################################
+
+LangString vim_readme_file ${LANG_RUSSIAN} "README.rux.txt"
+
+##############################################################################
# MUI Configuration Strings {{{1
##############################################################################
diff --git a/nsis/lang/serbian.nsi b/nsis/lang/serbian.nsi
index 11d889a115..122727d11a 100644
--- a/nsis/lang/serbian.nsi
+++ b/nsis/lang/serbian.nsi
@@ -3,6 +3,7 @@
# serbian.nsi: Serbian language strings for gvim NSIS installer.
#
# Locale ID : 3098
+# Locale Name : sr
# fileencoding : UTF-8
# Author : Ivan Pešić
@@ -17,6 +18,20 @@ LangString ^UninstallCaption ${LANG_SERBIAN} \
"$(^Name) Uninstall"
##############################################################################
+# Translated license file for the license page {{{1
+##############################################################################
+
+LicenseLangString page_lic_file 0 "${VIMRT}\doc\uganda.nsis.txt"
+#LicenseLangString page_lic_file ${LANG_SERBIAN} "${VIMRT}\doc\uganda.nsis.srx"
+
+##############################################################################
+# Translated README.txt file, which is opened after installation {{{1
+##############################################################################
+
+LangString vim_readme_file 0 "README.txt"
+#LangString vim_readme_file ${LANG_SERBIAN} "README.srx.txt"
+
+##############################################################################
# MUI Configuration Strings {{{1
##############################################################################
diff --git a/nsis/lang/simpchinese.nsi b/nsis/lang/simpchinese.nsi
index 2c80054d19..8d2d073f79 100644
--- a/nsis/lang/simpchinese.nsi
+++ b/nsis/lang/simpchinese.nsi
@@ -4,6 +4,7 @@
# installer.
#
# Locale ID : 2052
+# Locale Name : cn
# fileencoding : UTF-8
# Author : Guopeng Wen, David Liu
@@ -18,6 +19,21 @@ LangString ^UninstallCaption ${LANG_SIMPCHINESE} \
"$(^Name) Uninstall"
##############################################################################
+# Translated license file for the license page {{{1
+##############################################################################
+
+LicenseLangString page_lic_file 0 "${VIMRT}\doc\uganda.nsis.txt"
+#LicenseLangString page_lic_file ${LANG_SIMPCHINESE} \
+# "${VIMRT}\doc\uganda.nsis.cnx"
+
+##############################################################################
+# Translated README.txt file, which is opened after installation {{{1
+##############################################################################
+
+LangString vim_readme_file 0 "README.txt"
+#LangString vim_readme_file ${LANG_SIMPCHINESE} "README.cnx.txt"
+
+##############################################################################
# MUI Configuration Strings {{{1
##############################################################################
diff --git a/nsis/lang/tradchinese.nsi b/nsis/lang/tradchinese.nsi
index 16b6747c20..66bb1b8800 100644
--- a/nsis/lang/tradchinese.nsi
+++ b/nsis/lang/tradchinese.nsi
@@ -4,6 +4,7 @@
# installer.
#
# Locale ID : 1028
+# Locale Name : tw
# fileencoding : UTF-8
# Author : Guopeng Wen
@@ -18,6 +19,21 @@ LangString ^UninstallCaption ${LANG_TRADCHINESE} \
"$(^Name) Uninstall"
##############################################################################
+# Translated license file for the license page {{{1
+##############################################################################
+
+LicenseLangString page_lic_file 0 "${VIMRT}\doc\uganda.nsis.txt"
+#LicenseLangString page_lic_file ${LANG_TRADCHINESE} \
+# "${VIMRT}\doc\uganda.nsis.twx"
+
+##############################################################################
+# Translated README.txt file, which is opened after installation {{{1
+##############################################################################
+
+LangString vim_readme_file 0 "README.txt"
+#LangString vim_readme_file ${LANG_TRADCHINESE} "README.twx.txt"
+
+##############################################################################
# MUI Configuration Strings {{{1
##############################################################################
diff --git a/nsis/lang/turkish.nsi b/nsis/lang/turkish.nsi
index 1046b8195d..429cbb3d90 100644
--- a/nsis/lang/turkish.nsi
+++ b/nsis/lang/turkish.nsi
@@ -1,4 +1,9 @@
+# vi:set ts=8 sts=4 sw=4 et fdm=marker:
+#
# turkish.nsi: Turkish language strings for gvim NSIS installer.
+#
+# Locale ID : 1055
+# Locale Name : tr
# fileencoding : UTF-8
# Author : Emir SARI
@@ -11,6 +16,22 @@ LangString ^SetupCaption ${LANG_TURKISH} \
LangString ^UninstallCaption ${LANG_TURKISH} \
"$(^Name) Uninstall"
+##############################################################################
+# Translated license file for the license page {{{1
+##############################################################################
+
+LicenseLangString page_lic_file 0 "${VIMRT}\doc\uganda.nsis.txt"
+#LicenseLangString page_lic_file ${LANG_TURKISH} "${VIMRT}\doc\uganda.nsis.trx"
+
+##############################################################################
+# Translated README.txt file, which is opened after installation {{{1
+##############################################################################
+
+LangString vim_readme_file 0 "README.txt"
+#LangString vim_readme_file ${LANG_TURKISH} "README.trx.txt"
+
+##############################################################################
+
LangString str_show_readme ${LANG_TURKISH} \
"Kurulum bittikten sonra README dosyasını aç"