-
Notifications
You must be signed in to change notification settings - Fork 650
Add MSIX Installer #665
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Add MSIX Installer #665
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,161 @@ | ||||||
| <?xml version="1.0" encoding="utf-8"?> | ||||||
| <Package | ||||||
| xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" | ||||||
| xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10" | ||||||
| xmlns:uap2="http://schemas.microsoft.com/appx/manifest/uap/windows10/2" | ||||||
| xmlns:uap3="http://schemas.microsoft.com/appx/manifest/uap/windows10/3" | ||||||
| xmlns:uap10="http://schemas.microsoft.com/appx/manifest/uap/windows10/10" | ||||||
| xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities" | ||||||
| xmlns:desktop="http://schemas.microsoft.com/appx/manifest/desktop/windows10" | ||||||
| xmlns:desktop6="http://schemas.microsoft.com/appx/manifest/desktop/windows10/6" | ||||||
| IgnorableNamespaces="uap uap2 uap3 rescap desktop desktop6 uap10"> | ||||||
|
|
||||||
| <Identity | ||||||
| Name="Git.GitforWindows" | ||||||
| Publisher="CN=The Git Development Community" | ||||||
| Version="@@VERSION@@" /> | ||||||
|
|
||||||
| <Properties> | ||||||
| <DisplayName>Git for Windows</DisplayName> | ||||||
| <PublisherDisplayName>The Git Development Community</PublisherDisplayName> | ||||||
| <Logo>Assets\StoreLogo.png</Logo> | ||||||
| <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.</Description> | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
I don't think I've ever seen "the Git" in any reasonably formal writing. |
||||||
| <desktop6:FileSystemWriteVirtualization>disabled</desktop6:FileSystemWriteVirtualization> | ||||||
| <desktop6:RegistryWriteVirtualization>disabled</desktop6:RegistryWriteVirtualization> | ||||||
| </Properties> | ||||||
|
|
||||||
| <Dependencies> | ||||||
| <TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.19041.0" MaxVersionTested="10.0.26100.0" /> | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does the
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are the ARM64 builds not native ARM64? If so, there shouldn't be an ARM64 package
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Partially.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To clarify: All the executables that can be native are native, but some need POSIX emulation and we can't currently do that in ARM64 binaries.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm, that's a bit of a weird one for MSIX packages, I guess ARM64 package makes sense then |
||||||
| </Dependencies> | ||||||
|
|
||||||
| <Resources> | ||||||
| <Resource Language="en-us"/> | ||||||
| </Resources> | ||||||
|
|
||||||
| <Applications> | ||||||
| <Application Id="GitBash" Executable="git-bash.exe" uap10:RuntimeBehavior="win32App" uap10:TrustLevel="mediumIL"> | ||||||
| <uap3:VisualElements | ||||||
| DisplayName="Git Bash" | ||||||
| Description="Git Bash - Unix-like command line for Git" | ||||||
| VisualGroup="Git for Windows" | ||||||
| BackgroundColor="transparent" | ||||||
| Square150x150Logo="Assets\Square150x150Logo.png" | ||||||
| Square44x44Logo="Assets\Square44x44Logo.png"> | ||||||
| </uap3:VisualElements> | ||||||
| <Extensions> | ||||||
| <uap3:Extension Category="windows.appExecutionAlias"> | ||||||
| <uap3:AppExecutionAlias> | ||||||
| <desktop:ExecutionAlias Alias="git-bash.exe" /> | ||||||
| </uap3:AppExecutionAlias> | ||||||
| </uap3:Extension> | ||||||
| </Extensions> | ||||||
| </Application> | ||||||
| <Application Id="GitCmd" Executable="git-cmd.exe" uap10:RuntimeBehavior="win32App" uap10:TrustLevel="mediumIL"> | ||||||
| <uap3:VisualElements | ||||||
| DisplayName="Git CMD" | ||||||
| Description="Git CMD - Windows command line for Git" | ||||||
| VisualGroup="Git for Windows" | ||||||
| BackgroundColor="transparent" | ||||||
| Square150x150Logo="Assets\Square150x150Logo.png" | ||||||
| Square44x44Logo="Assets\Square44x44Logo.png"> | ||||||
| </uap3:VisualElements> | ||||||
| <Extensions> | ||||||
| <uap3:Extension Category="windows.appExecutionAlias"> | ||||||
| <uap3:AppExecutionAlias> | ||||||
| <desktop:ExecutionAlias Alias="git-cmd.exe" /> | ||||||
| </uap3:AppExecutionAlias> | ||||||
| </uap3:Extension> | ||||||
| </Extensions> | ||||||
| </Application> | ||||||
| <Application Id="GitGui" Executable="cmd\git-gui.exe" uap10:RuntimeBehavior="win32App" uap10:TrustLevel="mediumIL"> | ||||||
| <uap3:VisualElements | ||||||
| DisplayName="Git GUI" | ||||||
| Description="Git GUI - Windows graphical interface for Git" | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| VisualGroup="Git for Windows" | ||||||
| BackgroundColor="transparent" | ||||||
| Square150x150Logo="Assets\Square150x150Logo.png" | ||||||
| Square44x44Logo="Assets\Square44x44Logo.png"> | ||||||
| </uap3:VisualElements> | ||||||
| <Extensions> | ||||||
| <uap3:Extension Category="windows.appExecutionAlias"> | ||||||
| <uap3:AppExecutionAlias> | ||||||
| <desktop:ExecutionAlias Alias="git-gui.exe" /> | ||||||
| </uap3:AppExecutionAlias> | ||||||
| </uap3:Extension> | ||||||
| </Extensions> | ||||||
| </Application> | ||||||
| <Application Id="Bash" Executable="bin\bash.exe" uap10:RuntimeBehavior="win32App" uap10:TrustLevel="mediumIL"> | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What's the purpose of the |
||||||
| <uap:VisualElements | ||||||
| DisplayName="Bash" | ||||||
| Description="Bash shell" | ||||||
| BackgroundColor="transparent" | ||||||
| Square150x150Logo="Assets\Square150x150Logo.png" | ||||||
| Square44x44Logo="Assets\Square44x44Logo.png" | ||||||
| AppListEntry="none"> | ||||||
| </uap:VisualElements> | ||||||
| <Extensions> | ||||||
| <uap3:Extension Category="windows.appExecutionAlias"> | ||||||
| <uap3:AppExecutionAlias> | ||||||
| <desktop:ExecutionAlias Alias="bash.exe" /> | ||||||
| </uap3:AppExecutionAlias> | ||||||
| </uap3:Extension> | ||||||
| </Extensions> | ||||||
| </Application> | ||||||
| <Application Id="Git" Executable="bin\git.exe" uap10:RuntimeBehavior="win32App" uap10:TrustLevel="mediumIL"> | ||||||
| <uap:VisualElements | ||||||
| DisplayName="Git" | ||||||
| Description="Git version control" | ||||||
| BackgroundColor="transparent" | ||||||
| Square150x150Logo="Assets\Square150x150Logo.png" | ||||||
| Square44x44Logo="Assets\Square44x44Logo.png" | ||||||
| AppListEntry="none"> | ||||||
| </uap:VisualElements> | ||||||
| <Extensions> | ||||||
| <uap3:Extension Category="windows.appExecutionAlias"> | ||||||
| <uap3:AppExecutionAlias> | ||||||
| <desktop:ExecutionAlias Alias="git.exe" /> | ||||||
| </uap3:AppExecutionAlias> | ||||||
| </uap3:Extension> | ||||||
| </Extensions> | ||||||
| </Application> | ||||||
| <Application Id="Sh" Executable="bin\sh.exe" uap10:RuntimeBehavior="win32App" uap10:TrustLevel="mediumIL"> | ||||||
| <uap:VisualElements | ||||||
| DisplayName="Sh" | ||||||
| Description="Shell" | ||||||
| BackgroundColor="transparent" | ||||||
| Square150x150Logo="Assets\Square150x150Logo.png" | ||||||
| Square44x44Logo="Assets\Square44x44Logo.png" | ||||||
| AppListEntry="none"> | ||||||
| </uap:VisualElements> | ||||||
| <Extensions> | ||||||
| <uap3:Extension Category="windows.appExecutionAlias"> | ||||||
| <uap3:AppExecutionAlias> | ||||||
| <desktop:ExecutionAlias Alias="sh.exe" /> | ||||||
| </uap3:AppExecutionAlias> | ||||||
| </uap3:Extension> | ||||||
| </Extensions> | ||||||
| </Application> | ||||||
| <Application Id="Nano" Executable="usr\bin\nano.exe" uap10:RuntimeBehavior="win32App" uap10:TrustLevel="mediumIL"> | ||||||
| <uap:VisualElements | ||||||
| DisplayName="Nano" | ||||||
| Description="Nano Editor" | ||||||
| BackgroundColor="transparent" | ||||||
| Square150x150Logo="Assets\Square150x150Logo.png" | ||||||
| Square44x44Logo="Assets\Square44x44Logo.png" | ||||||
| AppListEntry="none"> | ||||||
| </uap:VisualElements> | ||||||
| <Extensions> | ||||||
| <uap3:Extension Category="windows.appExecutionAlias"> | ||||||
| <uap3:AppExecutionAlias> | ||||||
| <desktop:ExecutionAlias Alias="nano.exe" /> | ||||||
| </uap3:AppExecutionAlias> | ||||||
| </uap3:Extension> | ||||||
| </Extensions> | ||||||
| </Application> | ||||||
| </Applications> | ||||||
|
|
||||||
| <Capabilities> | ||||||
| <rescap:Capability Name="runFullTrust" /> | ||||||
| <rescap:Capability Name="unvirtualizedResources" /> | ||||||
| </Capabilities> | ||||||
| </Package> | ||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,156 +2,27 @@ | |
|
|
||
| # Build the portable Git for Windows. | ||
|
|
||
| die () { | ||
| echo "$*" >&1 | ||
| exit 1 | ||
| } | ||
|
|
||
| output_directory="$HOME" | ||
| include_pdbs= | ||
| while test $# -gt 0 | ||
| do | ||
| case "$1" in | ||
| --output) | ||
| shift | ||
| output_directory="$1" | ||
| ;; | ||
| --output=*) | ||
| output_directory="${1#*=}" | ||
| ;; | ||
| --include-pdbs) | ||
| include_pdbs=t | ||
| ;; | ||
| -*) | ||
| die "Unknown option: $1" | ||
| ;; | ||
| *) | ||
| break | ||
| esac | ||
| shift | ||
| done | ||
|
|
||
| test $# -gt 0 || | ||
| die "Usage: $0 [--output=<directory>] <version> [optional components]" | ||
|
|
||
| test -d "$output_directory" || | ||
| die "Directory inaccessible: '$output_directory'" | ||
| . "$(dirname "$0")/../release-common.sh" | ||
|
|
||
| case "$MSYSTEM" in | ||
| MINGW32) | ||
| BITNESS=32 | ||
| ARCH=i686 | ||
| ARTIFACT_SUFFIX="32-bit" | ||
| MD_ARG=128M | ||
| MINGW_PREFIX=mingw-w64-i686- | ||
| ;; | ||
| MINGW64) | ||
| BITNESS=64 | ||
| ARCH=x86_64 | ||
| ARTIFACT_SUFFIX="64-bit" | ||
| MD_ARG=256M | ||
| MINGW_PREFIX=mingw-w64-x86_64- | ||
| ;; | ||
| CLANGARM64) | ||
| BITNESS=64 | ||
| ARCH=aarch64 | ||
| ARTIFACT_SUFFIX=arm64 | ||
| MD_ARG=256M | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think |
||
| MINGW_PREFIX=mingw-w64-clang-aarch64- | ||
| ;; | ||
| *) | ||
| die "Unhandled MSYSTEM: $MSYSTEM" | ||
| ;; | ||
| MINGW32) ARTIFACT_SUFFIX="32-bit";; | ||
| MINGW64) ARTIFACT_SUFFIX="64-bit";; | ||
| CLANGARM64) ARTIFACT_SUFFIX=arm64;; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm surprised |
||
| esac | ||
| MSYSTEM_LOWER=${MSYSTEM,,} | ||
| VERSION=$1 | ||
| shift | ||
|
|
||
| TARGET="$output_directory"/PortableGit-"$VERSION"-"$ARTIFACT_SUFFIX".7z.exe | ||
| OPTS7="-m0=lzma -mqs -mlc=8 -mx=9 -md=$MD_ARG -mfb=273 -ms=256M " | ||
| TMPPACK=/tmp.7z | ||
| SCRIPT_PATH="$(cd "$(dirname "$0")" && pwd)" | ||
|
|
||
| case "$SCRIPT_PATH" in | ||
| *" "*) | ||
| die "This script cannot handle spaces in $SCRIPT_PATH" | ||
| ;; | ||
| esac | ||
|
|
||
|
|
||
| # Generate a couple of files dynamically | ||
|
|
||
| cp "$SCRIPT_PATH/../LICENSE.txt" "$SCRIPT_PATH/root/" || | ||
| die "Could not copy license file" | ||
|
|
||
| mkdir -p "$SCRIPT_PATH/root/dev/mqueue" || | ||
| die "Could not make /dev/mqueue directory" | ||
|
|
||
| mkdir -p "$SCRIPT_PATH/root/dev/shm" || | ||
| die "Could not make /dev/shm/ directory" | ||
|
|
||
| mkdir -p "$SCRIPT_PATH/root/etc" || | ||
| die "Could not make etc/ directory" | ||
|
|
||
| mkdir -p "$SCRIPT_PATH/root/tmp" || | ||
| die "Could not make tmp/ directory" | ||
|
|
||
| mkdir -p "$SCRIPT_PATH/root/bin" || | ||
| die "Could not make bin/ directory" | ||
|
|
||
| cp /cmd/git.exe "$SCRIPT_PATH/root/bin/git.exe" && | ||
| cp /$MSYSTEM_LOWER/share/git/compat-bash.exe "$SCRIPT_PATH/root/bin/bash.exe" && | ||
| cp /$MSYSTEM_LOWER/share/git/compat-bash.exe "$SCRIPT_PATH/root/bin/sh.exe" || | ||
| die "Could not install bin/ redirectors" | ||
| prepare_root | ||
|
|
||
| cp "$SCRIPT_PATH/../post-install.bat" "$SCRIPT_PATH/root/" || | ||
| die "Could not copy post-install script" | ||
|
|
||
| etc_gitconfig="$(git -c core.editor=echo config --system -e 2>/dev/null)" && | ||
| etc_gitconfig="$(cygpath -au "$etc_gitconfig")" && | ||
| etc_gitconfig="${etc_gitconfig#/}" || | ||
| die "Could not determine the path of the system config" | ||
|
|
||
| # Make a list of files to include | ||
| LIST="$(ARCH=$ARCH ETC_GITCONFIG="$etc_gitconfig" \ | ||
| PACKAGE_VERSIONS_FILE="$SCRIPT_PATH"/root/etc/package-versions.txt \ | ||
| sh "$SCRIPT_PATH"/../make-file-list.sh "$@" | | ||
| grep -v "^$etc_gitconfig$")" || | ||
| die "Could not generate file list" | ||
|
|
||
| mkdir -p "$SCRIPT_PATH/root/${etc_gitconfig%/*}" && | ||
| cp /"$etc_gitconfig" "$SCRIPT_PATH/root/$etc_gitconfig" && | ||
| git config -f "$SCRIPT_PATH/root/$etc_gitconfig" \ | ||
| credential.helper manager || | ||
| die "Could not configure Git-Credential-Manager as default" | ||
| test 64 != $BITNESS || | ||
| git config -f "$SCRIPT_PATH/root/$etc_gitconfig" --unset pack.packSizeLimit | ||
| git config -f "$SCRIPT_PATH/root/$etc_gitconfig" core.fscache true | ||
|
|
||
| case "$LIST" in | ||
| */git-credential-helper-selector.exe*) | ||
| git config -f "$SCRIPT_PATH/root/$etc_gitconfig" \ | ||
| credential.helper helper-selector | ||
| ;; | ||
| esac | ||
|
|
||
| git_core="$SCRIPT_PATH/root/$MSYSTEM_LOWER/libexec/git-core" && | ||
| rm -rf "$git_core" && | ||
| mkdir -p "$git_core" && | ||
| if test "$(stat -c %D /$MSYSTEM_LOWER/bin)" = "$(stat -c %D "$git_core")" | ||
| then | ||
| ln_or_cp=ln | ||
| else | ||
| ln_or_cp=cp | ||
| fi && | ||
| $ln_or_cp $(echo "$LIST" | sed -n "s|^$MSYSTEM_LOWER/bin/[^/]*\.dll$|/&|p") "$git_core" || | ||
| die "Could not copy .dll files into libexec/git-core/" | ||
|
|
||
| test -z "$include_pdbs" || { | ||
| find "$SCRIPT_PATH/root" -name \*.pdb -exec rm {} \; && | ||
| "$SCRIPT_PATH"/../please.sh bundle-pdbs \ | ||
| --arch=$ARCH --unpack="$SCRIPT_PATH"/root | ||
| } || | ||
| die "Could not unpack .pdb files" | ||
| init_etc_gitconfig | ||
| generate_file_list "$@" | ||
| copy_dlls_to_libexec | ||
| unpack_pdbs | ||
|
|
||
| TITLE="$BITNESS-bit" | ||
| test $ARCH == "aarch64" && TITLE="ARM64" | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
@@VERSION@@placeholder makes sense. Nit: The commit message talks about@@Version@@instead.