installer: syntax fixes and performance improvements
The generation of files to be shipped by the installer was significantly improved by using a `sed` call. Also the `release.sh` is a little more chatty now. The git tag is now only done if the tag does not exists already. There were some syntax errors in the `installer.iss.in` file that were squashed. Helped-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: nalla <nalla@hamal.uberspace.de>
This commit is contained in:
Родитель
4fd41971c8
Коммит
38e8299d86
|
@ -990,7 +990,7 @@ begin
|
|||
|
||||
if not FileCopy(AppDir+'\{#MINGW_BITNESS}\libexec\git-core\git-log.exe',AppDir+'\tmp\git-wrapper.exe',False) then begin
|
||||
Log('Line {#__LINE__}: Creating copy "'+AppDir+'\tmp\git-wrapper.exe" failed.');
|
||||
end
|
||||
end;
|
||||
|
||||
// Create built-ins as aliases for git.exe.
|
||||
for i:=0 to Count do begin
|
||||
|
|
|
@ -47,7 +47,7 @@ x86_64)
|
|||
;;
|
||||
esac
|
||||
|
||||
# Generate list of files to include
|
||||
echo "Generating file list to be included in the installer ..."
|
||||
pacman_list () {
|
||||
pacman -Ql $(for arg
|
||||
do
|
||||
|
@ -69,16 +69,20 @@ LIST="$(pacman_list mingw-w64-$ARCH-git git-extra ncurses mintty vim \
|
|||
-e '^/usr/share/info/' -e '^/mingw32/share/info/' |
|
||||
sed 's/^\///')"
|
||||
|
||||
LIST="$LIST etc/profile etc/bash.bash_logout etc/bash.bashrc etc/fstab"
|
||||
LIST="$LIST mingw$BITNESS/etc/gitconfig"
|
||||
LIST="$(printf "%s\n%s\n%s\n%s\n%s\n%s\n" \
|
||||
"$LIST" \
|
||||
etc/profile \
|
||||
etc/bash.bash_logout \
|
||||
etc/bash.bashrc \
|
||||
etc/fstab \
|
||||
mingw$BITNESS/etc/gitconfig)"
|
||||
|
||||
rm -rf file-list.iss
|
||||
for f in $LIST
|
||||
do
|
||||
printf 'Source: %s; DestDir: {app}\%s; Flags: %s; AfterInstall: %s\n' \
|
||||
$f $(dirname $f) replacesameversion DeleteFromVirtualStore \
|
||||
echo "$LIST" |
|
||||
sed -e 's|/|\\|g' \
|
||||
-e 's|^\([^\\]*\)$|Source: \1; DestDir: {app}; Flags: replacesameversion; AfterInstall: DeleteFromVirtualStore|' \
|
||||
-e 's|^\(.*\)\\\([^\\]*\)$|Source: \1\\\2; DestDir: {app}\\\1; Flags: replacesameversion; AfterInstall: DeleteFromVirtualStore|' \
|
||||
>> file-list.iss
|
||||
done
|
||||
|
||||
sed -e "s|%APPVERSION%|$version|" -e "s|%MINGW_BITNESS%|mingw$BITNESS|" < install.iss.in > install.iss ||
|
||||
exit
|
||||
|
@ -86,5 +90,12 @@ exit
|
|||
echo "Launching Inno Setup compiler ..." &&
|
||||
./InnoSetup/ISCC.exe install.iss > install.out ||
|
||||
die "Could not make installer"
|
||||
git tag -a -m "Git for Windows $1" Git-$1 &&
|
||||
|
||||
echo "Tagging Git for Windows installer release ..."
|
||||
if git rev-parse Git-$version >/dev/null 2>&1; then
|
||||
echo "-> installer release 'Git-$version' was already tagged."
|
||||
else
|
||||
git tag -a -m "Git for Windows $version" Git-$version
|
||||
fi
|
||||
|
||||
echo "Installer is available as $(tail -n 1 install.out)"
|
||||
|
|
Загрузка…
Ссылка в новой задаче