Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
clpm
clpm
Commits
7b017318
Commit
7b017318
authored
Feb 14, 2020
by
Eric Timmons
Browse files
Put all files into .wxs automatically
parent
d10ac81f
Changes
1
Hide whitespace changes
Inline
Side-by-side
scripts/build-wxs.lisp
View file @
7b017318
...
...
@@ -16,6 +16,27 @@
(
asdf:load-system
:s-xml
)
(
defun
directory-tree
(
pn
file-base-id
dir-base-id
)
(
let
((
files
(
directory
(
merge-pathnames
"*.*"
pn
)))
(
dirs
(
directory
(
merge-pathnames
"*/"
pn
)))
(
out
nil
))
(
dolist
(
file
files
)
(
unless
(
or
(
uiop:directory-pathname-p
file
)
(
equal
"fasl"
(
pathname-type
file
)))
(
let
((
enough
(
enough-namestring
file
pn
)))
(
push
`
((
"File"
"Name"
,
enough
"Id"
,
(
uiop:strcat
file-base-id
"."
enough
)
"Source"
,
(
enough-namestring
file
*build-root-pathname*
)))
out
))))
(
dolist
(
dir
dirs
)
(
let
((
name
(
car
(
last
(
pathname-directory
dir
)))))
(
push
`
((
"Directory"
"Name"
,
name
"Id"
,
(
uiop:strcat
dir-base-id
"."
name
))
,@
(
directory-tree
dir
(
uiop:strcat
file-base-id
"."
name
)
(
uiop:strcat
dir-base-id
"."
name
)))
out
)))
out
))
(
defun
build-wxs
()
`
((
"Wix"
"xmlns"
"http://schemas.microsoft.com/wix/2006/wi"
)
((
"Product"
"Id"
"*"
...
...
@@ -90,7 +111,11 @@
"Action"
"set"
"Name"
"CLPM_HOME"
"Part"
"all"
"Value"
"[LIBDIR]"
)))))))))
"Value"
"[LIBDIR]"
)))
((
"Component"
"Id"
"LibFiles"
"Guid"
"FABDC0CC-CFE3-479D-914D-4EB739D8C513"
)
,@
(
directory-tree
(
merge-pathnames
"lib/"
*build-root-pathname*
)
"File_lib"
"Directory_lib"
))))))))
((
"Feature"
"Id"
"Minimal"
"Title"
"CLPM Executable"
...
...
@@ -113,9 +138,10 @@
((
"UIRef"
"Id"
"WixUI_FeatureTree"
)))))
(
defun
write-wxs
()
(
with-open-file
(
s
(
merge-pathnames
"clpm.w
s
x"
*build-root-pathname*
)
(
with-open-file
(
s
(
merge-pathnames
"clpm.wx
s
"
*build-root-pathname*
)
:if-exists
:supersede
:direction
:output
)
(
format
s
"<?xml version='1.0'?>~%"
)
(
s-xml:print-xml
(
build-wxs
)
:stream
s
:pretty
t
)))
(
print
(
build-wxs
))
(
write-wxs
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment