Skip to content

Commit 286eacd

Browse files
committed
patch 7.4.1106
Problem: The nsis script can't be used from the appveyor build. Solution: Add "ifndef" to allow for variables to be set from the command line. Remove duplicate SetCompressor command. Support using other gettext binaries. (Ken Takata) Update build instructions to use libintl-8.dll.
1 parent 9bbf63d commit 286eacd

7 files changed

Lines changed: 29 additions & 14 deletions

File tree

Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,9 @@ MINOR = 4
131131
#
132132
# MS-Windows:
133133
# - Run make on Unix to update the ".mo" files.
134+
# - Get libintl-8.dll and libiconv-2.dll. E.g. from
135+
# https://mlocati.github.io/gettext-iconv-windows/ .
136+
# Put them in the top directory, "make dosrt" uses them.
134137
# - > make dossrc
135138
# > make dosrt
136139
# Unpack dist/vim##rt.zip and dist/vim##src.zip on an MS-Windows PC.
@@ -493,7 +496,8 @@ dosrt_files: dist prepare no_title.vim
493496
cp $$i dist/vim/$(VIMRTDIR)/lang/$$n/LC_MESSAGES/vim.mo; \
494497
fi \
495498
done
496-
cp libintl.dll dist/vim/$(VIMRTDIR)/
499+
cp libintl-8.dll dist/vim/$(VIMRTDIR)/
500+
cp libiconv-2.dll dist/vim/$(VIMRTDIR)/
497501

498502

499503
# Used before uploading. Don't delete the AAPDIR/sign files!

nsis/gvim.nsi

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,19 @@
66
# because uninstall deletes most files in $0.
77

88
# Location of gvim_ole.exe, vimw32.exe, GvimExt/*, etc.
9-
!define VIMSRC "..\src"
9+
!ifndef VIMSRC
10+
!define VIMSRC "..\src"
11+
!endif
1012

1113
# Location of runtime files
12-
!define VIMRT ".."
14+
!ifndef VIMRT
15+
!define VIMRT ".."
16+
!endif
1317

1418
# Location of extra tools: diff.exe
15-
!define VIMTOOLS ..\..
19+
!ifndef VIMTOOLS
20+
!define VIMTOOLS ..\..
21+
!endif
1622

1723
# Comment the next line if you don't have UPX.
1824
# Get it at http://upx.sourceforge.net
@@ -32,9 +38,10 @@
3238
Name "Vim ${VER_MAJOR}.${VER_MINOR}"
3339
OutFile gvim${VER_MAJOR}${VER_MINOR}.exe
3440
CRCCheck force
35-
SetCompressor lzma
41+
SetCompressor /SOLID lzma
3642
SetDatablockOptimize on
3743
RequestExecutionLevel highest
44+
XPStyle on
3845

3946
ComponentText "This will install Vim ${VER_MAJOR}.${VER_MINOR} on your computer."
4047
DirText "Choose a directory to install Vim (should contain 'vim')"
@@ -55,9 +62,6 @@ LicenseData ${VIMRT}\doc\uganda.nsis.txt
5562
!packhdr temp.dat "upx --best --compress-icons=1 temp.dat"
5663
!endif
5764

58-
SetCompressor /SOLID lzma
59-
XPStyle on
60-
6165
# This adds '\vim' to the user choice automagically. The actual value is
6266
# obtained below with ReadINIStr.
6367
InstallDir "$PROGRAMFILES\Vim"
@@ -355,7 +359,9 @@ SectionEnd
355359
File ${VIMRT}\keymap\README.txt
356360
File ${VIMRT}\keymap\*.vim
357361
SetOutPath $0
358-
File ${VIMRT}\libintl.dll
362+
File ${VIMRT}\libintl-8.dll
363+
File ${VIMRT}\libiconv-2.dll
364+
File /nonfatal ${VIMRT}\libwinpthread-1.dll
359365
SectionEnd
360366
!endif
361367

src/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1580,7 +1580,7 @@ init_locale()
15801580

15811581
# ifdef DYNAMIC_GETTEXT
15821582
/* Initialize the gettext library */
1583-
dyn_libintl_init(NULL);
1583+
dyn_libintl_init();
15841584
# endif
15851585
/* expand_env() doesn't work yet, because chartab[] is not initialized
15861586
* yet, call vim_getenv() directly */

src/os_w32exe.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ WinMain(
6969

7070
#ifdef DYNAMIC_GETTEXT
7171
/* Initialize gettext library */
72-
dyn_libintl_init(NULL);
72+
dyn_libintl_init();
7373
#endif
7474

7575
#ifdef VIMDLL

src/os_win32.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -463,6 +463,7 @@ vimLoadLib(char *name)
463463
#if defined(DYNAMIC_GETTEXT) || defined(PROTO)
464464
# ifndef GETTEXT_DLL
465465
# define GETTEXT_DLL "libintl.dll"
466+
# define GETTEXT_DLL_ALT "libintl-8.dll"
466467
# endif
467468
/* Dummy functions */
468469
static char *null_libintl_gettext(const char *);
@@ -479,7 +480,7 @@ char *(*dyn_libintl_bind_textdomain_codeset)(const char *, const char *)
479480
= null_libintl_bind_textdomain_codeset;
480481

481482
int
482-
dyn_libintl_init(char *libname)
483+
dyn_libintl_init()
483484
{
484485
int i;
485486
static struct
@@ -498,7 +499,9 @@ dyn_libintl_init(char *libname)
498499
if (hLibintlDLL)
499500
return 1;
500501
/* Load gettext library (libintl.dll) */
501-
hLibintlDLL = vimLoadLib(libname != NULL ? libname : GETTEXT_DLL);
502+
hLibintlDLL = vimLoadLib(GETTEXT_DLL);
503+
if (!hLibintlDLL)
504+
hLibintlDLL = vimLoadLib(GETTEXT_DLL_ALT);
502505
if (!hLibintlDLL)
503506
{
504507
if (p_verbose > 0)

src/proto/os_win32.pro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* os_win32.c */
22
HINSTANCE vimLoadLib __ARGS((char *name));
3-
int dyn_libintl_init __ARGS((char *libname));
3+
int dyn_libintl_init __ARGS((void));
44
void dyn_libintl_end __ARGS((void));
55
void PlatformId __ARGS((void));
66
int mch_windows95 __ARGS((void));

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -741,6 +741,8 @@ static char *(features[]) =
741741

742742
static int included_patches[] =
743743
{ /* Add new patch number below this line */
744+
/**/
745+
1106,
744746
/**/
745747
1105,
746748
/**/

0 commit comments

Comments
 (0)