Skip to content
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

Feature request: Publish .zip archives in addition to self-extracting 7z .exe's #986

Closed
friism opened this issue Dec 6, 2016 · 7 comments

Comments

@friism
Copy link

friism commented Dec 6, 2016

The self-extracting 7z archives that are currently released (eg. for the portable version) are difficult to install in a headless manner because they require first installing 7z.

Windows/PowerShell has built-in .zip support (with Expand-Archive). Would it make sense to publish .zip archives in addition to the assorted .exe's?

@shiftkey
Copy link

shiftkey commented Dec 8, 2016

they require first installing 7z.

I don't believe this is the case.

You can also control the extraction of the archive from the command line:

> .\PortableGit-2.11.0-64-bit.7z.exe -y -o "C:/git-for-windows"

This isn't an ideal solution, as it exits early and pops a progress bar. I'm sure I'm missing something from the docs...

@dscho
Copy link
Member

dscho commented Dec 8, 2016

The self-extracting 7z archives that are currently released (eg. for the portable version) are difficult to install in a headless manner because they require first installing 7z.

Why not use the NuGet package: https://www.nuget.org/packages/GitForWindows/.

@dscho
Copy link
Member

dscho commented Dec 8, 2016

To explain my reluctance for .zip packages: the space difference between .zip and .7z are huge. Just look at the .tar.bz2 files we also provide: the latter (which compress better than .zip files) are still triple the size of the .7z files.

That means not only wasted space, but also wasted time for me when I make new releases.

Given the workaround below, combined with this reluctance, means that I will close this ticket for now. If you feel strongly about it, please feel free to convince me compelling arguments 😃 .

Also, to enhance on @shiftkey's response:

You can also control the extraction of the archive from the command line:

We use the old .sfx component that used to be hosted on http://7zsfx.info. You can still see the switches in the Internet Archive: https://web.archive.org/web/20160402074100/http://www.7zsfx.info/en/switches.html. From that information, the best idea would be to use -y -gm2 -InstallPath="C:\\use\\double\\backslashes" (see also this helpful StackOverflow answer: http://stackoverflow.com/a/32105548).

@dscho dscho closed this as completed Dec 8, 2016
@PhilipOakley
Copy link

I have added a wiki page with this detail, and a small link from the FAQ page.

@friism
Copy link
Author

friism commented Dec 9, 2016

Posting link here for others to find: https://github.com/git-for-windows/git/wiki/Zip-Archives---extracting-the-released-archives

... thanks for this, I'll try it out shortly!

@friism
Copy link
Author

friism commented Dec 12, 2016

I'm finding that the self-extractor hangs when invoked from Powershell while doing a windows container docker build:

FROM microsoft/windowsservercore

SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]

ENV GIT_VERSION=2.11.0
RUN Invoke-Webrequest "https://github.com/git-for-windows/git/releases/download/v$Env:GIT_VERSION.windows.1/PortableGit-$Env:GIT_VERSION-64-bit.7z.exe" -UseBasicParsing -OutFile C:\gitsetup.7z.exe
RUN New-Item C:\git -ItemType Directory

RUN Start-Process C:\gitsetup.7z.exe -ArgumentList '-y -gm2 -InstallPath="C:\\git"' -Wait

It works with powershell outside of a container build, and it also works when using cmd.exe

@dscho
Copy link
Member

dscho commented Dec 12, 2016

@friism have you tried the NuPkg? A NuPkg is a .zip, after all...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants