├── .gitattributes ├── .gitignore ├── 7-Zip └── 7zSD.sfx ├── LICENSE.txt ├── Makefile ├── README.md ├── ReleaseNotes.css ├── ReleaseNotes.md ├── apply-from-public-inbox.sh ├── archive ├── release.sh └── root │ └── etc │ ├── hosts │ ├── networks │ ├── protocols │ └── services ├── commit-msys2.sh ├── download-stats.sh ├── edit-git-bash.c ├── get-sources.sh ├── git-extra ├── 99-post-install-cleanup.post ├── Makefile ├── PKGBUILD ├── SystemInfo.cpp ├── SystemInfo.h ├── WhoUses.cpp ├── aliases.sh ├── astextplain ├── bash_profile.sh ├── create-shortcut.c ├── env.sh ├── git-extra.install ├── git-extra.install.in ├── git-prompt.sh ├── git-sdk.sh ├── git-update ├── gitattributes ├── gitconfig ├── inputrc ├── msys2-32.ico ├── notepad ├── vi ├── vimrc └── wordpad ├── git-for-windows-keyring ├── .gitignore ├── PKGBUILD ├── git-for-windows-keyring.install ├── git-for-windows-revoked ├── git-for-windows-trusted └── git-for-windows.gpg ├── git-for-windows.svg ├── git-for-windows.xcf ├── git-shell ├── release.sh └── root │ └── etc │ └── post-install │ └── 13-copy-dlls.post ├── git-tfs ├── .gitignore └── PKGBUILD ├── git.ico ├── github-extra ├── .gitignore ├── PKGBUILD ├── github-extra.install ├── github-extra.install.in ├── resources │ ├── gitattributes │ ├── gitconfig │ └── ssh_config └── src │ ├── gitattributes.suggested │ ├── gitignore.suggested │ └── ssh-noprompt ├── gpl-2.0.rtf ├── install-custom-packages.sh ├── installer ├── HowToRelease.txt ├── InnoSetup │ ├── Default.isl │ ├── ISCC.exe │ ├── ISCmplr.dll │ ├── ISPP.chm │ ├── ISPP.dll │ ├── ISPPBuiltins.iss │ ├── ISetup.chm │ ├── Languages │ │ ├── Armenian.islu │ │ ├── BrazilianPortuguese.isl │ │ ├── Catalan.isl │ │ ├── Corsican.isl │ │ ├── Czech.isl │ │ ├── Danish.isl │ │ ├── Dutch.isl │ │ ├── Finnish.isl │ │ ├── French.isl │ │ ├── German.isl │ │ ├── Greek.isl │ │ ├── Hebrew.isl │ │ ├── Hungarian.isl │ │ ├── Italian.isl │ │ ├── Japanese.isl │ │ ├── Nepali.islu │ │ ├── Norwegian.isl │ │ ├── Polish.isl │ │ ├── Portuguese.isl │ │ ├── Russian.isl │ │ ├── ScottishGaelic.isl │ │ ├── SerbianCyrillic.isl │ │ ├── SerbianLatin.isl │ │ ├── Slovenian.isl │ │ ├── Spanish.isl │ │ ├── Turkish.isl │ │ └── Ukrainian.isl │ ├── Setup.e32 │ ├── SetupLdr.e32 │ ├── WizModernImage-IS.bmp │ ├── WizModernImage.bmp │ ├── WizModernSmallImage-IS.bmp │ ├── WizModernSmallImage.bmp │ ├── isbunzip.dll │ ├── isbzip.dll │ ├── isfaq.htm │ ├── islzma.dll │ ├── islzma32.exe │ ├── islzma64.exe │ ├── isunzlib.dll │ ├── iszlib.dll │ ├── license.txt │ └── whatsnew.htm ├── NOTICE.txt ├── checklist.txt ├── environment.inc.iss ├── git.bmp ├── gitsmall.bmp ├── helpers.inc.iss ├── install.iss ├── modules.inc.iss ├── putty.inc.iss ├── release.sh └── update-inno-setup.sh ├── make-file-list.sh ├── mingit └── release.sh ├── mingw-w64-cv2pdb ├── .gitignore └── PKGBUILD ├── mingw-w64-git-credential-manager └── PKGBUILD ├── mingw-w64-git-lfs ├── .gitignore ├── PKGBUILD └── git-lfs.install ├── msi ├── GitAdditionalOptionsDlg.wxs ├── GitChooseEnvironmentDlg.wxs ├── GitChooseTerminalDlg.wxs ├── GitCustomizeLineEndingsDlg.wxs ├── GitLineEndingsDlg.wxs ├── GitMaintenanceTypeDlg.wxs ├── GitProduct.wxs ├── GitShellOptionsDlg.wxs ├── GitUI_en-us.wxl ├── assets │ ├── Info.ico │ ├── NewFolder.ico │ ├── OneLevelUp.ico │ ├── bannerbmp.bmp │ ├── completi.ico │ ├── custicon.ico │ ├── dlgbmp.bmp │ ├── exclamic.ico │ ├── insticon.ico │ ├── removico.ico │ └── repairic.ico ├── git.png ├── release.sh ├── update-wix-toolset.sh └── wix │ ├── WixBalExtension.dll │ ├── WixCop.exe │ ├── WixDependencyExtension.dll │ ├── WixNetFxExtension.dll │ ├── WixTagExtension.dll │ ├── WixToolset.Data.dll │ ├── WixToolset.Dtf.Compression.Cab.dll │ ├── WixToolset.Dtf.Compression.dll │ ├── WixToolset.Dtf.Resources.dll │ ├── WixToolset.Dtf.WindowsInstaller.Package.dll │ ├── WixToolset.Dtf.WindowsInstaller.dll │ ├── WixToolset.Extensibility.dll │ ├── WixUIExtension.dll │ ├── WixUtilExtension.dll │ ├── candle.exe │ ├── candle.exe.config │ ├── darice.cub │ ├── heat.exe │ ├── heat.exe.config │ ├── insignia.exe │ ├── insignia.exe.config │ ├── light.exe │ ├── light.exe.config │ ├── lit.exe │ ├── lit.exe.config │ ├── mergemod.cub │ ├── mergemod.dll │ ├── mspatchc.dll │ ├── wconsole.dll │ ├── winterop.dll │ ├── wix.dll │ └── x86 │ └── burn.exe ├── nuget ├── GitForWindows.nuspec.in ├── Install.ps1 └── release.sh ├── package-git-shell.sh ├── pacman-helper.sh ├── please.sh ├── portable ├── release.sh └── root │ ├── README.portable │ └── usr │ └── share │ └── git │ ├── git-for-windows.ico │ └── git.ico ├── post-install.bat ├── render-release-notes.sh ├── sdk-installer ├── release.sh └── setup-git-sdk.bat ├── send-to-virus-total.sh ├── shears.sh ├── update-upstream-packages.sh ├── upload-to-github.sh └── wingit-snapshot-helper.sh /.gitattributes: -------------------------------------------------------------------------------- 1 | PKGBUILD eol=lf 2 | *.bat eol=lf 3 | *.c eol=lf 4 | *.cpp eol=lf 5 | *.css eol=lf 6 | *.install eol=lf 7 | *.install.in eol=lf 8 | *.iss eol=lf 9 | *.h eol=lf 10 | *.md eol=lf 11 | *.post eol=lf 12 | *.sh eol=lf 13 | *.txt eol=lf 14 | *.wxs eol=lf 15 | /git-extra/astextplain eol=lf 16 | /git-extra/notepad eol=lf 17 | /git-extra/vi eol=lf 18 | /git-extra/vimrc eol=lf 19 | /git-extra/wordpad eol=lf 20 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.swp 2 | /ReleaseNotes.html 3 | edit-git-bash.exe 4 | /cached-source-packages/ 5 | /download-stats.ids 6 | /git-extra/pkg/ 7 | /git-extra/src/ 8 | /git-extra/git-extra-*.pkg.tar.xz 9 | /git-shell/root/VERSION 10 | /git-shell/root/LICENSE.txt 11 | /git-shell/root/post-install.bat 12 | /git-shell/root/etc/ 13 | /git-shell/root/mingw32/ 14 | /git-extra/git-extra-*.src.tar.gz 15 | /installer/ReleaseNotes.html 16 | /installer/config.iss 17 | /installer/gitconfig.system 18 | /installer/install.log 19 | /installer/is-unicode.exe 20 | /installer/file-list.iss 21 | /installer/package-versions.txt 22 | /installer/programdata-config.template 23 | /mingit/exclude-list 24 | /mingit/root/ 25 | /mingit/sorted-all 26 | /mingit/sorted-libexec-exes 27 | /mingw-w64-git-credential-manager/pkg/ 28 | /mingw-w64-git-credential-manager/src/ 29 | /mingw-w64-git-credential-manager/*.pkg.tar.xz 30 | /mingw-w64-git-credential-manager/*.src.tar.gz 31 | /mingw-w64-git-credential-manager/gcmw-*.zip 32 | /mingw-w64-git-credential-manager/v[1-9]*.zip 33 | /msi/GitComponents.wxs 34 | /msi/obj/ 35 | /msi/package-versions.txt 36 | /msi/wix40-binaries.zip 37 | /nuget/GitForWindows.nuspec 38 | /nuget/Git-Windows-Minimal.nuspec 39 | /nuget/Git-Windows-Minimal.nuspec.unmoved 40 | /nuget/ReleaseNotes.html 41 | /nuget/libexec-moved.txt 42 | /nuget/nuget.exe 43 | /nuget/package-versions.txt 44 | /portable/root/LICENSE.txt 45 | /portable/root/bin/ 46 | /portable/root/cmd/ 47 | /portable/root/etc/ 48 | /portable/root/mingw32/ 49 | /portable/root/mingw64/ 50 | /portable/root/post-install.bat 51 | /sdk-installer/root/ 52 | /source-zips/ 53 | /source-zips-mingit/ 54 | /archive/root/* 55 | !/archive/root/etc/hosts 56 | !/archive/root/etc/networks 57 | !/archive/root/etc/protocols 58 | !/archive/root/etc/services 59 | 60 | # never accidentally commit these here 61 | PortableGit.7z 62 | packages.txt 63 | -------------------------------------------------------------------------------- /7-Zip/7zSD.sfx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/ghfw-build-extra/69bd5e6f85e4842f07db71c9618a621154c52254/7-Zip/7zSD.sfx -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | CFLAGS=-O2 -Wall 2 | 3 | all: edit-git-bash.exe 4 | 5 | edit-git-bash.exe: edit-git-bash.c 6 | gcc -DSTANDALONE_EXE $(CFLAGS) -o $@ $^ 7 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Build environment for Git for Windows 2 | 3 | This is Git for Windows SDK, the build environment for [Git for Windows](http://git-for-windows.github.io/). 4 | 5 | The easiest way to install Git for Windows SDK is via the [Git SDK installer](https://github.com/git-for-windows/build-extra/releases/latest). This installer will clone our [repositories](http://github.com/git-for-windows/), including all the necessary components to build Git for Windows, and perform an initial build. It will also install a shortcut to the Git SDK Bash on the desktop. 6 | 7 | # Git Shell 8 | 9 | This is a tailored build environment for creating the Git Shell tools in GitHub for Windows. Don't try and install these releases by hand - either grab one of the [vanilla Git for Windows releases](https://github.com/git-for-windows/git/releases) or install [GitHub for Windows](http://windows.github.com/). 10 | 11 | ## Creating a Release 12 | 13 | You need to have the 32-bit Git SDK installed on your machine. Grab it from [here](https://github.com/git-for-windows/build-extra/releases). 14 | 15 | Once you've installed that (it'll take a while to download and bootstrap the environment), this is all you need to run: 16 | 17 | > git clone https://github.com/github/ghfw-build-extra.git 18 | > cd ghfw-build-extra 19 | > ./update-git-shell.sh 20 | > ./package-git-shell.sh 21 | 22 | We add a couple of things to the default Git for Windows SDK: 23 | 24 | - `git-tfs` - support for `git tfs` in the box 25 | - `github-extra` - configuration customizations 26 | 27 | # Components of the Git for Windows SDK 28 | 29 | The build environment brings all the necessary parts required to build a Git for Windows installer, or a portable Git for Windows ("portable" == "USB drive edition", i.e. you can run it without installing, from wherever it was unpacked). 30 | 31 | ## Git for Windows 32 | 33 | The most important part of Git for Windows is [Git](https://git-scm.com/), obviously. The Git for Windows project maintains [a friendly fork](https://github.com/git-for-windows/git) of the "upstream" [Git project](https://github.com/git/git). The idea is that the Git for Windows repository serves as a test bed to develop patches and patch series that are specific to the Windows port, and once the patches stabilized, they are [submitted upstream](https://github.com/git-for-windows/git/tree/master/Documentation/SubmittingPatches). 34 | 35 | ## MSYS2 36 | 37 | Git is not a monolithic executable, but consists of a couple of executables written in C, a couple of Bash scripts, a couple of Perl scripts, and a couple of Tcl/Tk scripts. Some parts (not supported by Git for Windows yet) are written in other script languages, still. 38 | 39 | To support those scripts, Git for Windows uses [MSYS2](https://msys2.github.io/), a project providing a minimal POSIX emulation layer (based on [Cygwin](https://cygwin.com)), a package management system (named "Pacman", borrowed from Arch Linux) and a number of packages that are kept up-to-date by an active team of maintainers, including Bash, Perl, Subversion, etc. 40 | 41 | ### The difference between MSYS2 and MinGW 42 | 43 | MSYS2 refers to the libraries and programs that use the POSIX emulation layer ("msys2 runtime", derived from Cygwin's `cygwin1.dll`). It is very easy to port libraries and programs from Unix/Linux because most of the POSIX semantics is emulated reasonably well, for example [the `fork()` function](http://pubs.opengroup.org/onlinepubs/000095399/functions/fork.html). Bash and Perl are examples of MSYS2 programs. 44 | 45 | MinGW refers to libraries and programs that are compiled using GNU tools but do not require any POSIX semantics, instead relying on the standard Win32 API and the C runtime library. MinGW stands for "Minimal GNU for Windows". Examples: cURL (a library to talk to remote servers via HTTP(S), (S)FTP, etc), emacs, Inkscape, etc 46 | 47 | The POSIX emulation layer of MSYS2 binaries is convenient, but comes at a cost: Typically, MSYS2 programs are noticably slower than their MinGW counterparts (if there are such counterparts). As a consequence, the Git for Windows project tries to provide as many components as possible as MinGW binaries. 48 | 49 | ### MinGW packages 50 | 51 | The MinGW packages are built from the `MINGW-packages` repository which can be initialized in the Git SDK Bash via 52 | 53 | ```sh 54 | cd /usr/src/MINGW-packages 55 | git fetch 56 | git checkout master 57 | ``` 58 | 59 | The packages inside the `/usr/src/MINGW-packages/` directory can then be built by executing `makepkg-mingw -s` in the appropriate subdirectory. 60 | 61 | MinGW packages can be built for both `i686` and `x86_64` architectures at the same time by making sure that both toolchains are installed (`pacman -Sy mingw-w64-i686-toolchain mingw-w64-x86_64-toolchain`) before running `makepkg-mingw`. 62 | 63 | ### MSYS2 packages 64 | 65 | The MSYS2 packages are built from the `MSYS2-packages` repository which can be initialized in the Git SDK Bash via 66 | 67 | ```sh 68 | cd /usr/src/MSYS2-packages 69 | git fetch 70 | git checkout master 71 | ``` 72 | 73 | To build the packages inside the `/usr/src/MSYS2-packages/` directory, the user has to launch a special shell by double-clicking the `msys2_shell.bat` script in the top-level directory of the Git SDK, switch the working directory to the appropriate subdirectory of `/usr/src/MSYS2-packages/` and then execute `makepkg -s`. Before the first MSYS2 package is built, the prerequisite development packages have to be installed by executing `pacman -Sy base-devel binutils`. 74 | 75 | ## Installer generators 76 | 77 | The Git for Windows project aims to provide three different types of installers: 78 | 79 | - _Git for Windows_ for end users. The subdirectory `installer/` contains the files to generate this installer. 80 | - _Portable Git for Windows_ for end users ("USB drive edition"). This installer is actually a self-extracting `.7z` archive, and can be generated using the files in `portable/`. 81 | - The _Git for Windows SDK_ for Git for Windows contributors. This is a complete development environment to build Git for Windows, including Git, Bash, cURL, etc (including these three installers, of course). The files to generate this installer live in `sdk-installer/`. 82 | 83 | ## Support scripts/files 84 | 85 | The `build-extra` repository is also the home of other resources necessary to develop and maintain Git for Windows. For example, it contains the [Git garden shears](https://github.com/git-for-windows/build-extra/blob/master/shears.sh) that help with updating Git for Windows' source code whenever new upstream Git versions are released ("merging rebase"). 86 | -------------------------------------------------------------------------------- /apply-from-public-inbox.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | die () { 4 | echo "$*" >&2 5 | exit 1 6 | } 7 | 8 | for URL 9 | do 10 | case "$URL" in 11 | http://mid.gmane.org/*|https://mid.gmane.org/*) 12 | URL=https://public-inbox.org/git/"${URL#*org/}"/raw 13 | ;; 14 | http://article.gmane.org/*[0-9]/raw|http://article.gmane.org/*[0-9]|http://article.gmane.org/*[0-9]/|http://permalink.gmane.org/*[0-9]/raw|http://permalink.gmane.org/*[0-9]|http://permalink.gmane.org/*[0-9]/|http://thread.gmane.org/*[0-9]|http://thread.gmane.org/*[0-9]/) 15 | GID=${URL%/raw} 16 | GID=${GID%/} 17 | GID=${GID##*/} 18 | test -z "$(echo "$GID" | tr -d 0-9)" || 19 | die "Invalid GMane ID: $GID" 20 | HTML="$(git rev-parse --git-path public-inbox.html)" 21 | curl -s https://public-inbox.org/git/?q=gmane%3A$GID >"$HTML" 22 | grep "Results 1-1 of 1" "$HTML" || 23 | die "No match, or ambiguous GMane ID: $GID" 24 | URL="$(sed -n '/^1\./{N;s/.*href="\([^"]*\).*/\1/p}' <"$HTML")" 25 | test -n "$URL" || die "Could not extract URL for GMane ID $GID" 26 | URL=https://public-inbox.org/git/${URL%/}/raw 27 | ;; 28 | http*) 29 | ;; # okay 30 | *@*) 31 | # Message-ID: 32 | URL=https://public-inbox.org/git/"$URL"/raw 33 | ;; 34 | esac 35 | 36 | case "$URL" in 37 | */raw) 38 | # already raw 39 | ;; 40 | */t) 41 | # thread view 42 | URL=${URL%t}raw 43 | ;; 44 | *) 45 | URL=${URL%/}/raw 46 | ;; 47 | esac 48 | 49 | OUT="$(git rev-parse --git-path public-inbox)" 50 | curl -f -o "$OUT" $URL || 51 | die "Could not retrieve $URL" >&2 52 | 53 | if grep '\[PATCH.* 00*/[1-9]' "$OUT" 54 | then 55 | echo "Multi-part: $OUT $URL" >&2 56 | OUT2="$OUT.coverletter.html" 57 | OUT3="$OUT.mbox" 58 | curl -s "${URL%raw}" >"$OUT2" || 59 | die "Could not retrieve cover letter from ${URL%raw}" >&2 60 | 61 | rm -f "$OUT3" 62 | NO=1 63 | while true 64 | do 65 | URL3="$(sed -n '/.*\[PATCH.* 0*'$NO'\/[1-9]/{ 66 | s/^href="\.\.\/\([^"]*\).*/\1/p;q 67 | }' <"$OUT2")" 68 | test -n "$URL3" || break 69 | curl -f https://public-inbox.org/git/${URL3%/}/raw \ 70 | >>"$OUT3" || 71 | die "Could not retrieve $URL3" >&2 72 | NO=$(($NO+1)) 73 | done 74 | git am --whitespace=fix -3 -s <"$OUT3" || break 75 | else 76 | git am --whitespace=fix -3 -s <"$OUT" || break 77 | fi 78 | done 79 | -------------------------------------------------------------------------------- /archive/release.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Build a .tar.bz2 archive of Git for Windows with post-install steps already applied. 4 | 5 | test -z "$1" && { 6 | echo "Usage: $0 [optional components]" 7 | exit 1 8 | } 9 | 10 | die () { 11 | echo "$*" >&1 12 | exit 1 13 | } 14 | 15 | ARCH="$(uname -m)" 16 | case "$ARCH" in 17 | i686) 18 | BITNESS=32 19 | ;; 20 | x86_64) 21 | BITNESS=64 22 | ;; 23 | *) 24 | die "Unhandled architecture: $ARCH" 25 | ;; 26 | esac 27 | VERSION=$1 28 | shift 29 | TARGET="$HOME"/Git-"$VERSION"-"$BITNESS"-bit.tar.bz2 30 | SCRIPT_PATH="$(cd "$(dirname "$0")" && pwd)" 31 | 32 | case "$SCRIPT_PATH" in 33 | *" "*) 34 | die "This script cannot handle spaces in $SCRIPT_PATH" 35 | ;; 36 | esac 37 | 38 | 39 | # Generate a couple of files dynamically 40 | 41 | ln -sf /proc/mounts "$SCRIPT_PATH/root/etc/mtab" 42 | 43 | rm -rf "$SCRIPT_PATH/root/tmp" 44 | mkdir "$SCRIPT_PATH/root/tmp" || 45 | die "Could not make tmp/ directory" 46 | 47 | rm -rf "$SCRIPT_PATH/root/bin" 48 | mkdir "$SCRIPT_PATH/root/bin" || 49 | die "Could not make bin/ directory" 50 | 51 | rm -rf "$SCRIPT_PATH/root/dev" 52 | mkdir -m 755 "$SCRIPT_PATH/root/dev" || 53 | die "Could not make dev/ directory" 54 | 55 | ln -sf /proc/self/fd/0 "$SCRIPT_PATH/root/dev/stdin" 56 | ln -sf /proc/self/fd/1 "$SCRIPT_PATH/root/dev/stdout" 57 | ln -sf /proc/self/fd/2 "$SCRIPT_PATH/root/dev/stderr" 58 | ln -sf /proc/self/fd "$SCRIPT_PATH/root/dev/fd" 59 | 60 | mkdir "$SCRIPT_PATH/root/dev/shm" || 61 | die "Could not make dev/shm/ directory" 62 | chmod 1777 "$SCRIPT_PATH/root/dev/shm" 63 | 64 | mkdir "$SCRIPT_PATH/root/dev/mqueue" || 65 | die "Could not make dev/mqueue/ directory" 66 | chmod 1777 "$SCRIPT_PATH/root/dev/mqueue" 67 | 68 | cp /cmd/git.exe "$SCRIPT_PATH/root/bin/git.exe" && 69 | cp /mingw$BITNESS/share/git/compat-bash.exe "$SCRIPT_PATH/root/bin/bash.exe" && 70 | cp /mingw$BITNESS/share/git/compat-bash.exe "$SCRIPT_PATH/root/bin/sh.exe" || 71 | die "Could not install bin/ redirectors" 72 | 73 | hardlink_all_dlls () { 74 | exec_path=$SCRIPT_PATH/root/mingw$BITNESS/libexec/git-core 75 | mkdir -p $exec_path || 76 | die "Could not make $exec_path directory" 77 | 78 | for dll in /mingw$BITNESS/bin/*.dll 79 | do 80 | test -f "$exec_path"/${dll##*/} || 81 | ln "$dll" "$exec_path" || 82 | die "ERROR: could not link $dll" 83 | done 84 | } 85 | 86 | hardlink_all_dlls 87 | 88 | 89 | # Make a list of files to include 90 | LIST="$(ARCH=$ARCH BITNESS=$BITNESS \ 91 | PACKAGE_VERSIONS_FILE="$SCRIPT_PATH"/root/etc/package-versions.txt \ 92 | sh "$SCRIPT_PATH"/../make-file-list.sh "$@")" || 93 | die "Could not generate file list" 94 | 95 | 96 | # Create the archive 97 | 98 | type tar || 99 | pacman -Sy --noconfirm tar || 100 | die "Could not install tar" 101 | 102 | echo "Creating .tar.bz2 archive" && 103 | tar -c -j -f "$TARGET" --directory=/ --exclude=etc/post-install/* $LIST --directory=$SCRIPT_PATH/root bin dev etc tmp mingw$BITNESS && 104 | echo "Success! You will find the new archive at \"$TARGET\"." 105 | -------------------------------------------------------------------------------- /archive/root/etc/hosts: -------------------------------------------------------------------------------- 1 | # $FreeBSD$ 2 | # 3 | # Host Database 4 | # 5 | # This file should contain the addresses and aliases for local hosts that 6 | # share this file. Replace 'my.domain' below with the domainname of your 7 | # machine. 8 | # 9 | # In the presence of the domain name service or NIS, this file may 10 | # not be consulted at all; see /etc/nsswitch.conf for the resolution order. 11 | # 12 | # 13 | ::1 localhost localhost.my.domain 14 | 127.0.0.1 localhost localhost.my.domain 15 | # 16 | # Imaginary network. 17 | #10.0.0.2 myname.my.domain myname 18 | #10.0.0.3 myfriend.my.domain myfriend 19 | # 20 | # According to RFC 1918, you can use the following IP networks for 21 | # private nets which will never be connected to the Internet: 22 | # 23 | # 10.0.0.0 - 10.255.255.255 24 | # 172.16.0.0 - 172.31.255.255 25 | # 192.168.0.0 - 192.168.255.255 26 | # 27 | # In case you want to be able to connect to the Internet, you need 28 | # real official assigned numbers. Do not try to invent your own network 29 | # numbers but instead get one from your network provider (if any) or 30 | # from your regional registry (ARIN, APNIC, LACNIC, RIPE NCC, or AfriNIC.) 31 | # 32 | -------------------------------------------------------------------------------- /archive/root/etc/networks: -------------------------------------------------------------------------------- 1 | # $FreeBSD$ 2 | # @(#)networks 5.1 (Berkeley) 6/30/90 3 | # 4 | # Your Local Networks Database 5 | # 6 | your-net 127 # your comment 7 | your-netmask 255.255.255 # subnet mask for your-net 8 | 9 | # 10 | # Your subnets 11 | # 12 | subnet1 127.0.1 alias1 # comment 1 13 | subnet2 127.0.2 alias2 # comment 2 14 | 15 | # 16 | # Internet networks (from nic.ddn.mil) 17 | # 18 | -------------------------------------------------------------------------------- /archive/root/etc/protocols: -------------------------------------------------------------------------------- 1 | # 2 | # Internet protocols 3 | # 4 | # $FreeBSD$ 5 | # from: @(#)protocols 5.1 (Berkeley) 4/17/89 6 | # 7 | # See also http://www.iana.org/assignments/protocol-numbers 8 | # 9 | ip 0 IP # internet protocol, pseudo protocol number 10 | #hopopt 0 HOPOPT # hop-by-hop options for ipv6 11 | icmp 1 ICMP # internet control message protocol 12 | igmp 2 IGMP # internet group management protocol 13 | ggp 3 GGP # gateway-gateway protocol 14 | ipencap 4 IP-ENCAP # IP encapsulated in IP (officially ``IP'') 15 | st2 5 ST2 # ST2 datagram mode (RFC 1819) (officially ``ST'') 16 | tcp 6 TCP # transmission control protocol 17 | cbt 7 CBT # CBT, Tony Ballardie 18 | egp 8 EGP # exterior gateway protocol 19 | igp 9 IGP # any private interior gateway (Cisco: for IGRP) 20 | bbn-rcc 10 BBN-RCC-MON # BBN RCC Monitoring 21 | nvp 11 NVP-II # Network Voice Protocol 22 | pup 12 PUP # PARC universal packet protocol 23 | argus 13 ARGUS # ARGUS 24 | emcon 14 EMCON # EMCON 25 | xnet 15 XNET # Cross Net Debugger 26 | chaos 16 CHAOS # Chaos 27 | udp 17 UDP # user datagram protocol 28 | mux 18 MUX # Multiplexing protocol 29 | dcn 19 DCN-MEAS # DCN Measurement Subsystems 30 | hmp 20 HMP # host monitoring protocol 31 | prm 21 PRM # packet radio measurement protocol 32 | xns-idp 22 XNS-IDP # Xerox NS IDP 33 | trunk-1 23 TRUNK-1 # Trunk-1 34 | trunk-2 24 TRUNK-2 # Trunk-2 35 | leaf-1 25 LEAF-1 # Leaf-1 36 | leaf-2 26 LEAF-2 # Leaf-2 37 | rdp 27 RDP # "reliable datagram" protocol 38 | irtp 28 IRTP # Internet Reliable Transaction Protocol 39 | iso-tp4 29 ISO-TP4 # ISO Transport Protocol Class 4 40 | netblt 30 NETBLT # Bulk Data Transfer Protocol 41 | mfe-nsp 31 MFE-NSP # MFE Network Services Protocol 42 | merit-inp 32 MERIT-INP # MERIT Internodal Protocol 43 | dccp 33 DCCP # Datagram Congestion Control Protocol 44 | 3pc 34 3PC # Third Party Connect Protocol 45 | idpr 35 IDPR # Inter-Domain Policy Routing Protocol 46 | xtp 36 XTP # Xpress Tranfer Protocol 47 | ddp 37 DDP # Datagram Delivery Protocol 48 | idpr-cmtp 38 IDPR-CMTP # IDPR Control Message Transport Proto 49 | tp++ 39 TP++ # TP++ Transport Protocol 50 | il 40 IL # IL Transport Protocol 51 | ipv6 41 IPV6 # ipv6 52 | sdrp 42 SDRP # Source Demand Routing Protocol 53 | ipv6-route 43 IPV6-ROUTE # routing header for ipv6 54 | ipv6-frag 44 IPV6-FRAG # fragment header for ipv6 55 | idrp 45 IDRP # Inter-Domain Routing Protocol 56 | rsvp 46 RSVP # Resource ReSerVation Protocol 57 | gre 47 GRE # Generic Routing Encapsulation 58 | dsr 48 DSR # Dynamic Source Routing Protocol 59 | bna 49 BNA # BNA 60 | esp 50 ESP # encapsulating security payload 61 | ah 51 AH # authentication header 62 | i-nlsp 52 I-NLSP # Integrated Net Layer Security TUBA 63 | swipe 53 SWIPE # IP with Encryption 64 | narp 54 NARP # NBMA Address Resolution Protocol 65 | mobile 55 MOBILE # IP Mobility 66 | tlsp 56 TLSP # Transport Layer Security Protocol 67 | skip 57 SKIP # SKIP 68 | ipv6-icmp 58 IPV6-ICMP icmp6 # ICMP for IPv6 69 | ipv6-nonxt 59 IPV6-NONXT # no next header for ipv6 70 | ipv6-opts 60 IPV6-OPTS # destination options for ipv6 71 | # 61 # any host internal protocol 72 | cftp 62 CFTP # CFTP 73 | # 63 # any local network 74 | sat-expak 64 SAT-EXPAK # SATNET and Backroom EXPAK 75 | kryptolan 65 KRYPTOLAN # Kryptolan 76 | rvd 66 RVD # MIT Remote Virtual Disk Protocol 77 | ippc 67 IPPC # Internet Pluribus Packet Core 78 | # 68 # any distributed filesystem 79 | sat-mon 69 SAT-MON # SATNET Monitoring 80 | visa 70 VISA # VISA Protocol 81 | ipcv 71 IPCV # Internet Packet Core Utility 82 | cpnx 72 CPNX # Computer Protocol Network Executive 83 | cphb 73 CPHB # Computer Protocol Heart Beat 84 | wsn 74 WSN # Wang Span Network 85 | pvp 75 PVP # Packet Video Protocol 86 | br-sat-mon 76 BR-SAT-MON # Backroom SATNET Monitoring 87 | sun-nd 77 SUN-ND # SUN ND PROTOCOL-Temporary 88 | wb-mon 78 WB-MON # WIDEBAND Monitoring 89 | wb-expak 79 WB-EXPAK # WIDEBAND EXPAK 90 | iso-ip 80 ISO-IP # ISO Internet Protocol 91 | vmtp 81 VMTP # Versatile Message Transport 92 | secure-vmtp 82 SECURE-VMTP # SECURE-VMTP 93 | vines 83 VINES # VINES 94 | ttp 84 TTP # TTP 95 | #iptm 84 IPTM # Protocol Internet Protocol Traffic 96 | nsfnet-igp 85 NSFNET-IGP # NSFNET-IGP 97 | dgp 86 DGP # Dissimilar Gateway Protocol 98 | tcf 87 TCF # TCF 99 | eigrp 88 EIGRP # Enhanced Interior Routing Protocol (Cisco) 100 | ospf 89 OSPFIGP # Open Shortest Path First IGP 101 | sprite-rpc 90 Sprite-RPC # Sprite RPC Protocol 102 | larp 91 LARP # Locus Address Resolution Protocol 103 | mtp 92 MTP # Multicast Transport Protocol 104 | ax.25 93 AX.25 # AX.25 Frames 105 | ipip 94 IPIP # Yet Another IP encapsulation 106 | micp 95 MICP # Mobile Internetworking Control Pro. 107 | scc-sp 96 SCC-SP # Semaphore Communications Sec. Pro. 108 | etherip 97 ETHERIP # Ethernet-within-IP Encapsulation 109 | encap 98 ENCAP # Yet Another IP encapsulation 110 | # 99 # any private encryption scheme 111 | gmtp 100 GMTP # GMTP 112 | ifmp 101 IFMP # Ipsilon Flow Management Protocol 113 | pnni 102 PNNI # PNNI over IP 114 | pim 103 PIM # Protocol Independent Multicast 115 | aris 104 ARIS # ARIS 116 | scps 105 SCPS # SCPS 117 | qnx 106 QNX # QNX 118 | a/n 107 A/N # Active Networks 119 | ipcomp 108 IPComp # IP Payload Compression Protocol 120 | snp 109 SNP # Sitara Networks Protocol 121 | compaq-peer 110 Compaq-Peer # Compaq Peer Protocol 122 | ipx-in-ip 111 IPX-in-IP # IPX in IP 123 | carp 112 CARP vrrp # Common Address Redundancy Protocol 124 | pgm 113 PGM # PGM Reliable Transport Protocol 125 | # 114 # any 0-hop protocol 126 | l2tp 115 L2TP # Layer Two Tunneling Protocol 127 | ddx 116 DDX # D-II Data Exchange 128 | iatp 117 IATP # Interactive Agent Transfer Protocol 129 | stp 118 STP # Schedule Transfer Protocol 130 | srp 119 SRP # SpectraLink Radio Protocol 131 | uti 120 UTI # UTI 132 | smp 121 SMP # Simple Message Protocol 133 | sm 122 SM # SM 134 | ptp 123 PTP # Performance Transparency Protocol 135 | isis 124 ISIS # ISIS over IPv4 136 | fire 125 FIRE 137 | crtp 126 CRTP # Combat Radio Transport Protocol 138 | crudp 127 CRUDP # Combat Radio User Datagram 139 | sscopmce 128 SSCOPMCE 140 | iplt 129 IPLT 141 | sps 130 SPS # Secure Packet Shield 142 | pipe 131 PIPE # Private IP Encapsulation within IP 143 | sctp 132 SCTP # Stream Control Transmission Protocol 144 | fc 133 FC # Fibre Channel 145 | rsvp-e2e-ignore 134 RSVP-E2E-IGNORE # Aggregation of RSVP for IP reservations 146 | mobility-header 135 Mobility-Header # Mobility Support in IPv6 147 | udplite 136 UDPLite # The UDP-Lite Protocol 148 | mpls-in-ip 137 MPLS-IN-IP # Encapsulating MPLS in IP 149 | manet 138 MANET # MANET Protocols (RFC5498) 150 | hip 139 HIP # Host Identity Protocol (RFC5201) 151 | shim6 140 SHIM6 # Shim6 Protocol (RFC5533) 152 | wesp 141 WESP # Wrapped Encapsulating Security Payload (RFC5840) 153 | rohc 142 ROHC # Robust Header Compression (RFC5858) 154 | # 138-254 # Unassigned 155 | pfsync 240 PFSYNC # PF Synchronization 156 | # 253-254 # Use for experimentation and testing (RFC3692) 157 | # 255 # Reserved 158 | divert 258 DIVERT # Divert pseudo-protocol [non IANA] 159 | -------------------------------------------------------------------------------- /commit-msys2.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # To help Continuous Integration, this script commits the files installed via 4 | # MSYS2 packages into the Git for Windows SDK. The resulting repository can be 5 | # easily cloned and cached by build agents. 6 | 7 | die () { 8 | echo "$*" >&2 9 | exit 1 10 | } 11 | 12 | root="$(cd "$(dirname "$0")/../../.." && pwd)" || 13 | die "Could not determine root directory" 14 | 15 | 16 | list_packages () { 17 | (cd "${root%/}"/var/lib/pacman/local && 18 | # order by ctime 19 | ls -rtc | grep -v ALPM_DB_VERSION) 20 | } 21 | 22 | commit_package () { 23 | (cd "$root" || 24 | die "Could not cd to $root" 25 | 26 | git update-index -q --refresh && 27 | git diff-index --cached --quiet HEAD -- || 28 | die "There are uncommitted changes in $root" 29 | 30 | package="$(echo var/cache/pacman/pkg/"$1"*.pkg.tar.xz)" 31 | 32 | test -f "$package" || die "Could not find the package of $1" 33 | 34 | if git rev-parse -q --verify refs/heads/import-tars >/dev/null 35 | then 36 | git branch -D import-tars 37 | fi && 38 | "$import_tars" "$package" && 39 | git ls-tree -r import-tars | 40 | sed -n 's/^\([0-9]* \)blob \([0-9a-f]*\)\(\t[^.].*\)/\1\2\3/p' | 41 | git update-index --index-info && 42 | git add "${root%/}"/var/lib/pacman/local/"$1" && 43 | git commit -s -m "$1" || 44 | die "Could not commit $1") || 45 | exit 46 | } 47 | 48 | case "$1" in 49 | init) 50 | import_tars="${root%/}"/usr/src/git/contrib/fast-import/import-tars.perl 51 | test -x "$import_tars" || 52 | die "You need to run this script in a Git for Windows SDK" 53 | 54 | if test ! -d "${root%/}"/.git 55 | then 56 | (cd "$root" && git init) || 57 | die "Could not initialize Git repository" 58 | fi 59 | 60 | if test false != "$(git -C "$root" config core.autocrlf)" 61 | then 62 | git -C "$root" config core.autocrlf false || 63 | die "Could not force core.autocrlf = false" 64 | fi 65 | 66 | for package in $(list_packages) 67 | do 68 | commit_package $package || exit 69 | done 70 | 71 | (cd "$root" && 72 | git add var/lib/pacman/sync && 73 | git commit -s -m "Pacman package index") || 74 | die "Could not conclude initial commits" 75 | ;; 76 | commit) 77 | (cd "$root" && 78 | if test false != "$(git config core.autocrlf)" 79 | then 80 | git config core.autocrlf false || 81 | die "Could not force core.autocrlf = false" 82 | fi && 83 | git add -A . && 84 | git diff-index --exit-code --cached HEAD || 85 | git commit -q -s -m "Update $(date +%Y%m%d-%H%M%S)") || 86 | die "Could not commit changes" 87 | ;; 88 | *) 89 | die "Unknown command: $1" 90 | ;; 91 | esac 92 | -------------------------------------------------------------------------------- /download-stats.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # This script shows the download stats on GitHub. Update the ids by calling 4 | # this script with the `--update` option 5 | 6 | test "--update" != "$1" || { 7 | curl -s \ 8 | https://api.github.com/repos/git-for-windows/git/releases | 9 | tac | 10 | sed -n '/^ "tag_name":/{ 11 | N; 12 | s/.*"tag_name": "\([^"]*\)"[^"]*"id": \([0-9]*\).*/# \1\n#id=${1:-\2}/p 13 | }' | sed '$s/^#//' >"${0%.sh}".ids && 14 | echo "$ids" | 15 | sed -i -e '/^#\( v\?2.*windows\|id=\)/d' -e '/^id=/d' \ 16 | -e "/^# IDs/r${0%.sh}.ids" "$0" 17 | exit 18 | } 19 | 20 | # IDs 21 | # v2.10.1.windows.2 22 | #id=${1:-4382260} 23 | # v2.10.2.windows.1 24 | #id=${1:-4547425} 25 | # v2.11.0-rc0.windows.1 26 | #id=${1:-4574263} 27 | # v2.11.0-rc0.windows.2 28 | #id=${1:-4637903} 29 | # v2.11.0-rc1.windows.1 30 | #id=${1:-4665420} 31 | # v2.11.0-rc2.windows.1 32 | #id=${1:-4705463} 33 | # v2.11.0-rc3.windows.1 34 | #id=${1:-4755145} 35 | # v2.11.0.windows.1 36 | #id=${1:-4805052} 37 | # prerelease-v2.11.0.windows.1.1 38 | #id=${1:-4880739} 39 | # v2.11.1.windows-prerelease.1 40 | #id=${1:-5001367} 41 | # v2.11.1.mingit-prerelease.1 42 | #id=${1:-5068926} 43 | # v2.11.0.windows.2 44 | #id=${1:-5153384} 45 | # v2.11.0.windows.3 46 | #id=${1:-5159523} 47 | # v2.11.1.windows-prerelease.2 48 | #id=${1:-5220049} 49 | # v2.11.1.windows.1 50 | #id=${1:-5349389} 51 | # v2.12.0.windows.1 52 | #id=${1:-5571947} 53 | # v2.12.0.windows.2 54 | #id=${1:-5757342} 55 | # v2.12.1.windows.1 56 | #id=${1:-5819520} 57 | # v2.12.2.windows.1 58 | #id=${1:-5885060} 59 | # v2.12.2.windows.2 60 | #id=${1:-5987210} 61 | # v2.13.0.windows.1 62 | #id=${1:-6335523} 63 | # v2.13.1.windows.1 64 | #id=${1:-6694419} 65 | # v2.13.1.windows.2 66 | #id=${1:-6727667} 67 | # v2.13.2.windows.1 68 | #id=${1:-6835647} 69 | # v2.13.3.windows.1 70 | #id=${1:-7027502} 71 | # v2.14.0.windows.1 72 | #id=${1:-7295280} 73 | # v2.14.0.windows.2 74 | #id=${1:-7302996} 75 | # v2.12.2.windows.3 76 | #id=${1:-7350784} 77 | # v2.13.1.windows.3 78 | #id=${1:-7350859} 79 | # v2.14.1.windows.1 80 | id=${1:-7352987} 81 | # prerelease-v2.10.0.windows.1.11.geda474c 82 | # prerelease-v2.11.0.windows.1.1 83 | # v2.11.1.mingit-prerelease.1 84 | # prerelease-v2.10.0.windows.1.11.geda474c 85 | # prerelease-v2.11.0.windows.1.1 86 | # v2.11.1.mingit-prerelease.1 87 | # prerelease-v2.10.0.windows.1.11.geda474c 88 | # prerelease-v2.11.0.windows.1.1 89 | # v2.11.1.mingit-prerelease.1 90 | # prerelease-v2.10.0.windows.1.11.geda474c 91 | # prerelease-v2.11.0.windows.1.1 92 | # v2.11.1.mingit-prerelease.1 93 | # prerelease-v2.10.0.windows.1.11.geda474c 94 | # prerelease-v2.11.0.windows.1.1 95 | # v2.11.1.mingit-prerelease.1 96 | # prerelease-v2.10.0.windows.1.11.geda474c 97 | # prerelease-v2.11.0.windows.1.1 98 | # v2.11.1.mingit-prerelease.1 99 | # prerelease-v2.10.0.windows.1.11.geda474c 100 | # prerelease-v2.11.0.windows.1.1 101 | # v2.11.1.mingit-prerelease.1 102 | # prerelease-v2.10.0.windows.1.11.geda474c 103 | # prerelease-v2.11.0.windows.1.1 104 | # v2.11.1.mingit-prerelease.1 105 | # prerelease-v2.10.0.windows.1.11.geda474c 106 | # prerelease-v2.11.0.windows.1.1 107 | # v2.11.1.mingit-prerelease.1 108 | # prerelease-v2.10.0.windows.1.11.geda474c 109 | # prerelease-v2.11.0.windows.1.1 110 | # v2.11.1.mingit-prerelease.1 111 | # prerelease-v2.10.0.windows.1.11.geda474c 112 | # prerelease-v2.11.0.windows.1.1 113 | # v2.11.1.mingit-prerelease.1 114 | # prerelease-v2.10.0.windows.1.11.geda474c 115 | # prerelease-v2.11.0.windows.1.1 116 | # v2.11.1.mingit-prerelease.1 117 | # prerelease-v2.10.0.windows.1.11.geda474c 118 | # prerelease-v2.11.0.windows.1.1 119 | # v2.11.1.mingit-prerelease.1 120 | # prerelease-v2.10.0.windows.1.11.geda474c 121 | # prerelease-v2.11.0.windows.1.1 122 | # v2.11.1.mingit-prerelease.1 123 | # prerelease-v2.10.0.windows.1.11.geda474c 124 | # prerelease-v2.10.0.windows.1.11.geda474c 125 | # prerelease-v2.10.0.windows.1.11.geda474c 126 | 127 | case "$id" in 128 | *.*) 129 | case "$id" in 130 | v*.windows.*) id="$(echo "$id" | sed 's/\./\\./g')";; 131 | *\(*\)) id="$(echo "$id" | 132 | sed -e 's/(\(.*\))$/.windows.\1/' -e 's/\./\\./g')";; 133 | *) 134 | id="$(echo "$id" | sed 's/\./\\./g').windows.1";; 135 | esac 136 | id="$(sed -n "/$id/{N;s/.*:-\([0-9]*\).*/\1/p}" <"$0")" 137 | test -n "$id" || { 138 | echo "Version $1 not found" >&2 139 | exit 1 140 | } 141 | ;; 142 | esac 143 | 144 | curl -s https://api.github.com/repos/git-for-windows/git/releases/$id/assets | 145 | grep -e '"name":' -e '"download_count":' 146 | -------------------------------------------------------------------------------- /edit-git-bash.c: -------------------------------------------------------------------------------- 1 | #define STRICT 2 | #define WIN32_LEAN_AND_MEAN 3 | #define UNICODE 4 | #define _UNICODE 5 | #include 6 | #include 7 | 8 | #ifdef STANDALONE_EXE 9 | #include 10 | #include 11 | #elif defined(_WIN64) 12 | #error "The .dll needs to be 32-bit to match InnoSetup's architecture" 13 | #endif 14 | 15 | #ifdef DEBUG 16 | static void print_error(LPCWSTR prefix, DWORD error_number) 17 | { 18 | LPWSTR buffer = NULL; 19 | DWORD count = 0; 20 | 21 | count = FormatMessageW(FORMAT_MESSAGE_ALLOCATE_BUFFER 22 | | FORMAT_MESSAGE_FROM_SYSTEM 23 | | FORMAT_MESSAGE_IGNORE_INSERTS, 24 | NULL, error_number, LANG_NEUTRAL, 25 | (LPTSTR)&buffer, 0, NULL); 26 | if (count < 1) 27 | count = FormatMessageW(FORMAT_MESSAGE_ALLOCATE_BUFFER 28 | | FORMAT_MESSAGE_FROM_STRING 29 | | FORMAT_MESSAGE_ARGUMENT_ARRAY, 30 | L"Code 0x%1!08x!", 31 | 0, LANG_NEUTRAL, (LPTSTR)&buffer, 0, 32 | (va_list*)&error_number); 33 | MessageBox(NULL, buffer, prefix, MB_OK); 34 | LocalFree((HLOCAL)buffer); 35 | } 36 | #endif 37 | 38 | #ifdef STANDALONE_EXE 39 | static 40 | #else 41 | WINAPI __declspec(dllexport) 42 | #endif 43 | int edit_git_bash(LPWSTR git_bash_path, LPWSTR new_command_line) 44 | { 45 | HANDLE handle; 46 | int len, alloc, result = 0; 47 | WCHAR *buffer; 48 | 49 | len = wcslen(new_command_line); 50 | alloc = 2 * (len + 16); 51 | buffer = calloc(alloc, 1); 52 | 53 | if (!buffer) 54 | return 1; 55 | 56 | buffer[0] = (WCHAR) len; 57 | memcpy(buffer + 1, new_command_line, 2 * len); 58 | 59 | if (!(handle = BeginUpdateResource(git_bash_path, FALSE))) 60 | return 2; 61 | 62 | if (!UpdateResource(handle, RT_STRING, MAKEINTRESOURCE(1), 63 | MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), 64 | buffer, alloc)) 65 | result = 3; 66 | 67 | if (!EndUpdateResource(handle, FALSE)) 68 | return 4; 69 | 70 | return result; 71 | } 72 | 73 | #ifdef STANDALONE_EXE 74 | int main(int argc, char **argv) 75 | { 76 | int wargc, result; 77 | LPWSTR *wargv; 78 | 79 | #ifdef DEBUG 80 | LPTSTR cmdLine = GetCommandLineW(); 81 | fwprintf(stderr, L"Command Line: %s\n", cmdLine); 82 | 83 | wargv = CommandLineToArgvW(cmdLine, &wargc); 84 | 85 | for (int i = 1; i < wargc; ++i) 86 | fwprintf(stderr, L"Arg %d: %s\n", i, wargv[i]); 87 | #else 88 | wargv = CommandLineToArgvW(GetCommandLineW(), &wargc); 89 | #endif 90 | 91 | if (wargc != 3) { 92 | fwprintf(stderr, L"Usage: %s \n", 93 | wargv[0]); 94 | exit(1); 95 | } 96 | 97 | result = edit_git_bash(wargv[1], wargv[2]); 98 | 99 | if (result) 100 | fwprintf(stderr, L"Error editing %s: %d\n", wargv[1], result); 101 | 102 | return !!result; 103 | } 104 | #endif 105 | -------------------------------------------------------------------------------- /git-extra/99-post-install-cleanup.post: -------------------------------------------------------------------------------- 1 | # Only remove post-install scripts if we're not in the SDK. 2 | # They need to be there to build the installer packages. 3 | if [ -f /ReleaseNotes.html -o -f /README.portable ] 4 | then 5 | rm -rf /etc/post-install 6 | fi 7 | -------------------------------------------------------------------------------- /git-extra/Makefile: -------------------------------------------------------------------------------- 1 | BUILDDIR ?= . 2 | SRCDIR ?= . 3 | 4 | all: $(BUILDDIR)/create-shortcut.exe $(BUILDDIR)/WhoUses.exe 5 | 6 | $(BUILDDIR)/create-shortcut.exe: $(BUILDDIR)/create-shortcut.o 7 | $(CC) $(CFLAGS) -o $@ $^ -luuid -lole32 8 | 9 | $(BUILDDIR)/%.o: $(SRCDIR)/%.c 10 | $(CC) -c $(CFLAGS) $< -o $@ 11 | 12 | $(BUILDDIR)/WhoUses.exe: $(BUILDDIR)/WhoUses.o $(BUILDDIR)/SystemInfo.o 13 | $(CXX) $(CXXFLAGS) -o $@ $^ 14 | 15 | $(BUILDDIR)/WhoUses.o: $(SRCDIR)/WhoUses.cpp $(SRCDIR)/SystemInfo.h 16 | $(BUILDDIR)/SystemInfo.o: $(SRCDIR)/SystemInfo.cpp $(SRCDIR)/SystemInfo.h 17 | 18 | $(BUILDDIR)/%.o: $(SRCDIR)/%.cpp 19 | $(CXX) -c $(CXXFLAGS) $< -o $@ 20 | 21 | clean: 22 | rm $(BUILDDIR)/create-shortcut.exe $(BUILDDIR)/create-shortcut.o 23 | rm $(BUILDDIR)/WhoUses.exe $(BUILDDIR)/WhoUses.o \ 24 | $(BUILDDIR)/SystemInfo.o 25 | -------------------------------------------------------------------------------- /git-extra/PKGBUILD: -------------------------------------------------------------------------------- 1 | # Maintainer: nalla 2 | 3 | pkgname=('git-extra') 4 | _ver_base=1.1 5 | pkgver=1.1.171.a99a861 6 | pkgrel=1 7 | pkgdesc="Git for Windows extra files" 8 | arch=('i686' 'x86_64') 9 | url="https://github.com/git-for-windows/build-extra" 10 | license=('GPL') 11 | groups=('VCS') 12 | depends=('git-for-windows-keyring') 13 | optdepends=('vim' 'filesystem') 14 | install='git-extra.install' 15 | pkgver() { 16 | cd "$startdir" 17 | rev="$(git rev-list -1 HEAD -- .)" 18 | test -n "$(git show . | 19 | sed -n -e '1,/^@@/d' -e '/^[-+]pkgver=/d' -e '/^[-+]/p')" || 20 | rev="$(git rev-list -1 $rev^ -- .)" 21 | printf "%s.%s.%s" "${_ver_base}" "$(git rev-list --count $rev -- .)" \ 22 | "$(git rev-parse --short $rev)" 23 | } 24 | source=('inputrc' 25 | 'vimrc' 26 | 'vi' 27 | 'notepad' 28 | 'wordpad' 29 | 'create-shortcut.c' 30 | 'Makefile' 31 | 'SystemInfo.cpp' 32 | 'SystemInfo.h' 33 | 'WhoUses.cpp' 34 | 'git-prompt.sh' 35 | 'aliases.sh' 36 | 'env.sh' 37 | 'bash_profile.sh' 38 | 'msys2-32.ico' 39 | '99-post-install-cleanup.post' 40 | 'gitattributes' 41 | 'astextplain' 42 | 'git-sdk.sh' 43 | 'git-update') 44 | sha256sums=('e6a17a669fe8282792b3d98a2c47718425364a0ca9a456bdbad4a69c57ec6978' 45 | '36e0b6ae5fcf6361b5dad8bac815603d9211b38dfd8fdad89c01c34412529959' 46 | '640d04d2a2da709419188a986d5e5550ad30df23c7ea9be1a389c37a6b917994' 47 | '694b07404618d616aa316a632090ce64f2f89df3cc62b9d949efc0c2569b016e' 48 | 'a9ada325a279ce460aeb663a715e4c335d8972f497d48d97ff5524053b1fb43a' 49 | '197791d75a7f7e18c19e3673266d4d8a9f2620e0d046f6478cb94ad422fb21c4' 50 | 'aa388de88e87889efc9117d6799dc4787963c11e98da8b4e78e820e88552ec10' 51 | '3e4d4f7cfcbd78d6b6344fe6acea2fc0177f7360d57d1c55344bd25d48633d6c' 52 | '402c51eba82453a76f5110f4754bb1005df507a6e4532574c2b9627ff4e1dc81' 53 | 'd9024bab283ebb67b5d39d49ee5d2592e170abf1f92d3db34edcdd7eeed0b6b9' 54 | 'f8afd96004c02ce0127da5d31ce47ef476e04acc9ea29e979397c0eb2cdb6502' 55 | '4678d4939642b9a5b13e2f700a6968550f8e936738879a625479df5429a60e53' 56 | '255c64eecf1dbd188ef3452e73b9e099f3bb0e56bc23ff1493e4cc57f724d52f' 57 | '02d38e480a1ec4227e94a5aa073945901680aa3387e3386f8b77f10426ebbc75' 58 | 'dcbd1b981d5b899afe30151a5f5a27ea52025ff1335f131af1b5891f62ddd55b' 59 | '683ab066be19cb4defec470ebd53f165ca5dbf761fd40c13aee8abe31ba42803' 60 | '2dba0f5f8133b8e8d1da8291efec140cd516e385f04b33b95e4f97fc40f628b3' 61 | 'f4e310c00721f8834949268167b0584b7c9323775a318574dbca960af10d7998' 62 | '89b4d784e1c07d67c11a35abc7094709c216372e2099b2eb7abbc6eb7c34861f' 63 | '33a49036a52442a9754240e67abeb9dc2f686e8e25e5f70d522d78a150085e0a') 64 | 65 | prepare() { 66 | test $startdir/$pkgname.install -nt $startdir/$pkgname.install.in && 67 | test $startdir/$pkgname.install -nt $startdir/gitconfig && 68 | test $startdir/$pkgname.install -nt $startdir/gitattributes || 69 | sed -e "/^@@GITCONFIG@@$/r $startdir/gitconfig" \ 70 | -e "/^@@GITCONFIG@@$/d" \ 71 | -e "/^@@GITATTRIBUTES@@$/r $startdir/gitattributes" \ 72 | -e "/^@@GITATTRIBUTES@@$/d" \ 73 | <$startdir/$pkgname.install.in >$startdir/$pkgname.install 74 | } 75 | 76 | build() { 77 | export CC=${MINGW_CHOST}-gcc 78 | export CXX=${MINGW_CHOST}-g++ 79 | export SRCDIR=$srcdir 80 | export BUILDDIR=build-${MINGW_CHOST} 81 | mkdir -p ${BUILDDIR} 82 | make -f Makefile 83 | } 84 | 85 | package() { 86 | builddir=build-${MINGW_CHOST} 87 | install -d -m755 $pkgdir/etc/profile.d 88 | install -d -m755 $pkgdir/etc/post-install 89 | install -d -m755 $pkgdir/usr/bin 90 | install -d -m755 $pkgdir/usr/share/git 91 | install -d -m755 $pkgdir${MINGW_PREFIX}/bin 92 | install -d -m755 $pkgdir${MINGW_PREFIX}/libexec/git-core 93 | install -m644 inputrc $pkgdir/etc 94 | install -m644 vimrc $pkgdir/etc 95 | install -m755 vi $pkgdir/usr/bin 96 | install -m755 notepad $pkgdir/usr/bin 97 | install -m755 wordpad $pkgdir/usr/bin 98 | install -m755 $builddir/create-shortcut.exe $pkgdir${MINGW_PREFIX}/bin 99 | install -m755 $builddir/WhoUses.exe $pkgdir${MINGW_PREFIX}/bin 100 | install -m755 git-prompt.sh $pkgdir/etc/profile.d 101 | install -m755 aliases.sh $pkgdir/etc/profile.d 102 | install -m755 env.sh $pkgdir/etc/profile.d 103 | install -m755 bash_profile.sh $pkgdir/etc/profile.d 104 | install -m755 git-sdk.sh $pkgdir/etc/profile.d 105 | install -m644 msys2-32.ico $pkgdir/usr/share/git 106 | install -m644 99-post-install-cleanup.post $pkgdir/etc/post-install 107 | install -m755 astextplain $pkgdir/usr/bin 108 | install -m755 git-update $pkgdir${MINGW_PREFIX}/libexec/git-core 109 | } 110 | -------------------------------------------------------------------------------- /git-extra/aliases.sh: -------------------------------------------------------------------------------- 1 | # Some good standards, which are not used if the user 2 | # creates his/her own .bashrc/.bash_profile 3 | 4 | # --show-control-chars: help showing Korean or accented characters 5 | alias ls='ls -F --color=auto --show-control-chars' 6 | alias ll='ls -l' 7 | 8 | case "$TERM" in 9 | xterm*) 10 | # The following programs are known to require a Win32 Console 11 | # for interactive usage, therefore let's launch them through winpty 12 | # when run inside `mintty`. 13 | for name in node ipython php php5 psql python2.7 14 | do 15 | case "$(type -p "$name".exe 2>/dev/null)" in 16 | ''|/usr/bin/*) continue;; 17 | esac 18 | alias $name="winpty $name.exe" 19 | done 20 | ;; 21 | esac 22 | -------------------------------------------------------------------------------- /git-extra/astextplain: -------------------------------------------------------------------------------- 1 | #!/bin/sh -e 2 | # minimalistic replacement for `run-mailcap --action=cat ` 3 | 4 | if test "$#" != 1 ; then 5 | echo "Usage: astextplain " 1>&2 6 | exit 1 7 | fi 8 | 9 | # XXX output encoding (UTF-8) hardcoded 10 | case "$1" in 11 | *.doc | *.DOC | *.dot | *.DOT) 12 | antiword -m UTF-8 "$1" | sed "s/\^M$//" || cat "$1" 13 | ;; 14 | *.docx | *.DOCX | *.docm | *.DOCM | *.dotm | *.DOTM) 15 | docx2txt.pl "$1" - 16 | ;; 17 | *.pdf | *.PDF) 18 | pdftotext -layout "$1" -enc UTF-8 - | sed "s/(\^M$)|(^\^L)//" 19 | ;; 20 | # TODO add rtf support 21 | *.rtf | *.RTF) 22 | cat "$1" 23 | ;; 24 | *) 25 | echo "E: unsupported filetype $1" 1>&2 26 | exit 1 27 | ;; 28 | esac 29 | 30 | exit 0 -------------------------------------------------------------------------------- /git-extra/bash_profile.sh: -------------------------------------------------------------------------------- 1 | # add ~/.bash_profile if needed for executing ~/.bashrc 2 | if [ -e ~/.bashrc -a ! -e ~/.bash_profile -a ! -e ~/.bash_login -a ! -e ~/.profile ]; then 3 | printf "\n\033[31mWARNING: Found ~/.bashrc but no ~/.bash_profile, ~/.bash_login or ~/.profile.\033[m\n\n" 4 | echo "This looks like an incorrect setup." 5 | echo "A ~/.bash_profile that loads ~/.bashrc will be created for you." 6 | cat >~/.bash_profile <<-\EOF 7 | # generated by Git for Windows 8 | test -f ~/.profile && . ~/.profile 9 | test -f ~/.bashrc && . ~/.bashrc 10 | EOF 11 | fi 12 | -------------------------------------------------------------------------------- /git-extra/create-shortcut.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | void die(const char *message) 5 | { 6 | CoUninitialize(); 7 | fprintf(stderr, "%s\n", message); 8 | fprintf(stderr, "last error: %d\n", GetLastError()); 9 | exit(1); 10 | } 11 | 12 | int main(int argc, char **argv) 13 | { 14 | const char *progname = argv[0]; 15 | const char *work_dir = NULL, *arguments = NULL, *icon_file = NULL; 16 | const char *description = NULL; 17 | int show_cmd = 1; 18 | 19 | static WCHAR wsz[1024]; 20 | HRESULT hres; 21 | IShellLink* psl; 22 | IPersistFile* ppf; 23 | 24 | 25 | while (argc > 2) { 26 | if (argv[1][0] != '-') 27 | break; 28 | if (!strcmp(argv[1], "--work-dir")) 29 | work_dir = argv[2]; 30 | else if (!strcmp(argv[1], "--arguments")) 31 | arguments = argv[2]; 32 | else if (!strcmp(argv[1], "--show-cmd")) 33 | show_cmd = atoi(argv[2]); 34 | else if (!strcmp(argv[1], "--icon-file")) 35 | icon_file = argv[2]; 36 | else if (!strcmp(argv[1], "--description")) 37 | description = argv[2]; 38 | else { 39 | fprintf(stderr, "Unknown option: %s\n", argv[1]); 40 | return 1; 41 | } 42 | 43 | argc -= 2; 44 | argv += 2; 45 | } 46 | 47 | if (argc > 1 && !strcmp(argv[1], "--")) { 48 | argc--; 49 | argv++; 50 | } 51 | 52 | if (argc < 3) { 53 | fprintf(stderr, "Usage: %s [options] \n", 54 | progname); 55 | return 1; 56 | } 57 | 58 | hres = CoInitialize(NULL); 59 | if (FAILED(hres)) 60 | die ("Could not initialize OLE"); 61 | 62 | hres = CoCreateInstance(&CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, 63 | &IID_IShellLink, (void **)&psl); 64 | 65 | if (FAILED(hres)) 66 | die ("Could not get ShellLink interface"); 67 | 68 | hres = psl->lpVtbl->QueryInterface(psl, &IID_IPersistFile, 69 | (void **) &ppf); 70 | 71 | if (FAILED(hres)) 72 | die ("Could not get PersistFile interface"); 73 | 74 | hres = psl->lpVtbl->SetPath(psl, argv[1]); 75 | if (FAILED(hres)) 76 | die ("Could not set path"); 77 | 78 | if (work_dir) 79 | psl->lpVtbl->SetWorkingDirectory(psl, work_dir); 80 | 81 | if (show_cmd) 82 | psl->lpVtbl->SetShowCmd(psl, show_cmd); 83 | 84 | if (icon_file) 85 | psl->lpVtbl->SetIconLocation(psl, icon_file, 0); 86 | if (arguments) 87 | psl->lpVtbl->SetArguments(psl, arguments); 88 | if (description) 89 | psl->lpVtbl->SetDescription(psl, description); 90 | 91 | wsz[0] = 0; 92 | MultiByteToWideChar(CP_ACP, 93 | 0, argv[2], -1, wsz, 1024); 94 | hres = ppf->lpVtbl->Save(ppf, 95 | (const WCHAR*)wsz, TRUE); 96 | 97 | ppf->lpVtbl->Release(ppf); 98 | psl->lpVtbl->Release(psl); 99 | 100 | if (FAILED(hres)) 101 | die ("Could not save link"); 102 | 103 | CoUninitialize(); 104 | return 0; 105 | } 106 | -------------------------------------------------------------------------------- /git-extra/env.sh: -------------------------------------------------------------------------------- 1 | # Add bin path in the home directory ontop of the PATH variable 2 | export PATH="$HOME/bin:$PATH" 3 | 4 | # Allow SSH to ask via GUI if the terminal is not usable 5 | test -n "$SSH_ASKPASS" || { 6 | case "$MSYSTEM" in 7 | MINGW64) 8 | export DISPLAY=needs-to-be-defined 9 | export SSH_ASKPASS=/mingw64/libexec/git-core/git-gui--askpass 10 | ;; 11 | MINGW32) 12 | export DISPLAY=needs-to-be-defined 13 | export SSH_ASKPASS=/mingw32/libexec/git-core/git-gui--askpass 14 | ;; 15 | esac 16 | } 17 | -------------------------------------------------------------------------------- /git-extra/git-extra.install: -------------------------------------------------------------------------------- 1 | export LC_ALL=C 2 | 3 | post_install () { 4 | for dir in mingw32 mingw64 5 | do 6 | test ! -d /$dir || 7 | test -f /$dir/etc/gitconfig || 8 | cat > /$dir/etc/gitconfig <<\GITCONFIG 9 | [core] 10 | symlinks = false 11 | autocrlf = true 12 | [color] 13 | diff = auto 14 | status = auto 15 | branch = auto 16 | interactive = true 17 | [pack] 18 | packSizeLimit = 2g 19 | [help] 20 | format = html 21 | [http] 22 | sslCAinfo = /ssl/certs/ca-bundle.crt 23 | [diff "astextplain"] 24 | textconv = astextplain 25 | [rebase] 26 | autosquash = true 27 | GITCONFIG 28 | test ! -d /$dir || 29 | test -f /$dir/etc/gitattributes || 30 | cat > /$dir/etc/gitattributes <<\GITATTRIBUTES 31 | *.doc diff=astextplain 32 | *.DOC diff=astextplain 33 | *.docx diff=astextplain 34 | *.DOCX diff=astextplain 35 | *.docm diff=astextplain 36 | *.DOCM diff=astextplain 37 | *.dot diff=astextplain 38 | *.DOT diff=astextplain 39 | *.dotm diff=astextplain 40 | *.DOTM diff=astextplain 41 | *.pdf diff=astextplain 42 | *.PDF diff=astextplain 43 | *.rtf diff=astextplain 44 | *.RTF diff=astextplain 45 | 46 | GITATTRIBUTES 47 | 48 | grep -q '^\*\.docm' /$dir/etc/gitattributes || 49 | sed -i -e 's/^\*\.DOCX\(.*\)/&\n*.docm\1\n*.DOCM\1/' \ 50 | -e 's/^\*\.DOT\(.*\)/&\n*.dotm\1\n*.DOTM\1/' \ 51 | /$dir/etc/gitattributes 52 | 53 | # Drop git-wrapper in place of builtins "to save space" 54 | git_wrapper=/$dir/share/git/git-wrapper.exe 55 | if test -f $git_wrapper && 56 | ! cmp -s $git_wrapper /$dir/bin/git-receive-pack.exe 57 | then 58 | for b in $(cat /$dir/share/git/builtins.txt) 59 | do 60 | rm /$dir/libexec/git-core/$b && 61 | ln $git_wrapper /$dir/libexec/git-core/$b 62 | 63 | if test -x /$dir/bin/$b 64 | then 65 | rm /$dir/bin/$b && 66 | ln $git_wrapper /$dir/bin/$b 67 | fi 68 | done 69 | fi 70 | done 71 | 72 | grep -q '^db_home: env windows' /etc/nsswitch.conf || 73 | sed -i 's/^\(db_home: \)\(windows \)\?\([^w]\)/\1env windows \3/' \ 74 | /etc/nsswitch.conf 75 | 76 | ! grep -q '^db_shell: [^#]*cygwin' /etc/nsswitch.conf || 77 | sed -i 's/^\(db_shell: \)\(env \)\?\(windows \)\?/\1env windows # /' \ 78 | /etc/nsswitch.conf 79 | 80 | ! grep -q '^db_gecos: [^#]*\(cygwin\|windows\)' /etc/nsswitch.conf || 81 | sed -i 's/^\(db_gecos: \)\(env \)\?\([^e]\)/\1env # \3/' \ 82 | /etc/nsswitch.conf 83 | 84 | ! grep -q '^group: [^#]*db' /etc/nsswitch.conf || 85 | sed -i 's/^\(group: \)\(.* \)\?\(db\)/\1\2# \3/' \ 86 | /etc/nsswitch.conf 87 | 88 | ! grep -q '^PS1=' /etc/bash.bashrc || 89 | sed -i 's/^PS1=/#&/' /etc/bash.bashrc 90 | 91 | grep -q '^# Fixup git-bash in non login env' /etc/bash.bashrc || 92 | printf "\n# Fixup git-bash in non login env\nshopt -q login_shell || . /etc/profile.d/git-prompt.sh\n" >> /etc/bash.bashrc 93 | 94 | grep -q git-for-windows[^-] etc/pacman.conf || 95 | sed -i -e '/^\[mingw32\]/i[git-for-windows]\nServer = https://dl.bintray.com/$repo/pacman/$arch\n' etc/pacman.conf 96 | 97 | ! grep -A2 git-for-windows[^-] etc/pacman.conf | 98 | grep -q '^SigLevel = Optional' || 99 | sed -i -e '/\[git-for-windows\]/{N;N;s/\nSigLevel = Optional//}' \ 100 | etc/pacman.conf 101 | 102 | uname_m="$(uname -m)" 103 | test i686 = "$uname_m" || 104 | grep -q git-for-windows-mingw32 etc/pacman.conf || 105 | sed -i -e '/^\[mingw32\]/i[git-for-windows-mingw32]\nServer = https://dl.bintray.com/git-for-windows/pacman/i686\n' etc/pacman.conf 106 | test x86_64 = "$uname_m" || 107 | grep -q git-for-windows-mingw64 etc/pacman.conf || 108 | sed -i -e '/^\[mingw32\]/i[git-for-windows-mingw64]\nServer = https://dl.bintray.com/git-for-windows/pacman/x86_64\n' etc/pacman.conf 109 | 110 | test i686 != $"uname -m" || 111 | case "$(md5sum.exe < /msys2.ico)" in 112 | 292ad5cd*) cp /usr/share/git/msys2-32.ico /msys2.ico;; 113 | esac 114 | 115 | test ! -f /etc/post-install/05-home-dir.post || 116 | rm /etc/post-install/05-home-dir.post 117 | 118 | grep -qw usertemp /etc/fstab || 119 | sed -i '$a\ 120 | none /tmp usertemp binary,posix=0,noacl 0 0' /etc/fstab 121 | grep -qw usertemp.*noacl /etc/fstab || 122 | sed -i '$s/^none \/tmp usertemp [^ ]*/&,noacl/' /etc/fstab 123 | 124 | ! grep -q '^export TERM=' /etc/profile || 125 | sed -i 's/^export TERM=/test -n "$TERM" || &/' /etc/profile 126 | 127 | ! grep -q ' $1 == ~\* ' /usr/share/bash-completion/bash_completion || 128 | sed -i 's/\( \$1 == \|printf -v \$2 \)\(~\* \|~%q \)/\1\\\2/' \ 129 | /usr/share/bash-completion/bash_completion 130 | 131 | ! grep -qi '^TMP=' /etc/profile || 132 | sed -i 's/^TE\?MP=/#&/i' /etc/profile 133 | ! grep -q '^unset TMP' /etc/profile || 134 | sed -i 's/^unset TMP/#&/' /etc/profile 135 | grep -q '^test -d "$TMPDIR"' /etc/profile || { 136 | if lineno="$(grep -n '^#TEMP=' /etc/profile)" 137 | then 138 | lineno=${lineno%%:*} 139 | else 140 | lineno='$' 141 | fi 142 | sed -i "$lineno"'a\ 143 | case "$TMP" in *\\\\*) TMP="$(cygpath -m "$TMP")";; esac\ 144 | case "$TEMP" in *\\\\*) TEMP="$(cygpath -m "$TEMP")";; esac\ 145 | test -d "$TMPDIR" || test ! -d "$TMP" || {\ 146 | TMPDIR="$TMP"\ 147 | export TMPDIR\ 148 | }\ 149 | ' /etc/profile 150 | } 151 | 152 | grep -q 'case "\${MSYS2_PATH_TYPE:-inherit}"' /etc/profile || 153 | sed -i 's/{MSYS2_PATH_TYPE:-[^}]*}/{MSYS2_PATH_TYPE:-inherit}/g' \ 154 | /etc/profile 155 | 156 | ! grep -qw PERL_PATH /etc/profile.d/perlbin.sh 2>/dev/null || 157 | sed -i 's/PERL_PATH/PERL_PATH_EXTRA/g' /etc/profile.d/perlbin.sh 158 | 159 | ! grep -q '^# Define default printer' /etc/profile || 160 | sed -i -e '/^# Define default printer/,/^$/d' \ 161 | -e 's/^\(export .* \)PRINTER /\1/' /etc/profile 162 | 163 | ! grep -A3 '^ *autocmd BufReadPost \*' \ 164 | /usr/share/vim/vim80/defaults.vim | 165 | grep -q ' exe "normal! g`\\""' || 166 | sed -i -e '/^ *autocmd BufReadPost \*/,/\\ endif$/s/^/"/' \ 167 | /usr/share/vim/vim80/defaults.vim 168 | 169 | ! grep -q '^if .*command -v getent' /etc/bash.bashrc || 170 | sed -i '/^if .*command -v getent/,/^fi/s/^/#/' /etc/bash.bashrc 171 | 172 | # Ensure that Git for Windows' GPG keyring is still imported 173 | pacman-key --list-keys BB3AA74136C569BB >/dev/null || 174 | pacman-key --populate git-for-windows 175 | } 176 | 177 | post_upgrade () { 178 | post_install 179 | } 180 | -------------------------------------------------------------------------------- /git-extra/git-extra.install.in: -------------------------------------------------------------------------------- 1 | export LC_ALL=C 2 | 3 | post_install () { 4 | for dir in mingw32 mingw64 5 | do 6 | test ! -d /$dir || 7 | test -f /$dir/etc/gitconfig || 8 | cat > /$dir/etc/gitconfig <<\GITCONFIG 9 | @@GITCONFIG@@ 10 | GITCONFIG 11 | test ! -d /$dir || 12 | test -f /$dir/etc/gitattributes || 13 | cat > /$dir/etc/gitattributes <<\GITATTRIBUTES 14 | @@GITATTRIBUTES@@ 15 | 16 | GITATTRIBUTES 17 | 18 | grep -q '^\*\.docm' /$dir/etc/gitattributes || 19 | sed -i -e 's/^\*\.DOCX\(.*\)/&\n*.docm\1\n*.DOCM\1/' \ 20 | -e 's/^\*\.DOT\(.*\)/&\n*.dotm\1\n*.DOTM\1/' \ 21 | /$dir/etc/gitattributes 22 | 23 | # Drop git-wrapper in place of builtins "to save space" 24 | git_wrapper=/$dir/share/git/git-wrapper.exe 25 | if test -f $git_wrapper && 26 | ! cmp -s $git_wrapper /$dir/bin/git-receive-pack.exe 27 | then 28 | for b in $(cat /$dir/share/git/builtins.txt) 29 | do 30 | rm /$dir/libexec/git-core/$b && 31 | ln $git_wrapper /$dir/libexec/git-core/$b 32 | 33 | if test -x /$dir/bin/$b 34 | then 35 | rm /$dir/bin/$b && 36 | ln $git_wrapper /$dir/bin/$b 37 | fi 38 | done 39 | fi 40 | done 41 | 42 | grep -q '^db_home: env windows' /etc/nsswitch.conf || 43 | sed -i 's/^\(db_home: \)\(windows \)\?\([^w]\)/\1env windows \3/' \ 44 | /etc/nsswitch.conf 45 | 46 | ! grep -q '^db_shell: [^#]*cygwin' /etc/nsswitch.conf || 47 | sed -i 's/^\(db_shell: \)\(env \)\?\(windows \)\?/\1env windows # /' \ 48 | /etc/nsswitch.conf 49 | 50 | ! grep -q '^db_gecos: [^#]*\(cygwin\|windows\)' /etc/nsswitch.conf || 51 | sed -i 's/^\(db_gecos: \)\(env \)\?\([^e]\)/\1env # \3/' \ 52 | /etc/nsswitch.conf 53 | 54 | ! grep -q '^group: [^#]*db' /etc/nsswitch.conf || 55 | sed -i 's/^\(group: \)\(.* \)\?\(db\)/\1\2# \3/' \ 56 | /etc/nsswitch.conf 57 | 58 | ! grep -q '^PS1=' /etc/bash.bashrc || 59 | sed -i 's/^PS1=/#&/' /etc/bash.bashrc 60 | 61 | grep -q '^# Fixup git-bash in non login env' /etc/bash.bashrc || 62 | printf "\n# Fixup git-bash in non login env\nshopt -q login_shell || . /etc/profile.d/git-prompt.sh\n" >> /etc/bash.bashrc 63 | 64 | grep -q git-for-windows[^-] etc/pacman.conf || 65 | sed -i -e '/^\[mingw32\]/i[git-for-windows]\nServer = https://dl.bintray.com/$repo/pacman/$arch\n' etc/pacman.conf 66 | 67 | ! grep -A2 git-for-windows[^-] etc/pacman.conf | 68 | grep -q '^SigLevel = Optional' || 69 | sed -i -e '/\[git-for-windows\]/{N;N;s/\nSigLevel = Optional//}' \ 70 | etc/pacman.conf 71 | 72 | uname_m="$(uname -m)" 73 | test i686 = "$uname_m" || 74 | grep -q git-for-windows-mingw32 etc/pacman.conf || 75 | sed -i -e '/^\[mingw32\]/i[git-for-windows-mingw32]\nServer = https://dl.bintray.com/git-for-windows/pacman/i686\n' etc/pacman.conf 76 | test x86_64 = "$uname_m" || 77 | grep -q git-for-windows-mingw64 etc/pacman.conf || 78 | sed -i -e '/^\[mingw32\]/i[git-for-windows-mingw64]\nServer = https://dl.bintray.com/git-for-windows/pacman/x86_64\n' etc/pacman.conf 79 | 80 | test i686 != $"uname -m" || 81 | case "$(md5sum.exe < /msys2.ico)" in 82 | 292ad5cd*) cp /usr/share/git/msys2-32.ico /msys2.ico;; 83 | esac 84 | 85 | test ! -f /etc/post-install/05-home-dir.post || 86 | rm /etc/post-install/05-home-dir.post 87 | 88 | grep -qw usertemp /etc/fstab || 89 | sed -i '$a\ 90 | none /tmp usertemp binary,posix=0,noacl 0 0' /etc/fstab 91 | grep -qw usertemp.*noacl /etc/fstab || 92 | sed -i '$s/^none \/tmp usertemp [^ ]*/&,noacl/' /etc/fstab 93 | 94 | ! grep -q '^export TERM=' /etc/profile || 95 | sed -i 's/^export TERM=/test -n "$TERM" || &/' /etc/profile 96 | 97 | ! grep -q ' $1 == ~\* ' /usr/share/bash-completion/bash_completion || 98 | sed -i 's/\( \$1 == \|printf -v \$2 \)\(~\* \|~%q \)/\1\\\2/' \ 99 | /usr/share/bash-completion/bash_completion 100 | 101 | ! grep -qi '^TMP=' /etc/profile || 102 | sed -i 's/^TE\?MP=/#&/i' /etc/profile 103 | ! grep -q '^unset TMP' /etc/profile || 104 | sed -i 's/^unset TMP/#&/' /etc/profile 105 | grep -q '^test -d "$TMPDIR"' /etc/profile || { 106 | if lineno="$(grep -n '^#TEMP=' /etc/profile)" 107 | then 108 | lineno=${lineno%%:*} 109 | else 110 | lineno='$' 111 | fi 112 | sed -i "$lineno"'a\ 113 | case "$TMP" in *\\\\*) TMP="$(cygpath -m "$TMP")";; esac\ 114 | case "$TEMP" in *\\\\*) TEMP="$(cygpath -m "$TEMP")";; esac\ 115 | test -d "$TMPDIR" || test ! -d "$TMP" || {\ 116 | TMPDIR="$TMP"\ 117 | export TMPDIR\ 118 | }\ 119 | ' /etc/profile 120 | } 121 | 122 | grep -q 'case "\${MSYS2_PATH_TYPE:-inherit}"' /etc/profile || 123 | sed -i 's/{MSYS2_PATH_TYPE:-[^}]*}/{MSYS2_PATH_TYPE:-inherit}/g' \ 124 | /etc/profile 125 | 126 | ! grep -qw PERL_PATH /etc/profile.d/perlbin.sh 2>/dev/null || 127 | sed -i 's/PERL_PATH/PERL_PATH_EXTRA/g' /etc/profile.d/perlbin.sh 128 | 129 | ! grep -q '^# Define default printer' /etc/profile || 130 | sed -i -e '/^# Define default printer/,/^$/d' \ 131 | -e 's/^\(export .* \)PRINTER /\1/' /etc/profile 132 | 133 | ! grep -A3 '^ *autocmd BufReadPost \*' \ 134 | /usr/share/vim/vim80/defaults.vim | 135 | grep -q ' exe "normal! g`\\""' || 136 | sed -i -e '/^ *autocmd BufReadPost \*/,/\\ endif$/s/^/"/' \ 137 | /usr/share/vim/vim80/defaults.vim 138 | 139 | ! grep -q '^if .*command -v getent' /etc/bash.bashrc || 140 | sed -i '/^if .*command -v getent/,/^fi/s/^/#/' /etc/bash.bashrc 141 | 142 | # Ensure that Git for Windows' GPG keyring is still imported 143 | pacman-key --list-keys BB3AA74136C569BB >/dev/null || 144 | pacman-key --populate git-for-windows 145 | } 146 | 147 | post_upgrade () { 148 | post_install 149 | } 150 | -------------------------------------------------------------------------------- /git-extra/git-prompt.sh: -------------------------------------------------------------------------------- 1 | if test -f /etc/profile.d/git-sdk.sh 2 | then 3 | TITLEPREFIX=SDK-${MSYSTEM#MINGW} 4 | else 5 | TITLEPREFIX=$MSYSTEM 6 | fi 7 | 8 | if test -f ~/.config/git/git-prompt.sh 9 | then 10 | . ~/.config/git/git-prompt.sh 11 | else 12 | PS1='\[\033]0;$TITLEPREFIX:$PWD\007\]' # set window title 13 | PS1="$PS1"'\n' # new line 14 | PS1="$PS1"'\[\033[32m\]' # change to green 15 | PS1="$PS1"'\u@\h ' # user@host 16 | PS1="$PS1"'\[\033[35m\]' # change to purple 17 | PS1="$PS1"'$MSYSTEM ' # show MSYSTEM 18 | PS1="$PS1"'\[\033[33m\]' # change to brownish yellow 19 | PS1="$PS1"'\w' # current working directory 20 | if test -z "$WINELOADERNOEXEC" 21 | then 22 | GIT_EXEC_PATH="$(git --exec-path 2>/dev/null)" 23 | COMPLETION_PATH="${GIT_EXEC_PATH%/libexec/git-core}" 24 | COMPLETION_PATH="${COMPLETION_PATH%/lib/git-core}" 25 | COMPLETION_PATH="$COMPLETION_PATH/share/git/completion" 26 | if test -f "$COMPLETION_PATH/git-prompt.sh" 27 | then 28 | . "$COMPLETION_PATH/git-completion.bash" 29 | . "$COMPLETION_PATH/git-prompt.sh" 30 | PS1="$PS1"'\[\033[36m\]' # change color to cyan 31 | PS1="$PS1"'`__git_ps1`' # bash function 32 | fi 33 | fi 34 | PS1="$PS1"'\[\033[0m\]' # change color 35 | PS1="$PS1"'\n' # new line 36 | PS1="$PS1"'$ ' # prompt: always $ 37 | fi 38 | 39 | MSYS2_PS1="$PS1" # for detection by MSYS2 SDK's bash.basrc 40 | -------------------------------------------------------------------------------- /git-extra/git-sdk.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # This profile.d script configures a few things for the Git SDK (but is 4 | # excluded from the end user-facing Git for Windows). 5 | 6 | # If both 32-bit and 64-bit Git for Windows SDK is installed next to each other, 7 | # using the default directory names, mount them as /sdk32 and /sdk64, 8 | # respectively, to make it easier to interact between the two. 9 | 10 | rootdir="$(cygpath -w /)" && 11 | case "$rootdir" in 12 | *\\git-sdk-32|*\\git-sdk-64) 13 | otherarch=$((96-${rootdir##*-})) && 14 | if test ! -d /sdk$otherarch 15 | then 16 | othersdk="${rootdir%??}$otherarch" 17 | test ! -d "$othersdk" || 18 | mount "$othersdk" /sdk$otherarch 2>/dev/null 19 | fi 20 | ;; 21 | esac 22 | -------------------------------------------------------------------------------- /git-extra/git-update: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Compares the currently installed Git for Windows against latest available 4 | # release. If versions differ, the bit matched installer is downloaded and run 5 | # when confirmation to do so is given. 6 | 7 | git_update () { 8 | yn= 9 | while test $# -gt 0 10 | do 11 | case "$1" in 12 | -\?|--?\?|-h|--help) ;; 13 | -y|--yes) yn=y; shift; continue;; 14 | *) echo "Unknown option: $1" >&2;; 15 | esac 16 | printf >&2 '%s\n%s\n\t%s\n' \ 17 | "Usage: git-update [options]" \ 18 | "Options:" \ 19 | "-y, --yes Automatic yes to download and install prompt" 20 | return 1 21 | done 22 | 23 | case "$(uname -m)" in 24 | x86_64) bit=64;; 25 | *) bit=32;; 26 | esac 27 | 28 | releases_url=https://api.github.com/repos/git-for-windows/git/releases 29 | releases=$(curl --silent $releases_url/latest) || return 30 | 31 | latest=$(echo "$releases" | 32 | grep '"tag_name": "v' | 33 | sed -E 's/.*"tag_name": "v([^"]*).*/\1/') 34 | version=$(git --version | sed "s/git version //") 35 | echo "Git for Windows $version (${bit}bit)" >&2 36 | if test "$latest" = "$version" 37 | then 38 | echo "Up to date" >&2 39 | return 40 | fi 41 | 42 | echo "Update $latest is available" 43 | download=$(echo "$releases" | 44 | grep '"browser_download_url": "' | 45 | grep "$bit\-bit\.exe" | 46 | sed -E 's/.*": "([^"]*).*/\1/') 47 | filename=$(echo "$download" | sed -E 's/.*\/([^\/]*)$/\1/') 48 | installer=$(mktemp -t gfw-install-XXXXXXXX.exe) 49 | if test -z "$yn" 50 | then 51 | other_bashes=$(($(ps | grep bash | wc -l)-1)) 52 | if test $other_bashes -le 0 53 | then 54 | warn= 55 | else 56 | warn=" (killing $other_bashes other Bash)" 57 | fi 58 | read -p "Download $filename and install$warn [N/y]? " yn 59 | case "$yn" in 60 | [Yy]*) ;; 61 | *) return 1;; 62 | esac 63 | else 64 | echo "Downloading $filename" >&2 65 | fi 66 | curl -# -L -o $installer $download || return 67 | start "" "$installer" /SILENT 68 | # `ps` without `-W` will automatically only catch MSYS2 processes 69 | # that link to *this* MSYS2 runtime, i.e. no processes from other Git 70 | # installations (e.g. Git for Windows' SDK) will be killed. 71 | ps | grep bash | awk '{print "kill -9 " $2 ";" }' | sh 72 | } 73 | 74 | git_update "$@" 75 | -------------------------------------------------------------------------------- /git-extra/gitattributes: -------------------------------------------------------------------------------- 1 | *.doc diff=astextplain 2 | *.DOC diff=astextplain 3 | *.docx diff=astextplain 4 | *.DOCX diff=astextplain 5 | *.docm diff=astextplain 6 | *.DOCM diff=astextplain 7 | *.dot diff=astextplain 8 | *.DOT diff=astextplain 9 | *.dotm diff=astextplain 10 | *.DOTM diff=astextplain 11 | *.pdf diff=astextplain 12 | *.PDF diff=astextplain 13 | *.rtf diff=astextplain 14 | *.RTF diff=astextplain 15 | -------------------------------------------------------------------------------- /git-extra/gitconfig: -------------------------------------------------------------------------------- 1 | [core] 2 | symlinks = false 3 | autocrlf = true 4 | [color] 5 | diff = auto 6 | status = auto 7 | branch = auto 8 | interactive = true 9 | [pack] 10 | packSizeLimit = 2g 11 | [help] 12 | format = html 13 | [http] 14 | sslCAinfo = /ssl/certs/ca-bundle.crt 15 | [diff "astextplain"] 16 | textconv = astextplain 17 | [rebase] 18 | autosquash = true 19 | -------------------------------------------------------------------------------- /git-extra/inputrc: -------------------------------------------------------------------------------- 1 | # none, visible or audible 2 | set bell-style visible 3 | 4 | # Ask before displaying >40 items 5 | # Since $WINDIR $PATH var can be in $PATH, this could list 6 | # all window executables in C:\WINDOWS 7 | set completion-query-items 40 8 | 9 | # Ignore case for the command-line-completion functionality 10 | # on: default on a Windows style console 11 | # off: default on a *nix style console 12 | set completion-ignore-case on 13 | 14 | # disable/enable 8bit input 15 | set input-meta on 16 | set output-meta on 17 | set convert-meta off 18 | 19 | # visible-stats 20 | # Append a mark according to the file type in a listing 21 | set visible-stats off 22 | set mark-directories on 23 | set mark-symlinked-directories on 24 | 25 | # Beep first, show all only upon double-Tab 26 | set show-all-if-ambiguous off 27 | 28 | # MSYSTEM is emacs based 29 | $if mode=emacs 30 | # Common to Console & RXVT 31 | "\C-?": backward-kill-line # Ctrl-BackSpace 32 | "\e[2~": paste-from-clipboard # "Ins. Key" 33 | "\e[5~": beginning-of-history # Page up 34 | "\e[6~": end-of-history # Page down 35 | 36 | # Mintty 37 | "\e[1;5D": "\eOD" # Ctrl-Left 38 | "\e[1;5C": "\eOC" # Ctrl-Right 39 | "\e[1;5A": "\eOA" # Ctrl-Up 40 | "\e[1;5B": "\eOB" # Ctrl-Down 41 | "\e[1;3D": "\e\e[D" # Alt-Left 42 | "\e[1;3C": "\e\e[C" # Alt-Right 43 | 44 | "\e[Z": complete # Shift-Tab 45 | 46 | $if term=msys # RXVT 47 | "\e[7~": beginning-of-line # Home Key 48 | "\e[8~": end-of-line # End Key 49 | "\e[11~": display-shell-version # F1 50 | "\e[15~": re-read-init-file # F5 51 | "\e[12~": "Function Key 2" 52 | "\e[13~": "Function Key 3" 53 | "\e[14~": "Function Key 4" 54 | "\e[17~": "Function Key 6" 55 | "\e[18~": "Function Key 7" 56 | "\e[19~": "Function Key 8" 57 | "\e[20~": "Function Key 9" 58 | "\e[21~": "Function Key 10" 59 | $else 60 | # Eh, normal Console is not really cygwin anymore, is it? Using 'else' instead. -mstormo 61 | # $if term=cygwin # Console 62 | "\e[1~": beginning-of-line # Home Key 63 | "\e[4~": end-of-line # End Key 64 | "\e[3~": delete-char # Delete Key 65 | "\e\e[C": forward-word # Alt-Right 66 | "\e\e[D": backward-word # Alt-Left 67 | "\e[17~": "Function Key 6" 68 | "\e[18~": "Function Key 7" 69 | "\e[19~": "Function Key 8" 70 | "\e[20~": "Function Key 9" 71 | "\e[21~": "Function Key 10" 72 | "\e[23~": "Function Key 11" 73 | $endif 74 | 75 | $if term=cygwin 76 | "\e[A": previous-history # Cursor Up 77 | "\e[B": next-history # Cursor Down 78 | "\e[C": forward-char # Cursor Right 79 | "\e[D": backward-char # Cursor Left 80 | $endif 81 | $endif 82 | -------------------------------------------------------------------------------- /git-extra/msys2-32.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/ghfw-build-extra/69bd5e6f85e4842f07db71c9618a621154c52254/git-extra/msys2-32.ico -------------------------------------------------------------------------------- /git-extra/notepad: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | die () { 4 | echo "$*" >&2 5 | exit 1 6 | } 7 | 8 | case "$1" in 9 | */.git/*) ;; # needs LF line endings 10 | *) exec notepad.exe "$1" || die "Could not launch notepad.exe";; 11 | esac 12 | 13 | test $# = 1 || 14 | die "Usage: $0 " 15 | 16 | if test -f "$1" 17 | then 18 | case "$(git config i18n.commitencoding 2>/dev/null)" in 19 | ''|utf-8|utf8) unix2dos.exe -m "$1";; 20 | *) unix2dos.exe "$1";; 21 | esac 22 | fi && 23 | notepad.exe "$1" && 24 | dos2unix.exe "$1" && 25 | case "$1" in 26 | */COMMIT_EDITMSG|*\\COMMIT_EDITMSG) 27 | ! columns="$(git config format.commitmessagecolumns)" || { 28 | msg="$(fmt.exe -s -w "$columns" "$1")" && 29 | printf "%s" "$msg" >"$1" 30 | } 31 | ;; 32 | esac 33 | -------------------------------------------------------------------------------- /git-extra/vi: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | exec vim "$@" 4 | -------------------------------------------------------------------------------- /git-extra/vimrc: -------------------------------------------------------------------------------- 1 | " Setting some decent VIM settings for programming 2 | 3 | set ai " set auto-indenting on for programming 4 | set showmatch " automatically show matching brackets. works like it does in bbedit. 5 | set vb " turn on the "visual bell" - which is much quieter than the "audio blink" 6 | set ruler " show the cursor position all the time 7 | set laststatus=2 " make the last line where the status is two lines deep so you can see status always 8 | set backspace=indent,eol,start " make that backspace key work the way it should 9 | set nocompatible " vi compatible is LAME 10 | set background=dark " Use colours that work well on a dark background (Console is usually black) 11 | set showmode " show the current mode 12 | set clipboard=unnamed " set clipboard to unnamed to access the system clipboard under windows 13 | syntax on " turn syntax highlighting on by default 14 | 15 | " Show EOL type and last modified timestamp, right after the filename 16 | set statusline=%<%F%h%m%r\ [%{&ff}]\ (%{strftime(\"%H:%M\ %d/%m/%Y\",getftime(expand(\"%:p\")))})%=%l,%c%V\ %P 17 | 18 | "------------------------------------------------------------------------------ 19 | " Only do this part when compiled with support for autocommands. 20 | if has("autocmd") 21 | "Set UTF-8 as the default encoding for commit messages 22 | autocmd BufReadPre COMMIT_EDITMSG,MERGE_MSG,git-rebase-todo setlocal fileencodings=utf-8 23 | 24 | "Remember the positions in files with some git-specific exceptions" 25 | autocmd BufReadPost * 26 | \ if line("'\"") > 0 && line("'\"") <= line("$") 27 | \ && expand("%") !~ "COMMIT_EDITMSG" 28 | \ && expand("%") !~ "MERGE_EDITMSG" 29 | \ && expand("%") !~ "ADD_EDIT.patch" 30 | \ && expand("%") !~ "addp-hunk-edit.diff" 31 | \ && expand("%") !~ "git-rebase-todo" | 32 | \ exe "normal g`\"" | 33 | \ endif 34 | 35 | autocmd BufNewFile,BufRead *.patch set filetype=diff 36 | autocmd BufNewFile,BufRead *.diff set filetype=diff 37 | 38 | autocmd Syntax diff 39 | \ highlight WhiteSpaceEOL ctermbg=red | 40 | \ match WhiteSpaceEOL /\(^+.*\)\@<=\s\+$/ 41 | 42 | autocmd Syntax gitcommit setlocal textwidth=74 43 | endif " has("autocmd") 44 | -------------------------------------------------------------------------------- /git-extra/wordpad: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | WORDPAD="$(ls {"$PROGRAMFILES/Windows NT","$SYSTEMROOT"}/*/wordpad.exe 2>&- | head -1)" 4 | 5 | test $# = 1 && 6 | case "$1" in 7 | \\*|/*|?:*) ;; # do nothing 8 | *) set "$(pwd -W)/$1";; 9 | esac 10 | 11 | test -x "$WORDPAD" && exec "$WORDPAD" "$@" 12 | 13 | echo "Could not launch $WORDPAD" 14 | exit 1 15 | -------------------------------------------------------------------------------- /git-for-windows-keyring/.gitignore: -------------------------------------------------------------------------------- 1 | /git-for-windows-keyring-1.1.*.src.tar.gz 2 | /git-for-windows-keyring-1.1.*-i686.pkg.tar.xz 3 | /git-for-windows-keyring-1.1.*-x86_64.pkg.tar.xz 4 | /pkg/ 5 | /src/ 6 | -------------------------------------------------------------------------------- /git-for-windows-keyring/PKGBUILD: -------------------------------------------------------------------------------- 1 | # Maintainer: Johannes Schindelin 2 | 3 | pkgname=git-for-windows-keyring 4 | _ver_base=1.1 5 | pkgver=1.1.1.4474718 6 | pkgrel=1 7 | pkgdesc='Git for Windows PGP keyring' 8 | arch=('i686' 'x86_64') 9 | groups=('base') 10 | license=('GPL') 11 | install="${pkgname}.install" 12 | source=("git-for-windows.gpg" 13 | "git-for-windows-revoked" 14 | "git-for-windows-trusted") 15 | sha256sums=('d78a08ef89374593cb6908492372fb8dc9367bd2836051e31c0227ef8fb1efc8' 16 | 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855' 17 | '423aa5304baad07732343098f31d6de690bcfdfee44cb665ddf8ef9e685947de') 18 | 19 | pkgver() { 20 | cd "$startdir" 21 | if test git-for-windows-keyring/PKGBUILD = \ 22 | "$(git diff --name-only HEAD^.. -- .)" 23 | then 24 | tip_commit=HEAD^ 25 | else 26 | tip_commit=HEAD 27 | fi 28 | printf "%s.%s.%s" "${_ver_base}" "$(git rev-list --count $tip_commit -- .)" \ 29 | "$(git rev-parse --short $tip_commit)" 30 | } 31 | 32 | package() { 33 | cd "${srcdir}" 34 | install -d -m755 $pkgdir/usr/share/pacman/keyrings 35 | install -m644 git-for-windows.gpg $pkgdir/usr/share/pacman/keyrings 36 | install -m644 git-for-windows-revoked $pkgdir/usr/share/pacman/keyrings 37 | install -m644 git-for-windows-trusted $pkgdir/usr/share/pacman/keyrings 38 | } 39 | -------------------------------------------------------------------------------- /git-for-windows-keyring/git-for-windows-keyring.install: -------------------------------------------------------------------------------- 1 | post_upgrade() { 2 | if usr/bin/pacman-key -l >/dev/null 2>&1; then 3 | usr/bin/pacman-key --populate git-for-windows 4 | fi 5 | } 6 | 7 | post_install() { 8 | if [ -x usr/bin/pacman-key ]; then 9 | post_upgrade 10 | fi 11 | } 12 | -------------------------------------------------------------------------------- /git-for-windows-keyring/git-for-windows-revoked: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/ghfw-build-extra/69bd5e6f85e4842f07db71c9618a621154c52254/git-for-windows-keyring/git-for-windows-revoked -------------------------------------------------------------------------------- /git-for-windows-keyring/git-for-windows-trusted: -------------------------------------------------------------------------------- 1 | 3B6D86A1BA7701CD0F23AED888138B9E1A9F3986:6: 2 | -------------------------------------------------------------------------------- /git-for-windows-keyring/git-for-windows.gpg: -------------------------------------------------------------------------------- 1 | -----BEGIN PGP PUBLIC KEY BLOCK----- 2 | 3 | mQINBFIzTswBEAC9tDU5aPykFPTC2i5ueoHjEbNdP3R9jisw79B1j+pa2JAiVFHl 4 | fQJfVb1Os6q8st0ItCLXOKLnOCz2WSIYcQp4bvn4aLY65t0GDRY+ipq0hXeaZ+tA 5 | nbsL+wEB73dcI/+YvNHJFmTbdAiawrgA813EceVXAR6W5BWIKaOH8hDMXkHDqy4I 6 | wtBKTelO23cOHlWNd9xBFC7mu8Ct7Mj2cRisMbNAyQXjFbC3aogYYoZIY7VWCmiB 7 | i6iGHzIiVmdW8xRoKsardm+dxfCDxn27uUDOeTO2EGSnPjXHQnTBz95VmDb0GdRg 8 | 7qd75HC01qk6AL8xdGUfnIMReC0HKEkIAc3cFXl1eqhJ+HQENf9R2w4fKhGqPLZm 9 | kJWAs4FxCu1IsjhSwBgnNVPhUOzGSz1Q2OKiy4J2E1xCn7kFyylFAcbtFmXzpgxW 10 | 8yvEsNGrsBBuEbnOID8mnMZpUCf3oWW8S+3RgttxDyIFxdILkHF3ZutGo3ffNBAP 11 | yiTglC8Jqa78NcqVuMt+0rTcNWJ/EvvaWnmBbut/ancQ6/Zm6cP3M4gdxdOxUmyR 12 | RRJlI/T5LicVAz9TTXbet7Cs1dXvfU7OsyD3iR7sIm6RNHuZV4wKeLwfr3hWObEQ 13 | 8DEdpHzRKNjDz3IG8wvQ1DCagCRd65jUMX7LImq/Z/h8NH+LxPuPLIXx5wARAQAB 14 | tDBKb2hhbm5lcyBTY2hpbmRlbGluIDxqb2hhbm5lcy5zY2hpbmRlbGluQGdteC5k 15 | ZT6JAjgEEwECACIFAlIzTswCGwMGCwkIBwMCBhUIAgkKCwQWAgMBAh4BAheAAAoJ 16 | EIgTi54anzmGUW8P/jSdN123QciJ0yGsmEPmWL3oO7hWJ2Kmt4F8L94g3BSHEQU8 17 | Zuc7hyJ7WIgxftXBZfVOP8mLzFLSebzJbGD8S8PoCs7aO4upq7VvoyRPar6Lyn91 18 | q6hnkbP3OWMeIE+nRACpoDxtckvL4mIAEfYmLbpYyBR79rI9H8O+mkGuvsA6getf 19 | s9nahjwcS+hLO550uXEi54FQ6wje4VXGFLin/8Hv/tfE1Lhc6MX8kwXiTovzd0T6 20 | 4FH0gqPSGp+dpbOsNQKzYMv/6SzC0oreiX5oTzj+QG9wPwht9pGeNN1zu6zWTuiy 21 | g91i3lcse/BGVMpY3e44I1iSp7HcFKKsSXkWWiSW5nKNugwYr+T83LCbJ6UOAdzg 22 | tGZdNgyayKHqidVLfD1qfO7MsQjqGC254gUJbzei5fRQ0YBC++cef0+NeGp4gBhW 23 | Jx3eRn7dx8i8m9FXDfaZsIKESFpUMeF4rv1zvgHvS0rJ15UyfIH8iwG9JrX5N6qs 24 | i4wzg3fLJ0AuPS8XqcPGSjL/aSe/K2ZyRjoZUFtJO4XTosaIhiHBGOm3E9awn273 25 | UAuR3tl+8Buzoz7s23clutM96I8qZtxjbGVHQhi17qjcLh7KYOvzb6gxgymooCGl 26 | Ie0s600s2ayfIq1AbZ8eLvtf4ujKczHvlZIA9+pN8rjEtErVS4T/RihvvUbWuQIN 27 | BFIzTswBEAC6U2uFgLrGu3edmFete4uMQAvilONLTVGjyVk8KW1t9CxSTLqy70X9 28 | OBYXy2KRQOtfkDGq7013MCWjgqyEXgH1OndNCcGHO/cWNA1kqG1YLXBF+1MmpKbv 29 | 5NFchVQyuBRpqkrqLnnl1n16yJkt4ctcmDh64SuosbVOXl8VOiUgD7MwCNG0WVm/ 30 | 9NcXzSh6QS22xaYXG8VYTJc6eG0l7hlhF9Y5PEJu23DOoYfS/4PluQeqg8XYguae 31 | t8Q5tMGRr09eZp5WOIobQI7AldR9sSdGieheSyHphD0F2/rI8wnNIwDwjNPpcAOe 32 | pfZUXHDhAFyLtisyM4524i28ByKE2jiVOqr5MAOsyNKkpuiC2ZRyGr9l+9Sb5cv+ 33 | 8rYAqInhFDnFp4ZOhwS+CjXkg3I0a5CxaL2ZSQi2mgRs70NfEsdloqY+PgXVwCAe 34 | IMUyNtbHsMF4lYJBrNo54IPPQgNz4hexmxzSIT8Bp8M8vwalarnFEszdC95owt0m 35 | K7gsYfeU0eLI9QAu2AWJLyvjfV1N+U15Bq9ZTQhyga2vMSDfXuiGkHIU5EocCmvs 36 | ZcShgbhyRrkt3PW9kFUpjwj6R1W8ldzxj3Fg1mrHcYJrQZEfvlwFkgRYCM+316UY 37 | BfOxpRTpMYDNV3/8EVRa3X/2OzL9xK8AGgHzx0EULZMDU00EUSjskQARAQABiQIf 38 | BBgBAgAJBQJSM07MAhsMAAoJEIgTi54anzmGRhkQAI1tLd8QRNpRAzNhbuE6yCU+ 39 | x02abjD7adfO+BDpCmn/xqwY1v3hCBVLIsxvoA/rcXdc4joMCULqxzldZGF37Xbp 40 | xkti65otznuTzceiOgd4rmP1WF639VJwY7WICSzhs9Uot6HEDBCeHaIz0QlEkdHy 41 | kRXH75ZnekJ1z0flFrybKKomsHF5qLLMP3Zf6RV+CURcgDaeJek1IHae/+v3QzxU 42 | sDz5PumZw6ZJZhRy5l0o0UQCY/z5XlKTO+jSLhdxW8ZWaNka/qJLZKMorpCTqf7V 43 | 0KnBWjwLDvBZLfiO9r+3uEj2dcICBoEp+zk+jePU/kS6zLCLr95J5zS/Z7yxFp8e 44 | 7xwOZUIKeidCbel6Nmlaomx3Rt3GWW4xToB0hLHI/4UGWLYjnhvMNOcE/bgKpCym 45 | CGX9WjXwX/tDgPSWsNT13ujLL8g9czEYKYTbVbfTN4mlXj/edHysD2X75VGjuLYG 46 | rRdeCnSscNPGkgpoyhuEdWCeZ3w6M6dqIVQUL9NJIIRi0I/V3Huatj+vRDlgGb84 47 | Q0EwXzKFEFb2TbgoctY5MUvbjYAKAJxKxr8zAYdFzLezhjcfTeFAWX6UCN1fV5Eg 48 | x6Lg3lNK3HGpNaDp3VJNDScQiwHITu33nGAOc9EyYKKQC4YUU5q4RjdQXmOS7QKe 49 | yODWVXGPmiT5N+fvACrkuQINBFLZsMEBEADFBf/y7m5eaoZIsMyI6SINZERXR+ER 50 | uESO92eNHRJ24zh8AD3wSvfxI5VqRODVnSIeB03gMgFDUy7fMD8+gaA88IQa9+/P 51 | 2NxK6yPNnqirtkj7y+OMcHzsfnnVS6IUkv4aBFwfnD5sFAFtR/rKMNADCuAEpf4T 52 | EaBolp7Zev9DbzAU/sqDSwUQkFXlp7uspWMwCaUH0gBK5uy5IlBao7A9I2qPv6EK 53 | X5eezLCRQ2BQCwmyVwPNY/HAWz0272h4nuNLN2ZuAQIdvsXbJBpuUg0rG2AWdaF+ 54 | crI8C+Tb5Kpbmpm3KbqzSmgyC2T1bl9boPWbE6SLObDsWvSKmpDy2DT+prHFStt8 55 | ImVbk5LAOPKurrw76Mb7sG8ogN3HyNUMe2yKSb4FjeV18by8AjioTxdsXAthloFn 56 | BYzPhF/bN/8I536S7SnO/vmF402NbhRuMg7emKUXds/Ej8LY3AgQ0Oa6YuqUPo2J 57 | L3HNFR+1L2k1FL0siVXVbUvxU9ZymICu7TVDfFeKIT1KDLEht6g7Jm22gSIQZgym 58 | pChqqsvtxEdcm5D52ds6HdBCAHEMXeMWYejhbdX+voKul3r+NumRy9srjXdQtOih 59 | KO3pRxNc6ItF6YGeDijvKYWhN5jJR7XcpTqgZJbedEUlKJtbRGF+wi1iCGXUllG4 60 | 5L/P53FIH6rN7QARAQABiQQ+BBgBAgAJBQJS2bDBAhsCAikJEIgTi54anzmGwV0g 61 | BBkBAgAGBQJS2bDBAAoJELs6p0E2xWm7HTMP/jHtx0WF38NYosyOMVnyEV4RLUWv 62 | gmpimOq4yl870k8yJ+Qq7ZCDGTpUXoshH4pUoOiMYmy6OduXLHSzzdCJh+n1GOQP 63 | vAnqTeBWFq/TTAkS+eWRzW0z5wE8NqVBETSf5Ediuk/bZyhGv7rkzkSUawIF97MH 64 | p53uF1Ai6/+gZLr+RWDsKlhp43fN8O0EZ9zV8Mg55nmrSsBbUY1kA5jepGpTkhTb 65 | s3zB44Mi1pXydD9rhJI9QpcEQOb75xUkN6rpzWDCtun5P12sHc6eLUlixPgo6H5Q 66 | MHPQU3hGel6jamFpsCG3dW36ix29bIb5cLraV04XhhFxiu4qzIgj4ffrSeBGo9Y1 67 | Hjz1YK11DPYRiC51YEqoaujap3mhPEANlMyrFiNLgC49bN3Wjs7fQifZ/YpULLI9 68 | qOiELc4P3p7Z6U3B/yS9wNE41wsejEiyVuz4G81AAFJsSho60IrshHXv1BUT9KK7 69 | GOMh/JQZMxrGTrLsCkoJonFY2p7L5ZqDa+MqseG1/1Am1ALGx3E42oZHnxinFCT6 70 | pu2edt9xksdqNydjyB/ruujsUdHiAC0DdzekciPpwsgDbeS7ZrGq1qK4hibglnEY 71 | 49o+ZPd9n8Ywy1OHo1TvEo1F+fwiWGZhGFRAWYDzig5k7Ftg6crSOQrKv76gtf3/ 72 | EY1eWYBInlEw1otH2cIQAJPm1mhfPHnbVqBAaL1fXiPWeoSl8c7cEPdzqTnu+m7P 73 | ypHiZZdwArugxW0wmH3yUAeMqeSyIWQEs5wfIJCL9iABbG6Zhj8DbO1yR8BzeRvR 74 | 1f39dubQ8ShmwIZqxXSwMcoUeCV1cs5adSjTC+vgLy19W/GnLFSP0F6vSY9ZLKrk 75 | X6Mt8q5uOvR4DkCyxLzINl9tGy7dxrvz0GLBDNXTDXwHOVAMOtuFQS3eQXdUF6oL 76 | i0P3hzqFpIKOJO7poV4BL2O3+oNUR4vZroSkG88NkU1NwK2erAdyIBgywbJCEGbF 77 | 24f7lqA0IROI47y81wWlM1L6JeuA/UjHySKoEzp9AZGYknGzsMBmuHlH/jxACPC5 78 | dSSeiWkLM/cNQqG+wiTI00fyiz2nXfrJ6aYpwB5sUDcIfdhgTpjKNAwEVtQxFb/D 79 | QJ0CPWIVpI7qChofSCnD6UscykqGz/LlaqZSgDEoDugfeCqmpzoen1KbdH/5k7JK 80 | yA6fQ5PlPcwaAjDdkaNmfowLIzTgrtnQoGTBNqOExbYf7U+J5ENgPJ++rOSfk8sx 81 | oLJF9zcdx4dD7n4tXU0hN1lSzkDRza2N8k1rnme5H1MveqG6MhuCo8G+4Sg5I11L 82 | 5V6AW+BBJsxJ4mon0h/4gjDjX/ok1X8bWaOzVsvJCaiOVywnSTgN1hQJ+sBhEHVL 83 | =2+rD 84 | -----END PGP PUBLIC KEY BLOCK----- 85 | -------------------------------------------------------------------------------- /git-for-windows.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /git-for-windows.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/ghfw-build-extra/69bd5e6f85e4842f07db71c9618a621154c52254/git-for-windows.xcf -------------------------------------------------------------------------------- /git-shell/release.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Build the portable Git Shell 4 | 5 | die () { 6 | echo "$*" >&1 7 | exit 1 8 | } 9 | 10 | output_directory="$HOME" 11 | while test $# -gt 0 12 | do 13 | case "$1" in 14 | --output) 15 | shift 16 | output_directory="$1" 17 | ;; 18 | --output=*) 19 | output_directory="${1#*=}" 20 | ;; 21 | -*) 22 | die "Unknown option: $1" 23 | ;; 24 | *) 25 | break 26 | esac 27 | shift 28 | done 29 | 30 | test $# -gt 0 || 31 | die "Usage: $0 [--output=] [optional components]" 32 | 33 | test -d "$output_directory" || 34 | die "Directory inaccessible: '$output_directory'" 35 | 36 | ARCH="$(uname -m)" 37 | case "$ARCH" in 38 | i686) 39 | BITNESS=32 40 | MD_ARG=128M 41 | ;; 42 | x86_64) 43 | BITNESS=64 44 | MD_ARG=256M 45 | ;; 46 | *) 47 | die "Unhandled architecture: $ARCH" 48 | ;; 49 | esac 50 | VERSION=$1 51 | shift 52 | TARGET="$output_directory"/PortableGit.7z 53 | OPTS7="-m0=lzma -mx=9 -md=$MD_ARG -mfb=273 -ms=256M " 54 | 55 | SCRIPT_PATH="$(cd "$(dirname "$0")" && pwd)" 56 | 57 | case "$SCRIPT_PATH" in 58 | *" "*) 59 | die "This script cannot handle spaces in $SCRIPT_PATH" 60 | ;; 61 | esac 62 | 63 | 64 | # Generate a couple of files dynamically 65 | 66 | cp "$SCRIPT_PATH/../LICENSE.txt" "$SCRIPT_PATH/root/" || 67 | die "Could not copy license file" 68 | 69 | mkdir -p "$SCRIPT_PATH/root/etc" || 70 | die "Could not make etc/ directory" 71 | 72 | mkdir -p "$SCRIPT_PATH/root/tmp" || 73 | die "Could not make tmp/ directory" 74 | 75 | mkdir -p "$SCRIPT_PATH/root/bin" || 76 | die "Could not make bin/ directory" 77 | 78 | cp /cmd/git.exe "$SCRIPT_PATH/root/bin/git.exe" && 79 | cp /mingw$BITNESS/share/git/compat-bash.exe "$SCRIPT_PATH/root/bin/bash.exe" && 80 | cp /mingw$BITNESS/share/git/compat-bash.exe "$SCRIPT_PATH/root/bin/sh.exe" || 81 | die "Could not install bin/ redirectors" 82 | 83 | cp "$SCRIPT_PATH/../post-install.bat" "$SCRIPT_PATH/root/" || 84 | die "Could not copy post-install script" 85 | 86 | mkdir -p "$SCRIPT_PATH/root/mingw$BITNESS/etc" && 87 | cp /mingw$BITNESS/etc/gitconfig \ 88 | "$SCRIPT_PATH/root/mingw$BITNESS/etc/gitconfig" && 89 | git config -f "$SCRIPT_PATH/root/mingw$BITNESS/etc/gitconfig" \ 90 | credential.helper manager || 91 | die "Could not configure Git-Credential-Manager as default" 92 | 93 | # Make a list of files to include 94 | LIST="$(ARCH=$ARCH BITNESS=$BITNESS \ 95 | PACKAGE_VERSIONS_FILE="$SCRIPT_PATH"/root/etc/package-versions.txt \ 96 | sh "$SCRIPT_PATH"/../make-file-list.sh "$@" | 97 | grep -v "^mingw$BITNESS/etc/gitconfig$")" || 98 | die "Could not generate file list" 99 | 100 | rm -rf "$SCRIPT_PATH/root/mingw$BITNESS/libexec/git-core" && 101 | mkdir -p "$SCRIPT_PATH/root/mingw$BITNESS/libexec/git-core" && 102 | ln $(echo "$LIST" | sed -n "s|^mingw$BITNESS/bin/[^/]*\.dll$|/&|p") \ 103 | "$SCRIPT_PATH/root/mingw$BITNESS/libexec/git-core/" || 104 | die "Could not copy .dll files into libexec/git-core/" 105 | 106 | # fingerprint the tip so we can version this installer correctly 107 | git rev-parse HEAD | tr -d '\n' > "$SCRIPT_PATH/root/VERSION" 108 | 109 | # 7-Zip will strip absolute paths completely... therefore, we can add another 110 | # root directory like this: 111 | 112 | LIST="$LIST $SCRIPT_PATH/root/*" 113 | 114 | # Make the self-extracting package 115 | 116 | type 7za || 117 | pacman -Sy --noconfirm p7zip || 118 | die "Could not install 7-Zip" 119 | 120 | cd / && 7za a $OPTS7 $TARGET $LIST 121 | echo "Success! You will find the new installer at \"$TARGET\"." -------------------------------------------------------------------------------- /git-shell/root/etc/post-install/13-copy-dlls.post: -------------------------------------------------------------------------------- 1 | hardlink_all_dlls () { 2 | exec_path="$(git --exec-path)" || 3 | return 4 | 5 | test ! -e "$exec_path/dlls-copied" || 6 | return 7 | 8 | prefix_path="${exec_path%libexec/git-core}" 9 | ln "$prefix_path/bin/git.exe" "$exec_path/dlls-copied" || { 10 | touch "$exec_path/dlls-copied" 11 | return 12 | } 13 | 14 | if test "a$prefix_path" != "a$exec_path" 15 | then 16 | for dll in "$prefix_path"bin/*.dll 17 | do 18 | ln -f "$dll" "$exec_path" || 19 | echo "ERROR: could not link $dll $exec_path" >&2 20 | done 21 | fi 22 | } 23 | 24 | hardlink_all_dlls 25 | -------------------------------------------------------------------------------- /git-tfs/.gitignore: -------------------------------------------------------------------------------- 1 | pkg 2 | src 3 | *.zip 4 | *.xz -------------------------------------------------------------------------------- /git-tfs/PKGBUILD: -------------------------------------------------------------------------------- 1 | # Maintainer: Brendan Forster 2 | 3 | pkgname=('git-tfs') 4 | pkgver=0.21.0 5 | pkgrel=2 6 | pkgdesc="A Git/TFS bridge" 7 | arch=('i686' 'x86_64') 8 | url="https://github.com/git-tfs/git-tfs" 9 | license=('Apache 2.0') 10 | depends=('git-extra') 11 | 12 | source=("https://github.com/git-tfs/git-tfs/releases/download/v$pkgver/GitTfs-v$pkgver.zip") 13 | 14 | md5sums=('4468af4b8a4318c2dcbba2cea617cfa1') 15 | 16 | package() { 17 | install -d -m755 $pkgdir/usr/bin 18 | 19 | install -d -m755 $pkgdir/usr/share/git-tfs 20 | install -m644 NOTICE $pkgdir/usr/share/git-tfs/NOTICE 21 | install -m644 LICENSE $pkgdir/usr/share/git-tfs/LICENSE 22 | install -m644 README.md $pkgdir/usr/share/git-tfs/README.md 23 | install -m644 *.dll $pkgdir/usr/share/git-tfs/ 24 | install -m644 *.exe $pkgdir/usr/share/git-tfs/ 25 | install -m644 *.exe.config $pkgdir/usr/share/git-tfs/ 26 | 27 | install -d -m755 $pkgdir/usr/share/git-tfs/NativeBinaries 28 | install -d -m755 $pkgdir/usr/share/git-tfs/NativeBinaries/amd64 29 | install -m755 NativeBinaries/amd64/*.dll $pkgdir/usr/share/git-tfs/NativeBinaries/amd64/ 30 | install -d -m755 $pkgdir/usr/share/git-tfs/NativeBinaries/x86 31 | install -m755 NativeBinaries/x86/*.dll $pkgdir/usr/share/git-tfs/NativeBinaries/x86/ 32 | } 33 | 34 | -------------------------------------------------------------------------------- /git.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/ghfw-build-extra/69bd5e6f85e4842f07db71c9618a621154c52254/git.ico -------------------------------------------------------------------------------- /github-extra/.gitignore: -------------------------------------------------------------------------------- 1 | pkg 2 | *.zip 3 | *.xz -------------------------------------------------------------------------------- /github-extra/PKGBUILD: -------------------------------------------------------------------------------- 1 | # Maintainer: Brendan Forster 2 | 3 | pkgname=('github-extra') 4 | pkgver=1.1.0 5 | pkgrel=1 6 | pkgdesc="Environment customizations for Git Shell" 7 | arch=('i686') 8 | url="https://github.com/github/ghfw-build-extra" 9 | license=('Apache 2.0') 10 | install='github-extra.install' 11 | depends=('git-extra') 12 | 13 | prepare() { 14 | test $startdir/$pkgname.install -nt $startdir/$pkgname.install.in && 15 | test $startdir/$pkgname.install -nt $startdir/resources/gitconfig && 16 | test $startdir/$pkgname.install -nt $startdir/resources/gitattributes && 17 | test $startdir/$pkgname.install -nt $startdir/resources/ssh_config || 18 | sed -e "/^@@GITCONFIG@@$/r $startdir/resources/gitconfig" \ 19 | -e "/^@@GITCONFIG@@$/d" \ 20 | -e "/^@@GITATTRIBUTES@@$/r $startdir/resources/gitattributes" \ 21 | -e "/^@@GITATTRIBUTES@@$/d" \ 22 | -e "/^@@SSHCONFIG@@$/r $startdir/resources/ssh_config" \ 23 | -e "/^@@SSHCONFIG@@$/d" \ 24 | <$startdir/$pkgname.install.in >$startdir/$pkgname.install 25 | } 26 | 27 | package() { 28 | install -d -m755 $pkgdir/${MINGW_PREFIX}/etc 29 | install -m755 $srcdir/gitattributes.suggested $pkgdir/${MINGW_PREFIX}/etc/gitattributes.suggested 30 | install -m755 $srcdir/gitignore.suggested $pkgdir/${MINGW_PREFIX}/etc/gitignore.suggested 31 | install -d -m755 $pkgdir/usr/bin 32 | install -m755 $srcdir/ssh-noprompt $pkgdir/usr/bin/ssh-noprompt 33 | } 34 | 35 | -------------------------------------------------------------------------------- /github-extra/github-extra.install: -------------------------------------------------------------------------------- 1 | export LC_ALL=C 2 | 3 | post_install () { 4 | for dir in mingw32 mingw64 5 | do 6 | test ! -d /$dir || 7 | test -f /$dir/etc/gitconfig || 8 | cat > /$dir/etc/gitconfig <<\GITCONFIG 9 | [alias] 10 | c = commit 11 | co = checkout 12 | dt = difftool 13 | mt = mergetool 14 | praise = blame 15 | ff = merge --ff-only 16 | st = status 17 | sync = !git pull && git push 18 | 19 | [apply] 20 | whitespace = nowarn 21 | 22 | [core] 23 | symlinks = false 24 | autocrlf = true 25 | editor = gitpad 26 | preloadindex = true 27 | fscache = true 28 | 29 | [color] 30 | diff = auto 31 | status = auto 32 | branch = auto 33 | interactive = true 34 | ui = true 35 | 36 | [pack] 37 | packSizeLimit = 2g 38 | 39 | [help] 40 | format = html 41 | 42 | [http] 43 | sslcainfo = /usr/ssl/certs/ca-bundle.crt 44 | 45 | [diff "astextplain"] 46 | textconv = astextplain 47 | 48 | [rebase] 49 | autosquash = true 50 | 51 | [credential] 52 | helper = !github --credentials 53 | 54 | [filter "ghcleansmudge"] 55 | clean = cat 56 | smudge = cat 57 | 58 | [push] 59 | default = upstream 60 | 61 | [diff] 62 | tool = vs2013 63 | algorithm = histogram 64 | 65 | [difftool] 66 | prompt = false 67 | [difftool "bc4"] 68 | cmd = \"c:/program files (x86)/beyond compare 3/bcomp.exe\" \"$LOCAL\" \"$REMOTE\" 69 | [difftool "p4"] 70 | cmd = \"c:/program files/Perforce/p4merge.exe\" \"$LOCAL\" \"$REMOTE\" 71 | [difftool "vs2012"] 72 | cmd = \"c:/program files (x86)/microsoft visual studio 11.0/common7/ide/devenv.exe\" '//diff' \"$LOCAL\" \"$REMOTE\" 73 | [difftool "vs2013"] 74 | cmd = \"c:/program files (x86)/microsoft visual studio 12.0/common7/ide/devenv.exe\" '//diff' \"$LOCAL\" \"$REMOTE\" 75 | 76 | [merge] 77 | tool = bc3 78 | [mergetool] 79 | prompt = false 80 | keepBackup = false 81 | [mergetool "bc3"] 82 | cmd = \"c:/program files (x86)/beyond compare 3/bcomp.exe\" \"$LOCAL\" \"$REMOTE\" \"$BASE\" \"$MERGED\" 83 | trustExitCode = true 84 | [mergetool "p4"] 85 | cmd = \"c:/program files/Perforce/p4merge.exe\" \"$BASE\" \"$LOCAL\" \"$REMOTE\" \"$MERGED\" 86 | trustExitCode = false 87 | GITCONFIG 88 | test ! -d /$dir || 89 | test -f /$dir/etc/gitattributes || 90 | cat > /$dir/etc/gitattributes <<\GITATTRIBUTES 91 | # Custom for Visual Studio 92 | *.cs diff=csharp 93 | 94 | # Standard to msysgit 95 | *.doc diff=astextplain 96 | *.DOC diff=astextplain 97 | *.docx diff=astextplain 98 | *.DOCX diff=astextplain 99 | *.dot diff=astextplain 100 | *.DOT diff=astextplain 101 | *.pdf diff=astextplain 102 | *.PDF diff=astextplain 103 | *.rtf diff=astextplain 104 | *.RTF diff=astextplain 105 | 106 | GITATTRIBUTES 107 | done 108 | 109 | test -f /etc/ssh/ssh_config || 110 | cat > /etc/ssh/ssh_config <<\SSHCONFIG 111 | Host * 112 | StrictHostKeyChecking no 113 | UserKnownHostsFile=/dev/null 114 | 115 | Host github.com 116 | StrictHostKeyChecking no 117 | UserKnownHostsFile=/dev/null 118 | IdentityFile=~/.ssh/github_rsa 119 | 120 | SSHCONFIG 121 | } 122 | 123 | post_upgrade () { 124 | post_install 125 | } 126 | -------------------------------------------------------------------------------- /github-extra/github-extra.install.in: -------------------------------------------------------------------------------- 1 | export LC_ALL=C 2 | 3 | post_install () { 4 | for dir in mingw32 mingw64 5 | do 6 | test ! -d /$dir || 7 | test -f /$dir/etc/gitconfig || 8 | cat > /$dir/etc/gitconfig <<\GITCONFIG 9 | @@GITCONFIG@@ 10 | GITCONFIG 11 | test ! -d /$dir || 12 | test -f /$dir/etc/gitattributes || 13 | cat > /$dir/etc/gitattributes <<\GITATTRIBUTES 14 | @@GITATTRIBUTES@@ 15 | 16 | GITATTRIBUTES 17 | done 18 | 19 | test -f /etc/ssh/ssh_config || 20 | cat > /etc/ssh/ssh_config <<\SSHCONFIG 21 | @@SSHCONFIG@@ 22 | 23 | SSHCONFIG 24 | } 25 | 26 | post_upgrade () { 27 | post_install 28 | } 29 | -------------------------------------------------------------------------------- /github-extra/resources/gitattributes: -------------------------------------------------------------------------------- 1 | # Custom for Visual Studio 2 | *.cs diff=csharp 3 | 4 | # Standard to msysgit 5 | *.doc diff=astextplain 6 | *.DOC diff=astextplain 7 | *.docx diff=astextplain 8 | *.DOCX diff=astextplain 9 | *.dot diff=astextplain 10 | *.DOT diff=astextplain 11 | *.pdf diff=astextplain 12 | *.PDF diff=astextplain 13 | *.rtf diff=astextplain 14 | *.RTF diff=astextplain 15 | -------------------------------------------------------------------------------- /github-extra/resources/gitconfig: -------------------------------------------------------------------------------- 1 | [alias] 2 | c = commit 3 | co = checkout 4 | dt = difftool 5 | mt = mergetool 6 | praise = blame 7 | ff = merge --ff-only 8 | st = status 9 | sync = !git pull && git push 10 | 11 | [apply] 12 | whitespace = nowarn 13 | 14 | [core] 15 | symlinks = false 16 | autocrlf = true 17 | editor = gitpad 18 | preloadindex = true 19 | fscache = true 20 | 21 | [color] 22 | diff = auto 23 | status = auto 24 | branch = auto 25 | interactive = true 26 | ui = true 27 | 28 | [pack] 29 | packSizeLimit = 2g 30 | 31 | [help] 32 | format = html 33 | 34 | [http] 35 | sslcainfo = /usr/ssl/certs/ca-bundle.crt 36 | 37 | [diff "astextplain"] 38 | textconv = astextplain 39 | 40 | [rebase] 41 | autosquash = true 42 | 43 | [credential] 44 | helper = !github --credentials 45 | 46 | [filter "ghcleansmudge"] 47 | clean = cat 48 | smudge = cat 49 | 50 | [push] 51 | default = upstream 52 | 53 | [diff] 54 | tool = vs2013 55 | algorithm = histogram 56 | 57 | [difftool] 58 | prompt = false 59 | [difftool "bc4"] 60 | cmd = \"c:/program files (x86)/beyond compare 3/bcomp.exe\" \"$LOCAL\" \"$REMOTE\" 61 | [difftool "p4"] 62 | cmd = \"c:/program files/Perforce/p4merge.exe\" \"$LOCAL\" \"$REMOTE\" 63 | [difftool "vs2012"] 64 | cmd = \"c:/program files (x86)/microsoft visual studio 11.0/common7/ide/devenv.exe\" '//diff' \"$LOCAL\" \"$REMOTE\" 65 | [difftool "vs2013"] 66 | cmd = \"c:/program files (x86)/microsoft visual studio 12.0/common7/ide/devenv.exe\" '//diff' \"$LOCAL\" \"$REMOTE\" 67 | 68 | [merge] 69 | tool = bc3 70 | [mergetool] 71 | prompt = false 72 | keepBackup = false 73 | [mergetool "bc3"] 74 | cmd = \"c:/program files (x86)/beyond compare 3/bcomp.exe\" \"$LOCAL\" \"$REMOTE\" \"$BASE\" \"$MERGED\" 75 | trustExitCode = true 76 | [mergetool "p4"] 77 | cmd = \"c:/program files/Perforce/p4merge.exe\" \"$BASE\" \"$LOCAL\" \"$REMOTE\" \"$MERGED\" 78 | trustExitCode = false 79 | -------------------------------------------------------------------------------- /github-extra/resources/ssh_config: -------------------------------------------------------------------------------- 1 | Host * 2 | StrictHostKeyChecking no 3 | UserKnownHostsFile=/dev/null 4 | 5 | Host github.com 6 | StrictHostKeyChecking no 7 | UserKnownHostsFile=/dev/null 8 | IdentityFile=~/.ssh/github_rsa 9 | -------------------------------------------------------------------------------- /github-extra/src/gitattributes.suggested: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | 7 | # Standard to msysgit 8 | *.doc diff=astextplain 9 | *.DOC diff=astextplain 10 | *.docx diff=astextplain 11 | *.DOCX diff=astextplain 12 | *.dot diff=astextplain 13 | *.DOT diff=astextplain 14 | *.pdf diff=astextplain 15 | *.PDF diff=astextplain 16 | *.rtf diff=astextplain 17 | *.RTF diff=astextplain 18 | -------------------------------------------------------------------------------- /github-extra/src/gitignore.suggested: -------------------------------------------------------------------------------- 1 | ################# 2 | ## Eclipse 3 | ################# 4 | 5 | *.pydevproject 6 | .project 7 | .metadata 8 | bin/ 9 | tmp/ 10 | *.tmp 11 | *.bak 12 | *.swp 13 | *~.nib 14 | local.properties 15 | .classpath 16 | .settings/ 17 | .loadpath 18 | 19 | # External tool builders 20 | .externalToolBuilders/ 21 | 22 | # Locally stored "Eclipse launch configurations" 23 | *.launch 24 | 25 | # CDT-specific 26 | .cproject 27 | 28 | # PDT-specific 29 | .buildpath 30 | 31 | 32 | ################# 33 | ## Visual Studio 34 | ################# 35 | 36 | ## Ignore Visual Studio temporary files, build results, and 37 | ## files generated by popular Visual Studio add-ons. 38 | 39 | # User-specific files 40 | *.suo 41 | *.user 42 | *.sln.docstates 43 | 44 | # Build results 45 | 46 | [Dd]ebug/ 47 | [Rr]elease/ 48 | x64/ 49 | build/ 50 | [Bb]in/ 51 | [Oo]bj/ 52 | 53 | # MSTest test Results 54 | [Tt]est[Rr]esult*/ 55 | [Bb]uild[Ll]og.* 56 | 57 | *_i.c 58 | *_p.c 59 | *.ilk 60 | *.meta 61 | *.obj 62 | *.pch 63 | *.pdb 64 | *.pgc 65 | *.pgd 66 | *.rsp 67 | *.sbr 68 | *.tlb 69 | *.tli 70 | *.tlh 71 | *.tmp 72 | *.tmp_proj 73 | *.log 74 | *.vspscc 75 | *.vssscc 76 | .builds 77 | *.pidb 78 | *.log 79 | *.scc 80 | 81 | # Visual C++ cache files 82 | ipch/ 83 | *.aps 84 | *.ncb 85 | *.opensdf 86 | *.sdf 87 | *.cachefile 88 | 89 | # Visual Studio profiler 90 | *.psess 91 | *.vsp 92 | *.vspx 93 | 94 | # Guidance Automation Toolkit 95 | *.gpState 96 | 97 | # ReSharper is a .NET coding add-in 98 | _ReSharper*/ 99 | *.[Rr]e[Ss]harper 100 | 101 | # TeamCity is a build add-in 102 | _TeamCity* 103 | 104 | # DotCover is a Code Coverage Tool 105 | *.dotCover 106 | 107 | # NCrunch 108 | *.ncrunch* 109 | .*crunch*.local.xml 110 | 111 | # Installshield output folder 112 | [Ee]xpress/ 113 | 114 | # DocProject is a documentation generator add-in 115 | DocProject/buildhelp/ 116 | DocProject/Help/*.HxT 117 | DocProject/Help/*.HxC 118 | DocProject/Help/*.hhc 119 | DocProject/Help/*.hhk 120 | DocProject/Help/*.hhp 121 | DocProject/Help/Html2 122 | DocProject/Help/html 123 | 124 | # Click-Once directory 125 | publish/ 126 | 127 | # Publish Web Output 128 | *.Publish.xml 129 | *.pubxml 130 | *.publishproj 131 | 132 | # NuGet Packages Directory 133 | ## TODO: If you have NuGet Package Restore enabled, uncomment the next line 134 | #packages/ 135 | 136 | # Windows Azure Build Output 137 | csx 138 | *.build.csdef 139 | 140 | # Windows Store app package directory 141 | AppPackages/ 142 | 143 | # Others 144 | sql/ 145 | *.Cache 146 | ClientBin/ 147 | [Ss]tyle[Cc]op.* 148 | ~$* 149 | *~ 150 | *.dbmdl 151 | *.[Pp]ublish.xml 152 | *.pfx 153 | *.publishsettings 154 | 155 | # RIA/Silverlight projects 156 | Generated_Code/ 157 | 158 | # Backup & report files from converting an old project file to a newer 159 | # Visual Studio version. Backup files are not needed, because we have git ;-) 160 | _UpgradeReport_Files/ 161 | Backup*/ 162 | UpgradeLog*.XML 163 | UpgradeLog*.htm 164 | 165 | # SQL Server files 166 | App_Data/*.mdf 167 | App_Data/*.ldf 168 | 169 | ############# 170 | ## Windows detritus 171 | ############# 172 | 173 | # Windows image file caches 174 | Thumbs.db 175 | ehthumbs.db 176 | 177 | # Folder config file 178 | Desktop.ini 179 | 180 | # Recycle Bin used on file shares 181 | $RECYCLE.BIN/ 182 | 183 | # Mac crap 184 | .DS_Store 185 | 186 | 187 | ############# 188 | ## Python 189 | ############# 190 | 191 | *.py[cod] 192 | 193 | # Packages 194 | *.egg 195 | *.egg-info 196 | dist/ 197 | build/ 198 | eggs/ 199 | parts/ 200 | var/ 201 | sdist/ 202 | develop-eggs/ 203 | .installed.cfg 204 | 205 | # Installer logs 206 | pip-log.txt 207 | 208 | # Unit test / coverage reports 209 | .coverage 210 | .tox 211 | 212 | #Translations 213 | *.mo 214 | 215 | #Mr Developer 216 | .mr.developer.cfg 217 | -------------------------------------------------------------------------------- /github-extra/src/ssh-noprompt: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | ssh -oBatchMode=yes $@ -------------------------------------------------------------------------------- /install-custom-packages.sh: -------------------------------------------------------------------------------- 1 | # add git-tfs to the environment 2 | echo "installing git-tfs pre-requisite..." 3 | pushd git-tfs > /dev/null 4 | makepkg-mingw -f 5 | gitTfsPackage=$(ls -t git-tfs-* | head -n 1) 6 | pacman -U --noconfirm $gitTfsPackage 7 | popd 8 | 9 | # add github-extra to the environment 10 | echo "installing github-extra pre-requisite..." 11 | pushd github-extra > /dev/null 12 | makepkg-mingw -f 13 | githubExtraPackage=$(ls -t github-extra-* | head -n 1) 14 | pacman -U --noconfirm $githubExtraPackage 15 | popd 16 | -------------------------------------------------------------------------------- /installer/HowToRelease.txt: -------------------------------------------------------------------------------- 1 | How to create a Windows Release 2 | =============================== 3 | 4 | A setup executable is named as follows 5 | 6 | - it starts with Git; 7 | - followed by the Git for Windows version of the form A.B.C.D where 8 | A.B.C is the Git version on which the release is based, and 9 | A.B.C.windows.D is the tag in Git for Windows' repository 10 | - followed by the "bitness", i.e. "-32-bit" or "-64-bit" 11 | 12 | Examples: 13 | 14 | Git-2.3.5.3-64-bit.exe 15 | 16 | There are not necessary Git for Windows releases for each official Git 17 | version. A Git for Windows release is tagged by a tag having a postfix 18 | '.windows.[0-9]+'. 19 | 20 | Here is a step-by-step instruction for the maintainer: 21 | 22 | # perform a merging rebase 23 | cd /usr/src/git 24 | git remote add git https://github.com/git/git 25 | git fetch git 26 | git checkout master 27 | BASE="$(git rev-parse ":/Start the merging-rebase")" 28 | ../build-extra/./shears.sh --merging --onto $BASE 29 | 30 | # check diff of diff (before vs after merging rebase) 31 | git diff ..origin/master > prev.diff 32 | git diff ..master > curr.diff 33 | git diff --no-index prev.diff curr.diff 34 | 35 | # verify that the test suite passes 36 | make -j5 all 37 | cd t 38 | /usr/bin/time prove -j 5 --state=failed,save ./t[0-9]*.sh 39 | 40 | # tag the new version 41 | git tag -a .windows. 42 | git push origin .windows. 43 | 44 | # package the new version 45 | cd /usr/src/MINGW-packages/mingw-w64-git 46 | makepkg-mingw -s 47 | 48 | # publish the new packages 49 | /usr/src/build-extra/pacman-mirror.sh fetch 50 | /usr/src/build-extra/pacman-mirror.sh add mingw-w64-** 51 | /usr/src/build-extra/pacman-mirror.sh push 52 | 53 | # ensure current setup is up-to-date (including the Git packages) 54 | pacman -Syu 55 | # on 32-bit, quit all MSys shells and run \autorebase.bat now 56 | 57 | # make installer (after updating the release notes) 58 | /usr/src/build-extra/installer/release.sh 59 | 60 | # upload to GitHub 61 | /usr/src/build-extra/upload-to-github.sh .windows. \ 62 | ~/Git-*.exe 63 | 64 | # Reply to Junio's announcement. 65 | # Start the subject of your email with '[ANNOUNCE]'. 66 | -------------------------------------------------------------------------------- /installer/InnoSetup/ISCC.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/ghfw-build-extra/69bd5e6f85e4842f07db71c9618a621154c52254/installer/InnoSetup/ISCC.exe -------------------------------------------------------------------------------- /installer/InnoSetup/ISCmplr.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/ghfw-build-extra/69bd5e6f85e4842f07db71c9618a621154c52254/installer/InnoSetup/ISCmplr.dll -------------------------------------------------------------------------------- /installer/InnoSetup/ISPP.chm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/ghfw-build-extra/69bd5e6f85e4842f07db71c9618a621154c52254/installer/InnoSetup/ISPP.chm -------------------------------------------------------------------------------- /installer/InnoSetup/ISPP.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/ghfw-build-extra/69bd5e6f85e4842f07db71c9618a621154c52254/installer/InnoSetup/ISPP.dll -------------------------------------------------------------------------------- /installer/InnoSetup/ISetup.chm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/ghfw-build-extra/69bd5e6f85e4842f07db71c9618a621154c52254/installer/InnoSetup/ISetup.chm -------------------------------------------------------------------------------- /installer/InnoSetup/Languages/BrazilianPortuguese.isl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/ghfw-build-extra/69bd5e6f85e4842f07db71c9618a621154c52254/installer/InnoSetup/Languages/BrazilianPortuguese.isl -------------------------------------------------------------------------------- /installer/InnoSetup/Languages/Catalan.isl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/ghfw-build-extra/69bd5e6f85e4842f07db71c9618a621154c52254/installer/InnoSetup/Languages/Catalan.isl -------------------------------------------------------------------------------- /installer/InnoSetup/Languages/Corsican.isl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/ghfw-build-extra/69bd5e6f85e4842f07db71c9618a621154c52254/installer/InnoSetup/Languages/Corsican.isl -------------------------------------------------------------------------------- /installer/InnoSetup/Languages/Czech.isl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/ghfw-build-extra/69bd5e6f85e4842f07db71c9618a621154c52254/installer/InnoSetup/Languages/Czech.isl -------------------------------------------------------------------------------- /installer/InnoSetup/Languages/Danish.isl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/ghfw-build-extra/69bd5e6f85e4842f07db71c9618a621154c52254/installer/InnoSetup/Languages/Danish.isl -------------------------------------------------------------------------------- /installer/InnoSetup/Languages/Dutch.isl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/ghfw-build-extra/69bd5e6f85e4842f07db71c9618a621154c52254/installer/InnoSetup/Languages/Dutch.isl -------------------------------------------------------------------------------- /installer/InnoSetup/Languages/Finnish.isl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/ghfw-build-extra/69bd5e6f85e4842f07db71c9618a621154c52254/installer/InnoSetup/Languages/Finnish.isl -------------------------------------------------------------------------------- /installer/InnoSetup/Languages/French.isl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/ghfw-build-extra/69bd5e6f85e4842f07db71c9618a621154c52254/installer/InnoSetup/Languages/French.isl -------------------------------------------------------------------------------- /installer/InnoSetup/Languages/German.isl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/ghfw-build-extra/69bd5e6f85e4842f07db71c9618a621154c52254/installer/InnoSetup/Languages/German.isl -------------------------------------------------------------------------------- /installer/InnoSetup/Languages/Greek.isl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/ghfw-build-extra/69bd5e6f85e4842f07db71c9618a621154c52254/installer/InnoSetup/Languages/Greek.isl -------------------------------------------------------------------------------- /installer/InnoSetup/Languages/Hebrew.isl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/ghfw-build-extra/69bd5e6f85e4842f07db71c9618a621154c52254/installer/InnoSetup/Languages/Hebrew.isl -------------------------------------------------------------------------------- /installer/InnoSetup/Languages/Hungarian.isl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/ghfw-build-extra/69bd5e6f85e4842f07db71c9618a621154c52254/installer/InnoSetup/Languages/Hungarian.isl -------------------------------------------------------------------------------- /installer/InnoSetup/Languages/Italian.isl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/ghfw-build-extra/69bd5e6f85e4842f07db71c9618a621154c52254/installer/InnoSetup/Languages/Italian.isl -------------------------------------------------------------------------------- /installer/InnoSetup/Languages/Japanese.isl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/ghfw-build-extra/69bd5e6f85e4842f07db71c9618a621154c52254/installer/InnoSetup/Languages/Japanese.isl -------------------------------------------------------------------------------- /installer/InnoSetup/Languages/Norwegian.isl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/ghfw-build-extra/69bd5e6f85e4842f07db71c9618a621154c52254/installer/InnoSetup/Languages/Norwegian.isl -------------------------------------------------------------------------------- /installer/InnoSetup/Languages/Polish.isl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/ghfw-build-extra/69bd5e6f85e4842f07db71c9618a621154c52254/installer/InnoSetup/Languages/Polish.isl -------------------------------------------------------------------------------- /installer/InnoSetup/Languages/Portuguese.isl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/ghfw-build-extra/69bd5e6f85e4842f07db71c9618a621154c52254/installer/InnoSetup/Languages/Portuguese.isl -------------------------------------------------------------------------------- /installer/InnoSetup/Languages/Russian.isl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/ghfw-build-extra/69bd5e6f85e4842f07db71c9618a621154c52254/installer/InnoSetup/Languages/Russian.isl -------------------------------------------------------------------------------- /installer/InnoSetup/Languages/ScottishGaelic.isl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/ghfw-build-extra/69bd5e6f85e4842f07db71c9618a621154c52254/installer/InnoSetup/Languages/ScottishGaelic.isl -------------------------------------------------------------------------------- /installer/InnoSetup/Languages/SerbianCyrillic.isl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/ghfw-build-extra/69bd5e6f85e4842f07db71c9618a621154c52254/installer/InnoSetup/Languages/SerbianCyrillic.isl -------------------------------------------------------------------------------- /installer/InnoSetup/Languages/SerbianLatin.isl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/ghfw-build-extra/69bd5e6f85e4842f07db71c9618a621154c52254/installer/InnoSetup/Languages/SerbianLatin.isl -------------------------------------------------------------------------------- /installer/InnoSetup/Languages/Slovenian.isl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/ghfw-build-extra/69bd5e6f85e4842f07db71c9618a621154c52254/installer/InnoSetup/Languages/Slovenian.isl -------------------------------------------------------------------------------- /installer/InnoSetup/Languages/Spanish.isl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/ghfw-build-extra/69bd5e6f85e4842f07db71c9618a621154c52254/installer/InnoSetup/Languages/Spanish.isl -------------------------------------------------------------------------------- /installer/InnoSetup/Languages/Turkish.isl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/ghfw-build-extra/69bd5e6f85e4842f07db71c9618a621154c52254/installer/InnoSetup/Languages/Turkish.isl -------------------------------------------------------------------------------- /installer/InnoSetup/Languages/Ukrainian.isl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/ghfw-build-extra/69bd5e6f85e4842f07db71c9618a621154c52254/installer/InnoSetup/Languages/Ukrainian.isl -------------------------------------------------------------------------------- /installer/InnoSetup/Setup.e32: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/ghfw-build-extra/69bd5e6f85e4842f07db71c9618a621154c52254/installer/InnoSetup/Setup.e32 -------------------------------------------------------------------------------- /installer/InnoSetup/SetupLdr.e32: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/ghfw-build-extra/69bd5e6f85e4842f07db71c9618a621154c52254/installer/InnoSetup/SetupLdr.e32 -------------------------------------------------------------------------------- /installer/InnoSetup/WizModernImage-IS.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/ghfw-build-extra/69bd5e6f85e4842f07db71c9618a621154c52254/installer/InnoSetup/WizModernImage-IS.bmp -------------------------------------------------------------------------------- /installer/InnoSetup/WizModernImage.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/ghfw-build-extra/69bd5e6f85e4842f07db71c9618a621154c52254/installer/InnoSetup/WizModernImage.bmp -------------------------------------------------------------------------------- /installer/InnoSetup/WizModernSmallImage-IS.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/ghfw-build-extra/69bd5e6f85e4842f07db71c9618a621154c52254/installer/InnoSetup/WizModernSmallImage-IS.bmp -------------------------------------------------------------------------------- /installer/InnoSetup/WizModernSmallImage.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/ghfw-build-extra/69bd5e6f85e4842f07db71c9618a621154c52254/installer/InnoSetup/WizModernSmallImage.bmp -------------------------------------------------------------------------------- /installer/InnoSetup/isbunzip.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/ghfw-build-extra/69bd5e6f85e4842f07db71c9618a621154c52254/installer/InnoSetup/isbunzip.dll -------------------------------------------------------------------------------- /installer/InnoSetup/isbzip.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/ghfw-build-extra/69bd5e6f85e4842f07db71c9618a621154c52254/installer/InnoSetup/isbzip.dll -------------------------------------------------------------------------------- /installer/InnoSetup/islzma.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/ghfw-build-extra/69bd5e6f85e4842f07db71c9618a621154c52254/installer/InnoSetup/islzma.dll -------------------------------------------------------------------------------- /installer/InnoSetup/islzma32.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/ghfw-build-extra/69bd5e6f85e4842f07db71c9618a621154c52254/installer/InnoSetup/islzma32.exe -------------------------------------------------------------------------------- /installer/InnoSetup/islzma64.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/ghfw-build-extra/69bd5e6f85e4842f07db71c9618a621154c52254/installer/InnoSetup/islzma64.exe -------------------------------------------------------------------------------- /installer/InnoSetup/isunzlib.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/ghfw-build-extra/69bd5e6f85e4842f07db71c9618a621154c52254/installer/InnoSetup/isunzlib.dll -------------------------------------------------------------------------------- /installer/InnoSetup/iszlib.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/ghfw-build-extra/69bd5e6f85e4842f07db71c9618a621154c52254/installer/InnoSetup/iszlib.dll -------------------------------------------------------------------------------- /installer/InnoSetup/license.txt: -------------------------------------------------------------------------------- 1 | Inno Setup License 2 | ================== 3 | 4 | Except where otherwise noted, all of the documentation and software included 5 | in the Inno Setup package is copyrighted by Jordan Russell. 6 | 7 | Copyright (C) 1997-2016 Jordan Russell. All rights reserved. 8 | Portions Copyright (C) 2000-2016 Martijn Laan. All rights reserved. 9 | 10 | This software is provided "as-is," without any express or implied warranty. 11 | In no event shall the author be held liable for any damages arising from the 12 | use of this software. 13 | 14 | Permission is granted to anyone to use this software for any purpose, 15 | including commercial applications, and to alter and redistribute it, 16 | provided that the following conditions are met: 17 | 18 | 1. All redistributions of source code files must retain all copyright 19 | notices that are currently in place, and this list of conditions without 20 | modification. 21 | 22 | 2. All redistributions in binary form must retain all occurrences of the 23 | above copyright notice and web site addresses that are currently in 24 | place (for example, in the About boxes). 25 | 26 | 3. The origin of this software must not be misrepresented; you must not 27 | claim that you wrote the original software. If you use this software to 28 | distribute a product, an acknowledgment in the product documentation 29 | would be appreciated but is not required. 30 | 31 | 4. Modified versions in source or binary form must be plainly marked as 32 | such, and must not be misrepresented as being the original software. 33 | 34 | 35 | Jordan Russell 36 | jr-2010 AT jrsoftware.org 37 | http://www.jrsoftware.org/ 38 | -------------------------------------------------------------------------------- /installer/NOTICE.txt: -------------------------------------------------------------------------------- 1 | You may find a copy of the source code, if and as required under the license, at http://3rdpartysource.microsoft.com. You may also obtain a copy of the source code, if and as required under the license, by sending a check or money order for US $5.00 to: 2 | Source Code Compliance Team 3 | Microsoft Corporation 4 | One Microsoft Way 5 | Redmond, WA 98052 USA 6 | -------------------------------------------------------------------------------- /installer/checklist.txt: -------------------------------------------------------------------------------- 1 | After building new installers, check that 2 | 3 | - the version and date are correct in the release notes!!! 4 | - Git Bash 5 | - starts 6 | - switching to a repository changes the prompt to show the branch 7 | - `git log` is colorful and stops after the first page 8 | - `gitk` runs and shows the history 9 | - `git gui` runs and does not complain about a missing repository 10 | - `git help git` opens the page and it has no verbatim `linkgit:` 11 | - `curl --version` lists `IPv6` in the last line 12 | - Git CMD 13 | - starts 14 | - `git log` in a repository is colorful and stops after the first page 15 | - `gitk` runs and shows the history 16 | - `git gui` runs and does not complain about a missing repository 17 | - Git GUI 18 | - starts 19 | - remembers the latest repositories 20 | - can open one of them 21 | -------------------------------------------------------------------------------- /installer/environment.inc.iss: -------------------------------------------------------------------------------- 1 | [Code] 2 | 3 | // Returns the value(s) of the environment variable "VarName", which is tokenized 4 | // by ";" into an array of strings. This makes it easy query PATH-like variables 5 | // in addition to normal variables. If "AllUsers" is true, the common variables 6 | // are searched, else the user-specific ones. 7 | function GetEnvStrings(VarName:string;AllUsers:Boolean):TArrayOfString; 8 | var 9 | Path:string; 10 | i:Longint; 11 | p:Integer; 12 | begin 13 | Path:=''; 14 | 15 | // See http://www.jrsoftware.org/isfaq.php#env 16 | if AllUsers then begin 17 | // We ignore errors here. The resulting array of strings will be empty. 18 | RegQueryStringValue(HKEY_LOCAL_MACHINE,'SYSTEM\CurrentControlSet\Control\Session Manager\Environment',VarName,Path); 19 | end else begin 20 | // We ignore errors here. The resulting array of strings will be empty. 21 | RegQueryStringValue(HKEY_CURRENT_USER,'Environment',VarName,Path); 22 | end; 23 | 24 | // Fallback for built-in variables which are not stored in the Registry. 25 | if Length(Path)=0 then begin 26 | Path:=ExpandConstant('{%'+VarName+'}'); 27 | end; 28 | 29 | // Make sure we have at least one semicolon. 30 | Path:=Path+';'; 31 | 32 | // Split the directories in PATH into an array of strings. 33 | i:=0; 34 | SetArrayLength(Result,0); 35 | 36 | p:=Pos(';',Path); 37 | while p>0 do begin 38 | SetArrayLength(Result,i+1); 39 | if p>1 then begin 40 | Result[i]:=Copy(Path,1,p-1); 41 | i:=i+1; 42 | end; 43 | Path:=Copy(Path,p+1,Length(Path)); 44 | p:=Pos(';',Path); 45 | end; 46 | end; 47 | 48 | // Sets the contents of the specified environment variable for the current process. 49 | function SetEnvironmentVariable(lpName,lpValue:String):Boolean; 50 | #ifdef UNICODE 51 | external 'SetEnvironmentVariableW@Kernel32.dll stdcall delayload'; 52 | #else 53 | external 'SetEnvironmentVariableA@Kernel32.dll stdcall delayload'; 54 | #endif 55 | 56 | // Sets the environment variable "VarName" to the concatenation of "DirStrings" 57 | // using ";" as the delimiter. If "Expandable" is true, the "DirStrings" will be 58 | // written as expandable strings, i.e. they may in turn contain environment variable 59 | // names that are expanded at evaluation time. If "AllUsers" is true, a common 60 | // variable is set, else a user-specific one. If "DeleteIfEmpty" is true and 61 | // "DirStrings" is empty, "VarName" is deleted instead of set if it exists. 62 | function SetEnvStrings(VarName:string;DirStrings:TArrayOfString;Expandable,AllUsers,DeleteIfEmpty:Boolean):Boolean; 63 | var 64 | Path,KeyName:string; 65 | i:Longint; 66 | begin 67 | // Merge all non-empty directory strings into a PATH variable. 68 | Path:=''; 69 | for i:=0 to GetArrayLength(DirStrings)-1 do begin 70 | if Length(DirStrings[i])>0 then begin 71 | if Length(Path)>0 then begin 72 | Path:=Path+';'+DirStrings[i]; 73 | end else begin 74 | Path:=DirStrings[i]; 75 | end; 76 | end; 77 | end; 78 | 79 | // See http://www.jrsoftware.org/isfaq.php#env 80 | if AllUsers then begin 81 | KeyName:='SYSTEM\CurrentControlSet\Control\Session Manager\Environment'; 82 | if DeleteIfEmpty and (Length(Path)=0) then begin 83 | Result:=(not RegValueExists(HKEY_LOCAL_MACHINE,KeyName,VarName)) or 84 | RegDeleteValue(HKEY_LOCAL_MACHINE,KeyName,VarName); 85 | end else begin 86 | if Expandable then begin 87 | Result:=RegWriteExpandStringValue(HKEY_LOCAL_MACHINE,KeyName,VarName,Path); 88 | end else begin 89 | Result:=RegWriteStringValue(HKEY_LOCAL_MACHINE,KeyName,VarName,Path); 90 | end; 91 | end; 92 | end else begin 93 | KeyName:='Environment'; 94 | if DeleteIfEmpty and (Length(Path)=0) then begin 95 | Result:=(not RegValueExists(HKEY_CURRENT_USER,KeyName,VarName)) or 96 | RegDeleteValue(HKEY_CURRENT_USER,KeyName,VarName); 97 | end else begin 98 | if Expandable then begin 99 | Result:=RegWriteExpandStringValue(HKEY_CURRENT_USER,KeyName,VarName,Path); 100 | end else begin 101 | Result:=RegWriteStringValue(HKEY_CURRENT_USER,KeyName,VarName,Path); 102 | end; 103 | end; 104 | end; 105 | 106 | // Also update the environment of the current process. 107 | SetEnvironmentVariable(VarName,Path); 108 | end; 109 | -------------------------------------------------------------------------------- /installer/git.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/ghfw-build-extra/69bd5e6f85e4842f07db71c9618a621154c52254/installer/git.bmp -------------------------------------------------------------------------------- /installer/gitsmall.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/ghfw-build-extra/69bd5e6f85e4842f07db71c9618a621154c52254/installer/gitsmall.bmp -------------------------------------------------------------------------------- /installer/helpers.inc.iss: -------------------------------------------------------------------------------- 1 | [Code] 2 | 3 | // Copies a NULL-terminated array of characters to a string. 4 | function ArrayToString(Chars:array of Char):String; 5 | var 6 | Len,i:Longint; 7 | begin 8 | Len:=GetArrayLength(Chars); 9 | SetLength(Result,Len); 10 | 11 | i:=0; 12 | while (i#0) do begin 13 | Result[i+1]:=Chars[i]; 14 | i:=i+1; 15 | end; 16 | 17 | SetLength(Result,i); 18 | end; 19 | 20 | // Copies a string to a NULL-terminated array of characters. 21 | function StringToArray(Str:String):array of Char; 22 | var 23 | Len,i:Longint; 24 | begin 25 | Len:=Length(Str); 26 | SetArrayLength(Result,Len+1); 27 | 28 | i:=0; 29 | while i0 then begin 48 | Delete(FileName,1,DriveChars); 49 | FileName:=VirtualStore+FileName; 50 | if FileExists(FileName) and (not DeleteFile(FileName)) then begin 51 | // This is not a critical error, so just notify the user and continue. 52 | Log('Line {#__LINE__}: Unable delete "'+FileName+'".'); 53 | end; 54 | end; 55 | end; 56 | 57 | // Returns the path to the common or user shell folder as specified in "Param". 58 | function GetShellFolder(Param:string):string; 59 | begin 60 | if IsAdminLoggedOn then begin 61 | Param:='{common'+Param+'}'; 62 | end else begin 63 | Param:='{user'+Param+'}'; 64 | end; 65 | Result:=ExpandConstant(Param); 66 | end; 67 | 68 | // As IsComponentSelected() is not supported during uninstall, this work-around 69 | // simply checks the Registry. This is unreliable if the user runs the installer 70 | // twice, the first time selecting the component, the second deselecting it. 71 | function IsComponentInstalled(Component:String):Boolean; 72 | var 73 | UninstallKey,UninstallValue:String; 74 | Value:String; 75 | begin 76 | Result:=False; 77 | 78 | UninstallKey:='SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{#APP_NAME}_is1'; 79 | UninstallValue:='Inno Setup: Selected Components'; 80 | 81 | if RegQueryStringValue(HKEY_LOCAL_MACHINE,UninstallKey,UninstallValue,Value) then begin 82 | Result:=(Pos(Component,Value)>0); 83 | end; 84 | end; 85 | 86 | // Checks whether the specified directory can be created and written to 87 | // by creating all intermediate directories and a temporary file. 88 | function IsDirWritable(DirName:String):Boolean; 89 | var 90 | FirstExistingDir,FirstDirToCreate,FileName:String; 91 | begin 92 | Result:=True; 93 | 94 | // We cannot use ForceDirectories here as we need to track the first directory to be created. 95 | FirstExistingDir:=ExpandFileName(DirName); 96 | while not DirExists(FirstExistingDir) do begin 97 | FirstDirToCreate:=FirstExistingDir; 98 | FirstExistingDir:=ExtractFileDir(FirstDirToCreate); 99 | 100 | if FirstExistingDir=FirstDirToCreate then begin 101 | Result:=False; 102 | Exit; 103 | end; 104 | end; 105 | Log('Line {#__LINE__}: First directory in hierarchy that already exists is "' + FirstExistingDir + '".') 106 | 107 | if Length(FirstDirToCreate)>0 then begin 108 | Log('Line {#__LINE__}: First directory in hierarchy needs to be created is "' + FirstDirToCreate + '".') 109 | 110 | if ForceDirectories(DirName) then begin 111 | FileName:=GenerateUniqueName(DirName,'.txt'); 112 | Log('Line {#__LINE__}: Trying to write to temporary file "' + Filename + '".') 113 | 114 | if SaveStringToFile(FileName,'This file is writable.',False) then begin 115 | if not DeleteFile(FileName) then begin 116 | Result:=False; 117 | end; 118 | end else begin 119 | Result:=False; 120 | end; 121 | end else begin 122 | Result:=False; 123 | end; 124 | 125 | if not DelTree(FirstDirToCreate,True,False,True) then begin 126 | Result:=False; 127 | end; 128 | end; 129 | end; 130 | 131 | // Allow for custom settings to be saved to the INF file set by the /SAVEINF parameter. 132 | // http://www.vincenzo.net/isxkb/index.php?title=Remembering_Custom_Page_Settings 133 | var 134 | LoadInfFilename,SaveInfFilename:String; 135 | 136 | procedure UpdateInfFilenames; 137 | begin 138 | LoadInfFilename:=ExpandFileName(ExpandConstant('{param:loadinf}')); 139 | SaveInfFilename:=ExpandFileName(ExpandConstant('{param:saveinf}')); 140 | end; 141 | 142 | function ShouldLoadInf:Boolean; 143 | begin 144 | Result:=(LoadInfFilename<>''); 145 | end; 146 | 147 | function ShouldSaveInf:Boolean; 148 | begin 149 | Result:=(SaveInfFilename<>''); 150 | end; 151 | 152 | function LoadInfString(Section,Key,Default:String):String; 153 | begin 154 | Result:=GetIniString(Section,Key,Default,LoadInfFilename); 155 | end; 156 | 157 | procedure SaveInfString(Section,Key,Value:String); 158 | begin 159 | SetIniString(Section,Key,Value,SaveInfFilename); 160 | end; 161 | -------------------------------------------------------------------------------- /installer/putty.inc.iss: -------------------------------------------------------------------------------- 1 | [Code] 2 | 3 | const 4 | TortoiseGitInstallKey='SOFTWARE\TortoiseGit'; 5 | TortoiseSVNInstallKey='SOFTWARE\TortoiseSVN'; 6 | TortoiseCVSUninstallKey='SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\TortoiseCVS_is1'; 7 | PuTTYUninstallKey='SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\PuTTY_is1'; 8 | PuTTYPrivateKeyAssoc='PuTTYPrivateKey\shell\open\command'; 9 | 10 | // Tries to detect the path to a PuTTY installation / an application that comes 11 | // with an improved version of Plink. TortoisePlink from TortoiseGit/SVN features a 12 | // GUI dialog to accept new host keys, for example. 13 | // Prefer TortoiseGitPlink (optimized for Git) over TortoisePlink. 14 | function GuessPlinkExecutable:string; 15 | begin 16 | // Prefer TortoisePlink over vanilla Plink for its GUI dialog to accept host keys. 17 | if (IsWin64 and RegQueryStringValue(HKEY_LOCAL_MACHINE_64,TortoiseGitInstallKey,'Directory',Result)) or 18 | RegQueryStringValue(HKEY_LOCAL_MACHINE_32,TortoiseGitInstallKey,'Directory',Result) then begin 19 | // C:\Program Files\TortoiseGit\ 20 | Result:=Result+'bin\'; 21 | // C:\Program Files\TortoiseGit\bin\ 22 | end else if (IsWin64 and RegQueryStringValue(HKEY_LOCAL_MACHINE_64,TortoiseSVNInstallKey,'Directory',Result)) or 23 | RegQueryStringValue(HKEY_LOCAL_MACHINE_32,TortoiseSVNInstallKey,'Directory',Result) then begin 24 | // C:\Program Files\TortoiseSVN\ 25 | Result:=Result+'bin\'; 26 | // C:\Program Files\TortoiseSVN\bin\ 27 | end else begin 28 | if not (IsWin64 and RegQueryStringValue(HKEY_LOCAL_MACHINE_64,TortoiseCVSUninstallKey,'InstallLocation',Result)) then begin 29 | RegQueryStringValue(HKEY_LOCAL_MACHINE_32,TortoiseCVSUninstallKey,'InstallLocation',Result); 30 | end; 31 | // C:\Program Files\TortoiseCVS\ 32 | end; 33 | 34 | if DirExists(Result) then begin 35 | if FileExists(Result+'TortoiseGitPlink.exe') then begin 36 | Result:=Result+'TortoiseGitPlink.exe' 37 | Exit; 38 | end; 39 | 40 | Result:=Result+'TortoisePlink.exe' 41 | Exit; 42 | end; 43 | 44 | if not RegQueryStringValue(HKEY_LOCAL_MACHINE,PuTTYUninstallKey,'InstallLocation',Result) then begin 45 | if RegQueryStringValue(HKEY_CLASSES_ROOT,PuTTYPrivateKeyAssoc,'',Result) then begin 46 | // "C:\Program Files\PuTTY\pageant.exe" "%1" 47 | Result:=RemoveQuotes(Result); 48 | // C:\Program Files\PuTTY\pageant.exe" "%1 49 | Result:=ExtractFilePath(Result); 50 | end; 51 | end; 52 | // C:\Program Files\PuTTY\ 53 | 54 | if not DirExists(Result) then begin 55 | // Guess something. 56 | Result:=ExpandConstant('{pf}\PuTTY\'); 57 | end; 58 | 59 | Result:=Result+'plink.exe' 60 | end; 61 | 62 | function IsPlinkExecutable(Path:String):Boolean; 63 | begin 64 | Result:=(Pos('plink',LowerCase(ExtractFileName(Path)))>0); 65 | end; 66 | -------------------------------------------------------------------------------- /installer/release.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | die () { 4 | echo "$*" >&2 5 | exit 1 6 | } 7 | 8 | # change directory to the script's directory 9 | cd "$(dirname "$0")" || 10 | die "Could not switch directory" 11 | 12 | force= 13 | inno_defines= 14 | skip_files= 15 | test_installer= 16 | while test $# -gt 0 17 | do 18 | case "$1" in 19 | -f|--force) 20 | force=t 21 | ;; 22 | --skip-files) 23 | skip_files=t 24 | ;; 25 | --window-title-version=*) 26 | inno_defines="$(printf "%s\n%s" "$inno_defines" \ 27 | "#define WINDOW_TITLE_VERSION '${1#*=}'")" 28 | ;; 29 | -d=*|--debug-wizard-page=*) 30 | page="${1#*=}" 31 | case "$page" in *Page);; *)page=${page}Page;; esac 32 | test_installer=t 33 | if ! grep "^ *$page:TWizardPage;$" install.iss >/dev/null 34 | then 35 | echo "Unknown page '$page'. Known pages:" >&2 36 | sed -n 's/:TWizardPage;$//p' &2 37 | exit 1 38 | fi 39 | inno_defines="$(printf "%s\n%s\n%s" "$inno_defines" \ 40 | "#define DEBUG_WIZARD_PAGE '$page'" \ 41 | "#define OUTPUT_TO_TEMP ''")" 42 | skip_files=t 43 | ;; 44 | --output=*) 45 | output_directory="$(cygpath -m "${1#*=}")" || 46 | die "Directory inaccessible: '${1#*=}'" 47 | 48 | inno_defines="$(printf "%s\n%s" "$inno_defines" \ 49 | "#define OUTPUT_DIRECTORY '$output_directory'")" 50 | ;; 51 | *) 52 | break 53 | esac 54 | shift 55 | done 56 | 57 | if test -n "$test_installer" 58 | then 59 | version=0-test 60 | else 61 | version=$1 62 | shift 63 | fi 64 | 65 | test $# = 0 || 66 | die "Usage: $0 [-f | --force] [--output=] ( --debug-wizard-page= | )" 67 | 68 | displayver="$(echo "${version#prerelease-}" | 69 | sed -e 's/\.[^0-9]*\.[^0-9]*\./\./g' \ 70 | -e 's/\.[^.0-9]*\./\./g' -e 's/\.rc/\./g')" 71 | case "$displayver" in 72 | [0-9]*) ;; # okay 73 | *) die "InnoSetup requires a version that begins with a digit ($displayver)";; 74 | esac 75 | 76 | # Evaluate architecture 77 | ARCH="$(uname -m)" 78 | 79 | case "$ARCH" in 80 | i686) 81 | BITNESS=32 82 | ;; 83 | x86_64) 84 | BITNESS=64 85 | ;; 86 | *) 87 | die "Unhandled architecture: $ARCH" 88 | ;; 89 | esac 90 | 91 | echo "Generating release notes to be included in the installer ..." 92 | ../render-release-notes.sh --css usr/share/git/ || 93 | die "Could not generate release notes" 94 | 95 | echo "Compiling edit-git-bash.exe ..." 96 | make -C ../ edit-git-bash.exe || 97 | die "Could not build edit-git-bash.exe" 98 | 99 | if test t = "$skip_files" 100 | then 101 | LIST= 102 | else 103 | echo "Generating file list to be included in the installer ..." 104 | LIST="$(ARCH=$ARCH BITNESS=$BITNESS \ 105 | PACKAGE_VERSIONS_FILE=package-versions.txt \ 106 | INCLUDE_GIT_UPDATE=1 \ 107 | sh ../make-file-list.sh)" || 108 | die "Could not generate file list" 109 | fi 110 | 111 | printf "; List of files\n%s\n%s\n%s\n%s\n%s\n" \ 112 | "Source: \"{#SourcePath}\\package-versions.txt\"; DestDir: {app}\\etc; Flags: replacesameversion; AfterInstall: DeleteFromVirtualStore" \ 113 | "Source: \"{#SourcePath}\\..\\ReleaseNotes.css\"; DestDir: {app}\\usr\\share\\git; Flags: replacesameversion; AfterInstall: DeleteFromVirtualStore" \ 114 | "Source: \"cmd\\git.exe\"; DestDir: {app}\\bin; Flags: replacesameversion; AfterInstall: DeleteFromVirtualStore" \ 115 | "Source: \"mingw$BITNESS\\share\\git\\compat-bash.exe\"; DestName: bash.exe; DestDir: {app}\\bin; Flags: replacesameversion; AfterInstall: DeleteFromVirtualStore" \ 116 | "Source: \"mingw$BITNESS\\share\\git\\compat-bash.exe\"; DestName: sh.exe; DestDir: {app}\\bin; Flags: replacesameversion; AfterInstall: DeleteFromVirtualStore" \ 117 | "Source: \"{#SourcePath}\\..\\post-install.bat\"; DestName: post-install.bat; DestDir: {app}; Flags: replacesameversion" \ 118 | >file-list.iss || 119 | die "Could not write to file-list.iss" 120 | 121 | case "$LIST" in 122 | */libexec/git-core/git-legacy-difftool*) 123 | inno_defines="$(printf "%s\n%s" "$inno_defines" \ 124 | "#define WITH_EXPERIMENTAL_BUILTIN_DIFFTOOL 1")" 125 | ;; 126 | esac 127 | 128 | GITCONFIG_PATH="$(echo "$LIST" | grep "^mingw$BITNESS/etc/gitconfig\$")" 129 | printf '' >programdata-config.template 130 | test -z "$GITCONFIG_PATH" || { 131 | cp "/$GITCONFIG_PATH" gitconfig.system && 132 | cp "/$GITCONFIG_PATH" programdata-config.template && 133 | keys="$(git config -f gitconfig.system -l --name-only)" && 134 | for key in $keys 135 | do 136 | case "$key" in 137 | pack.packsizelimit) 138 | # remove from both, will be configured by installer 139 | git config -f programdata-config.template \ 140 | --unset "$key" && 141 | git config -f gitconfig.system --unset "$key" || 142 | break 143 | ;; 144 | diff.astextplain.*|filter.lfs.*|http.sslcainfo) 145 | # keep in the system-wide config 146 | git config -f programdata-config.template \ 147 | --unset "$key" || 148 | break 149 | ;; 150 | *) 151 | # move to the ProgramData template 152 | git config -f gitconfig.system --unset "$key" || 153 | break 154 | ;; 155 | esac || break 156 | done && 157 | sed -i '/^\[/{:1;$d;N;/^.[^[]*$/b;s/^.*\[/[/;b1}' gitconfig.system && 158 | sed -i '/^\[/{:1;$d;N;/^.[^[]*$/b;s/^.*\[/[/;b1}' \ 159 | programdata-config.template || 160 | die "Could not split gitconfig" 161 | LIST="$(echo "$LIST" | grep -v "^$GITCONFIG_PATH\$")" 162 | } 163 | 164 | printf '%s%s%s\n%s\n' \ 165 | 'Source: {#SourcePath}\gitconfig.system; DestName: gitconfig; ' \ 166 | "DestDir: {app}\\mingw$BITNESS\\etc; Flags: replacesameversion; " \ 167 | 'AfterInstall: DeleteFromVirtualStore' \ 168 | 'Source: {#SourcePath}\programdata-config.template; Flags: dontcopy' \ 169 | >>file-list.iss || 170 | die "Could not append gitconfig to file list" 171 | 172 | test -z "$LIST" || 173 | echo "$LIST" | 174 | sed -e 's|/|\\|g' \ 175 | -e 's|^\([^\\]*\)$|Source: \1; DestDir: {app}; Flags: replacesameversion; AfterInstall: DeleteFromVirtualStore|' \ 176 | -e 's|^\(.*\)\\\([^\\]*\)$|Source: \1\\\2; DestDir: {app}\\\1; Flags: replacesameversion; AfterInstall: DeleteFromVirtualStore|' \ 177 | >> file-list.iss 178 | 179 | printf "%s\n%s\n%s%s" \ 180 | "#define APP_VERSION '$displayver'" \ 181 | "#define FILENAME_VERSION '$version'" \ 182 | "#define BITNESS '$BITNESS'" \ 183 | "$inno_defines" \ 184 | >config.iss 185 | 186 | signtool= 187 | test -z "$(git config alias.signtool)" || 188 | signtool="//Ssigntool=\"git signtool \\\$f\" //DSIGNTOOL" 189 | 190 | echo "Launching Inno Setup compiler ..." && 191 | eval ./InnoSetup/ISCC.exe "$signtool" install.iss >install.log || 192 | die "Could not make installer" 193 | 194 | if test -n "$test_installer" 195 | then 196 | echo "Launching $TEMP/$version.exe" 197 | exec "$TEMP/$version.exe" 198 | exit 199 | fi 200 | 201 | echo "Tagging Git for Windows installer release ..." 202 | if git rev-parse Git-$version >/dev/null 2>&1; then 203 | echo "-> installer release 'Git-$version' was already tagged." 204 | else 205 | git tag -a -m "Git for Windows $version" Git-$version 206 | fi 207 | 208 | echo "Installer is available as $(tail -n 1 install.log)" 209 | -------------------------------------------------------------------------------- /installer/update-inno-setup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Download the most recent Inno Setup version. 4 | installer="is-unicode.exe" 5 | url="http://www.jrsoftware.org/download.php/$installer" 6 | 7 | die () { 8 | echo "$*" >&2 9 | exit 1 10 | } 11 | 12 | cd "$(dirname "$0")" || 13 | die "Could not switch directory" 14 | 15 | curl -# -L -O -R -z $installer "$url" || 16 | die "Could not download $url" 17 | 18 | # Remove any previous installation. 19 | test ! -d InnoSetup || 20 | rm -r InnoSetup/ || 21 | die "Could not remove previous installation" 22 | 23 | # Silently install Inno Setup below the mingw root. 24 | if type wine > /dev/null 2>&1 25 | then 26 | wine $installer /verysilent /dir=InnoSetup /noicons /tasks= /portable=1 27 | else 28 | # See http://www.mingw.org/wiki/Posix_path_conversion. 29 | ./$installer //verysilent //dir=InnoSetup \ 30 | //noicons //tasks= //portable=1 31 | fi || 32 | die "Could not install InnoSetup" 33 | 34 | # Remove unneeded files from the installation. 35 | rm -r InnoSetup/Examples/ InnoSetup/Compil32.exe InnoSetup/isscint.dll 36 | -------------------------------------------------------------------------------- /mingit/release.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Build the "really minimal" Git for Windows. 4 | 5 | test -z "$1" && { 6 | echo "Usage: $0 [--output=] [optional components]" 7 | exit 1 8 | } 9 | 10 | die () { 11 | echo "$*" >&1 12 | exit 1 13 | } 14 | 15 | output_directory="$HOME" 16 | while case "$1" in 17 | --output=*) 18 | output_directory="$(cd "${1#*=}" && pwd)" || 19 | die "Directory inaccessible: '${1#*=}'" 20 | ;; 21 | --busybox) 22 | export MINIMAL_GIT_WITH_BUSYBOX=1 23 | ;; 24 | -*) die "Unknown option: %s\n" "$1";; 25 | *) break;; 26 | esac; do shift; done 27 | test $# = 1 || 28 | die "Expect a version, got $# arguments" 29 | 30 | ARCH="$(uname -m)" 31 | case "$ARCH" in 32 | i686) 33 | BITNESS=32 34 | ;; 35 | x86_64) 36 | BITNESS=64 37 | ;; 38 | *) 39 | die "Unhandled architecture: $ARCH" 40 | ;; 41 | esac 42 | VERSION=$1 43 | shift 44 | TARGET="$output_directory"/MinGit-"$VERSION"-"$BITNESS"-bit.zip 45 | SCRIPT_PATH="$(cd "$(dirname "$0")" && pwd)" 46 | 47 | case "$SCRIPT_PATH" in 48 | *" "*) 49 | die "This script cannot handle spaces in $SCRIPT_PATH" 50 | ;; 51 | esac 52 | 53 | rm -rf "$SCRIPT_PATH"/root && 54 | mkdir -p "$SCRIPT_PATH"/root || 55 | die "Could not create overlay directory" 56 | 57 | sed 's/$/\r/' <"$SCRIPT_PATH"/../LICENSE.txt >"$SCRIPT_PATH"/root/LICENSE.txt || 58 | die "Could not copy license file" 59 | 60 | mkdir -p "$SCRIPT_PATH"/root/etc || 61 | die "Could not make etc/" 62 | 63 | # Make a list of files to include 64 | LIST="$(ARCH=$ARCH BITNESS=$BITNESS MINIMAL_GIT=1 \ 65 | PACKAGE_VERSIONS_FILE="$SCRIPT_PATH"/root/etc/package-versions.txt \ 66 | sh "$SCRIPT_PATH"/../make-file-list.sh "$@")" || 67 | die "Could not generate file list" 68 | 69 | # Make the archive 70 | 71 | type 7za || 72 | pacman -Sy --noconfirm p7zip || 73 | die "Could not install 7-Zip" 74 | 75 | echo "$LIST" | sort >"$SCRIPT_PATH"/sorted-all && 76 | pacman -Ql mingw-w64-$ARCH-git | 77 | sed 's|^[^ ]* /||' | 78 | grep "^mingw$BITNESS/libexec/git-core/.*\.exe$" | 79 | sort >"$SCRIPT_PATH"/sorted-libexec-exes && 80 | MOVED_FILE=etc/libexec-moved.txt && 81 | comm -12 "$SCRIPT_PATH"/sorted-all "$SCRIPT_PATH"/sorted-libexec-exes \ 82 | >"$SCRIPT_PATH"/root/$MOVED_FILE && 83 | if test ! -s "$SCRIPT_PATH"/root/$MOVED_FILE 84 | then 85 | die "Could not find any .exe files in libexec/git-core/" 86 | fi && 87 | BIN_DIR=mingw$BITNESS/bin && 88 | mkdir -p "$SCRIPT_PATH"/root/$BIN_DIR && 89 | (cd / && 90 | cp $(cat "$SCRIPT_PATH"/root/$MOVED_FILE) "$SCRIPT_PATH"/root/$BIN_DIR/) && 91 | sed -e 's|\(.*/\)libexec/git-core\(/.*\)|\1bin\2\n&|' \ 92 | <"$SCRIPT_PATH"/root/$MOVED_FILE | 93 | sort >"$SCRIPT_PATH"/exclude-list && 94 | LIST="$(comm -23 "$SCRIPT_PATH"/sorted-all "$SCRIPT_PATH"/exclude-list)" || 95 | die "Could not copy libexec/git-core/*.exe" 96 | 97 | test ! -f "$TARGET" || rm "$TARGET" || die "Could not remove $TARGET" 98 | 99 | echo "Creating .zip archive" && 100 | (cd / && 7za a -mx9 "$TARGET" $LIST "$SCRIPT_PATH"/root/*) && 101 | echo "Success! You will find the new MinGit at \"$TARGET\"." 102 | -------------------------------------------------------------------------------- /mingw-w64-cv2pdb/.gitignore: -------------------------------------------------------------------------------- 1 | /cv2pdb 2 | /mingw-w64-*-cv2pdb-*.pkg.tar.xz 3 | /mingw-w64-cv2pdb-*.src.tar.gz 4 | /pkg 5 | /src 6 | -------------------------------------------------------------------------------- /mingw-w64-cv2pdb/PKGBUILD: -------------------------------------------------------------------------------- 1 | # Maintainer: Johannes Schindelin 2 | 3 | _realname=cv2pdb 4 | pkgbase="mingw-w64-${_realname}" 5 | pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") 6 | pkgver=0.38.2.g6a67422 7 | pkgrel=1 8 | pkgdesc="Converter of DWARF debug information to PDB files (mingw-w64)" 9 | arch=('any') 10 | url="https://github.com/rainers/cv2pdb" 11 | license=('Artistic2') 12 | 13 | options=('!strip') 14 | 15 | source=("${_realname}"::"git+https://github.com/rainers/cv2pdb#branch=master") 16 | 17 | md5sums=('SKIP') 18 | 19 | die () { 20 | echo "$*" >&2 21 | exit 1 22 | } 23 | 24 | test -n "$VS_DIR" || 25 | VS_DIR="/c/Program Files (x86)/Microsoft Visual Studio 14.0" 26 | 27 | test -d "$VS_DIR" || 28 | die "Need a valid VS_DIR to point to Visual Studio" 29 | 30 | case "$CARCH" in 31 | i686) WARCH=Win32; OUTDIR=bin/Release;; 32 | x86_64) WARCH=x64; OUTDIR=bin/Release_x64;; 33 | *) die "Unsupported architecture: $CARCH" 34 | esac 35 | 36 | pkgver() { 37 | cd "$srcdir/cv2pdb" 38 | git describe --tags HEAD | tr - . | sed 's/^v//' 39 | } 40 | 41 | prepare () { 42 | cd "$srcdir/cv2pdb" 43 | grep -q "v140<" src/cv2pdb.vcxproj || 44 | sed -i 's/\(\)[^<]*/\1v140/g' src/cv2pdb.vcxproj 45 | } 46 | 47 | build() { 48 | cd "$srcdir/cv2pdb" 49 | 50 | "$VS_DIR"/Common7/IDE/devenv.exe \ 51 | //Build "Release|$WARCH" src/cv2pdb_vs12.sln || 52 | ! grep error $OUTDIR/cv2pdb/cv2pdb.log 53 | 54 | test -z "$SIGNTOOL" || 55 | eval "$SIGNTOOL $OUTDIR/cv2pdb.exe" 56 | } 57 | 58 | package () { 59 | cd "$srcdir"/cv2pdb 60 | 61 | install -d "${pkgdir}/${MINGW_PREFIX}/bin" 62 | install -m755 $OUTDIR/cv2pdb.exe "${pkgdir}/${MINGW_PREFIX}/bin" 63 | 64 | install -d "${pkgdir}/${MINGW_PREFIX}/share/doc/cv2pdb" 65 | install -m644 CHANGES FEATURES LICENSE README \ 66 | "${pkgdir}/${MINGW_PREFIX}/share/doc/cv2pdb" 67 | } 68 | -------------------------------------------------------------------------------- /mingw-w64-git-credential-manager/PKGBUILD: -------------------------------------------------------------------------------- 1 | # Maintainer: Johannes Schindelin/J Wyman 2 | 3 | _realname="git-credential-manager" 4 | pkgbase="mingw-w64-${_realname}" 5 | pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") 6 | pkgver=1.12.0 7 | pkgrel=1 8 | _realver=$pkgver 9 | _realtag=$pkgver 10 | pkgdesc="Credential Manager for Git for Windows" 11 | arch=('any') 12 | project_url="https://github.com/Microsoft/Git-Credential-Manager-for-Windows" 13 | zip_url="${project_url}/releases/download/v${_realtag}/gcmw-v${_realver}.zip" 14 | src_zip_url="${project_url}/archive/v${_realtag}.zip" 15 | license=('MIT') 16 | groups=('VCS') 17 | 18 | source=("${zip_url}" "$src_zip_url") 19 | 20 | sha256sums=('5776b58ec7cf2332cf86962a511a724e41e5ddd2148ce33a5e29b164deaa7d92' 21 | '695e8a027ce69463adb9c0db211285c262c5c5e1f8ff32c9194d530a7af6a3b5') 22 | 23 | package() { 24 | builddir=build-${MINGW_CHOST} 25 | prefix="$pkgdir/${MINGW_PREFIX}" 26 | srcdir2="${srcdir}/" 27 | install -d -m755 "${prefix}"/libexec/git-core 28 | install -m755 "$srcdir2"/*.{dll,exe} "${prefix}"/libexec/git-core 29 | install -d -m755 "${prefix}"/doc/git-credential-manager 30 | install -m644 "$srcdir2"/{README.md,LICENSE.txt} \ 31 | "${prefix}"/doc/git-credential-manager 32 | } 33 | -------------------------------------------------------------------------------- /mingw-w64-git-lfs/.gitignore: -------------------------------------------------------------------------------- 1 | pkg 2 | src 3 | *.zip 4 | *.xz 5 | *.gz 6 | -------------------------------------------------------------------------------- /mingw-w64-git-lfs/PKGBUILD: -------------------------------------------------------------------------------- 1 | # Maintainer: Brendan Forster 2 | 3 | _realname="git-lfs" 4 | pkgbase="mingw-w64-${_realname}" 5 | pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") 6 | pkgver=2.2.1 7 | pkgrel=1 8 | pkgdesc="An open source Git extension for versioning large files" 9 | install=git-lfs.install 10 | arch=('any') 11 | url="https://github.com/git-lfs/git-lfs" 12 | src_zip_url="${url}/archive/v${pkgver}.zip" 13 | license=('MIT') 14 | groups=('VCS') 15 | 16 | case "$CARCH" in 17 | i686) 18 | zipname="git-lfs-windows-386-$pkgver.zip" 19 | folder=git-lfs-windows-386-2.2.1/ 20 | sha256sum=0d6347bbdf25946f14949b50f18b9929183aefe55f6b626f8a618ae53c2220bb 21 | ;; 22 | x86_64) 23 | zipname="git-lfs-windows-amd64-$pkgver.zip" 24 | folder=git-lfs-windows-amd64-2.2.1/ 25 | sha256sum=35e120c03061c7a3de8348b970da2278a2e0a865d4c67179801266a2d7674d2d 26 | ;; 27 | esac 28 | 29 | source=("https://github.com/github/git-lfs/releases/download/v$pkgver/$zipname" 30 | "$src_zip_url") 31 | 32 | # Git LFS' source .zip now contains symbolic links that bsdtar does not like... 33 | noextract=("${src_zip_url##*/}") 34 | 35 | sha256sums=("$sha256sum" SKIP) 36 | options=('!strip') 37 | 38 | package() { 39 | install -d -m755 $pkgdir/$MINGW_PREFIX/bin 40 | install -m755 $srcdir/$folder/git-lfs.exe $pkgdir/$MINGW_PREFIX/bin/git-lfs.exe 41 | } 42 | -------------------------------------------------------------------------------- /mingw-w64-git-lfs/git-lfs.install: -------------------------------------------------------------------------------- 1 | post_install() { 2 | for arch in mingw32 mingw64; do 3 | if [ -f "${arch}/bin/git-lfs.exe" ]; then 4 | git config -f "${arch}/etc/gitconfig" filter.lfs.clean "git-lfs clean -- %f" 5 | git config -f "${arch}/etc/gitconfig" filter.lfs.smudge "git-lfs smudge -- %f" 6 | git config -f "${arch}/etc/gitconfig" filter.lfs.process "git-lfs filter-process" 7 | git config -f "${arch}/etc/gitconfig" filter.lfs.required true 8 | fi 9 | done 10 | } 11 | 12 | post_upgrade() { 13 | post_install 14 | } 15 | 16 | pre_remove() { 17 | for arch in mingw32 mingw64; do 18 | if [ -f "${arch}/bin/git-lfs.exe" ]; then 19 | git config -f "${arch}/etc/gitconfig" --remove-section filter.lfs 20 | fi 21 | done 22 | } 23 | -------------------------------------------------------------------------------- /msi/GitAdditionalOptionsDlg.wxs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | NOT WIX_IS_NETFRAMEWORK_451_OR_LATER_INSTALLED 11 | 12 | 13 | 14 | "true" ]]> 15 | ENABLEFSCACHE = "true" 16 | 1 ]]> 17 | 18 | 19 | 1 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /msi/GitChooseEnvironmentDlg.wxs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 1 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | CLIENVIRONMENT = "Bash" 27 | "Bash"]]> 28 | 29 | 30 | CLIENVIRONMENT = "Cmd" 31 | "Cmd"]]> 32 | 33 | 34 | CLIENVIRONMENT = "CmdTools" 35 | "CmdTools"]]> 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /msi/GitChooseTerminalDlg.wxs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 1 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 28 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /msi/GitCustomizeLineEndingsDlg.wxs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 1 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 29 | 33 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /msi/GitLineEndingsDlg.wxs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 1 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /msi/GitMaintenanceTypeDlg.wxs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 1 10 | 1 11 | 1 12 | ARPNOMODIFY 13 | 14 | 15 | 16 | 17 | 1 18 | 1 19 | 1 20 | ARPNOREPAIR 21 | 22 | 23 | 24 | 25 | 1 26 | 1 27 | 1 28 | ARPNOREMOVE 29 | 30 | 31 | 32 | 33 | 1 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /msi/GitShellOptionsDlg.wxs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 1 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /msi/assets/Info.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/ghfw-build-extra/69bd5e6f85e4842f07db71c9618a621154c52254/msi/assets/Info.ico -------------------------------------------------------------------------------- /msi/assets/NewFolder.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/ghfw-build-extra/69bd5e6f85e4842f07db71c9618a621154c52254/msi/assets/NewFolder.ico -------------------------------------------------------------------------------- /msi/assets/OneLevelUp.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/ghfw-build-extra/69bd5e6f85e4842f07db71c9618a621154c52254/msi/assets/OneLevelUp.ico -------------------------------------------------------------------------------- /msi/assets/bannerbmp.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/ghfw-build-extra/69bd5e6f85e4842f07db71c9618a621154c52254/msi/assets/bannerbmp.bmp -------------------------------------------------------------------------------- /msi/assets/completi.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/ghfw-build-extra/69bd5e6f85e4842f07db71c9618a621154c52254/msi/assets/completi.ico -------------------------------------------------------------------------------- /msi/assets/custicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/ghfw-build-extra/69bd5e6f85e4842f07db71c9618a621154c52254/msi/assets/custicon.ico -------------------------------------------------------------------------------- /msi/assets/dlgbmp.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/ghfw-build-extra/69bd5e6f85e4842f07db71c9618a621154c52254/msi/assets/dlgbmp.bmp -------------------------------------------------------------------------------- /msi/assets/exclamic.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/ghfw-build-extra/69bd5e6f85e4842f07db71c9618a621154c52254/msi/assets/exclamic.ico -------------------------------------------------------------------------------- /msi/assets/insticon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/ghfw-build-extra/69bd5e6f85e4842f07db71c9618a621154c52254/msi/assets/insticon.ico -------------------------------------------------------------------------------- /msi/assets/removico.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/ghfw-build-extra/69bd5e6f85e4842f07db71c9618a621154c52254/msi/assets/removico.ico -------------------------------------------------------------------------------- /msi/assets/repairic.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/ghfw-build-extra/69bd5e6f85e4842f07db71c9618a621154c52254/msi/assets/repairic.ico -------------------------------------------------------------------------------- /msi/git.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/ghfw-build-extra/69bd5e6f85e4842f07db71c9618a621154c52254/msi/git.png -------------------------------------------------------------------------------- /msi/update-wix-toolset.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Download the most recent WiX 4.x version. 4 | feed=http://wixtoolset.org/releases/feeds/wix4-0.feed 5 | zip=wix40-binaries.zip 6 | 7 | die () { 8 | echo "$*" >&2 9 | exit 1 10 | } 11 | 12 | cd "$(dirname "$0")" || 13 | die "Could not switch directory" 14 | 15 | url="$(curl -s $feed | 16 | sed -n '/.*\/v4-[0-9]/{s/.*>\(.*\)<.*/\1/p;q}')" 17 | test -n "$url" || 18 | die "Could not determine the newest version" 19 | url=$url$zip 20 | 21 | curl -#LORz $(test -f $zip && echo $zip || echo 19700101) "$url" || 22 | die "Could not download $url" 23 | 24 | # Remove any previous installation. 25 | test ! -d wix || 26 | rm -r wix/ || 27 | die "Could not remove previous installation" 28 | 29 | unzip -d wix/ -q $zip || 30 | die "Could not install WiX toolset" 31 | 32 | # Convert DOS line endings 33 | dos2unix wix/*.config 34 | 35 | # Remove unneeded files 36 | rm wix/{LuxTasks.dll,ThmViewer.exe,Wix{[CFGHILMPSV],Di,Tas,Toolset.B}*.dll} 37 | rm wix/{dark,difx,lux,melt,nit,pyro,retina,shine,smoke,swc,torch}* 38 | rm wix/*.targets 39 | rm -r wix/{doc,sdk} 40 | -------------------------------------------------------------------------------- /msi/wix/WixBalExtension.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/ghfw-build-extra/69bd5e6f85e4842f07db71c9618a621154c52254/msi/wix/WixBalExtension.dll -------------------------------------------------------------------------------- /msi/wix/WixCop.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/ghfw-build-extra/69bd5e6f85e4842f07db71c9618a621154c52254/msi/wix/WixCop.exe -------------------------------------------------------------------------------- /msi/wix/WixDependencyExtension.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/ghfw-build-extra/69bd5e6f85e4842f07db71c9618a621154c52254/msi/wix/WixDependencyExtension.dll -------------------------------------------------------------------------------- /msi/wix/WixNetFxExtension.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/ghfw-build-extra/69bd5e6f85e4842f07db71c9618a621154c52254/msi/wix/WixNetFxExtension.dll -------------------------------------------------------------------------------- /msi/wix/WixTagExtension.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/ghfw-build-extra/69bd5e6f85e4842f07db71c9618a621154c52254/msi/wix/WixTagExtension.dll -------------------------------------------------------------------------------- /msi/wix/WixToolset.Data.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/ghfw-build-extra/69bd5e6f85e4842f07db71c9618a621154c52254/msi/wix/WixToolset.Data.dll -------------------------------------------------------------------------------- /msi/wix/WixToolset.Dtf.Compression.Cab.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/ghfw-build-extra/69bd5e6f85e4842f07db71c9618a621154c52254/msi/wix/WixToolset.Dtf.Compression.Cab.dll -------------------------------------------------------------------------------- /msi/wix/WixToolset.Dtf.Compression.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/ghfw-build-extra/69bd5e6f85e4842f07db71c9618a621154c52254/msi/wix/WixToolset.Dtf.Compression.dll -------------------------------------------------------------------------------- /msi/wix/WixToolset.Dtf.Resources.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/ghfw-build-extra/69bd5e6f85e4842f07db71c9618a621154c52254/msi/wix/WixToolset.Dtf.Resources.dll -------------------------------------------------------------------------------- /msi/wix/WixToolset.Dtf.WindowsInstaller.Package.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/ghfw-build-extra/69bd5e6f85e4842f07db71c9618a621154c52254/msi/wix/WixToolset.Dtf.WindowsInstaller.Package.dll -------------------------------------------------------------------------------- /msi/wix/WixToolset.Dtf.WindowsInstaller.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/ghfw-build-extra/69bd5e6f85e4842f07db71c9618a621154c52254/msi/wix/WixToolset.Dtf.WindowsInstaller.dll -------------------------------------------------------------------------------- /msi/wix/WixToolset.Extensibility.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/ghfw-build-extra/69bd5e6f85e4842f07db71c9618a621154c52254/msi/wix/WixToolset.Extensibility.dll -------------------------------------------------------------------------------- /msi/wix/WixUIExtension.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/ghfw-build-extra/69bd5e6f85e4842f07db71c9618a621154c52254/msi/wix/WixUIExtension.dll -------------------------------------------------------------------------------- /msi/wix/WixUtilExtension.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/ghfw-build-extra/69bd5e6f85e4842f07db71c9618a621154c52254/msi/wix/WixUtilExtension.dll -------------------------------------------------------------------------------- /msi/wix/candle.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/ghfw-build-extra/69bd5e6f85e4842f07db71c9618a621154c52254/msi/wix/candle.exe -------------------------------------------------------------------------------- /msi/wix/candle.exe.config: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /msi/wix/darice.cub: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/ghfw-build-extra/69bd5e6f85e4842f07db71c9618a621154c52254/msi/wix/darice.cub -------------------------------------------------------------------------------- /msi/wix/heat.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/ghfw-build-extra/69bd5e6f85e4842f07db71c9618a621154c52254/msi/wix/heat.exe -------------------------------------------------------------------------------- /msi/wix/heat.exe.config: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /msi/wix/insignia.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/ghfw-build-extra/69bd5e6f85e4842f07db71c9618a621154c52254/msi/wix/insignia.exe -------------------------------------------------------------------------------- /msi/wix/insignia.exe.config: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /msi/wix/light.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/ghfw-build-extra/69bd5e6f85e4842f07db71c9618a621154c52254/msi/wix/light.exe -------------------------------------------------------------------------------- /msi/wix/light.exe.config: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /msi/wix/lit.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/ghfw-build-extra/69bd5e6f85e4842f07db71c9618a621154c52254/msi/wix/lit.exe -------------------------------------------------------------------------------- /msi/wix/lit.exe.config: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /msi/wix/mergemod.cub: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/ghfw-build-extra/69bd5e6f85e4842f07db71c9618a621154c52254/msi/wix/mergemod.cub -------------------------------------------------------------------------------- /msi/wix/mergemod.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/ghfw-build-extra/69bd5e6f85e4842f07db71c9618a621154c52254/msi/wix/mergemod.dll -------------------------------------------------------------------------------- /msi/wix/mspatchc.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/ghfw-build-extra/69bd5e6f85e4842f07db71c9618a621154c52254/msi/wix/mspatchc.dll -------------------------------------------------------------------------------- /msi/wix/wconsole.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/ghfw-build-extra/69bd5e6f85e4842f07db71c9618a621154c52254/msi/wix/wconsole.dll -------------------------------------------------------------------------------- /msi/wix/winterop.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/ghfw-build-extra/69bd5e6f85e4842f07db71c9618a621154c52254/msi/wix/winterop.dll -------------------------------------------------------------------------------- /msi/wix/wix.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/ghfw-build-extra/69bd5e6f85e4842f07db71c9618a621154c52254/msi/wix/wix.dll -------------------------------------------------------------------------------- /msi/wix/x86/burn.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/ghfw-build-extra/69bd5e6f85e4842f07db71c9618a621154c52254/msi/wix/x86/burn.exe -------------------------------------------------------------------------------- /nuget/GitForWindows.nuspec.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | @@ID@@ 5 | @@VERSION@@ 6 | @@TITLE@@ 7 | @@AUTHOR@@ 8 | @@OWNERS@@ 9 | https://github.com/git-for-windows/git/blob/master/COPYING 10 | https://git-for-windows.github.io/ 11 | https://avatars2.githubusercontent.com/u/4571183?v=3&s=200 12 | false 13 | @@DESCRIPTION@@ 14 | @@SUMMARY@@ 15 | https://github.com/git-for-windows/git/releases/tag/@@VERSIONTAG@@ 16 | https://git-for-windows.github.io/governance-model.html 17 | 18 | git scm vcs windows light-weight dvcs@@EXTRATAGS@@ 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | @@FILELIST@@ 28 | 29 | 30 | -------------------------------------------------------------------------------- /nuget/Install.ps1: -------------------------------------------------------------------------------- 1 | param($installPath, $toolsPath, $package, $project) 2 | 3 | "$toolsPath\post-install.bat" 4 | -------------------------------------------------------------------------------- /nuget/release.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | BUILDEXTRA="$(cd "$(dirname "$0")"/.. && pwd)" 4 | 5 | die () { 6 | echo "$*" >&2 7 | exit 1 8 | } 9 | 10 | AUTHOR= 11 | OWNERS= 12 | ID=GitForWindows 13 | TITLE="Git for Windows" 14 | DESCRIPTION='Git for Windows focuses on offering a lightweight, native set of tools that bring the full feature set of the Git to Windows while providing appropriate user interfaces for experienced users.' 15 | SUMMARY='The power of Git on Windows.' 16 | EXTRATAGS= 17 | while test $# -gt 1 18 | do 19 | case "$1" in 20 | --author=*) AUTHOR=${1#--*=};; 21 | --owners=*) OWNERS="${1#--*=}";; 22 | --id=*) ID=${1#--*=};; 23 | --mingit) 24 | ID=Git-Windows-Minimal 25 | TITLE="Minimal Git for Windows (MinGit)" 26 | DESCRIPTION="$DESCRIPTION\\n\\nMinimal Git for Windows is a reduced sized package designed to support application integration (like integrated development environments, graph visualizers, etc.) where full console support (colorization, pagniation, etc.) is not needed. Additionally, non-critical packages such as Git-Bash, Git-Gui, PERL, Python, and Tcl are excluded from Minimal Git for Windows to reduce the package size." 27 | SUMMARY="$SUMMARY Offering a lightweight, native set of tools that bring the core feature set of Git to Windows." 28 | EXTRATAGS=" mingit$EXTRATAGS" 29 | export MINIMAL_GIT=1 30 | ;; 31 | -*) die "Unknown option: $1";; 32 | *) break;; 33 | esac 34 | shift 35 | done 36 | 37 | test $# -ge 1 || 38 | die "Usage: $0 [--author=] [--id=] [...]" 39 | 40 | VERSION=$1 41 | shift 42 | 43 | if test -z "$AUTHOR" 44 | then 45 | AUTHOR="$(git config nuget.author)" 46 | test -n "$AUTHOR" || AUTHOR="$USERNAME" 47 | fi 48 | if test -z "$OWNERS" 49 | then 50 | OWNERS="$(git config nuget.owners)" 51 | test -n "$OWNERS" || OWNERS="$AUTHOR" 52 | fi 53 | 54 | if test -x "$BUILDEXTRA"/nuget/nuget.exe 55 | then 56 | PATH=$BUILDEXTRA/nuget:$PATH 57 | elif ! type -p nuget.exe 58 | then 59 | (cd "$BUILDEXTRA"/nuget && 60 | curl -O https://dist.nuget.org/win-x86-commandline/latest/nuget.exe) || 61 | die "Could not download nuget.exe" 62 | fi 63 | 64 | ARCH="$(uname -m)" 65 | case "$ARCH" in 66 | i686) 67 | BITNESS=32 68 | ;; 69 | x86_64) 70 | BITNESS=64 71 | ;; 72 | *) 73 | die "Unhandled architecture: $ARCH" 74 | ;; 75 | esac 76 | 77 | # Generate release notes for NuGet 78 | "$BUILDEXTRA"/render-release-notes.sh --css "$BUILDEXTRA"/nuget/content/ || 79 | die "Could not generate ReleaseNotes.html." 80 | 81 | VERSIONTAG="$(echo "$VERSION" | sed -e 's/^[1-9]/v&/' \ 82 | -e 's/^\(v[0-9]*\.[0-9]*\.[0-9]*\)\(\.[0-9]*\)$/\1.windows\2/' \ 83 | -e 's/^v[0-9]*\.[0-9]*\.[0-9]*$/&.windows.1/')" 84 | SPECIN="$BUILDEXTRA"/nuget/GitForWindows.nuspec.in 85 | SPEC="$BUILDEXTRA/nuget/$ID".nuspec 86 | sed -e "s/@@VERSION@@/$VERSION/g" -e "s/@@AUTHOR@@/$AUTHOR/g" \ 87 | -e "s/@@OWNERS@@/$OWNERS/g" \ 88 | -e "s/@@TITLE@@/$TITLE/g" -e "s/@@EXTRATAGS@@/$EXTRATAGS/g" \ 89 | -e "s/@@DESCRIPTION@@/$DESCRIPTION/g" -e "s/@@SUMMARY@@/$SUMMARY/g" \ 90 | -e "s/@@VERSIONTAG@@/$VERSIONTAG/g" \ 91 | -e "s/@@ID@@/$ID/g" -e '/@@FILELIST@@/,$d' <"$SPECIN" >"$SPEC" 92 | 93 | # Make a list of files to include 94 | LIST="$(ARCH=$ARCH BITNESS=$BITNESS \ 95 | PACKAGE_VERSIONS_FILE="$BUILDEXTRA"/nuget/package-versions.txt \ 96 | sh "$BUILDEXTRA"/make-file-list.sh "$@")" || 97 | die "Could not generate file list" 98 | 99 | echo "$LIST" | 100 | sed -e 'y/\//\\/' -e 's/.*/ /' >>"$SPEC" 101 | 102 | test -z "$MINIMAL_GIT" || { 103 | printf ' \n' \ 104 | nuget\\libexec-moved.txt >>"$SPEC" && 105 | mv "$SPEC" "$SPEC".unmoved && 106 | sed -e '/tools\\mingw..\\libexec\\git-core\\git\(\|-upload-pack\).exe/d' \ 107 | -e 's%\( target="tools\\mingw[36][24]\\\)libexec\\git-core\\\('"$(\ 108 | pacman -Ql mingw-w64-$ARCH-git | 109 | sed -n 's|^[^ ]* /mingw../libexec/git-core/\(.*\.exe\)$|\1\\|p' | 110 | tr '\n' '|')"'\)"%\1bin\\\2"%' <"$SPEC".unmoved >"$SPEC" && 111 | git diff --no-index "$SPEC.unmoved" "$SPEC" | 112 | sed -n 's/^-.* src="\([^"]*\).*/\1/p' \ 113 | >"$BUILDEXTRA"/nuget/libexec-moved.txt 114 | } || 115 | die "Could not move the core Git .exe files out of libexec/git-core" 116 | 117 | sed '1,/@@FILELIST@@/d' <"$SPECIN" >>"$SPEC" 118 | 119 | nuget pack -BasePath / -Properties buildextra="$(cd "$BUILDEXTRA" && pwd -W)" \ 120 | -OutputDirectory "$HOME" -Verbosity detailed "$SPEC" 121 | -------------------------------------------------------------------------------- /package-git-shell.sh: -------------------------------------------------------------------------------- 1 | SCRIPT_PATH="$(cd "$(dirname "$0")" && pwd)" 2 | 3 | # use the current git version as the installer version 4 | gitversion=$(git --version | egrep -o '[0-9]*.[0-9]*.[0-9]*.windows.[0-9]*') 5 | version="${gitversion/windows./}" 6 | 7 | # run the portable installer 8 | $SCRIPT_PATH/git-shell/release.sh $version git-tfs github-extra -------------------------------------------------------------------------------- /portable/release.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Build the portable Git for Windows. 4 | 5 | die () { 6 | echo "$*" >&1 7 | exit 1 8 | } 9 | 10 | output_directory="$HOME" 11 | while test $# -gt 0 12 | do 13 | case "$1" in 14 | --output) 15 | shift 16 | output_directory="$1" 17 | ;; 18 | --output=*) 19 | output_directory="${1#*=}" 20 | ;; 21 | -*) 22 | die "Unknown option: $1" 23 | ;; 24 | *) 25 | break 26 | esac 27 | shift 28 | done 29 | 30 | test $# -gt 0 || 31 | die "Usage: $0 [--output=] [optional components]" 32 | 33 | test -d "$output_directory" || 34 | die "Directory inaccessible: '$output_directory'" 35 | 36 | ARCH="$(uname -m)" 37 | case "$ARCH" in 38 | i686) 39 | BITNESS=32 40 | MD_ARG=128M 41 | ;; 42 | x86_64) 43 | BITNESS=64 44 | MD_ARG=256M 45 | ;; 46 | *) 47 | die "Unhandled architecture: $ARCH" 48 | ;; 49 | esac 50 | VERSION=$1 51 | shift 52 | TARGET="$output_directory"/PortableGit-"$VERSION"-"$BITNESS"-bit.7z.exe 53 | OPTS7="-m0=lzma -mx=9 -md=$MD_ARG -mfb=273 -ms=256M " 54 | TMPPACK=/tmp.7z 55 | SCRIPT_PATH="$(cd "$(dirname "$0")" && pwd)" 56 | 57 | case "$SCRIPT_PATH" in 58 | *" "*) 59 | die "This script cannot handle spaces in $SCRIPT_PATH" 60 | ;; 61 | esac 62 | 63 | 64 | # Generate a couple of files dynamically 65 | 66 | cp "$SCRIPT_PATH/../LICENSE.txt" "$SCRIPT_PATH/root/" || 67 | die "Could not copy license file" 68 | 69 | mkdir -p "$SCRIPT_PATH/root/etc" || 70 | die "Could not make etc/ directory" 71 | 72 | mkdir -p "$SCRIPT_PATH/root/tmp" || 73 | die "Could not make tmp/ directory" 74 | 75 | mkdir -p "$SCRIPT_PATH/root/bin" || 76 | die "Could not make bin/ directory" 77 | 78 | cp /cmd/git.exe "$SCRIPT_PATH/root/bin/git.exe" && 79 | cp /mingw$BITNESS/share/git/compat-bash.exe "$SCRIPT_PATH/root/bin/bash.exe" && 80 | cp /mingw$BITNESS/share/git/compat-bash.exe "$SCRIPT_PATH/root/bin/sh.exe" || 81 | die "Could not install bin/ redirectors" 82 | 83 | cp "$SCRIPT_PATH/../post-install.bat" "$SCRIPT_PATH/root/" || 84 | die "Could not copy post-install script" 85 | 86 | mkdir -p "$SCRIPT_PATH/root/mingw$BITNESS/etc" && 87 | cp /mingw$BITNESS/etc/gitconfig \ 88 | "$SCRIPT_PATH/root/mingw$BITNESS/etc/gitconfig" && 89 | git config -f "$SCRIPT_PATH/root/mingw$BITNESS/etc/gitconfig" \ 90 | credential.helper manager || 91 | die "Could not configure Git-Credential-Manager as default" 92 | 93 | # Make a list of files to include 94 | LIST="$(ARCH=$ARCH BITNESS=$BITNESS \ 95 | PACKAGE_VERSIONS_FILE="$SCRIPT_PATH"/root/etc/package-versions.txt \ 96 | sh "$SCRIPT_PATH"/../make-file-list.sh "$@" | 97 | grep -v "^mingw$BITNESS/etc/gitconfig$")" || 98 | die "Could not generate file list" 99 | 100 | rm -rf "$SCRIPT_PATH/root/mingw$BITNESS/libexec/git-core" && 101 | mkdir -p "$SCRIPT_PATH/root/mingw$BITNESS/libexec/git-core" && 102 | ln $(echo "$LIST" | sed -n "s|^mingw$BITNESS/bin/[^/]*\.dll$|/&|p") \ 103 | "$SCRIPT_PATH/root/mingw$BITNESS/libexec/git-core/" || 104 | die "Could not copy .dll files into libexec/git-core/" 105 | 106 | # 7-Zip will strip absolute paths completely... therefore, we can add another 107 | # root directory like this: 108 | 109 | LIST="$LIST $SCRIPT_PATH/root/*" 110 | 111 | 112 | # Make the self-extracting package 113 | 114 | type 7za || 115 | pacman -Sy --noconfirm p7zip || 116 | die "Could not install 7-Zip" 117 | 118 | echo "Creating archive" && 119 | (cd / && 7za a $OPTS7 $TMPPACK $LIST) && 120 | (cat "$SCRIPT_PATH/../7-Zip/7zSD.sfx" && 121 | echo ';!@Install@!UTF-8!' && 122 | echo 'Title="Portable Git for Windows '$BITNESS'-bit"' && 123 | echo 'BeginPrompt="This archive extracts a complete Git for Windows '$BITNESS'-bit"' && 124 | echo 'CancelPrompt="Do you want to cancel the portable Git installation?"' && 125 | echo 'ExtractDialogText="Please, wait..."' && 126 | echo 'ExtractPathText="Where do you want to install portable Git?"' && 127 | echo 'ExtractTitle="Extracting..."' && 128 | echo 'GUIFlags="8+32+64+256+4096"' && 129 | echo 'GUIMode="1"' && 130 | echo 'InstallPath="%%S\\PortableGit"' && 131 | echo 'OverwriteMode="0"' && 132 | echo "RunProgram=\"git-bash.exe --no-needs-console --hide --no-cd --command=post-install.bat\"" && 133 | echo ';!@InstallEnd@!' && 134 | cat "$TMPPACK") > "$TARGET" && 135 | echo "Success! You will find the new installer at \"$TARGET\"." && 136 | echo "It is a self-extracting .7z archive." && 137 | rm $TMPPACK 138 | -------------------------------------------------------------------------------- /portable/root/README.portable: -------------------------------------------------------------------------------- 1 | README.portable 2 | ======================= 3 | 4 | This version of Git for Windows is portable, i.e. does not need to 5 | be installed. It will run from any directory you place it in, even 6 | from a USB thumbdrive. It will not write permanent entries into the 7 | Windows registry. It does not need administrator privileges to "install". 8 | 9 | 10 | Installation 11 | ------------ 12 | 13 | This package is contained in a 7-zip archive with a file name of the form 14 | 'PortableGit-.7z.exe'. It is a self-extracting archive: 15 | you can (double-)click it and it will ask for the desired target directory 16 | (which defaults to C:\Program Files\Git). You may change that as needed or 17 | desired. Your user account needs write access to the selected directory. 18 | (You can move that directory with all its contents to a different place or 19 | computer at any time should you later desire so). 20 | 21 | *NOTE*: if you decide to unpack the archive using 7-Zip manually, you must 22 | run the `post-install.bat` script. Git will not run correctly 23 | otherwise. 24 | 25 | Functional differences to the non-portable Git for Windows 26 | ---------------------------------------------------------- 27 | 28 | This version does not offer you the convenient right-click context menu 29 | entries "Git GUI Here" and "Git Bash Here", because these would require 30 | to add entries into the Windows registry. 31 | 32 | 33 | Warning 34 | ------- 35 | 36 | Since this portable package does not modify any Windows %path% 37 | variables, it is not possible to run the git.exe and gitk.exe files 38 | directly. Start the Git Bash or Git Cmd instead, or add the cmd/ folder 39 | to your %path%. 40 | 41 | 42 | How to start using PortableGit 43 | ------------------------------ 44 | 45 | If you are comfortable with a Unix-like shell, just launch 'git-bash.exe'. 46 | 47 | If not, just launch 'git-cmd.exe'. 48 | 49 | Alternatively, you can execute these commands to modify the %path% 50 | variable temporarily: 51 | 52 | set gitdir=c:\portablegit 53 | set path=%gitdir%\cmd;%path% 54 | 55 | Adjust the 'gitdir' according to your setup. As long as you do not 56 | close the command window, you can now simply type "git" or "gitk" to 57 | really call "c:\portablegit\cmd\git.cmd" or "c:\portablegit\cmd\gitk.cmd". 58 | 59 | By default, git-cmd and git-bash use the directory they were started from as 60 | the working directory when run. You can override this by passing --cd-to-home 61 | to them, which will set the user's home directory as the working directory (as 62 | if Git for Windows was installed). 63 | 64 | In addition, if you set the HOME environment variable (either permanently or 65 | for the current session only) you can make Git store the configuration files 66 | and the cloned repositories in the directory specified in that variable. And if 67 | you specify --cd-to-home, git-bash and git-cmd will use that as the 68 | working directory, too. For example: 69 | 70 | set HOME=%cd%/home 71 | git --cd-to-home 72 | will use the relative directory named home (%cd% specifies the current 73 | directory). 74 | 75 | Quick start 76 | ----------- 77 | 78 | Start configuring git with your personal settings: 79 | git config --global user.name "Joe Sixpack" 80 | git config --global user.email joe.sixpack@g_mail.com 81 | 82 | Start using git: 83 | git --help 84 | 85 | 86 | How to change %path% permanently 87 | -------------------------------- 88 | 89 | You may also want to make the modification to the %path% variable a 90 | permanent one. The %path% variable may be changed: 91 | 92 | * either on a System level (for all users in the lower pane), if you are 93 | an Administrator 94 | * or for your own user account only (in the upper pane). 95 | 96 | To change the %path% variable permanently: 97 | 98 | * right-click "My Computer", 99 | * select "Properties", 100 | * open "Advanced", 101 | * click "Environment Variables", 102 | * highlight the "Path" variable, 103 | * click "Edit" (either in upper or in lower pane), 104 | * add your specific path to front of "Variable value" field, separated 105 | by a semicolon from the existing entry. 106 | 107 | -------------------------------------------------------------------------------- /portable/root/usr/share/git/git-for-windows.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/ghfw-build-extra/69bd5e6f85e4842f07db71c9618a621154c52254/portable/root/usr/share/git/git-for-windows.ico -------------------------------------------------------------------------------- /portable/root/usr/share/git/git.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/ghfw-build-extra/69bd5e6f85e4842f07db71c9618a621154c52254/portable/root/usr/share/git/git.ico -------------------------------------------------------------------------------- /post-install.bat: -------------------------------------------------------------------------------- 1 | @REM This script is intended to be run after installation of Git for Windows 2 | @REM (including the portable version) 3 | 4 | @REM If run manually, it should be run via 5 | @REM git-bash.exe --no-needs-console --hide --no-cd --command=post-install.cmd 6 | @REM to hide the console. 7 | 8 | @REM Change to the directory in which this script lives. 9 | @REM https://technet.microsoft.com/en-us/library/bb490909.aspx says: 10 | @REM ~dpI Expands I to a drive letter and path only. 11 | @REM ~fI Expands I to a fully qualified path name. 12 | @FOR /F "delims=" %%D IN ("%~dp0") DO @CD %%~fD 13 | 14 | @REM If this is a 32-bit Git for Windows, adjust the DLL address ranges. 15 | @REM We cannot use %PROCESSOR_ARCHITECTURE% for this test because it is 16 | @REM allowed to install a 32-bit Git for Windows into a 64-bit system. 17 | @IF EXIST mingw32\bin\git.exe @( 18 | @REM We need to rebase just to make sure that it still works even with 19 | @REM 32-bit Windows 10 20 | @FOR /F "tokens=4 delims=.[XP " %%i IN ('ver') DO @SET ver=%%i 21 | @IF 10 LEQ %ver @( 22 | @REM We copy `rebase.exe` because it links to `msys-2.0.dll` 23 | @REM (and @REM thus prevents modifying it). It is okay to 24 | @REM execute `rebase.exe`, though, because the DLL base address 25 | @REM problems only really show when other processes are 26 | @REM `fork()`ed and `rebase.exe` does no such thing. 27 | @IF NOT EXIST bin\rebase.exe @( 28 | @IF NOT EXIST bin @MKDIR bin 29 | @COPY usr\bin\rebase.exe bin\rebase.exe 30 | ) 31 | @IF NOT EXIST bin\msys-2.0.dll @( 32 | @COPY usr\bin\msys-2.0.dll bin\msys-2.0.dll 33 | ) 34 | @bin\rebase.exe -b 0x64000000 usr\bin\msys-2.0.dll 35 | ) 36 | 37 | usr\bin\dash.exe -c '/usr/bin/dash usr/bin/rebaseall -p' 38 | ) 39 | 40 | @REM Run the post-install scripts 41 | @usr\bin\bash.exe --norc -c "export PATH=/usr/bin:$PATH; export SYSCONFDIR=/etc; for p in $(export LC_COLLATE=C; echo /etc/post-install/*.post); do test -e \"$p\" && . \"$p\"; done" 42 | 43 | @REM Remove this script 44 | @DEL post-install.bat 45 | -------------------------------------------------------------------------------- /render-release-notes.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | usage () { 4 | cat<] [--css ] [--copy-css | --preview] 7 | 8 | If this script is executed without specifying any arguments, ReleaseNotes.html 9 | will be generated in the present working directory and the corresponding 10 | ReleaseNotes.css stylesheet will be copied to the present working directory as 11 | well. 12 | 13 | --output 14 | Use this argument to specify the output directory for the generated 15 | ReleaseNotes.html file. The default location is the present working 16 | directory. 17 | 18 | --css 19 | Specifies the directory portion of the CSS stylesheet path to render 20 | for the @href attribute of the element in the Release Notes 21 | HTML file. The specified path will be taken relative to the path 22 | specified for the --output argument. If a value is not provided for 23 | this option, the CSS path will default to the path provided for 24 | --output. 25 | 26 | --copy-css 27 | Instructs this script to also copy the CSS stylesheet to the directory 28 | specified by the --css argument (or if not specified, the directory 29 | specified by the --output argument). 30 | 31 | When rendering the release notes as part of an installer package, it is 32 | not necessary to copy the CSS stylesheet. The installer builders should 33 | ensure that the CSS stylesheet is installed to the appropriate location 34 | to allow for proper release notes styling when viewing them in a 35 | browser. 36 | 37 | --preview 38 | This option implies the usage of --copy-css. After generating 39 | ReleaseNotes.html, the script will open ReleaseNotes.html in your 40 | default web browser. 41 | 42 | EXAMPLE: 43 | ======== 44 | 45 | $0 --output ~/ --css styles --copy-css 46 | 47 | In this example, the ReleaseNotes.html file will be rendered to the 48 | current user's home directory. The HTML file will be rendered to look 49 | for its CSS stylesheet at ~/styles. Due to --copy-css being specified, 50 | ReleaseNotes.css will be copied to ~/styles so that when viewing the 51 | release notes in a browser, the release notes are properly styled. 52 | EOF 53 | exit 54 | } 55 | 56 | die () { 57 | echo "$*" >&2 58 | exit 1 59 | } 60 | 61 | render_release_notes () { 62 | (homepage=https://git-for-windows.github.io/ && 63 | contribute=$homepage#contribute && 64 | wiki=https://github.com/git-for-windows/git/wiki && 65 | faq=$wiki/FAQ && 66 | mailinglist=mailto:git@vger.kernel.org && 67 | links="$(printf "%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n" \ 68 | '')" && 77 | printf '%s\n%s\n%s\n%s %s\n%s %s\n%s\n%s\n%s\n%s\n' \ 78 | '' \ 79 | '' \ 80 | '' \ 81 | '' \ 83 | '' \ 85 | '' \ 86 | '' \ 87 | "$links" \ 88 | '
' 89 | markdown "$SCRIPT_PATH"/ReleaseNotes.md || 90 | die "Could not generate ReleaseNotes.html" 91 | printf '
\n\n\n') >"$OUTPUTDIR${OUTPUTDIR:+/}ReleaseNotes.html" 92 | } 93 | 94 | COPYCSS= 95 | PREVIEW= 96 | 97 | test $# -eq 0 && COPYCSS=1 || { 98 | while test $# -gt 0 99 | do 100 | case "$1" in 101 | --copy-css) 102 | COPYCSS=1 103 | ;; 104 | --css) 105 | shift 106 | CSSDIR="${1%/}" 107 | ;; 108 | --output) 109 | shift 110 | OUTPUTDIR="${1%/}" 111 | ;; 112 | --preview|-p) 113 | PREVIEW=1 114 | COPYCSS=1 115 | ;; 116 | --help|*) 117 | usage 118 | ;; 119 | esac 120 | shift 121 | done 122 | } 123 | 124 | SCRIPT_PATH="$(cd "$(dirname "$0")" && pwd)" 125 | 126 | # Generate the ReleaseNotes.html file 127 | test -x /usr/bin/markdown || 128 | export PATH="$PATH:$(readlink -f "$SCRIPT_PATH")/../../bin" 129 | 130 | # Install markdown 131 | type markdown || 132 | pacman -Sy --noconfirm markdown || 133 | die "Could not install markdown" 134 | 135 | test -f "$OUTPUTDIR${OUTPUTDIR:+/}Release.html" && 136 | test "$OUTPUTDIR${OUTPUTDIR:+/}Release.html" -nt "$SCRIPT_PATH"/ReleaseNotes.md && 137 | test "$OUTPUTDIR${OUTPUTDIR:+/}Release.html" -nt "$SCRIPT_PATH"/render-release-notes.sh || { 138 | render_release_notes || die "Could not render $OUTPUTDIR${OUTPUTDIR:+/}ReleaseNotes.html" 139 | test -z "$COPYCSS" || { 140 | test -z "$CSSDIR" && CSSDIR="$OUTPUTDIR" || CSSDIR="$OUTPUTDIR${OUTPUTDIR:+/}$CSSDIR" 141 | test -z "$CSSDIR" || test -d "$CSSDIR" || mkdir -p "$CSSDIR" 142 | cp -u "$SCRIPT_PATH"/ReleaseNotes.css "$CSSDIR${CSSDIR:+/}ReleaseNotes.css" 143 | } 144 | } 145 | 146 | test -z "$PREVIEW" || start "$OUTPUTDIR${OUTPUTDIR:+/}ReleaseNotes.html" 147 | -------------------------------------------------------------------------------- /sdk-installer/release.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Recreate git-sdk-$VERSION.exe 4 | 5 | test -z "$1" && { 6 | echo "Usage: $0 []" 7 | exit 1 8 | } 9 | 10 | die () { 11 | echo "$*" >&2 12 | exit 1 13 | } 14 | 15 | ARCH="$(uname -m)" 16 | case "$ARCH" in 17 | i686) 18 | BITNESS=32 19 | ;; 20 | x86_64) 21 | BITNESS=64 22 | ;; 23 | *) 24 | die "Unhandled architecture: $ARCH" 25 | ;; 26 | esac 27 | 28 | GIT_BRANCH="${2:-master}" 29 | GIT_CLONE_URL=https://github.com/git-for-windows/git 30 | 31 | FAKEROOTDIR="$(cd "$(dirname "$0")" && pwd)/root" 32 | TARGET="$HOME"/git-sdk-installer-"$1"-$BITNESS.7z.exe 33 | OPTS7="-m0=lzma -mx=9 -md=64M" 34 | TMPPACK=/tmp.7z 35 | SCRIPT_PATH="$(cd "$(dirname "$0")" && pwd)" 36 | 37 | mkdir -p "$FAKEROOTDIR/usr/bin" "$FAKEROOTDIR/etc" || 38 | die "Could not create fake root directory" 39 | 40 | sed -e "s|@@ARCH@@|$ARCH|g" \ 41 | -e "s|@@BITNESS@@|$BITNESS|g" \ 42 | -e "s|@@GIT_BRANCH@@|$GIT_BRANCH|g" \ 43 | -e "s|@@GIT_CLONE_URL@@|$GIT_CLONE_URL|g" \ 44 | <"$SCRIPT_PATH"/setup-git-sdk.bat >"$FAKEROOTDIR"/setup-git-sdk.bat || 45 | die "Could not generate setup script" 46 | 47 | cp /usr/bin/dash.exe "$FAKEROOTDIR/usr/bin/sh.exe" && 48 | sed -e 's/^#\(XferCommand.*curl\).*/\1 --anyauth -C - -L -f %u >%o/' \ 49 | "$FAKEROOTDIR/etc/pacman.conf.proxy" || 50 | die "Could not copy extra files into fake root" 51 | 52 | dlls_for_exes () { 53 | # Add DLLs' transitive dependencies 54 | dlls= 55 | todo="$* " 56 | while test -n "$todo" 57 | do 58 | path=${todo%% *} 59 | todo=${todo#* } 60 | case "$path" in ''|' ') continue;; esac 61 | for dll in $(objdump -p "$path" | 62 | sed -n 's/^\tDLL Name: msys-/usr\/bin\/msys-/p') 63 | do 64 | case "$dlls" in 65 | *"$dll"*) ;; # already found 66 | *) dlls="$dlls $dll"; todo="$todo /$dll ";; 67 | esac 68 | done 69 | done 70 | echo "$dlls" 71 | } 72 | 73 | fileList="etc/nsswitch.conf \ 74 | etc/pacman.conf \ 75 | etc/pacman.d \ 76 | usr/bin/pacman-key \ 77 | usr/bin/tput.exe \ 78 | usr/bin/pacman.exe \ 79 | usr/bin/curl.exe \ 80 | usr/bin/gpg.exe \ 81 | usr/bin/chmod.exe \ 82 | usr/bin/wc.exe \ 83 | usr/bin/find.exe \ 84 | $(dlls_for_exes /usr/bin/gpg.exe /usr/bin/curl.exe /usr/bin/chmod.exe \ 85 | /usr/bin/wc.exe /usr/bin/find.exe) \ 86 | usr/ssl/certs/ca-bundle.crt \ 87 | var/lib/pacman \ 88 | usr/share/pacman/keyrings \ 89 | $FAKEROOTDIR/setup-git-sdk.bat $FAKEROOTDIR/etc $FAKEROOTDIR/usr" 90 | 91 | type 7za || 92 | pacman -Sy --noconfirm p7zip || 93 | die "Could not install 7-Zip" 94 | 95 | echo "Creating archive" && 96 | (cd / && 7za -x'!var/lib/pacman/*' a $OPTS7 "$TMPPACK" $fileList) && 97 | (cat "$SCRIPT_PATH/../7-Zip/7zSD.sfx" && 98 | echo ';!@Install@!UTF-8!' && 99 | echo 'Title="Git for Windows '$BITNESS'-bit SDK"' && 100 | echo 'BeginPrompt="This archive extracts an SDK to build, test and package Git for Windows '$BITNESS'-bit"' && 101 | echo 'CancelPrompt="Do you want to cancel the Git SDK installation?"' && 102 | echo 'ExtractDialogText="Please, wait..."' && 103 | echo 'ExtractPathText="Where do you want to install the Git SDK?"' && 104 | echo 'ExtractTitle="Extracting..."' && 105 | echo 'GUIFlags="8+32+64+256+4096"' && 106 | echo 'GUIMode="1"' && 107 | echo 'InstallPath="C:\\git-sdk-'$BITNESS'"' && 108 | echo 'OverwriteMode="2"' && 109 | echo 'ExecuteFile="setup-git-sdk.bat"' && 110 | echo 'Delete="setup-git-sdk.bat"' && 111 | echo ';!@InstallEnd@!' && 112 | cat "$TMPPACK") > "$TARGET" && 113 | echo "Success! You will find the new installer at \"$TARGET\"." && 114 | echo "It is a self-extracting .7z archive." && 115 | rm $TMPPACK 116 | -------------------------------------------------------------------------------- /sdk-installer/setup-git-sdk.bat: -------------------------------------------------------------------------------- 1 | @REM Set up the Git SDK 2 | 3 | @REM determine root directory 4 | 5 | @REM https://technet.microsoft.com/en-us/library/bb490909.aspx says: 6 | @REM ~dpI Expands I to a drive letter and path only. 7 | @REM ~fI Expands I to a fully qualified path name. 8 | @FOR /F "delims=" %%D in ("%~dp0") do @set cwd=%%~fD 9 | 10 | @REM set PATH 11 | @set PATH=%cwd%\usr\bin;%PATH% 12 | 13 | @REM set MSYSTEM so that MSYS2 starts up in the correct mode 14 | @set MSYSTEM=MINGW@@BITNESS@@ 15 | 16 | @REM need to rebase just to make sure that it still works even with Windows 10 17 | @SET initialrebase=false 18 | @FOR /F "tokens=4 delims=.[XP " %%i IN ('ver') DO @SET ver=%%i 19 | @IF 10 LEQ %ver @( 20 | @SET initialrebase=false 21 | ) 22 | 23 | @IF %initialrebase% == true @( 24 | @REM we copy `rebase.exe` because it links to `msys-2.0.dll`. 25 | @IF NOT EXIST "%cwd%"\bin\rebase.exe @( 26 | @IF NOT EXIST "%cwd%"\bin @MKDIR "%cwd%"\bin 27 | @COPY "%cwd%"\usr\bin\rebase.exe "%cwd%"\bin\rebase.exe 28 | ) 29 | @IF NOT EXIST bin\msys-2.0.dll @( 30 | @COPY usr\bin\msys-2.0.dll bin\msys-2.0.dll 31 | ) 32 | @"%cwd%"\bin\rebase.exe -b 0x63000000 "%cwd%"\usr\bin\msys-2.0.dll 33 | ) 34 | 35 | @SET /A counter=0 36 | :INSTALL_RUNTIME 37 | @SET /A counter+=1 38 | @IF %counter% GEQ 5 @( 39 | @ECHO Could not install msys2-runtime 40 | @PAUSE 41 | @EXIT 1 42 | ) 43 | 44 | @REM Maybe we need a proxy? 45 | @IF %counter% GEQ 2 @( 46 | @ECHO. 47 | @ECHO There was a problem accessing the MSYS2 repositories 48 | @ECHO If your setup requires an HTTP proxy to access the web, 49 | @ECHO please specify it here, otherwise leave it empty. 50 | @ECHO. 51 | @SET /p proxy= "HTTP proxy: " 52 | ) 53 | @REM Check the proxy variable here because of delayed expansion 54 | @IF NOT "%proxy%" == "" @( 55 | @SET http_proxy=%proxy% 56 | @SET https_proxy=%proxy% 57 | @IF %counter% EQU 2 @( 58 | @COPY "%cwd%"\etc\pacman.conf.proxy "%cwd%"\etc\pacman.conf 59 | ) 60 | ) 61 | 62 | @REM update the Pacman package indices first, then force-install msys2-runtime 63 | @REM (we ship with a stripped-down msys2-runtime, gpg and pacman), so that 64 | @REM pacman's post-install scripts run without complaining about heap problems 65 | @"%cwd%"\usr\bin\pacman -Sy --needed --force --noconfirm msys2-runtime 66 | 67 | @REM need to rebase just to make sure that it still works even with Windows 10 68 | @IF %initialrebase% == true @( 69 | @"%cwd%"\bin\rebase.exe -b 0x63000000 "%cwd%"\usr\bin\msys-2.0.dll 70 | ) 71 | 72 | @IF ERRORLEVEL 1 GOTO INSTALL_RUNTIME 73 | 74 | @SET /A counter=0 75 | :INSTALL_BASH 76 | @SET /A counter+=1 77 | @IF %counter% GEQ 5 @( 78 | @ECHO Could not install bash 79 | @PAUSE 80 | @EXIT 1 81 | ) 82 | 83 | @REM next, force update bash 84 | @"%cwd%"\usr\bin\pacman -S --needed --force --noconfirm bash 85 | 86 | @SET /A counter=0 87 | :INSTALL_INFO 88 | @SET /A counter+=1 89 | @IF %counter% GEQ 5 @( 90 | @ECHO Could not install info 91 | @PAUSE 92 | @EXIT 1 93 | ) 94 | 95 | @REM we need a /tmp directory, just for the time being 96 | @MKDIR "%cwd%"\tmp 97 | 98 | @REM next, initialize pacman's keyring 99 | @"%cwd%"\usr\bin\bash.exe -l -c '/usr/bin/bash /usr/bin/pacman-key --init' 100 | @IF ERRORLEVEL 1 PAUSE 101 | 102 | @REM next, force update info 103 | @"%cwd%"\usr\bin\pacman -S --needed --force --noconfirm info 104 | 105 | @IF ERRORLEVEL 1 GOTO INSTALL_INFO 106 | 107 | @SET /A counter=0 108 | :INSTALL_MSYS2_KEYRING 109 | @SET /A counter+=1 110 | @IF %counter% GEQ 5 @( 111 | @ECHO Could not install msys2-keyring 112 | @PAUSE 113 | @EXIT 1 114 | ) 115 | 116 | @REM next, force update msys2-keyring 117 | @"%cwd%"\usr\bin\pacman -S --needed --force --noconfirm gnupg msys2-keyring 118 | 119 | @IF ERRORLEVEL 1 GOTO INSTALL_MSYS2_KEYRING 120 | 121 | @REM now, add Git for Windows' keyring 122 | @"%cwd%"\usr\bin\bash.exe -l -c ^ 123 | '/usr/bin/bash /usr/bin/pacman-key --populate git-for-windows' 124 | @IF ERRORLEVEL 1 PAUSE 125 | 126 | @SET /A counter=0 127 | :INSTALL_PACMAN 128 | @SET /A counter+=1 129 | @IF %counter% GEQ 5 @( 130 | @ECHO Could not install pacman 131 | @PAUSE 132 | @EXIT 1 133 | ) 134 | 135 | @REM next, force update pacman 136 | @"%cwd%"\usr\bin\pacman -S --needed --force --noconfirm pacman 137 | 138 | @IF ERRORLEVEL 1 GOTO INSTALL_PACMAN 139 | 140 | @SET /A counter=0 141 | :INSTALL_REST 142 | @SET /A counter+=1 143 | @IF %counter% GEQ 5 @( 144 | @ECHO Could not install the remaining packages 145 | @PAUSE 146 | @EXIT 1 147 | ) 148 | 149 | @REM now update the rest 150 | @"%cwd%"\usr\bin\pacman -S --needed --force --noconfirm ^ 151 | base python less openssh patch make tar diffutils ca-certificates ^ 152 | git perl-Error perl perl-Authen-SASL perl-libwww perl-MIME-tools ^ 153 | perl-Net-SMTP-SSL perl-TermReadKey dos2unix asciidoc xmlto ^ 154 | subversion mintty vim git-extra p7zip markdown winpty ^ 155 | mingw-w64-@@ARCH@@-git-doc-html ^ 156 | mingw-w64-@@ARCH@@-git mingw-w64-@@ARCH@@-toolchain ^ 157 | mingw-w64-@@ARCH@@-curl mingw-w64-@@ARCH@@-expat ^ 158 | mingw-w64-@@ARCH@@-openssl mingw-w64-@@ARCH@@-tcl ^ 159 | mingw-w64-@@ARCH@@-pcre mingw-w64-@@ARCH@@-connect ^ 160 | git-flow ssh-pageant 161 | 162 | @IF ERRORLEVEL 1 GOTO INSTALL_REST 163 | 164 | @REM Avoid overlapping address ranges 165 | @IF MINGW32 == %MSYSTEM% @( 166 | ECHO Auto-rebasing .dll files 167 | CALL "%cwd%"\autorebase.bat 168 | ) 169 | 170 | @REM If an HTTP proxy is required, configure it for Git Bash sessions, 171 | @REM but only if the environment variable was not already set globally 172 | @IF DEFINED proxy @( 173 | @ECHO http_proxy=%proxy% > etc\profile.d\proxy.sh 174 | @ECHO https_proxy=%proxy% >> etc\profile.d\proxy.sh 175 | @ECHO export http_proxy https_proxy >> etc\profile.d\proxy.sh 176 | @ECHO. 177 | @ECHO Installed /etc/profile.d/proxy.sh to set proxy in Git Bash 178 | ) 179 | 180 | @REM Before running a shell, let's prevent complaints about "permission denied" 181 | @REM from MSYS2's /etc/post-install/01-devices.post 182 | @MKDIR "%cwd%"\dev\shm 2> NUL 183 | @MKDIR "%cwd%"\dev\mqueue 2> NUL 184 | 185 | @IF NOT DEFINED JENKINS_URL @( 186 | @REM Install shortcut on the desktop 187 | @ECHO. 188 | @ECHO Installing the 'Git SDK @@BITNESS@@-bit' shortcut on the Desktop 189 | @bash --login -c 'SHORTCUT="$HOME/Desktop/Git SDK @@BITNESS@@-bit.lnk"; test -f "$SHORTCUT" ^|^| create-shortcut.exe --icon-file /msys2.ico --work-dir / /git-bash.exe "$SHORTCUT"' 190 | 191 | @REM now clone the Git sources, build it, and start an interactive shell 192 | @bash --login -c "mkdir -p /usr/src && cd /usr/src && for project in MINGW-packages MSYS2-packages build-extra; do test ! -d $project && mkdir -p $project && (cd $project && git init && git config core.autocrlf false && git remote add origin https://github.com/git-for-windows/$project); done; if test ! -d git; then git clone -b @@GIT_BRANCH@@ -c core.autocrlf=false --depth 1 https://github.com/git-for-windows/git; fi && cd git && make install" 193 | 194 | @IF ERRORLEVEL 1 PAUSE 195 | 196 | @start mintty -i /msys2.ico -t "Git SDK @@BITNESS@@-bit" bash --login -i 197 | ) 198 | -------------------------------------------------------------------------------- /send-to-virus-total.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | die () { 4 | echo "$*" >&2 5 | exit 1 6 | } 7 | 8 | form_param= 9 | type= 10 | case "$#,$1" in 11 | 1,http://*|1,https://*) 12 | form_param=url="$1" 13 | type=url 14 | ;; 15 | 1,*) 16 | test -f "$1" || 17 | die "No such file: $1" 18 | form_param=file="@$1" 19 | type=file 20 | ;; 21 | *) 22 | die "Usage: $0 | " 23 | ;; 24 | esac 25 | 26 | apikey=$(sed -n '/^machine api.virustotal.com$/,/^password/s/^password //p' \ 27 | <$HOME/_netrc) 28 | test -n "$apikey" || 29 | die "No API key found for api.virustotal.com in $HOME/_netrc" 30 | 31 | response="$(curl --form apikey="$apikey" --form "$form_param" -i -L -X POST -0 \ 32 | https://www.virustotal.com/vtapi/v2/$type/scan)" || 33 | die "Error: $response" 34 | 35 | test -z "$SHOW_HEADER" || 36 | printf "Header:\n%s\n" "$(echo "$response" | sed '/^$/q')" 37 | 38 | extract_json () { 39 | echo "$1" | sed -n 's/.*"'"$2"'": *"\([^"]*\).*/\1/p' 40 | } 41 | 42 | extract_json "$response" verbose_msg >&2 43 | 44 | start "$(extract_json "$response" permalink)" 45 | -------------------------------------------------------------------------------- /update-upstream-packages.sh: -------------------------------------------------------------------------------- 1 | # update any/all upstream packages 2 | pacman -Syu --noconfirm 3 | -------------------------------------------------------------------------------- /upload-to-github.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | die () { 4 | echo "$*" >&2 5 | exit 1 6 | } 7 | 8 | test $# -ge 2 || 9 | die "Usage: $0 [--repo=] ..." 10 | 11 | repo=git-for-windows/build-extra 12 | case "$1" in 13 | --repo=*) 14 | repo=${1#--repo=} 15 | test "a${repo}" != "a${repo#*/}" || 16 | repo=git-for-windows/$repo 17 | shift 18 | ;; 19 | esac 20 | 21 | tagname="$1" 22 | shift 23 | 24 | url=https://api.github.com/repos/$repo/releases 25 | id="$(curl --netrc -s $url | 26 | grep -B1 "\"tag_name\": \"$tagname\"" | 27 | sed -n 's/.*"id": *\([0-9]*\).*/\1/p')" 28 | test -n "$id" || { 29 | out="$(curl --netrc -s -XPOST -d \ 30 | '{"tag_name":"'"$tagname"'","draft":true,"prerelease":true}' \ 31 | $url)" || 32 | die "Error creating release: $out" 33 | id="$(echo "$out" | 34 | sed -n 's/^ "id": *\([0-9]*\).*/\1/p')" 35 | test -n "$id" || 36 | die "Could not create release for tag $tagname" 37 | } 38 | 39 | url=https://uploads.${url#https://api.} 40 | 41 | release_url= 42 | for path 43 | do 44 | case "$path" in 45 | *.exe) 46 | contenttype=application/executable 47 | ;; 48 | *.7z) 49 | contenttype=application/zip 50 | ;; 51 | *) 52 | contenttype="$(file --brief --mime-type "$path")" || 53 | die "Unknown file type: $path" 54 | ;; 55 | esac 56 | basename="$(basename "$path")" 57 | json="$(curl -i --netrc -XPOST -H "Content-Type: $contenttype" \ 58 | --data-binary @"$path" "$url/$id/assets?name=$basename")" || 59 | die "Could not upload $path (response: $json)" 60 | 61 | url2="$(echo "${json##*\"browser_download_url\":\"}" | sed -n \ 62 | '1s|\([^"]*/\)download\(/[^"]*/\)[^/]*".*|\1edit\2|'p)" 63 | if test -z "$release_url" 64 | then 65 | release_url=$url2 66 | else 67 | test "a$url2" = "a$release_url" || 68 | echo "Warning: inconsistent URL: $url2 vs $release_url" >&2 69 | fi 70 | done 71 | 72 | test -z "$release_url" || 73 | printf "\nNow direct your browser to:\n\n%s\n" "$release_url" 74 | --------------------------------------------------------------------------------