8000 Edit with Vim doesn't work on win64 · Issue #1 · k-takata/vim-win32-installer · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Edit with Vim doesn't work on win64 #1

Closed
12425 opened this issue Sep 13, 2016 · 11 comments
Closed

Edit with Vim doesn't work on win64 #1

12425 opened this issue Sep 13, 2016 · 11 comments

Comments

@12425
Copy link
12425 commented Sep 13, 2016

Recently I updated Vim 8 and found that after I installed gVim, I can't see "Edit with Vim" in context menu.
I found the cause is now we have both gvimext.dll and gvimext64.dll, but in regedit, we registered the former, which doesn't work on my win64.
I ran the following registry file and now it works.

Could you help to check the system before applying the proper dll?

[HKEY_CLASSES_ROOT\CLSID\{51EEE242-AD87-11d3-9C1E-0090278BBD99}\InProcServer32]
   @="D:\\Programs\\Vim\\vim80\\GvimExt\\gvimext64.dll"
   "ThreadingModel"="Apartment"
├─GvimExt
│      gvimext.dll
│      gvimext.inf
│      GvimExt.reg
│      gvimext64.dll
│      README.txt
@k-takata
Copy link
Owner

Did you install from the zip archive?
If you use the self-installer exe, the installer will rename the right version of dll to gvimext.dll.
Maybe we should add instruction for manual install on win64.

@12425
Copy link
Author
12425 commented Sep 14, 2016

@k-takata Yes, I extracted all the content in the zip archive and ran install.exe.

@chrisbra
Copy link
Contributor

perhaps, we shouldn't distribute gvimext.dll and gvimext64.dll separately, but only build it once? Something like this patch:

diff --git a/appveyor.bat b/appveyor.bat
index 429a27d..17c1595 100755
--- a/appveyor.bat
+++ b/appveyor.bat
@@ -199,9 +199,11 @@ goto :eof
 cd vim\src

 :: Build both 64- and 32-bit versions of gvimext.dll for the installer
-start /wait cmd /c "setenv /x64 && cd GvimExt && nmake clean all"
-move GvimExt\gvimext.dll GvimExt\gvimext64.dll
-start /wait cmd /c "setenv /x86 && cd GvimExt && nmake clean all"
+if /i "%ARCH%"=="x64" (
+  start /wait cmd /c "setenv /x64 && cd GvimExt && nmake clean all"
+) else (
+  start /wait cmd /c "setenv /x86 && cd GvimExt && nmake clean all"
+)
 :: Create zip packages
 7z a ..\..\gvim_%APPVEYOR_REPO_TAG_NAME:v=%_%ARCH%_pdb.zip *.pdb
 copy /Y ..\README.txt ..\runtime

@k-takata
Copy link
Owner

But when we create an installer package, we must build both gvimext.dll and gvimext64.dll.
Because the installer selects appropriate DLL (depends on OS bitness) and rename it to gvimext.dll.

Another thing we need to care about is the following item in the todo list:

Windows installer should install 32-bit version of right-click handler also on
64-bit systems. (Brian Cunningham, 2011 Dec 28)

Maybe we need to extend dosinst.c.

@chrisbra
Copy link
Contributor

Hm, then perhaps we need a registry file for 64bit and 32bit windows and have the installer
select the correct .reg file then?

Windows installer should install 32-bit version of right-click handler also on
64-bit systems. (Brian Cunningham, 2011 Dec 28)

Isn't that what is currently done and causes this bug?

@k-takata
Copy link
Owner

Hm, then perhaps we need a registry file for 64bit and 32bit windows and have the installer
select the correct .reg file then?

In my understanding, the install.exe (and also the self-installer) doesn't use GvimExt.reg. GvimExt.reg can be used when a user want to register the right-click handler manually (without using install.exe).

Isn't that what is currently done and causes this bug?

In this case, only the 32-bit version of handler is going to be installed, but not sure the 32-bit version is installed correctly.
If the 32-bit version is installed correctly, 32-bit applications (e.g. some kind of commander application) can show the right-click menu with the "Edit with Vim" item on 64-bit OS.

@k-takata
Copy link
Owner
k-takata commented Sep 16, 2016

FYI, there is another bug related to gvimext.dll.
When the 32-bit version of Vim is installed on a 64-bit OS using the self-installer, the menu item "Edit with Vim" is not localized.
This is because the 64-bit version of gvimext.dll is installed on a 64-bit OS, but 64-bit version of libintl.dll and libiconv.dll are not installed.

Maybe we need a directory structure like this:

vim80\
  gvim.exe       (32-bit or 64-bit, depends on the zip package or the self-installer)
  vim.exe        (same as above)
  libiconv-2.dll (same as above)
  libintl-8.dll  (same as above)
  libwinpthread-1.dll (64-bit only)

  GvimExt32\
    gvimext.dll    (32-bit)
    libiconv-2.dll (32-bit)
    libintl-8.dll  (32-bit)

  GvimExt64\       (No need to install on a 32-bit OS)
    gvimext.dll    (64-bit)
    libiconv-2.dll (64-bit)
    libintl-8.dll  (64-bit)
    libwinpthread-1.dll (64-bit)

@k-takata
Copy link
Owner

Now I'm working on this at the gvimext3264 branch.
The directory structure is now:

vim80\
  gvim.exe       (32-bit or 64-bit, depends on the zip package or the self-installer)
  vim.exe        (same as above)
  libiconv-2.dll (same as above)
  libintl-8.dll  (same as above)
  libgcc_s_sjlj-1.dll (32-bit only)

  GvimExt32\
    gvimext.dll    (32-bit)
    libiconv-2.dll (32-bit)
    libintl-8.dll  (32-bit)
    libgcc_s_sjlj-1.dll (32-bit)
    gvimext.inf    (zip packages only)
    GvimExt.reg    (zip packages only)
    README.txt     (zip packages only)

  GvimExt64\       (No need to install on a 32-bit OS)
    gvimext.dll    (64-bit)
    libiconv-2.dll (64-bit)
    libintl-8.dll  (64-bit)
    gvimext.inf    (zip packages only)
    GvimExt.reg    (zip packages only)
    README.txt     (zip packages only)

Either using self-installer or running installer.exe manually should work fine.
On a 64-bit OS, both 32- and 64-bit gvimext will be installed.

@k-takata
Copy link
Owner

32-bit version of zip package and self-installer are available at:
https://ci.appveyor.com/project/k-takata/vim-win32-installer/build/job/aecwp7cho9lbt4i9/artifacts

@k-takata
Copy link
Owner

Created an issue on official repository: vim/vim#2144

@k-takata
Copy link
Owner

Fixed by v8.0.1191.
The updated installer and zip packages are not available yet, though.
v8.0.1194 has a problem: https://groups.google.com/d/msg/vim_dev/DlG2juKqfIE/qzjB4OjZAgAJ

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
0