To: vim_dev@googlegroups.com Subject: Patch 8.0.1191 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.0.1191 Problem: MS-Windows: missing 32 and 64 bit files in installer. Solution: Include both 32 and 64 bit GvimExt and related dll files. Remove old Windows code from the installer. (Ken Takata, closes #2144) Files: nsis/README.txt, nsis/gvim.nsi, src/GvimExt/gvimext.cpp, src/dosinst.c, src/dosinst.h, src/uninstal.c, Makefile *** ../vim-8.0.1190/nsis/README.txt 2010-05-15 13:03:29.000000000 +0200 --- nsis/README.txt 2017-10-14 18:47:04.548127225 +0200 *************** *** 1,5 **** This builds a one-click install for Vim for Win32 using the Nullsoft ! Installation System (NSIS), available at http://www.nullsoft.com/free/nsis/ To build the installable .exe: --- 1,5 ---- This builds a one-click install for Vim for Win32 using the Nullsoft ! Installation System (NSIS), available at http://nsis.sourceforge.net/ To build the installable .exe: *************** *** 17,24 **** uninstal.exe, xxd/xxd.exe, 3. Go to the GvimExt directory and build gvimext.dll (or get it from a binary ! archive). 4. Go to the VisVim directory and build VisVim.dll (or get it from a binary archive). --- 17,30 ---- uninstal.exe, xxd/xxd.exe, + Then execute tools/rename.bat to rename the executables. (mv command is + required.) + 3. Go to the GvimExt directory and build gvimext.dll (or get it from a binary ! archive). Both 64- and 32-bit versions are needed and should be placed ! as follows: ! 64-bit: src/GvimExt/gvimext64.dll ! 32-bit: src/GvimExt/gvimext.dll 4. Go to the VisVim directory and build VisVim.dll (or get it from a binary archive). *************** *** 27,39 **** get them from a binary archive). 6. Get a "diff.exe" program and put it in the "../.." directory (above the ! "vim61" directory, it's the same for all Vim versions). You can find one in previous Vim versions or in this archive: http://www.mossbayeng.com/~ron/vim/diffutils.tar.gz 7. Do "make uganda.nsis.txt" in runtime/doc. This requires sed, you may have to do this on Unix. Make sure the file is in DOS file format! Install NSIS if you didn't do that already. Also install UPX, if you want a compressed file. --- 33,67 ---- get them from a binary archive). 6. Get a "diff.exe" program and put it in the "../.." directory (above the ! "vim80" directory, it's the same for all Vim versions). You can find one in previous Vim versions or in this archive: http://www.mossbayeng.com/~ron/vim/diffutils.tar.gz + Also put winpty32.dll and winpty-agent.exe there. 7. Do "make uganda.nsis.txt" in runtime/doc. This requires sed, you may have to do this on Unix. Make sure the file is in DOS file format! + 8. Get gettext and iconv DLLs from the following site: + https://github.com/mlocati/gettext-iconv-windows/releases + Both 64- and 32-bit versions are needed. + Download the files gettextX.X.X.X-iconvX.XX-shared-{32,64}.zip, extract + DLLs and place them as follows: + + + | + + gettext32/ + | libintl-8.dll + | libiconv-2.dll + | libgcc_s_sjlj-1.dll + | + ` gettext64/ + libintl-8.dll + libiconv-2.dll + + The default is "..", however, you can change it by + passing /DGETTEXT=... option to the makensis command. + + Install NSIS if you didn't do that already. Also install UPX, if you want a compressed file. *** ../vim-8.0.1190/nsis/gvim.nsi 2017-09-17 20:59:58.464301540 +0200 --- nsis/gvim.nsi 2017-10-14 18:35:01.004974989 +0200 *************** *** 20,27 **** !define VIMTOOLS ..\.. !endif # Comment the next line if you don't have UPX. ! # Get it at http://upx.sourceforge.net !define HAVE_UPX # comment the next line if you do not want to add Native Language Support --- 20,34 ---- !define VIMTOOLS ..\.. !endif + # Location of gettext. + # It must contain two directories: gettext32 and gettext64. + # See README.txt for detail. + !ifndef GETTEXT + !define GETTEXT ${VIMRT} + !endif + # Comment the next line if you don't have UPX. ! # Get it at https://upx.github.io/ !define HAVE_UPX # comment the next line if you do not want to add Native Language Support *************** *** 328,351 **** SetOutPath $0 ClearErrors SetOverwrite try ${If} ${RunningX64} File /oname=gvimext.dll ${VIMSRC}\GvimExt\gvimext64.dll ! ${Else} ! File /oname=gvimext.dll ${VIMSRC}\GvimExt\gvimext.dll ${EndIf} ! IfErrors 0 GvimExtDone # Can't copy gvimext.dll, create it under another name and rename it on # next reboot. ! GetTempFileName $3 $0 ! ${If} ${RunningX64} ! File /oname=$3 ${VIMSRC}\GvimExt\gvimext64.dll ! ${Else} ! File /oname=$3 ${VIMSRC}\GvimExt\gvimext.dll ! ${EndIf} ! Rename /REBOOTOK $3 $0\gvimext.dll ! GvimExtDone: SetOverwrite lastused # We don't have a separate entry for the "Open With..." menu, assume --- 335,401 ---- SetOutPath $0 ClearErrors SetOverwrite try + ${If} ${RunningX64} + # Install 64-bit gvimext.dll into the GvimExt64 directory. + SetOutPath $0\GvimExt64 + ClearErrors File /oname=gvimext.dll ${VIMSRC}\GvimExt\gvimext64.dll ! !ifdef HAVE_NLS ! File ${GETTEXT}\gettext64\libintl-8.dll ! File ${GETTEXT}\gettext64\libiconv-2.dll ! !endif ! ! IfErrors 0 GvimExt64Done ! ! # Can't copy gvimext.dll, create it under another name and rename it ! # on next reboot. ! GetTempFileName $3 $0\GvimExt64 ! File /oname=$3 ${VIMSRC}\GvimExt64\gvimext.dll ! Rename /REBOOTOK $3 $0\GvimExt64\gvimext.dll ! !ifdef HAVE_NLS ! GetTempFileName $3 $0\GvimExt64 ! File /oname=$3 ${GETTEXT}\gettext64\libintl-8.dll ! Rename /REBOOTOK $3 $0\GvimExt64\libintl-8.dll ! GetTempFileName $3 $0\GvimExt64 ! File /oname=$3 ${GETTEXT}\gettext64\libiconv-2.dll ! Rename /REBOOTOK $3 $0\GvimExt64\libiconv-2.dll ! !endif ${EndIf} ! ! GvimExt64Done: ! ! # Install 32-bit gvimext.dll into the GvimExt32 directory. ! SetOutPath $0\GvimExt32 ! ClearErrors ! ! File /oname=gvimext.dll ${VIMSRC}\GvimExt\gvimext.dll ! !ifdef HAVE_NLS ! File ${GETTEXT}\gettext32\libintl-8.dll ! File ${GETTEXT}\gettext32\libiconv-2.dll ! File ${GETTEXT}\gettext32\libgcc_s_sjlj-1.dll ! !endif ! ! IfErrors 0 GvimExt32Done # Can't copy gvimext.dll, create it under another name and rename it on # next reboot. ! GetTempFileName $3 $0\GvimExt32 ! File /oname=$3 ${VIMSRC}\GvimExt\gvimext.dll ! Rename /REBOOTOK $3 $0\GvimExt32\gvimext.dll ! !ifdef HAVE_NLS ! GetTempFileName $3 $0\GvimExt32 ! File /oname=$3 ${GETTEXT}\gettext32\libintl-8.dll ! Rename /REBOOTOK $3 $0\GvimExt32\libintl-8.dll ! GetTempFileName $3 $0\GvimExt32 ! File /oname=$3 ${GETTEXT}\gettext32\libiconv-2.dll ! Rename /REBOOTOK $3 $0\GvimExt32\libiconv-2.dll ! GetTempFileName $3 $0\GvimExt32 ! File /oname=$3 ${GETTEXT}\gettext32\libgcc_s_sjlj-1.dll ! Rename /REBOOTOK $3 $0\GvimExt32\libgcc_s_sjlj-1.dll ! !endif ! GvimExt32Done: SetOverwrite lastused # We don't have a separate entry for the "Open With..." menu, assume *************** *** 394,403 **** File ${VIMRT}\keymap\README.txt File ${VIMRT}\keymap\*.vim SetOutPath $0 ! File ${VIMRT}\libintl-8.dll ! File ${VIMRT}\libiconv-2.dll ! File /nonfatal ${VIMRT}\libwinpthread-1.dll ! File /nonfatal ${VIMRT}\libgcc_s_sjlj-1.dll SectionEnd !endif --- 444,453 ---- File ${VIMRT}\keymap\README.txt File ${VIMRT}\keymap\*.vim SetOutPath $0 ! File ${GETTEXT}\gettext32\libintl-8.dll ! File ${GETTEXT}\gettext32\libiconv-2.dll ! #File /nonfatal ${VIMRT}\libwinpthread-1.dll ! File /nonfatal ${GETTEXT}\gettext32\libgcc_s_sjlj-1.dll SectionEnd !endif *************** *** 437,442 **** --- 487,497 ---- $\nIt contains the Vim executables and runtime files." IDNO NoRemoveExes Delete /REBOOTOK $0\*.dll + Delete /REBOOTOK $0\GvimExt32\*.dll + ${If} ${RunningX64} + Delete /REBOOTOK $0\GvimExt64\*.dll + ${EndIf} + ClearErrors # Remove everything but *.dll files. Avoids that # a lot remains when gvimext.dll cannot be deleted. *** ../vim-8.0.1190/src/GvimExt/gvimext.cpp 2016-02-21 20:28:32.000000000 +0100 --- src/GvimExt/gvimext.cpp 2017-10-14 17:17:35.232769647 +0200 *************** *** 38,44 **** HRESULT hres = 0; UINT cbFiles = 0; ! /* The buffers size used to be MAX_PATH (256 bytes), but that's not always * enough */ #define BUFSIZE 1100 --- 38,44 ---- HRESULT hres = 0; UINT cbFiles = 0; ! /* The buffers size used to be MAX_PATH (260 bytes), but that's not always * enough */ #define BUFSIZE 1100 *************** *** 203,209 **** if (hLibintlDLL) return 1; ! // Load gettext library from the Vim runtime directory. // Add the directory to $PATH temporarily. len = GetEnvironmentVariableW(L"PATH", NULL, 0); len2 = MAX_PATH + 1 + len; --- 203,209 ---- if (hLibintlDLL) return 1; ! // Load gettext library from $VIMRUNTIME\GvimExt{64,32} directory. // Add the directory to $PATH temporarily. len = GetEnvironmentVariableW(L"PATH", NULL, 0); len2 = MAX_PATH + 1 + len; *************** *** 212,218 **** if (buf != NULL && buf2 != NULL) { GetEnvironmentVariableW(L"PATH", buf, len); ! _snwprintf(buf2, len2, L"%S;%s", dir, buf); SetEnvironmentVariableW(L"PATH", buf2); hLibintlDLL = LoadLibrary(GETTEXT_DLL); #ifdef GETTEXT_DLL_ALT --- 212,222 ---- if (buf != NULL && buf2 != NULL) { GetEnvironmentVariableW(L"PATH", buf, len); ! #ifdef _WIN64 ! _snwprintf(buf2, len2, L"%S\\GvimExt64;%s", dir, buf); ! #else ! _snwprintf(buf2, len2, L"%S\\GvimExt32;%s", dir, buf); ! #endif SetEnvironmentVariableW(L"PATH", buf2); hLibintlDLL = LoadLibrary(GETTEXT_DLL); #ifdef GETTEXT_DLL_ALT *************** *** 883,919 **** return TRUE; } ! #ifdef WIN32 ! // This symbol is not defined in older versions of the SDK or Visual C++. ! ! #ifndef VER_PLATFORM_WIN32_WINDOWS ! # define VER_PLATFORM_WIN32_WINDOWS 1 ! #endif ! ! static DWORD g_PlatformId; ! ! // ! // Set g_PlatformId to VER_PLATFORM_WIN32_NT (NT) or ! // VER_PLATFORM_WIN32_WINDOWS (Win95). ! // ! static void ! PlatformId(void) ! { ! static int done = FALSE; ! ! if (!done) ! { ! OSVERSIONINFO ovi; ! ! ovi.dwOSVersionInfoSize = sizeof(ovi); ! GetVersionEx(&ovi); ! ! g_PlatformId = ovi.dwPlatformId; ! done = TRUE; ! } ! } ! ! # ifndef __BORLANDC__ static char * searchpath(char *name) { --- 887,893 ---- return TRUE; } ! #ifndef __BORLANDC__ static char * searchpath(char *name) { *************** *** 922,949 **** // There appears to be a bug in FindExecutableA() on Windows NT. // Use FindExecutableW() instead... ! PlatformId(); ! if (g_PlatformId == VER_PLATFORM_WIN32_NT) ! { ! MultiByteToWideChar(CP_ACP, 0, (LPCTSTR)name, -1, ! (LPWSTR)widename, BUFSIZE); ! if (FindExecutableW((LPCWSTR)widename, (LPCWSTR)"", ! (LPWSTR)location) > (HINSTANCE)32) ! { ! WideCharToMultiByte(CP_ACP, 0, (LPWSTR)location, -1, ! (LPSTR)widename, 2 * BUFSIZE, NULL, NULL); ! return widename; ! } ! } ! else ! { ! if (FindExecutableA((LPCTSTR)name, (LPCTSTR)"", ! (LPTSTR)location) > (HINSTANCE)32) ! return location; } return (char *)""; } - # endif #endif STDMETHODIMP CShellExt::InvokeGvim(HWND hParent, --- 896,912 ---- // There appears to be a bug in FindExecutableA() on Windows NT. // Use FindExecutableW() instead... ! MultiByteToWideChar(CP_ACP, 0, (LPCSTR)name, -1, ! (LPWSTR)widename, BUFSIZE); ! if (FindExecutableW((LPCWSTR)widename, (LPCWSTR)"", ! (LPWSTR)location) > (HINSTANCE)32) ! { ! WideCharToMultiByte(CP_ACP, 0, (LPWSTR)location, -1, ! (LPSTR)widename, 2 * BUFSIZE, NULL, NULL); ! return widename; } return (char *)""; } #endif STDMETHODIMP CShellExt::InvokeGvim(HWND hParent, *** ../vim-8.0.1190/src/dosinst.c 2016-08-29 22:42:20.000000000 +0200 --- src/dosinst.c 2017-10-14 18:54:36.005092180 +0200 *************** *** 19,24 **** --- 19,27 ---- #define DOSINST #include "dosinst.h" + #define GVIMEXT64_PATH "GvimExt64\\gvimext.dll" + #define GVIMEXT32_PATH "GvimExt32\\gvimext.dll" + /* Macro to do an error check I was typing over and over */ #define CHECK_REG_ERROR(code) if (code != ERROR_SUCCESS) { printf("%ld error number: %ld\n", (long)__LINE__, (long)code); return 1; } *************** *** 75,81 **** { "\nChoose:", "Do not remap keys for Windows behavior", ! "Remap a few keys for Windows behavior (, , etc)", }; int remap_choice = (int)remap_win; char *remap_text = "- %s"; --- 78,84 ---- { "\nChoose:", "Do not remap keys for Windows behavior", ! "Remap a few keys for Windows behavior (CTRL-V, CTRL-C, CTRL-F, etc)", }; int remap_choice = (int)remap_win; char *remap_text = "- %s"; *************** *** 359,365 **** mch_chdir(installdir); } - #ifdef WIN3264 /* * Get the value of $VIMRUNTIME or $VIM and write it in $TEMP/vimini.ini, so * that NSIS can read it. --- 362,367 ---- *************** *** 612,618 **** return foundone; } - #endif /* * Find out information about the system. --- 614,619 ---- *************** *** 1324,1335 **** ++choice_count; } - #if defined(WIN3264) static LONG reg_create_key( HKEY root, const char *subkey, ! PHKEY phKey) { DWORD disp; --- 1325,1336 ---- ++choice_count; } static LONG reg_create_key( HKEY root, const char *subkey, ! PHKEY phKey, ! DWORD flag) { DWORD disp; *************** *** 1337,1343 **** return RegCreateKeyEx( root, subkey, 0, NULL, REG_OPTION_NON_VOLATILE, ! KEY_WOW64_64KEY | KEY_WRITE, NULL, phKey, &disp); } --- 1338,1344 ---- return RegCreateKeyEx( root, subkey, 0, NULL, REG_OPTION_NON_VOLATILE, ! flag | KEY_WRITE, NULL, phKey, &disp); } *************** *** 1356,1365 **** HKEY hRootKey, const char *subkey, const char *value_name, ! const char *data) { HKEY hKey; ! LONG lRet = reg_create_key(hRootKey, subkey, &hKey); if (ERROR_SUCCESS == lRet) { --- 1357,1367 ---- HKEY hRootKey, const char *subkey, const char *value_name, ! const char *data, ! DWORD flag) { HKEY hKey; ! LONG lRet = reg_create_key(hRootKey, subkey, &hKey, flag); if (ERROR_SUCCESS == lRet) { *************** *** 1375,1395 **** const char *clsid, const char *extname, const char *module, ! const char *threading_model) { CHAR subkey[BUFSIZE]; LONG lRet; sprintf(subkey, "CLSID\\%s", clsid); ! lRet = reg_create_key_and_value(hRootKey, subkey, NULL, extname); if (ERROR_SUCCESS == lRet) { sprintf(subkey, "CLSID\\%s\\InProcServer32", clsid); ! lRet = reg_create_key_and_value(hRootKey, subkey, NULL, module); if (ERROR_SUCCESS == lRet) { lRet = reg_create_key_and_value(hRootKey, subkey, ! "ThreadingModel", threading_model); } } return lRet; --- 1377,1398 ---- const char *clsid, const char *extname, const char *module, ! const char *threading_model, ! DWORD flag) { CHAR subkey[BUFSIZE]; LONG lRet; sprintf(subkey, "CLSID\\%s", clsid); ! lRet = reg_create_key_and_value(hRootKey, subkey, NULL, extname, flag); if (ERROR_SUCCESS == lRet) { sprintf(subkey, "CLSID\\%s\\InProcServer32", clsid); ! lRet = reg_create_key_and_value(hRootKey, subkey, NULL, module, flag); if (ERROR_SUCCESS == lRet) { lRet = reg_create_key_and_value(hRootKey, subkey, ! "ThreadingModel", threading_model, flag); } } return lRet; *************** *** 1400,1412 **** HKEY hRootKey, const char *clsid, const char *name, ! const char *exe_path) { LONG lRet = reg_create_key_and_value( hRootKey, "*\\shellex\\ContextMenuHandlers\\gvim", NULL, ! clsid); if (ERROR_SUCCESS == lRet) { --- 1403,1417 ---- HKEY hRootKey, const char *clsid, const char *name, ! const char *exe_path, ! DWORD flag) { LONG lRet = reg_create_key_and_value( hRootKey, "*\\shellex\\ContextMenuHandlers\\gvim", NULL, ! clsid, ! flag); if (ERROR_SUCCESS == lRet) { *************** *** 1414,1420 **** HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Windows\\CurrentVersion\\Shell Extensions\\Approved", clsid, ! name); if (ERROR_SUCCESS == lRet) { --- 1419,1426 ---- HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Windows\\CurrentVersion\\Shell Extensions\\Approved", clsid, ! name, ! flag); if (ERROR_SUCCESS == lRet) { *************** *** 1422,1428 **** HKEY_LOCAL_MACHINE, "Software\\Vim\\Gvim", "path", ! exe_path); } } return lRet; --- 1428,1435 ---- HKEY_LOCAL_MACHINE, "Software\\Vim\\Gvim", "path", ! exe_path, ! flag); } } return lRet; *************** *** 1431,1437 **** static LONG register_openwith( HKEY hRootKey, ! const char *exe_path) { char exe_cmd[BUFSIZE]; LONG lRet; --- 1438,1445 ---- static LONG register_openwith( HKEY hRootKey, ! const char *exe_path, ! DWORD flag) { char exe_cmd[BUFSIZE]; LONG lRet; *************** *** 1441,1447 **** hRootKey, "Applications\\gvim.exe\\shell\\edit\\command", NULL, ! exe_cmd); if (ERROR_SUCCESS == lRet) { --- 1449,1456 ---- hRootKey, "Applications\\gvim.exe\\shell\\edit\\command", NULL, ! exe_cmd, ! flag); if (ERROR_SUCCESS == lRet) { *************** *** 1455,1461 **** for (i = 0; ERROR_SUCCESS == lRet && i < sizeof(openwith) / sizeof(openwith[0]); i++) { ! lRet = reg_create_key_and_value(hRootKey, openwith[i], NULL, ""); } } --- 1464,1470 ---- for (i = 0; ERROR_SUCCESS == lRet && i < sizeof(openwith) / sizeof(openwith[0]); i++) { ! lRet = reg_create_key_and_value(hRootKey, openwith[i], NULL, "", flag); } } *************** *** 1470,1483 **** const char *uninstall_string) { LONG lRet = reg_create_key_and_value(hRootKey, appname, ! "DisplayName", display_name); if (ERROR_SUCCESS == lRet) lRet = reg_create_key_and_value(hRootKey, appname, ! "UninstallString", uninstall_string); return lRet; } - #endif /* WIN3264 */ /* * Add some entries to the registry: --- 1479,1491 ---- const char *uninstall_string) { LONG lRet = reg_create_key_and_value(hRootKey, appname, ! "DisplayName", display_name, KEY_WOW64_64KEY); if (ERROR_SUCCESS == lRet) lRet = reg_create_key_and_value(hRootKey, appname, ! "UninstallString", uninstall_string, KEY_WOW64_64KEY); return lRet; } /* * Add some entries to the registry: *************** *** 1489,1495 **** static int install_registry(void) { - #ifdef WIN3264 LONG lRet = ERROR_SUCCESS; const char *vim_ext_ThreadingModel = "Apartment"; const char *vim_ext_name = "Vim Shell Extension"; --- 1497,1502 ---- *************** *** 1497,1536 **** char vim_exe_path[BUFSIZE]; char display_name[BUFSIZE]; char uninstall_string[BUFSIZE]; sprintf(vim_exe_path, "%s\\gvim.exe", installdir); if (install_popup) { char bufg[BUFSIZE]; - struct stat st; - - if (stat("gvimext.dll", &st) >= 0) - sprintf(bufg, "%s\\gvimext.dll", installdir); - else - /* gvimext.dll is in gvimext subdir */ - sprintf(bufg, "%s\\gvimext\\gvimext.dll", installdir); printf("Creating \"Edit with Vim\" popup menu entry\n"); ! lRet = register_inproc_server( ! HKEY_CLASSES_ROOT, vim_ext_clsid, vim_ext_name, ! bufg, vim_ext_ThreadingModel); ! if (ERROR_SUCCESS != lRet) ! return FAIL; ! lRet = register_shellex( ! HKEY_CLASSES_ROOT, vim_ext_clsid, vim_ext_name, vim_exe_path); ! if (ERROR_SUCCESS != lRet) ! return FAIL; } if (install_openwith) { printf("Creating \"Open with ...\" list entry\n"); ! lRet = register_openwith(HKEY_CLASSES_ROOT, vim_exe_path); ! if (ERROR_SUCCESS != lRet) ! return FAIL; } printf("Creating an uninstall entry\n"); --- 1504,1562 ---- char vim_exe_path[BUFSIZE]; char display_name[BUFSIZE]; char uninstall_string[BUFSIZE]; + int i; + int loop_count = is_64bit_os() ? 2 : 1; + DWORD flag; sprintf(vim_exe_path, "%s\\gvim.exe", installdir); if (install_popup) { char bufg[BUFSIZE]; printf("Creating \"Edit with Vim\" popup menu entry\n"); ! for (i = 0; i < loop_count; i++) ! { ! if (i == 0) ! { ! sprintf(bufg, "%s\\" GVIMEXT32_PATH, installdir); ! flag = KEY_WOW64_32KEY; ! } ! else ! { ! sprintf(bufg, "%s\\" GVIMEXT64_PATH, installdir); ! flag = KEY_WOW64_64KEY; ! } ! ! lRet = register_inproc_server( ! HKEY_CLASSES_ROOT, vim_ext_clsid, vim_ext_name, ! bufg, vim_ext_ThreadingModel, flag); ! if (ERROR_SUCCESS != lRet) ! return FAIL; ! lRet = register_shellex( ! HKEY_CLASSES_ROOT, vim_ext_clsid, vim_ext_name, ! vim_exe_path, flag); ! if (ERROR_SUCCESS != lRet) ! return FAIL; ! } } if (install_openwith) { printf("Creating \"Open with ...\" list entry\n"); ! for (i = 0; i < loop_count; i++) ! { ! if (i == 0) ! flag = KEY_WOW64_32KEY; ! else ! flag = KEY_WOW64_64KEY; ! ! lRet = register_openwith(HKEY_CLASSES_ROOT, vim_exe_path, flag); ! if (ERROR_SUCCESS != lRet) ! return FAIL; ! } } printf("Creating an uninstall entry\n"); *************** *** 1554,1560 **** uninstall_string); if (ERROR_SUCCESS != lRet) return FAIL; - #endif /* WIN3264 */ return OK; } --- 1580,1585 ---- *************** *** 1584,1595 **** struct stat st; if (has_gvim ! && (stat("gvimext.dll", &st) >= 0 ! || stat("gvimext/gvimext.dll", &st) >= 0) ! #ifndef WIN3264 ! && searchpath("regedit.exe") != NULL ! #endif ! ) { choices[choice_count].changefunc = change_popup_choice; choices[choice_count].installfunc = NULL; --- 1609,1616 ---- struct stat st; if (has_gvim ! && (stat(GVIMEXT32_PATH, &st) >= 0 ! || stat(GVIMEXT64_PATH, &st) >= 0)) { choices[choice_count].changefunc = change_popup_choice; choices[choice_count].installfunc = NULL; *************** *** 1623,1633 **** static void init_openwith_choice(void) { ! if (has_gvim ! #ifndef WIN3264 ! && searchpath("regedit.exe") != NULL ! #endif ! ) { choices[choice_count].changefunc = change_openwith_choice; choices[choice_count].installfunc = NULL; --- 1644,1650 ---- static void init_openwith_choice(void) { ! if (has_gvim) { choices[choice_count].changefunc = change_openwith_choice; choices[choice_count].installfunc = NULL; *************** *** 1639,1645 **** add_dummy_choice(); } - #ifdef WIN3264 /* create_shortcut * * Create a shell link. --- 1656,1661 ---- *************** *** 1935,1955 **** alloc_text(idx, "Create a desktop icon for %s", arg); } } - #endif /* WIN3264 */ static void init_startmenu_choice(void) { - #ifdef WIN3264 /* Start menu */ choices[choice_count].changefunc = toggle_startmenu_choice; choices[choice_count].installfunc = NULL; choices[choice_count].active = 1; toggle_startmenu_choice(choice_count); /* set the text */ ++choice_count; - #else - add_dummy_choice(); - #endif } /* --- 1951,1966 ---- *************** *** 1958,1964 **** static void init_shortcut_choices(void) { - #ifdef WIN3264 /* Shortcut to gvim */ choices[choice_count].text = NULL; choices[choice_count].arg = 0; --- 1969,1974 ---- *************** *** 1985,1998 **** choices[choice_count].installfunc = install_shortcut_gview; toggle_shortcut_choice(choice_count); ++choice_count; - #else - add_dummy_choice(); - add_dummy_choice(); - add_dummy_choice(); - #endif } - #ifdef WIN3264 /* * Attempt to register OLE for Vim. */ --- 1995,2002 ---- *************** *** 2004,2019 **** printf("\n--- Attempting to register Vim with OLE ---\n"); printf("(There is no message whether this works or not.)\n"); - #ifndef __CYGWIN__ sprintf(register_command_string, "\"%s\\gvim.exe\" -silent -register", installdir); - #else - /* handle this differently for Cygwin which sometimes has trouble with - * Windows-style pathnames here. */ - sprintf(register_command_string, "./gvim.exe -silent -register"); - #endif system(register_command_string); } - #endif /* WIN3264 */ /* * Remove the last part of directory "path[]" to get its parent, and put the --- 2008,2016 ---- *************** *** 2212,2230 **** printf(" Install the Edit-with-Vim context menu entry\n"); printf("-install-openwith\n"); printf(" Add Vim to the \"Open With...\" context menu list\n"); - #ifdef WIN3264 printf("-add-start-menu"); printf(" Add Vim to the start menu\n"); printf("-install-icons"); printf(" Create icons for gVim executables on the desktop\n"); - #endif printf("-create-directories [vim|home]\n"); printf(" Create runtime directories to drop plugins into; in the $VIM\n"); printf(" or $HOME directory\n"); - #ifdef WIN3264 printf("-register-OLE"); printf(" Ignored\n"); - #endif printf("\n"); } --- 2209,2223 ---- *************** *** 2308,2319 **** else /* No choice specified, default to vim directory */ vimfiles_dir_choice = (int)vimfiles_dir_vim; } - #ifdef WIN3264 else if (strcmp(argv[i], "-register-OLE") == 0) { /* This is always done when gvim is found */ } - #endif else /* Unknown switch */ { printf("Got unknown argument argv[%d] = %s\n", i, argv[i]); --- 2301,2310 ---- *************** *** 2471,2481 **** || !interactive) install_registry(); - #ifdef WIN3264 /* Register gvim with OLE. */ if (has_gvim) install_OLE_register(); - #endif } /* --- 2462,2470 ---- *************** *** 2511,2517 **** /* Initialize this program. */ do_inits(argv); - #ifdef WIN3264 if (argc > 1 && strcmp(argv[1], "-uninstall-check") == 0) { /* Only check for already installed Vims. Used by NSIS installer. */ --- 2500,2505 ---- *************** *** 2527,2533 **** sleep(3); exit(0); } - #endif printf("This program sets up the installation of Vim " VIM_VERSION_MEDIUM "\n\n"); --- 2515,2520 ---- *************** *** 2535,2545 **** /* Check if the user unpacked the archives properly. */ check_unpack(); - #ifdef WIN3264 /* Check for already installed Vims. */ if (interactive) uninstall_check(0); - #endif /* Find out information about the system. */ inspect_system(); --- 2522,2530 ---- *** ../vim-8.0.1190/src/dosinst.h 2016-08-29 22:42:20.000000000 +0200 --- src/dosinst.h 2017-10-14 17:17:35.232769647 +0200 *************** *** 26,44 **** # include "vimio.h" # include ! # ifndef __CYGWIN__ ! # include ! # endif ! # if defined(_WIN64) || defined(WIN32) ! # define WIN3264 ! # include ! # include ! # else ! # include ! # include ! # include ! # endif #endif #ifdef UNIX_LINT --- 26,35 ---- # include "vimio.h" # include ! # include ! # include ! # include #endif #ifdef UNIX_LINT *************** *** 56,62 **** #if defined(UNIX_LINT) # define vim_mkdir(x, y) mkdir((char *)(x), y) #else ! # if defined(WIN3264) && !defined(__BORLANDC__) # define vim_mkdir(x, y) _mkdir((char *)(x)) # else # define vim_mkdir(x, y) mkdir((char *)(x)) --- 47,53 ---- #if defined(UNIX_LINT) # define vim_mkdir(x, y) mkdir((char *)(x), y) #else ! # ifndef __BORLANDC__ # define vim_mkdir(x, y) _mkdir((char *)(x)) # else # define vim_mkdir(x, y) mkdir((char *)(x)) *************** *** 88,93 **** --- 79,87 ---- # ifndef KEY_WOW64_64KEY # define KEY_WOW64_64KEY 0x0100 # endif + # ifndef KEY_WOW64_32KEY + # define KEY_WOW64_32KEY 0x0200 + # endif #define VIM_STARTMENU "Programs\\Vim " VIM_VERSION_SHORT *************** *** 134,173 **** exit(n); } - #ifdef WIN3264 - /* This symbol is not defined in older versions of the SDK or Visual C++ */ - - #ifndef VER_PLATFORM_WIN32_WINDOWS - # define VER_PLATFORM_WIN32_WINDOWS 1 - #endif - - static DWORD g_PlatformId; /* ! * Set g_PlatformId to VER_PLATFORM_WIN32_NT (NT) or ! * VER_PLATFORM_WIN32_WINDOWS (Win95). */ ! static void ! PlatformId(void) { ! static int done = FALSE; ! ! if (!done) ! { ! OSVERSIONINFO ovi; ! ! ovi.dwOSVersionInfoSize = sizeof(ovi); ! GetVersionEx(&ovi); ! g_PlatformId = ovi.dwPlatformId; ! done = TRUE; ! } } ! # ifdef __BORLANDC__ /* Borland defines its own searchpath() in dir.h */ ! # include ! # else static char * searchpath(char *name) { --- 128,159 ---- exit(n); } + typedef BOOL (WINAPI *LPFN_ISWOW64PROCESS)(HANDLE, PBOOL); /* ! * Check if this is a 64-bit OS. */ ! static BOOL ! is_64bit_os(void) { ! #ifdef _WIN64 ! return TRUE; ! #else ! BOOL bIsWow64 = FALSE; ! LPFN_ISWOW64PROCESS pIsWow64Process; ! pIsWow64Process = (LPFN_ISWOW64PROCESS)GetProcAddress( ! GetModuleHandle("kernel32"), "IsWow64Process"); ! if (pIsWow64Process != NULL) ! pIsWow64Process(GetCurrentProcess(), &bIsWow64); ! return bIsWow64; ! #endif } ! #ifdef __BORLANDC__ /* Borland defines its own searchpath() in dir.h */ ! # include ! #else static char * searchpath(char *name) { *************** *** 176,203 **** /* There appears to be a bug in FindExecutableA() on Windows NT. * Use FindExecutableW() instead... */ ! PlatformId(); ! if (g_PlatformId == VER_PLATFORM_WIN32_NT) ! { ! MultiByteToWideChar(CP_ACP, 0, (LPCTSTR)name, -1, ! (LPWSTR)widename, BUFSIZE); ! if (FindExecutableW((LPCWSTR)widename, (LPCWSTR)"", ! (LPWSTR)location) > (HINSTANCE)32) ! { ! WideCharToMultiByte(CP_ACP, 0, (LPWSTR)location, -1, ! (LPSTR)widename, 2 * BUFSIZE, NULL, NULL); ! return widename; ! } ! } ! else ! { ! if (FindExecutableA((LPCTSTR)name, (LPCTSTR)"", ! (LPTSTR)location) > (HINSTANCE)32) ! return location; } return NULL; } - # endif #endif /* --- 162,178 ---- /* There appears to be a bug in FindExecutableA() on Windows NT. * Use FindExecutableW() instead... */ ! MultiByteToWideChar(CP_ACP, 0, (LPCTSTR)name, -1, ! (LPWSTR)widename, BUFSIZE); ! if (FindExecutableW((LPCWSTR)widename, (LPCWSTR)"", ! (LPWSTR)location) > (HINSTANCE)32) ! { ! WideCharToMultiByte(CP_ACP, 0, (LPWSTR)location, -1, ! (LPSTR)widename, 2 * BUFSIZE, NULL, NULL); ! return widename; } return NULL; } #endif /* *************** *** 217,223 **** return s; } - #ifdef WIN3264 #ifndef CSIDL_COMMON_PROGRAMS # define CSIDL_COMMON_PROGRAMS 0x0017 --- 192,197 ---- *************** *** 355,361 **** return OK; } - #endif /* * List of targets. The first one (index zero) is used for the default path --- 329,334 ---- *************** *** 406,415 **** "gVim Easy " VIM_VERSION_SHORT ".lnk", "gVim Read only " VIM_VERSION_SHORT ".lnk"}; ! /* This is only used for dosinst.c when WIN3264 is defined and for uninstal.c ! * when not being able to directly access registry entries. */ ! #if (defined(DOSINST) && defined(WIN3264)) \ ! || (!defined(DOSINST) && !defined(WIN3264)) /* * Run an external command and wait for it to finish. */ --- 379,386 ---- "gVim Easy " VIM_VERSION_SHORT ".lnk", "gVim Read only " VIM_VERSION_SHORT ".lnk"}; ! /* This is only used for dosinst.c. */ ! #if defined(DOSINST) /* * Run an external command and wait for it to finish. */ *************** *** 464,487 **** int change_drive(int drive) { - #ifdef WIN3264 char temp[3] = "-:"; temp[0] = (char)(drive + 'A' - 1); return !SetCurrentDirectory(temp); - #else - # ifndef UNIX_LINT - union REGS regs; - - regs.h.ah = 0x0e; - regs.h.dl = drive - 1; - intdos(®s, ®s); /* set default drive */ - regs.h.ah = 0x19; - intdos(®s, ®s); /* get default drive */ - if (regs.h.al == drive - 1) - return 0; - # endif - return -1; - #endif } /* --- 435,443 ---- *************** *** 507,513 **** /* * Expand the executable name into a full path name. */ ! #if defined(__BORLANDC__) && !defined(WIN3264) /* Only Borland C++ has this. */ # define my_fullpath(b, n, l) _fullpath(b, n, l) --- 463,469 ---- /* * Expand the executable name into a full path name. */ ! #if defined(__BORLANDC__) /* Only Borland C++ has this. */ # define my_fullpath(b, n, l) _fullpath(b, n, l) *************** *** 516,607 **** static char * my_fullpath(char *buf, char *fname, int len) { - # ifdef WIN3264 /* Only GetModuleFileName() will get the long file name path. * GetFullPathName() may still use the short (FAT) name. */ DWORD len_read = GetModuleFileName(NULL, buf, (size_t)len); return (len_read > 0 && len_read < (DWORD)len) ? buf : NULL; - # else - char olddir[BUFSIZE]; - char *p, *q; - int c; - char *retval = buf; - - if (strchr(fname, ':') != NULL) /* already expanded */ - { - strncpy(buf, fname, len); - } - else - { - *buf = NUL; - /* - * change to the directory for a moment, - * and then do the getwd() (and get back to where we were). - * This will get the correct path name with "../" things. - */ - p = strrchr(fname, '/'); - q = strrchr(fname, '\\'); - if (q != NULL && (p == NULL || q > p)) - p = q; - q = strrchr(fname, ':'); - if (q != NULL && (p == NULL || q > p)) - p = q; - if (p != NULL) - { - if (getcwd(olddir, BUFSIZE) == NULL) - { - p = NULL; /* can't get current dir: don't chdir */ - retval = NULL; - } - else - { - if (p == fname) /* /fname */ - q = p + 1; /* -> / */ - else if (q + 1 == p) /* ... c:\foo */ - q = p + 1; /* -> c:\ */ - else /* but c:\foo\bar */ - q = p; /* -> c:\foo */ - - c = *q; /* truncate at start of fname */ - *q = NUL; - if (mch_chdir(fname)) /* change to the directory */ - retval = NULL; - else - { - fname = q; - if (c == '\\') /* if we cut the name at a */ - fname++; /* '\', don't add it again */ - } - *q = c; - } - } - if (getcwd(buf, len) == NULL) - { - retval = NULL; - *buf = NUL; - } - /* - * Concatenate the file name to the path. - */ - if (strlen(buf) + strlen(fname) >= len - 1) - { - printf("ERROR: File name too long!\n"); - myexit(1); - } - add_pathsep(buf); - strcat(buf, fname); - if (p) - mch_chdir(olddir); - } - - /* Replace forward slashes with backslashes, required for the path to a - * command. */ - while ((p = strchr(buf, '/')) != NULL) - *p = '\\'; - - return retval; - # endif } #endif --- 472,482 ---- *** ../vim-8.0.1190/src/uninstal.c 2016-08-29 22:42:20.000000000 +0200 --- src/uninstal.c 2017-10-14 17:17:35.232769647 +0200 *************** *** 32,41 **** return (scanf(" %c", answer) == 1 && toupper(answer[0]) == 'Y'); } - #ifdef WIN3264 - static int ! reg_delete_key(HKEY hRootKey, const char *key) { static int did_load = FALSE; static HANDLE advapi_lib = NULL; --- 32,39 ---- return (scanf(" %c", answer) == 1 && toupper(answer[0]) == 'Y'); } static int ! reg_delete_key(HKEY hRootKey, const char *key, DWORD flag) { static int did_load = FALSE; static HANDLE advapi_lib = NULL; *************** *** 52,58 **** delete_key_ex = (LONG (WINAPI *)(HKEY, LPCTSTR, REGSAM, DWORD))GetProcAddress(advapi_lib, "RegDeleteKeyExA"); } if (delete_key_ex != NULL) { ! return (*delete_key_ex)(hRootKey, key, KEY_WOW64_64KEY, 0); } return RegDeleteKey(hRootKey, key); } --- 50,56 ---- delete_key_ex = (LONG (WINAPI *)(HKEY, LPCTSTR, REGSAM, DWORD))GetProcAddress(advapi_lib, "RegDeleteKeyExA"); } if (delete_key_ex != NULL) { ! return (*delete_key_ex)(hRootKey, key, flag, 0); } return RegDeleteKey(hRootKey, key); } *************** *** 72,78 **** /* Open the key where the path to gvim.exe is stored. */ if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, "Software\\Vim\\Gvim", 0, KEY_WOW64_64KEY | KEY_READ, &key_handle) != ERROR_SUCCESS) ! return 0; /* get the DisplayName out of it to show the user */ r = RegQueryValueEx(key_handle, "path", 0, --- 70,78 ---- /* Open the key where the path to gvim.exe is stored. */ if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, "Software\\Vim\\Gvim", 0, KEY_WOW64_64KEY | KEY_READ, &key_handle) != ERROR_SUCCESS) ! if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, "Software\\Vim\\Gvim", 0, ! KEY_WOW64_32KEY | KEY_READ, &key_handle) != ERROR_SUCCESS) ! return 0; /* get the DisplayName out of it to show the user */ r = RegQueryValueEx(key_handle, "path", 0, *************** *** 111,139 **** remove_popup(void) { int fail = 0; HKEY kh; ! if (reg_delete_key(HKEY_CLASSES_ROOT, "CLSID\\{51EEE242-AD87-11d3-9C1E-0090278BBD99}\\InProcServer32") != ERROR_SUCCESS) ! ++fail; ! if (reg_delete_key(HKEY_CLASSES_ROOT, "CLSID\\{51EEE242-AD87-11d3-9C1E-0090278BBD99}") != ERROR_SUCCESS) ! ++fail; ! if (reg_delete_key(HKEY_CLASSES_ROOT, "*\\shellex\\ContextMenuHandlers\\gvim") != ERROR_SUCCESS) ! ++fail; ! if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Windows\\CurrentVersion\\Shell Extensions\\Approved", 0, ! KEY_WOW64_64KEY | KEY_ALL_ACCESS, &kh) != ERROR_SUCCESS) ! ++fail; ! else { ! if (RegDeleteValue(kh, "{51EEE242-AD87-11d3-9C1E-0090278BBD99}") != ERROR_SUCCESS) ++fail; - RegCloseKey(kh); } - if (reg_delete_key(HKEY_LOCAL_MACHINE, "Software\\Vim\\Gvim") != ERROR_SUCCESS) - ++fail; - if (reg_delete_key(HKEY_LOCAL_MACHINE, "Software\\Vim") != ERROR_SUCCESS) - ++fail; ! if (fail == 6) printf("No Vim popup registry entries could be removed\n"); else if (fail > 0) printf("Some Vim popup registry entries could not be removed\n"); --- 111,151 ---- remove_popup(void) { int fail = 0; + int i; + int loop = is_64bit_os() ? 2 : 1; + int maxfail = loop * 6; + DWORD flag; HKEY kh; ! for (i = 0; i < loop; i++) { ! if (i == 0) ! flag = KEY_WOW64_32KEY; ! else ! flag = KEY_WOW64_64KEY; ! ! if (reg_delete_key(HKEY_CLASSES_ROOT, "CLSID\\{51EEE242-AD87-11d3-9C1E-0090278BBD99}\\InProcServer32", flag) != ERROR_SUCCESS) ! ++fail; ! if (reg_delete_key(HKEY_CLASSES_ROOT, "CLSID\\{51EEE242-AD87-11d3-9C1E-0090278BBD99}", flag) != ERROR_SUCCESS) ! ++fail; ! if (reg_delete_key(HKEY_CLASSES_ROOT, "*\\shellex\\ContextMenuHandlers\\gvim", flag) != ERROR_SUCCESS) ! ++fail; ! if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Windows\\CurrentVersion\\Shell Extensions\\Approved", 0, ! flag | KEY_ALL_ACCESS, &kh) != ERROR_SUCCESS) ! ++fail; ! else ! { ! if (RegDeleteValue(kh, "{51EEE242-AD87-11d3-9C1E-0090278BBD99}") != ERROR_SUCCESS) ! ++fail; ! RegCloseKey(kh); ! } ! if (reg_delete_key(HKEY_LOCAL_MACHINE, "Software\\Vim\\Gvim", flag) != ERROR_SUCCESS) ! ++fail; ! if (reg_delete_key(HKEY_LOCAL_MACHINE, "Software\\Vim", flag) != ERROR_SUCCESS) ++fail; } ! if (fail == maxfail) printf("No Vim popup registry entries could be removed\n"); else if (fail > 0) printf("Some Vim popup registry entries could not be removed\n"); *************** *** 145,174 **** remove_openwith(void) { int fail = 0; ! if (reg_delete_key(HKEY_CLASSES_ROOT, "Applications\\gvim.exe\\shell\\edit\\command") != ERROR_SUCCESS) ! ++fail; ! if (reg_delete_key(HKEY_CLASSES_ROOT, "Applications\\gvim.exe\\shell\\edit") != ERROR_SUCCESS) ! ++fail; ! if (reg_delete_key(HKEY_CLASSES_ROOT, "Applications\\gvim.exe\\shell") != ERROR_SUCCESS) ! ++fail; ! if (reg_delete_key(HKEY_CLASSES_ROOT, "Applications\\gvim.exe") != ERROR_SUCCESS) ! ++fail; ! if (reg_delete_key(HKEY_CLASSES_ROOT, ".htm\\OpenWithList\\gvim.exe") != ERROR_SUCCESS) ! ++fail; ! if (reg_delete_key(HKEY_CLASSES_ROOT, ".vim\\OpenWithList\\gvim.exe") != ERROR_SUCCESS) ! ++fail; ! if (reg_delete_key(HKEY_CLASSES_ROOT, "*\\OpenWithList\\gvim.exe") != ERROR_SUCCESS) ! ++fail; ! if (fail == 7) printf("No Vim open-with registry entries could be removed\n"); else if (fail > 0) printf("Some Vim open-with registry entries could not be removed\n"); else printf("The Vim open-with registry entries have been removed\n"); } - #endif /* * Check if a batch file is really for the current version. Don't delete a --- 157,197 ---- remove_openwith(void) { int fail = 0; + int i; + int loop = is_64bit_os() ? 2 : 1; + int maxfail = loop * 7; + DWORD flag; + + for (i = 0; i < loop; i++) + { + if (i == 0) + flag = KEY_WOW64_32KEY; + else + flag = KEY_WOW64_64KEY; ! if (reg_delete_key(HKEY_CLASSES_ROOT, "Applications\\gvim.exe\\shell\\edit\\command", flag) != ERROR_SUCCESS) ! ++fail; ! if (reg_delete_key(HKEY_CLASSES_ROOT, "Applications\\gvim.exe\\shell\\edit", flag) != ERROR_SUCCESS) ! ++fail; ! if (reg_delete_key(HKEY_CLASSES_ROOT, "Applications\\gvim.exe\\shell", flag) != ERROR_SUCCESS) ! ++fail; ! if (reg_delete_key(HKEY_CLASSES_ROOT, "Applications\\gvim.exe", flag) != ERROR_SUCCESS) ! ++fail; ! if (reg_delete_key(HKEY_CLASSES_ROOT, ".htm\\OpenWithList\\gvim.exe", flag) != ERROR_SUCCESS) ! ++fail; ! if (reg_delete_key(HKEY_CLASSES_ROOT, ".vim\\OpenWithList\\gvim.exe", flag) != ERROR_SUCCESS) ! ++fail; ! if (reg_delete_key(HKEY_CLASSES_ROOT, "*\\OpenWithList\\gvim.exe", flag) != ERROR_SUCCESS) ! ++fail; ! } ! if (fail == maxfail) printf("No Vim open-with registry entries could be removed\n"); else if (fail > 0) printf("Some Vim open-with registry entries could not be removed\n"); else printf("The Vim open-with registry entries have been removed\n"); } /* * Check if a batch file is really for the current version. Don't delete a *************** *** 231,237 **** return found; } - #ifdef WIN3264 static void remove_if_exists(char *path, char *filename) { --- 254,259 ---- *************** *** 284,295 **** } } } - #endif static void delete_uninstall_key(void) { ! reg_delete_key(HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Vim " VIM_VERSION_SHORT); } int --- 306,316 ---- } } } static void delete_uninstall_key(void) { ! reg_delete_key(HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Vim " VIM_VERSION_SHORT, KEY_WOW64_64KEY); } int *************** *** 297,303 **** { int found = 0; FILE *fd; - #ifdef WIN3264 int i; struct stat st; char icon[BUFSIZE]; --- 318,323 ---- *************** *** 308,314 **** if (argc == 2 && stricmp(argv[1], "-nsis") == 0) interactive = FALSE; else - #endif interactive = TRUE; /* Initialize this program. */ --- 328,333 ---- *************** *** 316,322 **** printf("This program will remove the following items:\n"); - #ifdef WIN3264 if (popup_gvim_path(popup_path)) { printf(" - the \"Edit with Vim\" entry in the popup menu\n"); --- 335,340 ---- *************** *** 370,376 **** if (!interactive || confirm()) remove_start_menu(); } - #endif printf("\n"); found = remove_batfiles(0); --- 388,393 ---- *** ../vim-8.0.1190/Makefile 2017-10-08 17:56:52.223266888 +0200 --- Makefile 2017-10-14 18:41:36.494327869 +0200 *************** *** 120,129 **** # # MS-Windows: # - Run make on Unix to update the ".mo" files. ! # - Get libintl-8.dll, libiconv-2.dll and libgcc_s_sjlj-1.dll. E.g. from # https://mlocati.github.io/gettext-iconv-windows/ . # Use the "shared-32.zip file and extract the archive to get the files. ! # Put them in the top directory, "make dosrt" uses them. # - > make dossrc # > make dosrt # Unpack dist/vim##rt.zip and dist/vim##src.zip on an MS-Windows PC. --- 120,133 ---- # # MS-Windows: # - Run make on Unix to update the ".mo" files. ! # - Get 32 bit libintl-8.dll, libiconv-2.dll and libgcc_s_sjlj-1.dll. E.g. from # https://mlocati.github.io/gettext-iconv-windows/ . # Use the "shared-32.zip file and extract the archive to get the files. ! # Put them in the gettext32 directory, "make dosrt" uses them. ! # - Get 64 bit libintl-8.dll and libiconv-2.dll. E.g. from ! # https://mlocati.github.io/gettext-iconv-windows/ . ! # Use the "shared-64.zip file and extract the archive to get the files. ! # Put them in the gettext64 directory, "make dosrt" uses them. # - > make dossrc # > make dosrt # Unpack dist/vim##rt.zip and dist/vim##src.zip on an MS-Windows PC. *************** *** 461,469 **** cp $$i dist/vim/$(VIMRTDIR)/lang/$$n/LC_MESSAGES/vim.mo; \ fi \ done ! cp libintl-8.dll dist/vim/$(VIMRTDIR)/ ! cp libiconv-2.dll dist/vim/$(VIMRTDIR)/ ! cp libgcc_s_sjlj-1.dll dist/vim/$(VIMRTDIR)/ # Used before uploading. Don't delete the AAPDIR/sign files! --- 465,477 ---- cp $$i dist/vim/$(VIMRTDIR)/lang/$$n/LC_MESSAGES/vim.mo; \ fi \ done ! mkdir dist/vim/$(VIMRTDIR)/gettext32 ! cp gettext32/libintl-8.dll dist/vim/$(VIMRTDIR)/gettext32/ ! cp gettext32/libiconv-2.dll dist/vim/$(VIMRTDIR)/gettext32/ ! cp gettext32/libgcc_s_sjlj-1.dll dist/vim/$(VIMRTDIR)/gettext32/ ! mkdir dist/vim/$(VIMRTDIR)/gettext64 ! cp gettext64/libintl-8.dll dist/vim/$(VIMRTDIR)/gettext64/ ! cp gettext64/libiconv-2.dll dist/vim/$(VIMRTDIR)/gettext64/ # Used before uploading. Don't delete the AAPDIR/sign files! *************** *** 490,496 **** cp vimrun.exe dist/vim/$(VIMRTDIR)/vimrun.exe cp installw32.exe dist/vim/$(VIMRTDIR)/install.exe cp uninstalw32.exe dist/vim/$(VIMRTDIR)/uninstal.exe ! cp gvimext.dll dist/vim/$(VIMRTDIR)/gvimext.dll cd dist && zip -9 -rD -z gvim$(VERSION).zip vim <$(COMMENT_GVIM) cp gvim.pdb dist/gvim$(VERSION).pdb --- 498,507 ---- cp vimrun.exe dist/vim/$(VIMRTDIR)/vimrun.exe cp installw32.exe dist/vim/$(VIMRTDIR)/install.exe cp uninstalw32.exe dist/vim/$(VIMRTDIR)/uninstal.exe ! mkdir dist/vim/$(VIMRTDIR)/GvimExt32 ! cp gvimext.dll dist/vim/$(VIMRTDIR)/GvimExt32/gvimext.dll ! mkdir dist/vim/$(VIMRTDIR)/GvimExt64 ! cp gvimext64.dll dist/vim/$(VIMRTDIR)/GvimExt64/gvimext.dll cd dist && zip -9 -rD -z gvim$(VERSION).zip vim <$(COMMENT_GVIM) cp gvim.pdb dist/gvim$(VERSION).pdb *** ../vim-8.0.1190/src/version.c 2017-10-14 16:06:16.094677647 +0200 --- src/version.c 2017-10-14 17:18:14.152497376 +0200 *************** *** 763,764 **** --- 763,766 ---- { /* Add new patch number below this line */ + /**/ + 1191, /**/ -- You got to work at a mill? Lucky! I got sent back to work in the acid-mines for my daily crust of stale bread... which not even the birds would eat. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///