From d117e9fd753d9cbb36cbd394de1a3021c352d6fd Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Sat, 18 Aug 2007 01:41:31 +0200 Subject: [PATCH] WinGit: do not pack builtins, but copy them when unpacking It is a sign of the impressive performance of LZMA that removing all those (identical) builtin git-*.exe files removes only 10 kilobyte from the resulting installer. Signed-off-by: Johannes Schindelin --- share/WinGit/install.tcl | 14 ++++++++++++-- share/WinGit/release.sh | 3 +++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/share/WinGit/install.tcl b/share/WinGit/install.tcl index 7eacde4d..72461a0f 100644 --- a/share/WinGit/install.tcl +++ b/share/WinGit/install.tcl @@ -39,7 +39,8 @@ proc installGit {} { # copy files set list [open "$currentDirectory/fileList.txt" r] while {[gets $list line] >= 0} { - if {$line == "fileList.txt" || $line == "install.tcl"} { + if {$line == "fileList.txt" || $line == "install.tcl" || + $line == "fileList-builtins.txt"} { continue } .listbox.list insert end "copying file: $line\n" @@ -55,7 +56,16 @@ proc installGit {} { } close $list - destroy .listbox + set list [open "$currentDirectory/fileList-builtins.txt" r] + while {[gets $list line] >= 0} { + .listbox.list nisert end "copying builtin: $line\n" + .listbox.list yview moveto 1 + update + file copy "$currentDirectory/bin/git.exe $targetDirectory/$line" + } + close $list + + #destroy .listbox tk_dialog .info "WinGit installed" \ "WinGit was successfully installed" info 0 OK diff --git a/share/WinGit/release.sh b/share/WinGit/release.sh index 42972878..e386a904 100644 --- a/share/WinGit/release.sh +++ b/share/WinGit/release.sh @@ -17,6 +17,9 @@ cd "$TMPDIR" && echo "Copying files" && (cd / && tar cf - bin/ lib/perl5/) | tar xvf - && +gitmd5=$(md5sum bin/git.exe | cut -c 1-32) && +md5sum bin/git-*.exe | sed -n "s/^$gitmd5 \\*//p" > fileList-builtins.txt && +rm $(cat fileList-builtins.txt) && (cd /mingw && tar cf - bin/*{tcl,tk,wish,gpg,curl.exe}* \ lib/*{tcl,tk}* libexec/gnupg/) | tar xvf - && -- 2.11.4.GIT