Compare commits

...

73 commits
v1.0.0 ... main

Author SHA1 Message Date
Gerrit
1dd12c02a5 🐛 Fix Permission Problems when installing the Printer as user without admin privileges. 2023-08-03 11:27:26 +02:00
Gerrit
49ee9b1079 🐛 Fix Error Handling of Job Factory 2023-08-03 10:34:31 +02:00
Gerrit
a22a3b0cfd Inherit secrets 2023-07-13 08:54:47 +02:00
Gerrit
4490dd1599 Use CERTIFICATEPASSWORD for release pipeline 2023-07-13 08:41:27 +02:00
Gerrit
346a14a25a Sign msi 2023-07-12 17:55:31 +02:00
Gerrit
bbfa313804 Fix build pipeline 2023-07-12 17:44:05 +02:00
Gerrit
6cc07f5bac Merge branch 'main' of https://github.com/amagno-io/AmagnoVirtualPrinter 2023-07-12 17:38:56 +02:00
Gerrit
747b509a0c Add certificate to sign files 2023-07-12 17:38:55 +02:00
Gerrit Edzards
744062944d
Update README.md 2023-06-01 09:32:33 +02:00
Gerrit
8916b0c348 add .msi to gitignore 2023-05-31 14:22:06 +02:00
Gerrit
46c466a864 Remove msi 2023-05-31 14:20:52 +02:00
Gerrit
02321a6dfe Wait for setup process 2023-05-31 14:08:04 +02:00
Gerrit
be34a58dca remove test pipeline 2023-05-31 14:00:28 +02:00
Gerrit
b6185dec1b Fix call of powershell script 2023-05-31 13:52:10 +02:00
Gerrit
ba8e248396 Run ps script 2023-05-31 13:48:42 +02:00
Benjamin Gebauer
0d9bf69b5c try powershell methods directly without script 2023-05-31 13:35:45 +02:00
Benjamin Gebauer
b3c1865668 try to upload only if create step has finished 2023-05-31 13:02:29 +02:00
Benjamin Gebauer
edd542e067 next try 2023-05-31 12:58:15 +02:00
Benjamin Gebauer
65b6655a08 removed quotes and use ${{github.workspace}} instead of $env:GITHUB_WORKSPACE for upload-artifact 2023-05-31 12:55:55 +02:00
Benjamin Gebauer
52601b1540 use $env:GITHUB_WORKSPACE for uploading artifacts 2023-05-31 12:52:27 +02:00
Benjamin Gebauer
92d74eb7ee use env:GITHUB_WORKSPACE 2023-05-31 12:41:45 +02:00
Benjamin Gebauer
fe00cb9121 extracted script name to variable 2023-05-31 12:31:30 +02:00
Benjamin Gebauer
2f3a9f2d5f changed from "/" to "\" 2023-05-31 12:20:08 +02:00
Benjamin Gebauer
f8dd2595bf change path to test script 2023-05-31 12:14:37 +02:00
Benjamin Gebauer
0a6e9a5330 Added call operator 2023-05-31 11:54:45 +02:00
Benjamin Gebauer
1749a3b3ef Merge remote-tracking branch 'origin/main' 2023-05-31 11:16:12 +02:00
Benjamin Gebauer
f0bff17fc9 ♻️ Added AppendTargetFrameworkToOutputPath tag to project files to avoid framework folder on release build. 2023-05-31 11:16:05 +02:00
Gerrit
01c9464b38 Use / instead of \ 2023-05-31 10:53:38 +02:00
Gerrit
62db1f8b5c Remove step "file exists" 2023-05-31 10:52:20 +02:00
Gerrit
c58a805ae4 fix ps shell script path 2023-05-31 10:47:00 +02:00
Gerrit
001e9a216c Fix path of ps script 2023-05-31 10:46:40 +02:00
Benjamin Gebauer
e40d05fa9b ⬆️ Upgraded project files to the new sdk format und upgraded nuget packages 2023-05-31 10:33:51 +02:00
Gerrit
0d9fe5ad3a change path to file 2023-05-31 09:46:11 +02:00
Gerrit
a811d802aa Fix ps path 2023-05-31 09:17:15 +02:00
Gerrit
40b4843638 change path of powershell script 2023-05-31 09:15:20 +02:00
Gerrit
bed687deb0 Fix path of powershell script 2023-05-31 09:10:35 +02:00
Gerrit
c31b6e632e run powershell script 2023-05-31 09:08:37 +02:00
Gerrit
700c7f7547 change test.ps1 name 2023-05-31 08:59:33 +02:00
Gerrit
e7e19faadc Fix test pipeline 2023-05-31 08:57:12 +02:00
Gerrit
0f74ebc839 Merge branch 'main' of https://github.com/amagno-io/AmagnoVirtualPrinter 2023-05-31 08:52:51 +02:00
Gerrit
02152c234f Add test pipeline for powershell scripts 2023-05-31 08:52:45 +02:00
Gerrit Edzards
43fdf40bfb
Update build.yml 2023-05-30 17:45:45 +02:00
Gerrit Edzards
ec75617026
Update build.yml 2023-05-30 17:44:41 +02:00
Gerrit Edzards
2e6fe90919
Update build.yml 2023-05-30 17:43:15 +02:00
Gerrit
02d0e0bcf9 Merge remote-tracking branch 'origin/main' 2023-05-30 17:41:06 +02:00
Gerrit
118037bbc3 Use PackageReference for the test projects 2023-05-30 17:40:48 +02:00
Gerrit Edzards
5f3fa56dca
Update build.yml 2023-05-30 17:36:32 +02:00
Gerrit
5a460e1ba0 🐛 Fix bug while searching for the user sid 2023-05-30 17:22:56 +02:00
Gerrit
c7d2a2c4fe Better filesystem handling of create_msi.ps1 2023-05-30 14:37:14 +02:00
Gerrit
19f00c3b80 Always create the setup 2023-05-30 14:23:49 +02:00
Gerrit
9611eb6522 Remove configuration matrix 2023-05-30 13:33:40 +02:00
Gerrit
5fd0b63c76 Fix typo 2023-05-30 13:31:28 +02:00
Gerrit
3df58a44d9 Extract artefacts to sub directory 2023-05-30 13:30:43 +02:00
Gerrit
ed615c1053 Use build artefacts 2023-05-30 13:20:50 +02:00
Gerrit
c4cdaf0e79 Chain github action steps 2023-05-30 12:58:27 +02:00
Gerrit
d1c8210544 Make build reusable 2023-05-30 12:52:14 +02:00
Gerrit
bd8f90f92e Update names of actions 2023-05-30 12:47:47 +02:00
Gerrit
549ca17031 Update actions 2023-05-30 12:46:35 +02:00
Gerrit Edzards
3bf7ebcef7
Update releases.yml 2023-05-30 12:34:23 +02:00
Gerrit Edzards
bf32fa3db7
Update releases.yml 2023-05-30 12:31:07 +02:00
Gerrit Edzards
ea8aedad21
Update dotnet-desktop.yml 2023-05-30 12:28:15 +02:00
Gerrit Edzards
8a96fd9c64
Update releases.yml 2023-05-30 12:25:51 +02:00
Gerrit Edzards
d271a44249
Update releases.yml 2023-05-30 12:23:45 +02:00
Gerrit Edzards
c087da0d31
Update releases.yml 2023-05-30 12:08:26 +02:00
Gerrit
05eae58484 ⬆️ Upgrade to .NET 4.7.2 2023-05-30 11:43:17 +02:00
Gerrit
1661e17f02 Improve checks for GhostScript while installing 2023-05-30 11:18:10 +02:00
Marco Batzinger
5526c695d8 increased version 2021-12-17 14:25:15 +01:00
Marco Batzinger
8eff18c2c2 updated Ghostscript download link 2021-12-17 13:45:10 +01:00
Marco Batzinger
0bd4e91ec6 increment version 2021-05-17 16:47:45 +02:00
Marco Batzinger
ad542ad222 fixed redirecting bug
the file has been deleted before the print was executed. implemented a delay of 1000 ms
2021-05-17 16:42:26 +02:00
Gerrit Edzards
ed90d68fab
Updated readme AMD-6099 2021-04-28 14:59:24 +02:00
Marco Batzinger
ed1788f9a2 adjusted create_msi.ps1 2021-04-15 13:31:31 +02:00
Marco Batzinger
5d6249a4f6 fixed bug 2021-04-15 13:31:15 +02:00
56 changed files with 577 additions and 1054 deletions

45
.github/workflows/build.yml vendored Normal file
View file

@ -0,0 +1,45 @@
name: Build
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_call:
jobs:
build:
runs-on: windows-latest
env:
solution: AmagnoVirtualPrinter.sln
configuration: Release
certificatepassword: ${{ secrets.CERTIFICATEPASSWORD }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Add MSBuild to the PATH
uses: microsoft/setup-msbuild@v1
- name: Restore the application
run: msbuild $env:solution /m /t:Restore /p:Configuration=$env:configuration
- name: Build solution
run: msbuild $env:solution /m /t:Rebuild /p:Configuration=$env:configuration
- name: Sign setup files with PowerShell Script
shell: powershell
run: powershell -file .\$GITHUB_WORKSPACE\sign_files.ps1 -Path .\$GITHUB_WORKSPACE\Files -CertPath .\$GITHUB_WORKSPACE\codeSigningCert.pfx -CertPwd $env:certificatepassword
- name: Create msi with PowerShell Script
run: pwsh -command ".\$GITHUB_WORKSPACE\create_msi.ps1"
- name: Sign msi with PowerShell Script
shell: powershell
run: powershell -file .\$GITHUB_WORKSPACE\sign_setup.ps1 -CertPath .\$GITHUB_WORKSPACE\codeSigningCert.pfx -CertPwd $env:certificatepassword
- name: Upload files artifact
uses: actions/upload-artifact@v3
with:
name: files
path: files/**/*
- name: Upload installer artifact
uses: actions/upload-artifact@v3
with:
name: installer
path: ${{github.workspace}}\AmagnoPrinterInstaller.msi

View file

@ -1,43 +0,0 @@
name: .NET Core Desktop
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
strategy:
matrix:
configuration: [Release]
runs-on: windows-latest
env:
Solution_Name: AmagnoVirtualPrinter.sln
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
# Install the .NET Core workload
- name: Install .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.x
# Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild
- name: Setup MSBuild.exe
uses: microsoft/setup-msbuild@v1
- name: Restore the application
run: msbuild $env:Solution_Name /t:Restore /p:Configuration=$env:Configuration
env:
Configuration: ${{ matrix.configuration }}
- name: Build solution
run: msbuild $env:Solution_Name /t:Rebuild /p:Configuration=$env:Configuration
env:
Configuration: ${{ matrix.configuration }}

28
.github/workflows/release.yml vendored Normal file
View file

@ -0,0 +1,28 @@
name: Release
on:
push:
tags:
- '*'
jobs:
call-build:
uses: ./.github/workflows/build.yml
secrets: inherit
release:
runs-on: windows-latest
needs: call-build
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: installer
- name: Create Release
uses: ncipollo/release-action@v1.7.3
with:
artifacts: ./AmagnoPrinterInstaller.msi
token: ${{ secrets.GITHUB_TOKEN }}

View file

@ -1,20 +0,0 @@
name: Releases
on:
push:
tags:
- '*'
jobs:
build:
runs-on: windows-latest
steps:
- name: Create msi from PowerShell Script
run: pwsh -command ".\$GITHUB_WORKSPACE\create_msi.ps1"
- name: Create Release
uses: ncipollo/release-action@v1.7.3
with:
artifact: ./AmagnoPrinterInstaller.msi
token: ${{ secrets.GITHUB_TOKEN }

2
.gitignore vendored
View file

@ -17,6 +17,7 @@
mono_crash.*
# Build results
*.msi
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
@ -235,7 +236,6 @@ ClientBin/
*.dbmdl
*.dbproj.schemaview
*.jfm
*.pfx
*.publishsettings
orleans.codegen.cs

View file

@ -1,74 +1,23 @@
<?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')" />
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{3D3A379B-F9B8-466D-A04D-FD5EF948FF1C}</ProjectGuid>
<TargetFramework>net472</TargetFramework>
<OutputType>Exe</OutputType>
<RootNamespace>AmagnoVirtualPrinter.Agent.Console</RootNamespace>
<AssemblyName>AmagnoVirtualPrinter.AgentConsole</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>none</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.CSharp" />
<Reference Include="System" />
<Reference Include="System.ComponentModel.Composition" />
<Reference Include="System.Core" />
<ProjectReference Include="..\..\Common\AmagnoVirtualPrinter.Agent.Autofac\AmagnoVirtualPrinter.Agent.Autofac.csproj" />
<ProjectReference Include="..\..\Common\AmagnoVirtualPrinter.Agent.Core\AmagnoVirtualPrinter.Agent.Core.csproj" />
<ProjectReference Include="..\..\Common\AmagnoVirtualPrinter.Logging\AmagnoVirtualPrinter.Logging.csproj" />
<ProjectReference Include="..\..\UI\AmagnoVirtualPrinter.ProgressInfo.Autofac\AmagnoVirtualPrinter.ProgressInfo.Autofac.csproj" />
</ItemGroup>
<ItemGroup>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Common\AmagnoVirtualPrinter.Agent.Autofac\AmagnoVirtualPrinter.Agent.Autofac.csproj">
<Project>{1b2f0781-82d7-4576-b936-c6a26053d6ed}</Project>
<Name>AmagnoVirtualPrinter.Agent.Autofac</Name>
</ProjectReference>
<ProjectReference Include="..\..\Common\AmagnoVirtualPrinter.Agent.Core\AmagnoVirtualPrinter.Agent.Core.csproj">
<Project>{135c85eb-2116-4cc4-8ccb-b6804b9d6467}</Project>
<Name>AmagnoVirtualPrinter.Agent.Core</Name>
</ProjectReference>
<ProjectReference Include="..\..\Common\AmagnoVirtualPrinter.Agent.Lib\AmagnoVirtualPrinter.Agent.Lib.csproj">
<Project>{94e8105f-5001-403b-b9f1-b0b0b236ad65}</Project>
<Name>AmagnoVirtualPrinter.Agent.Lib</Name>
</ProjectReference>
<ProjectReference Include="..\..\Common\AmagnoVirtualPrinter.Logging\AmagnoVirtualPrinter.Logging.csproj">
<Project>{aa25364d-22d5-44b0-86a5-6fb14c686308}</Project>
<Name>AmagnoVirtualPrinter.Logging</Name>
</ProjectReference>
<ProjectReference Include="..\..\UI\AmagnoVirtualPrinter.ProgressInfo.Autofac\AmagnoVirtualPrinter.ProgressInfo.Autofac.csproj">
<Project>{17e2cf8a-462c-4130-9faf-f1ca5fc4e06d}</Project>
<Name>AmagnoVirtualPrinter.ProgressInfo.Autofac</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Autofac" Version="6.0.0" />
<PackageReference Include="Autofac" Version="6.5.0" />
<PackageReference Include="Cassia" Version="3.0.0-alpha.9" />
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="5.0.0-rc.2.20475.5" />
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="5.0.0-rc.2.20475.5" />
<PackageReference Include="System.Threading.Tasks.Extensions" Version="4.5.4" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View file

@ -31,5 +31,5 @@ using System.Runtime.InteropServices;
// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
// übernehmen, indem Sie "*" eingeben:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyVersion("1.0.3")]
[assembly: AssemblyFileVersion("1.0.3")]

View file

@ -1,16 +1,8 @@
<?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')" />
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{8C4F0640-4628-4CEA-8E31-143D68A3A70F}</ProjectGuid>
<TargetFramework>net472</TargetFramework>
<OutputType>WinExe</OutputType>
<RootNamespace>AmagnoVirtualPrinter.Agent.Service</RootNamespace>
<AssemblyName>AmagnoPrinterAgent</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
@ -26,79 +18,35 @@
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<UseWPF>true</UseWPF>
<ImportWindowsDesktopTargets>true</ImportWindowsDesktopTargets>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>none</DebugType>
<Optimize>true</Optimize>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<OutputPath>..\..\Files\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<StartupObject>AmagnoVirtualPrinter.Agent.Service.Program</StartupObject>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.CSharp" />
<Reference Include="PresentationCore" />
<Reference Include="System" />
<Reference Include="System.ComponentModel.Composition" />
<Reference Include="System.Configuration.Install" />
<Reference Include="System.ServiceProcess" />
<Reference Include="WindowsBase" />
</ItemGroup>
<ItemGroup>
<Compile Include="ProjectInstaller.cs">
<Compile Update="ProjectInstaller.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="ProjectInstaller.Designer.cs">
<DependentUpon>ProjectInstaller.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="AmagnoVirtualPrinterService.cs">
<Compile Update="AmagnoVirtualPrinterService.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="AmagnoVirtualPrinterService.Designer.cs" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="ProjectInstaller.resx">
<DependentUpon>ProjectInstaller.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="AmagnoVirtualPrinterService.resx" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Common\AmagnoVirtualPrinter.Agent.Autofac\AmagnoVirtualPrinter.Agent.Autofac.csproj">
<Project>{1b2f0781-82d7-4576-b936-c6a26053d6ed}</Project>
<Name>AmagnoVirtualPrinter.Agent.Autofac</Name>
</ProjectReference>
<ProjectReference Include="..\..\Common\AmagnoVirtualPrinter.Agent.Core\AmagnoVirtualPrinter.Agent.Core.csproj">
<Project>{135c85eb-2116-4cc4-8ccb-b6804b9d6467}</Project>
<Name>AmagnoVirtualPrinter.Agent.Core</Name>
</ProjectReference>
<ProjectReference Include="..\..\Common\AmagnoVirtualPrinter.Agent.Lib\AmagnoVirtualPrinter.Agent.Lib.csproj">
<Project>{94e8105f-5001-403b-b9f1-b0b0b236ad65}</Project>
<Name>AmagnoVirtualPrinter.Agent.Lib</Name>
</ProjectReference>
<ProjectReference Include="..\..\Common\AmagnoVirtualPrinter.Logging\AmagnoVirtualPrinter.Logging.csproj">
<Project>{aa25364d-22d5-44b0-86a5-6fb14c686308}</Project>
<Name>AmagnoVirtualPrinter.Logging</Name>
</ProjectReference>
<ProjectReference Include="..\..\UI\AmagnoVirtualPrinter.ProgressInfo.Autofac\AmagnoVirtualPrinter.ProgressInfo.Autofac.csproj">
<Project>{17e2cf8a-462c-4130-9faf-f1ca5fc4e06d}</Project>
<Name>AmagnoVirtualPrinter.ProgressInfo.Autofac</Name>
</ProjectReference>
<ProjectReference Include="..\..\Common\AmagnoVirtualPrinter.Agent.Autofac\AmagnoVirtualPrinter.Agent.Autofac.csproj" />
<ProjectReference Include="..\..\Common\AmagnoVirtualPrinter.Agent.Core\AmagnoVirtualPrinter.Agent.Core.csproj" />
<ProjectReference Include="..\..\Common\AmagnoVirtualPrinter.Logging\AmagnoVirtualPrinter.Logging.csproj" />
<ProjectReference Include="..\..\UI\AmagnoVirtualPrinter.ProgressInfo.Autofac\AmagnoVirtualPrinter.ProgressInfo.Autofac.csproj" />
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include=".NETFramework,Version=v4.6.1">
@ -113,15 +61,9 @@
</BootstrapperPackage>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Autofac" Version="6.0.0" />
<PackageReference Include="JetBrains.Annotations" Version="2020.1.0" />
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="5.0.0-rc.2.20475.5" />
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="5.0.0-rc.2.20475.5" />
<PackageReference Include="Autofac" Version="6.5.0" />
<PackageReference Include="JetBrains.Annotations" Version="2022.3.1" />
<PackageReference Include="System.Threading.Tasks.Extensions" Version="4.5.4" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>
</PostBuildEvent>
</PropertyGroup>
<PropertyGroup />
</Project>

View file

@ -15,8 +15,8 @@ using System.Runtime.InteropServices;
[assembly: Guid("8c4f0640-4628-4cea-8e31-143d68a3a70f")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyVersion("1.0.3")]
[assembly: AssemblyFileVersion("1.0.3")]
// For testing
[assembly: InternalsVisibleTo("AmagnoVirtualPrinter.Test")]

View file

@ -1,77 +1,33 @@
<?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')" />
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{74FA80B3-7CF1-4B68-8AA3-4C3D37BBE855}</ProjectGuid>
<TargetFramework>net472</TargetFramework>
<OutputType>Exe</OutputType>
<RootNamespace>AmagnoVirtualPrinter.Delivery</RootNamespace>
<AssemblyName>delivery</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<UseWPF>true</UseWPF>
<ImportWindowsDesktopTargets>true</ImportWindowsDesktopTargets>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>none</DebugType>
<Optimize>true</Optimize>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<OutputPath>..\..\Files</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<StartupObject>AmagnoVirtualPrinter.Delivery.Program</StartupObject>
</PropertyGroup>
<ItemGroup>
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
<Reference Include="ReachFramework" />
<Reference Include="System" />
<Reference Include="System.Printing" />
<Reference Include="WindowsBase" />
</ItemGroup>
<ItemGroup>
<Compile Include="GhostScriptRedirector.cs" />
<Compile Include="Redirector.cs" />
</ItemGroup>
<ItemGroup>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Common\AmagnoVirtualPrinter.Logging\AmagnoVirtualPrinter.Logging.csproj">
<Project>{aa25364d-22d5-44b0-86a5-6fb14c686308}</Project>
<Name>AmagnoVirtualPrinter.Logging</Name>
</ProjectReference>
<ProjectReference Include="..\..\Common\AmagnoVirtualPrinter.Utils\AmagnoVirtualPrinter.Utils.csproj">
<Project>{cd1c8e9d-5335-41ac-b0c0-88fd7c7c55f3}</Project>
<Name>AmagnoVirtualPrinter.Utils</Name>
</ProjectReference>
<ProjectReference Include="..\..\Common\AmagnoVirtualPrinter.Logging\AmagnoVirtualPrinter.Logging.csproj">
<Project>{AA25364D-22D5-44B0-86A5-6FB14C686308}</Project>
<Name>AmagnoVirtualPrinter.Logging</Name>
</ProjectReference>
<ProjectReference Include="..\..\Common\AmagnoVirtualPrinter.Utils\AmagnoVirtualPrinter.Utils.csproj">
<Project>{cd1c8e9d-5335-41ac-b0c0-88fd7c7c55f3}</Project>
<Name>AmagnoVirtualPrinter.Utils</Name>
</ProjectReference>
<ProjectReference Include="..\..\Common\AmagnoVirtualPrinter.Logging\AmagnoVirtualPrinter.Logging.csproj" />
<ProjectReference Include="..\..\Common\AmagnoVirtualPrinter.Utils\AmagnoVirtualPrinter.Utils.csproj" />
<ProjectReference Include="..\..\Common\AmagnoVirtualPrinter.Logging\AmagnoVirtualPrinter.Logging.csproj" />
<ProjectReference Include="..\..\Common\AmagnoVirtualPrinter.Utils\AmagnoVirtualPrinter.Utils.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="JetBrains.Annotations">
<Version>2020.1.0</Version>
<Version>2022.3.1</Version>
</PackageReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View file

@ -45,6 +45,7 @@ namespace AmagnoVirtualPrinter.Delivery
if (ghostScriptExe == null)
{
logger.Error("Can not find Ghostscript.");
throw new FileNotFoundException("Can not find Ghostscript.");
}

View file

@ -14,5 +14,5 @@ using System.Runtime.InteropServices;
[assembly: Guid("74fa80b3-7cf1-4b68-8aa3-4c3d37bbe855")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyVersion("1.0.3")]
[assembly: AssemblyFileVersion("1.0.3")]

View file

@ -1,4 +1,4 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.30114.105
@ -13,7 +13,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AmagnoVirtualPrinter.Agent.
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AmagnoVirtualPrinter.Agent.Lib", "Common\AmagnoVirtualPrinter.Agent.Lib\AmagnoVirtualPrinter.Agent.Lib.csproj", "{94E8105F-5001-403B-B9F1-B0B0B236AD65}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AmagnoVirtualPrinter.Agent.Autofac", "Common\AmagnoVirtualPrinter.Agent.Autofac\AmagnoVirtualPrinter.Agent.Autofac.csproj", "{1B2F0781-82D7-4576-B936-C6A26053D6ED}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AmagnoVirtualPrinter.Agent.Autofac", "Common\AmagnoVirtualPrinter.Agent.Autofac\AmagnoVirtualPrinter.Agent.Autofac.csproj", "{1B2F0781-82D7-4576-B936-C6A26053D6ED}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Agent", "Agent", "{E801472E-AAD2-4255-AA2F-F48DC4445B0B}"
EndProject
@ -27,11 +27,11 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AmagnoVirtualPrinter.Progre
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AmagnoVirtualPrinter.ProgressInfo.Core", "UI\AmagnoVirtualPrinter.ProgressInfo.Core\AmagnoVirtualPrinter.ProgressInfo.Core.csproj", "{24D28558-C825-43E6-85D2-7C59F4A97698}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AmagnoVirtualPrinter.Agent.Core", "Common\AmagnoVirtualPrinter.Agent.Core\AmagnoVirtualPrinter.Agent.Core.csproj", "{135C85EB-2116-4CC4-8CCB-B6804B9D6467}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AmagnoVirtualPrinter.Agent.Core", "Common\AmagnoVirtualPrinter.Agent.Core\AmagnoVirtualPrinter.Agent.Core.csproj", "{135C85EB-2116-4CC4-8CCB-B6804B9D6467}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AmagnoVirtualPrinter.Utils", "Common\AmagnoVirtualPrinter.Utils\AmagnoVirtualPrinter.Utils.csproj", "{CD1C8E9D-5335-41AC-B0C0-88FD7C7C55F3}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AmagnoVirtualPrinter.Logging", "Common\AmagnoVirtualPrinter.Logging\AmagnoVirtualPrinter.Logging.csproj", "{AA25364D-22D5-44B0-86A5-6FB14C686308}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AmagnoVirtualPrinter.Logging", "Common\AmagnoVirtualPrinter.Logging\AmagnoVirtualPrinter.Logging.csproj", "{AA25364D-22D5-44B0-86A5-6FB14C686308}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AmagnoVirtualPrinter.WixSharpInstaller", "Installer\AmagnoVirtualPrinter.WixSharpInstaller\AmagnoVirtualPrinter.WixSharpInstaller.csproj", "{A668846E-54C7-483D-9CF7-48F77EA398CA}"
@ -40,6 +40,12 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Installer", "Installer", "{
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Common", "Common", "{95284260-12AD-4C69-BF4B-6B3A7BA5627C}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{CD57AFC1-AD22-4A86-A9D9-26D2074BF75D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AmagnoVirtualPrinter.Utils.UnitTests", "Tests\AmagnoVirtualPrinter.Utils.UnitTests\AmagnoVirtualPrinter.Utils.UnitTests.csproj", "{2349BD8A-03E5-4226-B3C6-56C2F718B7CB}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AmagnoVirtualPrinter.Agent.Lib.Tests", "Tests\AmagnoVirtualPrinter.Agent.Lib.Tests\AmagnoVirtualPrinter.Agent.Lib.Tests.csproj", "{36CD25FD-B1E2-4C87-970F-A40CCC961390}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -218,6 +224,30 @@ Global
{CD1C8E9D-5335-41AC-B0C0-88FD7C7C55F3}.Release|x64.Build.0 = Release|Any CPU
{CD1C8E9D-5335-41AC-B0C0-88FD7C7C55F3}.Release|x86.ActiveCfg = Release|Any CPU
{CD1C8E9D-5335-41AC-B0C0-88FD7C7C55F3}.Release|x86.Build.0 = Release|Any CPU
{2349BD8A-03E5-4226-B3C6-56C2F718B7CB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2349BD8A-03E5-4226-B3C6-56C2F718B7CB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2349BD8A-03E5-4226-B3C6-56C2F718B7CB}.Debug|x64.ActiveCfg = Debug|Any CPU
{2349BD8A-03E5-4226-B3C6-56C2F718B7CB}.Debug|x64.Build.0 = Debug|Any CPU
{2349BD8A-03E5-4226-B3C6-56C2F718B7CB}.Debug|x86.ActiveCfg = Debug|Any CPU
{2349BD8A-03E5-4226-B3C6-56C2F718B7CB}.Debug|x86.Build.0 = Debug|Any CPU
{2349BD8A-03E5-4226-B3C6-56C2F718B7CB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2349BD8A-03E5-4226-B3C6-56C2F718B7CB}.Release|Any CPU.Build.0 = Release|Any CPU
{2349BD8A-03E5-4226-B3C6-56C2F718B7CB}.Release|x64.ActiveCfg = Release|Any CPU
{2349BD8A-03E5-4226-B3C6-56C2F718B7CB}.Release|x64.Build.0 = Release|Any CPU
{2349BD8A-03E5-4226-B3C6-56C2F718B7CB}.Release|x86.ActiveCfg = Release|Any CPU
{2349BD8A-03E5-4226-B3C6-56C2F718B7CB}.Release|x86.Build.0 = Release|Any CPU
{36CD25FD-B1E2-4C87-970F-A40CCC961390}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{36CD25FD-B1E2-4C87-970F-A40CCC961390}.Debug|Any CPU.Build.0 = Debug|Any CPU
{36CD25FD-B1E2-4C87-970F-A40CCC961390}.Debug|x64.ActiveCfg = Debug|Any CPU
{36CD25FD-B1E2-4C87-970F-A40CCC961390}.Debug|x64.Build.0 = Debug|Any CPU
{36CD25FD-B1E2-4C87-970F-A40CCC961390}.Debug|x86.ActiveCfg = Debug|Any CPU
{36CD25FD-B1E2-4C87-970F-A40CCC961390}.Debug|x86.Build.0 = Debug|Any CPU
{36CD25FD-B1E2-4C87-970F-A40CCC961390}.Release|Any CPU.ActiveCfg = Release|Any CPU
{36CD25FD-B1E2-4C87-970F-A40CCC961390}.Release|Any CPU.Build.0 = Release|Any CPU
{36CD25FD-B1E2-4C87-970F-A40CCC961390}.Release|x64.ActiveCfg = Release|Any CPU
{36CD25FD-B1E2-4C87-970F-A40CCC961390}.Release|x64.Build.0 = Release|Any CPU
{36CD25FD-B1E2-4C87-970F-A40CCC961390}.Release|x86.ActiveCfg = Release|Any CPU
{36CD25FD-B1E2-4C87-970F-A40CCC961390}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@ -237,6 +267,8 @@ Global
{A668846E-54C7-483D-9CF7-48F77EA398CA} = {5EE0067B-1ED5-44FB-941D-8F4B039FDD2E}
{AA25364D-22D5-44B0-86A5-6FB14C686308} = {95284260-12AD-4C69-BF4B-6B3A7BA5627C}
{CD1C8E9D-5335-41AC-B0C0-88FD7C7C55F3} = {95284260-12AD-4C69-BF4B-6B3A7BA5627C}
{2349BD8A-03E5-4226-B3C6-56C2F718B7CB} = {CD57AFC1-AD22-4A86-A9D9-26D2074BF75D}
{36CD25FD-B1E2-4C87-970F-A40CCC961390} = {CD57AFC1-AD22-4A86-A9D9-26D2074BF75D}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {52642DB4-40BC-4C37-880C-73F24AE287ED}

View file

@ -1,81 +1,30 @@
<?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')" />
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{1B2F0781-82D7-4576-B936-C6A26053D6ED}</ProjectGuid>
<TargetFramework>net472</TargetFramework>
<OutputType>Library</OutputType>
<RootNamespace>AmagnoVirtualPrinter.Agent.Autofac</RootNamespace>
<AssemblyName>AmagnoVirtualPrinter.Agent.Autofac</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>none</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\..\Files\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<StartupObject />
<AssemblyTitle>AmagnoVirtualPrinter.Agent.Autofac</AssemblyTitle>
<Company>Amagno</Company>
<AssemblyVersion>1.0.3</AssemblyVersion>
<FileVersion>1.0.3</FileVersion>
</PropertyGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="VirtualPrinterModule.cs" />
<ProjectReference Include="..\AmagnoVirtualPrinter.Agent.Core\AmagnoVirtualPrinter.Agent.Core.csproj" />
<ProjectReference Include="..\AmagnoVirtualPrinter.Agent.Lib\AmagnoVirtualPrinter.Agent.Lib.csproj" />
<ProjectReference Include="..\AmagnoVirtualPrinter.Utils\AmagnoVirtualPrinter.Utils.csproj" />
</ItemGroup>
<ItemGroup>
<Reference Include="Microsoft.CSharp" />
<Reference Include="System" />
<Reference Include="System.ComponentModel.Composition" />
<Reference Include="System.Configuration" />
<Reference Include="System.Data" />
<Reference Include="System.IO.Compression" />
<Reference Include="System.Printing" />
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.ServiceModel" />
<Reference Include="System.Transactions" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\AmagnoVirtualPrinter.Agent.Core\AmagnoVirtualPrinter.Agent.Core.csproj">
<Project>{135c85eb-2116-4cc4-8ccb-b6804b9d6467}</Project>
<Name>AmagnoVirtualPrinter.Agent.Core</Name>
</ProjectReference>
<ProjectReference Include="..\AmagnoVirtualPrinter.Agent.Lib\AmagnoVirtualPrinter.Agent.Lib.csproj">
<Project>{94e8105f-5001-403b-b9f1-b0b0b236ad65}</Project>
<Name>AmagnoVirtualPrinter.Agent.Lib</Name>
</ProjectReference>
<ProjectReference Include="..\AmagnoVirtualPrinter.Logging\AmagnoVirtualPrinter.Logging.csproj">
<Project>{aa25364d-22d5-44b0-86a5-6fb14c686308}</Project>
<Name>AmagnoVirtualPrinter.Logging</Name>
</ProjectReference>
<ProjectReference Include="..\AmagnoVirtualPrinter.Utils\AmagnoVirtualPrinter.Utils.csproj">
<Project>{cd1c8e9d-5335-41ac-b0c0-88fd7c7c55f3}</Project>
<Name>AmagnoVirtualPrinter.Utils</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Autofac" Version="6.0.0" />
<PackageReference Include="Autofac.Extras.NLog" Version="4.0.0" />
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="5.0.0-rc.2.20475.5" />
<PackageReference Include="Autofac" Version="6.5.0" />
<PackageReference Include="Autofac.Extras.NLog" Version="4.0.1" />
<PackageReference Include="NLog" Version="4.6.1" />
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="5.0.0-rc.2.20475.5" />
<PackageReference Include="System.Threading.Tasks.Extensions" Version="4.5.4" />
<PackageReference Include="System.Configuration.ConfigurationManager" Version="7.0.0" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View file

@ -1,15 +1,5 @@
using System.Reflection;
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("AmagnoVirtualPrinter.Agent.Autofac")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Amagno")]
[assembly: AssemblyProduct("")]
[assembly: AssemblyCopyright("")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
@ -20,13 +10,3 @@ using System.Runtime.InteropServices;
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("fc76a2af-b0db-4ec8-a6b7-dbd25d461ab5")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View file

@ -1,77 +1,22 @@
<?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')" />
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{135C85EB-2116-4CC4-8CCB-B6804B9D6467}</ProjectGuid>
<TargetFramework>net472</TargetFramework>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>AmagnoVirtualPrinter.Agent.Core</RootNamespace>
<AssemblyName>AmagnoVirtualPrinter.Agent.Core</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<AssemblyTitle>AmagnoVirtualPrinter.Agent.Core</AssemblyTitle>
<Company>Amagno</Company>
<AssemblyVersion>1.0.3</AssemblyVersion>
<FileVersion>1.0.3</FileVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>none</DebugType>
<Optimize>true</Optimize>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<OutputPath>..\..\Files\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="ReachFramework" />
<Reference Include="System" />
<Reference Include="System.Core" />
<PackageReference Include="JetBrains.Annotations" Version="2022.3.1" />
</ItemGroup>
<ItemGroup>
<Reference Include="System.Printing" />
</ItemGroup>
<ItemGroup>
<Compile Include="Enums\IntermediateFormat.cs" />
<Compile Include="Interfaces\IDirectoryHelper.cs" />
<Compile Include="Interfaces\IConfig.cs" />
<Compile Include="Interfaces\IExConfig.cs" />
<Compile Include="Interfaces\IJob.cs" />
<Compile Include="Interfaces\IJobFactory.cs" />
<Compile Include="Interfaces\IJobInfo.cs" />
<Compile Include="Interfaces\IJobProcessor.cs" />
<Compile Include="Interfaces\IJobRedirector.cs" />
<Compile Include="Interfaces\IJobService.cs" />
<Compile Include="Interfaces\IPostScriptConverter.cs" />
<Compile Include="Interfaces\IRegistryRepository.cs" />
<Compile Include="Interfaces\ISessionInfo.cs" />
<Compile Include="Interfaces\IShell.cs" />
<Compile Include="Interfaces\IUserConfig.cs" />
<Compile Include="Interfaces\IAmagnoVirtualPrinter.cs" />
<Compile Include="Interfaces\IAmagnoVirtualPrinterService.cs" />
<Compile Include="Interfaces\JobStatus.cs" />
<Compile Include="Model\JobInfo.cs" />
<Compile Include="Model\PostScriptConversionException.cs" />
<Compile Include="Model\PostScriptRenderOptions.cs" />
<Compile Include="Model\PostScriptRenderPdfOptions.cs" />
<Compile Include="Model\PostScriptRenderTiffOptions.cs" />
<Compile Include="Model\ProgressUpdateArgs.cs" />
<Compile Include="Model\RegistryConfig.cs" />
<Compile Include="Model\UserRegistryConfig.cs" />
<Compile Include="Model\PrintExts.cs" />
<Compile Include="Model\PrintStatus.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Model\SessionInfo.cs" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="JetBrains.Annotations" Version="2020.1.0" />
</ItemGroup>
<ItemGroup>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View file

@ -2,12 +2,14 @@
namespace AmagnoVirtualPrinter.Agent.Core.Model
{
public struct SessionInfo : ISessionInfo
public class SessionInfo : ISessionInfo
{
public int Id { get; set; }
public string Desktop { get; set; }
public string Sid { get; set; }
public bool FoundDomain { get; set; }
}
}

View file

@ -1,15 +1,5 @@
using System.Reflection;
using System.Runtime.InteropServices;
// Allgemeine Informationen über eine Assembly werden über die folgenden
// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
// die einer Assembly zugeordnet sind.
[assembly: AssemblyTitle("AmagnoVirtualPrinter.Agent.Core")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Amagno")]
[assembly: AssemblyProduct("")]
[assembly: AssemblyCopyright("")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
@ -20,16 +10,3 @@ using System.Runtime.InteropServices;
// Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird
[assembly: Guid("135c85eb-2116-4cc4-8ccb-b6804b9d6467")]
// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
//
// Hauptversion
// Nebenversion
// Buildnummer
// Revision
//
// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
// indem Sie "*" wie unten gezeigt eingeben:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View file

@ -1,100 +1,39 @@
<?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')" />
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{94E8105F-5001-403B-B9F1-B0B0B236AD65}</ProjectGuid>
<TargetFramework>net472</TargetFramework>
<OutputType>Library</OutputType>
<RootNamespace>AmagnoVirtualPrinter.Agent.Lib</RootNamespace>
<AssemblyName>AmagnoVirtualPrinter.Agent.Lib</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<UseWPF>true</UseWPF>
<ImportWindowsDesktopTargets>true</ImportWindowsDesktopTargets>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>none</DebugType>
<Optimize>true</Optimize>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<OutputPath>..\..\Files\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<StartupObject />
</PropertyGroup>
<ItemGroup>
<Compile Include="Misc\GhostScriptConverter.cs" />
<Compile Include="Misc\JobProcessor.cs" />
<Compile Include="Misc\JobRedirector.cs" />
<Compile Include="Misc\Job.cs" />
<Compile Include="Misc\JobFactory.cs" />
<Compile Include="Misc\JobService.cs" />
<Compile Include="Misc\VirtualTcpInputPrinter.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="AmagnoVirtualPrinterService.cs" />
</ItemGroup>
<ItemGroup>
<Reference Include="Microsoft.CSharp" />
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
<Reference Include="System" />
<Reference Include="System.ComponentModel.Composition" />
<Reference Include="System.Configuration" />
<Reference Include="System.Data" />
<Reference Include="System.Drawing" />
<Reference Include="System.IO.Compression" />
<Reference Include="System.Printing" />
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.ServiceModel" />
<Reference Include="System.Transactions" />
<Reference Include="System.Xml" />
<Reference Include="WindowsBase" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Agent\AmagnoVirtualPrinter.Delivery\AmagnoVirtualPrinter.Delivery.csproj">
<Project>{74fa80b3-7cf1-4b68-8aa3-4c3d37bbe855}</Project>
<Name>AmagnoVirtualPrinter.Delivery</Name>
</ProjectReference>
<ProjectReference Include="..\..\Installer\AmagnoVirtualPrinter.SetupDriver\AmagnoVirtualPrinter.SetupDriver.csproj">
<Project>{12402f90-a2ae-4549-9142-f90650e2082a}</Project>
<Name>AmagnoVirtualPrinter.SetupDriver</Name>
</ProjectReference>
<ProjectReference Include="..\..\UI\AmagnoVirtualPrinter.ProgressInfo.Core\AmagnoVirtualPrinter.ProgressInfo.Core.csproj">
<Project>{24d28558-c825-43e6-85d2-7c59f4a97698}</Project>
<Name>AmagnoVirtualPrinter.ProgressInfo.Core</Name>
</ProjectReference>
<ProjectReference Include="..\AmagnoVirtualPrinter.Agent.Core\AmagnoVirtualPrinter.Agent.Core.csproj">
<Project>{135c85eb-2116-4cc4-8ccb-b6804b9d6467}</Project>
<Name>AmagnoVirtualPrinter.Agent.Core</Name>
</ProjectReference>
<ProjectReference Include="..\AmagnoVirtualPrinter.Logging\AmagnoVirtualPrinter.Logging.csproj">
<Project>{aa25364d-22d5-44b0-86a5-6fb14c686308}</Project>
<Name>AmagnoVirtualPrinter.Logging</Name>
</ProjectReference>
<ProjectReference Include="..\AmagnoVirtualPrinter.Utils\AmagnoVirtualPrinter.Utils.csproj">
<Project>{cd1c8e9d-5335-41ac-b0c0-88fd7c7c55f3}</Project>
<Name>AmagnoVirtualPrinter.Utils</Name>
</ProjectReference>
<ProjectReference Include="..\..\Agent\AmagnoVirtualPrinter.Delivery\AmagnoVirtualPrinter.Delivery.csproj" />
<ProjectReference Include="..\..\Installer\AmagnoVirtualPrinter.SetupDriver\AmagnoVirtualPrinter.SetupDriver.csproj" />
<ProjectReference Include="..\..\UI\AmagnoVirtualPrinter.ProgressInfo.Core\AmagnoVirtualPrinter.ProgressInfo.Core.csproj" />
<ProjectReference Include="..\AmagnoVirtualPrinter.Agent.Core\AmagnoVirtualPrinter.Agent.Core.csproj" />
<ProjectReference Include="..\AmagnoVirtualPrinter.Logging\AmagnoVirtualPrinter.Logging.csproj" />
<ProjectReference Include="..\AmagnoVirtualPrinter.Utils\AmagnoVirtualPrinter.Utils.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Autofac" Version="6.0.0" />
<PackageReference Include="Cassia" Version="3.0.0-alpha.9" />
<PackageReference Include="JetBrains.Annotations" Version="2020.1.0" />
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="5.0.0-rc.2.20475.5" />
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="5.0.0-rc.2.20475.5" />
<PackageReference Include="System.Threading.Tasks.Extensions" Version="4.5.4" />
<PackageReference Include="JetBrains.Annotations" Version="2022.3.1" />
</ItemGroup>
<ItemGroup>
<Compile Remove="Model\ProgressUpdateArgs.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View file

@ -62,6 +62,7 @@ namespace AmagnoVirtualPrinter.Agent.Lib.Misc
if (ghostScriptExe == null)
{
_logger.Error("GhostScript not found.");
throw new PostScriptConversionException("GhostScript not found. Please place local variable.");
}

View file

@ -2,7 +2,6 @@
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Printing;
using System.Security.Principal;
using AmagnoVirtualPrinter.Agent.Core.Enums;
using AmagnoVirtualPrinter.Agent.Core.Interfaces;
@ -67,13 +66,15 @@ namespace AmagnoVirtualPrinter.Agent.Lib.Misc
{
var now = DateTime.Now;
var jobInfo = GetCurrentPrintJobs(printerName).FirstOrDefault();
var jobInfo = PrintJobReader.GetCurrentPrintJobs(printerName).FirstOrDefault();
if (jobInfo == null)
{
throw new InvalidOperationException();
}
var session = GetCurrentSessions(jobInfo).FirstOrDefault();
var sessions = GetCurrentSessions(jobInfo).ToArray();
var session = sessions.FirstOrDefault(s => s.FoundDomain) ?? sessions.FirstOrDefault();
var config = _registryRepository.GetRegistryConfig();
var userConfig = _registryRepository.GetUserRegistryConfig(session.Sid);
var root = _directoryHelper.GetOutputDirectory(userConfig);
@ -144,11 +145,11 @@ namespace AmagnoVirtualPrinter.Agent.Lib.Misc
{
var domain = job.DomainName;
var machine = job.MachineName?.TrimStart('\\');
var user = job.UserName;
var username = job.UserName;
LogDebug($"Searching for session of {domain}\\{user} on {machine} !");
LogDebug($"Searching for session of {domain}\\{username} on {machine}!");
if (domain == null || machine == null || user == null)
if (domain == null || machine == null || username == null)
{
yield break;
}
@ -159,7 +160,7 @@ namespace AmagnoVirtualPrinter.Agent.Lib.Misc
var sessions = server.GetSessions().Where(s => s.UserName != null && s.DomainName != null);
foreach (var session in sessions)
{
if (!session.UserName.Equals(user, cmp))
if (!session.UserName.Equals(username, cmp))
{
continue;
}
@ -168,7 +169,7 @@ namespace AmagnoVirtualPrinter.Agent.Lib.Misc
var isDomainUser = session.DomainName.Equals(domain, cmp);
if (!isSingleUser && !isDomainUser)
{
continue;
LogWarn("Found Session {sessionId} for {username} but its not of domain {domain} or {machine}", session.SessionId, username, domain, machine);
}
var sessionId = session.SessionId;
@ -178,47 +179,13 @@ namespace AmagnoVirtualPrinter.Agent.Lib.Misc
{
Id = sessionId,
Desktop = desktopName,
Sid = account.Translate(typeof(SecurityIdentifier)).Value
Sid = account.Translate(typeof(SecurityIdentifier)).Value,
FoundDomain = isSingleUser || isDomainUser
};
}
}
}
[ItemNotNull]
private IEnumerable<IJobInfo> GetCurrentPrintJobs(string printerName)
{
using (var server = new LocalPrintServer())
{
using (var queue = server.GetPrintQueue(printerName))
{
using (var jobs = queue.GetPrintJobInfoCollection())
{
foreach (var job in jobs)
{
using (job)
{
var id = job.JobIdentifier;
var machine = server.Name;
var domain = Environment.UserDomainName;
var user = job.Submitter;
var name = job.Name;
yield return new JobInfo
{
JobId = id,
Name = name,
DomainName = domain,
MachineName = machine,
UserName = user,
Status = job.JobStatus,
DeviceName = queue.Name
};
}
}
}
}
}
}
[NotNull]
private string GetRawFileExtension(IntermediateFormat format)
{
@ -242,5 +209,10 @@ namespace AmagnoVirtualPrinter.Agent.Lib.Misc
{
_logger.Error(exception, message, args);
}
private void LogWarn(string message, params object[] args)
{
_logger.Warn(message, args);
}
}
}

View file

@ -5,9 +5,6 @@ using AmagnoVirtualPrinter.Delivery;
using AmagnoVirtualPrinter.Logging;
using JetBrains.Annotations;
using AmagnoVirtualPrinter.Agent.Core;
using AmagnoVirtualPrinter.Utils;
namespace AmagnoVirtualPrinter.Agent.Lib.Misc
{
public class JobRedirector : IJobRedirector

View file

@ -5,8 +5,6 @@ using AmagnoVirtualPrinter.Agent.Core.Interfaces;
using AmagnoVirtualPrinter.Agent.Core.Model;
using JetBrains.Annotations;
using AmagnoVirtualPrinter.Agent.Core;
namespace AmagnoVirtualPrinter.Agent.Lib.Misc
{
public class JobService : IJobService
@ -99,6 +97,7 @@ namespace AmagnoVirtualPrinter.Agent.Lib.Misc
public void Finish(IJob job)
{
var userConfig = _registryRepository.GetUserRegistryConfig(job.SessionInfo.Sid);
WriteJobFinishIni(job.IniDataPath, userConfig);
var iniFile = Path.GetFullPath(job.IniDataPath);

View file

@ -0,0 +1,47 @@
using System;
using System.Collections.Generic;
using System.Printing;
using AmagnoVirtualPrinter.Agent.Core.Interfaces;
using AmagnoVirtualPrinter.Agent.Core.Model;
using JetBrains.Annotations;
namespace AmagnoVirtualPrinter.Agent.Lib.Misc
{
public class PrintJobReader
{
[ItemNotNull]
public static IEnumerable<IJobInfo> GetCurrentPrintJobs(string printerName)
{
using (var server = new LocalPrintServer())
{
using (var queue = server.GetPrintQueue(printerName))
{
using (var jobs = queue.GetPrintJobInfoCollection())
{
foreach (var job in jobs)
{
using (job)
{
var id = job.JobIdentifier;
var machine = server.Name;
var domain = Environment.UserDomainName;
var user = job.Submitter;
var name = job.Name;
yield return new JobInfo
{
JobId = id,
Name = name,
DomainName = domain,
MachineName = machine,
UserName = user,
Status = job.JobStatus,
DeviceName = queue.Name
};
}
}
}
}
}
}
}
}

View file

@ -29,10 +29,13 @@ namespace AmagnoVirtualPrinter.Agent.Lib.Misc
[NotNull]
private readonly IJobProcessor _jobProcessor;
private IDirectoryHelper _directoryHelper;
private TcpListener _socket;
[NotNull]
private readonly IDirectoryHelper _directoryHelper;
private TcpListener _socket;
private FileSystemWatcher _watcher;
private string _outputDir;
public AmagnoVirtualTcpInputPrinter
(
@ -100,29 +103,30 @@ namespace AmagnoVirtualPrinter.Agent.Lib.Misc
LogDebug($"{remote} --> {local}");
job = _jobFactory.Create(printer, client.GetStream());
if (job == null)
{
LogError("Job could not be created.");
return;
}
}
LogDebug($"Temporarily printed '{job.RawDataPath}'!");
socket.BeginAcceptTcpClient(HandleClient, ar.AsyncState);
_jobService.Start(job);
RestartFileWatcherIfNeeded(job.SessionInfo.Sid);
if (job == null)
{
LogError("Job could not be created. Check your Printer Settings.");
}
else
{
LogDebug($"Temporarily printed '{job.RawDataPath}'!");
_jobService.Start(job);
RestartFileWatcherIfNeeded(job.SessionInfo.Sid);
}
}
private void RestartFileWatcherIfNeeded(string sid)
{
var config = GetUserRegistryConfig(sid);
var dir = _directoryHelper.GetOutputDirectory(config);
_outputDir = _directoryHelper.GetOutputDirectory(config);
if (_watcher == null || _watcher.Path != dir)
if (_watcher == null || _watcher.Path != _outputDir)
{
StartFileWatcher(dir);
StartFileWatcher(_outputDir);
}
}
@ -135,10 +139,8 @@ namespace AmagnoVirtualPrinter.Agent.Lib.Misc
}
var rawName = $"{Path.GetFileNameWithoutExtension(ini)}.ps";
var sessionInfo = _jobService.GetSessionInfo(ini);
var config = GetUserRegistryConfig(sessionInfo.Sid);
var dir = _directoryHelper.GetOutputDirectory(config);
var rawFile = Path.Combine(dir, rawName);
var rawFile = Path.Combine(_outputDir, rawName);
var status = _jobService.ReadStatus(ini);
if (status == PrintStatus.Resumed)
@ -157,14 +159,15 @@ namespace AmagnoVirtualPrinter.Agent.Lib.Misc
if (status == PrintStatus.Canceled)
{
LogDebug($"Deleting file on print status: {status}");
DeleteFiles(ini, dir, rawFile);
DeleteFiles(ini, _outputDir, rawFile);
}
var jobStatus = _jobService.ReadJobStatus(ini);
if (jobStatus == JobStatus.Completed || jobStatus == JobStatus.Failed)
{
LogDebug($"Deleting file on job status: {jobStatus}");
DeleteFiles(ini, dir, rawFile);
Thread.Sleep(1000);
DeleteFiles(ini, _outputDir, rawFile);
}
}

View file

@ -28,5 +28,5 @@ using System.Runtime.InteropServices;
// Build Number
// Revision
//
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyVersion("1.0.3")]
[assembly: AssemblyFileVersion("1.0.3")]

View file

@ -1,71 +1,33 @@
<?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')" />
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{AA25364D-22D5-44B0-86A5-6FB14C686308}</ProjectGuid>
<TargetFramework>net472</TargetFramework>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>AmagnoVirtualPrinter.Logging</RootNamespace>
<AssemblyName>AmagnoVirtualPrinter.Logging</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
<TargetFrameworkProfile />
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<AssemblyTitle>AmagnoVirtualPrinter.Logging</AssemblyTitle>
<Company>Amagno</Company>
<AssemblyVersion>1.0.3</AssemblyVersion>
<FileVersion>1.0.3</FileVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>none</DebugType>
<Optimize>true</Optimize>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<OutputPath>..\..\Files</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.ComponentModel.Composition" />
<Reference Include="System.Configuration" />
<Reference Include="System.Core" />
<Reference Include="System.IO.Compression" />
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.ServiceModel" />
<Reference Include="System.Transactions" />
<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="IVirtualPrinterLogger.cs" />
<Compile Include="LoggerModule.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="VirtualPrinterLogger.cs" />
</ItemGroup>
<ItemGroup>
<Content Include="NLog.config">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Autofac" Version="6.0.0" />
<PackageReference Include="Autofac.Extras.NLog" Version="4.0.0" />
<PackageReference Include="JetBrains.Annotations" Version="2020.1.0" />
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="5.0.0-rc.2.20475.5" />
<PackageReference Include="Autofac" Version="6.5.0" />
<PackageReference Include="Autofac.Extras.NLog" Version="4.0.1" />
<PackageReference Include="JetBrains.Annotations" Version="2022.3.1" />
<PackageReference Include="NLog" Version="4.6.1" />
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="5.0.0-rc.2.20475.5" />
<PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" />
<PackageReference Include="System.Threading.Tasks.Extensions" Version="4.5.4" />
<PackageReference Include="System.Configuration.ConfigurationManager" Version="7.0.0" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View file

@ -1,15 +1,5 @@
using System.Reflection;
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("AmagnoVirtualPrinter.Logging")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Amagno")]
[assembly: AssemblyProduct("")]
[assembly: AssemblyCopyright("")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
@ -20,16 +10,3 @@ using System.Runtime.InteropServices;
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("aa25364d-22d5-44b0-86a5-6fb14c686308")]
// 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")]

View file

@ -1,69 +1,23 @@
<?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')" />
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{CD1C8E9D-5335-41AC-B0C0-88FD7C7C55F3}</ProjectGuid>
<TargetFramework>net472</TargetFramework>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>AmagnoVirtualPrinter.Utils</RootNamespace>
<AssemblyName>AmagnoVirtualPrinter.Utils</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>none</DebugType>
<Optimize>true</Optimize>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<OutputPath>..\..\Files\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="mscorlib" />
<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" />
<ProjectReference Include="..\AmagnoVirtualPrinter.Agent.Core\AmagnoVirtualPrinter.Agent.Core.csproj" />
<ProjectReference Include="..\AmagnoVirtualPrinter.Logging\AmagnoVirtualPrinter.Logging.csproj" />
</ItemGroup>
<ItemGroup>
<Compile Include="Consts.cs" />
<Compile Include="DirectoryHelper.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="RegistryRepository.cs" />
<Compile Include="Shell.cs" />
<Compile Include="Win32Sys.cs" />
<Compile Include="Windows.cs" />
<PackageReference Include="JetBrains.Annotations" Version="2022.3.1" />
<PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\AmagnoVirtualPrinter.Agent.Core\AmagnoVirtualPrinter.Agent.Core.csproj">
<Project>{135c85eb-2116-4cc4-8ccb-b6804b9d6467}</Project>
<Name>AmagnoVirtualPrinter.Agent.Core</Name>
</ProjectReference>
<ProjectReference Include="..\AmagnoVirtualPrinter.Logging\AmagnoVirtualPrinter.Logging.csproj">
<Project>{aa25364d-22d5-44b0-86a5-6fb14c686308}</Project>
<Name>AmagnoVirtualPrinter.Logging</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Cassia" Version="3.0.0-alpha.9" />
<PackageReference Include="JetBrains.Annotations" Version="2020.1.0" />
<PackageReference Include="System.Security.Principal.Windows" Version="4.7.0" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View file

@ -31,5 +31,5 @@ using System.Runtime.InteropServices;
// 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")]
[assembly: AssemblyVersion("1.0.3")]
[assembly: AssemblyFileVersion("1.0.3")]

View file

@ -4,6 +4,7 @@ using System.Linq;
using AmagnoVirtualPrinter.Agent.Core.Enums;
using AmagnoVirtualPrinter.Agent.Core.Interfaces;
using AmagnoVirtualPrinter.Agent.Core.Model;
using AmagnoVirtualPrinter.Logging;
using JetBrains.Annotations;
using Microsoft.Win32;
@ -13,6 +14,8 @@ namespace AmagnoVirtualPrinter.Utils
public class RegistryRepository : IRegistryRepository
{
private const short DefaultServerPort = 9101;
private static readonly IVirtualPrinterLogger<RegistryRepository> Logger = new VirtualPrinterLogger<RegistryRepository>();
public bool TryGetGhostscriptPath(out string path)
{
@ -94,7 +97,7 @@ namespace AmagnoVirtualPrinter.Utils
}
[ContractAnnotation("key:null => void")]
private void CheckForNull(RegistryKey key, string keyName)
private static void CheckForNull(RegistryKey key, string keyName)
{
if (key == null)
{
@ -104,6 +107,8 @@ namespace AmagnoVirtualPrinter.Utils
public IUserConfig GetUserRegistryConfig(string sid)
{
Logger.Trace("GetUserRegistryConfig for {sid}", sid);
var regView = GetRegistryView();
var userConfig = new UserRegistryConfig();

View file

@ -1,62 +1,26 @@
<?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')" />
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{12402F90-A2AE-4549-9142-F90650E2082A}</ProjectGuid>
<TargetFramework>net472</TargetFramework>
<OutputType>Exe</OutputType>
<RootNamespace>AmagnoVirtualPrinter.SetupDriver</RootNamespace>
<AssemblyName>setupdrv</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>none</DebugType>
<Optimize>true</Optimize>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<OutputPath>..\..\Files\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<StartupObject>AmagnoVirtualPrinter.SetupDriver.Program</StartupObject>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.ComponentModel.Composition" />
<ProjectReference Include="..\..\Common\AmagnoVirtualPrinter.Logging\AmagnoVirtualPrinter.Logging.csproj" />
<ProjectReference Include="..\..\Common\AmagnoVirtualPrinter.Utils\AmagnoVirtualPrinter.Utils.csproj" />
</ItemGroup>
<ItemGroup>
<Compile Include="Defaults.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Shell.cs" />
<Compile Include="Windows.cs" />
<PackageReference Include="JetBrains.Annotations" Version="2022.3.1" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Common\AmagnoVirtualPrinter.Logging\AmagnoVirtualPrinter.Logging.csproj">
<Project>{aa25364d-22d5-44b0-86a5-6fb14c686308}</Project>
<Name>AmagnoVirtualPrinter.Logging</Name>
</ProjectReference>
<ProjectReference Include="..\..\Common\AmagnoVirtualPrinter.Utils\AmagnoVirtualPrinter.Utils.csproj">
<Project>{cd1c8e9d-5335-41ac-b0c0-88fd7c7c55f3}</Project>
<Name>AmagnoVirtualPrinter.Utils</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<PackageReference Include="JetBrains.Annotations" Version="2020.1.0" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View file

@ -15,7 +15,7 @@ using System.Runtime.InteropServices;
[assembly: Guid("12402f90-a2ae-4549-9142-f90650e2082a")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyVersion("1.0.3")]
[assembly: AssemblyFileVersion("1.0.3")]
[assembly: InternalsVisibleTo("properties")]

View file

@ -63,7 +63,14 @@ namespace AmagnoVirtualPrinter.SetupDriver
try
{
Console.WriteLine(exe + " " + args);
using(var proc = Process.Start(exe, args))
var processStartInfo = new ProcessStartInfo(exe, args)
{
Verb = "runas",
UseShellExecute = true
};
using(var proc = Process.Start(processStartInfo))
{
proc?.WaitForExit();
}

View file

@ -1,72 +1,29 @@
<?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')" />
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{A668846E-54C7-483D-9CF7-48F77EA398CA}</ProjectGuid>
<TargetFramework>net472</TargetFramework>
<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>AmagnoVirtualPrinter.WixSharpInstaller</RootNamespace>
<AssemblyName>AmagnoPrinterInstaller</AssemblyName>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<UseWindowsForms>true</UseWindowsForms>
<ImportWindowsDesktopTargets>true</ImportWindowsDesktopTargets>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>none</DebugType>
<Optimize>true</Optimize>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<OutputPath>..\..\Files\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<StartupObject>AmagnoVirtualPrinter.WixSharpInstaller.Script</StartupObject>
</PropertyGroup>
<PropertyGroup>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
</PropertyGroup>
<ItemGroup>
<Compile Include="Script.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<None Include="wix\$(ProjectName).g.wxs" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="JetBrains.Annotations" Version="2020.1.0" />
<PackageReference Include="JetBrains.Annotations" Version="2022.3.1" />
<PackageReference Include="WixSharp.bin" Version="1.14.8" />
<PackageReference Include="WixSharp.wix.bin" Version="3.11.2" />
</ItemGroup>
<ItemGroup>
<Reference Include="System.Windows.Forms" />
<ProjectReference Include="..\..\Common\AmagnoVirtualPrinter.Utils\AmagnoVirtualPrinter.Utils.csproj" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Common\AmagnoVirtualPrinter.Utils\AmagnoVirtualPrinter.Utils.csproj">
<Project>{cd1c8e9d-5335-41ac-b0c0-88fd7c7c55f3}</Project>
<Name>AmagnoVirtualPrinter.Utils</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- <Import Project="..\..\packages\WixSharp.bin\1.14.8\build\WixSharp.bin.targets" Condition="Exists('..\..\packages\WixSharp.bin\1.14.8\build\WixSharp.bin.targets')" />-->
<!-- <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">-->
<!-- <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\WixSharp.bin\1.14.8\build\WixSharp.bin.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixSharp.bin\1.14.8\build\WixSharp.bin.targets'))" />-->
<!-- <Error Condition="!Exists('..\..\packages\WixSharp\1.14.8\build\WixSharp.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixSharp\1.14.8\build\WixSharp.targets'))" />-->
<!-- </Target>-->
</Project>

View file

@ -31,5 +31,5 @@ using System.Runtime.InteropServices;
// 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")]
[assembly: AssemblyFileVersion("1.0.0")]
[assembly: AssemblyVersion("1.0.3")]
[assembly: AssemblyFileVersion("1.0.3")]

View file

@ -84,7 +84,7 @@ namespace AmagnoVirtualPrinter.WixSharpInstaller
const string gsNotFound = "Ghostscript not found!\n" +
"Please install Ghostscript version 9.52 or higher.\n" +
"You can find the installer on the official website:\n" +
"https://www.ghostscript.com/download/gsdnld.html";
"https://www.ghostscript.com/releases/gsdnld.html";
var registryView = Environment.Is64BitOperatingSystem ? RegistryView.Registry64 : RegistryView.Registry32;
@ -100,6 +100,14 @@ namespace AmagnoVirtualPrinter.WixSharpInstaller
}
var subKeyNames = gsKey.GetSubKeyNames();
if (!subKeyNames.Any())
{
MessageBox.Show(gsNotFound);
e.Result = ActionResult.Failure;
return;
}
gsKey = gsKey.OpenSubKey(subKeyNames[0]);
if (gsKey == null)
{

View file

@ -17,22 +17,22 @@ There are two ways of using the _AmagnoVirtualPrinter_:
2. [Usage](#usage)
1. [Configure](#configure)
2. [Debugging](#debugging)
3. [License](#license)
3. [Create Release](#create-release)
## Installation
### From MSI
If you want to use the official installer, you can download it [here](https://amagno.de) or use the latest release in GitHub. Make sure to run the installer with extended rights. After installation, you may need to [configure](#configure) the _AmagnoVirtualPrinter_.
If you want to use the official installer, you can download it [here](https://amagno.de/clients) or use the latest release in GitHub. Make sure to run the installer with extended rights. After installation, you may need to [configure](#configure) the _AmagnoVirtualPrinter_.
After installation, a new printer with the name set in _Defaults.cs_ can be located under _Printer & Scanner_ in the Microsoft® Windows settings.
### From Source
#### **_Dependencies_**
#### Dependencies
To compile the installer, please make sure you Wix Toolset is installed. The [WixSharp library](https://github.com/oleg-shilo/wixsharp) is used to define the package in `AmagnoVirtualPrinter.WixSharpInstaller`.
To compile the installer, please make sure the Wix Toolset is installed. The [WixSharp library](https://github.com/oleg-shilo/wixsharp) is used to define the package in `AmagnoVirtualPrinter.WixSharpInstaller`.
#### **_Create MSI package_**
#### Create MSI package
To install the driver from source, build the project in release mode. When the build is run successfully, open up powershell and navigate to `C:\[Git]\AmagnoVirtualPrinter\Files`. Then run the `AmagnoPrinterInstaller.exe "/MSBUILD:C:\[Git]\AmagnoVirtualPrinter\Installer\AmagnoVirtualPrinter.WixSharpInstaller" "/p:C:\[Git]\AmagnoVirtualPrinter\"` where `/p:` is the output directory for the msi and working directory for the WixSharp project. Make sure the given working directory contains a `Files` folder with all binaries needed for _AmagnoVirtualPrinter_. This command will use WixSharp to create the msi package right next to the AmagnoPrinterInstaller.exe called **AmagnoPrinterInstaller.msi**.
@ -54,4 +54,5 @@ The output directory can be set in `Computer\HKEY_CURRENT_USER\SOFTWARE\vpd\Prin
To debug the _AmagnoVirtualPrinter_, run the msi. After installation, go to _Windows Services_ and stop the _AmagnoPrinterService_. In your IDE, select the AmagnoVirtualPrinter.Agent.Console as startup project and run in debug mode. To start a test print (and debug the solution) start PowerShell or cmd and navigate to the root folder of the repository. Go to `Files` and run `.\setupdrv.exe test`, which will create a test page and send it to the virtual printer. Or just print any document you want to.
## License
## Create Release
To create a release, you have to tag a commit. Then the release pipeline compiles the source code, builds the installation, and creates the release on GitHub.

View file

@ -0,0 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net472</TargetFramework>
<OutputType>Library</OutputType>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\Common\AmagnoVirtualPrinter.Agent.Core\AmagnoVirtualPrinter.Agent.Core.csproj" />
<ProjectReference Include="..\..\Common\AmagnoVirtualPrinter.Agent.Lib\AmagnoVirtualPrinter.Agent.Lib.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="NUnit" Version="3.13.3" />
</ItemGroup>
</Project>

View file

@ -0,0 +1,17 @@
using AmagnoVirtualPrinter.Agent.Lib.Misc;
using NUnit.Framework;
namespace AmagnoVirtualPrinter.Agent.Lib.Tests
{
[TestFixture]
public class PrintJobReaderTests
{
[Test]
public void GetCurrentPrintJobs_ReturnsJobs()
{
var jobs = PrintJobReader.GetCurrentPrintJobs("Amagno");
Assert.IsNull(jobs);
}
}
}

View file

@ -0,0 +1,35 @@
using System.Reflection;
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("AmagnoVirtualPrinter.Agent.Lib.Tests")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("AmagnoVirtualPrinter.Agent.Lib.Tests")]
[assembly: AssemblyCopyright("Copyright © 2023")]
[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("36CD25FD-B1E2-4C87-970F-A40CCC961390")]
// 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")]

View file

@ -0,0 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net472</TargetFramework>
<OutputType>Library</OutputType>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\Common\AmagnoVirtualPrinter.Utils\AmagnoVirtualPrinter.Utils.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="NUnit" Version="3.13.3" />
</ItemGroup>
</Project>

View file

@ -0,0 +1,35 @@
using System.Reflection;
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("AmagnoVirtualPrinter.Utils.UnitTests")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("AmagnoVirtualPrinter.Utils.UnitTests")]
[assembly: AssemblyCopyright("Copyright © 2023")]
[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("2349BD8A-03E5-4226-B3C6-56C2F718B7CB")]
// 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")]

View file

@ -0,0 +1,19 @@
using NUnit.Framework;
namespace AmagnoVirtualPrinter.Utils.UnitTests
{
[TestFixture]
public class RegistryRepositoryTests
{
[Test]
public void TryGetGhostscriptPath_FindsGhostScriptPath()
{
var sut = new RegistryRepository();
var result = sut.TryGetGhostscriptPath(out var path);
Assert.True(result);
Assert.IsNotNull(path);
}
}
}

View file

@ -1,65 +1,21 @@
<?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')" />
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{17E2CF8A-462C-4130-9FAF-F1CA5FC4E06D}</ProjectGuid>
<TargetFramework>net472</TargetFramework>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>AmagnoVirtualPrinter.ProgressInfo.Autofac</RootNamespace>
<AssemblyName>AmagnoVirtualPrinter.ProgressInfo.Autofac</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>none</DebugType>
<Optimize>true</Optimize>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<OutputPath>..\..\Files\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.CSharp" />
<Reference Include="mscorlib" />
<Reference Include="System" />
<Reference Include="System.ComponentModel.Composition" />
<Reference Include="System.Core" />
<Reference Include="System.Numerics" />
<ProjectReference Include="..\AmagnoVirtualPrinter.ProgressInfo.Core\AmagnoVirtualPrinter.ProgressInfo.Core.csproj" />
<ProjectReference Include="..\AmagnoVirtualPrinter.ProgressInfo.Lib\AmagnoVirtualPrinter.ProgressInfo.Lib.csproj" />
</ItemGroup>
<ItemGroup>
<Compile Include="ProgressInfoModule.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\AmagnoVirtualPrinter.ProgressInfo.Core\AmagnoVirtualPrinter.ProgressInfo.Core.csproj">
<Project>{24d28558-c825-43e6-85d2-7c59f4a97698}</Project>
<Name>AmagnoVirtualPrinter.ProgressInfo.Core</Name>
</ProjectReference>
<ProjectReference Include="..\AmagnoVirtualPrinter.ProgressInfo.Lib\AmagnoVirtualPrinter.ProgressInfo.Lib.csproj">
<Project>{d66f55e5-b3f7-4c61-a4f2-b55c4d412e01}</Project>
<Name>AmagnoVirtualPrinter.ProgressInfo.Lib</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Autofac" Version="6.0.0" />
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="5.0.0-rc.2.20475.5" />
<PackageReference Include="System.Buffers" Version="4.5.1" />
<PackageReference Include="System.Diagnostics.DiagnosticSource" Version="4.7.1" />
<PackageReference Include="System.Memory" Version="4.5.4" />
<PackageReference Include="Autofac" Version="6.5.0" />
<PackageReference Include="System.Numerics.Vectors" Version="4.5.0" />
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="5.0.0-rc.2.20475.5" />
<PackageReference Include="System.Threading.Tasks.Extensions" Version="4.5.4" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View file

@ -31,5 +31,5 @@ using System.Runtime.InteropServices;
// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
// indem Sie "*" wie unten gezeigt eingeben:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyVersion("1.0.3")]
[assembly: AssemblyFileVersion("1.0.3")]

View file

@ -1,57 +1,18 @@
<?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')" />
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{24D28558-C825-43E6-85D2-7C59F4A97698}</ProjectGuid>
<TargetFramework>net472</TargetFramework>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>AmagnoVirtualPrinter.ProgressInfo.Core</RootNamespace>
<AssemblyName>AmagnoVirtualPrinter.ProgressInfo.Core</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>none</DebugType>
<Optimize>true</Optimize>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<OutputPath>..\..\Files\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<PackageReference Include="JetBrains.Annotations" Version="2022.3.1" />
</ItemGroup>
<ItemGroup>
<Compile Include="Message\IMessage.cs" />
<Compile Include="IProgressInfo.cs" />
<Compile Include="Message\IFinal.cs" />
<Compile Include="Message\IMessageFactory.cs" />
<Compile Include="Message\IStart.cs" />
<Compile Include="Message\IStep.cs" />
<Compile Include="Message\Message.cs" />
<Compile Include="Message\MessageType.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<ProjectReference Include="..\..\Common\AmagnoVirtualPrinter.Agent.Core\AmagnoVirtualPrinter.Agent.Core.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="JetBrains.Annotations" Version="2020.1.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Common\AmagnoVirtualPrinter.Agent.Core\AmagnoVirtualPrinter.Agent.Core.csproj">
<Project>{135c85eb-2116-4cc4-8ccb-b6804b9d6467}</Project>
<Name>AmagnoVirtualPrinter.Agent.Core</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View file

@ -31,5 +31,5 @@ using System.Runtime.InteropServices;
// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
// indem Sie "*" wie unten gezeigt eingeben:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyVersion("1.0.3")]
[assembly: AssemblyFileVersion("1.0.3")]

View file

@ -1,74 +1,22 @@
<?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')" />
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{D66F55E5-B3F7-4C61-A4F2-B55C4D412E01}</ProjectGuid>
<TargetFramework>net472</TargetFramework>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>AmagnoVirtualPrinter.ProgressInfo.Lib</RootNamespace>
<AssemblyName>AmagnoVirtualPrinter.ProgressInfo.Lib</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>none</DebugType>
<Optimize>true</Optimize>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<OutputPath>..\..\Files\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<ProjectReference Include="..\..\Common\AmagnoVirtualPrinter.Agent.Core\AmagnoVirtualPrinter.Agent.Core.csproj" />
<ProjectReference Include="..\..\Common\AmagnoVirtualPrinter.Logging\AmagnoVirtualPrinter.Logging.csproj" />
<ProjectReference Include="..\..\Common\AmagnoVirtualPrinter.Utils\AmagnoVirtualPrinter.Utils.csproj" />
<ProjectReference Include="..\AmagnoVirtualPrinter.ProgressInfo.Core\AmagnoVirtualPrinter.ProgressInfo.Core.csproj" />
</ItemGroup>
<ItemGroup>
<Compile Include="Interfaces\IProgressInfoProcessManager.cs" />
<Compile Include="Interfaces\IProgressInfoServer.cs" />
<Compile Include="Interfaces\IProgressInfoServerFactory.cs" />
<Compile Include="Message\MessageFactory.cs" />
<Compile Include="ProgressInfoBroker.cs" />
<Compile Include="ProgressInfoProcessManager.cs" />
<Compile Include="ProgressInfoServer.cs" />
<Compile Include="ProgressInfoServerFactory.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Common\AmagnoVirtualPrinter.Agent.Core\AmagnoVirtualPrinter.Agent.Core.csproj">
<Project>{135c85eb-2116-4cc4-8ccb-b6804b9d6467}</Project>
<Name>AmagnoVirtualPrinter.Agent.Core</Name>
</ProjectReference>
<ProjectReference Include="..\..\Common\AmagnoVirtualPrinter.Agent.Lib\AmagnoVirtualPrinter.Agent.Lib.csproj">
<Project>{94e8105f-5001-403b-b9f1-b0b0b236ad65}</Project>
<Name>AmagnoVirtualPrinter.Agent.Lib</Name>
</ProjectReference>
<ProjectReference Include="..\..\Common\AmagnoVirtualPrinter.Logging\AmagnoVirtualPrinter.Logging.csproj">
<Project>{aa25364d-22d5-44b0-86a5-6fb14c686308}</Project>
<Name>AmagnoVirtualPrinter.Logging</Name>
</ProjectReference>
<ProjectReference Include="..\..\Common\AmagnoVirtualPrinter.Utils\AmagnoVirtualPrinter.Utils.csproj">
<Project>{cd1c8e9d-5335-41ac-b0c0-88fd7c7c55f3}</Project>
<Name>AmagnoVirtualPrinter.Utils</Name>
</ProjectReference>
<ProjectReference Include="..\AmagnoVirtualPrinter.ProgressInfo.Core\AmagnoVirtualPrinter.ProgressInfo.Core.csproj">
<Project>{24d28558-c825-43e6-85d2-7c59f4a97698}</Project>
<Name>AmagnoVirtualPrinter.ProgressInfo.Core</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<PackageReference Include="JetBrains.Annotations" Version="2020.1.0" />
<PackageReference Include="JetBrains.Annotations" Version="2022.3.1" />
<PackageReference Include="NamedPipeWrapper" Version="1.5.3-Beta" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View file

@ -31,5 +31,5 @@ using System.Runtime.InteropServices;
// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
// indem Sie "*" wie unten gezeigt eingeben:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyVersion("1.0.3")]
[assembly: AssemblyFileVersion("1.0.3")]

View file

@ -1,90 +1,34 @@
<?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')" />
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{6579D542-EF21-4CF7-A9EC-7360ECEB3BBB}</ProjectGuid>
<TargetFramework>net472</TargetFramework>
<OutputType>WinExe</OutputType>
<RootNamespace>AmagnoVirtualPrinter.ProgressInfo</RootNamespace>
<AssemblyName>AmagnoPrinterAgentProgress</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<UseWindowsForms>true</UseWindowsForms>
<ImportWindowsDesktopTargets>true</ImportWindowsDesktopTargets>
<GenerateResourceUsePreserializedResources>true</GenerateResourceUsePreserializedResources>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>none</DebugType>
<Optimize>true</Optimize>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<OutputPath>..\..\Files\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>Resources\printer.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
</ItemGroup>
<ItemGroup>
<Compile Include="Program.cs" />
<Compile Include="ProgressForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="ProgressForm.Designer.cs">
<DependentUpon>ProgressForm.cs</DependentUpon>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="ProgressForm.resx">
<DependentUpon>ProgressForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<ItemGroup>
<Content Include="Resources\printer.ico" />
<Content Include="Resources\waiting.gif" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="JetBrains.Annotations" Version="2020.1.0" />
<PackageReference Include="JetBrains.Annotations" Version="2022.3.1" />
<PackageReference Include="NamedPipeWrapper" Version="1.5.3-Beta" />
<PackageReference Include="System.Resources.Extensions" Version="7.0.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\AmagnoVirtualPrinter.ProgressInfo.Core\AmagnoVirtualPrinter.ProgressInfo.Core.csproj">
<Project>{24d28558-c825-43e6-85d2-7c59f4a97698}</Project>
<Name>AmagnoVirtualPrinter.ProgressInfo.Core</Name>
</ProjectReference>
<ProjectReference Include="..\AmagnoVirtualPrinter.ProgressInfo.Core\AmagnoVirtualPrinter.ProgressInfo.Core.csproj" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View file

@ -31,5 +31,5 @@ using System.Runtime.InteropServices;
// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
// übernehmen, indem Sie "*" eingeben:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyVersion("1.0.3")]
[assembly: AssemblyFileVersion("1.0.3")]

BIN
codeSigningCert.pfx Normal file

Binary file not shown.

View file

@ -1,2 +1,5 @@
$args = '/MSBUILD:..\Installer\AmagnoVirtualPrinter.WixSharpInstaller', '/p:..\AmagnoVirtualPrinter'
Start-Process -FilePath '.\Files\AmagnoPrinterInstaller.exe' -ArgumentList $args
Set-Location $PSScriptRoot
$arguments = "/MSBUILD:$PSScriptRoot\Installer\AmagnoVirtualPrinter.WixSharpInstaller", "/p:$PSScriptRoot"
Remove-Item -Path "$PSScriptRoot\Files\*" -Filter '*.pdb' -Force
Start-Process -FilePath "$PSScriptRoot\Files\AmagnoPrinterInstaller.exe" -ArgumentList $arguments -wait

26
sign_files.ps1 Normal file
View file

@ -0,0 +1,26 @@
[CmdletBinding()]
param (
[Parameter(Mandatory=$true)]
[String]
$path,
[Parameter(Mandatory=$true)]
[String]
$certPath,
[Parameter(Mandatory=$true)]
[String]
$certPwd
)
$cert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2($certPath, $certPwd)
$files = Get-ChildItem -Path $path |
Where-Object { $_.Extension -in '.dll', '.exe' } |
Select-Object -ExpandProperty FullName |
Get-AuthenticodeSignature |
Where-Object { $_.Status -eq "NotSigned" } |
Select-Object -ExpandProperty Path
foreach($file in $files){
Write-Host "Signing... $file"
Set-AuthenticodeSignature $file -Certificate $cert -TimestampServer "http://timestamp.digicert.com"
}

16
sign_setup.ps1 Normal file
View file

@ -0,0 +1,16 @@
[CmdletBinding()]
param (
[Parameter(Mandatory=$true)]
[String]
$certPath,
[Parameter(Mandatory=$true)]
[String]
$certPwd
)
$cert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2($certPath, $certPwd)
$file = "AmagnoPrinterInstaller.msi"
Write-Host "Signing... $file"
Set-AuthenticodeSignature $file -Certificate $cert -TimestampServer "http://timestamp.digicert.com"