annotate src/GvimExt/README.txt @ 9403:9b048dced116 v7.4.1983

commit https://github.com/vim/vim/commit/75464dc434c43efac60e8bfd9bec2a8b736407e9 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Jul 2 20:27:50 2016 +0200 patch 7.4.1983 Problem: farsi.c and arabic.c are included in a strange way. Solution: Build them like other files.
author Christian Brabandt <cb@256bit.org>
date Sat, 02 Jul 2016 20:30:06 +0200
parents 30c4c1463b1a
children 9b6bfce90778
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
10
4e2284e71352 updated for version 7.0002
vimboss
parents:
diff changeset
1 README.txt for the gvimext DLL.
4e2284e71352 updated for version 7.0002
vimboss
parents:
diff changeset
2
4e2284e71352 updated for version 7.0002
vimboss
parents:
diff changeset
3 Written by Tianmiao Hu. Edited by Bram Moolenaar.
4e2284e71352 updated for version 7.0002
vimboss
parents:
diff changeset
4
4e2284e71352 updated for version 7.0002
vimboss
parents:
diff changeset
5
4e2284e71352 updated for version 7.0002
vimboss
parents:
diff changeset
6 INSTALLATION
4e2284e71352 updated for version 7.0002
vimboss
parents:
diff changeset
7
4e2284e71352 updated for version 7.0002
vimboss
parents:
diff changeset
8 To install the "Edit with Vim" popup menu entry, it is recommended to use the
4e2284e71352 updated for version 7.0002
vimboss
parents:
diff changeset
9 "install.exe" program. It will ask you a few questions and install the needed
4e2284e71352 updated for version 7.0002
vimboss
parents:
diff changeset
10 registry entries.
4e2284e71352 updated for version 7.0002
vimboss
parents:
diff changeset
11
4e2284e71352 updated for version 7.0002
vimboss
parents:
diff changeset
12 In special situations you might want to make changes by hand. Check these
4e2284e71352 updated for version 7.0002
vimboss
parents:
diff changeset
13 items:
4e2284e71352 updated for version 7.0002
vimboss
parents:
diff changeset
14 - The gvimext.dll, gvim.exe and uninstal.exe either need to be in the search
4e2284e71352 updated for version 7.0002
vimboss
parents:
diff changeset
15 path, or you have to set the full path in the registry entries. You could
4e2284e71352 updated for version 7.0002
vimboss
parents:
diff changeset
16 move the gvimext.dll to the "windows\system" or "windows\system32"
4e2284e71352 updated for version 7.0002
vimboss
parents:
diff changeset
17 directory, where the other DLL files are.
4e2284e71352 updated for version 7.0002
vimboss
parents:
diff changeset
18 - You can find the names of the used registry entries in the file
4e2284e71352 updated for version 7.0002
vimboss
parents:
diff changeset
19 "GvimExt.reg". You can edit this file to add the paths. To install the
4e2284e71352 updated for version 7.0002
vimboss
parents:
diff changeset
20 registry entries, right-click the gvimext.reg file and choose the "merge"
4e2284e71352 updated for version 7.0002
vimboss
parents:
diff changeset
21 menu option.
4e2284e71352 updated for version 7.0002
vimboss
parents:
diff changeset
22 - The registry key [HKEY_LOCAL_MACHINE\Software\Vim\Gvim] is used by the
4e2284e71352 updated for version 7.0002
vimboss
parents:
diff changeset
23 gvimext.dll. The value "path" specifies the location of "gvim.exe". If
4e2284e71352 updated for version 7.0002
vimboss
parents:
diff changeset
24 gvim.exe is in the search path, the path can be omitted. The value "lang"
4e2284e71352 updated for version 7.0002
vimboss
parents:
diff changeset
25 can be used to set the language, for example "de" for German. If "lang" is
4e2284e71352 updated for version 7.0002
vimboss
parents:
diff changeset
26 omitted, the language set for Windows will be used.
4e2284e71352 updated for version 7.0002
vimboss
parents:
diff changeset
27
4e2284e71352 updated for version 7.0002
vimboss
parents:
diff changeset
28 It is the preferred method to keep gvim.exe with the runtime files, so that
4e2284e71352 updated for version 7.0002
vimboss
parents:
diff changeset
29 Vim will find them (also the translated menu items are there).
4e2284e71352 updated for version 7.0002
vimboss
parents:
diff changeset
30
4e2284e71352 updated for version 7.0002
vimboss
parents:
diff changeset
31
4e2284e71352 updated for version 7.0002
vimboss
parents:
diff changeset
32 UNINSTALLATION
4e2284e71352 updated for version 7.0002
vimboss
parents:
diff changeset
33
4e2284e71352 updated for version 7.0002
vimboss
parents:
diff changeset
34 To uninstall the "Edit with Vim" popup menu entry, it is recommended to use
4e2284e71352 updated for version 7.0002
vimboss
parents:
diff changeset
35 the "uninstal.exe" program.
4e2284e71352 updated for version 7.0002
vimboss
parents:
diff changeset
36
4e2284e71352 updated for version 7.0002
vimboss
parents:
diff changeset
37 In special situations you might want to uninstall by hand:
4e2284e71352 updated for version 7.0002
vimboss
parents:
diff changeset
38 - Open the registry by running regedit.exe.
4e2284e71352 updated for version 7.0002
vimboss
parents:
diff changeset
39 - Delete all the keys listed in GvimExt.reg, except this one:
4e2284e71352 updated for version 7.0002
vimboss
parents:
diff changeset
40 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved]
4e2284e71352 updated for version 7.0002
vimboss
parents:
diff changeset
41 For this key, only delete one value:
4e2284e71352 updated for version 7.0002
vimboss
parents:
diff changeset
42 "{51EEE242-AD87-11d3-9C1E-0090278BBD99}"="Vim Shell Extension"
4e2284e71352 updated for version 7.0002
vimboss
parents:
diff changeset
43 - Delete the gvimext.dll, if you want. You might need to reboot the machine
4e2284e71352 updated for version 7.0002
vimboss
parents:
diff changeset
44 in order to remove this file. A quick way is to log off and re-login.
4e2284e71352 updated for version 7.0002
vimboss
parents:
diff changeset
45
4e2284e71352 updated for version 7.0002
vimboss
parents:
diff changeset
46 Another method is by using the uninst.bat script:
4e2284e71352 updated for version 7.0002
vimboss
parents:
diff changeset
47 uninst gvimext.inf
4e2284e71352 updated for version 7.0002
vimboss
parents:
diff changeset
48 This batch file will remove all the registry keys from the system. Then you
4e2284e71352 updated for version 7.0002
vimboss
parents:
diff changeset
49 can remove the gvimext.dll file.
4e2284e71352 updated for version 7.0002
vimboss
parents:
diff changeset
50 Note: In order for this batch file to work, you must have two system files:
4e2284e71352 updated for version 7.0002
vimboss
parents:
diff changeset
51 rundll32.exe and setupapi.dll. I believe you will have rundll32.exe in your
4e2284e71352 updated for version 7.0002
vimboss
parents:
diff changeset
52 system. I know windows nt 4.0 with the service pack 4 has setupapi.dll. My
4e2284e71352 updated for version 7.0002
vimboss
parents:
diff changeset
53 windows 95 has setupapi.dll. I find that the internet explorer 4.0 comes with
4e2284e71352 updated for version 7.0002
vimboss
parents:
diff changeset
54 the setupapi.dll in file Ie4_5.cab.
4e2284e71352 updated for version 7.0002
vimboss
parents:
diff changeset
55
4e2284e71352 updated for version 7.0002
vimboss
parents:
diff changeset
56 If you do encounter problems running this script, then probably you need to
4e2284e71352 updated for version 7.0002
vimboss
parents:
diff changeset
57 modify the uninst.bat to suit to your system. Basically, you must find out
4e2284e71352 updated for version 7.0002
vimboss
parents:
diff changeset
58 where are the locations for your rundll32.exe and setupapi.dll files. In
4e2284e71352 updated for version 7.0002
vimboss
parents:
diff changeset
59 windows nt, both files are under c:\winnt\system32 directory. In my windows 95
4e2284e71352 updated for version 7.0002
vimboss
parents:
diff changeset
60 system, I got setupapi.dll at c:\windows\system and rundll32.exe at
4e2284e71352 updated for version 7.0002
vimboss
parents:
diff changeset
61 c:\windows. So you might want to try something like:
4e2284e71352 updated for version 7.0002
vimboss
parents:
diff changeset
62 rundll32.exe c:\windows\system\setupapi.dll,InstallHinfSection DefaultUninstall 128 %1
1193
30c4c1463b1a updated for version 7.1b
vimboss
parents: 10
diff changeset
63 where %1 can be substituted by gvimext.inf
10
4e2284e71352 updated for version 7.0002
vimboss
parents:
diff changeset
64
4e2284e71352 updated for version 7.0002
vimboss
parents:
diff changeset
65
4e2284e71352 updated for version 7.0002
vimboss
parents:
diff changeset
66 THE SOURCE CODE
4e2284e71352 updated for version 7.0002
vimboss
parents:
diff changeset
67
4e2284e71352 updated for version 7.0002
vimboss
parents:
diff changeset
68 I have provided the source code here in hope that gvim users around world can
4e2284e71352 updated for version 7.0002
vimboss
parents:
diff changeset
69 further enhance this little dll. I believe the only thing you need to change
4e2284e71352 updated for version 7.0002
vimboss
parents:
diff changeset
70 is gvimext.cpp file. The important two functions you need to look at are
4e2284e71352 updated for version 7.0002
vimboss
parents:
diff changeset
71 QueryContextMenu and InvokeCommand. You can modify right-click menus in the
4e2284e71352 updated for version 7.0002
vimboss
parents:
diff changeset
72 QueryContextMenu function and invoke gvim in the InvokeCommand function. Note
4e2284e71352 updated for version 7.0002
vimboss
parents:
diff changeset
73 the selected files can be accessed from the DragQueryFile function. I am not
4e2284e71352 updated for version 7.0002
vimboss
parents:
diff changeset
74 familiar with the invoking options for gvim. I believe there are some
4e2284e71352 updated for version 7.0002
vimboss
parents:
diff changeset
75 improvements that can be made on that side.
4e2284e71352 updated for version 7.0002
vimboss
parents:
diff changeset
76
4e2284e71352 updated for version 7.0002
vimboss
parents:
diff changeset
77 I use MS Visual C++ 6.0's nmake to make the gvimext.dll. I don't have a
4e2284e71352 updated for version 7.0002
vimboss
parents:
diff changeset
78 chance to try earlier versions of MSVC. The files that are required for build
4e2284e71352 updated for version 7.0002
vimboss
parents:
diff changeset
79 are:
4e2284e71352 updated for version 7.0002
vimboss
parents:
diff changeset
80 gvimext.cpp
4e2284e71352 updated for version 7.0002
vimboss
parents:
diff changeset
81 gvimext.h
4e2284e71352 updated for version 7.0002
vimboss
parents:
diff changeset
82 gvimext.def
4e2284e71352 updated for version 7.0002
vimboss
parents:
diff changeset
83 gvimext.rc
4e2284e71352 updated for version 7.0002
vimboss
parents:
diff changeset
84 resource.h
4e2284e71352 updated for version 7.0002
vimboss
parents:
diff changeset
85 Makefile
4e2284e71352 updated for version 7.0002
vimboss
parents:
diff changeset
86
4e2284e71352 updated for version 7.0002
vimboss
parents:
diff changeset
87 To compile the DLL from the command line:
4e2284e71352 updated for version 7.0002
vimboss
parents:
diff changeset
88 vcvars32
4e2284e71352 updated for version 7.0002
vimboss
parents:
diff changeset
89 nmake -f Makefile
4e2284e71352 updated for version 7.0002
vimboss
parents:
diff changeset
90
4e2284e71352 updated for version 7.0002
vimboss
parents:
diff changeset
91 If you did something interesting to this dll, please let me know
4e2284e71352 updated for version 7.0002
vimboss
parents:
diff changeset
92 @ tianmiao@acm.org.
4e2284e71352 updated for version 7.0002
vimboss
parents:
diff changeset
93
4e2284e71352 updated for version 7.0002
vimboss
parents:
diff changeset
94 Happy vimming!!!