-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Installer does not roll back properly #682
Comments
We do not have an MSI.
How about you open a Pull Request and then we discuss how to continue? |
This was supposed to go under build-extra section of the Git for Windows GitHub repository. I apologize, I got the wrong issue tracker. And, it appears that the build-extra repository doesn't have an issue tracker. |
This is by design. We have a central bug tracker because it is unreasonable to ask users to figure out the correct repository. Now, what about your PR? |
It's been a few years since I've really used WiX, so I'll try to look into the WiX project and see what I can make of it. |
Ok, just was Bing'ing around and found @robmen contribution that eventually resulted in the Of course, the whole thing that led to this issue was I thought I was using an MSI wrapped in a bootstrap EXE. I didn't realize the installer was InnoSetup. I'm hoping a MSI-based install will provide a better installation and upgrade experience, especially supporting rollback support. |
That would be great! Please note that I already wrote up a list of things that will need to be addressed before I can make official |
I already figured out why The other things you mention are completely doable and I wouldn't ship an installer without those items, too. Lastly, this might be more work, but, for instance, I never check the box to install the Git-GUI shortcut, I just don't need it. It would be great to not only not create a shortcut and context menu entry for Git-GUI, for example, but also to not install the required files for Git-GUI, either. Is there a way to know what all the dependencies are for |
Very nice!
Anything you want, really. The InnoSetup-backed script handles command-line options such as
There is, but no automated one. For example, if you never want to call And it can get quite tricky to get it right. For example, if you do not want Git Bash, you also don't need |
Yeah, sorry, been pulled away for a couple months on other work. Still want to finish what was started but it won't happen in March. |
I've made good progress on adapting the existing Here's a rough outline of what's next:
|
@robmen no worries. @fourpastmidnight excellent progress! Thank you so much! Any chance you can push your current state into https://github.com/fourpastmidnight?tab=repositories (I am curious)? |
@robmen same here, no worries. @dscho Yeah, I just installed the SDK, but I'll need to fork the build-extra repo after "cleaning up my mess" ;) I hope to have the bulk of the shell scripts squared away tonight--I'd like to get eyes on what I've done very soon before I go to much further. Also, that plan was just my initial thoughts for a roadmap, so please feel free to make any suggestions or provide any other helpful feedback. :) I'll look into getting build-extra forked. Is this the only repo I'll need to fork? |
Yep. |
So, I got around to forking the build-extra repo, but I haven't committed anything. I have a fairly good idea of what I'm trying to accomplish, but as I was preparing to finalize the individual pieces, the solution is taking a slightly different turn than I expected. It's no big deal, but this revelation set me back a few hours. Of course, it didn't help that my computer decided to be special tonight, so tonight was unexpectedly update night. Yay! Um, no, rather annoying. Oh well. |
@fourpastmidnight oh yeah, I know those days! Keep up the good work! |
So that slightly different turn ended up being more complicated to figure out; but also, I wanted to ensure the correctness of what I'm doing as compared to my actual installation of Git for Windows, such as the number of packages that are listed and their constituent files. I'm trying to finish the initial changes to the |
So, after dissecting the existing script and trying some things out, I've determined that my idea wasn't going to work as well as I would've liked. But, all is not lost. The good news is that I've found a way to fix the generation of the Also, when creating the installer from the original The other two issues mentioned in that pull request are still issues:
I'm hoping I'll be able to push up an updated |
@dscho OK, finally pushed up a revised As mentioned in the above post:
The next step is to resolve the shortcuts and Start Menu folder issues. |
@dscho I also managed to push up a revision to I'm wondering, also, if @robmen could take a quick look at this to double-check me on this---shortcuts can be a bit tricky. The commit is here. |
The commit adding the Start Menu shortcuts is most probably not a good implementation. Yes, I get no ICE warnings/errors when generating the MSI, but it won't result in correct behavior for the shortcuts. I'm still trying to figure this out. |
@robmen: I'm attempting to fix the shortcuts in the MSI. I'm getting the "expected" ICE38, ICE43, and ICE57 errors (due to mixing per-machine and per-user concerns---which in this case can be safely ignored). However, I'm also getting ICE69 errors:
I followed the example at FireGiant. The major difference is I'm installing 3 shortcuts, not 1. Here's the relevant WiX code: <?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
<Fragment>
<ComponentGroup Id="GitComponents">
.
.
.
<Component Id="GitProgramShortcuts" Directory="GitProgramFolder">
<Shortcut Id="GitBash"
Name="Git Bash"
Icon="git.ico"
Target="[#git_bash.exe]"
WorkingDirectory="WIX_DIR_PROFILE"
Arguments="--cd-to-home" />
<Shortcut Id="GitCMD"
Name="Git CMD"
Icon="git.ico"
Target="[#git_cmd.exe]"
WorkingDirectory="WIX_DIR_PROFILE"
Arguments="--cd-to-home" />
<Shortcut Id="GitGUI"
Name="Git GUI"
Icon="git.ico"
Target="[#git_gui.exe]"
WorkingDirectory="WIX_DIR_PROFILE" />
<RemoveFolder Id="GitProgramFolder" On="uninstall" />
<RegistryValue Root="HKLM"
Key="Software\GitForWindows"
Name="installed"
Type="integer"
Value="1"
KeyPath="yes" />
</Component>
.
.
.
<Component Directory="INSTALLFOLDER:\cmd\">
<File KeyPath="yes" Id="git_gui.exe" Source="cmd\git-gui.exe" />
</Component>
<Component Directory="INSTALLFOLDER">
<File KeyPath="yes" Id="git_bash.exe" Source="git-bash.exe" />
</Component>
<Component Directory="INSTALLFOLDER">
<File KeyPath="yes" Id="git_cmd.exe" Source="git-cmd.exe" />
</Component>
.
.
.
</ComponentGroup>
</Fragment>
</Wix> I'll keep looking into it, but I'm really not understanding what the difference is or whether or not I can simply ignore this error. |
@fourpastmidnight thank you so much, and sorry for my silence! Rest assured, I am very interested in your work, I just happen to be real busy elsewhere. |
@dscho no worries. |
@robmen I think I figured it all out. Before proceeding any further, I'm going to setup a virtual machine so I can test the installer as it currently is. You can find the commit here. |
Sorry, I'm a bit dark until after March... |
@robmen No problem; didn't know how dark "dark" was going to be. Hope everything's going well. |
Just an update: I've been getting some virtual machines set up so I can test installers as I move forward. I will be taking into consideration all the feedback given thus far. |
Update: I tested the installer from the last commit I made on my branch. Here's what I found:
Other than that, this installer works as well as I had expected it to! Which is great! I feel, as far as the MSI in and of itself is concerned, that this effort is on a very good trajectory. Next Steps:
|
Oh, nice. Is the error a secret, or can you share it with us?
Why not just use the
Maybe we can add a custom uninstall action? I feel that removing the entire directory wholesale, including files that might have been added by third-party installers, is the inappropriate thing to do. |
Things are progressing slowly. I have definitely made progress--but I only get about an hour a night during the week to work on this. I have a few kinks to work out, and then some broader cleanup and other stuff to do. I expect it'll be a little while yet before I have anything new to show. But things are looking good and I'm excited to see the end result. |
Thanks for keeping the ball going! |
So, I've been looking into turning some of the installer "options" into full-fledged MSI Features. What does this give us? It gives us the ability to use the installer to change/modify the current installation, such as changing the One of the other major potential benefits I was hoping to achieve with this work was being able to later choose the Terminal Host option (e.g. MinTTY vs. Command Prompt). Unfortunately, this is not possible. This is because there's only one executable, Further complicating things is that once you edit the string resources using On my radar has been modifying # The second argument would be case-insensitive
$ ./edit-git-bash.exe git-bash.exe MinTTY
# -- OR --
$ ./edit-git-bash.exe git-bash.exe CmdPrompt This provides two benefits: for those who wish to use the MSI to change their installation, they can switch between MinTTY and ConHost. But also, since @dscho I know that you mentioned that you wanted to just install this executable anyway (I believe you said in Any thoughts? |
What stops you from using two components and use one or the other depending on the selected feature? You would need to prepare the two executables upfront to include both binaries in the MSI. |
There is only one executable, thus one component, hence why using a MSI Feature for terminal host selection won't work (based on the installed executable). But, I did just get an idea that might make this work. I can use a registry entry as the keypath component for the "Features". I already have a custom action that executes @dscho I was able to modify |
OK, as I said this morning, I was able to modify However, while investigating this more, I determined that So I haven't pushed up a PR because I'm going to push up 2 PRs, but the second one is not ready yet. The second PR will allow I need to refactor this second approach before pushing it up. But, I want to push up both versions and see which one sticks. |
@fourpastmidnight sorry for not coming back earlier... busy as always, is my only excuse. The reason that there are 2 string resources: when I just tested and verified that this is indeed still the case. So one other way you could address this issue is by simply moving the |
Sorry for the delay in getting the PRs up for |
@dscho Sorry, just saw your comment...hmmmm. OK. Darn, I thought it would be nice to be able to switch back and forth between terminal hosts. Ah, I see where you're going. Creating an explicit "MinTTY" component: it's only installed if MinTTY is selected as the terminal choice; so, if the user chooses ConHost, MinTTY.exe is not installed, and we get the desired behavior. Hmm, cool. And that means that we don't need OK, let me work on that. If this works for the MSI, it should also be possible to implement in the InnoSetup installer, too. |
@fourpastmidnight thank you! |
@fourpastmidnight thank you for sticking with this! |
@dscho So, with that bit of insight, |
Nice! |
It's been a long while since I've commented here. First there were the holidays. Then there was my family and I getting over various illnesses. But, I'm happy to report that we're all doing well. I'm also happy to report that over the last week, I've made significant progress. Unfortunately, my repo is a mess as I tried various approaches to achieve a quality installer. I have vastly reconfigured the MSI to use MSI Features wherever possible and wherever it made sense to do so. The only thing I have left to finish is having the installer allow the user to choose to create desktop shortcuts for the various Git for Windows executables. I also see that recently, there was a new option added to allow users to turn on the experimental diff built-in. So I'll need to add support for this--but fortunately, since I have everything else completed, this will fall into a similar pattern as enabling Git Credentials Manager for Windows or Git FsCache, so this won't take very long at all. My next steps are to:
I expect this will take me a bit of time yet--but I just wanted to report in. While completing the above steps will complete most of the obvious functional aspects of the installer, there's still quite a bit of overall testing that I need to perform before I would feel comfortable giving this the green light. However, I am closer than ever and I'm really excited to have gotten to this point in this project. |
Please do not worry about that. Upstream Git already accepted the builtin difftool, therefore the opt-in will go away.
Great!!! |
That's great news. |
As of tonight, I have finished the bulk of the implementation of all MSI Git for Windows Features for an installation. I have some minor bug fixes to look into with respect to changing an installation of Git for Windows, and some overall cleanup that I want to do in order to better organize the files; but other than that, I'm wrapping up development. Once I wrap up these items, I'll be submitting a PR. There will most likely be a few PRs following the initial PR to further refine the implementation to ensure that I'm "following all the [MSI] rules". While submitting the PR will, I'm sure, be welcome news, there is still quite a bit of work to be done before we can begin distributing Git for Windows via MSI. For example, I need to research a few more things like the Files in Use (Restart Manager) dialog and determine whether this should be implemented, which I believe, would help avoid the issue that caused me to begin picking up the work on an MSI to begin with. Then there's a heavy round of testing that needs to occur. Testing that all the various modification scenarios work. Testing that administrative and unattended installations work (this will aid corporate deployment via GPO, for example). Once this heavy round of testing is done, then there's research into MSI versioning and ProductCode requirements and possible pursuant conversations that may come out of that research. But I am very much on the home stretch now. I know I said this about 8 months ago, but who would've thought one little comment on a PR back in June would lead to such a dramatic change in the implementation--a hard change, but a change for the better. |
Good work! |
@fourpastmidnight are you still planning on releasing your work? Any chance to make your current progress public? |
Seeing as this has not seen much progress, combined with the fact that MSI does not support LZMA compression (and last time I checked, it also had no support for SHA-256 code-signing, only for now-considered-insecure SHA-1), I'll close this. |
SHA 2 is supported of course. Try either mszip with no compression an let
burn do the job, or try mszip with high setting. (Windows installer xml)
…On Wed, Jan 1, 2020, 1:14 PM Johannes Schindelin ***@***.***> wrote:
Seeing as this has not seen much progress, combined with the fact that MSI
does not support LZMA compression (and last time I checked, it also had no
support for SHA-256 code-signing, only for now-considered-insecure SHA-1),
I'll close this.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#682?email_source=notifications&email_token=ABZH5SHARJFSJ4G4G44AYBTQ3TMPDA5CNFSM4B47O43KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEH5J22I#issuecomment-570072425>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABZH5SBVIYWN6NO3RPWCALTQ3TMPDANCNFSM4B47O43A>
.
|
This comment has been minimized.
This comment has been minimized.
I won't try. If you are interested, you can do that, @mfriedrich74. I have enough on my plate already, thank you very much. |
Dito.
…On Thu, Jan 2, 2020, 2:01 PM Johannes Schindelin ***@***.***> wrote:
SHA 2 is supported of course. Try either mszip with no compression an let
burn do the job, or try mszip with high setting.
I won't try. If you are interested, you can do that, @mfriedrich74
<https://github.com/mfriedrich74>. I have enough on my plate already,
thank you very much.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#682?email_source=notifications&email_token=ABZH5SHRHJZ5IUFOFK47RFLQ3Y2Y5A5CNFSM4B47O43KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEH7DF7A#issuecomment-570307324>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABZH5SHFPQOPQNVHNHG5WWLQ3Y2Y5ANCNFSM4B47O43A>
.
|
@dscho I appreciate that you manage the Git integrations and provide a release of just the git binaries with every release. That allows me to maintain the clean and simple gitsetup project that works much as @mfriedrich74 requests. Keep up the great work. 🎉 |
@robmen thank you! Would you prefer to keep the Alternatively, would you be interested in updating the |
Meh. Last time I started integrating my work, it took on a life of its own as people tried to turn it into everything for everyone. I just want something really simple and streamlined. I'd be happy to see that be delivered by Do as you wish, @dscho. 😄 |
I'll leave everything as-is, for the time being ;-) |
While installing Git 2.7.2, an error was encountered where
C:\Program Files\Git\mingw64\bin
was unable to be deleted. I was given a dialog with three choices:Abort
,Retry
, orIgnore
. Well, it's fairly safe to say that ignoring this is not a good idea, and retrying didn't work (of course), so really, the only sensible option was toAbort
.When I clicked
Abort
, the status bar changed and saidRolling back...
. However, my previous installation was now corrupted--as not all files were restored/rolled back. This is a pretty huge installer bug. The whole point of MSI's is that they're transactional.If you're not going to support rolling back a failed installation, then remove the rollback steps in the installer.
The text was updated successfully, but these errors were encountered: