Skip to content

Commit

Permalink
Merge pull request #323 from dennisameling/git-portable-arm64
Browse files Browse the repository at this point in the history
portable: add arm64 artifact option
  • Loading branch information
dscho authored Feb 4, 2021
2 parents 3296f75 + 50f9a18 commit 3e9f5d8
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 4 deletions.
8 changes: 6 additions & 2 deletions please.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4770,12 +4770,13 @@ build_mingw_w64_git () { # [--only-32-bit] [--only-64-bit] [--skip-test-artifact
}
# This function does not "clean up" after installing the packages
make_installers_from_mingw_w64_git () { # [--pkg=<package>[,<package>...]] [--version=<version>] [--installer] [--portable] [--mingit] [--mingit-busybox] [--nuget] [--nuget-mingit] [--archive]
make_installers_from_mingw_w64_git () { # [--pkg=<package>[,<package>...]] [--version=<version>] [--installer] [--portable] [--mingit] [--mingit-busybox] [--nuget] [--nuget-mingit] [--archive] [--include-arm64-artifacts=<path>]
modes=
install_package=
output=
output_path=
version=0-test
include_arm64_artifacts=
while case "$1" in
--pkg=*)
install_package="${install_package:+$install_package }$(echo "${1#*=}" | tr , ' ')"
Expand Down Expand Up @@ -4820,6 +4821,9 @@ make_installers_from_mingw_w64_git () { # [--pkg=<package>[,<package>...]] [--ve
output_path="$(cygpath -am "${1#-?}")"
output="--output=$output_path" || exit
;;
--include-arm64-artifacts=*)
include_arm64_artifacts="$1"
;;
-*) die "Unknown option: %s\n" "$1";;
*) break;;
esac; do shift; done
Expand Down Expand Up @@ -4855,7 +4859,7 @@ make_installers_from_mingw_w64_git () { # [--pkg=<package>[,<package>...]] [--ve
test installer != $mode ||
extra="${extra:+$extra }--window-title-version=$version"
sh -x "${this_script_path%/*}/$mode/release.sh" $output $extra $version
sh -x "${this_script_path%/*}/$mode/release.sh" $output $extra $include_arm64_artifacts $version
done
}
Expand Down
19 changes: 17 additions & 2 deletions portable/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ do
--include-pdbs)
include_pdbs=t
;;
--include-arm64-artifacts=*)
arm64_artifacts_directory="${1#*=}"
;;
-*)
die "Unknown option: $1"
;;
Expand Down Expand Up @@ -134,6 +137,18 @@ test -z "$include_pdbs" || {
} ||
die "Could not unpack .pdb files"

TITLE="$BITNESS-bit"

# ARM64 Windows handling
if test -n "$arm64_artifacts_directory"
then
echo "Including ARM64 artifacts from $arm64_artifacts_directory";
TARGET="$output_directory"/PortableGit-"$VERSION"-arm64.7z.exe
TITLE="ARM64"
mkdir -p "$SCRIPT_PATH/root/arm64"
cp -ar $arm64_artifacts_directory/* "$SCRIPT_PATH/root/arm64"
fi

# 7-Zip will strip absolute paths completely... therefore, we can add another
# root directory like this:

Expand All @@ -150,8 +165,8 @@ echo "Creating archive" &&
(cd / && 7za a $OPTS7 $TMPPACK $LIST) &&
(cat "$SCRIPT_PATH/../7-Zip/7zSD.sfx" &&
echo ';!@Install@!UTF-8!' &&
echo 'Title="Portable Git for Windows '$BITNESS'-bit"' &&
echo 'BeginPrompt="This archive extracts a complete Git for Windows '$BITNESS'-bit"' &&
echo 'Title="Portable Git for Windows '$TITLE'"' &&
echo 'BeginPrompt="This archive extracts a complete Git for Windows '$TITLE'"' &&
echo 'CancelPrompt="Do you want to cancel the portable Git installation?"' &&
echo 'ExtractDialogText="Please, wait..."' &&
echo 'ExtractPathText="Where do you want to install portable Git?"' &&
Expand Down

0 comments on commit 3e9f5d8

Please sign in to comment.