1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-26 01:32:25 +00:00

Update Inno Setup script. Tested with IS 5.0.8 on Win98SE; I think there are

a few things that will faze whatever we're using currently (2.0.19 or
thereabouts?), but nothing desperately modern. (NB, the 0.57 putty.iss works
fine with 5.0.8 and the installer is even 40k smaller.)

Notable changes:
 - Uninstallation now runs a variant of `putty -cleanup'. The variance is
   only in the text displayed; the user is still prompted, and the default
   action is (now) "keep" in both cases.
 - Optionally add an icon in the Quick Launch bar.
 - Make desktop item optionally for all users. (not tested)
 - "Create a Start Menu group" now handled via IS' own mechanism.

[originally from svn r5423]
This commit is contained in:
Jacob Nevins 2005-03-01 21:34:21 +00:00
parent 1e0aeea460
commit 41793f56d4
3 changed files with 67 additions and 31 deletions

View File

@ -64,7 +64,7 @@ orders them correctly with respect to releases):
- putty/LATEST.VER - putty/LATEST.VER
The Windows installer script: The Windows installer script (_three_ times, on consecutive lines):
- putty/windows/putty.iss - putty/windows/putty.iss

View File

@ -5,26 +5,32 @@
; ;
; TODO for future releases: ; TODO for future releases:
; ;
; - It would be neighbourly to set up an [UninstallRun] entry that ran ; - It might be nice to have an option to add PSCP, Plink and PSFTP to
; some close cousin of `putty -cleanup', only it should prompt first ; the PATH. This is probably only practical on NT-class systems; I
; in case the user wants to keep stuff. And make the `leave it alone' ; believe doing this on 9x would require mucking around with
; button the DEFAULT. And perhaps warn that on NT-style systems not ; AUTOEXEC.BAT.
; everything will be caught by this.
; ;
; - The Quick Launch bar is an interesting thought. Certainly a fair ; - Maybe a "custom" installation might be useful? Hassle with icons,
; number of people actually _believe_ my silly joke about how PuTTY ; though.
; is the only thing that makes Windows usable, so perhaps they'd like
; that. Unchecked by default, though, I think.
; * does this need to be conditional on the Windows version?
[Setup] [Setup]
AppName=PuTTY AppName=PuTTY
AppVerName=PuTTY version 0.57 AppVerName=PuTTY version 0.57
VersionInfoTextVersion=Release 0.57
AppVersion=0.57
;FIXME -- enable this when we've got it going for individual EXEs too
; and are committed to the version numbering scheme.
;VersionInfoVersion=0.57.0.0
AppPublisher=Simon Tatham
AppPublisherURL=http://www.chiark.greenend.org.uk/~sgtatham/putty/
AppReadmeFile={app}\README.txt
DefaultDirName={pf}\PuTTY DefaultDirName={pf}\PuTTY
DefaultGroupName=PuTTY DefaultGroupName=PuTTY
UninstallDisplayIcon={app}\putty.exe UninstallDisplayIcon={app}\putty.exe
ChangesAssociations=yes ChangesAssociations=yes
;ChangesEnvironment=yes -- when PATH munging is sorted (probably)
Compression=zip/9 Compression=zip/9
AllowNoIcons=yes
[Files] [Files]
Source: "putty.exe"; DestDir: "{app}" Source: "putty.exe"; DestDir: "{app}"
@ -40,18 +46,23 @@ Source: "..\LICENCE"; DestDir: "{app}"
Source: "..\README.txt"; DestDir: "{app}"; Flags: isreadme Source: "..\README.txt"; DestDir: "{app}"; Flags: isreadme
[Icons] [Icons]
Name: "{group}\PuTTY"; Filename: "{app}\putty.exe"; Tasks: startmenu Name: "{group}\PuTTY"; Filename: "{app}\putty.exe"; Comment: "SSH, Telnet and Rlogin client";
Name: "{group}\PuTTY Manual"; Filename: "{app}\putty.hlp"; Tasks: startmenu Name: "{group}\PuTTY Manual"; Filename: "{app}\putty.hlp"
Name: "{group}\PuTTY Web Site"; Filename: "{app}\website.url"; Tasks: startmenu Name: "{group}\PuTTY Web Site"; Filename: "{app}\website.url"
Name: "{group}\PSFTP"; Filename: "{app}\psftp.exe"; Tasks: startmenu Name: "{group}\PSFTP"; Filename: "{app}\psftp.exe"; Comment: "Command-line interactive SFTP client"
Name: "{group}\PuTTYgen"; Filename: "{app}\puttygen.exe"; Tasks: startmenu Name: "{group}\PuTTYgen"; Filename: "{app}\puttygen.exe"; Comment: "PuTTY SSH key generation utility"
Name: "{group}\Pageant"; Filename: "{app}\pageant.exe"; Tasks: startmenu Name: "{group}\Pageant"; Filename: "{app}\pageant.exe"; Comment: "PuTTY SSH authentication agent"
Name: "{userdesktop}\PuTTY"; Filename: "{app}\putty.exe"; Tasks: desktopicon Name: "{commondesktop}\PuTTY"; Filename: "{app}\putty.exe"; Tasks: desktopicon\common
Name: "{userdesktop}\PuTTY"; Filename: "{app}\putty.exe"; Tasks: desktopicon\user
; Putting this in {commonappdata} doesn't seem to work, on 98SE at least.
Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\PuTTY"; Filename: "{app}\putty.exe"; Tasks: quicklaunchicon
[Tasks] [Tasks]
Name: startmenu; Description: "Create a &Start Menu group" Name: desktopicon; Description: "Create a &desktop icon for PuTTY"; GroupDescription: "Additional icons:"; Flags: unchecked
Name: desktopicon; Description: "Create a &desktop icon for PuTTY" Name: desktopicon\common; Description: "For all users"; GroupDescription: "Additional icons:"; Flags: exclusive unchecked
Name: associate; Description: "&Associate .PPK files (PuTTY Private Key) with Pageant" Name: desktopicon\user; Description: "For the current user only"; GroupDescription: "Additional icons:"; Flags: exclusive unchecked
Name: quicklaunchicon; Description: "Create a &Quick Launch icon for PuTTY (current user only)"; GroupDescription: "Additional icons:"; Flags: unchecked
Name: associate; Description: "&Associate .PPK files (PuTTY Private Key) with Pageant and PuTTYgen"; GroupDescription: "Other tasks:"
[Registry] [Registry]
Root: HKCR; Subkey: ".ppk"; ValueType: string; ValueName: ""; ValueData: "PuTTYPrivateKey"; Flags: uninsdeletevalue; Tasks: associate Root: HKCR; Subkey: ".ppk"; ValueType: string; ValueName: ""; ValueData: "PuTTYPrivateKey"; Flags: uninsdeletevalue; Tasks: associate
@ -60,3 +71,9 @@ Root: HKCR; Subkey: "PuTTYPrivateKey\DefaultIcon"; ValueType: string; ValueName:
Root: HKCR; Subkey: "PuTTYPrivateKey\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\pageant.exe"" ""%1"""; Tasks: associate Root: HKCR; Subkey: "PuTTYPrivateKey\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\pageant.exe"" ""%1"""; Tasks: associate
Root: HKCR; Subkey: "PuTTYPrivateKey\shell\edit"; ValueType: string; ValueName: ""; ValueData: "&Edit"; Tasks: associate Root: HKCR; Subkey: "PuTTYPrivateKey\shell\edit"; ValueType: string; ValueName: ""; ValueData: "&Edit"; Tasks: associate
Root: HKCR; Subkey: "PuTTYPrivateKey\shell\edit\command"; ValueType: string; ValueName: ""; ValueData: """{app}\puttygen.exe"" ""%1"""; Tasks: associate Root: HKCR; Subkey: "PuTTYPrivateKey\shell\edit\command"; ValueType: string; ValueName: ""; ValueData: """{app}\puttygen.exe"" ""%1"""; Tasks: associate
; Add to PATH on NT-class OS?
[UninstallRun]
; -cleanup-during-uninstall is an undocumented option that tailors the
; message displayed.
Filename: "{app}\putty.exe"; Parameters: "-cleanup-during-uninstall"; RunOnceId: "PuTTYCleanup"; StatusMsg: "Cleaning up saved sessions etc (optional)..."

View File

@ -437,22 +437,41 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show)
i++; /* skip next argument */ i++; /* skip next argument */
} else if (ret == 1) { } else if (ret == 1) {
continue; /* nothing further needs doing */ continue; /* nothing further needs doing */
} else if (!strcmp(p, "-cleanup")) { } else if (!strcmp(p, "-cleanup") ||
!strcmp(p, "-cleanup-during-uninstall")) {
/* /*
* `putty -cleanup'. Remove all registry * `putty -cleanup'. Remove all registry
* entries associated with PuTTY, and also find * entries associated with PuTTY, and also find
* and delete the random seed file. * and delete the random seed file.
*/ */
char *s1, *s2; char *s1, *s2;
s1 = dupprintf("This procedure will remove ALL Registry\n" /* Are we being invoked from an uninstaller? */
"entries associated with %s, and will\n" if (!strcmp(p, "-cleanup-during-uninstall")) {
"also remove the random seed file.\n" s1 = dupprintf("Remove saved sessions and random seed file?\n"
"\n" "\n"
"THIS PROCESS WILL DESTROY YOUR SAVED\n" "If you hit Yes, ALL Registry entries associated\n"
"SESSIONS. Are you really sure you want\n" "with %s will be removed, as well as the\n"
"to continue?", appname); "random seed file. THIS PROCESS WILL\n"
s2 = dupprintf("%s Warning", appname); "DESTROY YOUR SAVED SESSIONS.\n"
if (message_box(s1, s2, MB_YESNO | MB_ICONWARNING, "(This only affects the currently logged-in user.)\n"
"\n"
"If you hit No, uninstallation will proceed, but\n"
"saved sessions etc will be left on the machine.",
appname);
s2 = dupprintf("%s Uninstallation", appname);
} else {
s1 = dupprintf("This procedure will remove ALL Registry entries\n"
"associated with %s, and will also remove\n"
"the random seed file. (This only affects the\n"
"currently logged-in user.)\n"
"\n"
"THIS PROCESS WILL DESTROY YOUR SAVED SESSIONS.\n"
"Are you really sure you want to continue?",
appname);
s2 = dupprintf("%s Warning", appname);
}
if (message_box(s1, s2,
MB_YESNO | MB_ICONWARNING | MB_DEFBUTTON2,
HELPCTXID(option_cleanup)) == IDYES) { HELPCTXID(option_cleanup)) == IDYES) {
cleanup_all(); cleanup_all();
} }