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