Skip to content

Commit eea61c2

Browse files
committed
New MSI-based installer.
1 parent 9f3fa71 commit eea61c2

19 files changed

+782
-68
lines changed

.gitignore

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,19 @@ HyperSpec/*
2222
HyperSpec-Legalese.text
2323
HyperSpec-README.text
2424
.vs/*
25+
# installer staff
26+
*.msi
27+
*.wixobj
28+
*.wixpdb
29+
*.tar
30+
installer/Standard/
31+
# automatically generated installer components
32+
installer/Libraries.wxs
33+
installer/Modules.wxs
34+
installer/Sys.wxs
35+
installer/Documentation.wxs
36+
installer/Examples.wxs
37+
installer/Headers.wxs
38+
installer/HyperSpec.wxs
39+
installer/LICENSE.rtf
2540

Corman Lisp 3.0.ise

-250 KB
Binary file not shown.

Corman Lisp 3.02.ism

-326 KB
Binary file not shown.

Utilities/install-hyperspec.lisp

Lines changed: 15 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -72,29 +72,20 @@ typedef struct _header
7272
(ccl:unmap-file address)))
7373

7474
(defun install-hyperspec ()
75-
(if (eq (win:message-box-yes-no "Do you want to install the Common Lisp HyperSpec (from Xanalys)?"
76-
"Install Common Lisp HyperSpec") 'win:idyes)
77-
(let ((gzpath (namestring (truename (merge-pathnames "HyperSpec-6-0.tar.gz"))))
78-
(tarpath (namestring (truename (merge-pathnames "HyperSpec-6-0.tar"))))
79-
(hyperspec-path (namestring (truename (merge-pathnames "hyperspec/")))))
80-
81-
;; unless the Hyperspec is already installed at this location, extract
82-
;; it to that location
83-
(unless (probe-file (merge-pathnames "Front\\Contents.htm" hyperspec-path))
84-
(format t "Unzipping ~A...~%" gzpath)
85-
(force-output)
86-
(ccl:uncompress-file gzpath tarpath)
87-
(format t "Extracting files from ~A...~%" tarpath)
88-
(tar-extract tarpath))
89-
90-
(with-open-file (init-file (merge-pathnames "init.lisp") :direction :output :if-exists :append)
91-
(format init-file "~%;;; Set the Hyperspec path~%(setf *hyperspec-local-path* ~S)~%"
92-
hyperspec-path))
93-
(setf *hyperspec-local-path* hyperspec-path))
94-
(let ()
95-
(with-open-file (init-file (merge-pathnames "init.lisp") :direction :output :if-exists :append)
96-
(format init-file "~%;;; Set the Hyperspec path~%(setf *hyperspec-local-path* nil)~%"))
97-
(setf *hyperspec-local-path* nil))))
75+
(let ((gzpath (namestring (truename (merge-pathnames "HyperSpec-6-0.tar.gz"))))
76+
(tarpath (namestring (truename (merge-pathnames "HyperSpec-6-0.tar"))))
77+
(hyperspec-path (namestring (truename (merge-pathnames "hyperspec/")))))
78+
79+
;; unless the Hyperspec is already installed at this location, extract
80+
;; it to that location
81+
(unless (probe-file (merge-pathnames "Front\\Contents.htm" hyperspec-path))
82+
(format t "Unzipping ~A...~%" gzpath)
83+
(force-output)
84+
(ccl:uncompress-file gzpath tarpath)
85+
(format t "Extracting files from ~A...~%" tarpath)
86+
(tar-extract tarpath)
87+
(delete-file tarpath))
88+
(setf *hyperspec-local-path* hyperspec-path)))
9889

9990
(install-hyperspec)
10091

@@ -103,4 +94,4 @@ typedef struct _header
10394

10495

10596

106-
97+

Utilities/license-to-rtf.lisp

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
;;;;; Stolen from https://github.com/sbcl/sbcl/blob/master/tools-for-build/rtf.lisp
2+
3+
;;;; Generate RTF out of a regular text file, splitting
4+
;;;; paragraphs on empty lines.
5+
;;;;
6+
;;;; Used to generate License.rtf out of COPYING for the
7+
;;;; Windows installer.
8+
9+
;;;; This software is part of the SBCL system. See the README file for
10+
;;;; more information.
11+
;;;;
12+
;;;; This software is derived from the CMU CL system, which was
13+
;;;; written at Carnegie Mellon University and released into the
14+
;;;; public domain. The software is in the public domain and is
15+
;;;; provided with absolutely no warranty. See the COPYING and CREDITS
16+
;;;; files for more information.
17+
18+
(defun read-text (pathname)
19+
(let ((pars (list nil)))
20+
(with-open-file (f pathname :external-format :ascii)
21+
(loop for line = (read-line f nil)
22+
for text = (string-trim '(#\Space #\Tab) line)
23+
while line
24+
when (plusp (length text))
25+
do (setf (car pars)
26+
(if (car pars)
27+
(concatenate 'string (car pars) " " text)
28+
text))
29+
else
30+
do (push nil pars)))
31+
(nreverse pars)))
32+
33+
(defun write-rtf (pars pathname)
34+
(with-open-file (f pathname :direction :output :external-format :ascii
35+
:if-exists :supersede)
36+
;; \rtf0 = RTF 1.0
37+
;; \ansi = character set
38+
;; \deffn = default font
39+
;; \fonttbl = font table
40+
;; \fs = font size in half-points
41+
(format f "{\\rtf1\\ansi~
42+
\\deffn0~
43+
{\\fonttbl\\f0\\fswiss Helvetica;}~
44+
\\fs20~
45+
~{~A\\par\\par ~}}" ; each par used to end with
46+
; ~%, but resulting Rtf looks
47+
; strange (WinXP, WiX 3.0.x,
48+
; ?)
49+
pars)))
50+
51+
;; generate RTF file from TXT file
52+
(defun generate-license-rtf (from to)
53+
(write-rtf (read-text from) to))
54+
55+
(generate-license-rtf
56+
(concatenate 'string *cormanlisp-directory* "LICENSE.txt")
57+
(concatenate 'string *cormanlisp-directory* ".\\installer\\LICENSE.rtf"))
58+
59+

init.lisp

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,15 @@
6565

6666
;;; set your own local path for the Hyperspec
6767
;; eg. (setq *hyperspec-local-path* "c:/roger/lisp/HyperSpec/")
68-
(setq *hyperspec-local-path* (concatenate 'string *cormanlisp-directory* "HyperSpec/"))
69-
68+
;; unless the Hyperspec is already installed at this location
69+
;; it to that location
70+
71+
;; Automatically set HyperSpec path to the one installed with Corman Lisp.
72+
(let ((hyperspec-install-path (merge-pathnames "HyperSpec\\"
73+
(namestring *cormanlisp-directory*))))
74+
(when (probe-file (merge-pathnames "Front\\Contents.htm" hyperspec-install-path))
75+
(setq *hyperspec-local-path* (namestring hyperspec-install-path))))
76+
7077
;;; set your own declaration symbols list
7178
;; eg. (setf ide:*declaration-symbols* '("defun" "define-symbol-macro")) or
7279
;; (setf ide:*declaration-symbols* (append ide:*declaration-symbols* '("defwinconstant" "defwinapi")))
@@ -91,3 +98,4 @@
9198
"CormanLisp.img")))
9299
;; export from CL package
93100
(export (find-symbol "LOAD-DEFAULT-IMAGE" 'cl) 'cl)
101+

installer/AddToPath.wxs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
3+
<Fragment>
4+
<DirectoryRef Id="INSTALLDIR">
5+
<!-- add product to path -->
6+
<Component Id="AddProductToPath"
7+
Guid="{F39576AD-698B-48F5-9E74-8C1C2EDC375B}"
8+
KeyPath="yes">
9+
<Environment Id="Env_PATH"
10+
Name="PATH"
11+
Value="[INSTALLDIR]"
12+
Separator=";"
13+
Action="set"
14+
Part="last"
15+
System="yes" />
16+
</Component>
17+
</DirectoryRef>
18+
</Fragment>
19+
</Wix>

installer/Config.wxi

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Include>
3+
<!--
4+
Manufacturer and product name
5+
-->
6+
<?define ProductName="Corman Lisp" ?>
7+
<?define ManufacturerName="Sharp Lispers" ?>
8+
<!--
9+
Versioning. These have to be changed for upgrades.
10+
It's not enough to just include newer files.
11+
-->
12+
<?define MajorVersion="3" ?>
13+
<?define MinorVersion="1" ?>
14+
<?define BuildVersion="0" ?>
15+
<!-- Revision is NOT used by WiX in the upgrade procedure -->
16+
<?define Revision="0" ?>
17+
<!-- Full version number to display -->
18+
<?define VersionNumber="$(var.MajorVersion).$(var.MinorVersion).$(var.BuildVersion)" ?>
19+
<?define VersionNumberWithRevision="$(var.MajorVersion).$(var.MinorVersion).$(var.BuildVersion).$(var.Revision)" ?>
20+
<!--
21+
Visual C++ Runtime Version.
22+
Comment it out to not include VC++ redistributable.
23+
-->
24+
<?define VCRedist="140" ?>
25+
<!--
26+
Set the following variables to to "yes" to include
27+
corresponding parts of Visual C++ Runtime.
28+
-->
29+
<?define VCRedist_MFC="yes" ?>
30+
<?define VCRedist_OpenMP="no" ?>
31+
<?define VCRedist_CXXAMP="no" ?>
32+
<!--
33+
Supported architecture
34+
-->
35+
<?define Platform="x86" ?>
36+
<!--
37+
Upgrade code HAS to be the same for all updates.
38+
Once you've chosen it don't change it.
39+
-->
40+
<?define UpgradeCode="{E0D4586E-BDA4-49EF-8325-A971EFC40405}" ?>
41+
<!--
42+
The name of your application *.exe files. These will be used to kill the process when updating
43+
and creating the desktop shortcut
44+
-->
45+
<?define GuiProcessName="CormanLisp.exe" ?>
46+
<?define ConsoleProcessName="clconsole.exe" ?>
47+
48+
<!-- Paths to directories -->
49+
<?define SysDirectoryPath=".\Sys" ?>
50+
<?define LibrariesDirectoryPath=".\Libraries" ?>
51+
<?define ModulesDirectoryPath=".\Modules" ?>
52+
<?define DocumentationDirectoryPath=".\documentation" ?>
53+
54+
<?define HeadersDirectoryPath=".\include" ?>
55+
<?define ExamplesDirectoryPath=".\examples" ?>
56+
<?define HyperSpecDirectoryPath=".\HyperSpec" ?>
57+
58+
</Include>
59+

installer/Core.wxs

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
3+
<?include Config.wxi?>
4+
<Fragment>
5+
<DirectoryRef Id="INSTALLDIR">
6+
<!-- Write Installation Path to registry -->
7+
<Component Id="RegValueProductInstallPath" Guid="{CE589DBA-5C00-419F-AF9E-4E9365260957}">
8+
<RegistryValue Id="RegValueInstallPath"
9+
Root="HKLM"
10+
Key="Software\$(var.ManufacturerName)\$(var.ProductName)"
11+
Name="Path"
12+
Value="[INSTALLDIR]"
13+
Type="string"
14+
KeyPath="yes"/>
15+
</Component>
16+
<!-- Core product files -->
17+
<Component Id="CormanLispCore" Guid="{EAED0349-C9F0-454F-91CB-73B80DBBB517}">
18+
<File Id="CormanLisp_IDE_Executable"
19+
Name="CormanLisp.exe"
20+
DiskId="1"
21+
Source=".\CormanLisp.exe" />
22+
<File Id="CormanLisp_Console_Executable"
23+
Name="clconsole.exe"
24+
DiskId="1"
25+
Source=".\clconsole.exe" />
26+
<File Id="CormanLisp_Image"
27+
Name="CormanLisp.img"
28+
DiskId="1"
29+
Source=".\CormanLisp.img" />
30+
<File Id="CormanLispServer"
31+
Name="CormanLispServer.dll"
32+
DiskId="1"
33+
Source=".\CormanLispServer.dll" />
34+
<File Id="CormanLispConsoleTemplate"
35+
Name="clconsoleapp.exe"
36+
DiskId="1"
37+
Source=".\clconsoleapp.exe" />
38+
<File Id="CormanLispGUITemplate"
39+
Name="clboot.exe"
40+
DiskId="1"
41+
Source=".\clboot.exe" />
42+
<File Id="CormanLispGUITemplateStatic"
43+
Name="clbootapp.exe"
44+
DiskId="1"
45+
Source=".\clbootapp.exe" />
46+
<File Id="CormanLispDLLTemplateStatic"
47+
Name="dlltemplate.dll"
48+
DiskId="1"
49+
Source=".\dlltemplate.dll" />
50+
<File Id="CormanLispCoreInit"
51+
Name="init.lisp"
52+
DiskId="1"
53+
Source=".\init.lisp" />
54+
<File Id="MakeImgBat"
55+
Name="makeimg.bat"
56+
DiskId="1"
57+
Source=".\makeimg.bat" />
58+
<File Id="CormanLispLicense"
59+
Name="LICENSE.txt"
60+
DiskId="1"
61+
Source=".\LICENSE.txt" />
62+
</Component>
63+
<!-- RDNZL Dynamic Library -->
64+
<Component Id="RDNZL_DLL"
65+
Guid="{6D17A89E-C877-4DEC-970C-CAC6D41C9261}">
66+
<File Id="RDNZL.dll"
67+
Name="RDNZL.dll"
68+
DiskId="1"
69+
Source=".\RDNZL.dll" />
70+
</Component>
71+
<!-- set environmental variable -->
72+
<Component Id="SetEnv_CORMANLISP_HOME"
73+
Guid="{307EA98D-C472-4D90-9FD7-A27018E87263}"
74+
KeyPath="yes">
75+
<Environment Id="Env_CORMANLISP_HOME"
76+
Name="CORMANLISP_HOME"
77+
Value="[INSTALLDIR]" Action="set" System="yes" />
78+
</Component>
79+
</DirectoryRef>
80+
<!-- Product Base description -->
81+
<ComponentGroup Id="ProductBase">
82+
<ComponentRef Id="RegValueProductInstallPath" />
83+
<ComponentRef Id="CormanLispCore" />
84+
<ComponentRef Id="RDNZL_DLL" />
85+
</ComponentGroup>
86+
</Fragment>
87+
</Wix>
88+

installer/DebugData.wxs

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
3+
<Fragment>
4+
<DirectoryRef Id="INSTALLDIR">
5+
<!-- debug data files -->
6+
<Component Id="DebugDataFiles" Guid="{59A45CAD-80F1-4C15-8F9B-BE9D6735359E}">
7+
<File Id="clboot.pdb"
8+
Name="clboot.pdb"
9+
DiskId="1"
10+
Source=".\clboot.pdb" />
11+
<File Id="clbootapp.pdb"
12+
Name="clbootapp.pdb"
13+
DiskId="1"
14+
Source=".\clbootapp.pdb" />
15+
<File Id="clconsole.pdb"
16+
Name="clconsole.pdb"
17+
DiskId="1"
18+
Source=".\clconsole.pdb" />
19+
<File Id="clconsoleapp.pdb"
20+
Name="clconsoleapp.pdb"
21+
DiskId="1"
22+
Source=".\clconsoleapp.pdb" />
23+
<File Id="CormanLisp.pdb"
24+
Name="CormanLisp.pdb"
25+
DiskId="1"
26+
Source=".\CormanLisp.pdb" />
27+
<File Id="CormanLispServer.pdb"
28+
Name="CormanLispServer.pdb"
29+
DiskId="1"
30+
Source=".\CormanLispServer.pdb" />
31+
<File Id="dlltemplate.pdb"
32+
Name="dlltemplate.pdb"
33+
DiskId="1"
34+
Source=".\dlltemplate.pdb" />
35+
</Component>
36+
</DirectoryRef>
37+
</Fragment>
38+
</Wix>

0 commit comments

Comments
 (0)