Skip to content

Commit 1163882

Browse files
committed
setup build
1 parent d65de2e commit 1163882

File tree

13 files changed

+40
-104
lines changed

13 files changed

+40
-104
lines changed

APDU/APDU.csproj

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
44
<TargetFramework>netstandard2.0</TargetFramework>
55
</PropertyGroup>
66

7+
<PropertyGroup>
8+
<DebugType Condition=" '$(Configuration)' == 'Release' ">None</DebugType>
9+
</PropertyGroup>
10+
711
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
812
<PlatformTarget>AnyCPU</PlatformTarget>
913
</PropertyGroup>

SoftU2F.sln

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "U2FLib", "U2FLib\U2FLib.csp
1313
EndProject
1414
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SoftU2FDaemon", "SoftU2FDaemon\SoftU2FDaemon.csproj", "{DA6EEE3B-38E8-414B-BDBF-AD3B80BC5950}"
1515
EndProject
16-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JustTest", "JustTest\JustTest.csproj", "{551530B9-2C88-430A-B669-06F481FBB658}"
16+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JustTest", "JustTest\JustTest.csproj", "{551530B9-2C88-430A-B669-06F481FBB658}"
1717
EndProject
1818
Global
1919
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -77,6 +77,7 @@ Global
7777
{6480AC5C-E1DE-4855-B9EA-AFA0243EFE88}.Debug|x86.Build.0 = Debug|Win32
7878
{6480AC5C-E1DE-4855-B9EA-AFA0243EFE88}.Debug|x86.Deploy.0 = Debug|Win32
7979
{6480AC5C-E1DE-4855-B9EA-AFA0243EFE88}.Release|Any CPU.ActiveCfg = Release|Win32
80+
{6480AC5C-E1DE-4855-B9EA-AFA0243EFE88}.Release|Any CPU.Build.0 = Release|Win32
8081
{6480AC5C-E1DE-4855-B9EA-AFA0243EFE88}.Release|ARM.ActiveCfg = Release|ARM
8182
{6480AC5C-E1DE-4855-B9EA-AFA0243EFE88}.Release|ARM.Build.0 = Release|ARM
8283
{6480AC5C-E1DE-4855-B9EA-AFA0243EFE88}.Release|ARM.Deploy.0 = Release|ARM

SoftU2FDaemon/Driver/SoftU2F.inf

Lines changed: 0 additions & 87 deletions
This file was deleted.
-20.6 KB
Binary file not shown.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
pnputil.exe /add-driver .\SoftU2F.inf /install
2-
pasus
2+
pasue

SoftU2FDaemon/Driver/softu2f.cat

-2.3 KB
Binary file not shown.

SoftU2FDaemon/Program.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,13 @@ private void SetupApplication()
9292
private void InitializeBackgroundDaemon()
9393
{
9494
var daemon = _serviceProvider.GetService<IU2FBackgroundTask>();
95+
if (!daemon.OpenDevice())
96+
{
97+
MessageBox.Show("Failed to load driver. Maybe installation was unsuccessful\nExiting", "Driver Error");
98+
if (Application.MessageLoop) Application.Exit();
99+
Environment.Exit(1);
100+
return;
101+
}
95102
(new Thread(() => { daemon.StartIoLoop(_cancellation.Token); })).Start();
96103
UserPresence.Sender = this;
97104
}

SoftU2FDaemon/SoftU2FDaemon.csproj

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616
<PackageTags>u2f,security</PackageTags>
1717
</PropertyGroup>
1818

19+
<PropertyGroup>
20+
<DebugType Condition=" '$(Configuration)' == 'Release' ">None</DebugType>
21+
</PropertyGroup>
1922

2023
<ItemGroup>
2124
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="3.0.0-preview6.19304.6" />
@@ -29,7 +32,7 @@
2932

3033
<ItemGroup>
3134
<Resources Include="$(ProjectDir)Resources\*.*" />
32-
<Driver Include="$(ProjectDir)Driver\*.*" />
35+
<Driver Include="$(ProjectDir)..\$(Configuration)\SoftU2FDriver\*.*" />
3336
</ItemGroup>
3437

3538
<Target Name="CopyFiles" AfterTargets="Build">

SoftU2FDaemon/project.json

Lines changed: 0 additions & 9 deletions
This file was deleted.

SoftU2FDriver/SoftU2F.inf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ WdfCoInstaller$KMDFCOINSTALLERVERSION$.dll=1 ; make sure the number matches with
3030
%ManufacturerName%=Standard,NT$ARCH$
3131

3232
[Standard.NT$ARCH$]
33-
%SoftU2F.DeviceDesc%=SoftU2F_Device, Root\Watfaq\SoftU2F ; TODO: edit hw-id
33+
%SoftU2F.DeviceDesc%=SoftU2F_Device, Root\SoftU2F
3434

3535
[SoftU2F_Device.NT]
3636
CopyFiles=Drivers_Dir

0 commit comments

Comments
 (0)