source: nscp/wix.jam @ a8cdbc2

0.4.00.4.10.4.2stable
Last change on this file since a8cdbc2 was a8cdbc2, checked in by Michael Medin <michael@…>, 4 years ago

added wix bjam file

  • Property mode set to 100644
File size: 2.8 KB
Line 
1# Copyright (C) Reece H. Dunn 2005.
2# Based on the wix.jam file by Peter Foley.
3#
4# Use, modification and distribution is subject to the Boost Software
5# License Version 1.0. (See accompanying file LICENSE_1_0.txt or
6# http://www.boost.org/LICENSE_1_0.txt)
7
8import feature : feature get-values ;
9import common ;
10import toolset : flags ;
11import type ;
12import generators ;
13
14
15feature.extend toolset : wix ;
16
17
18space = " " ;
19
20
21type.register WXS    : wxs ;    # WiX Source file
22type.register WXI    : wxi ;    # WiX Include file
23type.register WXL    : wxl ;    # WiX Localisation file
24type.register WIXOBJ : wixobj ; # WiX Object file
25type.register WIXLIB : wixlib ; # WiX Library file
26type.register MSI    : msi ;    # Installer
27type.register MSM    : msm ;    # Merge Module
28
29
30feature linkoptions : : free ;
31feature compileoptions : : free ;
32
33feature identical-rows : no yes : optional ;
34feature unresolved-references : no yes : optional ;
35
36feature search-path : : path free ;
37
38feature localisation : : path free ;
39
40rule init ( version ? : command * : options * )
41{
42    compiler = candle ;
43    linker = light ;
44    local condition = [ common.check-init-parameters wix : version $(version) ] ;
45       
46        local prefix ;
47       
48        local wix-location = [ MATCH "^--wix=(.*)" : [ modules.peek : ARGV ] ] ;
49        if $(wix-location) {
50                prefix = $(wix-location)\\bin\\ ;
51        } else {
52                command = [ common.get-invocation-command wix : candle.exe : $(command) ] ;
53                if $(command) {
54                        local abs-path = [ common.get-absolute-tool-path $(command[-1]) ] ;
55                        local prefix = $(abs-path)\\ ;
56                } else {
57                        echo "Could not find WIX location (please use --wix=<path> to specify the location)" ;
58                }
59        }
60
61    flags wix.compile .CC $(condition) : $(prefix)$(compiler) ;
62    flags wix.link    .LD $(condition) : $(prefix)$(linker) ;
63       
64        echo "Using WIX Compiler: $(prefix)$(compiler)" ;
65}
66
67## Compiler
68
69generators.register-standard wix.compile.wxs : WXS : WIXOBJ ;
70
71flags wix.compile OPTIONS <compileoptions> ;
72
73flags wix.compile INCLUDES <include> ;
74flags wix.compile DEFINES <define> ;
75
76actions compile.wxs
77{
78    echo "$(.CC)" -nologo "$(OPTIONS)" -d"$(DEFINES)" -I"$(INCLUDES)" -out "$(<)"  "$(>)"
79    "$(.CC)" -nologo "$(OPTIONS)" -d"$(DEFINES)" -I"$(INCLUDES)" -out "$(<)"  "$(>)"
80}
81
82## Linker
83
84generators.register-composing wix.link.msi : WIXOBJ WIXLIB : MSI ;
85
86flags wix.link OPTIONS <linkoptions> ;
87flags wix.link LOCALISATION <localisation> ;
88flags wix.link SEARCH_PATH <search-path> ;
89
90flags wix.link OPTIONS <identical-rows>yes : -ai ;
91flags wix.link OPTIONS <unresolved-references>yes : -au ;
92
93actions link.msi
94{
95    echo "$(.LD)" -nologo -b$(space)"$(SEARCH_PATH)" "$(OPTIONS)" -loc$(space)"$(LOCALISATION)" -out "$(<)" "$(>)"
96    "$(.LD)" -nologo -b$(space)"$(SEARCH_PATH)" "$(OPTIONS)" -loc$(space)"$(LOCALISATION)" -out "$(<)" "$(>)"
97}
Note: See TracBrowser for help on using the repository browser.