summaryrefslogtreecommitdiff
path: root/writer
diff options
context:
space:
mode:
authora1xd <[email protected]>2020-09-25 18:46:04 -0400
committera1xd <[email protected]>2020-09-25 18:46:04 -0400
commitfd184b6ffeaf5b1d1dceb7de58a8ebb7c3d8c760 (patch)
tree4e00b478ac1d888c50beaa782733cf52c61d038b /writer
parentMerge pull request #22 from JacobPalecki/GUI (diff)
downloadrawaccel-fd184b6ffeaf5b1d1dceb7de58a8ebb7c3d8c760.tar.xz
rawaccel-fd184b6ffeaf5b1d1dceb7de58a8ebb7c3d8c760.zip
add initial writer
move managed settings into wrapper move gui build into driver build dir
Diffstat (limited to 'writer')
-rw-r--r--writer/App.config6
-rw-r--r--writer/Program.cs30
-rw-r--r--writer/Properties/AssemblyInfo.cs36
-rw-r--r--writer/writer.csproj65
4 files changed, 137 insertions, 0 deletions
diff --git a/writer/App.config b/writer/App.config
new file mode 100644
index 0000000..56efbc7
--- /dev/null
+++ b/writer/App.config
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<configuration>
+ <startup>
+ <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
+ </startup>
+</configuration> \ No newline at end of file
diff --git a/writer/Program.cs b/writer/Program.cs
new file mode 100644
index 0000000..7f9c37c
--- /dev/null
+++ b/writer/Program.cs
@@ -0,0 +1,30 @@
+using Newtonsoft.Json;
+using Newtonsoft.Json.Linq;
+
+using System;
+using System.IO;
+
+namespace writer
+{
+ class Program
+ {
+ static void Main(string[] args)
+ {
+ try
+ {
+ var serializerSettings = new JsonSerializerSettings
+ {
+ MissingMemberHandling = MissingMemberHandling.Error,
+ };
+ var token = JObject.Parse(File.ReadAllText(args[0]))["AccelerationSettings"];
+ var settings = token.ToObject<DriverSettings>(JsonSerializer.Create(serializerSettings));
+ DriverInterop.SetActiveSettings(settings);
+ }
+ catch (Exception e)
+ {
+ Console.WriteLine(e);
+ Console.ReadLine();
+ }
+ }
+ }
+}
diff --git a/writer/Properties/AssemblyInfo.cs b/writer/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..37e79ad
--- /dev/null
+++ b/writer/Properties/AssemblyInfo.cs
@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("writer")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("writer")]
+[assembly: AssemblyCopyright("Copyright © 2020")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("28acf254-e4ef-4a0e-9761-0fe22048d6fd")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/writer/writer.csproj b/writer/writer.csproj
new file mode 100644
index 0000000..4befc1a
--- /dev/null
+++ b/writer/writer.csproj
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProjectGuid>{28ACF254-E4EF-4A0E-9761-0FE22048D6FD}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <RootNamespace>writer</RootNamespace>
+ <AssemblyName>writer</AssemblyName>
+ <TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
+ <Deterministic>true</Deterministic>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>$(SolutionDir)$(Platform)\$(Configuration)\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <LangVersion>7.3</LangVersion>
+ <ErrorReport>prompt</ErrorReport>
+ <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
+ <Prefer32Bit>true</Prefer32Bit>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
+ <OutputPath>$(SolutionDir)$(Platform)\$(Configuration)\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <LangVersion>7.3</LangVersion>
+ <ErrorReport>prompt</ErrorReport>
+ <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
+ <Prefer32Bit>true</Prefer32Bit>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="Newtonsoft.Json">
+ <HintPath>..\x64\Release\Newtonsoft.Json.dll</HintPath>
+ </Reference>
+ <Reference Include="System" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Xml.Linq" />
+ <Reference Include="System.Data.DataSetExtensions" />
+ <Reference Include="Microsoft.CSharp" />
+ <Reference Include="System.Data" />
+ <Reference Include="System.Net.Http" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Program.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="App.config" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\wrapper\wrapper.vcxproj">
+ <Project>{28a3656f-a1de-405c-b547-191c32ec555f}</Project>
+ <Name>wrapper</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+</Project> \ No newline at end of file