Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Update solution to support x64 and DLL #8

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,6 @@ ssl/
.deps/
*.opendb
*.db
/Projects/AppInsights_Win32/package/package.ps1
.vs/
.vs/application_insights/v14/.suo
Binary file not shown.
7 changes: 3 additions & 4 deletions Projects/AppInsights_Win32/application_insights.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25123.0
# Visual Studio 15
VisualStudioVersion = 15.0.26228.10
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "core", "core\core.vcxproj", "{F2377726-D69D-4A26-A3AF-969FD0399427}"
EndProject
Expand All @@ -14,6 +14,7 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "package", "package", "{D08D10AB-DE85-4A6E-8EF7-F61AD2C98387}"
ProjectSection(SolutionItems) = preProject
package\AppInsights_Win32.autopkg = package\AppInsights_Win32.autopkg
package\AppInsights_Win32.autopkg.source = package\AppInsights_Win32.autopkg.source
package\build.bat = package\build.bat
package\package.ps1 = package\package.ps1
package\README.md = package\README.md
Expand Down Expand Up @@ -43,12 +44,10 @@ Global
{D9D00C85-E6BA-496E-AC7E-C3744AD38194}.Debug|Win32.ActiveCfg = Debug|Win32
{D9D00C85-E6BA-496E-AC7E-C3744AD38194}.Debug|Win32.Build.0 = Debug|Win32
{D9D00C85-E6BA-496E-AC7E-C3744AD38194}.Debug|x64.ActiveCfg = Debug|x64
{D9D00C85-E6BA-496E-AC7E-C3744AD38194}.Debug|x64.Build.0 = Debug|x64
{D9D00C85-E6BA-496E-AC7E-C3744AD38194}.Release|ARM.ActiveCfg = Release|Win32
{D9D00C85-E6BA-496E-AC7E-C3744AD38194}.Release|Win32.ActiveCfg = Release|Win32
{D9D00C85-E6BA-496E-AC7E-C3744AD38194}.Release|Win32.Build.0 = Release|Win32
{D9D00C85-E6BA-496E-AC7E-C3744AD38194}.Release|x64.ActiveCfg = Release|x64
{D9D00C85-E6BA-496E-AC7E-C3744AD38194}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
24 changes: 24 additions & 0 deletions Projects/AppInsights_Win32/core/appinsights_dll.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@

#if defined(WINAPI_FAMILY_PARTITION) // it's SOME kind of Windows
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) // Win32, no store, no phone

#include "../../../src/core/common/Common.h"


BOOL APIENTRY DllMain( HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved )
{
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
break;
case DLL_THREAD_ATTACH:
break;
case DLL_THREAD_DETACH:
break;
case DLL_PROCESS_DETACH:
break;
}
return TRUE;
}
#endif
#endif
53 changes: 37 additions & 16 deletions Projects/AppInsights_Win32/core/core.vcxproj
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
Expand All @@ -23,31 +23,32 @@
<Keyword>Win32Proj</Keyword>
<RootNamespace>core</RootNamespace>
<ProjectName>core</ProjectName>
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v141</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v141</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v141</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v141</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
Expand Down Expand Up @@ -106,23 +107,33 @@
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>CURL_STATICLIB;CPP_LIB_DEBUG=1;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>CURL_STATICLIB;CPP_LIB_DEBUG=1;WIN64;_DEBUG;_WINDOWS;_USRDLL;TELEMETRY_CLIENT_DLL_EXPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<AdditionalIncludeDirectories>$(ProjectDir)\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<PrecompiledHeaderFile />
<PrecompiledHeaderOutputFile />
<BrowseInformation>true</BrowseInformation>
<LanguageStandard>stdcpplatest</LanguageStandard>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<GenerateMapFile>true</GenerateMapFile>
<MapExports>true</MapExports>
</Link>
<Lib>
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
</Lib>
<PreBuildEvent />
<ProjectReference>
<LinkLibraryDependencies>true</LinkLibraryDependencies>
</ProjectReference>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
Expand Down Expand Up @@ -151,26 +162,35 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>CPP_LIB_DEBUG;CURL_STATICLIB;WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>CURL_STATICLIB;NDEBUG;WIN64;_WINDOWS;_USRDLL;TELEMETRY_CLIENT_DLL_EXPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<AdditionalIncludeDirectories>$(ProjectDir)\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<PrecompiledHeaderFile />
<PrecompiledHeaderOutputFile />
<ControlFlowGuard>Guard</ControlFlowGuard>
<LanguageStandard>stdcpplatest</LanguageStandard>
<BrowseInformation>true</BrowseInformation>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<GenerateDebugInformation>false</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<ProgramDatabaseFile />
</Link>
<Lib>
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalOptions>/NODEFAULTLIB:library %(AdditionalOptions)</AdditionalOptions>
</Lib>
<ProjectReference>
<LinkLibraryDependencies>true</LinkLibraryDependencies>
</ProjectReference>
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="..\..\..\src\core\BaseTelemetryContext.h" />
Expand Down Expand Up @@ -267,6 +287,7 @@
<ClCompile Include="..\..\..\src\core\TelemetryContextWin32.cpp" />
<ClCompile Include="..\..\..\src\core\TelemetryContextWinPhone.cpp" />
<ClCompile Include="..\..\..\src\core\TelemetryContextWinStore.cpp" />
<ClCompile Include="appinsights_dll.cpp" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
Expand Down
1 change: 1 addition & 0 deletions Projects/AppInsights_Win32/core/core.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@
<ClCompile Include="..\..\..\src\core\TelemetryContextWin32.cpp" />
<ClCompile Include="..\..\..\src\core\TelemetryContextWinPhone.cpp" />
<ClCompile Include="..\..\..\src\core\TelemetryContextWinStore.cpp" />
<ClCompile Include="appinsights_dll.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\..\src\core\channel\utils\HttpHeaderField.h">
Expand Down
86 changes: 62 additions & 24 deletions Projects/AppInsights_Win32/package/AppInsights_Win32.autopkg
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ configurations
Toolset
{
key : "PlatformToolset";
choices : { v140, v120, v110 };
choices : { v140, v141 };
};
};

Expand All @@ -12,7 +12,7 @@ nuget
nuspec
{
id : AppInsights_Win32;
version : 1.0.0-beta-1;
version : 1.0.0-beta-24;
title : Microsoft Application Insights Library for C++;
authors: { Microsoft };
owners: { Microsoft };
Expand All @@ -27,7 +27,7 @@ nuget
releaseNotes: "This package includes both the release and the debug versions of the library to allow for debugging. The PDB files are also included.";
projectUrl: "https://azure.microsoft.com/en-us/documentation/articles/app-insights-get-started/";
copyright: Copyright (c) Microsoft. All rights reserved;
tags: { Analytics, ApplicationInsights, Telemetry, AppInsights, native };
tags: { Analytics, ApplicationInsights, Telemetry, AppInsights, native, cpp };
};

dependencies
Expand All @@ -39,42 +39,80 @@ nuget

files
{
// The expression preserves and recreates the subdirectories instead of flattening them.
include:
{
..\..\..\src\core\*.h;
..\..\..\src\core\channel\*.h;
..\..\..\src\core\channel\utils\*.h;
..\..\..\src\core\common\*.h;
..\..\..\src\core\contracts\*.h;
"..\..\..\src\**\*.h";
};

[x64,v140,v120,release,static]

[x64,v140,Release]
{
lib: {
..\x64\Release\core.lib;
}
symbols: {
}
bin: {
..\x64\Release\core.dll;
}
};
[x64,v141,Release]
{
lib:
{
lib: {
..\x64\Release\core.lib;
}
symbols:
{
symbols: {
..\x64\Release\core.pdb;
}
bin:
{
bin: {
..\x64\Release\core.dll;
}
};
[x64,v141,Release,static]
{
lib: {
..\x64\Release\core.lib;
}
symbols: {
..\x64\Release\core.pdb;
}
};

[x64,v140,v120,debug,static]
// Debug Versions
[x64,v140,Debug]
{
lib: {
..\x64\Debug\core.lib;
}
symbols: {
..\x64\Debug\core.pdb;
}
bin: {
..\x64\Debug\core.dll;
}
};
[x64,v141,Debug]
{
lib: {
..\x64\Debug\core.lib;
}
symbols: {
..\x64\Debug\core.pdb;
}
bin: {
..\x64\Debug\core.dll;
}
};
[x64,v141,debug,static]
{
lib:
{
lib: {
..\x64\Debug\core.lib;
}
symbols:
{
symbols: {
..\x64\Debug\core.pdb;
}
bin:
{
bin: {
}
};
};
}
}
Loading