Skip to content

Commit 2e86ddd

Browse files
committed
Merge branch 'dev'
2 parents d427277 + 34fddfd commit 2e86ddd

File tree

69 files changed

+1346
-947
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+1346
-947
lines changed

.appveyor.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
version: '{build}'
22
clone_depth: 5
3-
image: Visual Studio 2015
3+
image: Visual Studio 2017
44
configuration: ReleaseWindows
55
platform: Any CPU
66

7-
install:
8-
- cinst wixtoolset --version 3.10.3.3007 --checksumtype=sha256 --checksum=3C125E3551C035F69ED24ACD8FB4EF7B74C1311ECACF1F8FC1EB7E0DD47D9C75
9-
107
before_build:
118
- nuget restore
129

File renamed without changes.

Core/NbfcCli/NbfcCli.csproj

Lines changed: 14 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -13,42 +13,29 @@
1313
<FileAlignment>512</FileAlignment>
1414
<TargetFrameworkProfile>
1515
</TargetFrameworkProfile>
16-
<PublishUrl>publish\</PublishUrl>
17-
<Install>true</Install>
18-
<InstallFrom>Disk</InstallFrom>
19-
<UpdateEnabled>false</UpdateEnabled>
20-
<UpdateMode>Foreground</UpdateMode>
21-
<UpdateInterval>7</UpdateInterval>
22-
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
23-
<UpdatePeriodically>false</UpdatePeriodically>
24-
<UpdateRequired>false</UpdateRequired>
25-
<MapFileExtensions>true</MapFileExtensions>
26-
<ApplicationRevision>0</ApplicationRevision>
27-
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
28-
<IsWebBootstrapper>false</IsWebBootstrapper>
29-
<UseApplicationTrust>false</UseApplicationTrust>
30-
<BootstrapperEnabled>true</BootstrapperEnabled>
3116
</PropertyGroup>
32-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
17+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'DebugWindows|AnyCPU' ">
3318
<PlatformTarget>AnyCPU</PlatformTarget>
3419
<DebugSymbols>true</DebugSymbols>
3520
<DebugType>full</DebugType>
3621
<Optimize>false</Optimize>
37-
<OutputPath>bin\Debug\</OutputPath>
22+
<OutputPath>bin\DebugWindows\</OutputPath>
3823
<DefineConstants>DEBUG;TRACE</DefineConstants>
3924
<ErrorReport>prompt</ErrorReport>
4025
<WarningLevel>4</WarningLevel>
4126
<Prefer32Bit>false</Prefer32Bit>
27+
<appConfig>App.Windows.config</appConfig>
4228
</PropertyGroup>
43-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
29+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'ReleaseWindows|AnyCPU' ">
4430
<PlatformTarget>AnyCPU</PlatformTarget>
4531
<DebugType>pdbonly</DebugType>
4632
<Optimize>true</Optimize>
47-
<OutputPath>bin\Release\</OutputPath>
33+
<OutputPath>bin\ReleaseWindows\</OutputPath>
4834
<DefineConstants>TRACE</DefineConstants>
4935
<ErrorReport>prompt</ErrorReport>
5036
<WarningLevel>4</WarningLevel>
5137
<Prefer32Bit>false</Prefer32Bit>
38+
<appConfig>App.Windows.config</appConfig>
5239
</PropertyGroup>
5340
<PropertyGroup>
5441
<StartupObject>NbfcCli.Program</StartupObject>
@@ -60,7 +47,6 @@
6047
<DebugType>pdbonly</DebugType>
6148
<PlatformTarget>AnyCPU</PlatformTarget>
6249
<ErrorReport>prompt</ErrorReport>
63-
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
6450
<appConfig>App.Linux.config</appConfig>
6551
<Prefer32Bit>false</Prefer32Bit>
6652
</PropertyGroup>
@@ -74,13 +60,11 @@
7460
<DebugType>full</DebugType>
7561
<PlatformTarget>AnyCPU</PlatformTarget>
7662
<ErrorReport>prompt</ErrorReport>
77-
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
78-
<appConfig>App.Linux.config</appConfig>
63+
<appConfig>App.Linux.config</appConfig>
7964
</PropertyGroup>
8065
<ItemGroup>
81-
<Reference Include="clipr, Version=1.5.1.0, Culture=neutral, processorArchitecture=MSIL">
82-
<HintPath>..\..\packages\clipr.1.5.1\lib\net35\clipr.dll</HintPath>
83-
<Private>True</Private>
66+
<Reference Include="clipr, Version=1.6.0.0, Culture=neutral, processorArchitecture=MSIL">
67+
<HintPath>..\..\packages\clipr.1.6.0\lib\net35\clipr.dll</HintPath>
8468
</Reference>
8569
<Reference Include="System" />
8670
<Reference Include="System.Core" />
@@ -112,7 +96,7 @@
11296
<None Include="App.Linux.config">
11397
<SubType>Designer</SubType>
11498
</None>
115-
<None Include="App.config">
99+
<None Include="App.Windows.config">
116100
<SubType>Designer</SubType>
117101
</None>
118102
<None Include="App.manifest" />
@@ -152,23 +136,12 @@
152136
<LastGenOutput>Reference.cs</LastGenOutput>
153137
</None>
154138
</ItemGroup>
155-
<ItemGroup>
156-
<BootstrapperPackage Include=".NETFramework,Version=v4.5">
157-
<Visible>False</Visible>
158-
<ProductName>Microsoft .NET Framework 4.5 %28x86 and x64%29</ProductName>
159-
<Install>true</Install>
160-
</BootstrapperPackage>
161-
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
162-
<Visible>False</Visible>
163-
<ProductName>.NET Framework 3.5 SP1</ProductName>
164-
<Install>false</Install>
165-
</BootstrapperPackage>
166-
</ItemGroup>
167139
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
168-
<Target Name="AfterBuild" Condition="'$(Configuration)' == 'ReleaseLinux'">
169-
<Copy SourceFiles="$(TargetPath);$(TargetPath).config;$(TargetDir)clipr.dll" DestinationFolder="$(ProjectDir)\..\..\Linux\bin\$(Configuration)\" ContinueOnError="true" />
140+
<Target Name="AfterBuild">
141+
<Copy Condition="'$(Configuration)' == 'ReleaseLinux'" SourceFiles="$(TargetPath);$(TargetPath).config;$(TargetDir)clipr.dll" DestinationFolder="$(ProjectDir)\..\..\Linux\bin\Release\" ContinueOnError="true" />
142+
<Copy Condition="'$(Configuration)' == 'DebugLinux'" SourceFiles="$(TargetPath);$(TargetPath).config;$(TargetDir)clipr.dll" DestinationFolder="$(ProjectDir)\..\..\Linux\bin\Debug\" ContinueOnError="true" />
170143
</Target>
171-
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
144+
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
172145
Other similar extension points exist, see Microsoft.Common.targets.
173146
<Target Name="BeforeBuild">
174147
</Target>

Core/NbfcCli/packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="clipr" version="1.5.1" targetFramework="net45" />
3+
<package id="clipr" version="1.6.0" targetFramework="net45" />
44
</packages>

Core/NbfcProbe/NbfcProbe.csproj

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
<PropertyGroup>
44
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
55
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
6-
<ProductVersion>10.0.0</ProductVersion>
7-
<SchemaVersion>2.0</SchemaVersion>
86
<ProjectGuid>{F6104868-81A7-4D09-8AD2-8CF261D58319}</ProjectGuid>
97
<OutputType>Exe</OutputType>
108
<RootNamespace>NbfcProbe</RootNamespace>
@@ -13,7 +11,7 @@
1311
<TargetFrameworkProfile>
1412
</TargetFrameworkProfile>
1513
</PropertyGroup>
16-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
14+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'DebugWindows|AnyCPU' ">
1715
<DebugSymbols>true</DebugSymbols>
1816
<DebugType>full</DebugType>
1917
<Optimize>false</Optimize>
@@ -25,7 +23,7 @@
2523
<Externalconsole>true</Externalconsole>
2624
<Prefer32Bit>false</Prefer32Bit>
2725
</PropertyGroup>
28-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
26+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'ReleaseWindows|AnyCPU' ">
2927
<DebugType>full</DebugType>
3028
<Optimize>true</Optimize>
3129
<OutputPath>bin\Release</OutputPath>
@@ -42,17 +40,23 @@
4240
<ApplicationManifest>App.manifest</ApplicationManifest>
4341
</PropertyGroup>
4442
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'ReleaseLinux|AnyCPU'">
45-
<OutputPath>bin\ReleaseLinux\</OutputPath>
43+
<OutputPath>bin\Release\</OutputPath>
4644
<Optimize>true</Optimize>
4745
<DebugType>full</DebugType>
4846
<PlatformTarget>AnyCPU</PlatformTarget>
4947
<ErrorReport>prompt</ErrorReport>
50-
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
48+
</PropertyGroup>
49+
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'DebugLinux|AnyCPU'">
50+
<DebugSymbols>true</DebugSymbols>
51+
<OutputPath>bin\Debug\</OutputPath>
52+
<DefineConstants>DEBUG;</DefineConstants>
53+
<DebugType>full</DebugType>
54+
<PlatformTarget>AnyCPU</PlatformTarget>
55+
<ErrorReport>prompt</ErrorReport>
5156
</PropertyGroup>
5257
<ItemGroup>
53-
<Reference Include="clipr, Version=1.5.1.0, Culture=neutral, processorArchitecture=MSIL">
54-
<HintPath>..\..\packages\clipr.1.5.1\lib\net35\clipr.dll</HintPath>
55-
<Private>True</Private>
58+
<Reference Include="clipr, Version=1.6.0.0, Culture=neutral, processorArchitecture=MSIL">
59+
<HintPath>..\..\packages\clipr.1.6.0\lib\net35\clipr.dll</HintPath>
5660
</Reference>
5761
<Reference Include="System" />
5862
</ItemGroup>
@@ -66,8 +70,9 @@
6670
<Compile Include="Properties\AssemblyInfo.cs" />
6771
</ItemGroup>
6872
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
69-
<Target Name="AfterBuild" Condition="'$(Configuration)' == 'ReleaseLinux'">
70-
<Copy SourceFiles="$(TargetPath)" DestinationFolder="$(ProjectDir)\..\..\Linux\bin\$(Configuration)\" ContinueOnError="true" />
73+
<Target Name="AfterBuild">
74+
<Copy Condition="'$(Configuration)' == 'ReleaseLinux'" SourceFiles="$(TargetPath)" DestinationFolder="$(ProjectDir)\..\..\Linux\bin\Release\" ContinueOnError="true" />
75+
<Copy Condition="'$(Configuration)' == 'DebugLinux'" SourceFiles="$(TargetPath)" DestinationFolder="$(ProjectDir)\..\..\Linux\bin\Debug\" ContinueOnError="true" />
7176
</Target>
7277
<ItemGroup>
7378
<ProjectReference Include="..\NbfcCli\NbfcCli.csproj">

Core/NbfcProbe/packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="clipr" version="1.5.1" targetFramework="net45" />
3+
<package id="clipr" version="1.6.0" targetFramework="net45" />
44
</packages>

Core/NbfcService/App.Linux.config

Lines changed: 69 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,26 @@
11
<?xml version="1.0"?>
22
<configuration>
3+
<configSections>
4+
<section name="nlog" type="NLog.Config.ConfigSectionHandler, NLog"/>
5+
</configSections>
6+
7+
<startup>
8+
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/>
9+
</startup>
10+
311
<system.serviceModel>
412
<services>
513
<service name="StagWare.FanControl.Service.FanControlService">
6-
<endpoint
7-
address=""
8-
binding="netTcpBinding"
9-
bindingConfiguration=""
14+
<endpoint
15+
address=""
16+
binding="netTcpBinding"
17+
bindingConfiguration=""
1018
contract="StagWare.FanControl.Service.IFanControlService">
1119
<identity>
1220
<dns value="localhost"/>
1321
</identity>
1422
</endpoint>
15-
23+
1624
<host>
1725
<baseAddresses>
1826
<add baseAddress="net.tcp://localhost:8523/StagWare.FanControl.Service/FanControlService"/>
@@ -31,7 +39,60 @@
3139
</behaviors>
3240
</system.serviceModel>
3341

34-
<startup>
35-
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0,Profile=Client"/>
36-
</startup>
42+
<nlog
43+
xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
44+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
45+
useInvariantCulture="true">
46+
47+
<variable name="logdir" value="/etc/NbfcService"/>
48+
49+
<targets>
50+
<target
51+
xsi:type="Console"
52+
name="stdout"
53+
error="false"
54+
detectConsoleAvailable="false">
55+
56+
<layout xsi:type="CsvLayout" delimiter="Semicolon" withHeader="false">
57+
<column name="time" layout="${longdate}" />
58+
<column name="level" layout="${level}"/>
59+
<column name="message" layout="${message}" />
60+
<column name="exception" layout="${exception}"/>
61+
<column name="callsite" layout="${callsite:includeSourcePath=true}" />
62+
<column name="stacktrace" layout="${stacktrace:topFrames=20}" />
63+
</layout>
64+
</target>
65+
66+
<target
67+
name="logfile"
68+
xsi:type="AsyncWrapper"
69+
timeToSleepBetweenBatches="0"
70+
queueLimit="1000"
71+
overflowAction="Grow">
72+
<target
73+
xsi:type="File"
74+
fileName="${logdir}/NbfcServiceLog.txt"
75+
archiveFileName="${logdir}/NbfcServiceLog.{#}.txt"
76+
archiveNumbering="Date"
77+
archiveDateFormat="yyyy-MM-dd"
78+
archiveEvery="Monday"
79+
maxArchiveFiles="3"
80+
encoding="utf-8">
81+
82+
<layout xsi:type="CsvLayout" delimiter="Semicolon" withHeader="true">
83+
<column name="time" layout="${longdate}" />
84+
<column name="level" layout="${level}"/>
85+
<column name="message" layout="${message}" />
86+
<column name="exception" layout="${exception}"/>
87+
<column name="callsite" layout="${callsite:includeSourcePath=true}" />
88+
<column name="stacktrace" layout="${stacktrace:topFrames=20}" />
89+
</layout>
90+
</target>
91+
</target>
92+
</targets>
93+
94+
<rules>
95+
<logger name="*" minlevel="Info" writeTo="logfile" />
96+
</rules>
97+
</nlog>
3798
</configuration>

Core/NbfcService/App.Windows.config

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
<?xml version="1.0"?>
2+
<configuration>
3+
<configSections>
4+
<section name="nlog" type="NLog.Config.ConfigSectionHandler, NLog"/>
5+
</configSections>
6+
7+
<startup>
8+
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/>
9+
</startup>
10+
11+
<system.serviceModel>
12+
<services>
13+
<service name="StagWare.FanControl.Service.FanControlService">
14+
<endpoint
15+
address=""
16+
binding="netNamedPipeBinding"
17+
bindingConfiguration=""
18+
contract="StagWare.FanControl.Service.IFanControlService">
19+
<identity>
20+
<dns value="localhost"/>
21+
</identity>
22+
</endpoint>
23+
24+
<host>
25+
<baseAddresses>
26+
<add baseAddress="net.pipe://localhost/StagWare.FanControl.Service/FanControlService"/>
27+
</baseAddresses>
28+
</host>
29+
</service>
30+
</services>
31+
32+
<behaviors>
33+
<serviceBehaviors>
34+
<behavior>
35+
<serviceMetadata httpGetEnabled="False" httpsGetEnabled="False"/>
36+
<serviceDebug includeExceptionDetailInFaults="True"/>
37+
</behavior>
38+
</serviceBehaviors>
39+
</behaviors>
40+
</system.serviceModel>
41+
42+
<nlog
43+
xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
44+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
45+
useInvariantCulture="true">
46+
47+
<variable name="logdir" value="${specialfolder:folder=CommonApplicationData}\NbfcService"/>
48+
49+
<targets>
50+
<target
51+
xsi:type="EventLog"
52+
name="eventlog"
53+
log="Application"
54+
source="NoteBookFanControlService"
55+
layout="Message: ${message}${newline}Exception: ${exception}${newline}Callsite: ${callsite:includeSourcePath=true}${newline}Stacktrace: ${stacktrace:topFrames=20}"/>
56+
57+
<target
58+
name="logfile"
59+
xsi:type="AsyncWrapper"
60+
timeToSleepBetweenBatches="0"
61+
queueLimit="1000"
62+
overflowAction="Grow">
63+
<target
64+
xsi:type="File"
65+
fileName="${logdir}\NbfcServiceLog.txt"
66+
archiveFileName="${logdir}\NbfcServiceLog.{#}.txt"
67+
archiveNumbering="Date"
68+
archiveDateFormat="yyyy-MM-dd"
69+
archiveEvery="Monday"
70+
maxArchiveFiles="3"
71+
encoding="utf-8">
72+
73+
<layout xsi:type="CsvLayout" delimiter="Semicolon" withHeader="true">
74+
<column name="time" layout="${longdate}" />
75+
<column name="level" layout="${level}"/>
76+
<column name="message" layout="${message}" />
77+
<column name="exception" layout="${exception}"/>
78+
<column name="callsite" layout="${callsite:includeSourcePath=true}" />
79+
<column name="stacktrace" layout="${stacktrace:topFrames=20}" />
80+
</layout>
81+
</target>
82+
</target>
83+
</targets>
84+
85+
<rules>
86+
<logger name="*" minlevel="Info" writeTo="logfile" />
87+
</rules>
88+
</nlog>
89+
</configuration>

0 commit comments

Comments
 (0)