{"id":298,"date":"2007-04-02T03:52:11","date_gmt":"2007-04-02T03:52:11","guid":{"rendered":"https:\/\/defragged.org\/ossec\/?p=298"},"modified":"2020-07-03T03:53:15","modified_gmt":"2020-07-03T03:53:15","slug":"how-to-compile-ossec-on-windows","status":"publish","type":"post","link":"https:\/\/defragged.org\/ossec\/2007\/04\/how-to-compile-ossec-on-windows\/","title":{"rendered":"How to compile ossec on Windows?"},"content":{"rendered":"\n<p>It is not the first time I was asked that, so I decided to write it in here in case anyone else is interested. First of all,&nbsp;<a href=\"http:\/\/www.ossec.net\/\">ossec<\/a>&nbsp;is compiled using&nbsp;<a href=\"http:\/\/www.mingw.org\/\">MinGW<\/a>, so we have only used it with gcc. We do not support any other compiler, but feel free to use them if you want.<\/p>\n\n\n\n<p>With that being said, you now need the windows specific files. Go to your ossec source code (on Unix) and execute the&nbsp;<em>\u201cgen_win.sh\u201d<\/em>&nbsp;script. It will create all the necessary files for the Windows installation inside&nbsp;<em>src\/win-pkg<\/em>.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ <strong>pwd<\/strong>\n\/tmp\/ossec-hids-1.1\/src\/win32\/\n$ <strong>.\/gen_win.sh<\/strong>\n..\n$ <strong>cd ..\/win-pkg<\/strong>\n$ <strong>zip ossec-win.zip win-pkg<\/strong>\n<\/pre>\n\n\n\n<p>After that, copy the \u201cwin-pkg\u201d directory to your Windows system and execute the \u201cmake.bat\u201d script on it.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">C:&gt;<strong>cd win-pkg<\/strong>\nC:win-pkg&gt;<strong>make<\/strong>\n..\n<\/pre>\n\n\n\n<p>If your MinGW installation is not a&nbsp;<em>C:MinGW<\/em>, you will need to set the right paths on the make script. When you are done with your changes, you can generate the&nbsp;<em>install.exe<\/em>&nbsp;by compiling ossec-installer.nsi with&nbsp;<a href=\"http:\/\/nsis.sourceforge.net\/Main_Page\">NSIS<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>It is not the first time I was asked that, so I decided to write it in here in case anyone else is interested. First of all,&nbsp;ossec&nbsp;is compiled using&nbsp;MinGW, so we have only used it with gcc. We do not support any other compiler, but feel free to use them if you want. With that [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[5],"tags":[11],"_links":{"self":[{"href":"https:\/\/defragged.org\/ossec\/wp-json\/wp\/v2\/posts\/298"}],"collection":[{"href":"https:\/\/defragged.org\/ossec\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/defragged.org\/ossec\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/defragged.org\/ossec\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/defragged.org\/ossec\/wp-json\/wp\/v2\/comments?post=298"}],"version-history":[{"count":1,"href":"https:\/\/defragged.org\/ossec\/wp-json\/wp\/v2\/posts\/298\/revisions"}],"predecessor-version":[{"id":299,"href":"https:\/\/defragged.org\/ossec\/wp-json\/wp\/v2\/posts\/298\/revisions\/299"}],"wp:attachment":[{"href":"https:\/\/defragged.org\/ossec\/wp-json\/wp\/v2\/media?parent=298"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/defragged.org\/ossec\/wp-json\/wp\/v2\/categories?post=298"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/defragged.org\/ossec\/wp-json\/wp\/v2\/tags?post=298"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}