-
-
Notifications
You must be signed in to change notification settings - Fork 6k
win32: Reimplementation of VIMDLL #4287
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
Conversation
Currently only supports MSVC.
If you build with `nmake -f Make_mvc.mak VIMDLL=yes`, vim{32,64}.dll
will be built and also small gvim.exe and vim.exe will be built.
The shared codes between GUI and CUI are all built into the DLL.
So the total size of the distribution files can be reduced.
TODO:
* Update "make clean".
* Fix terminal behavior on vim.exe.
* Fix shell behavior on vim.exe.
* Check all `FEAT_GUI_MSWIN` definitions.
* Check all `ALWAYS_USE_GUI` definitions.
* Support MinGW.
* Fix version string. * Enable VTP on console version. * Fix color of 'tgc'. * Fix backspace in terminal mode on console version.
TODO: Still red and blue are swapped when t_Co=256 and 'notgc' on vim.exe.
This was removed by v8.1.1109.
Update for 8.1.1131.
This reverts commit c7430f3.
This reverts commit dedd34d.
When using the terminal on vim.exe with `:set t_Co=16` (default), the colors are shown incorrectly. Red and blue are swapped. To reproduce: 1. Download `color16.bat` from [here](https://gist.github.com/k-takata/2d4f562bacf8bae6691973a540970117#file-color16-bat). 2. Execute `vim --clean`. 3. Type `:terminal`. 4. Execute `color16.bat` on the terminal. Color indices between the ANSI escape sequence and the Windows console (in 16-color mode) are different, so they should be adjusted. It seems that a condition was wrong. This fixes it.
Drop "-DFEAT_GUI_MSWIN" option from CFLAGS when creating os_w32exec.obj. Stop using both /D and /U options at the same time.
|
@brammool
|
|
@brammool
> > * Supports `vim -g` and the `:gui` commands.
> > If the commands are executed with the `-f` option, vim.exe will open a GUI
> > window directly. Otherwise, vim.exe will execute gvim.exe. `:gui` will
> > use `:mksession` to inherit the session to gvim.exe.
>
> Does this really work? Any variable values would be lost.
`:gui` with `:mksession` works almost fine. It inherits global status. But It is not perfect as you pointed out.
(On the other hand, `:gui -f` works perfect, because vim.exe itself opens the window in the same process.)
If there are any unsaved files, `:gui` automatically falls back to `:gui -f`.
I rather not implement this, unless it works perfectly. Otherwise we
will keep getting bug reports around this.
Ideally this works the same way as it does on Unix. But I suppose
bringing back the command prompt won't be possible, since Windows
doesn't have a way to detach, other than starting a GUI program.
…--
Apologies for taking up the bandwidth with the apology. Anything else I
can apologise for ...... er no can't think of anything, sorry about that.
Andy Hunt (Member of British Olympic Apology Squad)
/// Bram Moolenaar -- [email protected] -- 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 ///
|
Yes, unix shell can use Ctrl-Z and I think that |
Add the EXPERIMENTAL_GUI_CMD definition instead.
|
I disabled the |
|
Thanks. So now we mainly save space and the installer will get a lot smaller. |
Move the common part of the resources from the exes to the dll. * icon files (except the main icon) * bmp files * print status dialog Adjust the handling of HINSTANCE for that. Move SaveInst() from gui_w32.c to os_mswin.c and change s_hinst to g_hinst. Call SaveInst() from DllMain(). Update the dependencies of the resource files in the makefiles. Embed the manifest to the resource also for vim.exe so that the print dialog will be shown in XP style. Notes: It might be better to separate the resource file for gvim.exe and vim.exe, because currently "OriginalFilename" in the version resource is set to "VIM.EXE". The print dialogs are different between gvim.exe and vim.exe. Is it intentional?
Separate the resource file for gvim.exe and vim.exe.
Make the definition of RCFLAGS similar to Make_cyg_ming.mak.
Set the gui.starting flag before checking sever options. Check the subsystem of the current executable file for that.
Don't drop the gui.starting flag.
|
I had a report that "gvim --serverlist" didn't work, so I fixed it. I think this is ready to be included. If there are still some problems, they can be fixed one by one. |
Problem: Code for viminfo support is spread out. Solution: Move to code to viminfo.c. (Yegappan Lakshmanan, closes vim/vim#4686) vim/vim@defa067 N/A patches for version.c: vim-patch:8.1.1230: a lot of code is shared between vim.exe and gvim.exe Problem: A lot of code is shared between vim.exe and gvim.exe. Solution: Optionally put the shared code in vim.dll. (Ken Takata, closes vim/vim#4287) vim/vim@afde13b vim-patch:8.2.2247: VMS: various smaller problems Problem: VMS: various smaller problems. Solution: Fix VMS building and other problems. (Zoltan Arpadffy) vim/vim@467676d
The VIMDLL support was removed at 8.1.1066.
I reimplemented it on MSVC and MinGW.
The differences from the old implementation are:
If you build with
nmake -f Make_mvc.mak VIMDLL=yes, vim{32,64}.dllwill be built and also stub gvim.exe and vim.exe will be built.
The shared codes between GUI and CUI are all built into the DLL.
So the total size of the distribution files can be reduced.
vim -gand the:guicommands.If the commands are executed with the
-foption, vim.exe will open a GUIwindow directly. Otherwise, vim.exe will execute gvim.exe.
:guiwilluse
:mksessionto inherit the session to gvim.exe.Related: #4171 (comment)