This commit was generated by cvs2svn to compensate for changes in r12055,
[chise/xemacs-chise.git.1] / nt / XEmacs.iss
1 ; This script generates an installation kit for a Windows-native XEmacs, version 21.4.
2 ; This script runs with Inno Setup version 5.1.6, see http://www.jrsoftware.org/ for more info.
3 ;
4 ; Version History
5 ; 2006-01-26  Vin Shelton <acs@xemacs.org>    Don't append XEmacs binary directory to system path.
6 ; 2006-01-21  Vin Shelton <acs@xemacs.org>    Append XEmacs binary directory to system path; this is not currently deleted on uninstall.
7 ;                                             Get built kit from C:\XEmacs-built.
8 ; 2005-12-26  Vin Shelton <acs@xemacs.org>    Packages are now installed directly into {app}\xemacs-packages, etc.  As of 21.4.19, the package root is found automatically, so EMACSPACKAGEPATH is no longer necessary.
9 ; 2005-12-17  Vin Shelton <acs@xemacs.org>    Move packages out of the version-specific tree
10 ; 2005-12-13  Vin Shelton <acs@xemacs.org>    Created.
11
12 [Setup]
13 AppName=XEmacs
14 AppVersion={code:XEmacsVersion}
15 AppVerName=XEmacs {code:XEmacsVersion}
16 AppPublisher=The XEmacs Development Team
17 AppPublisherURL=http://www.xemacs.org
18 AppSupportURL=http://www.xemacs.org
19 AppUpdatesURL=http://www.xemacs.org
20 DefaultDirName={pf}\XEmacs
21 DefaultGroupName=XEmacs
22 AllowNoIcons=yes
23 OutputDir=.
24 OutputBaseFilename=XEmacs Setup 21.4.19
25 Compression=lzma
26 SolidCompression=yes
27 InfoAfterFile=README
28
29 [Languages]
30 Name: "english"; MessagesFile: "compiler:Default.isl"
31
32 [Tasks]
33 Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
34 Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
35
36 [Files]
37 ; Before you run this script, XEmacs-21.4 must be installed in C:\XEmacs-built\XEmacs-21.4.xx
38 ; and any packages you want to include must be installed in C:\XEmacs-built\{xemacs,mule,site}-packages
39 Source: "C:\XEmacs-built\*"; Excludes: "C:\XEmacs-built\XEmacs-21.5*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
40 ; NOTE: Don't use "Flags: ignoreversion" on any shared system files
41
42 [INI]
43 Filename: "{app}\xemacs.url"; Section: "InternetShortcut"; Key: "URL"; String: "http://www.xemacs.org"
44
45 [Icons]
46 Name: "{group}\XEmacs"; Filename: "{app}\XEmacs-{code:XEmacsVersion}\i586-pc-win32\xemacs.exe"
47 Name: "{group}\{cm:ProgramOnTheWeb,XEmacs}"; Filename: "{app}\xemacs.url"
48 Name: "{group}\{cm:UninstallProgram,XEmacs}"; Filename: "{uninstallexe}"
49 Name: "{userdesktop}\XEmacs"; Filename: "{app}\XEmacs-{code:XEmacsVersion}\i586-pc-win32\xemacs.exe"; Tasks: desktopicon
50 Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\XEmacs"; Filename: "{app}\XEmacs-{code:XEmacsVersion}\i586-pc-win32\xemacs.exe"; Tasks: quicklaunchicon
51
52 [Registry]
53 ; Set a registry key to point to the packages so they can be shared between multiple installed versions of XEmacs
54 ; This is no longer necessary as of version 21.4.19.
55 ;Root: HKLM; Subkey: "Software\XEmacs\XEmacs"; ValueType: string; ValueName: "EMACSPACKAGEPATH"; ValueData: "{app}\Packages"; Flags: uninsdeletekey
56 ; Don't fiddle with the system path
57 ;Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; ValueType: expandsz; ValueName: "Path"; ValueData: "{olddata};{app}\XEmacs-{code:XEmacsVersion}\i586-pc-win32"
58
59
60 [Run]
61 Filename: "{app}\XEmacs-{code:XEmacsVersion}\i586-pc-win32\xemacs.exe"; Description: "{cm:LaunchProgram,XEmacs}"; Flags: nowait postinstall skipifsilent
62
63 [UninstallDelete]
64 Type: files; Name: "{app}\xemacs.url"
65
66 [Code]
67 function XEmacsVersion(Param: String): String;
68 begin
69   Result := '21.4.19';
70 end;
71
72 procedure CurStepChanged(CurStep: TSetupStep);
73 var
74   BinDir: String;
75   EtcDir: String;
76   InstallBase: String;
77   SiteStart: String;
78 begin
79
80   // Create a site-start.el file to allow easy package downloading in the future and to add the binary directory to exec-path.
81   // E.g, here's what we're going to add to lisp\site-start.el:
82   //   (setq package-get-package-index-file-location "C:\\Program Files\XEmacs\\XEmacs-21.4.98\\etc")
83   //   ; Uncomment the next line to select the primary XEmacs package download site
84   //   ;(setq package-get-remote '("ftp.xemacs.org" "pub/xemacs/packages"))
85   if CurStep = ssPostInstall then begin
86
87     // Convert directory names to lisp format by doubling each backslash
88     InstallBase := WizardDirValue + '\XEmacs-' + XEmacsVersion('');
89     StringChange(InstallBase, '\', '\\');
90     EtcDir := InstallBase + '\\etc';
91     //BinDir := InstallBase + '\\i586-pc-win32\\';
92
93     SiteStart := WizardDirValue + '\site-packages\lisp';
94     CreateDir(SiteStart);
95     SiteStart := SiteStart + '\site-start.el';
96     
97     SaveStringToFile(SiteStart, #13#10 + '(setq package-get-package-index-file-location "' + EtcDir + '")' + #13#10, True);
98     SaveStringToFile(SiteStart, '; Uncomment the next line to select the primary XEmacs package download site' + #13#10, True);
99     SaveStringToFile(SiteStart, ';(setq package-get-remote ' + Chr(39) + '("ftp.xemacs.org" "pub/xemacs/packages"))' + #13#10, True);
100     
101     //SaveStringToFile(SiteStart, '(pushnew "' + BinDir + '" exec-path)' + #13#10, True);
102   end;
103 end;
104
105