source: nscp/Jamroot @ 358cda1

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

2009-08-30 MickeM

+ Added -c and -d command line options like so:

NSClient++ -c CheckFile2 path=c:\test pattern=*.txt MaxCrit=1 filter+written=gt:2h
NSClient++ -c <command> <argument 1> <argument 2> ...
-d Is the same thing but with debug enabled.

+ Added uninstall of old client (sort of broken but works)

2009-08-29 MickeM

  • Fixed issue with CheckFile (directory)
  • Rewrote the CA:s in the installer to work "better" (hopefully) in general it should be have more like a propper installer.

2009-07-18 MickeM

  • Fixed issue with no loggers avalible and "memory leak"
  • Added "firewall exception" to installer
  • Fixed an issue with the socket data buffer
  • Added new option to NSC.ini [NSCA] socket_timeout=30 (timeout in seconds when reading from NSCA sockets)
  • Fixed issue with NSCA socket.

2009-07-05 MickeM

2009-06-20 MickeM

  • Fixed issue with CheckDisk and paths not working out properly
  • Property mode set to 100644
File size: 8.2 KB
Line 
1import feature : feature ;
2import modules ;
3import os ;
4import errors ;
5import stage ;
6import common ;
7import option ;
8
9include user-config.jam ;
10
11feature character-set : unicode ansi multibyte : composite ;
12feature.compose <character-set>unicode : <define>_UNICODE <define>UNICODE ;
13feature.compose <character-set>multibyte : <define>_MBCS ;
14
15
16local toolset = [ MATCH "^--toolset=(.*)" : [ modules.peek : ARGV ] ] ;
17toolset ?= msvc ;
18if $(toolset) = "msvc" {
19        import bjam/lua ;
20        import bjam/openssl ;
21        import bjam/boost ;
22        import bjam/cryptopp ;
23        import bjam/psdk ;
24}
25import toolset : flags ;
26import notfile ;
27import bjam/zip ;
28
29local target = NSClient++ ;
30local target-config = nsc.ini ;
31local target-readme = readme.txt ;
32local target-changelog = changelog.txt ;
33local target-license = license.txt ;
34local target-counters = counters.defs ;
35
36ECHO "OS =" [ os.name ] ;
37ECHO "name =" $(__name__) ;
38
39# what kind of layout are we doing?
40layout = [ MATCH "^--layout=(.*)" : [ modules.peek : ARGV ] ] ;
41layout ?= versioned ;
42layout-$(layout) = true ;
43
44path-constant TOP : . ;
45
46# possible stage only location
47local stage-locate = [ MATCH "^--stagedir=(.*)" : [ modules.peek : ARGV ] ] ;
48stage-locate ?= stage ;
49path-constant BOOST_STAGE_LOCATE : $(stage-locate) ;
50
51if $(toolset) = "msvc" {
52        using bjam/openssl : : $(TOP)/lib-source/openssl-0.9.8g/include $(TOP)/lib ;
53        using bjam/boost : : $(TOP)/lib-source/boost_1_35_0 $(TOP)/lib ;
54        using bjam/lua : : $(TOP)/lib-source/lua-5.1.2 ;
55        using bjam/cryptopp : : $(TOP)/lib-source/"Crypto++"/src ;
56        using bjam/psdk : : /foo ;
57
58        if [ bjam/lua.isEnabled ] = true {
59                echo "LUA support enabled (disable with --without-lua)" ;
60                bjam/lua.printEnv ;
61        } else {
62                echo "LUA support DISABLED (enable with --with-lua)" ;
63        }
64
65        if [ bjam/openssl.isEnabled ] = true {
66                echo "SSL support enabled (disable with --without-openssl)" ;
67                bjam/openssl.printEnv ;
68        } else {
69                echo "SSL support DISABLED (enable with --with-openssl)" ;
70        }
71
72        if [ bjam/boost.isEnabled ] = true {
73                echo "boost found (disable with --without-boost)" ;
74                bjam/boost.printEnv ;
75        } else {
76                echo "boost not avaliable! some features DISABLED (for instance regular expressions) (enable with --with-boost)" ;
77        }
78
79        if [ bjam/cryptopp.isEnabled ] = true {
80                echo "Crypto++ found (disable with --without-cryptopp)" ;
81                bjam/cryptopp.printEnv ;
82        } else {
83                echo "cryptopp not avaliable! encryption (NSCA) DISABLED (enable with --with-cryptopp)" ;
84        }
85
86        if [ bjam/psdk.isEnabled ] = true {
87                echo "Platform SDK found (disable with --without-psdk)" ;
88                bjam/psdk.printEnv ;
89        } else {
90                echo "Plattform SDK not avaliable! Various features wont work (enable with --with-psdk)" ;
91        }
92       
93        notfile update_version : @update_version ;
94        actions update_version
95        {
96                D:\source\tools\XAutobuild.exe -f $(TOP)
97        }
98}
99
100
101
102project master
103        : requirements
104        <include>include
105        <find-static-library>advapi32
106        <find-static-library>user32
107        <find-static-library>shell32
108        <threading>multi
109        <link>shared
110        $(result)
111
112        : default-build debug
113
114        : build-dir bjam-tmp-build
115        ;
116
117make $(target).exe.manifest : NSClient++.manifest : common.copy ;
118explicit $(target).exe.manifest ;
119
120
121exe $(target)
122
123        : # sources
124        NSClient++.cpp
125        NSCPlugin.cpp
126        include/NSCHelper.cpp
127        include/arrayBuffer.cpp
128        include/ServiceCmd.cpp
129        include/Socket.cpp
130        include/b64/b64.c
131
132        : # requirements
133        <dependency>$(target).exe.manifest
134        #<runtime-link>static
135        <find-static-library>ws2_32
136        <find-static-library>Userenv
137        <find-static-library>ole32
138        <variant>release:<dependency>update_version
139        : # default build
140
141        : # usage requirements
142# depends $(target).manifest
143        ;
144explicit $(target) ;
145
146#
147# Copy various files
148#
149make $(target-config) : nsc.dist : common.copy ;
150explicit $(target-config) ;
151
152make $(target-readme) : files/readme.txt : common.copy ;
153explicit $(target-readme) ;
154
155make $(target-license) : files/license.txt : common.copy ;
156explicit $(target-license) ;
157
158make $(target-changelog) : changelog : common.copy ;
159explicit $(target-changelog) ;
160
161make $(target-counters) : files/counters.defs : common.copy ;
162explicit $(target-counters) ;
163
164all-modules =
165    [ MATCH .*modules/(.*)/.* : [ glob modules/*/Jamfile ] ]
166    ;
167
168# all-modules = NSCAAgent ;
169
170all-scripts =
171    [ MATCH .*scripts/(.+\\..*) : [ glob scripts/* ] ]
172    ;
173local all-scripts-lst ;
174if $(toolset) = "msvc" {
175        if ! ( [ bjam/lua.isEnabled ] = true ) {
176                echo "LUA support disabled skipping build of modules..." ;
177                local result ;
178                for local l in $(all-modules)
179                {
180                        if [ MATCH (.*LUA.*) : $(l) ]
181                        {
182                                echo "Not building module: $(l)" ;
183                        } else {
184                                result += $(l) ;
185                        }
186                }
187                all-modules = $(result) ;
188        }
189        if ! ( [ bjam/psdk.isEnabled ] = true ) {
190                echo "PSDK support disabled skipping build of modules..." ;
191                local result ;
192                for local l in $(all-modules)
193                {
194                        if [ MATCH (.*CheckTaskSched.*) : $(l) ] {
195                                echo "Not building module: $(l)" ;
196                        } else if [ MATCH (.*CheckWMI.*) : $(l) ] {
197                                echo "Not building module: $(l)" ;
198                        } else {
199                                result += $(l) ;
200                        }
201                }
202                all-modules = $(result) ;
203        }
204        for local l in $(all-modules)
205        {
206                alias $(l)
207                        : # sources
208                        modules/$(l)
209                        : # requirements
210                        : # default build
211                        : # usage requirements
212                        <dependency>$(target)
213                        ;
214                echo "Adding module: $(l)" ;
215                explicit $(l) ;
216        }
217        for local l in $(all-scripts)
218        {
219                #make scripts-$(l) : scripts/$(l) : common.copy ;
220                #explicit scripts/$(l) ;
221
222                #alias scripts-$(l) : scripts/$(l) ;
223                #explicit scripts-$(l) ;
224
225                all-scripts-lst = $(all-scripts-lst) scripts/$(l) ;
226
227                echo "Adding script: $(l)" ;
228        }
229}
230
231all-installers =
232    [ MATCH .*helpers/(.*)/.* : [ glob helpers/*installer/Jamfile ] ]
233    ;
234for local l in $(all-installers)
235{
236        alias $(l) : helpers/$(l) ;
237        echo "Adding installer target for: $(l)" ;
238        explicit $(l) ;
239}
240
241all-archive =
242    [ MATCH .*helpers/(.*)/.* : [ glob helpers/*archive/Jamfile ] ]
243    ;
244for local l in $(all-archive)
245{
246        alias $(l) : helpers/$(l) ;
247        echo "Adding archive target for: $(l)" ;
248        explicit $(l) ;
249}
250
251alias cryptopp-headers : helpers/cryptopp-headers ;
252explicit cryptopp-headers ;
253
254alias installer_dll : helpers/installer_dll helpers/installer_dll_fw ;
255explicit installer_dll ;
256
257all-helpers = installer_dll ;
258alias all-helpers-targets : $(all-helpers) ;
259explicit all-helpers-targets ;
260
261alias all-scripts-targets : $(all-scripts-lst) ;
262explicit all-scripts-targets ;
263
264alias all-root-targets : $(target) $(target-config) $(target-readme) $(target-license) $(target-changelog) $(target-counters) helpers/systray_helper ;
265explicit all-root-targets ;
266
267alias all-modules-targets : $(all-modules) ;
268explicit all-modules-targets ;
269alias all-installer-targets : $(all-installers) ;
270explicit all-installer-targets ;
271alias all-archive-targets : $(all-archive) ;
272explicit all-archive-targets ;
273
274rule get-root-prefix ( properties * )
275{
276    if <architecture>ia64 in $(properties) {
277                return IA64 ;
278        } else {
279                if <address-model>64 in $(properties) { return x64 ; }
280                else { return Win32 ; }
281        }
282}
283rule generate-binary-location ( properties * )
284{
285        local tag = [ get-root-prefix $(properties) ] ;
286        return <location>$(BOOST_STAGE_LOCATE)/$(tag)/binaries ;
287}
288rule generate-helper-location ( properties * )
289{
290        local tag = [ get-root-prefix $(properties) ] ;
291        return <location>$(BOOST_STAGE_LOCATE)/$(tag)/helpers ;
292}
293rule generate-scripts-location ( properties * )
294{
295        local tag = [ get-root-prefix $(properties) ] ;
296        return <location>$(BOOST_STAGE_LOCATE)/$(tag)/binaries/scripts ;
297}
298rule generate-module-location ( properties * )
299{
300        local tag = [ get-root-prefix $(properties) ] ;
301        return <location>$(BOOST_STAGE_LOCATE)/$(tag)/binaries/modules ;
302}
303
304install dist : all-root-targets : <conditional>@generate-binary-location ;
305explicit dist ;
306
307install dist-modules : all-modules-targets : <conditional>@generate-module-location ;
308explicit dist-modules ;
309
310install dist-helpers : all-helpers-targets : <conditional>@generate-helper-location ;
311explicit dist-helpers ;
312
313install dist-scripts : all-scripts-targets : <conditional>@generate-scripts-location ;
314explicit dist-scripts ;
315
316alias build-binaries : dist dist-modules dist-helpers dist-scripts ;
317explicit build-binaries ;
318
319
320alias build-archives : all-archive-targets : <location>$(BOOST_STAGE_LOCATE)/archive ;
321explicit build-archives ;
322
323
324alias build-installer : all-installer-targets : <location>$(BOOST_STAGE_LOCATE)/installer ;
325explicit build-installer ;
326
327
328
Note: See TracBrowser for help on using the repository browser.