Replaced vdproj Installer Project setup build files with Inno Setup build file. Updated win32 README accordingly.

pull/51/head
Micah Snyder (micasnyd) 7 years ago committed by Micah Snyder
parent 3a64e676b1
commit 2459b65198
  1. 188
      win32/ClamAV-Installer.iss
  2. 16
      win32/ClamAV.sln
  3. 151
      win32/README.md
  4. 2
      win32/Setup-x64/.gitignore
  5. 1747
      win32/Setup-x64/Setup-x64.vdproj
  6. 2
      win32/Setup-x86/.gitignore
  7. 1807
      win32/Setup-x86/Setup-x86.vdproj
  8. BIN
      win32/UpgradeLog.htm
  9. BIN
      win32/UpgradeLog2.htm
  10. BIN
      win32/demon.bmp
  11. BIN
      win32/talos.bmp

@ -0,0 +1,188 @@
; -- ClamAV-Installer.iss --
; Install ClamAV.
; Will install the correct files and DLLs built for two different
; for the system architecture (x86 or x64) using a single installer:
; on a "x86" edition of Windows the x86 version of the program will be
; installed but on a "x64" edition of Windows the x64 version will
; be installed.
[Setup]
AppName=ClamAV
AppVersion=0.101.0
DefaultDirName={pf}\ClamAV
DefaultGroupName=ClamAV
AppCopyright=2018 Cisco Systems, Inc.
AppPublisher=Cisco Systems, Inc.
AppPublisherURL=https://www.clamav.net/
LicenseFile=..\COPYING
UninstallDisplayIcon={app}\clam.ico
UninstallDisplayName=ClamAV
Compression=lzma2
SolidCompression=yes
OutputDir=.
OutputBaseFilename=ClamAV-0.101.0
WizardImageFile=demon.bmp
WizardSmallImageFile=talos.bmp
; "ArchitecturesInstallIn64BitMode=x64" requests that the install be
; done in "64-bit mode" on x64, meaning it should use the native
; 64-bit Program Files directory and the 64-bit view of the registry.
; On all other architectures it will install in "32-bit mode".
ArchitecturesInstallIn64BitMode=x64
; Note: We don't set ProcessorsAllowed because we want this
; installation to run on all architectures (including Itanium,
; since it's capable of running 32-bit code too).
[Files]
; x64 files here
Source: "x64\Release\clambc.exe"; DestDir: "{app}"; DestName: "clambc.exe"; Check: Is64BitInstallMode
Source: "x64\Release\clamconf.exe"; DestDir: "{app}"; DestName: "clamconf.exe"; Check: Is64BitInstallMode
Source: "x64\Release\clamd.exe"; DestDir: "{app}"; DestName: "clamd.exe"; Check: Is64BitInstallMode
Source: "x64\Release\clamdscan.exe"; DestDir: "{app}"; DestName: "clamdscan.exe"; Check: Is64BitInstallMode
Source: "x64\Release\clamscan.exe"; DestDir: "{app}"; DestName: "clamscan.exe"; Check: Is64BitInstallMode
Source: "x64\Release\freshclam.exe"; DestDir: "{app}"; DestName: "freshclam.exe"; Check: Is64BitInstallMode
Source: "x64\Release\libclamav.dll"; DestDir: "{app}"; DestName: "libclamav.dll"; Check: Is64BitInstallMode
Source: "x64\Release\libclamunrar_iface.dll"; DestDir: "{app}"; DestName: "libclamunrar_iface.dll"; Check: Is64BitInstallMode
Source: "x64\Release\libclamunrar.dll"; DestDir: "{app}"; DestName: "libclamunrar.dll"; Check: Is64BitInstallMode
Source: "x64\Release\mspack.dll"; DestDir: "{app}"; DestName: "mspack.dll"; Check: Is64BitInstallMode
Source: "x64\Release\pthreads.dll"; DestDir: "{app}"; DestName: "pthreads.dll"; Check: Is64BitInstallMode
Source: "x64\Release\sigtool.exe"; DestDir: "{app}"; DestName: "sigtool.exe"; Check: Is64BitInstallMode
Source: "libcrypto-1_1-x64.dll"; DestDir: "{app}"; DestName: "libcrypto-1_1-x64.dll"; Check: Is64BitInstallMode
Source: "libssl-1_1-x64.dll"; DestDir: "{app}"; DestName: "libssl-1_1-x64.dll"; Check: Is64BitInstallMode
Source: "C:\clam_dependencies\vcredist\vc_redist.x64.exe"; DestDir: "{tmp}"; Flags: deleteafterinstall; Check: Is64BitInstallMode
; x86 files here, first one should be marked 'solidbreak'
Source: "Win32\Release\clambc.exe"; DestDir: "{app}"; DestName: "clambc.exe"; Check: not Is64BitInstallMode; Flags: solidbreak
Source: "Win32\Release\clamconf.exe"; DestDir: "{app}"; DestName: "clamconf.exe"; Check: not Is64BitInstallMode
Source: "Win32\Release\clamd.exe"; DestDir: "{app}"; DestName: "clamd.exe"; Check: not Is64BitInstallMode
Source: "Win32\Release\clamdscan.exe"; DestDir: "{app}"; DestName: "clamdscan.exe"; Check: not Is64BitInstallMode
Source: "Win32\Release\clamscan.exe"; DestDir: "{app}"; DestName: "clamscan.exe"; Check: not Is64BitInstallMode
Source: "Win32\Release\freshclam.exe"; DestDir: "{app}"; DestName: "freshclam.exe"; Check: not Is64BitInstallMode
Source: "Win32\Release\libclamav.dll"; DestDir: "{app}"; DestName: "libclamav.dll"; Check: not Is64BitInstallMode
Source: "Win32\Release\libclamunrar_iface.dll"; DestDir: "{app}"; DestName: "libclamunrar_iface.dll"; Check: not Is64BitInstallMode
Source: "Win32\Release\libclamunrar.dll"; DestDir: "{app}"; DestName: "libclamunrar.dll"; Check: not Is64BitInstallMode
Source: "Win32\Release\mspack.dll"; DestDir: "{app}"; DestName: "mspack.dll"; Check: not Is64BitInstallMode
Source: "Win32\Release\pthreads.dll"; DestDir: "{app}"; DestName: "pthreads.dll"; Check: not Is64BitInstallMode
Source: "Win32\Release\sigtool.exe"; DestDir: "{app}"; DestName: "sigtool.exe"; Check: not Is64BitInstallMode
Source: "libcrypto-1_1.dll"; DestDir: "{app}"; DestName: "libcrypto-1_1.dll"; Check: not Is64BitInstallMode
Source: "libssl-1_1.dll"; DestDir: "{app}"; DestName: "libssl-1_1.dll"; Check: not Is64BitInstallMode
Source: "C:\clam_dependencies\vcredist\vc_redist.x86.exe"; DestDir: "{tmp}"; Flags: deleteafterinstall; Check: not Is64BitInstallMode
; Place all common files here, first one should be marked 'solidbreak'
Source: "res\clam.ico"; DestDir: "{app}"; DestName: "clam.ico"; Flags: solidbreak
Source: "conf_examples\clamd.conf.sample"; DestDir: "{app}\conf_examples"; DestName: "clamd.conf.sample"
Source: "conf_examples\freshclam.conf.sample"; DestDir: "{app}\conf_examples"; DestName: "freshclam.conf.sample"
Source: "..\COPYING"; DestDir: "{app}\COPYING"; DestName: "COPYING"
Source: "..\COPYING.bzip2"; DestDir: "{app}\COPYING"; DestName: "COPYING.bzip2"
Source: "..\COPYING.file"; DestDir: "{app}\COPYING"; DestName: "COPYING.file"
Source: "..\COPYING.getopt"; DestDir: "{app}\COPYING"; DestName: "COPYING.getopt"
Source: "..\COPYING.LGPL"; DestDir: "{app}\COPYING"; DestName: "COPYING.LGPL"
Source: "..\COPYING.llvm"; DestDir: "{app}\COPYING"; DestName: "COPYING.llvm"
Source: "..\COPYING.lzma"; DestDir: "{app}\COPYING"; DestName: "COPYING.lzma"
Source: "..\COPYING.pcre"; DestDir: "{app}\COPYING"; DestName: "COPYING.pcre"
Source: "..\COPYING.regex"; DestDir: "{app}\COPYING"; DestName: "COPYING.regex"
Source: "..\COPYING.unrar"; DestDir: "{app}\COPYING"; DestName: "COPYING.unrar"
Source: "..\COPYING.YARA"; DestDir: "{app}\COPYING"; DestName: "COPYING.YARA"
Source: "..\COPYING.zlib"; DestDir: "{app}\COPYING"; DestName: "COPYING.zlib"
Source: "..\ChangeLog.md"; DestDir: "{app}\docs"; DestName: "ChangeLog.md"
Source: "..\NEWS.md"; DestDir: "{app}\docs"; DestName: "NEWS.md"
Source: "..\README.md"; DestDir: "{app}"; DestName: "README.md"
Source: "..\docs\UserManual.md"; DestDir: "{app}\docs"; DestName: "UserManual.md"
Source: "..\docs\UserManual\Configuration.md"; DestDir: "{app}\docs\UserManual"; DestName: "Configuration.md"
Source: "..\docs\UserManual\Installation.md"; DestDir: "{app}\docs\UserManual"; DestName: "Installation.md"
Source: "..\docs\UserManual\Introduction.md"; DestDir: "{app}\docs\UserManual"; DestName: "Introduction.md"
Source: "..\docs\UserManual\libclamav.md"; DestDir: "{app}\docs\UserManual"; DestName: "libclamav.md"
Source: "..\docs\UserManual\PhishSigs.md"; DestDir: "{app}\docs\UserManual"; DestName: "PhishSigs.md"
Source: "..\docs\UserManual\Signatures.md"; DestDir: "{app}\docs\UserManual"; DestName: "Signatures.md"
Source: "..\docs\UserManual\Usage.md"; DestDir: "{app}\docs\UserManual"; DestName: "Usage.md"
Source: "..\docs\UserManual\images\demon.png"; DestDir: "{app}\docs\UserManual\images"; DestName: "demon.png"
[Dirs]
Name: "{app}\database"
; The VCRedistNeedsInstall function checks if a given version of VC++ is already installed
; Modify the function with one (or more) of the VC_* constants to suit your version
[Run]
Filename: "{tmp}\vc_redist.x86.exe"; Parameters: "/q /norestart"; Check: not Is64BitInstallMode and VCRedistNeedsInstall; WorkingDir: {app}\redist; StatusMsg: Installing VC++ 2015 Redistributables...; Flags: shellexec
Filename: "{tmp}\vc_redist.x64.exe"; Parameters: "/q /norestart"; Check: Is64BitInstallMode and VCRedistNeedsInstall; WorkingDir: {app}\redist; StatusMsg: Installing VC++ 2015 Redistributables...; Flags: shellexec
Filename: https://github.com/Cisco-Talos/clamav-devel/blob/dev/0.101/README.md; Description: "View Readme on GitHub"; Flags: postinstall shellexec
[Code]
#IFDEF UNICODE
#DEFINE AW "W"
#ELSE
#DEFINE AW "A"
#ENDIF
type
INSTALLSTATE = Longint;
const
INSTALLSTATE_INVALIDARG = -2; // An invalid parameter was passed to the function.
INSTALLSTATE_UNKNOWN = -1; // The product is neither advertised or installed.
INSTALLSTATE_ADVERTISED = 1; // The product is advertised but not installed.
INSTALLSTATE_ABSENT = 2; // The product is installed for a different user.
INSTALLSTATE_DEFAULT = 5; // The product is installed for the current user.
VC_2005_REDIST_X86 = '{A49F249F-0C91-497F-86DF-B2585E8E76B7}';
VC_2005_REDIST_X64 = '{6E8E85E8-CE4B-4FF5-91F7-04999C9FAE6A}';
VC_2005_REDIST_IA64 = '{03ED71EA-F531-4927-AABD-1C31BCE8E187}';
VC_2005_SP1_REDIST_X86 = '{7299052B-02A4-4627-81F2-1818DA5D550D}';
VC_2005_SP1_REDIST_X64 = '{071C9B48-7C32-4621-A0AC-3F809523288F}';
VC_2005_SP1_REDIST_IA64 = '{0F8FB34E-675E-42ED-850B-29D98C2ECE08}';
VC_2005_SP1_ATL_SEC_UPD_REDIST_X86 = '{837B34E3-7C30-493C-8F6A-2B0F04E2912C}';
VC_2005_SP1_ATL_SEC_UPD_REDIST_X64 = '{6CE5BAE9-D3CA-4B99-891A-1DC6C118A5FC}';
VC_2005_SP1_ATL_SEC_UPD_REDIST_IA64 = '{85025851-A784-46D8-950D-05CB3CA43A13}';
VC_2008_REDIST_X86 = '{FF66E9F6-83E7-3A3E-AF14-8DE9A809A6A4}';
VC_2008_REDIST_X64 = '{350AA351-21FA-3270-8B7A-835434E766AD}';
VC_2008_REDIST_IA64 = '{2B547B43-DB50-3139-9EBE-37D419E0F5FA}';
VC_2008_SP1_REDIST_X86 = '{9A25302D-30C0-39D9-BD6F-21E6EC160475}';
VC_2008_SP1_REDIST_X64 = '{8220EEFE-38CD-377E-8595-13398D740ACE}';
VC_2008_SP1_REDIST_IA64 = '{5827ECE1-AEB0-328E-B813-6FC68622C1F9}';
VC_2008_SP1_ATL_SEC_UPD_REDIST_X86 = '{1F1C2DFC-2D24-3E06-BCB8-725134ADF989}';
VC_2008_SP1_ATL_SEC_UPD_REDIST_X64 = '{4B6C7001-C7D6-3710-913E-5BC23FCE91E6}';
VC_2008_SP1_ATL_SEC_UPD_REDIST_IA64 = '{977AD349-C2A8-39DD-9273-285C08987C7B}';
VC_2008_SP1_MFC_SEC_UPD_REDIST_X86 = '{9BE518E6-ECC6-35A9-88E4-87755C07200F}';
VC_2008_SP1_MFC_SEC_UPD_REDIST_X64 = '{5FCE6D76-F5DC-37AB-B2B8-22AB8CEDB1D4}';
VC_2008_SP1_MFC_SEC_UPD_REDIST_IA64 = '{515643D1-4E9E-342F-A75A-D1F16448DC04}';
VC_2010_REDIST_X86 = '{196BB40D-1578-3D01-B289-BEFC77A11A1E}';
VC_2010_REDIST_X64 = '{DA5E371C-6333-3D8A-93A4-6FD5B20BCC6E}';
VC_2010_REDIST_IA64 = '{C1A35166-4301-38E9-BA67-02823AD72A1B}';
VC_2010_SP1_REDIST_X86 = '{F0C3E5D1-1ADE-321E-8167-68EF0DE699A5}';
VC_2010_SP1_REDIST_X64 = '{1D8E6291-B0D5-35EC-8441-6616F567A0F7}';
VC_2010_SP1_REDIST_IA64 = '{88C73C1C-2DE5-3B01-AFB8-B46EF4AB41CD}';
// Microsoft Visual C++ 2012 x86 Minimum Runtime - 11.0.61030.0 (Update 4)
VC_2012_REDIST_MIN_UPD4_X86 = '{BD95A8CD-1D9F-35AD-981A-3E7925026EBB}';
VC_2012_REDIST_MIN_UPD4_X64 = '{CF2BEA3C-26EA-32F8-AA9B-331F7E34BA97}';
// Microsoft Visual C++ 2012 x86 Additional Runtime - 11.0.61030.0 (Update 4)
VC_2012_REDIST_ADD_UPD4_X86 = '{B175520C-86A2-35A7-8619-86DC379688B9}';
VC_2012_REDIST_ADD_UPD4_X64 = '{37B8F9C7-03FB-3253-8781-2517C99D7C00}';
// Visual C++ 2013 Redistributable 12.0.21005
VC_2013_REDIST_X86_MIN = '{13A4EE12-23EA-3371-91EE-EFB36DDFFF3E}';
VC_2013_REDIST_X64_MIN = '{A749D8E6-B613-3BE3-8F5F-045C84EBA29B}';
VC_2013_REDIST_X86_ADD = '{F8CFEB22-A2E7-3971-9EDA-4B11EDEFC185}';
VC_2013_REDIST_X64_ADD = '{929FBD26-9020-399B-9A7A-751D61F0B942}';
// Visual C++ 2015 Redistributable 14.0.23026
VC_2015_REDIST_X86_MIN = '{A2563E55-3BEC-3828-8D67-E5E8B9E8B675}';
VC_2015_REDIST_X64_MIN = '{0D3E9E15-DE7A-300B-96F1-B4AF12B96488}';
VC_2015_REDIST_X86_ADD = '{BE960C1C-7BAD-3DE6-8B1A-2616FE532845}';
VC_2015_REDIST_X64_ADD = '{BC958BD2-5DAC-3862-BB1A-C1BE0790438D}';
function MsiQueryProductState(szProduct: string): INSTALLSTATE;
external 'MsiQueryProductState{#AW}@msi.dll stdcall';
function VCVersionInstalled(const ProductID: string): Boolean;
begin
Result := MsiQueryProductState(ProductID) = INSTALLSTATE_DEFAULT;
end;
function VCRedistNeedsInstall: Boolean;
begin
Result := not (VCVersionInstalled(VC_2015_REDIST_X86_MIN) or VCVersionInstalled(VC_2015_REDIST_X86_ADD) or VCVersionInstalled(VC_2015_REDIST_X64_MIN) or VCVersionInstalled(VC_2015_REDIST_X64_ADD));
end;

@ -72,10 +72,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mspack", "mspack.vcxproj",
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "openssl", "openssl.vcxproj", "{5661EB2A-7AE6-4C1A-864B-FDDD32F3D45A}"
EndProject
Project("{54435603-DBB4-11D2-8724-00A0C9A8B90C}") = "Setup-x64", "Setup-x64\Setup-x64.vdproj", "{92C046F5-ED35-4CF1-B016-F7052EFB3AD3}"
EndProject
Project("{54435603-DBB4-11D2-8724-00A0C9A8B90C}") = "Setup-x86", "Setup-x86\Setup-x86.vdproj", "{17F29B6A-389D-44DB-AC8B-9349EA7DBACE}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pthreads", "pthreads.vcxproj", "{56424F95-3DE6-429D-8D80-7F57CCE9209C}"
EndProject
Global
@ -222,18 +218,6 @@ Global
{5661EB2A-7AE6-4C1A-864B-FDDD32F3D45A}.Release|Win32.Build.0 = Release|Win32
{5661EB2A-7AE6-4C1A-864B-FDDD32F3D45A}.Release|x64.ActiveCfg = Release|x64
{5661EB2A-7AE6-4C1A-864B-FDDD32F3D45A}.Release|x64.Build.0 = Release|x64
{92C046F5-ED35-4CF1-B016-F7052EFB3AD3}.Debug|Win32.ActiveCfg = Debug
{92C046F5-ED35-4CF1-B016-F7052EFB3AD3}.Debug|x64.ActiveCfg = Debug
{92C046F5-ED35-4CF1-B016-F7052EFB3AD3}.Debug|x64.Build.0 = Debug
{92C046F5-ED35-4CF1-B016-F7052EFB3AD3}.Release|Win32.ActiveCfg = Release
{92C046F5-ED35-4CF1-B016-F7052EFB3AD3}.Release|x64.ActiveCfg = Release
{92C046F5-ED35-4CF1-B016-F7052EFB3AD3}.Release|x64.Build.0 = Release
{17F29B6A-389D-44DB-AC8B-9349EA7DBACE}.Debug|Win32.ActiveCfg = Debug
{17F29B6A-389D-44DB-AC8B-9349EA7DBACE}.Debug|Win32.Build.0 = Debug
{17F29B6A-389D-44DB-AC8B-9349EA7DBACE}.Debug|x64.ActiveCfg = Debug
{17F29B6A-389D-44DB-AC8B-9349EA7DBACE}.Release|Win32.ActiveCfg = Release
{17F29B6A-389D-44DB-AC8B-9349EA7DBACE}.Release|Win32.Build.0 = Release
{17F29B6A-389D-44DB-AC8B-9349EA7DBACE}.Release|x64.ActiveCfg = Release
{56424F95-3DE6-429D-8D80-7F57CCE9209C}.Debug|Win32.ActiveCfg = Debug|Win32
{56424F95-3DE6-429D-8D80-7F57CCE9209C}.Debug|Win32.Build.0 = Debug|Win32
{56424F95-3DE6-429D-8D80-7F57CCE9209C}.Debug|x64.ActiveCfg = Debug|x64

@ -1,13 +1,21 @@
ClamAV for Win32
================
# ClamAV for Win32
News
----
## News
### Installer Projects
ClamAV 0.101 removes the old Visual Studio Installer Projects files (Setup-x64.vdproj, Setup-x86.vdproj). In their place we now build an installer using Inno Setup that is capable of installing ClamAV on both 32-bit and 64-bit architectures with one installer.
For more details, see the instructions below on how to build ClamAV.
### OpenSSL
In order to support more advanced features planned in future releases, ClamAV has switched to using OpenSSL for hashing. The ClamAV Visual Studio project included with ClamAV's source code requires the OpenSSL distributables to be placed in a specific directory. This article will teach you how to compile OpenSSL on a Microsoft Windows system and how to link ClamAV against OpenSSL.
[Read More here](http://blog.clamav.net/2014/07/compiling-openssl-for-windows.html "ClamAV Blog")
### Socket and libclamav API input
Starting from version 0.98 the windows version of ClamAV requires all the input to be UTF-8 encoded.
This affects:
@ -23,89 +31,126 @@ Second, ANSI sequences which are also valid UTF-8 sequences will be handled as U
As a side note, console output (stdin and stderr) will always be OEM encoded,
even when redirected to a file.
Requirements
------------
## Requirements
To build the source code you will need:
- [Git for Windows](https://git-scm.com/download/win "Git SCM Windows Downloads") with a git "shell"
- [Microsoft Visual Studio 2015](https://www.visualstudio.com/vs/older-downloads/ "Visual Studio Downloads"): the community version is just fine.
You will need the Microsoft Visual Studio Installer Projects extension
in order to load and build the Setup x86 and Setup x64 projects that
build the .msi installers.
To build the installer, you also need:
- [Microsoft Visual Studio 2015 Installer Projects plugin](https://marketplace.visualstudio.com/items?itemName=VisualStudioProductTeam.MicrosoftVisualStudio2015InstallerProjects "VS2015 Installer Plugin Download")
- [Inno Setup 5](http://www.jrsoftware.org/isdl.php "Inno Setup installer creation tool")
ClamAV is supported for Windows 7+, but Windows 10 is recommended.
Visual Studio 2017 should work fine, but we currently work with Visual Studio 2015.
Getting the code
----------------
## Getting the code
ClamAV source code is freely available via github at https://github.com/vrtadmin/clamav-devel
ClamAV source code is freely available via github at https://github.com/Cisco-Talos/clamav-devel
To obtain a copy of the code, open a Git Bash terminal. Navigate to a directory where you want to store the code, eg "workspace" and clone the repository using the https web URL. For example:
1. cd
2. mkdir workspace
3. cd workspace
4. git clone https://github.com/vrtadmin/clamav-devel.git
1. `cd`
2. `mkdir workspace`
3. `cd workspace`
4. `git clone https://github.com/vrtadmin/clamav-devel.git`
Step into the win32 directory and open an Explorer window.
1. cd clamav-devel
2. cd win32
3. explorer .
1. `cd clamav-devel`
2. `cd win32`
3. `explorer .`
ClamAV for Windows uses the same code base as Unix/Linux based operating systems. However, Windows specific files for building ClamAV are found under the win32 directory.
Code configuration
------------------
## Code configuration
After downloading the source code, minimal configuration is required:
1. Run the win32/configure.bat script *from within the git shell*. Skip this step if you are building from an official release tarball.
1. Run the `win32/configure.bat` script *from within the git shell*. Skip this step if you are building from an official release tarball.
2. Obtain OpenSSL V1.1.0 or higher. You will need the headers, libs, and bins for the platform (Win32 or x64) that you're targeting.
3. Place the headers and binaries in a directory with the following structure:
├───Win32
│ ├───include
│ │ └───openssl <-- openssl headers in here
│ └───lib <-- .DLLs and .LIBs in here
└───x64
├───include
│ └───openssl <-- openssl headers in here
└───lib <-- .DLLs and .LIBs in here
4. Add an environment variable with the name CLAM_DEPENDENCIES and set the value to the path of the above directory.
Compilation
-----------
Open win32/ClamAV.sln in Visual Studio and build all.
The output directory for the binaries is either /win32/(Win32|x64)/Debug or
/win32/(Win32|x64)/Release depending on the configuration you pick.
Note: at the time of writing Batch Build is broken in Visual Studio. Use MSBuild instead.
Special notes
------
The ClamAV tools in win32 are the same as in unix, so refer to their respective
├───vcredist
│ ├───vc_redist.x64.exe <-- Visual Studio 2015 Redistributables installer (x64)
│ └───vc_redist.x86.exe <-- Visual Studio 2015 Redistributables installer (x86)
├───Win32
│ ├───include
│ │ └───openssl <-- openssl headers in here
│ └───lib <-- .DLLs and .LIBs in here
└───x64
├───include
│ └───openssl <-- openssl headers in here
└───lib <-- .DLLs and .LIBs in here
4. Add an environment variable with the name `CLAM_DEPENDENCIES` and set the value to the path of the above directory.
5. At present, the Inno Setup script `ClamAV-Installer.iss` requires this directory to be located here in order to build the installer:
```
C:\clam_dependencies
```
## Compilation
Open `win32/ClamAV.sln` in Visual Studio and build all.
The output directory for the binaries is either `/win32/(Win32|x64)/Debug` or
`/win32/(Win32|x64)/Release` depending on the configuration you pick.
Alternatively, you can build from the command line (aka `cmd.exe`) by following these steps:
x64:
```
call "C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\vcvarsall.bat" x64
setx CLAM_DEPENDENCIES "C:\\clam_dependencies"
call configure.bat
devenv ClamAV.sln /Clean "Release|x64" /useenv /ProjectConfig "Release|x64"
devenv ClamAV.sln /Rebuild "Release|x64" /useenv /ProjectConfig "Release|x64"'''
```
x86:
```
reg Query "HKLM\\Hardware\\Description\\System\\CentralProcessor\\0" | find /i "x86" > NUL && set OS=32BIT || set OS=64BIT
if %OS%==32BIT call "C:\\Program Files\\Microsoft Visual Studio 14.0\\VC\\vcvarsall.bat" x86
if %OS%==64BIT call "C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\vcvarsall.bat" x86
setx CLAM_DEPENDENCIES "C:\\clam_dependencies"
call configure.bat
devenv ClamAV.sln /Clean "Release|Win32" /useenv /ProjectConfig "Release|Win32"
devenv ClamAV.sln /Rebuild "Release|Win32" /useenv /ProjectConfig "Release|Win32"'''
```
To build the installer:
1. Build ClamAV for both `x64` **and** `Win32`. The installer requires both versions to be available.
2. Open `win32\ClamAV-Installer.iss` using Inno Setup 5.
3. Run "Compile".
Alternatively, you can invoke the Inno Setup command line installer from cmd.exe:
```
"C:\Program Files (x86)\Inno Setup 5\ISCC.exe" .\ClamAV-Installer.iss
```
After compilation, the installer will be located at `win32\ClamAV-<version>.exe`
## Special notes
The ClamAV tools in `win32` are the same as in unix, so refer to their respective
manpage for general usage.
The major differences are listed below:
- Config files path search order:
1. The content of the registry key
1. The content of the registry key:
"HKEY_LOCAL_MACHINE/Software/ClamAV/ConfDir"
2. The directory where libclamav.dll is located
2. The directory where libclamav.dll is located:
"C:\Program Files\ClamAV"
3. "C:\ClamAV"
- Database files path search order:
1. The content of the registry key
1. The content of the registry key:
"HKEY_LOCAL_MACHINE/Software/ClamAV/DataDir"
2. The directory "database" inside the directory where libclamav.dll is
located
2. The directory "database" inside the directory where libclamav.dll is located:
"C:\Program Files\ClamAV\database"
3. "C:\ClamAV\db"
- Globbing
@ -118,12 +163,12 @@ Please always use the backslash as the path separator.
SMB Network shares and UNC paths are supported.
- Debug builds
Malloc in debug (as opposed to release) mode fails after allocating some 90k
Malloc in Debug (as opposed to release) mode fails after allocating some 90k
chunks; such builds won't be able to handle large databases.
Just do yourself a favour and always build in release mode.
Just do yourself a favour and always build in Release mode.
Special thanks
--------------
Special thanks to Gianluigi Tiesi and Mark Pizzolato for their valuable help in
coding and testing.
coding and testing.

@ -1,2 +0,0 @@
Debug
Release

File diff suppressed because it is too large Load Diff

@ -1,2 +0,0 @@
Debug
Release

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 151 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Loading…
Cancel
Save