Commit eab0c89c5def4770d3637b53c9c8d2373cae65dc

Authored by oldfaber
Committed by Stéphane Raimbault
1 parent f47628a0

Fixes the DLL type and flags and builds the debug version of the

DLL if required.
src/win32/modbus.rc
... ... @@ -9,8 +9,13 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
9 9 VS_VERSION_INFO VERSIONINFO
10 10 FILEVERSION LIBMODBUS_VERSION_MAJOR, LIBMODBUS_VERSION_MINOR, LIBMODBUS_VERSION_MICRO, 2
11 11 PRODUCTVERSION LIBMODBUS_VERSION_MAJOR, LIBMODBUS_VERSION_MINOR, LIBMODBUS_VERSION_MICRO, 2
  12 +#if defined(DEBUG) || defined(W32DEBUG)
  13 + FILEFLAGS 0x1L
  14 +#else
  15 + FILEFLAGS 0x0L
  16 +#endif
12 17 FILEOS VOS_NT_WINDOWS32
13   -FILETYPE VFT_APP
  18 +FILETYPE VFT_DLL
14 19 {
15 20 BLOCK "StringFileInfo"
16 21 {
... ... @@ -18,28 +23,23 @@ FILETYPE VFT_APP
18 23 {
19 24 VALUE "CompanyName", "\x0"
20 25 VALUE "FileDescription", "libmodbus DLL\x0"
21   -#if defined(DEBUG) || defined(W32DEBUG)
22   -# define XDBG " (debug)"
23   -#else
24   -# define XDBG ""
25   -#endif
26 26 #if defined(__MINGW32__) && !defined(__MINGW64__)
27   - VALUE "FileVersion", VERSTRING " (gcc)" XDBG "\x0"
  27 + VALUE "FileVersion", VERSTRING " (gcc)"
28 28 #endif
29 29 #if defined(__MINGW64__)
30   - VALUE "FileVersion", VERSTRING " (gcc64)" XDBG "\x0"
  30 + VALUE "FileVersion", VERSTRING " (gcc64)"
31 31 #endif
32 32 #if defined(_MSC_VER)
33 33 # if defined(MSC64)
34   - VALUE "FileVersion", VERSTRING " (cl64)" XDBG "\x0"
  34 + VALUE "FileVersion", VERSTRING " (cl64)"
35 35 # else
36   - VALUE "FileVersion", VERSTRING " (cl)" XDBG "\x0"
  36 + VALUE "FileVersion", VERSTRING " (cl)"
37 37 # endif
38 38 #endif
39   - VALUE "InternalName", "modbus.dll\x0"
40   - VALUE "LegalCopyright", "© See libmodbus.org\x0"
41   - VALUE "OriginalFilename", "modbus.dll\x0"
42   - VALUE "ProductName", "libmodbus\x0"
  39 + VALUE "InternalName", "modbus.dll"
  40 + VALUE "LegalCopyright", "© See libmodbus.org"
  41 + VALUE "OriginalFilename", "modbus.dll"
  42 + VALUE "ProductName", "libmodbus"
43 43 }
44 44 }
45 45 BLOCK "VarFileInfo"
... ...
src/win32/modbus.vcproj
... ... @@ -53,7 +53,7 @@
53 53 EnableIntrinsicFunctions="true"
54 54 WholeProgramOptimization="false"
55 55 AdditionalIncludeDirectories="..\src;..;.;D:/include/msvc_std"
56   - PreprocessorDefinitions="HAVE_CONFIG_H;DLLBUILD;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NONSTDC_NO_DEPRECATE=1"
  56 + PreprocessorDefinitions="W32DEBUG;HAVE_CONFIG_H;DLLBUILD;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NONSTDC_NO_DEPRECATE=1"
57 57 MinimalRebuild="false"
58 58 ExceptionHandling="0"
59 59 BasicRuntimeChecks="2"
... ...