@@ -366,105 +366,6 @@ $ lcov --directory ./ --zerocounters ; find ./ -name "*.gcno" | xargs rm
366
366
$ rm -rf ./coverage
367
367
----
368
368
369
- == Building OpenSCAP on Windows using Visual Studio
370
-
371
- Prerequisites:
372
-
373
- * https://www.visualstudio.com/[Visual Studio]
374
- * https://git-scm.com/[Git]
375
- * https://cmake.org/[CMake]
376
-
377
- 1) Get dependencies
378
-
379
- We will use https://github.com/Microsoft/vcpkg[Vcpkg] to download libraries
380
- that are required to build OpenSCAP.
381
-
382
- Click on Start -> Windows System -> Command Prompt.
383
-
384
- ----
385
- mkdir c:\devel
386
- cd c:\devel
387
- git clone https://github.com/Microsoft/vcpkg.git
388
- cd vcpkg
389
- .\bootstrap-vcpkg.bat
390
- .\vcpkg install curl libxml2 libxslt bzip2 pcre pthreads getopt-win32
391
- .\vcpkg integrate install
392
- ----
393
-
394
- 2) Get OpenSCAP
395
-
396
- ----
397
- cd c:\devel
398
- git clone -b main https://github.com/OpenSCAP/openscap.git
399
- ----
400
-
401
- 3) Generate Visual Studio Solution
402
-
403
- ----
404
- cd openscap
405
- cd build
406
- cmake -D ENABLE_PYTHON3=FALSE -D CMAKE_TOOLCHAIN_FILE=c:/devel/vcpkg/scripts/buildsystems/vcpkg.cmake ..
407
- ----
408
-
409
- 4) Open in Visual Studio
410
-
411
- 1. Launch Visual Studio
412
- 2. Click on File -> Open -> Project/Solution...
413
- 3. Locate `c:\devel\openscap\build\openscap.sln`
414
-
415
- 5) Build
416
-
417
- 1. Select build type (Debug, Release, ...) in the drop-down menu in the top panel.
418
- 2. Click on Build -> Build Solution.
419
-
420
- Built binaries and their dependencies are now located in `C:\devel\openscap\build\<BUILD_TYPE>\`, eg. `C:\devel\openscap\build\Debug\`
421
-
422
- == Building OpenSCAP for Windows on a Linux box (cross-compilation)
423
- Currently it is possible to cross-compile OpenSCAP for Windows only without probes.
424
- The resulting binary is not able to perform scanning.
425
- Instructions for cross-compiling OpenSCAP for Windows:
426
-
427
- 1) Install the cross-compiler & dependencies
428
-
429
- NOTE: mingw32-pthreads needs to be version 5.0 or greater.
430
-
431
- -------------------------------------------------------------
432
- # yum install mingw32-gcc mingw32-binutils mingw32-libxml2 \
433
- mingw32-libgcrypt mingw32-pthreads mingw32-libxslt \
434
- mingw32-curl mingw32-pcre \
435
- mingw32-filesystem mingw32-bzip2
436
- -------------------------------------------------------------
437
-
438
- 2) Checkout the main branch of the OpenSCAP repository
439
-
440
- ----------------------------------------------------------------------
441
- $ git clone -b main https://github.com/openscap/openscap.git
442
- $ cd openscap
443
- ----------------------------------------------------------------------
444
-
445
- 3) Prepare the build
446
-
447
- ----------------------------------------------------------------------------------
448
- $ mkdir build-win32
449
- $ cd build-win32
450
- $ mingw32-cmake -D ENABLE_PYTHON3=FALSE -D ENABLE_PROBES=FALSE -D ENABLE_OSCAP_UTIL_DOCKER=FALSE ../
451
- ----------------------------------------------------------------------------------
452
-
453
- 4) Build!
454
-
455
- ------------------------------
456
- $ make
457
- ------------------------------
458
-
459
- Resulting `oscap.exe` can be found in the `utils/` directory.
460
-
461
-
462
- If you would like to send us a patch fixing any Windows
463
- compiling issues, please consult the page about
464
- http://open-scap.org/page/Contribute[contributing to the OpenSCAP
465
- project].
466
-
467
-
468
369
== OpenSCAP Reference Manual
469
370
For more information about OpenSCAP library, you can refer to this online
470
371
reference manual: http://static.open-scap.org/openscap-1.2/[OpenSCAP
0 commit comments