Changed project names
This commit is contained in:
parent
b4c4aa4010
commit
a29e57e66d
130 changed files with 501 additions and 504 deletions
|
|
@ -6,7 +6,7 @@
|
|||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{12402F90-A2AE-4549-9142-F90650E2082A}</ProjectGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>VirtualPrinter.SetupDriver</RootNamespace>
|
||||
<RootNamespace>AmagnoVirtualPrinter.SetupDriver</RootNamespace>
|
||||
<AssemblyName>setupdrv</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
|
|
@ -32,7 +32,7 @@
|
|||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<StartupObject>VirtualPrinter.SetupDriver.Program</StartupObject>
|
||||
<StartupObject>AmagnoVirtualPrinter.SetupDriver.Program</StartupObject>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
|
|
@ -46,13 +46,13 @@
|
|||
<Compile Include="Windows.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\Common\VirtualPrinter.Logging\VirtualPrinter.Logging.csproj">
|
||||
<ProjectReference Include="..\..\Common\AmagnoVirtualPrinter.Logging\AmagnoVirtualPrinter.Logging.csproj">
|
||||
<Project>{aa25364d-22d5-44b0-86a5-6fb14c686308}</Project>
|
||||
<Name>VirtualPrinter.Logging</Name>
|
||||
<Name>AmagnoVirtualPrinter.Logging</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\Common\VirtualPrinter.Utils\VirtualPrinter.Utils.csproj">
|
||||
<ProjectReference Include="..\..\Common\AmagnoVirtualPrinter.Utils\AmagnoVirtualPrinter.Utils.csproj">
|
||||
<Project>{cd1c8e9d-5335-41ac-b0c0-88fd7c7c55f3}</Project>
|
||||
<Name>VirtualPrinter.Utils</Name>
|
||||
<Name>AmagnoVirtualPrinter.Utils</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
|
@ -1,11 +1,11 @@
|
|||
namespace VirtualPrinter.SetupDriver
|
||||
namespace AmagnoVirtualPrinter.SetupDriver
|
||||
{
|
||||
public static class Defaults
|
||||
{
|
||||
/// <summary>
|
||||
/// The name that appears in the Windows "Printer & Scanner" menu.
|
||||
/// </summary>
|
||||
public const string PrinterName = "AMAGNO";
|
||||
public const string PrinterName = "Amagno";
|
||||
|
||||
/// <summary>
|
||||
/// The printer port.
|
||||
|
|
@ -1,15 +1,12 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
|
||||
using AmagnoVirtualPrinter.Logging;
|
||||
using AmagnoVirtualPrinter.Utils;
|
||||
using JetBrains.Annotations;
|
||||
using static AmagnoVirtualPrinter.SetupDriver.Windows;
|
||||
using static AmagnoVirtualPrinter.SetupDriver.Defaults;
|
||||
|
||||
using VirtualPrinter.Logging;
|
||||
using VirtualPrinter.Utils;
|
||||
|
||||
using static VirtualPrinter.SetupDriver.Windows;
|
||||
using static VirtualPrinter.SetupDriver.Defaults;
|
||||
|
||||
namespace VirtualPrinter.SetupDriver
|
||||
namespace AmagnoVirtualPrinter.SetupDriver
|
||||
{
|
||||
internal class Program
|
||||
{
|
||||
|
|
@ -2,10 +2,10 @@
|
|||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
[assembly: AssemblyTitle("VirtualPrinter.SetupDriver")]
|
||||
[assembly: AssemblyDescription("The setup for the virtual printer driver")]
|
||||
[assembly: AssemblyTitle("AmagnoVirtualPrinter.SetupDriver")]
|
||||
[assembly: AssemblyDescription("The setup for the Amagno Printer Driver")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyCompany("Amagno")]
|
||||
[assembly: AssemblyProduct("")]
|
||||
[assembly: AssemblyCopyright("")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
|
|
@ -2,12 +2,10 @@
|
|||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
|
||||
using AmagnoVirtualPrinter.Logging;
|
||||
using JetBrains.Annotations;
|
||||
|
||||
using VirtualPrinter.Logging;
|
||||
|
||||
namespace VirtualPrinter.SetupDriver
|
||||
namespace AmagnoVirtualPrinter.SetupDriver
|
||||
{
|
||||
internal class Shell
|
||||
{
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
using JetBrains.Annotations;
|
||||
|
||||
namespace VirtualPrinter.SetupDriver
|
||||
namespace AmagnoVirtualPrinter.SetupDriver
|
||||
{
|
||||
internal static class Windows
|
||||
{
|
||||
|
|
@ -7,8 +7,8 @@
|
|||
<ProjectGuid>{A668846E-54C7-483D-9CF7-48F77EA398CA}</ProjectGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>VirtualPrinter.WixSharpInstaller</RootNamespace>
|
||||
<AssemblyName>VPDInstaller</AssemblyName>
|
||||
<RootNamespace>AmagnoVirtualPrinter.WixSharpInstaller</RootNamespace>
|
||||
<AssemblyName>AmagnoPrinterInstaller</AssemblyName>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<Deterministic>true</Deterministic>
|
||||
<NuGetPackageImportStamp>
|
||||
|
|
@ -36,7 +36,7 @@
|
|||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<StartupObject>VirtualPrinter.WixSharpInstaller.Script</StartupObject>
|
||||
<StartupObject>AmagnoVirtualPrinter.WixSharpInstaller.Script</StartupObject>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
|
|
@ -46,12 +46,6 @@
|
|||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<None Include="wix\$(ProjectName).g.wxs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\Common\VirtualPrinter.Utils\VirtualPrinter.Utils.csproj">
|
||||
<Project>{cd1c8e9d-5335-41ac-b0c0-88fd7c7c55f3}</Project>
|
||||
<Name>VirtualPrinter.Utils</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="JetBrains.Annotations" Version="2020.1.0" />
|
||||
<PackageReference Include="WixSharp.bin" Version="1.14.8" />
|
||||
|
|
@ -60,13 +54,19 @@
|
|||
<ItemGroup>
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
</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>-->
|
||||
<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>
|
||||
|
|
@ -4,10 +4,10 @@ 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("VirtualPrinter.WixSharpInstaller")]
|
||||
[assembly: AssemblyTitle("AmagnoVirtualPrinter.WixSharpInstaller")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyCompany("Amagno")]
|
||||
[assembly: AssemblyProduct("")]
|
||||
[assembly: AssemblyCopyright("")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
|
|
@ -5,20 +5,19 @@ using System.Diagnostics;
|
|||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
using AmagnoVirtualPrinter.Utils;
|
||||
using JetBrains.Annotations;
|
||||
using Microsoft.Deployment.WindowsInstaller;
|
||||
using Microsoft.Win32;
|
||||
using VirtualPrinter.Utils;
|
||||
|
||||
using WixSharp;
|
||||
|
||||
using Action = WixSharp.Action;
|
||||
using File = WixSharp.File;
|
||||
using Files = VirtualPrinter.Utils.Files;
|
||||
using Keys = VirtualPrinter.Utils.Keys;
|
||||
using Files = AmagnoVirtualPrinter.Utils.Files;
|
||||
using Keys = AmagnoVirtualPrinter.Utils.Keys;
|
||||
using RegistryHive = WixSharp.RegistryHive;
|
||||
|
||||
namespace VirtualPrinter.WixSharpInstaller
|
||||
namespace AmagnoVirtualPrinter.WixSharpInstaller
|
||||
{
|
||||
public class Script
|
||||
{
|
||||
|
|
@ -45,13 +44,13 @@ namespace VirtualPrinter.WixSharpInstaller
|
|||
throw new ArgumentException("Argument for working directory (/p) not set.");
|
||||
}
|
||||
|
||||
_filesDir = Path.Combine(workingDir, Files.FILES);
|
||||
var feature = new Feature("VPD");
|
||||
var printerServiceFile = new File(feature, Path.Combine(_filesDir, Files.PRINTER_SERVICE_EXE))
|
||||
_filesDir = Path.Combine(workingDir, Utils.Files.FILES);
|
||||
var feature = new Feature("AmagnoPrinter");
|
||||
var printerServiceFile = new File(feature, Path.Combine(_filesDir, Utils.Files.PRINTER_SERVICE_EXE))
|
||||
{
|
||||
ServiceInstaller = new ServiceInstaller
|
||||
{
|
||||
Name = "VirtualPrinterService",
|
||||
Name = "AmagnoPrinterService",
|
||||
StartOn = SvcEvent.Install_Wait,
|
||||
StopOn = SvcEvent.InstallUninstall_Wait,
|
||||
RemoveOn = SvcEvent.Uninstall_Wait,
|
||||
|
|
@ -60,14 +59,14 @@ namespace VirtualPrinter.WixSharpInstaller
|
|||
}
|
||||
};
|
||||
|
||||
var project = new ManagedProject("VPDInstaller")
|
||||
var project = new ManagedProject("AmagnoPrinterInstaller")
|
||||
{
|
||||
Name = "Virtual Printer Driver",
|
||||
Name = "Amagno Printer",
|
||||
GUID = new Guid("8712D2CD-A9F6-456F-99C8-92C2BB070596"),
|
||||
UpgradeCode = new Guid("0B37A935-EDEC-4ACA-9307-6D8299496C1D"),
|
||||
UI = WUI.WixUI_InstallDir,
|
||||
Version = Version.Parse(FileVersionInfo.GetVersionInfo(System.Reflection.Assembly.GetExecutingAssembly().Location).FileVersion),
|
||||
LicenceFile = Path.Combine(workingDir, Files.LICENCE_FILE),
|
||||
LicenceFile = Path.Combine(workingDir, Utils.Files.LICENCE_FILE),
|
||||
Dirs = CreateProjectDirs(feature, printerServiceFile),
|
||||
Actions = CreateActions(),
|
||||
RegValues = CreateRegValues(feature).ToArray(),
|
||||
|
|
@ -107,7 +106,7 @@ namespace VirtualPrinter.WixSharpInstaller
|
|||
return;
|
||||
}
|
||||
|
||||
MessageBox.Show("gsNotFound");
|
||||
MessageBox.Show(gsNotFound);
|
||||
e.Result = ActionResult.Failure;
|
||||
}
|
||||
|
||||
|
|
@ -124,9 +123,9 @@ namespace VirtualPrinter.WixSharpInstaller
|
|||
(
|
||||
@"%ProgramFiles%\MyPrinterDriver\",
|
||||
new DirFiles(feature, _filesDir + @"\*", s => !s.EndsWith(".exe")),
|
||||
new File(new Id(SetupDriverId), feature, Path.Combine(_filesDir, Files.SETUP_DRIVER_EXE)),
|
||||
new File(feature, Path.Combine(_filesDir, Files.DILIVERY_EXE)),
|
||||
new File(feature, Path.Combine(_filesDir, Files.AGENT_PROGRESS_EXE)),
|
||||
new File(new Id(SetupDriverId), feature, Path.Combine(_filesDir, Utils.Files.SETUP_DRIVER_EXE)),
|
||||
new File(feature, Path.Combine(_filesDir, Utils.Files.DILIVERY_EXE)),
|
||||
new File(feature, Path.Combine(_filesDir, Utils.Files.AGENT_PROGRESS_EXE)),
|
||||
printerServiceFile
|
||||
)
|
||||
};
|
||||
|
|
@ -145,7 +144,7 @@ namespace VirtualPrinter.WixSharpInstaller
|
|||
[NotNull]
|
||||
private static IEnumerable<RegValue> CreateRegValues(Feature feature)
|
||||
{
|
||||
var converterKey = $@"{Keys.PRINTER_DRIVER_KEY32}\{Keys.CONVERTER_KEY}";
|
||||
var converterKey = $@"{Utils.Keys.PRINTER_DRIVER_KEY32}\{Utils.Keys.CONVERTER_KEY}";
|
||||
|
||||
var regValues = new List<RegValue>();
|
||||
regValues.AddRange(CreateLocalMachineValues(feature, converterKey));
|
||||
|
|
@ -157,17 +156,15 @@ namespace VirtualPrinter.WixSharpInstaller
|
|||
[NotNull]
|
||||
private static IEnumerable<RegValue> CreateLocalMachineValues(Feature feature, string converterKey)
|
||||
{
|
||||
var postConverterKey = $@"{Keys.PRINTER_DRIVER_KEY32}\{Keys.POSTCONVERTER_KEY}";
|
||||
var preConverterKey = $@"{Keys.PRINTER_DRIVER_KEY32}\{Keys.PRECONVERTER_KEY}";
|
||||
var converterPdfKey = $@"{Keys.PRINTER_DRIVER_KEY32}\{Keys.CONVERTER_PDF_KEY}";
|
||||
var converterTiffKey = $@"{Keys.PRINTER_DRIVER_KEY32}\{Keys.CONVERTER_TIFF_KEY}";
|
||||
var postConverterKey = $@"{Utils.Keys.PRINTER_DRIVER_KEY32}\{Utils.Keys.POSTCONVERTER_KEY}";
|
||||
var preConverterKey = $@"{Utils.Keys.PRINTER_DRIVER_KEY32}\{Utils.Keys.PRECONVERTER_KEY}";
|
||||
var converterPdfKey = $@"{Utils.Keys.PRINTER_DRIVER_KEY32}\{Utils.Keys.CONVERTER_PDF_KEY}";
|
||||
var converterTiffKey = $@"{Utils.Keys.PRINTER_DRIVER_KEY32}\{Utils.Keys.CONVERTER_TIFF_KEY}";
|
||||
var registryHive = RegistryHive.LocalMachine;
|
||||
|
||||
return new List<RegValue>
|
||||
var result = new List<RegValue>
|
||||
{
|
||||
new RegValue(feature, registryHive, Keys.PRINTER_DRIVER_KEY32, KeyNames.INSTALLATION_DIR, "[INSTALLDIR]"),
|
||||
new RegValue(feature, registryHive, postConverterKey, KeyNames.EXECUTABLE_FILE, Files.POST_CONVERTER),
|
||||
new RegValue(feature, registryHive, preConverterKey, KeyNames.EXECUTABLE_FILE, Files.PRE_CONVERTER),
|
||||
new RegValue(feature, registryHive, Utils.Keys.PRINTER_DRIVER_KEY32, KeyNames.INSTALLATION_DIR, "[INSTALLDIR]"),
|
||||
new RegValue(feature, registryHive, converterKey, KeyNames.SERVER_PORT, 9101) {AttributesDefinition = "Type=integer"},
|
||||
new RegValue(feature, registryHive, converterKey, KeyNames.THREADS, 2),
|
||||
new RegValue(feature, registryHive, converterKey, KeyNames.SHOW_PROGRESS, 1) {AttributesDefinition = "Type=integer"},
|
||||
|
|
@ -187,6 +184,21 @@ namespace VirtualPrinter.WixSharpInstaller
|
|||
new RegValue(feature, registryHive, converterTiffKey, KeyNames.MULTIPAGE, 1) {AttributesDefinition = "Type=integer"},
|
||||
new RegValue(feature, registryHive, converterTiffKey, KeyNames.COMPRESSION, 8)
|
||||
};
|
||||
|
||||
var registryView = Environment.Is64BitOperatingSystem ? RegistryView.Registry64 : RegistryView.Registry32;
|
||||
var addPostConverterKey = RegistryKey.OpenBaseKey(Microsoft.Win32.RegistryHive.LocalMachine, registryView).OpenSubKey(postConverterKey) == null;
|
||||
var addPreConverterKey = RegistryKey.OpenBaseKey(Microsoft.Win32.RegistryHive.LocalMachine, registryView).OpenSubKey(preConverterKey) == null;
|
||||
if (addPostConverterKey)
|
||||
{
|
||||
result.Add(new RegValue(feature, registryHive, postConverterKey, KeyNames.EXECUTABLE_FILE, Files.POST_CONVERTER));
|
||||
}
|
||||
|
||||
if (addPreConverterKey)
|
||||
{
|
||||
result.Add(new RegValue(feature, registryHive, preConverterKey, KeyNames.EXECUTABLE_FILE, Files.PRE_CONVERTER));
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
[NotNull]
|
||||
Loading…
Add table
Add a link
Reference in a new issue