1 REM Generate windows packages
2 REM Author: Michael Starks
3 REM Based on gen_win.sh by Daniel Cid
5 REM This program is a free software; you can redistribute it
6 REM and/or modify it under the terms of the GNU General Public
7 REM License (version 2) as published by the FSF - Free Software
10 REM Enable delayed variable expansion
11 SETLOCAL ENABLEDELAYEDEXPANSION
12 SET FILE=win-files.txt
15 REM Check for public domain unix2dos.exe. It can be found here: http://www.efgh.com/software/unix2dos.htm
16 IF NOT EXIST unix2dos.exe echo unix2dos.exe not found, exiting... && EXIT 1
18 REM Generating configs
19 unix2dos.exe ossec.conf
20 type ossec.conf > ossec-win.conf
22 type help.txt > help_win.txt
23 unix2dos.exe ..\..\etc\internal_options.conf
24 type ..\..\etc\internal_options.conf > internal_options-win.conf
25 unix2dos.exe ..\..\LICENSE
26 type ..\..\LICENSE > LICENSE.txt
27 unix2dos.exe ..\..\active-response\win\route-null.cmd
28 type ..\..\active-response\win\route-null.cmd > route-null.cmd
29 unix2dos.exe ..\..\active-response\win\restart-ossec.cmd
30 type ..\..\active-response\win\restart-ossec.cmd > restart-ossec.cmd
32 REM Going to the source dir
34 IF NOT EXIST %WINPKG%\setup mkdir %WINPKG%\setup
36 FOR /F "tokens=1,2 delims= " %%i in (Win32\%FILE%) DO (
43 xcopy "!FS1!" "%WINPKG%\!FS2!" /E /I /F /Y || echo Error copying !FS1! to "%WINPKG%\!FS2!" && EXIT 1
45 copy !FS1! "%WINPKG%\!FS2!" || echo Error copying !FS1! to "%WINPKG%\!FS2!" EXIT 1
50 del %WINPKG%\os_crypto\md5\main.c
51 del %WINPKG%\os_crypto\blowfish\main.c
52 del %WINPKG%\os_crypto\sha1\main.c
53 del %WINPKG%\os_crypto\md5_sha1\main.c
54 del %WINPKG%\shared\rules_op.c