Compare commits
81 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1dd12c02a5 | ||
|
|
49ee9b1079 | ||
|
|
a22a3b0cfd | ||
|
|
4490dd1599 | ||
|
|
346a14a25a | ||
|
|
bbfa313804 | ||
|
|
6cc07f5bac | ||
|
|
747b509a0c | ||
|
|
744062944d | ||
|
|
8916b0c348 | ||
|
|
46c466a864 | ||
|
|
02321a6dfe | ||
|
|
be34a58dca | ||
|
|
b6185dec1b | ||
|
|
ba8e248396 | ||
|
|
0d9bf69b5c | ||
|
|
b3c1865668 | ||
|
|
edd542e067 | ||
|
|
65b6655a08 | ||
|
|
52601b1540 | ||
|
|
92d74eb7ee | ||
|
|
fe00cb9121 | ||
|
|
2f3a9f2d5f | ||
|
|
f8dd2595bf | ||
|
|
0a6e9a5330 | ||
|
|
1749a3b3ef | ||
|
|
f0bff17fc9 | ||
|
|
01c9464b38 | ||
|
|
62db1f8b5c | ||
|
|
c58a805ae4 | ||
|
|
001e9a216c | ||
|
|
e40d05fa9b | ||
|
|
0d9fe5ad3a | ||
|
|
a811d802aa | ||
|
|
40b4843638 | ||
|
|
bed687deb0 | ||
|
|
c31b6e632e | ||
|
|
700c7f7547 | ||
|
|
e7e19faadc | ||
|
|
0f74ebc839 | ||
|
|
02152c234f | ||
|
|
43fdf40bfb | ||
|
|
ec75617026 | ||
|
|
2e6fe90919 | ||
|
|
02d0e0bcf9 | ||
|
|
118037bbc3 | ||
|
|
5f3fa56dca | ||
|
|
5a460e1ba0 | ||
|
|
c7d2a2c4fe | ||
|
|
19f00c3b80 | ||
|
|
9611eb6522 | ||
|
|
5fd0b63c76 | ||
|
|
3df58a44d9 | ||
|
|
ed615c1053 | ||
|
|
c4cdaf0e79 | ||
|
|
d1c8210544 | ||
|
|
bd8f90f92e | ||
|
|
549ca17031 | ||
|
|
3bf7ebcef7 | ||
|
|
bf32fa3db7 | ||
|
|
ea8aedad21 | ||
|
|
8a96fd9c64 | ||
|
|
d271a44249 | ||
|
|
c087da0d31 | ||
|
|
05eae58484 | ||
|
|
1661e17f02 | ||
|
|
5526c695d8 | ||
|
|
8eff18c2c2 | ||
|
|
0bd4e91ec6 | ||
|
|
ad542ad222 | ||
|
|
ed90d68fab | ||
|
|
ed1788f9a2 | ||
|
|
5d6249a4f6 | ||
|
|
6b76afc663 | ||
|
|
2811a2ea29 | ||
|
|
4a23f4ffb8 | ||
|
|
27c8660e40 | ||
|
|
bb9e2ef565 | ||
|
|
0e6b3078c2 | ||
|
|
f09f5a8daa | ||
|
|
fb9f96d2b0 |
64 changed files with 682 additions and 1164 deletions
45
.github/workflows/build.yml
vendored
Normal file
45
.github/workflows/build.yml
vendored
Normal 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
|
||||
129
.github/workflows/dotnet-desktop.yml
vendored
129
.github/workflows/dotnet-desktop.yml
vendored
|
|
@ -1,129 +0,0 @@
|
|||
# This workflow uses actions that are not certified by GitHub.
|
||||
# They are provided by a third-party and are governed by
|
||||
# separate terms of service, privacy policy, and support
|
||||
# documentation.
|
||||
|
||||
# This workflow will build, test, sign and package a WPF or Windows Forms desktop application
|
||||
# built on .NET Core.
|
||||
# To learn how to migrate your existing application to .NET Core,
|
||||
# refer to https://docs.microsoft.com/en-us/dotnet/desktop-wpf/migration/convert-project-from-net-framework
|
||||
#
|
||||
# To configure this workflow:
|
||||
#
|
||||
# 1. Configure environment variables
|
||||
# GitHub sets default environment variables for every workflow run.
|
||||
# Replace the variables relative to your project in the "env" section below.
|
||||
#
|
||||
# 2. Signing
|
||||
# Generate a signing certificate in the Windows Application
|
||||
# Packaging Project or add an existing signing certificate to the project.
|
||||
# Next, use PowerShell to encode the .pfx file using Base64 encoding
|
||||
# by running the following Powershell script to generate the output string:
|
||||
#
|
||||
# $pfx_cert = Get-Content '.\SigningCertificate.pfx' -Encoding Byte
|
||||
# [System.Convert]::ToBase64String($pfx_cert) | Out-File 'SigningCertificate_Encoded.txt'
|
||||
#
|
||||
# Open the output file, SigningCertificate_Encoded.txt, and copy the
|
||||
# string inside. Then, add the string to the repo as a GitHub secret
|
||||
# and name it "Base64_Encoded_Pfx."
|
||||
# For more information on how to configure your signing certificate for
|
||||
# this workflow, refer to https://github.com/microsoft/github-actions-for-desktop-apps#signing
|
||||
#
|
||||
# Finally, add the signing certificate password to the repo as a secret and name it "Pfx_Key".
|
||||
# See "Build the Windows Application Packaging project" below to see how the secret is used.
|
||||
#
|
||||
# For more information on GitHub Actions, refer to https://github.com/features/actions
|
||||
# For a complete CI/CD sample to get started with GitHub Action workflows for Desktop Applications,
|
||||
# refer to https://github.com/microsoft/github-actions-for-desktop-apps
|
||||
|
||||
name: .NET Core Desktop
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
|
||||
jobs:
|
||||
|
||||
build:
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
configuration: [Release]
|
||||
|
||||
runs-on: windows-latest # For a list of available runner types, refer to
|
||||
# https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on
|
||||
|
||||
env:
|
||||
Solution_Name: AmagnoVirtualPrinter.sln # Replace with your solution name, i.e. MyWpfApp.sln.
|
||||
#Test_Project_Path: your-test-project-path # Replace with the path to your test project, i.e. MyWpfApp.Tests\MyWpfApp.Tests.csproj.
|
||||
#Wap_Project_Directory: your-wap-project-directory-name # Replace with the Wap project directory relative to the solution, i.e. MyWpfApp.Package.
|
||||
#Wap_Project_Path: your-wap-project-path # Replace with the path to your Wap project, i.e. MyWpf.App.Package\MyWpfApp.Package.wapproj.
|
||||
|
||||
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
|
||||
|
||||
# Execute all unit tests in the solution
|
||||
#- name: Execute unit tests
|
||||
# run: dotnet test
|
||||
|
||||
# Restore the application to populate the obj folder with RuntimeIdentifiers
|
||||
- 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 }}
|
||||
|
||||
- name: Create msi from PowerShell Script
|
||||
run: pwsh -command ".\$GITHUB_WORKSPACE\create_msi.ps1"
|
||||
|
||||
- name: Upload MSI
|
||||
uses: actions/upload-artifact@v2.2.2
|
||||
with:
|
||||
path: .\AmagnoPrinterInstaller.msi
|
||||
|
||||
# Decode the base 64 encoded pfx and save the Signing_Certificate
|
||||
#- name: Decode the pfx
|
||||
# run: |
|
||||
# $pfx_cert_byte = [System.Convert]::FromBase64String("${{ secrets.Base64_Encoded_Pfx }}")
|
||||
# $certificatePath = Join-Path -Path $env:Wap_Project_Directory -ChildPath GitHubActionsWorkflow.pfx
|
||||
# [IO.File]::WriteAllBytes("$certificatePath", $pfx_cert_byte)
|
||||
|
||||
# Create the app package by building and packaging the Windows Application Packaging project
|
||||
#- name: Create the app package
|
||||
# run: msbuild $env:Wap_Project_Path /p:Configuration=$env:Configuration /p:UapAppxPackageBuildMode=$env:Appx_Package_Build_Mode /p:AppxBundle=$env:Appx_Bundle /p:PackageCertificateKeyFile=GitHubActionsWorkflow.pfx /p:PackageCertificatePassword=${{ secrets.Pfx_Key }}
|
||||
# env:
|
||||
# Appx_Bundle: Always
|
||||
# Appx_Bundle_Platforms: x86|x64
|
||||
# Appx_Package_Build_Mode: StoreUpload
|
||||
# Configuration: ${{ matrix.configuration }}
|
||||
|
||||
# Remove the pfx
|
||||
# - name: Remove the pfx
|
||||
# run: Remove-Item -path $env:Wap_Project_Directory\$env:Signing_Certificate
|
||||
|
||||
# Upload the MSIX package: https://github.com/marketplace/actions/upload-artifact
|
||||
#- name: Upload build artifacts
|
||||
# uses: actions/upload-artifact@v2
|
||||
# with:
|
||||
# name: MSIX Package
|
||||
# path: ${{ env.Wap_Project_Directory }}\AppPackages
|
||||
|
||||
28
.github/workflows/release.yml
vendored
Normal file
28
.github/workflows/release.yml
vendored
Normal 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 }}
|
||||
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
@ -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")]
|
||||
|
|
@ -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>
|
||||
|
|
@ -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")]
|
||||
|
|
@ -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>
|
||||
|
|
@ -45,6 +45,7 @@ namespace AmagnoVirtualPrinter.Delivery
|
|||
|
||||
if (ghostScriptExe == null)
|
||||
{
|
||||
logger.Error("Can not find Ghostscript.");
|
||||
throw new FileNotFoundException("Can not find Ghostscript.");
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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")]
|
||||
|
|
@ -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}
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
@ -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")]
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
@ -1,7 +1,10 @@
|
|||
namespace AmagnoVirtualPrinter.Agent.Core.Interfaces
|
||||
using JetBrains.Annotations;
|
||||
|
||||
namespace AmagnoVirtualPrinter.Agent.Core.Interfaces
|
||||
{
|
||||
public interface IDirectoryHelper
|
||||
{
|
||||
string GetOutputDirectory(IExConfig config);
|
||||
[NotNull]
|
||||
string GetOutputDirectory([NotNull] IUserConfig config);
|
||||
}
|
||||
}
|
||||
|
|
@ -20,12 +20,6 @@ namespace AmagnoVirtualPrinter.Agent.Core.Interfaces
|
|||
[NotNull]
|
||||
Tuple<string, string> ResolvedPostconverter { get; }
|
||||
|
||||
/// <summary>
|
||||
/// The full path of the output directory.
|
||||
/// </summary>
|
||||
[NotNull]
|
||||
string ResolvedOutputDirectory { get; }
|
||||
|
||||
/// <summary>
|
||||
/// An intermediate format which is read by the printer or similar.
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -43,5 +43,12 @@ namespace AmagnoVirtualPrinter.Agent.Core.Interfaces
|
|||
/// <param name="iniPath">The path to the ini file</param>
|
||||
/// <returns><see cref="JobStatus"/></returns>
|
||||
JobStatus ReadJobStatus(string iniPath);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the <see cref="SessionInfo" from ini file./>
|
||||
/// </summary>
|
||||
/// <param name="iniFile">The path to the ini file</param>
|
||||
/// <returns><see cref="SessionInfo"/></returns>
|
||||
SessionInfo GetSessionInfo(string iniFile);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,5 +22,11 @@ namespace AmagnoVirtualPrinter.Agent.Core.Interfaces
|
|||
/// <remarks>Intital value is PDF</remarks>
|
||||
[NotNull]
|
||||
string Format { get; }
|
||||
|
||||
/// <summary>
|
||||
/// The full path of the output directory.
|
||||
/// </summary>
|
||||
[NotNull]
|
||||
string ResolvedOutputDirectory { get; }
|
||||
}
|
||||
}
|
||||
|
|
@ -13,8 +13,6 @@ namespace AmagnoVirtualPrinter.Agent.Core.Model
|
|||
|
||||
public string Preconverter { get; set; }
|
||||
|
||||
public string OutputDirectory { get; set; }
|
||||
|
||||
public string FileNameMask { get; set; }
|
||||
|
||||
public short PrinterPort { get; set; }
|
||||
|
|
@ -29,11 +27,6 @@ namespace AmagnoVirtualPrinter.Agent.Core.Model
|
|||
get { return GetResolvedArgs(Postconverter); }
|
||||
}
|
||||
|
||||
public string ResolvedOutputDirectory
|
||||
{
|
||||
get { return string.IsNullOrWhiteSpace(OutputDirectory) ? "" : Path.GetFullPath(OutputDirectory); }
|
||||
}
|
||||
|
||||
public IntermediateFormat IntermediateFormat { get; set; }
|
||||
|
||||
[NotNull]
|
||||
|
|
|
|||
|
|
@ -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; }
|
||||
}
|
||||
}
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
using AmagnoVirtualPrinter.Agent.Core.Interfaces;
|
||||
using System.IO;
|
||||
using AmagnoVirtualPrinter.Agent.Core.Interfaces;
|
||||
|
||||
namespace AmagnoVirtualPrinter.Agent.Core.Model
|
||||
{
|
||||
|
|
@ -11,5 +12,12 @@ namespace AmagnoVirtualPrinter.Agent.Core.Model
|
|||
public double? UserRenderDpi { get; set; }
|
||||
|
||||
public string Format { get; set; }
|
||||
|
||||
public string OutputDirectory { get; set; }
|
||||
|
||||
public string ResolvedOutputDirectory
|
||||
{
|
||||
get { return string.IsNullOrWhiteSpace(OutputDirectory) ? "" : Path.GetFullPath(OutputDirectory); }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -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")]
|
||||
|
|
@ -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>
|
||||
|
|
@ -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.");
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
@ -66,15 +65,19 @@ namespace AmagnoVirtualPrinter.Agent.Lib.Misc
|
|||
try
|
||||
{
|
||||
var now = DateTime.Now;
|
||||
var config = _registryRepository.GetRegistryConfig();
|
||||
var root = _directoryHelper.GetOutputDirectory(config);
|
||||
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);
|
||||
var iniName = GenerateFileName(now, jobInfo.JobId, 0, config.FileNameMask, "ini");
|
||||
var iniPath = Path.Combine(root, iniName);
|
||||
var extension = GetRawFileExtension(config.IntermediateFormat);
|
||||
|
|
@ -142,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;
|
||||
}
|
||||
|
|
@ -157,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;
|
||||
}
|
||||
|
|
@ -166,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;
|
||||
|
|
@ -176,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)
|
||||
{
|
||||
|
|
@ -240,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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ namespace AmagnoVirtualPrinter.Agent.Lib.Misc
|
|||
}
|
||||
|
||||
var targetFile = $"{Path.GetFileNameWithoutExtension(job.RawDataPath)}";
|
||||
var config = _registryRepository.GetRegistryConfig();
|
||||
var config = _registryRepository.GetUserRegistryConfig(job.SessionInfo.Sid);
|
||||
var dir = _directoryHelper.GetOutputDirectory(config);
|
||||
targetFile = Path.Combine(dir, targetFile);
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
@ -98,9 +96,12 @@ namespace AmagnoVirtualPrinter.Agent.Lib.Misc
|
|||
|
||||
public void Finish(IJob job)
|
||||
{
|
||||
var config = _registryRepository.GetRegistryConfig();
|
||||
WriteJobFinishIni(job.IniDataPath, config);
|
||||
var userConfig = _registryRepository.GetUserRegistryConfig(job.SessionInfo.Sid);
|
||||
|
||||
WriteJobFinishIni(job.IniDataPath, userConfig);
|
||||
|
||||
var iniFile = Path.GetFullPath(job.IniDataPath);
|
||||
var config = _registryRepository.GetRegistryConfig();
|
||||
var post = config.ResolvedPostconverter;
|
||||
|
||||
_shell.Execute(job.JobInfo, job.SessionInfo, post.Item1, $"{post.Item2} \"{iniFile}\"");
|
||||
|
|
@ -122,7 +123,7 @@ namespace AmagnoVirtualPrinter.Agent.Lib.Misc
|
|||
_shell.WriteIniEntry("Preconverting", "Status", status.ToIni(), job.IniDataPath);
|
||||
}
|
||||
|
||||
private SessionInfo GetSessionInfo(string iniFile)
|
||||
public SessionInfo GetSessionInfo(string iniFile)
|
||||
{
|
||||
var sessionInfo = new SessionInfo
|
||||
{
|
||||
|
|
@ -152,7 +153,7 @@ namespace AmagnoVirtualPrinter.Agent.Lib.Misc
|
|||
return jobInfo;
|
||||
}
|
||||
|
||||
private void WriteJobFinishIni(string iniPath, [NotNull]IExConfig config)
|
||||
private void WriteJobFinishIni(string iniPath, [NotNull]IUserConfig config)
|
||||
{
|
||||
const PrintStatus status = PrintStatus.Complete;
|
||||
const PrintJobStatus spoolerState = PrintJobStatus.Printed;
|
||||
|
|
|
|||
47
Common/AmagnoVirtualPrinter.Agent.Lib/Misc/PrintJobReader.cs
Normal file
47
Common/AmagnoVirtualPrinter.Agent.Lib/Misc/PrintJobReader.cs
Normal 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
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -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
|
||||
(
|
||||
|
|
@ -54,15 +57,29 @@ namespace AmagnoVirtualPrinter.Agent.Lib.Misc
|
|||
|
||||
public void Dispose()
|
||||
{
|
||||
_watcher.Dispose();
|
||||
_watcher?.Dispose();
|
||||
_socket.Stop();
|
||||
}
|
||||
|
||||
public void Init()
|
||||
{
|
||||
var config = GetRegistryConfig();
|
||||
try
|
||||
{
|
||||
var config = GetRegistryConfig();
|
||||
_socket = new TcpListener(IPAddress.Loopback, config.PrinterPort);
|
||||
_socket.Start();
|
||||
_socket.BeginAcceptTcpClient(HandleClient, _socket);
|
||||
|
||||
var dir = _directoryHelper.GetOutputDirectory(config);
|
||||
LogDebug($"Waiting on {_socket.LocalEndpoint}...");
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
LogError(e, "Error initializing tcp input printer");
|
||||
}
|
||||
}
|
||||
|
||||
private void StartFileWatcher([NotNull] string dir)
|
||||
{
|
||||
_watcher = new FileSystemWatcher(dir, "*.ini")
|
||||
{
|
||||
IncludeSubdirectories = false,
|
||||
|
|
@ -70,11 +87,7 @@ namespace AmagnoVirtualPrinter.Agent.Lib.Misc
|
|||
EnableRaisingEvents = true
|
||||
};
|
||||
_watcher.Changed += IniFileChanged;
|
||||
_socket = new TcpListener(IPAddress.Loopback, config.PrinterPort);
|
||||
_socket.Start();
|
||||
_socket.BeginAcceptTcpClient(HandleClient, _socket);
|
||||
|
||||
LogDebug($"Waiting on {_socket.LocalEndpoint}...");
|
||||
LogDebug("Setting file watcher on folder @{dir}", dir);
|
||||
}
|
||||
|
||||
private void HandleClient([NotNull]IAsyncResult ar)
|
||||
|
|
@ -90,17 +103,31 @@ 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);
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
_jobService.Start(job);
|
||||
private void RestartFileWatcherIfNeeded(string sid)
|
||||
{
|
||||
var config = GetUserRegistryConfig(sid);
|
||||
_outputDir = _directoryHelper.GetOutputDirectory(config);
|
||||
|
||||
if (_watcher == null || _watcher.Path != _outputDir)
|
||||
{
|
||||
StartFileWatcher(_outputDir);
|
||||
}
|
||||
}
|
||||
|
||||
private void IniFileChanged(object sender, [NotNull]FileSystemEventArgs e)
|
||||
|
|
@ -112,9 +139,8 @@ namespace AmagnoVirtualPrinter.Agent.Lib.Misc
|
|||
}
|
||||
|
||||
var rawName = $"{Path.GetFileNameWithoutExtension(ini)}.ps";
|
||||
var config = GetRegistryConfig();
|
||||
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)
|
||||
|
|
@ -124,6 +150,7 @@ namespace AmagnoVirtualPrinter.Agent.Lib.Misc
|
|||
|
||||
if (!isJobValid)
|
||||
{
|
||||
LogDebug("Job is not valid.");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -131,13 +158,16 @@ namespace AmagnoVirtualPrinter.Agent.Lib.Misc
|
|||
}
|
||||
if (status == PrintStatus.Canceled)
|
||||
{
|
||||
DeleteFiles(ini, dir, rawFile);
|
||||
LogDebug($"Deleting file on print status: {status}");
|
||||
DeleteFiles(ini, _outputDir, rawFile);
|
||||
}
|
||||
|
||||
var jobStatus = _jobService.ReadJobStatus(ini);
|
||||
if (jobStatus == JobStatus.Completed || jobStatus == JobStatus.Failed)
|
||||
{
|
||||
DeleteFiles(ini, dir, rawFile);
|
||||
LogDebug($"Deleting file on job status: {jobStatus}");
|
||||
Thread.Sleep(1000);
|
||||
DeleteFiles(ini, _outputDir, rawFile);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -192,6 +222,12 @@ namespace AmagnoVirtualPrinter.Agent.Lib.Misc
|
|||
}
|
||||
}
|
||||
|
||||
[NotNull]
|
||||
private IUserConfig GetUserRegistryConfig(string sid)
|
||||
{
|
||||
return _registryRepository.GetUserRegistryConfig(sid);
|
||||
}
|
||||
|
||||
[NotNull]
|
||||
private IExConfig GetRegistryConfig()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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")]
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
@ -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")]
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
@ -1,13 +1,18 @@
|
|||
using System.IO;
|
||||
using System;
|
||||
using System.IO;
|
||||
using AmagnoVirtualPrinter.Agent.Core.Interfaces;
|
||||
using AmagnoVirtualPrinter.Agent.Core;
|
||||
|
||||
namespace AmagnoVirtualPrinter.Utils
|
||||
{
|
||||
public class DirectoryHelper : IDirectoryHelper
|
||||
{
|
||||
public string GetOutputDirectory(IExConfig config)
|
||||
public string GetOutputDirectory(IUserConfig config)
|
||||
{
|
||||
if (config == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(config));
|
||||
}
|
||||
|
||||
if (string.IsNullOrWhiteSpace(config.ResolvedOutputDirectory))
|
||||
{
|
||||
var outputDir = Path.Combine(Path.GetTempPath(), "PrinterOutput");
|
||||
|
|
|
|||
|
|
@ -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")]
|
||||
|
|
|
|||
|
|
@ -4,17 +4,18 @@ 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;
|
||||
|
||||
using AmagnoVirtualPrinter.Agent.Core;
|
||||
|
||||
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)
|
||||
{
|
||||
|
|
@ -84,7 +85,6 @@ namespace AmagnoVirtualPrinter.Utils
|
|||
using (var key = driver.OpenSubKey(Keys.CONVERTER_KEY))
|
||||
{
|
||||
CheckForNull(key, Keys.CONVERTER_KEY);
|
||||
registryConfig.OutputDirectory = key.GetValue(KeyNames.OUTPUT_DIR).ToString();
|
||||
registryConfig.FileNameMask = key.GetValue(KeyNames.FILE_NAME_MASK).ToString();
|
||||
var portStr = key.GetValue(KeyNames.SERVER_PORT).ToString();
|
||||
registryConfig.PrinterPort = short.TryParse(portStr, out var portVal) ? portVal : DefaultServerPort;
|
||||
|
|
@ -97,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)
|
||||
{
|
||||
|
|
@ -107,6 +107,8 @@ namespace AmagnoVirtualPrinter.Utils
|
|||
|
||||
public IUserConfig GetUserRegistryConfig(string sid)
|
||||
{
|
||||
Logger.Trace("GetUserRegistryConfig for {sid}", sid);
|
||||
|
||||
var regView = GetRegistryView();
|
||||
var userConfig = new UserRegistryConfig();
|
||||
|
||||
|
|
@ -120,6 +122,7 @@ namespace AmagnoVirtualPrinter.Utils
|
|||
using (var converter = driver.OpenSubKey(Keys.CONVERTER_KEY))
|
||||
{
|
||||
CheckForNull(converter, Keys.CONVERTER_KEY);
|
||||
userConfig.OutputDirectory = converter.GetValue(KeyNames.OUTPUT_DIR).ToString();
|
||||
|
||||
subKey = "Redirect";
|
||||
using (var redirect = converter.OpenSubKey(subKey))
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
@ -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")]
|
||||
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
@ -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")]
|
||||
|
|
|
|||
|
|
@ -73,6 +73,7 @@ namespace AmagnoVirtualPrinter.WixSharpInstaller
|
|||
InstallPrivileges = InstallPrivileges.elevated
|
||||
};
|
||||
|
||||
project.ControlPanelInfo.Manufacturer = "Amagno GmbH";
|
||||
project.BeforeInstall += ProjectOnBeforeInstall;
|
||||
|
||||
project.BuildMsi();
|
||||
|
|
@ -83,13 +84,13 @@ 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;
|
||||
|
||||
var gsKey = RegistryKey
|
||||
.OpenBaseKey(Microsoft.Win32.RegistryHive.LocalMachine, registryView)
|
||||
.OpenSubKey(@"SOFTWARE\GPL Ghostscript\9.52");
|
||||
.OpenSubKey(@"SOFTWARE\GPL Ghostscript");
|
||||
|
||||
if (gsKey == null)
|
||||
{
|
||||
|
|
@ -98,6 +99,23 @@ namespace AmagnoVirtualPrinter.WixSharpInstaller
|
|||
return;
|
||||
}
|
||||
|
||||
var subKeyNames = gsKey.GetSubKeyNames();
|
||||
|
||||
if (!subKeyNames.Any())
|
||||
{
|
||||
MessageBox.Show(gsNotFound);
|
||||
e.Result = ActionResult.Failure;
|
||||
return;
|
||||
}
|
||||
|
||||
gsKey = gsKey.OpenSubKey(subKeyNames[0]);
|
||||
if (gsKey == null)
|
||||
{
|
||||
MessageBox.Show(gsNotFound);
|
||||
e.Result = ActionResult.Failure;
|
||||
return;
|
||||
}
|
||||
|
||||
var gsAssembly = (string)gsKey.GetValue("GS_DLL");
|
||||
|
||||
if (System.IO.File.Exists(gsAssembly))
|
||||
|
|
@ -121,11 +139,11 @@ namespace AmagnoVirtualPrinter.WixSharpInstaller
|
|||
{
|
||||
new Dir
|
||||
(
|
||||
@"%ProgramFiles%\MyPrinterDriver\",
|
||||
@"%ProgramFiles%\AmagnoPrinterDriver\",
|
||||
new DirFiles(feature, _filesDir + @"\*", s => !s.EndsWith(".exe")),
|
||||
new File(new Id(SetupDriverId), feature, Path.Combine(_filesDir, Utils.Files.SETUP_DRIVER_EXE)),
|
||||
new File(feature, Path.Combine(_filesDir, Utils.Files.DILIVERY_EXE)),
|
||||
new File(feature, Path.Combine(_filesDir, Utils.Files.AGENT_PROGRESS_EXE)),
|
||||
new File(feature, Path.Combine(_filesDir, Files.DILIVERY_EXE)),
|
||||
new File(feature, Path.Combine(_filesDir, Files.AGENT_PROGRESS_EXE)),
|
||||
printerServiceFile
|
||||
)
|
||||
};
|
||||
|
|
@ -144,7 +162,7 @@ namespace AmagnoVirtualPrinter.WixSharpInstaller
|
|||
[NotNull]
|
||||
private static IEnumerable<RegValue> CreateRegValues(Feature feature)
|
||||
{
|
||||
var converterKey = $@"{Utils.Keys.PRINTER_DRIVER_KEY32}\{Utils.Keys.CONVERTER_KEY}";
|
||||
var converterKey = $@"{Keys.PRINTER_DRIVER_KEY32}\{Keys.CONVERTER_KEY}";
|
||||
|
||||
var regValues = new List<RegValue>();
|
||||
regValues.AddRange(CreateLocalMachineValues(feature, converterKey));
|
||||
|
|
@ -156,10 +174,10 @@ namespace AmagnoVirtualPrinter.WixSharpInstaller
|
|||
[NotNull]
|
||||
private static IEnumerable<RegValue> CreateLocalMachineValues(Feature feature, string converterKey)
|
||||
{
|
||||
var postConverterKey = $@"{Utils.Keys.PRINTER_DRIVER_KEY32}\{Utils.Keys.POSTCONVERTER_KEY}";
|
||||
var preConverterKey = $@"{Utils.Keys.PRINTER_DRIVER_KEY32}\{Utils.Keys.PRECONVERTER_KEY}";
|
||||
var converterPdfKey = $@"{Utils.Keys.PRINTER_DRIVER_KEY32}\{Utils.Keys.CONVERTER_PDF_KEY}";
|
||||
var converterTiffKey = $@"{Utils.Keys.PRINTER_DRIVER_KEY32}\{Utils.Keys.CONVERTER_TIFF_KEY}";
|
||||
var postConverterKey = $@"{Keys.PRINTER_DRIVER_KEY32}\{Keys.POSTCONVERTER_KEY}";
|
||||
var preConverterKey = $@"{Keys.PRINTER_DRIVER_KEY32}\{Keys.PRECONVERTER_KEY}";
|
||||
var converterPdfKey = $@"{Keys.PRINTER_DRIVER_KEY32}\{Keys.CONVERTER_PDF_KEY}";
|
||||
var converterTiffKey = $@"{Keys.PRINTER_DRIVER_KEY32}\{Keys.CONVERTER_TIFF_KEY}";
|
||||
var registryHive = RegistryHive.LocalMachine;
|
||||
|
||||
var result = new List<RegValue>
|
||||
|
|
@ -170,7 +188,6 @@ namespace AmagnoVirtualPrinter.WixSharpInstaller
|
|||
new RegValue(feature, registryHive, converterKey, KeyNames.SHOW_PROGRESS, 1) {AttributesDefinition = "Type=integer"},
|
||||
new RegValue(feature, registryHive, converterKey, KeyNames.PAGES_PER_SHEET, 1),
|
||||
new RegValue(feature, registryHive, converterKey, KeyNames.FILE_NAME_MASK, "{yyyy}{MM}{DD}{hh}{mm}{ss}{job05}{page03}"),
|
||||
new RegValue(feature, registryHive, converterKey, KeyNames.OUTPUT_DIR, string.Empty),
|
||||
new RegValue(feature, registryHive, converterKey, KeyNames.FORMAT, "ps"),
|
||||
new RegValue(feature, registryHive, converterPdfKey, KeyNames.ENABLED, 1) {AttributesDefinition = "Type=integer"},
|
||||
new RegValue(feature, registryHive, converterPdfKey, KeyNames.MULTIPAGE, 1) {AttributesDefinition = "Type=integer"},
|
||||
|
|
@ -211,6 +228,7 @@ namespace AmagnoVirtualPrinter.WixSharpInstaller
|
|||
{
|
||||
new RegValue(feature, registryHive, converterKey, KeyNames.PRINT_FORMAT, "PDF"),
|
||||
new RegValue(feature, registryHive, converterKey, KeyNames.RENDER_DPI, 300) {AttributesDefinition = "Type=integer"},
|
||||
new RegValue(feature, registryHive, converterKey, KeyNames.OUTPUT_DIR, string.Empty),
|
||||
new RegValue(feature, registryHive, redirectKey, KeyNames.ENABLED, 1) {AttributesDefinition = "Type=integer"},
|
||||
new RegValue(feature, registryHive, redirectKey, KeyNames.PRINTER, "")
|
||||
};
|
||||
|
|
|
|||
18
README.md
18
README.md
|
|
@ -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://link). 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**.
|
||||
|
||||
|
|
@ -44,13 +44,15 @@ Alternatively use `create_msi.ps1` which automates the building step above.
|
|||
|
||||
Make sure Ghostscript is installed on your machine.
|
||||
|
||||
While installing, several registry entries are inserted into `Computer\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\AmagnoVirutalPrinter\`. The most important ones are those under the key `Application`
|
||||
While installing, several registry entries are inserted into `Computer\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\AmagnoVirtualPrinter\`. The most important ones are those under the key `Application`
|
||||
- **Pre-Converter:** Contains the exe to be executed (pre convert process) and the `arg` to be processed by the application (for example: `C:\Program Files\MyApp.exe PRINT`).
|
||||
- **Post-Converter:** Contains the exe to be executed (post convert process) and the args to be processed by the application (for example: `C:\Program Files\MyApp.exe PRINTCOMPLETE`).
|
||||
|
||||
The `Converter` key defines the settings which are needed for the convert process, e.g. server port (9101 by default) and output directory for the converted prints, which can be processed by the application. If the value is set to an empty string, the default temp path will be used (e.g. `C:\temp\PrinterOuput`).
|
||||
The `Converter` key defines the settings which are needed for the convert process, e.g. server port (9101 by default).
|
||||
The output directory can be set in `Computer\HKEY_CURRENT_USER\SOFTWARE\vpd\PrinterDriver\Converter` for the converted prints, which can be processed by the application. If the value is set to an empty string, the default temp path will be used (e.g. `C:\temp\PrinterOuput`).
|
||||
### Debugging
|
||||
|
||||
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.
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -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")]
|
||||
|
|
@ -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>
|
||||
|
|
@ -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")]
|
||||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -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>
|
||||
|
|
@ -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")]
|
||||
|
|
@ -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>
|
||||
|
|
@ -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")]
|
||||
|
|
@ -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>
|
||||
|
|
@ -8,14 +8,13 @@ using System.Linq;
|
|||
using AmagnoVirtualPrinter.Agent.Core.Interfaces;
|
||||
using AmagnoVirtualPrinter.ProgressInfo.Lib.Interfaces;
|
||||
using AmagnoVirtualPrinter.Utils;
|
||||
using AmagnoVirtualPrinter.Agent.Core;
|
||||
|
||||
namespace AmagnoVirtualPrinter.ProgressInfo.Lib
|
||||
{
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class ProgressInfoProcessManager : IProgressInfoProcessManager
|
||||
{
|
||||
private const string ProcessName = "VPDAgentProgress";
|
||||
private const string ProcessName = "AmagnoPrinterAgentProgress";
|
||||
|
||||
public bool IsRunning()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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")]
|
||||
|
|
@ -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>
|
||||
|
|
@ -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
BIN
codeSigningCert.pfx
Normal file
Binary file not shown.
|
|
@ -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
26
sign_files.ps1
Normal 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
16
sign_setup.ps1
Normal 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"
|
||||
Loading…
Add table
Add a link
Reference in a new issue