From 9427758ba45a6feb6d46d7da32461e45acedfafc Mon Sep 17 00:00:00 2001 From: Sebastian Schuberth Date: Thu, 4 Oct 2007 14:44:46 +0200 Subject: [PATCH] WinGit (Inno): Added "Git GUI Here" and minor cleanups - No need to copy fileList-builtins.txt anymore. - Added optional "Git GUI Here". - Excluded more unneeded files (like 7-Zip installer files). - Changed wording of release script. Signed-off-by: Sebastian Schuberth --- share/WinGit-InnoSetup/install.iss | 23 +++++++-------- share/WinGit-InnoSetup/release.sh | 57 ++++++++++++++++++++------------------ 2 files changed, 42 insertions(+), 38 deletions(-) rewrite share/WinGit-InnoSetup/release.sh (75%) diff --git a/share/WinGit-InnoSetup/install.iss b/share/WinGit-InnoSetup/install.iss index a511d8ef..53af0d76 100644 --- a/share/WinGit-InnoSetup/install.iss +++ b/share/WinGit-InnoSetup/install.iss @@ -1,8 +1,8 @@ #define APP_NAME 'Git' -#define APP_VERSION '%VERSION%' +#define APP_VERSION '%APPVERSION%' #define APP_STATUS 'Alpha-Inno' #define APP_URL 'http://code.google.com/p/msysgit/' -#define APP_BUILTINS 'fileList-builtins.txt' +#define APP_BUILTINS 'etc\fileList-builtins.txt' [Setup] ; Compiler-related @@ -29,10 +29,10 @@ WizardSmallImageFile=install.bmp Name: quicklaunchicon; Description: "Create a &Quick Launch icon"; GroupDescription: "Additional icons:"; Flags: checkedonce Name: desktopicon; Description: "Create a &Desktop icon"; GroupDescription: "Additional icons:"; Flags: checkedonce Name: shellextension; Description: "Add ""Git Shell Here"" "; GroupDescription: "Shell extensions:"; Flags: checkedonce +Name: guiextension; Description: "Add ""Git GUI Here"" "; GroupDescription: "Shell extensions:"; Flags: checkedonce [Files] -Source: "*"; DestDir: "{app}"; Excludes: "\*.txt, \install.*"; Flags: recursesubdirs -Source: {#emit APP_BUILTINS}; DestDir: "{app}"; Flags: dontcopy +Source: "*"; DestDir: "{app}"; Excludes: "\*.txt, \install.*, \tmp.*, \bin\*install*"; Flags: recursesubdirs [Icons] Name: "{group}\Git Shell"; Filename: "{app}\bin\sh.exe"; Parameters: "--login -i"; WorkingDir: "{app}"; IconFilename: "{app}\etc\git.ico" @@ -44,8 +44,10 @@ Name: "{userdesktop}\Git Shell"; Filename: "{app}\bin\sh.exe"; Parameters: "--lo BeveledLabel={#emit APP_URL} [Registry] -Root: HKLM; Subkey: "SOFTWARE\Classes\Directory\shell\git_shell"; ValueType: string; ValueData: "&Git Shell Here"; Flags: uninsdeletevalue uninsdeletekeyifempty; Tasks: shellextension -Root: HKLM; Subkey: "SOFTWARE\Classes\Directory\shell\git_shell\command"; ValueType: string; ValueData: "cmd.exe /c ""pushd ""%1"" && ""{app}\bin\sh.exe"" --login -i"" "; Flags: uninsdeletevalue uninsdeletekeyifempty; Tasks: shellextension +Root: HKLM; Subkey: "SOFTWARE\Classes\Directory\shell\git_shell"; ValueType: string; ValueData: "Git &Shell Here"; Flags: uninsdeletevalue uninsdeletekeyifempty; Tasks: shellextension +Root: HKLM; Subkey: "SOFTWARE\Classes\Directory\shell\git_shell\command"; ValueType: string; ValueData: "cmd.exe /c ""pushd ""%1"" && ""{app}\bin\sh.exe"" --login -i"""; Flags: uninsdeletevalue uninsdeletekeyifempty; Tasks: shellextension +Root: HKLM; Subkey: "SOFTWARE\Classes\Directory\shell\git_gui"; ValueType: string; ValueData: "Git &GUI Here"; Flags: uninsdeletevalue uninsdeletekeyifempty; Tasks: guiextension +Root: HKLM; Subkey: "SOFTWARE\Classes\Directory\shell\git_gui\command"; ValueType: string; ValueData: """{app}\bin\sh.exe"" --login -c ""cd ""%1"" && /bin/git-gui"""; Flags: uninsdeletevalue uninsdeletekeyifempty; Tasks: guiextension [UninstallDelete] Type: files; Name: "{app}\bin\git-*.exe" @@ -55,8 +57,8 @@ Type: dirifempty; Name: "{app}\home" [Code] procedure InitializeWizard; begin - // Use a mono spaced font in the license dialog. - WizardForm.LicenseMemo.Font.Name:='Courier New'; + // Use a mono spaced font in the license dialog. NOTE: This might be too small. + WizardForm.LicenseMemo.Font.Name:='Lucida Console'; WizardForm.LicenseMemo.Font.Size:=7; end; @@ -75,8 +77,7 @@ begin end; // Load the built-ins from a text file. - ExtractTemporaryFile('{#emit APP_BUILTINS}'); - ListFile:=ExpandConstant('{tmp}\'+'{#emit APP_BUILTINS}'); + ListFile:=ExpandConstant('{app}\'+'{#emit APP_BUILTINS}'); if not LoadStringsFromFile(ListFile,BuiltIns) then begin MsgBox('Unable to read file "{#emit APP_BUILTINS}".', mbError, MB_OK); Exit; @@ -89,7 +90,7 @@ begin if SetNTFSCompression(AppDir+'\bin\git.exe',true) then begin IsNTFS:=SetNTFSCompression(AppDir+'\bin\git.exe',false); end; - + // Map the built-ins to git.exe. if IsNTFS then begin for i:=0 to GetArrayLength(BuiltIns)-1 do begin diff --git a/share/WinGit-InnoSetup/release.sh b/share/WinGit-InnoSetup/release.sh dissimilarity index 75% index 0ea1d520..6eab0455 100644 --- a/share/WinGit-InnoSetup/release.sh +++ b/share/WinGit-InnoSetup/release.sh @@ -1,27 +1,30 @@ -#!/bin/sh - -test -z "$1" && { - echo "Usage: $0 " - echo "" - echo "You need to have installed isetup-5.2.0.exe and ispack-5.2.0.exe" - echo "from ." - exit 1 -} - -version=$1 -TMPDIR=/tmp/WinGit - -( echo "calling WinGit installer to copy files." && - cd /share/WinGit && ./release.sh $version ) && -cp gpl-2.0.txt install.bmp $TMPDIR && -( cd $TMPDIR ; cp etc/fileList-builtins.txt . ) && -homewinpath=$(cd ~ ; pwd -W) && -sed -e "s/%VERSION%/$version/" -e "s@%OUTPUTDIR%@$homewinpath@" install.iss >$TMPDIR/install.iss && -echo "I'll start Inno Installer for you. After it started you need to" && -echo "'compile' (4th icon in toolbar from left)." && -echo "After compiling you'll find the installer in $homewinpath." && -echo "NOTE: you should disconnect network drives before lauching Inno Installer." && -echo "Press return to launch Inno Installer." && -read && -echo "lauching Inno Installer ..." && -/bin/start $TMPDIR/install.iss +#!/bin/sh + +test -z "$1" && { + echo "Usage: $0 " + echo "" + echo "You need to have Inno Setup incl. Preprocessor from the QuickStart Pack" + echo "installed. Please download isetup-5.2.0.exe and ispack-5.2.0.exe from" + echo "." + exit 1 +} + +version=$1 +TMPDIR=/tmp/WinGit + +( echo "Calling WinGit installer to copy files ..." && + cd /share/WinGit && ./release.sh $version ) && +cp gpl-2.0.txt install.bmp $TMPDIR && +homewinpath=$(cd ~ ; pwd -W) && +sed -e "s/%APPVERSION%/$version/" -e "s@%OUTPUTDIR%@$homewinpath@" install.iss >$TMPDIR/install.iss && +echo "" +echo "Inno Setup will now be started for you. After it started you need to" && +echo "compile the loaded script (4th icon from the left in the toolbar)." && +echo "After compiling you will find the installer in \"$homewinpath\"." && +echo "" +echo "NOTE: You should disconnect network drives before lauching Inno Setup." && +echo "" +echo "Press RETURN to launch Inno Setup." && +read && +echo "Lauching Inno Setup ..." && +/bin/start "$TMPDIR/install.iss" -- 2.11.4.GIT