diff options
Diffstat (limited to 'w32/VS2013')
-rw-r--r-- | w32/VS2013/gen_dll_res.ps1 | 38 | ||||
-rw-r--r-- | w32/VS2013/libmicrohttpd.vcxproj | 45 | ||||
-rw-r--r-- | w32/VS2013/libmicrohttpd.vcxproj.filters | 14 | ||||
-rw-r--r-- | w32/VS2013/microhttpd_dll_res_vc.rc.in | 42 |
4 files changed, 136 insertions, 3 deletions
diff --git a/w32/VS2013/gen_dll_res.ps1 b/w32/VS2013/gen_dll_res.ps1 new file mode 100644 index 00000000..e51d1034 --- /dev/null +++ b/w32/VS2013/gen_dll_res.ps1 | |||
@@ -0,0 +1,38 @@ | |||
1 | param ([string]$BasePath = ".\") | ||
2 | |||
3 | $Host.SetShouldExit(111) # Set non-zero return code until task successfully finished | ||
4 | $ErrorActionPreference = "Stop" # Stop on any error | ||
5 | |||
6 | Remove-Variable MHD_ver,MHD_ver_major,MHD_ver_minor,MHD_ver_patchlev -ErrorAction:SilentlyContinue | ||
7 | |||
8 | Write-Output "Processing: ${BasePath}..\..\configure.ac" | ||
9 | foreach($line in Get-Content "${BasePath}..\..\configure.ac") | ||
10 | { | ||
11 | if ($line -match '^AC_INIT\(\[libmicrohttpd\],\[((\d+).(\d+).(\d+))\]') | ||
12 | { | ||
13 | [string]$MHD_ver = $Matches[1].ToString() | ||
14 | [string]$MHD_ver_major = $Matches[2].ToString() | ||
15 | [string]$MHD_ver_minor = $Matches[3].ToString() | ||
16 | [string]$MHD_ver_patchlev = $Matches[4].ToString() | ||
17 | break | ||
18 | } | ||
19 | } | ||
20 | if ("$MHD_ver" -eq "" -or "$MHD_ver_major" -eq "" -or "$MHD_ver_minor" -eq "" -or "$MHD_ver_patchlev" -eq "") | ||
21 | { | ||
22 | Throw "Can't find MHD version in ${BasePath}..\..\configure.ac" | ||
23 | } | ||
24 | |||
25 | Write-Output "Detected MHD version: $MHD_ver" | ||
26 | |||
27 | Write-Output "Generating ${BasePath}microhttpd_dll_res_vc.rc" | ||
28 | Get-Content "${BasePath}microhttpd_dll_res_vc.rc.in" | ForEach-Object { | ||
29 | $_ -replace '@PACKAGE_VERSION_MAJOR@',"$MHD_ver_major" ` | ||
30 | -replace '@PACKAGE_VERSION_MINOR@', "$MHD_ver_minor" ` | ||
31 | -replace '@PACKAGE_VERSION_SUBMINOR@', "$MHD_ver_patchlev" ` | ||
32 | -replace '@PACKAGE_VERSION@', "$MHD_ver" | ||
33 | } | Out-File -FilePath "${BasePath}microhttpd_dll_res_vc.rc" -Force | ||
34 | |||
35 | $Host.SetShouldExit(0) # Reset return code | ||
36 | |||
37 | Write-Output "${BasePath}microhttpd_dll_res_vc.rc was generated " | ||
38 | exit 0 # Exit with success code | ||
diff --git a/w32/VS2013/libmicrohttpd.vcxproj b/w32/VS2013/libmicrohttpd.vcxproj index 1b4f113b..d21f23ea 100644 --- a/w32/VS2013/libmicrohttpd.vcxproj +++ b/w32/VS2013/libmicrohttpd.vcxproj | |||
@@ -65,6 +65,31 @@ | |||
65 | <ClInclude Include="..\..\src\microhttpd\tsearch.h" /> | 65 | <ClInclude Include="..\..\src\microhttpd\tsearch.h" /> |
66 | <ClInclude Include="MHD_config.h" /> | 66 | <ClInclude Include="MHD_config.h" /> |
67 | </ItemGroup> | 67 | </ItemGroup> |
68 | <ItemGroup> | ||
69 | <ResourceCompile Include="microhttpd_dll_res_vc.rc"> | ||
70 | <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release-static|Win32'">true</ExcludedFromBuild> | ||
71 | <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug-static|Win32'">true</ExcludedFromBuild> | ||
72 | <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release-static|x64'">true</ExcludedFromBuild> | ||
73 | <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug-static|x64'">true</ExcludedFromBuild> | ||
74 | </ResourceCompile> | ||
75 | </ItemGroup> | ||
76 | <ItemGroup> | ||
77 | <CustomBuild Include="microhttpd_dll_res_vc.rc.in"> | ||
78 | <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release-static|Win32'">true</ExcludedFromBuild> | ||
79 | <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug-static|Win32'">true</ExcludedFromBuild> | ||
80 | <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release-static|x64'">true</ExcludedFromBuild> | ||
81 | <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug-static|x64'">true</ExcludedFromBuild> | ||
82 | <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug-dll|Win32'">false</ExcludedFromBuild> | ||
83 | <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug-dll|x64'">false</ExcludedFromBuild> | ||
84 | <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release-dll|Win32'">false</ExcludedFromBuild> | ||
85 | <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release-dll|x64'">false</ExcludedFromBuild> | ||
86 | <FileType>Document</FileType> | ||
87 | <Command>PowerShell.exe -Version 3.0 -NonInteractive -NoProfile -ExecutionPolicy Bypass -File "$(SolutionDir)gen_dll_res.ps1" -BasePath $(SolutionDir)</Command> | ||
88 | <Message>Generating .dll description resource</Message> | ||
89 | <Outputs>$(SolutionDir)microhttpd_dll_res_vc.rc</Outputs> | ||
90 | <AdditionalInputs>$(SolutionDir)gen_dll_res.ps1;$(SolutionDir).\..\..\configure.ac</AdditionalInputs> | ||
91 | </CustomBuild> | ||
92 | </ItemGroup> | ||
68 | <PropertyGroup Label="Globals"> | 93 | <PropertyGroup Label="Globals"> |
69 | <ProjectGuid>{9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}</ProjectGuid> | 94 | <ProjectGuid>{9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}</ProjectGuid> |
70 | <Keyword>Win32Proj</Keyword> | 95 | <Keyword>Win32Proj</Keyword> |
@@ -156,6 +181,7 @@ | |||
156 | <OutDir>$(SolutionDir)\Output\</OutDir> | 181 | <OutDir>$(SolutionDir)\Output\</OutDir> |
157 | <IntDir>$(SolutionDir)$(ProjectName)\$(Configuration)\</IntDir> | 182 | <IntDir>$(SolutionDir)$(ProjectName)\$(Configuration)\</IntDir> |
158 | <TargetName>$(ProjectName)_d</TargetName> | 183 | <TargetName>$(ProjectName)_d</TargetName> |
184 | <CustomBuildBeforeTargets>ResourceCompile</CustomBuildBeforeTargets> | ||
159 | <CustomBuildAfterTargets>BuildLink</CustomBuildAfterTargets> | 185 | <CustomBuildAfterTargets>BuildLink</CustomBuildAfterTargets> |
160 | </PropertyGroup> | 186 | </PropertyGroup> |
161 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug-dll|Win32'"> | 187 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug-dll|Win32'"> |
@@ -163,7 +189,7 @@ | |||
163 | <OutDir>$(SolutionDir)\Output\</OutDir> | 189 | <OutDir>$(SolutionDir)\Output\</OutDir> |
164 | <IntDir>$(SolutionDir)$(ProjectName)\$(Configuration)\</IntDir> | 190 | <IntDir>$(SolutionDir)$(ProjectName)\$(Configuration)\</IntDir> |
165 | <TargetName>$(ProjectName)-dll_d</TargetName> | 191 | <TargetName>$(ProjectName)-dll_d</TargetName> |
166 | <CustomBuildAfterTargets>BuildLink</CustomBuildAfterTargets> | 192 | <CustomBuildBeforeTargets>ResourceCompile</CustomBuildBeforeTargets> |
167 | </PropertyGroup> | 193 | </PropertyGroup> |
168 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug-static|x64'"> | 194 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug-static|x64'"> |
169 | <TargetName>$(ProjectName)_d</TargetName> | 195 | <TargetName>$(ProjectName)_d</TargetName> |
@@ -174,10 +200,10 @@ | |||
174 | </PropertyGroup> | 200 | </PropertyGroup> |
175 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug-dll|x64'"> | 201 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug-dll|x64'"> |
176 | <TargetName>$(ProjectName)-dll_d</TargetName> | 202 | <TargetName>$(ProjectName)-dll_d</TargetName> |
177 | <CustomBuildAfterTargets>BuildLink</CustomBuildAfterTargets> | ||
178 | <IncludePath>$(SolutionDir)..\..\src\include;$(SolutionDir);$(IncludePath)</IncludePath> | 203 | <IncludePath>$(SolutionDir)..\..\src\include;$(SolutionDir);$(IncludePath)</IncludePath> |
179 | <IntDir>$(SolutionDir)$(ProjectName)\$(Configuration)\$(Platform)\</IntDir> | 204 | <IntDir>$(SolutionDir)$(ProjectName)\$(Configuration)\$(Platform)\</IntDir> |
180 | <OutDir>$(SolutionDir)\Output\$(Platform)\</OutDir> | 205 | <OutDir>$(SolutionDir)\Output\$(Platform)\</OutDir> |
206 | <CustomBuildBeforeTargets>ResourceCompile</CustomBuildBeforeTargets> | ||
181 | </PropertyGroup> | 207 | </PropertyGroup> |
182 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release-static|Win32'"> | 208 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release-static|Win32'"> |
183 | <OutDir>$(SolutionDir)\Output\</OutDir> | 209 | <OutDir>$(SolutionDir)\Output\</OutDir> |
@@ -189,9 +215,9 @@ | |||
189 | <OutDir>$(SolutionDir)\Output\</OutDir> | 215 | <OutDir>$(SolutionDir)\Output\</OutDir> |
190 | <IntDir>$(SolutionDir)$(ProjectName)\$(Configuration)\</IntDir> | 216 | <IntDir>$(SolutionDir)$(ProjectName)\$(Configuration)\</IntDir> |
191 | <IncludePath>$(SolutionDir)..\..\src\include;$(SolutionDir);$(IncludePath)</IncludePath> | 217 | <IncludePath>$(SolutionDir)..\..\src\include;$(SolutionDir);$(IncludePath)</IncludePath> |
192 | <CustomBuildAfterTargets>BuildLink</CustomBuildAfterTargets> | ||
193 | <PostBuildEventUseInBuild>false</PostBuildEventUseInBuild> | 218 | <PostBuildEventUseInBuild>false</PostBuildEventUseInBuild> |
194 | <TargetName>$(ProjectName)-dll</TargetName> | 219 | <TargetName>$(ProjectName)-dll</TargetName> |
220 | <CustomBuildBeforeTargets>ResourceCompile</CustomBuildBeforeTargets> | ||
195 | </PropertyGroup> | 221 | </PropertyGroup> |
196 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release-static|x64'"> | 222 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release-static|x64'"> |
197 | <IncludePath>$(SolutionDir)..\..\src\include;$(SolutionDir);$(IncludePath)</IncludePath> | 223 | <IncludePath>$(SolutionDir)..\..\src\include;$(SolutionDir);$(IncludePath)</IncludePath> |
@@ -206,6 +232,7 @@ | |||
206 | <IntDir>$(SolutionDir)$(ProjectName)\$(Configuration)\$(Platform)\</IntDir> | 232 | <IntDir>$(SolutionDir)$(ProjectName)\$(Configuration)\$(Platform)\</IntDir> |
207 | <PostBuildEventUseInBuild>false</PostBuildEventUseInBuild> | 233 | <PostBuildEventUseInBuild>false</PostBuildEventUseInBuild> |
208 | <TargetName>$(ProjectName)-dll</TargetName> | 234 | <TargetName>$(ProjectName)-dll</TargetName> |
235 | <CustomBuildBeforeTargets>ResourceCompile</CustomBuildBeforeTargets> | ||
209 | </PropertyGroup> | 236 | </PropertyGroup> |
210 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug-static|Win32'"> | 237 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug-static|Win32'"> |
211 | <ClCompile> | 238 | <ClCompile> |
@@ -263,6 +290,9 @@ | |||
263 | <Outputs>$(OutputPath)microhttpd.h;%(Outputs)</Outputs> | 290 | <Outputs>$(OutputPath)microhttpd.h;%(Outputs)</Outputs> |
264 | <Inputs>$(SolutionDir)\..\..\src\include\microhttpd.h</Inputs> | 291 | <Inputs>$(SolutionDir)\..\..\src\include\microhttpd.h</Inputs> |
265 | </CustomBuildStep> | 292 | </CustomBuildStep> |
293 | <ResourceCompile> | ||
294 | <PreprocessorDefinitions>_DEBUG;_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions> | ||
295 | </ResourceCompile> | ||
266 | </ItemDefinitionGroup> | 296 | </ItemDefinitionGroup> |
267 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug-static|x64'"> | 297 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug-static|x64'"> |
268 | <ClCompile> | 298 | <ClCompile> |
@@ -320,6 +350,9 @@ | |||
320 | <Outputs>$(OutputPath)microhttpd.h;%(Outputs)</Outputs> | 350 | <Outputs>$(OutputPath)microhttpd.h;%(Outputs)</Outputs> |
321 | <Inputs>$(SolutionDir)\..\..\src\include\microhttpd.h</Inputs> | 351 | <Inputs>$(SolutionDir)\..\..\src\include\microhttpd.h</Inputs> |
322 | </CustomBuildStep> | 352 | </CustomBuildStep> |
353 | <ResourceCompile> | ||
354 | <PreprocessorDefinitions>_DEBUG;_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions> | ||
355 | </ResourceCompile> | ||
323 | </ItemDefinitionGroup> | 356 | </ItemDefinitionGroup> |
324 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release-static|Win32'"> | 357 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release-static|Win32'"> |
325 | <ClCompile> | 358 | <ClCompile> |
@@ -401,6 +434,9 @@ | |||
401 | <Outputs>$(OutputPath)microhttpd.h;%(Outputs)</Outputs> | 434 | <Outputs>$(OutputPath)microhttpd.h;%(Outputs)</Outputs> |
402 | <Inputs>$(SolutionDir)\..\..\src\include\microhttpd.h</Inputs> | 435 | <Inputs>$(SolutionDir)\..\..\src\include\microhttpd.h</Inputs> |
403 | </CustomBuildStep> | 436 | </CustomBuildStep> |
437 | <ResourceCompile> | ||
438 | <PreprocessorDefinitions>NDEBUG;_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions> | ||
439 | </ResourceCompile> | ||
404 | </ItemDefinitionGroup> | 440 | </ItemDefinitionGroup> |
405 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release-static|x64'"> | 441 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release-static|x64'"> |
406 | <ClCompile> | 442 | <ClCompile> |
@@ -482,6 +518,9 @@ | |||
482 | <Outputs>$(OutputPath)microhttpd.h;%(Outputs)</Outputs> | 518 | <Outputs>$(OutputPath)microhttpd.h;%(Outputs)</Outputs> |
483 | <Inputs>$(SolutionDir)\..\..\src\include\microhttpd.h</Inputs> | 519 | <Inputs>$(SolutionDir)\..\..\src\include\microhttpd.h</Inputs> |
484 | </CustomBuildStep> | 520 | </CustomBuildStep> |
521 | <ResourceCompile> | ||
522 | <PreprocessorDefinitions>NDEBUG;_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions> | ||
523 | </ResourceCompile> | ||
485 | </ItemDefinitionGroup> | 524 | </ItemDefinitionGroup> |
486 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> | 525 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> |
487 | <ImportGroup Label="ExtensionTargets"> | 526 | <ImportGroup Label="ExtensionTargets"> |
diff --git a/w32/VS2013/libmicrohttpd.vcxproj.filters b/w32/VS2013/libmicrohttpd.vcxproj.filters index ba0ccd9b..cbe63801 100644 --- a/w32/VS2013/libmicrohttpd.vcxproj.filters +++ b/w32/VS2013/libmicrohttpd.vcxproj.filters | |||
@@ -16,6 +16,10 @@ | |||
16 | <Filter Include="Source Files\platform_interface"> | 16 | <Filter Include="Source Files\platform_interface"> |
17 | <UniqueIdentifier>{af799bf7-9787-4134-8e56-9e5aae50c7e3}</UniqueIdentifier> | 17 | <UniqueIdentifier>{af799bf7-9787-4134-8e56-9e5aae50c7e3}</UniqueIdentifier> |
18 | </Filter> | 18 | </Filter> |
19 | <Filter Include="Template Files"> | ||
20 | <UniqueIdentifier>{df5ad836-e372-437b-a0e3-299d3675d6b4}</UniqueIdentifier> | ||
21 | <Extensions>in</Extensions> | ||
22 | </Filter> | ||
19 | </ItemGroup> | 23 | </ItemGroup> |
20 | <ItemGroup> | 24 | <ItemGroup> |
21 | <ClCompile Include="..\..\src\microhttpd\base64.c"> | 25 | <ClCompile Include="..\..\src\microhttpd\base64.c"> |
@@ -102,4 +106,14 @@ | |||
102 | <Filter>Header Files</Filter> | 106 | <Filter>Header Files</Filter> |
103 | </ClInclude> | 107 | </ClInclude> |
104 | </ItemGroup> | 108 | </ItemGroup> |
109 | <ItemGroup> | ||
110 | <ResourceCompile Include="microhttpd_dll_res_vc.rc"> | ||
111 | <Filter>Resource Files</Filter> | ||
112 | </ResourceCompile> | ||
113 | </ItemGroup> | ||
114 | <ItemGroup> | ||
115 | <CustomBuild Include="microhttpd_dll_res_vc.rc.in"> | ||
116 | <Filter>Template Files</Filter> | ||
117 | </CustomBuild> | ||
118 | </ItemGroup> | ||
105 | </Project> \ No newline at end of file | 119 | </Project> \ No newline at end of file |
diff --git a/w32/VS2013/microhttpd_dll_res_vc.rc.in b/w32/VS2013/microhttpd_dll_res_vc.rc.in new file mode 100644 index 00000000..19eb37cb --- /dev/null +++ b/w32/VS2013/microhttpd_dll_res_vc.rc.in | |||
@@ -0,0 +1,42 @@ | |||
1 | /* W32 resources for .dll */ | ||
2 | |||
3 | #include <winresrc.h> | ||
4 | |||
5 | LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US | ||
6 | VS_VERSION_INFO VERSIONINFO | ||
7 | FILEVERSION @PACKAGE_VERSION_MAJOR@,@PACKAGE_VERSION_MINOR@,@PACKAGE_VERSION_SUBMINOR@,0 | ||
8 | PRODUCTVERSION @PACKAGE_VERSION_MAJOR@,@PACKAGE_VERSION_MINOR@,@PACKAGE_VERSION_SUBMINOR@,0 | ||
9 | FILEFLAGSMASK VS_FFI_FILEFLAGSMASK | ||
10 | #if defined(_DEBUG) | ||
11 | FILEFLAGS VS_FF_DEBUG | ||
12 | #else | ||
13 | FILEFLAGS 0 | ||
14 | #endif | ||
15 | FILEOS VOS_NT_WINDOWS32 | ||
16 | FILETYPE VFT_DLL | ||
17 | FILESUBTYPE VFT2_UNKNOWN | ||
18 | BEGIN | ||
19 | BLOCK "StringFileInfo" | ||
20 | BEGIN | ||
21 | BLOCK "04090000" /* Lang = US English, Charset = ASCII */ | ||
22 | BEGIN | ||
23 | VALUE "ProductName", "GNU libmicrohttpd\0" | ||
24 | VALUE "ProductVersion", "@PACKAGE_VERSION@\0" | ||
25 | VALUE "FileVersion", "@PACKAGE_VERSION@\0" | ||
26 | VALUE "FileDescription", "GNU libmicrohttpd dll for Windows (VC build)\0" | ||
27 | VALUE "InternalName", "libmicrohttpd\0" | ||
28 | #if defined(_DEBUG) | ||
29 | VALUE "OriginalFilename", "libmicrohttpd_d.dll\0" | ||
30 | #else | ||
31 | VALUE "OriginalFilename", "libmicrohttpd.dll\0" | ||
32 | #endif | ||
33 | VALUE "CompanyName", "Free Software Foundation\0" | ||
34 | VALUE "LegalCopyright", "Copyright (C) 2007-2015 Christian Grothoff and project contributors\0" | ||
35 | VALUE "Comments", "http://www.gnu.org/software/libmicrohttpd/\0" | ||
36 | END | ||
37 | END | ||
38 | BLOCK "VarFileInfo" | ||
39 | BEGIN | ||
40 | VALUE "Translation", 0x0409, 0 /* US English, ASCII */ | ||
41 | END | ||
42 | END | ||