-
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 all 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 |
||||||
| </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 |
|---|---|---|
| @@ -0,0 +1,110 @@ | ||
| #!/bin/sh | ||
|
|
||
| # Build the MSIX package for Git for Windows. | ||
|
|
||
| . "$(dirname "$0")/../release-common.sh" | ||
|
|
||
| case "$MSYSTEM" in | ||
| MINGW32) ARTIFACT_SUFFIX="x86";; | ||
|
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 we'll need a |
||
| MINGW64) ARTIFACT_SUFFIX="x64";; | ||
|
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. But this explains why the suffix isn't common. I'm not sure how I feel about introducing a different suffix for one artefact, though. |
||
| CLANGARM64) ARTIFACT_SUFFIX=arm64;; | ||
| esac | ||
|
|
||
| # MSIX requires version in X.X.X.X format (numeric only) | ||
| # Convert Git for Windows versions like "2.47.1.windows.1" to "2.47.1.1" | ||
| # and test versions like "0-test" to "0.0.0.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. Do we have any plans how to handle snapshot and rc builds? |
||
| MSIX_VERSION="$(echo "$VERSION" | sed -e 's/\.windows\./\./' -e 's/[^0-9.]//g')" | ||
| # Ensure we have exactly 4 numeric segments | ||
| while test "$(echo "$MSIX_VERSION" | tr -cd '.' | wc -c)" -lt 3 | ||
| do | ||
| MSIX_VERSION="$MSIX_VERSION.0" | ||
| done | ||
|
|
||
| TARGET="$output_directory"/Git.GitforWindows_"$VERSION"_"$ARTIFACT_SUFFIX".msix | ||
|
|
||
| # Generate MSIX asset images from SVG | ||
| ASSETS_DIR="$SCRIPT_PATH/Assets" | ||
| mkdir -p "$ASSETS_DIR" || | ||
| die "Could not create Assets directory" | ||
|
|
||
| type rsvg-convert || | ||
| case "$ARCH" in | ||
| i686) pacman -Sy --noconfirm mingw-w64-i686-librsvg;; | ||
| x86_64) pacman -Sy --noconfirm mingw-w64-x86_64-librsvg;; | ||
| aarch64) pacman -Sy --noconfirm mingw-w64-clang-aarch64-librsvg;; | ||
| esac || | ||
| die "Could not install librsvg" | ||
|
|
||
| SVG_SOURCE="$SCRIPT_PATH/../git-for-windows.svg" | ||
| for spec in \ | ||
| LockScreenLogo.png:24 \ | ||
| LockScreenLogo.scale-200.png:48 \ | ||
| Square150x150Logo.png:150 \ | ||
| Square150x150Logo.scale-200.png:300 \ | ||
| Square44x44Logo.png:44 \ | ||
| Square44x44Logo.scale-200.png:88 \ | ||
| Square44x44Logo.targetsize-24_altform-unplated.png:24 \ | ||
| StoreLogo.png:50 | ||
| do | ||
| name="${spec%%:*}" | ||
| size="${spec##*:}" | ||
| rsvg-convert -w "$size" -h "$size" "$SVG_SOURCE" \ | ||
| -o "$ASSETS_DIR/$name" || | ||
| die "Could not generate $name" | ||
| done | ||
|
|
||
| prepare_root | ||
|
|
||
| init_etc_gitconfig | ||
| generate_file_list "$@" | ||
| copy_dlls_to_libexec | ||
| unpack_pdbs | ||
|
|
||
| # Find makeappx.exe from the Windows SDK | ||
| MAKEAPPX= | ||
| for sdk_dir in "/c/Program Files (x86)/Windows Kits/10/bin"/*/ | ||
| do | ||
| case "$ARCH" in | ||
| x86_64) sdk_arch=x64;; | ||
| i686) sdk_arch=x86;; | ||
| aarch64) sdk_arch=arm64;; | ||
| esac | ||
| if test -f "$sdk_dir$sdk_arch/makeappx.exe" | ||
| then | ||
| MAKEAPPX="$sdk_dir$sdk_arch/makeappx.exe" | ||
| fi | ||
| done | ||
| test -n "$MAKEAPPX" || | ||
| die "Could not find makeappx.exe in the Windows SDK" | ||
|
|
||
| # Create MSIX | ||
|
|
||
| MAPFILE=$SCRIPT_PATH/root/files.map | ||
| MANIFESTIN=$SCRIPT_PATH/appxmanifest.xml.in | ||
| MANIFESTOUT=$SCRIPT_PATH/root/appxmanifest.xml | ||
|
|
||
| echo "Create MSIX" | ||
|
|
||
| sed -e "s/@@VERSION@@/$MSIX_VERSION/g" <"$MANIFESTIN" >"$MANIFESTOUT" | ||
|
|
||
| echo "[Files]" >"$MAPFILE" && | ||
| echo "\"$(cygpath -aw "$SCRIPT_PATH")/root/appxmanifest.xml\" \"AppxManifest.xml\"" >>"$MAPFILE" && | ||
| echo "\"$(cygpath -aw "$SCRIPT_PATH")/root/bin/git.exe\" \"bin/git.exe\"" >>"$MAPFILE" && | ||
| echo "\"$(cygpath -aw "$SCRIPT_PATH")/root/bin/sh.exe\" \"bin/sh.exe\"" >>"$MAPFILE" && | ||
| echo "\"$(cygpath -aw "$SCRIPT_PATH")/root/bin/bash.exe\" \"bin/bash.exe\"" >>"$MAPFILE" && | ||
| echo "\"$(cygpath -aw "$SCRIPT_PATH")/Assets/LockScreenLogo.png\" \"Assets/LockScreenLogo.png\"" >>"$MAPFILE" && | ||
| echo "\"$(cygpath -aw "$SCRIPT_PATH")/Assets/LockScreenLogo.scale-200.png\" \"Assets/LockScreenLogo.scale-200.png\"" >>"$MAPFILE" && | ||
| echo "\"$(cygpath -aw "$SCRIPT_PATH")/Assets/Square150x150Logo.png\" \"Assets/Square150x150Logo.png\"" >>"$MAPFILE" && | ||
| echo "\"$(cygpath -aw "$SCRIPT_PATH")/Assets/Square150x150Logo.scale-200.png\" \"Assets/Square150x150Logo.scale-200.png\"" >>"$MAPFILE" && | ||
| echo "\"$(cygpath -aw "$SCRIPT_PATH")/Assets/Square44x44Logo.png\" \"Assets/Square44x44Logo.png\"" >>"$MAPFILE" && | ||
| echo "\"$(cygpath -aw "$SCRIPT_PATH")/Assets/Square44x44Logo.scale-200.png\" \"Assets/Square44x44Logo.scale-200.png\"" >>"$MAPFILE" && | ||
| echo "\"$(cygpath -aw "$SCRIPT_PATH")/Assets/Square44x44Logo.targetsize-24_altform-unplated.png\" \"Assets/Square44x44Logo.targetsize-24_altform-unplated.png\"" >>"$MAPFILE" && | ||
| echo "\"$(cygpath -aw "$SCRIPT_PATH")/Assets/StoreLogo.png\" \"Assets/StoreLogo.png\"" >>"$MAPFILE" && | ||
| MSYS_ROOT="$(cygpath -aw /)" && | ||
| echo "$LIST" | while IFS= read -r entry; do | ||
| winpath="${entry//\//\\}" | ||
| echo "\"$MSYS_ROOT\\$winpath\" \"$winpath\"" | ||
| done >>"$MAPFILE" | ||
|
|
||
| MSYS_NO_PATHCONV=1 "$MAKEAPPX" pack /v /o /f "$(cygpath -aw "$MAPFILE")" /p "$(cygpath -aw "$TARGET")" && | ||
| echo "Package created at $TARGET" | ||
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.