Compare commits
68 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 |
54 changed files with 566 additions and 1043 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
|
||||
43
.github/workflows/dotnet-desktop.yml
vendored
43
.github/workflows/dotnet-desktop.yml
vendored
|
|
@ -1,43 +0,0 @@
|
|||
name: .NET Core Desktop
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
strategy:
|
||||
matrix:
|
||||
configuration: [Release]
|
||||
|
||||
runs-on: windows-latest
|
||||
|
||||
env:
|
||||
Solution_Name: AmagnoVirtualPrinter.sln
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
# Install the .NET Core workload
|
||||
- name: Install .NET Core
|
||||
uses: actions/setup-dotnet@v1
|
||||
with:
|
||||
dotnet-version: 5.0.x
|
||||
|
||||
# Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild
|
||||
- name: Setup MSBuild.exe
|
||||
uses: microsoft/setup-msbuild@v1
|
||||
|
||||
- name: Restore the application
|
||||
run: msbuild $env:Solution_Name /t:Restore /p:Configuration=$env:Configuration
|
||||
env:
|
||||
Configuration: ${{ matrix.configuration }}
|
||||
|
||||
- name: Build solution
|
||||
run: msbuild $env:Solution_Name /t:Rebuild /p:Configuration=$env:Configuration
|
||||
env:
|
||||
Configuration: ${{ matrix.configuration }}
|
||||
28
.github/workflows/release.yml
vendored
Normal file
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 }}
|
||||
20
.github/workflows/releases.yml
vendored
20
.github/workflows/releases.yml
vendored
|
|
@ -1,20 +0,0 @@
|
|||
name: Releases
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '*'
|
||||
|
||||
jobs:
|
||||
|
||||
build:
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- name: Create msi from PowerShell Script
|
||||
run: pwsh -command ".\$GITHUB_WORKSPACE\create_msi.ps1"
|
||||
|
||||
- name: Create Release
|
||||
uses: ncipollo/release-action@v1.7.3
|
||||
with:
|
||||
artifact: ./AmagnoPrinterInstaller.msi
|
||||
token: ${{ secrets.GITHUB_TOKEN }
|
||||
2
.gitignore
vendored
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.1")]
|
||||
[assembly: AssemblyFileVersion("1.0.1")]
|
||||
[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.1")]
|
||||
[assembly: AssemblyFileVersion("1.0.1")]
|
||||
[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.1")]
|
||||
[assembly: AssemblyFileVersion("1.0.1")]
|
||||
[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.1")]
|
||||
[assembly: AssemblyFileVersion("1.0.1")]
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
@ -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,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.1")]
|
||||
[assembly: AssemblyFileVersion("1.0.1")]
|
||||
|
|
@ -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;
|
||||
|
|
@ -67,13 +66,15 @@ namespace AmagnoVirtualPrinter.Agent.Lib.Misc
|
|||
{
|
||||
var now = DateTime.Now;
|
||||
|
||||
var jobInfo = GetCurrentPrintJobs(printerName).FirstOrDefault();
|
||||
var jobInfo = PrintJobReader.GetCurrentPrintJobs(printerName).FirstOrDefault();
|
||||
if (jobInfo == null)
|
||||
{
|
||||
throw new InvalidOperationException();
|
||||
}
|
||||
|
||||
var session = GetCurrentSessions(jobInfo).FirstOrDefault();
|
||||
var sessions = GetCurrentSessions(jobInfo).ToArray();
|
||||
var session = sessions.FirstOrDefault(s => s.FoundDomain) ?? sessions.FirstOrDefault();
|
||||
|
||||
var config = _registryRepository.GetRegistryConfig();
|
||||
var userConfig = _registryRepository.GetUserRegistryConfig(session.Sid);
|
||||
var root = _directoryHelper.GetOutputDirectory(userConfig);
|
||||
|
|
@ -144,11 +145,11 @@ namespace AmagnoVirtualPrinter.Agent.Lib.Misc
|
|||
{
|
||||
var domain = job.DomainName;
|
||||
var machine = job.MachineName?.TrimStart('\\');
|
||||
var user = job.UserName;
|
||||
var username = job.UserName;
|
||||
|
||||
LogDebug($"Searching for session of {domain}\\{user} on {machine} !");
|
||||
LogDebug($"Searching for session of {domain}\\{username} on {machine}!");
|
||||
|
||||
if (domain == null || machine == null || user == null)
|
||||
if (domain == null || machine == null || username == null)
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
|
|
@ -159,7 +160,7 @@ namespace AmagnoVirtualPrinter.Agent.Lib.Misc
|
|||
var sessions = server.GetSessions().Where(s => s.UserName != null && s.DomainName != null);
|
||||
foreach (var session in sessions)
|
||||
{
|
||||
if (!session.UserName.Equals(user, cmp))
|
||||
if (!session.UserName.Equals(username, cmp))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
|
@ -168,7 +169,7 @@ namespace AmagnoVirtualPrinter.Agent.Lib.Misc
|
|||
var isDomainUser = session.DomainName.Equals(domain, cmp);
|
||||
if (!isSingleUser && !isDomainUser)
|
||||
{
|
||||
continue;
|
||||
LogWarn("Found Session {sessionId} for {username} but its not of domain {domain} or {machine}", session.SessionId, username, domain, machine);
|
||||
}
|
||||
|
||||
var sessionId = session.SessionId;
|
||||
|
|
@ -178,47 +179,13 @@ namespace AmagnoVirtualPrinter.Agent.Lib.Misc
|
|||
{
|
||||
Id = sessionId,
|
||||
Desktop = desktopName,
|
||||
Sid = account.Translate(typeof(SecurityIdentifier)).Value
|
||||
Sid = account.Translate(typeof(SecurityIdentifier)).Value,
|
||||
FoundDomain = isSingleUser || isDomainUser
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[ItemNotNull]
|
||||
private IEnumerable<IJobInfo> GetCurrentPrintJobs(string printerName)
|
||||
{
|
||||
using (var server = new LocalPrintServer())
|
||||
{
|
||||
using (var queue = server.GetPrintQueue(printerName))
|
||||
{
|
||||
using (var jobs = queue.GetPrintJobInfoCollection())
|
||||
{
|
||||
foreach (var job in jobs)
|
||||
{
|
||||
using (job)
|
||||
{
|
||||
var id = job.JobIdentifier;
|
||||
var machine = server.Name;
|
||||
var domain = Environment.UserDomainName;
|
||||
var user = job.Submitter;
|
||||
var name = job.Name;
|
||||
yield return new JobInfo
|
||||
{
|
||||
JobId = id,
|
||||
Name = name,
|
||||
DomainName = domain,
|
||||
MachineName = machine,
|
||||
UserName = user,
|
||||
Status = job.JobStatus,
|
||||
DeviceName = queue.Name
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[NotNull]
|
||||
private string GetRawFileExtension(IntermediateFormat format)
|
||||
{
|
||||
|
|
@ -242,5 +209,10 @@ namespace AmagnoVirtualPrinter.Agent.Lib.Misc
|
|||
{
|
||||
_logger.Error(exception, message, args);
|
||||
}
|
||||
|
||||
private void LogWarn(string message, params object[] args)
|
||||
{
|
||||
_logger.Warn(message, args);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
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
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -30,7 +30,9 @@ namespace AmagnoVirtualPrinter.Agent.Lib.Misc
|
|||
[NotNull]
|
||||
private readonly IJobProcessor _jobProcessor;
|
||||
|
||||
private IDirectoryHelper _directoryHelper;
|
||||
[NotNull]
|
||||
private readonly IDirectoryHelper _directoryHelper;
|
||||
|
||||
private TcpListener _socket;
|
||||
private FileSystemWatcher _watcher;
|
||||
private string _outputDir;
|
||||
|
|
@ -101,19 +103,20 @@ namespace AmagnoVirtualPrinter.Agent.Lib.Misc
|
|||
|
||||
LogDebug($"{remote} --> {local}");
|
||||
job = _jobFactory.Create(printer, client.GetStream());
|
||||
if (job == null)
|
||||
{
|
||||
LogError("Job could not be created.");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
LogDebug($"Temporarily printed '{job.RawDataPath}'!");
|
||||
socket.BeginAcceptTcpClient(HandleClient, ar.AsyncState);
|
||||
|
||||
_jobService.Start(job);
|
||||
|
||||
RestartFileWatcherIfNeeded(job.SessionInfo.Sid);
|
||||
|
||||
if (job == null)
|
||||
{
|
||||
LogError("Job could not be created. Check your Printer Settings.");
|
||||
}
|
||||
else
|
||||
{
|
||||
LogDebug($"Temporarily printed '{job.RawDataPath}'!");
|
||||
_jobService.Start(job);
|
||||
RestartFileWatcherIfNeeded(job.SessionInfo.Sid);
|
||||
}
|
||||
}
|
||||
|
||||
private void RestartFileWatcherIfNeeded(string sid)
|
||||
|
|
|
|||
|
|
@ -28,5 +28,5 @@ using System.Runtime.InteropServices;
|
|||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
[assembly: AssemblyVersion("1.0.1")]
|
||||
[assembly: AssemblyFileVersion("1.0.1")]
|
||||
[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.1")]
|
||||
[assembly: AssemblyFileVersion("1.0.1")]
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
@ -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.1")]
|
||||
[assembly: AssemblyFileVersion("1.0.1")]
|
||||
[assembly: AssemblyVersion("1.0.3")]
|
||||
[assembly: AssemblyFileVersion("1.0.3")]
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ using System.Linq;
|
|||
using AmagnoVirtualPrinter.Agent.Core.Enums;
|
||||
using AmagnoVirtualPrinter.Agent.Core.Interfaces;
|
||||
using AmagnoVirtualPrinter.Agent.Core.Model;
|
||||
using AmagnoVirtualPrinter.Logging;
|
||||
using JetBrains.Annotations;
|
||||
|
||||
using Microsoft.Win32;
|
||||
|
|
@ -13,6 +14,8 @@ namespace AmagnoVirtualPrinter.Utils
|
|||
public class RegistryRepository : IRegistryRepository
|
||||
{
|
||||
private const short DefaultServerPort = 9101;
|
||||
|
||||
private static readonly IVirtualPrinterLogger<RegistryRepository> Logger = new VirtualPrinterLogger<RegistryRepository>();
|
||||
|
||||
public bool TryGetGhostscriptPath(out string path)
|
||||
{
|
||||
|
|
@ -94,7 +97,7 @@ namespace AmagnoVirtualPrinter.Utils
|
|||
}
|
||||
|
||||
[ContractAnnotation("key:null => void")]
|
||||
private void CheckForNull(RegistryKey key, string keyName)
|
||||
private static void CheckForNull(RegistryKey key, string keyName)
|
||||
{
|
||||
if (key == null)
|
||||
{
|
||||
|
|
@ -104,6 +107,8 @@ namespace AmagnoVirtualPrinter.Utils
|
|||
|
||||
public IUserConfig GetUserRegistryConfig(string sid)
|
||||
{
|
||||
Logger.Trace("GetUserRegistryConfig for {sid}", sid);
|
||||
|
||||
var regView = GetRegistryView();
|
||||
var userConfig = new UserRegistryConfig();
|
||||
|
||||
|
|
|
|||
|
|
@ -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.1")]
|
||||
[assembly: AssemblyFileVersion("1.0.1")]
|
||||
[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.1")]
|
||||
[assembly: AssemblyFileVersion("1.0.1")]
|
||||
[assembly: AssemblyVersion("1.0.3")]
|
||||
[assembly: AssemblyFileVersion("1.0.3")]
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ namespace AmagnoVirtualPrinter.WixSharpInstaller
|
|||
const string gsNotFound = "Ghostscript not found!\n" +
|
||||
"Please install Ghostscript version 9.52 or higher.\n" +
|
||||
"You can find the installer on the official website:\n" +
|
||||
"https://www.ghostscript.com/download/gsdnld.html";
|
||||
"https://www.ghostscript.com/releases/gsdnld.html";
|
||||
|
||||
var registryView = Environment.Is64BitOperatingSystem ? RegistryView.Registry64 : RegistryView.Registry32;
|
||||
|
||||
|
|
@ -100,6 +100,14 @@ namespace AmagnoVirtualPrinter.WixSharpInstaller
|
|||
}
|
||||
|
||||
var subKeyNames = gsKey.GetSubKeyNames();
|
||||
|
||||
if (!subKeyNames.Any())
|
||||
{
|
||||
MessageBox.Show(gsNotFound);
|
||||
e.Result = ActionResult.Failure;
|
||||
return;
|
||||
}
|
||||
|
||||
gsKey = gsKey.OpenSubKey(subKeyNames[0]);
|
||||
if (gsKey == null)
|
||||
{
|
||||
|
|
|
|||
16
README.md
16
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://amagno.de) or use the latest release in GitHub. Make sure to run the installer with extended rights. After installation, you may need to [configure](#configure) the _AmagnoVirtualPrinter_.
|
||||
If you want to use the official installer, you can download it [here](https://amagno.de/clients) or use the latest release in GitHub. Make sure to run the installer with extended rights. After installation, you may need to [configure](#configure) the _AmagnoVirtualPrinter_.
|
||||
After installation, a new printer with the name set in _Defaults.cs_ can be located under _Printer & Scanner_ in the Microsoft® Windows settings.
|
||||
|
||||
### From Source
|
||||
|
||||
#### **_Dependencies_**
|
||||
#### Dependencies
|
||||
|
||||
To compile the installer, please make sure you Wix Toolset is installed. The [WixSharp library](https://github.com/oleg-shilo/wixsharp) is used to define the package in `AmagnoVirtualPrinter.WixSharpInstaller`.
|
||||
To compile the installer, please make sure the Wix Toolset is installed. The [WixSharp library](https://github.com/oleg-shilo/wixsharp) is used to define the package in `AmagnoVirtualPrinter.WixSharpInstaller`.
|
||||
|
||||
#### **_Create MSI package_**
|
||||
#### Create MSI package
|
||||
|
||||
To install the driver from source, build the project in release mode. When the build is run successfully, open up powershell and navigate to `C:\[Git]\AmagnoVirtualPrinter\Files`. Then run the `AmagnoPrinterInstaller.exe "/MSBUILD:C:\[Git]\AmagnoVirtualPrinter\Installer\AmagnoVirtualPrinter.WixSharpInstaller" "/p:C:\[Git]\AmagnoVirtualPrinter\"` where `/p:` is the output directory for the msi and working directory for the WixSharp project. Make sure the given working directory contains a `Files` folder with all binaries needed for _AmagnoVirtualPrinter_. This command will use WixSharp to create the msi package right next to the AmagnoPrinterInstaller.exe called **AmagnoPrinterInstaller.msi**.
|
||||
|
||||
|
|
@ -54,7 +54,5 @@ The output directory can be set in `Computer\HKEY_CURRENT_USER\SOFTWARE\vpd\Prin
|
|||
|
||||
To debug the _AmagnoVirtualPrinter_, run the msi. After installation, go to _Windows Services_ and stop the _AmagnoPrinterService_. In your IDE, select the AmagnoVirtualPrinter.Agent.Console as startup project and run in debug mode. To start a test print (and debug the solution) start PowerShell or cmd and navigate to the root folder of the repository. Go to `Files` and run `.\setupdrv.exe test`, which will create a test page and send it to the virtual printer. Or just print any document you want to.
|
||||
|
||||
## License
|
||||
|
||||
|
||||
|
||||
## Create Release
|
||||
To create a release, you have to tag a commit. Then the release pipeline compiles the source code, builds the installation, and creates the release on GitHub.
|
||||
|
|
|
|||
|
|
@ -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.1")]
|
||||
[assembly: AssemblyFileVersion("1.0.1")]
|
||||
[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.1")]
|
||||
[assembly: AssemblyFileVersion("1.0.1")]
|
||||
[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>
|
||||
|
|
@ -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.1")]
|
||||
[assembly: AssemblyFileVersion("1.0.1")]
|
||||
[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.1")]
|
||||
[assembly: AssemblyFileVersion("1.0.1")]
|
||||
[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,3 +1,5 @@
|
|||
$args = '/MSBUILD:..\Installer\AmagnoVirtualPrinter.WixSharpInstaller', '/p:..\AmagnoVirtualPrinter'
|
||||
Remove-Item -Path '.\Files\*' -Filter '*.pdb' -Force
|
||||
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