Skip to content
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
1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use flake
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ obj/
*.opensdf
*.sln.docstates

# Zed files
.zed/

# NuGet packages
*.nupkg
packages/
Expand Down Expand Up @@ -60,3 +63,7 @@ _ReSharper*/
artifacts/
# Scanner configuration file (user-specific)
scan_config.ini

result
out
.direnv
17 changes: 17 additions & 0 deletions .zed/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"lsp": {
"roslyn": {
"binary": {
"path": "csharp-ls",
"arguments": ["-s", "BFD9010/BFD9010.sln"],
"env": {
"RuntimeIdentifier": "win-x86",
"PlatformTarget": "x86",
"TargetPlatformIdentifier": "Windows",
"TargetPlatformMinVersion": "7.0",
"EnableKnownPlatformsReference": "true",
},
},
},
},
}
3 changes: 1 addition & 2 deletions BFD9010/BFD9010.Cli/BFD9010.Cli.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net8.0-windows</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Platforms>AnyCPU;x86</Platforms>
<PlatformTarget>x86</PlatformTarget>
<AssemblyName>bfd9010_cli</AssemblyName>
</PropertyGroup>
Expand Down
59 changes: 29 additions & 30 deletions BFD9010/BFD9010.FhirApi.Tests/BFD9010.FhirApi.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,30 +1,29 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Platforms>AnyCPU;x86</Platforms>
<PlatformTarget>x86</PlatformTarget>
<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="coverlet.collector" Version="6.0.0" />
<PackageReference Include="Hl7.Fhir.R5" Version="5.12.2" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="Moq" Version="4.20.72" />
<PackageReference Include="xunit" Version="2.5.3" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.3" />
</ItemGroup>

<ItemGroup>
<Using Include="Xunit" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\BFD9010.FhirApi\BFD9010.FhirApi.csproj" />
</ItemGroup>

</Project>
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0-windows</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<PlatformTarget>x86</PlatformTarget>
<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="coverlet.collector" Version="6.0.0" />
<PackageReference Include="Hl7.Fhir.R5" Version="5.12.2" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="Moq" Version="4.20.72" />
<PackageReference Include="xunit" Version="2.5.3" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.3" />
</ItemGroup>

<ItemGroup>
<Using Include="Xunit" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\BFD9010.FhirApi\BFD9010.FhirApi.csproj" />
</ItemGroup>

</Project>
58 changes: 30 additions & 28 deletions BFD9010/BFD9010.FhirApi/BFD9010.FhirApi.csproj
Original file line number Diff line number Diff line change
@@ -1,28 +1,30 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Platforms>AnyCPU;x86</Platforms>
<PlatformTarget>x86</PlatformTarget>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Hl7.Fhir.R5" Version="5.12.2" />
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="8.0.20" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.6.2" />
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\BFD9010.Scanner\BFD9010.Scanner.csproj" />
</ItemGroup>

<ItemGroup>
<Folder Include="Models\" />
</ItemGroup>

</Project>
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0-windows</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<PlatformTarget>x86</PlatformTarget>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Hl7.Fhir.R5" Version="5.12.2" />
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="8.0.20" />
<PackageReference
Include="Microsoft.Extensions.Logging.Abstractions"
Version="8.0.0"
/>
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.6.2" />
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\BFD9010.Scanner\BFD9010.Scanner.csproj" />
</ItemGroup>

<ItemGroup>
<Folder Include="Models\" />
</ItemGroup>

</Project>
13 changes: 9 additions & 4 deletions BFD9010/BFD9010.Gui/BFD9010.Gui.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,24 @@
<UseWindowsForms>true</UseWindowsForms>
<ImplicitUsings>enable</ImplicitUsings>
<AssemblyName>bfd9010</AssemblyName>
<Platforms>AnyCPU;x86</Platforms>
<PlatformTarget>x86</PlatformTarget>
<ApplicationIcon>..\..\documentation\images\BFD9000_logo_white.ico</ApplicationIcon>
<EnableWindowsTargeting>true</EnableWindowsTargeting>
<ApplicationIcon
>..\..\documentation\images\BFD9000_logo_white.ico</ApplicationIcon>
</PropertyGroup>

<ItemGroup>
<EmbeddedResource Include="..\..\documentation\images\BFD9000_logo_white.ico">
<EmbeddedResource
Include="..\..\documentation\images\BFD9000_logo_white.ico"
>
<Link>Resources\BFD9000_logo_white.ico</Link>
</EmbeddedResource>
</ItemGroup>

<ItemGroup>
<EmbeddedResource Include="..\..\documentation\images\BFD9000_logo_white.png">
<EmbeddedResource
Include="..\..\documentation\images\BFD9000_logo_white.png"
>
<Link>Resources\BFD9000_logo_white.png</Link>
</EmbeddedResource>
</ItemGroup>
Expand Down
43 changes: 21 additions & 22 deletions BFD9010/BFD9010.Scanner/BFD9010.Scanner.csproj
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Platforms>AnyCPU;x86</Platforms>
<PlatformTarget>x86</PlatformTarget>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="SixLabors.ImageSharp" Version="3.1.11" />
</ItemGroup>

<ItemGroup>
<None Include="Vscsi32.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>

</Project>
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0-windows</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<PlatformTarget>x86</PlatformTarget>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="SixLabors.ImageSharp" Version="3.1.11" />
</ItemGroup>

<ItemGroup>
<None Include="Vscsi32.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>

</Project>
13 changes: 10 additions & 3 deletions BFD9010/BFD9010.Scanner/ScanConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -296,9 +296,16 @@ private void SetValue(string key, string value)

private static string GetConfigPath()
{
// Place config file in the same directory as the executable
string exeDir = AppDomain.CurrentDomain.BaseDirectory;
return Path.Combine(exeDir, CONFIG_FILENAME);
string outDir = Path.Combine(
Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData),
"VidarScans"
);
Directory.CreateDirectory(outDir);
string configPath = Path.Combine(
outDir,
CONFIG_FILENAME
);
return configPath;
}

private static string ExpandPath(string path)
Expand Down
3 changes: 3 additions & 0 deletions BFD9010/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,8 @@
<AssemblyVersion>$(Version)</AssemblyVersion>
<FileVersion>$(Version)</FileVersion>
<AssemblyInformationalVersion>$(Version)</AssemblyInformationalVersion>
<RestorePackagesPath>$(MSBuildThisFileDirectory)../.nuget/packages</RestorePackagesPath>
<ProduceReferenceAssembly>false</ProduceReferenceAssembly>
<DetermineReferencesFromSourceCache>true</DetermineReferencesFromSourceCache>
</PropertyGroup>
</Project>
61 changes: 61 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

48 changes: 48 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
description = "BFD9010: An HL7 FHIR API for Scanners";

inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
utils.url = "github:numtide/flake-utils";
};

outputs =
{ nixpkgs, utils, ... }:
utils.lib.eachDefaultSystem (
system:
let
pkgs = import nixpkgs { inherit system; };
dn = (
with pkgs.dotnetCorePackages;
combinePackages [
sdk_8_0
sdk_10_0
]
);
in
{
packages = {
app = pkgs.callPackage ./nix/build.nix { };
default = pkgs.callPackage ./nix/build.nix { };
};

devShells.default = pkgs.mkShell {
buildInputs = with pkgs; [
dn
nuget-to-json
nil
nixd
csharp-ls
wine
];

shellHook = ''
export DOTNET_ROOT="${dn}/share/dotnet"
'';
};

# Cannot do windows checks on linux as we do not have the necessary 32-bit runtimes.
# Possible solution: run in a Windows VM to test
}
);
}
Loading