mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-04-25 08:06:30 +00:00
[idd] all: generate versioning information
This commit is contained in:
parent
a2a771f94e
commit
2084a9fee3
2
.gitignore
vendored
2
.gitignore
vendored
@ -16,3 +16,5 @@ idd/Debug
|
|||||||
idd/x64
|
idd/x64
|
||||||
idd/LGIdd/x64
|
idd/LGIdd/x64
|
||||||
idd/LGIdd/Debug
|
idd/LGIdd/Debug
|
||||||
|
idd/LGIdd/VersionInfo.h
|
||||||
|
idd/packages
|
||||||
|
@ -26,5 +26,5 @@ steps:
|
|||||||
- /C
|
- /C
|
||||||
- >
|
- >
|
||||||
%VS_PATH%\BuildTools\Common7\Tools\VsDevCmd.bat -arch=amd64 &&
|
%VS_PATH%\BuildTools\Common7\Tools\VsDevCmd.bat -arch=amd64 &&
|
||||||
msbuild idd\LGIdd.sln /p:Configuration=${BUILD_TYPE} /p:Platform=x64 /p:SignMode=Off /m &&
|
msbuild /restore idd\LGIdd.sln /p:Configuration=${BUILD_TYPE} /p:Platform=x64 /p:SignMode=Off /m &&
|
||||||
IF EXIST C:\artifacts\build.cmd (cmd /C C:\artifacts\build.cmd)
|
IF EXIST C:\artifacts\build.cmd (cmd /C C:\artifacts\build.cmd)
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
|
|
||||||
#include "CPlatformInfo.h"
|
#include "CPlatformInfo.h"
|
||||||
#include "CDebug.h"
|
#include "CDebug.h"
|
||||||
|
#include "VersionInfo.h"
|
||||||
|
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
@ -62,7 +63,7 @@ void CIndirectDeviceContext::InitAdapter()
|
|||||||
caps.EndPointDiagnostics.GammaSupport = IDDCX_FEATURE_IMPLEMENTATION_NONE;
|
caps.EndPointDiagnostics.GammaSupport = IDDCX_FEATURE_IMPLEMENTATION_NONE;
|
||||||
caps.EndPointDiagnostics.TransmissionType = IDDCX_TRANSMISSION_TYPE_OTHER;
|
caps.EndPointDiagnostics.TransmissionType = IDDCX_TRANSMISSION_TYPE_OTHER;
|
||||||
|
|
||||||
caps.EndPointDiagnostics.pEndPointFriendlyName = L"Looking Glass IDD Device";
|
caps.EndPointDiagnostics.pEndPointFriendlyName = L"Looking Glass IDD Driver";
|
||||||
caps.EndPointDiagnostics.pEndPointManufacturerName = L"Looking Glass";
|
caps.EndPointDiagnostics.pEndPointManufacturerName = L"Looking Glass";
|
||||||
caps.EndPointDiagnostics.pEndPointModelName = L"Looking Glass";
|
caps.EndPointDiagnostics.pEndPointModelName = L"Looking Glass";
|
||||||
|
|
||||||
@ -188,7 +189,7 @@ bool CIndirectDeviceContext::SetupLGMP(size_t alignSize)
|
|||||||
memcpy_s(kvmfr.magic, sizeof(kvmfr.magic), KVMFR_MAGIC, sizeof(KVMFR_MAGIC) - 1);
|
memcpy_s(kvmfr.magic, sizeof(kvmfr.magic), KVMFR_MAGIC, sizeof(KVMFR_MAGIC) - 1);
|
||||||
kvmfr.version = KVMFR_VERSION;
|
kvmfr.version = KVMFR_VERSION;
|
||||||
kvmfr.features = KVMFR_FEATURE_SETCURSORPOS;
|
kvmfr.features = KVMFR_FEATURE_SETCURSORPOS;
|
||||||
strncpy_s(kvmfr.hostver, "FIXME-IDD", sizeof(kvmfr.hostver) - 1);
|
strncpy_s(kvmfr.hostver, LG_VERSION_STR, sizeof(kvmfr.hostver) - 1);
|
||||||
ss.write(reinterpret_cast<const char *>(&kvmfr), sizeof(kvmfr));
|
ss.write(reinterpret_cast<const char *>(&kvmfr), sizeof(kvmfr));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -207,7 +208,7 @@ bool CIndirectDeviceContext::SetupLGMP(size_t alignSize)
|
|||||||
|
|
||||||
const uint8_t * uuid = CPlatformInfo::GetUUID();
|
const uint8_t * uuid = CPlatformInfo::GetUUID();
|
||||||
memcpy_s (vmInfo->uuid, sizeof(vmInfo->uuid), uuid, 16);
|
memcpy_s (vmInfo->uuid, sizeof(vmInfo->uuid), uuid, 16);
|
||||||
strncpy_s(vmInfo->capture, "Idd Driver", sizeof(vmInfo->capture));
|
strncpy_s(vmInfo->capture, "Looking Glass IDD Driver", sizeof(vmInfo->capture));
|
||||||
|
|
||||||
KVMFRRecord * record = static_cast<KVMFRRecord *>(calloc(1, sizeof(*record)));
|
KVMFRRecord * record = static_cast<KVMFRRecord *>(calloc(1, sizeof(*record)));
|
||||||
if (!record)
|
if (!record)
|
||||||
|
@ -21,10 +21,14 @@
|
|||||||
#include "driver.h"
|
#include "driver.h"
|
||||||
#include "driver.tmh"
|
#include "driver.tmh"
|
||||||
|
|
||||||
|
#include "CDebug.h"
|
||||||
#include "CPlatformInfo.h"
|
#include "CPlatformInfo.h"
|
||||||
|
#include "VersionInfo.h"
|
||||||
|
|
||||||
NTSTATUS DriverEntry(_In_ PDRIVER_OBJECT DriverObject, _In_ PUNICODE_STRING RegistryPath)
|
NTSTATUS DriverEntry(_In_ PDRIVER_OBJECT DriverObject, _In_ PUNICODE_STRING RegistryPath)
|
||||||
{
|
{
|
||||||
|
DEBUG_INFO("Looking Glass IDD Driver (" LG_VERSION_STR ")");
|
||||||
|
|
||||||
WDF_DRIVER_CONFIG config;
|
WDF_DRIVER_CONFIG config;
|
||||||
NTSTATUS status;
|
NTSTATUS status;
|
||||||
WDF_OBJECT_ATTRIBUTES attributes;
|
WDF_OBJECT_ATTRIBUTES attributes;
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<Import Project="..\packages\MSBuilder.Git.0.3.0\build\MSBuilder.Git.props" Condition="Exists('..\packages\MSBuilder.Git.0.3.0\build\MSBuilder.Git.props')" />
|
||||||
<ItemGroup Label="ProjectConfigurations">
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
<ProjectConfiguration Include="Debug|Win32">
|
<ProjectConfiguration Include="Debug|Win32">
|
||||||
<Configuration>Debug</Configuration>
|
<Configuration>Debug</Configuration>
|
||||||
@ -36,6 +37,7 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="cpp.hint" />
|
<None Include="cpp.hint" />
|
||||||
|
<None Include="packages.config" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="CD3D12CommandQueue.cpp" />
|
<ClCompile Include="CD3D12CommandQueue.cpp" />
|
||||||
@ -327,6 +329,30 @@
|
|||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
<ImportGroup Label="ExtensionTargets">
|
<ImportGroup Label="ExtensionTargets" />
|
||||||
</ImportGroup>
|
<Target Name="EnsureNuGetPackageBuildImports">
|
||||||
|
<PropertyGroup>
|
||||||
|
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Error Condition="!Exists('..\packages\GitVersion.MsBuild.6.1.0\build\GitVersion.MsBuild.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\GitVersion.MsBuild.6.1.0\build\GitVersion.MsBuild.props'))" />
|
||||||
|
<Error Condition="!Exists('..\packages\MSBuilder.Git.0.3.0\build\MSBuilder.Git.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\MSBuilder.Git.0.3.0\build\MSBuilder.Git.props'))" />
|
||||||
|
</Target>
|
||||||
|
<Target Name="GenerateVersionInfo" BeforeTargets="ClCompile">
|
||||||
|
<Exec Command=""$(Git)" describe --always --abbrev=10 --dirty=+ --tags" ConsoleToMSBuild="true">
|
||||||
|
<Output TaskParameter="ConsoleOutput" PropertyName="GitVersion" />
|
||||||
|
</Exec>
|
||||||
|
<ItemGroup>
|
||||||
|
<VersionInfoLines Include="#define LG_VERSION_STR "$(GitVersion)"" />
|
||||||
|
<VersionInfoLines Include="#define LG_CURRENT_YEAR $(CurrentYear)" />
|
||||||
|
</ItemGroup>
|
||||||
|
<WriteLinesToFile File="VersionInfo.h" Lines="@(VersionInfoLines)" Overwrite="true" />
|
||||||
|
</Target>
|
||||||
|
<Target Name="Build" DependsOnTargets="$(BuildDependsOn)" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<CurrentYear>$([System.DateTime]::Now.ToString("yyyy"))</CurrentYear>
|
||||||
|
<BuildDependsOn>
|
||||||
|
GenerateVersionInfo;
|
||||||
|
$(BuildDependsOn);
|
||||||
|
</BuildDependsOn>
|
||||||
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
@ -20,6 +20,7 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="cpp.hint" />
|
<None Include="cpp.hint" />
|
||||||
|
<None Include="packages.config" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Inf Include="LGIdd.inf">
|
<Inf Include="LGIdd.inf">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user