forked from OCSInventory-NG/WindowsAgent
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.TXT
101 lines (78 loc) · 4.69 KB
/
README.TXT
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
//====================================================================================
// Open Computer and Software Inventory Next Generation
// Copyright (C) 2010 OCS Inventory NG Team. All rights reserved.
// Web: http://www.ocsinventory-ng.org
// This code is open source and may be copied and modified as long as the source
// code is always made freely available.
// Please refer to the General Public Licence V2 http://www.gnu.org/ or Licence.txt
// THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
// INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
// FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
// OF THE POSSIBILITY OF SUCH DAMAGE.
//====================================================================================
REQUIREMENTS
============
- Microsoft Visual C++ 2015 SP1 or higher
- Perl 5.8 or newer for building dependencies (you can use XAMPP perl addon)
- Source code exported from GitHub.
git clone https://github.com/OCSInventory-NG/WindowsAgent.git
BUILDING DEPENDENCIES
=====================
OCS Inventory NG Agent for Windows needs following libraries:
- zlib 1.2.11 or newer (www.zlib.net)
- openssl 1.0.2k or newer (www.openssl.org)
- curl 7.53.1 or newer (http://curl.haxx.se/)
- tinyXML 2.6.2 or newer (http://www.sourceforge.net/projects/tinyxml/)
- net-snmp 5.7.3 or newer (http://www.net-snmp.org/)
- ZipArchive GPL Edition 4.0.1 or newer (http://www.artpol-software.com)
Uncompress sources of these libraries into directory "External_Deps" to create
the following directory structures.
- External_Deps\Zlib-X.X.X
- External_Deps\openssl-X.X.X
- External_Deps\curl-X.X.X
- External_Deps\tinyxml
- External_Deps\net-snmp-X.X
- External_Deps\ZipArchive
Open "ZipArchive.sln" Visual C++ 2013 solution in folder
"External_Deps\ZipArchive", select configuration "Release Unicode STL MD DLL"
for platform Win32, and edit project properties. Add
_BIND_TO_CURRENT_VCLIBS_VERSION preprocessor define to "Configuration
properties / C/C++ / Preprocessor" section to automatically bind DLL to Visual
C++ 2008 SP1 CRT and MFC versions (for more explanation, see Jochen Kalmbach's Blog
http://blog.kalmbach-software.de/2009/05/27/deployment-of-vc2008-apps-without-installing-anything/)
Save and build to create unicode DLL for ZipArchive Library.
Script for building dependency automatically fixes cURL and net-snmp Makefiles for Visual C++ 2013,
by adding "/D_BIND_TO_CURRENT_VCLIBS_VERSION" to the CFLAGS. As is, libcurl and net-snmp
DLL will be bound to latest Visual C++ 2015 SP1 CRT versions.
For Zlib, OpenSSL and TinyXML, compiling using _BIND_TO_CURRENT_VCLIBS_VERSION
preprocessor define is done through the call of build file "OCS_Make_Required_Libs.bat".
Edit script "OCS_Make_Required_Libs.bat" to meet your need, especially
- Set path to MS Visual C++ 2013, for example
set VC_PATH=C:\Program Files (x86)\Microsoft Visual Studio X.X\VC
- Set path to MS Windows SDK, needed to build cURL, for example with VC++ 2013
set WINDOWS_SDK_PATH="C:\Program Files\Microsoft SDKs\Windows\vX.X"
- Set path to Perl 5.6 or higher binary, for example
set PERL_PATH=C:\xampp\perl\bin
- Set path to Zlib sources, for example
set ZLIB_PATH=D:\Developp\OCS Inventory NG\Bazaar\ocsinventory-windows-agent\External_Deps\zlib-1.2.11
- Set path to OpenSSL sources, for example
set OPENSSL_PATH=D:\Developp\OCS Inventory NG\Bazaar\ocsinventory-windows-agent\External_Deps\openssl-1.0.2k
- Set path to cURL sources, for example
set CURL_PATH=D:\Developp\OCS Inventory NG\Bazaar\ocsinventory-windows-agent\External_Deps\curl-7.53.1
- Set path to tinyXML sources, for example
set XML_PATH=D:\Developp\OCS Inventory NG\Bazaar\ocsinventory-windows-agent\External_Deps\tinyxml
- Set path to ZipArchive sources, for example
set ZIP_PATH=D:\Developp\OCS Inventory NG\Bazaar\ocsinventory-windows-agent\External_Deps\ZipArchive
Then, launch script "OCS_Make_Required_Libs.bat" to create all libs and prepare for building OCS agent.
BUILDING AGENT
==============
Open solution "OCSInventory.sln", select project "Agent" and build it !
See Options.txt for agent's command line switches.
We hope it will works for you !
OCS Inventory Team