After the discussion in #3485, I have created a new NSIS installer.
The appearance is based on @gpwen's work and also uses MUI2, but the rest of the code is based on the original (non-MUI2) NSIS script and this still relies on dosinst.c. So we don't need to maintain duplicated codes.
The items I listed at #3485 (comment) are all implemented.
And also:
nsExec::Exec
is used instead of ExecWait
.)_vimrc
. (Key remap and mouse behavior.)You can download an installer from here:
https://ci.appveyor.com/project/k-takata/vim-win32-installer/build/job/jod0d3d3y9fvet3y/artifacts
(No need to care about the CI status. It's just failed to push the result to GitHub releases.)
https://github.com/vim/vim/pull/3501
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
Screen shots (Installer):
Choose components
If this is the first time installation:
If an older version of Vim has been already installed, another checkbox for uninstalling will be shown:
Installing
If an older version of Vim has been already installed, the uninstaller will be started before this. If it is uninstalled, then it will back to this screen.
Merging #3501 into master will decrease coverage by
0.03%
.
The diff coverage isn/a
.
@@ Coverage Diff @@ ## master #3501 +/- ## ========================================== - Coverage 77.13% 77.1% -0.04% ========================================== Files 99 99 Lines 138985 138985 ========================================== - Hits 107211 107166 -45 - Misses 31774 31819 +45
Impacted Files | Coverage Δ | |
---|---|---|
src/gui_beval.c | 55.02% <0%> (-6.99%) |
⬇️ |
src/gui_gtk_x11.c | 48.01% <0%> (-0.64%) |
⬇️ |
src/window.c | 83% <0%> (-0.52%) |
⬇️ |
src/if_xcmdsrv.c | 84.17% <0%> (-0.36%) |
⬇️ |
src/diff.c | 77.01% <0%> (-0.14%) |
⬇️ |
src/mbyte.c | 62.29% <0%> (-0.13%) |
⬇️ |
src/channel.c | 83.13% <0%> (-0.04%) |
⬇️ |
src/screen.c | 78.71% <0%> (-0.03%) |
⬇️ |
src/eval.c | 82.63% <0%> (+0.04%) |
⬆️ |
src/gui.c | 57.54% <0%> (+0.05%) |
⬆️ |
... and 2 more |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 6dff58f...92f8e62. Read the comment docs.
I suggest having the two "default" option in the same style.
Maybe delete the "default" part because if the radio button is selected as default then maybe not nessary to write default because its already selected as default.
Maybe change "mouse behaviour" to "mouse button behavior".
That way you can remove "button" from the following text and have it shorter.
"Right: context menu, left: visual mode"
Maybe delete the "default" part because if the radio button is selected as default then maybe not nessary to write default because its already selected as default.
I don't agree this. As I wrote above, the new installer remember the selection of a user. When the user execute the new installer next time, the selected button might not be the default setting.
@k-takata pushed 6 commits.
—
You are receiving this because you are subscribed to this thread.
Now translations are avaliable.
Also fixed some minor bugs.
You can download the updated installer from here:
https://github.com/k-takata/vim-win32-installer/releases/tag/v8.1.0443-newinstaller2
@k-takata pushed 3 commits.
—
You are receiving this because you are subscribed to this thread.
Cool 😸
If the key remapping is always going to be a 2 choice option would it not be better to have it as a check box with the text "Remap a few keys for Windows behavior..."?
Simpler, shorter, less text to read/understand.
If the key remapping is always going to be a 2 choice option would it not be better to have it as a check box with the text "Remap a few keys for Windows behavior..."?
That might be an option. Then we might be able to create another option to select sourcing defaults.vim
or vimrc_example.vim
. Currently, dosinst.c accepts the selection only when executed with the interactive mode. It doesn't have a command line option for that.
@brammool Thank you for adding this to the todo.txt:
Patch to simplify nsis installer. (Ken Takata, 2018 Sep 24, was #3479)
Now included in #3501, using MUI2.
Improve the installer for MS-Windows. There are a few alternatives:
- mui2 installer improved by Ken Takata (2018 Sep 29)
BTW, now I'm thinking to create the both types of installers in our vim-win32-installer nightly builds.
It can make casual users to try the new installer easily. (Of course, we should state that the installer is experimental.)
What do you think of this?
BTW, now I'm thinking to create the both types of installers in our vim-win32-installer nightly builds.
It can make casual users to try the new installer easily. (Of course, we should state that the installer is experimental.)
What do you think of this?
I like that and I think that would get the feature a good test base. In fact, I actually wanted to suggest just that the other day, but forgot about it :(
The updated installer is here:
https://github.com/k-takata/vim-win32-installer/releases/tag/v8.1.0451-newinstaller
@chrisbra
I created a PR for it: vim/vim-win32-installer#74.
The updated installer is here:
https://github.com/k-takata/vim-win32-installer/releases/tag/v8.1.0451-newinstaller2
You are writing the same things multiple times which does not help the user.
"Choose _vimrv settings" "Choose the settings" "Vi Compatibility" "Compatibility and enhancements" "Vim with all enhancements" "right and left buttons" "Right: ... Left:".
The 3 areas could be as short as "Compatibility", "Keyboard", "Mouse".
At least the "(Default)" is now consistent.
The "Compatibility and enhancements" could have a "newline" at the end so all 3 areas are using the same style.
If someone can remember another software that uses NSIS with a reset button then we could see how they have done it. I can remember any at the moment but will try and look for it.
Or generally see how other software for Windows does it.
So, can you propose concrete messages?
Right button
left button [popup menu, starts visual]
I don't agree with this part in your screen shot.
It's very hard to under stand that "Right button" corresponds to "popup menu" and "left button" corresponds to "start visual".
Not sure what the best way would be so its short but not cryptic.
Maybe use "/" to seperate left/right.
I think the right click menu is called context menu and not popup menu.
It would be more logical to have the left button info to the left and the right button info to the right.
Button behavior (left/right):
Visual mode/context menu
Select mode/context menu
Visual mode/extend selection
Left/right button behavior:
Visual mode/context menu
Select mode/context menu
Visual mode/extend selection
Sometimes in other software i see they go crazy with spaces and big letters in the english source but i dont know if its correct english or they do it to make it easy to read or something.
Maybe some good at english knows more.
Button behavior (Left / Right):
Visual mode / Context menu
Select mode / Context menu
Visual mode / Extend selection
Maybe other can give input of what they thing of the examples.
I like the last shown dialog. I don't think the Mouse behaviour description should be shortened as mentioned. This looks too confusing.
I would call those three sections perhaps "Vi Mode" (instead of Vi Compatibility), not sure of a better short name, "Mappings" (instead of Key remapping for Windows behaviour which is too long) and "Mouse" (instead of Mouse behaviour)
@chrisbra Your most recent post in this thread got sent to the vim-dev list as being from "Vim Github Bot" instead of as being from Christian Brabant.
OT: @chdiza yes correct. I changed the sender because I thought it looks a bit better. I don't know how to get the actual sender from the message that is created initially so (might have a look later at this)
The first drop down currently have "(Default)" as the last item.
I suggest perhaps having them all the first item in the each list.
Not sure if "Vi Mode" or "Vi Compatibility" ir correct but i suggest using whatever is using in Vim.
vim --help says something about Vi mode and Ex mode and Improved Ex mode so if that is what its talking about then i suggest using the same text (mode) so its the same.
Also i was thinking if <C-V>
etc should be <Ctrl-V>
.
As new Vim user i did not know what C
is but im guess its Ctrl.
It seems Vim is using CTRL in :help
Maybe it could be written a better way instead of listing all those <C-*>
.
But i dont know the details.
Is the installer using the old icons again where white is transparent?
Can you check the icons.
@chdiza (changed it a bit more). Let's see if the result in the vim-dev list is better now.
@chdiza (changed it a bit more). Let's see if the result in the vim-dev list is better now.
And if it did not forget to save the rewrite script, it should actually work.
(sorry for spamming this issue)
Let's see if the result in the vim-dev list is better now.
Yes, it's back to normal. The inbox now lists "Christian Brabant" as the sender.
Yes, it's back to normal. The inbox now lists "Christian Brabant" as the sender.
No wait, I'm wrong. It looks right when GitHub sends it directly to me, but wrong when I'm looking at the inbox of the account that receives the ML. It now says "chrisbra via Vim Github", instead of what it should say (and used to say), namely your full name.
Is the installer using the old icons again where white is transparent?
You are right. I wasn't aware that the icons were updated recently. Fixed.
—
You are receiving this because you are subscribed to this thread.
Okay all, how about this?
"Vi Mode" (instead of Vi Compatibility)
The word "mode" reminds me a different thing: normal mode, insert mode, etc.
How about "Vi / Vim behavior"?
"Mappings" (instead of Key remapping for Windows behaviour which is too long) and "Mouse" (instead of Mouse behaviour)
Agree.
Also i was thinking if
<C-V>
etc should be<Ctrl-V>
.
I was afraid that using <Ctrl-V>
makes the message too long, but using Ctrl-V
doesn't make it so long.
The first drop down currently have "(Default)" as the last item.
I suggest perhaps having them all the first item in the each list.
The first drop down is sorted in the order of the enhancements. The last one is most enhanced.
Other lists don't have much meaning in their orders.
Updated the patches to make the uninstaller more precise.
—
You are receiving this because you are subscribed to this thread.
@chdiza okay reverted back to the old behaviour. If anybody feels differently, please open a new ticket, so we don't spam unrelated issues.
@k-takata looks really nice now.
Hi all,
The new MUI2 installer is now available at vim-win32-installer:
https://github.com/vim/vim-win32-installer/releases/tag/v8.1.0454
Please try gvim_8.1.****_x86-mui2.exe
.
@brammool I'm now thinking adding support for 64-bit installer, because there are some requests for that. (E.g. vim/vim-win32-installer#73)
But I have a question about the current NSIS script. It requires some executables have the w32
suffixes. (E.g. installw32.exe
, uninstalw32.exe
, ...)
Why they are needed? If we remove them, we can use the same script for both 32- and 64-bit installer.
Otherwise, we should add many !ifdefs (or we should also use the w32
suffixes for the 64-bit installer.)
Its a little confusing the uninstall dialog just pops up at the beginning of the installation progress.
Could the uninstall stuff perhaps be part of the same dialog so there is not two dialogs.
Could the uninstall stuff perhaps be part of the same dialog so there is not two dialogs.
It's not possible (for now).
Actually, gpwen's MUI2 installer does call the uninstaller silently, but it is because his uninstaller is more precise. It deletes the files only installed by the installer. It doesn't delete _vimrc
if it is changed by the user.
One possible option is that if the uninstaller is executed silently, do only the first two components: "Unregister Vim" and "Remove Vim Executables/Runtime files". Do not delete vimfiles directory and the root of Vim directory.
Added minimal support for creating 64-bit installer.
It still uses the w32
suffixes even for the 64-bit installer.
—
You are receiving this because you are subscribed to this thread.
Bram's comment was not redirected here:
https://groups.google.com/d/msg/vim_dev/TRBJGgCvHik/CEAh1NSGBAAJ
The "w32" addition is to make sure it doesn't get confused with the
other install.exe that can be build. It's possible to use "win" instead
of "w32" if that is clearer. But if there actually are two versions of
the executable, it's probably best to give them different names,
otherwise it's very easy to end up with the wrong one.
We have already dropped support for MS-DOS, so the "w32" (or "win") addition might not be so important now.
And yes, we need the 64-bit version of installer.exe to create 64-bit Vim installer.
But I think keep using "w32" is the simplest way. It doesn't require changing a batch file in vim-win32-installer. I have already done a preparation of 64-bit installer in vim/vim-win32-installer#79 in that way.
https://github.com/vim/vim-win32-installer/releases/tag/v8.1.0466
64-bit installer is now available at vim-win32-installer. (32-bit build seems failed with some reason.)
https://github.com/vim/vim-win32-installer/releases/tag/v8.1.0466
64-bit installer is now available at vim-win32-installer. (32-bit build seems failed with some reason.)
Rebuild the commit and this time it was successfull
Could the uninstall stuff perhaps be part of the same dialog so there is not two dialogs.
It's not possible (for now).
I'm rethinking this now.
It's not impossible to run the uninstaller in silent mode at the first step of the installing.
But it's not clear which items should be uninstalled and which should be kept.
Someone may want to just update the version of Vim and want to keep the system _vimrc.
Someone may want to reinstall Vim with changing the settings of the system _vimrc.
Kicking the uninstaller in silent mode cannot handle this situation well...
Should we keep the system _vimrc when the uninstaller in silent mode?
Then if someone wants to change the setting of the system _vimrc, he should run the uninstaller manually and next execute the installer. Is it okay?
(gpwen's uninstaller checks if the system _vimrc is changed or not, but it is not easy in the current system.)
I think that the current implementation is better because it is flexible, even if it is somewhat confusing and a bit noisy.
And even so, it is more silent than the original non-MUI2 installer.
—
You are receiving this because you are subscribed to this thread.
Maybe look at how other software is doing it.
If i click cancel in the uninstall dialog Vim seems to install anyway.
If i click cancel in the uninstall dialog Vim seems to install anyway.
Good point! The behavior is not changed by my patches.
What will happen when a user cancel the uninstaller?
If gvimext{32,64} is in use, it might not be properly updated.
Any other issues? Maybe no.
Maybe look at how other software is doing it.
Some software ask the user to uninstall the old version before install it.
Some other just overwrite the old version.
Does both the 32-bit and 64-bit installer use "Program Files (x86)" as default?
I think it should be "Program Files" for 64-bit and "Program Files (x86)" for 32-bit.
More work sorry 🍰
Does both the 32-bit and 64-bit installer use "Program Files (x86)" as default?
No. 64-bit installer use "Program Files" as default, however,if another version of Vim is installed in another directory (e.g. "Program Files (x86)"), it is used as a default.
Could the uninstall stuff perhaps be part of the same dialog so there is not two dialogs.
It's not possible (for now).
I'm rethinking this now.
It turns out that kicking the uninstaller in silent mode is not reliable in this system.
We cannot know when the uninstaller finished.
So my conclusion is still not changed:
I think that the current implementation is better because it is flexible, even if it is somewhat confusing and a bit noisy.
—
You are receiving this because you are subscribed to this thread.
Added some comments to the system _vimrc
.
See the latest commit for detail: d1da147
E.g.:
" Vim with all enhancements source $VIMRUNTIME/vimrc_example.vim " Remap a few keys for Windows behavior source $VIMRUNTIME/mswin.vim " Mouse behavior (the Windows way) behave mswin " Use the internal diff if available. " Otherwise use the special 'diffexpr' for Windows. if &diffopt !~# 'internal' set diffexpr=MyDiff() endif
(Wording might be needed to be adjusted.)
—
You are receiving this because you are subscribed to this thread.
Refactored the commits for easier reviewing.
(Some of them are squashed and some others are edited.)
—
You are receiving this because you are subscribed to this thread.
I think I have almost done my work for this.
(If #3525 will be merged before this, I should rebase this upon it, but it might not be a problem.)
If anyone wants to update the translation, please send a PR to the topic/refactor-installer
branch in https://github.com/k-takata/vim .
Guess we need some translation instruction on how to translate the installer.
Do i just make a copy of english.nsi?
Are strings like "Typical", "Minimal", "Full" not already translated in the NSIS translations?
They seem so commonly used.
Do i just make a copy of english.nsi?
I think it's the best way for now. The english.nsi has redundant header compared other files, though.
It is based on gpwen's work, some of the messages are not used for now.
Are strings like "Typical", "Minimal", "Full" not already translated in the NSIS translations?
Yes, they can be translated. See "str_type_typical", "str_type_minimal" and "str_type_full".
I meant if "Typical", "Minimal", "Full" was already translate in the NSIS translations that comes with NSIS but i guess not.
I dont like that translation strings are wrapping on multiple line so you have:
"text \[newline][space][space][space][space][space]text"
Maybe just have each translation on one line like https://github.com/qbittorrent/qBittorrent/blob/master/dist/windows/installer-translations/danish.nsi
I just followed the gpwen's way. If you don't like that, blame to him/her.
I see some leading/trailing spaces i suggest to remove.
LangString str_msg_compat_title ${LANG_ENGLISH} \
" Vi / Vim behavior "
LangString str_msg_keymap_title ${LANG_ENGLISH} \
" Mappings "
LangString str_msg_keymap_default ${LANG_ENGLISH} \
" Do not remap keys (Default)"
LangString str_msg_keymap_windows ${LANG_ENGLISH} \
" Remap a few keys"
LangString str_msg_mouse_title ${LANG_ENGLISH} \
" Mouse "
LangString str_msg_compat_title ${LANG_ENGLISH} \
"Vi / Vim behavior"
LangString str_msg_keymap_title ${LANG_ENGLISH} \
"Mappings"
LangString str_msg_keymap_default ${LANG_ENGLISH} \
"Do not remap keys (Default)"
LangString str_msg_keymap_windows ${LANG_ENGLISH} \
"Remap a few keys"
LangString str_msg_mouse_title ${LANG_ENGLISH} \
"Mouse"
I see "/" without and with space before/after. Maybe make it consistent whichever is prefered:
"Remove Vim Executables/Runtime Files"
" Vi / Vim behavior "
I intentionally added the spaces. Without the spaces, they look too dense.
If your translation doesn't needs the spaces, you can remove them.
If you want space before/after a string i think its better to add it in the code.
That way translations can focus on translating the text only.
I don't agree that.
There are some strings that starts with "Fail to ".
I think they should be "Failed to ".
The strings were copied from the gpwen's work, but currently not used.
I included your Danish translation.
I see some leading/trailing spaces i suggest to remove.
Oops, some of them should have been removed when I changed the radio buttons to the drop down lists.
—
You are receiving this because you are subscribed to this thread.
Rebased on top of 8.1.0472.
@brammool
I think you always get the patch of a PR by adding ".diff" to the end of the URL.
(E.g. https://github.com/vim/vim/pull/3501.diff)
However, I found that this doesn't handle binary files well.
Please use the following zip file for the nsis icon files of this PR.
Or you can use ".patch" instead of ".diff". E.g.
wget https://github.com/vim/vim/pull/3501.patch git apply 3501.patch
The differences are:
—
You are receiving this because you are subscribed to this thread.
I just downloaded https://github.com/vim/vim-win32-installer/releases/download/v8.1.0490/gvim_8.1.0490_x64-mui2.exe and installed it on a windows 10 system.
I really liked the new installer and it worked really well.
@chrisbra Thank you for trying!
You might want to send updated German translations? ;-)
@k-takata
I did not know I am the nsis translator. But here we go: https://gist.github.com/chrisbra/030431f24f6f26ddda559d63e436d67b (hopefully the link finally works after the recent github failure).
2 observations:
"Vim with some enhancements (sourcing defaults.vim)" and "Vim with all enhancements (sourcing vimrc_example.vim)"
Hopefully that is not too long.
- I did not see the VisVim installation dialog
I currently disable it, because it is for VC6 or older versions. Is there anyone still use it?
- After a second thought, I think the difference between "vi compatible", "Vim original", "Vim with some enhancements" and "Vim with all enhancements" is not entirely clear.
Agree.
Hopefully that is not too long.
I had to update the layout. Not sure that the droplists should be left aligned or right aligned.
After applying your translation, the description for the key remapping is too long to display:
thanks for noticing. Does this updated patch fix the issue? It moves some of the description to the title (what is now called Mappings is then called "Mappings to Windows default keys")?
BTW: Is there an easy way to test the translation even when installing on a system with a different locale (or do I have to configure Windows first to use the german system language before trying the installer)?
@k-takata pushed 2 commits.
—
You are receiving this because you are subscribed to this thread.
I applied it. It looks okay now.
I also adjusted English messages.
BTW: Is there an easy way to test the translation even when installing on a system with a different locale (or do I have to configure Windows first to use the german system language before trying the installer)?
Currently, no. I edited the NSIS script.
Should we show a dialogbox to select the language?
—
You are receiving this because you are subscribed to this thread.
thanks looks good. Can you please finally squash this last change in: https://gist.github.com/chrisbra/030431f24f6f26ddda559d63e436d67b/revisions#diff-29679af159aae6c3cd407caf92622041
Should we show a dialogbox to select the language?
Yeah, I think this is the easiest way.
Updated.
Yeah, I think this is the easiest way.
Maybe it is useful for debugging, but is it useful for normal users?