Initial Commit

This commit is contained in:
2016-07-27 00:32:34 -04:00
commit 8d162b2035
701 changed files with 188672 additions and 0 deletions

View File

@@ -0,0 +1,276 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Yaulw.Process;
using Yaulw.Tools;
using System.IO;
using Yaulw.File;
using Yaulw.Xml;
using System.Reflection;
namespace Installables.All
{
/// <summary>
/// Common Functions and Helpers Useful for all Installing activities.
/// </summary>
public static class Common
{
#region Public Definitions
public const string INSTALLED_COMPONENT_CONFIG_XML_FILENAME = "InstalledComponentConfig.xml";
public const string EMBEDDED_COMPONENT_CONFIG_XML_FILENAME = "EmbeddedComponentConfig.xml";
/// <summary>
/// Allow Setting of Log by external Assembly
/// </summary>
public static Logging Log
{
get
{
return s_Log;
}
set
{
if (value != null)
s_Log = value;
}
}
#endregion
#region Private Statics
private static ISReadWrite s_isrw = null;
private static XSerializer s_serializer = null;
private static ComponentConfig s_EmbeddedComponentConfig = null;
private static ComponentConfig s_InstalledComponentConfig = null;
private static Logging s_Log = null;
#endregion
#region Construction
/// <summary>
/// Responsible for reading in embedded and installed configuration
/// </summary>
static Common()
{
s_isrw = new ISReadWrite(INSTALLED_COMPONENT_CONFIG_XML_FILENAME);
s_serializer = new XSerializer();
//# Read in from Resource (Embedded Components)
s_EmbeddedComponentConfig = s_serializer.ReadFromResource<ComponentConfig>(Assembly.GetExecutingAssembly().GetManifestResourceStream("Installables.All." + EMBEDDED_COMPONENT_CONFIG_XML_FILENAME));
if (s_EmbeddedComponentConfig == null)
throw new Exception("Could not read in EmbeddedComponentConfig"); // should never happen
//# Read in from IS (Currently Installed Components)
s_InstalledComponentConfig = s_isrw.ReadFromIS<ComponentConfig>();
if (s_InstalledComponentConfig == null)
s_InstalledComponentConfig = new ComponentConfig();
}
#endregion
#region Public Statics
/// <summary>
/// Retrieve the EmbeddedComponentConfig
/// </summary>
/// <returns>the EmbeddedComponentConfig</returns>
public static ComponentConfig EmbeddedConfig
{
get
{
return s_EmbeddedComponentConfig;
}
}
/// <summary>
/// Retrieve the InstalledComponentConfig
/// </summary>
/// <returns>the InstalledComponentConfig or null, if not existent</returns>
public static ComponentConfig InstalledConfig
{
get
{
return s_InstalledComponentConfig;
}
}
/// <summary>
/// Allows Caller to write out any changes to InstalledConfig back to the File
/// </summary>
public static void WriteOutChangesToInstalledConfig()
{
s_isrw.WriteToIS<ComponentConfig>(s_InstalledComponentConfig);
}
/// <summary>
/// Checks to see if any Components are installed. If this returns false, then this is a Fresh Install
/// </summary>
/// <returns>true, if any components are installed, false otherwise</returns>
public static bool AreAnyComponentsInstalled()
{
bool bIsInstalled = (InstalledConfig != null) && (InstalledConfig.BinaryComponents.Components.Length > 0 || InstalledConfig.SetupComponents.Components.Length > 0);
return bIsInstalled;
}
/// <summary>
/// Retrieves the Index for the Component that matches the specified Unique Label
/// </summary>
/// <param name="UniqueLabel">label to search components for</param>
/// <param name="components">a component array</param>
/// <returns>a value >=0 or -1, if not found</returns>
public static int GetIndexForComponentUniqueLabel(string UniqueLabel, ComponentConfig.Component[] components)
{
if (String.IsNullOrEmpty(UniqueLabel) || components == null || components.Length <= 0)
return -1;
for (int i = 0; i < components.Length; ++i)
{
if (String.Compare(components[i].UniqueLabel, UniqueLabel, true) == 0)
return i;
}
return -1;
}
/// <summary>
/// Spawn a Setup Process (Setup.exe for example)
/// </summary>
public static void PSetupSpwan(string SetupFileNameNPath, string param_s)
{
PStarter.StartProcess(PStartInfo.CreateProcess(SetupFileNameNPath, param_s, "", true, System.Diagnostics.ProcessWindowStyle.Hidden, false), true, false);
}
/// <summary>
/// Spawn a MSI Setup Process (*.msi)
/// </summary>
public static void PSetupMSIEXEC(string param_s)
{
string msiexec = System.Environment.GetFolderPath(Environment.SpecialFolder.System) + "\\msiexec.exe";
PStarter.StartProcess(PStartInfo.CreateProcess(msiexec, param_s, "", true, System.Diagnostics.ProcessWindowStyle.Hidden, false), true, false);
}
/// <summary>
/// Run a command on the commandline * Hidden *
/// </summary>
/// <param name="cmdline">cmd to run</param>
public static string RunCmdLine(string cmdline)
{
string result = PStarter.RunDosCommand(cmdline);
return result;
}
/// <summary>
/// Use this to get the complete path to a .net framework utility like gacutil.exe or
/// installutil.exe.. any .net framework utility. Will fall back to look in the %temp% folder,
/// if not found, giving the opportunity to deploy the util directly with the components
/// </summary>
/// <param name="UtilFileName">the utility in .net you are looking for like gacutil.exe</param>
/// <returns>the full filenameNpath or "", if no existing file found</returns>
public static string GetNetFrameworkUtilFileNameNPathFile(string UtilFileName)
{
string windir = System.Environment.GetEnvironmentVariable("windir", EnvironmentVariableTarget.Machine);
string NetFramework1_0 = windir + "\\Microsoft.Net\\Framework\\v1.0.3705";
string NetFramework1_1 = windir + "\\Microsoft.Net\\Framework\\v1.1.4322";
string NetFramework2_0 = windir + "\\Microsoft.Net\\Framework\\v2.0.50727";
string NetFramework3_0 = windir + "\\Microsoft.Net\\Framework\\v3.0";
string NetFramework3_5 = windir + "\\Microsoft.Net\\Framework\\v3.5";
string NetFramework4_0 = windir + "\\Microsoft.Net\\Framework\\v4.0.30319";
string TempPath = PathNaming.PathEndsWithNoSlash(Path.GetTempPath()); // We use this as a Fallback, in case file doesn't exist in the framework
string[] Frameworks = new string[] { NetFramework2_0, NetFramework4_0, NetFramework1_0, NetFramework1_1, NetFramework3_0, NetFramework3_5, TempPath };
string NetUtilFileNameNPath = "";
foreach (string framework in Frameworks)
{
if (File.Exists(framework + "\\" + UtilFileName))
{
NetUtilFileNameNPath = framework + "\\" + UtilFileName;
return NetUtilFileNameNPath;
}
};
return NetUtilFileNameNPath;
}
/// <summary>
/// Quick Helper to get the Program Files Path for the specific system
/// </summary>
/// <returns>Program Files path with a '/' at the end</returns>
public static string GetProgramFilesPathOnSystemWithEndSlash()
{
string ProgramFiles = System.Environment.GetEnvironmentVariable("ProgramFiles(x86)");
if (String.IsNullOrEmpty(ProgramFiles))
ProgramFiles = System.Environment.GetEnvironmentVariable("ProgramFiles");
return PathNaming.PathEndsWithSlash(ProgramFiles);
}
/// <summary>
///
/// </summary>
/// <returns></returns>
public static string SetOwnership()
{
// in order to do any of this, sadly, we must first install the windows resource kit
//subinacl /subdirectories *.* /setowner=domainname\user
return String.Empty;
}
/// <summary>
/// To grant the specified User or group Full Control permissions to the folder and its contents
/// </summary>
/// <param name="FolderNPath">full path to folder/directory</param>
/// <param name="UserOrGroup">domainname\administrator, any windows user or group</param>
/// <returns></returns>
public static bool GrantFullPermissionToFolderForUserOrGroup(string FolderNPath, string UserOrGroup)
{
if (Directory.Exists(FolderNPath))
{
string command = String.Format("cacls \"{0}\" /t /e /g {1}:f", FolderNPath, UserOrGroup);
if (command.Contains("Invalid arguments."))
return false;
else
return true;
}
return false;
}
/// <summary>
/// Stop a service
/// </summary>
/// <param name="ServiceName">name of service to stop</param>
/// <returns>true if successful, false otherwise</returns>
public static bool StopService(string ServiceName)
{
bool bSuccess = true;
if (ServiceW.DoesServiceExist(ServiceName))
bSuccess = ServiceW.StopService(ServiceName, true, 120);
return bSuccess;
}
/// <summary>
/// start a service
/// </summary>
/// <param name="ServiceName">name of a service to start</param>
/// <returns>true if successful, false otherwise</returns>
public static bool StartService(string ServiceName)
{
bool bSuccess = true;
if (ServiceW.DoesServiceExist(ServiceName))
bSuccess = ServiceW.StartService(ServiceName, 120);
return bSuccess;
}
/// <summary>
/// Does Service Exist
/// </summary>
/// <param name="ServiceName">Name of service to check</param>
/// <returns>true if successful, false otherwise</returns>
public static bool ServiceExists(string ServiceName)
{
return ServiceW.DoesServiceExist(ServiceName);
}
#endregion
}
}

View File

@@ -0,0 +1,62 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Win32;
namespace Installables.All
{
/// <summary>
/// Install Configuration
/// </summary>
public enum InstallConfig
{
LytecMD,
MedisoftClinical,
}
/// <summary>
/// Common Functions and Helpers Useful for Lytec, Medisoft Installing activities
/// </summary>
public static class Common_MediLytec
{
/// <summary>
/// Common/Ofted used #Defs/Definitions associated with Lytec/Medisoft
/// </summary>
public static class MediLytecPoundDef
{
public const string BRIDGE_SERVICE_TITLE = "BridgeService";
public const string BRIDGE_SERVICE_ASSEMBLY = "BridgeService.exe";
public const string BRIDGE_SERVICE_NAME = "McKesson Bridge Service";
public const string MIRTH_SERVICE_NAME = "Mirth Connect Service";
public const string POSTGRE_SERVICE_NAME = "Mirth_Connect_PostgreSQL_Server";
public const string POSTGRE_SERVER_PORT = "5432";
}
/// <summary>
/// Retrieve the Configuration (Lytec/Medisoft) from the Registry
/// </summary>
/// <returns>Lytec/Medisoft</returns>
public static InstallConfig RetrieveInstallConfigFromRegistry()
{
bool bIsLytecInstalled = false;
try
{
RegistryKey reg = Registry.LocalMachine.OpenSubKey("Software\\Lytec", false);
bIsLytecInstalled = (reg != null);
if (!bIsLytecInstalled) // also check Wow64
{
reg = Registry.LocalMachine.OpenSubKey("Software\\Wow6432Node\\Lytec", false);
bIsLytecInstalled = (reg != null);
}
}
catch (Exception) { /* ignore */ }
if (bIsLytecInstalled)
return InstallConfig.LytecMD;
else
return InstallConfig.MedisoftClinical;
}
}
}

View File

@@ -0,0 +1,223 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Serialization;
using System.Collections;
using Yaulw.Tools;
using System.IO;
namespace Installables.All
{
/// <summary>
/// Serializable Xml Object used to store all Configuration data
/// </summary>
[XmlRoot("ComponentConfig", Namespace = "BridgeConnect", IsNullable = false)]
public class ComponentConfig
{
public ComponentW BinaryComponents = null;
public ComponentW SetupComponents = null;
/// <summary>
/// XML Embedded Component Configuration
/// </summary>
public ComponentConfig()
{
BinaryComponents = new ComponentW();
SetupComponents = new ComponentW();
}
/// <summary>
/// Wrapper class for multiple Components
/// </summary>
public class ComponentW
{
private ArrayList m_ArrayList;
public ComponentW()
{
m_ArrayList = new ArrayList();
}
[XmlElement("Component")]
public Component[] Components
{
get
{
Component[] components = new Component[m_ArrayList.Count];
m_ArrayList.CopyTo(components);
return components;
}
set
{
if (value == null) return;
Component[] components = (Component[])value;
m_ArrayList.Clear();
foreach (Component component in components)
AddUpdateComponent(component.UniqueLabel, component.Version, component.FileName);
}
}
#region Public Helpers
/// <summary>
/// Call this function to Add/Update a component
/// </summary>
/// <param name="UniqueLabel">unique label used to identify a component</param>
/// <param name="Version">Version of the component</param>
/// <param name="FileName">FileName of the component</param>
public void AddUpdateComponent(string UniqueLabel, string Version, string FileName)
{
int nIndex = GetIndexForComponent(UniqueLabel);
if (nIndex != -1)
{
Component component = ((Component)m_ArrayList[nIndex]);
component.UniqueLabel = UniqueLabel;
component.Version = Version;
component.FileName = FileName;
}
else
{
m_ArrayList.Add(new Component(UniqueLabel, Version, FileName));
}
}
/// <summary>
/// Call this function to remove a component from the list
/// </summary>
/// <param name="UniqueLabel">unique label used to identify a component</param>
public void RemoveComponent(string UniqueLabel)
{
int nIndex = GetIndexForComponent(UniqueLabel);
if (nIndex != -1)
m_ArrayList.RemoveAt(nIndex);
}
/// <summary>
/// Checks to see if a component already exists
/// </summary>
/// <param name="UniqueLabel">unique name identifying the component</param>
/// <returns>true for yes, no otherwise</returns>
public bool ComponentExists(string UniqueLabel)
{
return (GetIndexForComponent(UniqueLabel) != -1);
}
/// <summary>
/// Retrieves the component for the specified UniqueLabel
/// </summary>
/// <param name="UniqueLabel">unique name identifying the component</param>
/// <returns>the Component for the Label, or null if not found</returns>
public Component GetComponent(string UniqueLabel)
{
int nIndex = GetIndexForComponent(UniqueLabel);
if (nIndex != -1)
return (Component) m_ArrayList[nIndex];
else
return null;
}
#endregion
#region Internal & Private Helpers
/// <summary>
/// gets the index in the array list for the specified component
/// </summary>
/// <param name="UniqueLabel">unique name identifying the component</param>
/// <returns>index >= 0 or -1 if not found</returns>
private int GetIndexForComponent(string UniqueLabel)
{
for (int i = 0; i < m_ArrayList.Count; ++i)
{
Component component = (Component)m_ArrayList[i];
if (String.Compare(component.UniqueLabel, UniqueLabel, true) == 0)
return i;
}
return -1;
}
#endregion
}
/// <summary>
/// specify the Component
/// </summary>
public class Component : IComparable
{
public Component() { }
public Component(string UniqueLabel, string Version, string FileName) { this.UniqueLabel = UniqueLabel; this.Version = Version; this.FileName = FileName; }
[XmlText]
public string FileName = "";
/// <summary>
/// In case a component has multiple files, seperated by a ';', internally we should always call this
/// </summary>
public string[] FileNames
{
get
{
if (!String.IsNullOrEmpty(FileName))
{
if (FileName.Contains(';'))
return FileName.Split(';');
else
return new string[] { FileName };
}
return new string[] { };
}
}
[XmlAttribute("UniqueLabel")]
public string UniqueLabel = "";
[XmlAttribute("Version")]
public string Version = "";
/// <summary>
/// In case a component has multiple files, seperated by a ';', internally we should always call this
/// </summary>
public string[] TempFileNamesNPath
{
get
{
string[] files = FileNames;
List<string> tFiles = new List<string>();
if (files != null)
{
string strPath = PathNaming.PathEndsWithSlash(Path.GetTempPath());
foreach (string file in files)
tFiles.Add(strPath + file);
return tFiles.ToArray();
}
return new string[] { };
}
}
#region IComparable Members
/// <summary>
/// Compares the Components Unique Label and Version
/// </summary>
/// <param name="obj"></param>
/// <returns></returns>
public int CompareTo(object obj)
{
if (obj is Component)
{
Component c = (Component)obj;
int nCompare = String.Compare(this.UniqueLabel, c.UniqueLabel, true);
if (nCompare == 0)
nCompare = String.Compare(this.Version, c.Version, true);
return nCompare;
}
else
{
throw new ArgumentException("object is not a Component");
}
}
#endregion
}
}
}

View File

@@ -0,0 +1,277 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Yaulw.File;
using System.Xml.Serialization;
using System.Collections;
using Yaulw.Xml;
using System.Resources;
using System.Reflection;
using System.IO;
using Yaulw.Tools;
using Yaulw.Assembly;
namespace Installables.All
{
/// <summary>
/// Responsible for extracting the Components that are embedded in this dll
/// into the temporary directory for the installer to consume
/// </summary>
public class Component_Binary_Manager : IDisposable, IManageComponents
{
#region Private Members
private bool _disposed = false;
private Dictionary<string, Assembly> _componentsLoaded = new Dictionary<string, Assembly>();
#endregion
#region Construction
/// <summary>
/// Constructor
/// </summary>
public Component_Binary_Manager()
{
}
/// <summary>
/// Finalizer
/// </summary>
~Component_Binary_Manager()
{
Dispose(true);
}
#endregion
#region IManageComponents Members
/// <summary>
/// Checks if there are Newer Components embedded then that were installed on the system
/// </summary>
/// <returns>true, if newer components were found, false otherwise</returns>
public bool AreNewerComponentsAvailable()
{
//# If nothing is installed, no need to continue
if (GetAllInstalledComponents() == null)
return true;
// if the lengths don't match, something must get installed
if (GetAllInstalledComponents().Length != GetAllEmbeddedComponents().Length)
return true;
// # Otherwise, let's determine 1 by 1
foreach (ComponentConfig.Component component in GetAllEmbeddedComponents())
{
int nIndex = Common.GetIndexForComponentUniqueLabel(component.UniqueLabel, GetAllInstalledComponents());
if (nIndex == -1)
return true;
else if(GetAllInstalledComponents()[nIndex].CompareTo(component) != 0)
return true;
}
return false;
}
/// <summary>
/// Returns the Component Definition containing the temporary file (extracted component)
/// for all Newer components found on the system
/// </summary>
/// <param name="setupEventObj">Setup Event Object is passed, for component manager to pass down to it's components</param>
/// <returns>a list of newer binary components, or empty list for none</returns>
public IInstallComponent[] GetNewerComponents(ref SetupEvents setupEventObj)
{
// # Extract all, or let's determine 1 by 1 and extract
bool bInstalledCompsFound = (GetAllInstalledComponents() != null);
foreach (ComponentConfig.Component component in GetAllEmbeddedComponents())
{
bool bExtract = true;
if (bInstalledCompsFound)
{
int nIndex = Common.GetIndexForComponentUniqueLabel(component.UniqueLabel, GetAllInstalledComponents());
if (nIndex != -1)
bExtract = (GetAllInstalledComponents()[nIndex].CompareTo(component) != 0);
}
// mark component for Installation * Extract to File System *
if (bExtract)
{
if (!ExtractComponentFromResourceToTempFileLocation(component))
Common.Log.Error(String.Format("Failed to Extract Component {0}", component.UniqueLabel));
}
}
List<IInstallComponent> ComponentsToInstall = new List<IInstallComponent>();
if (_componentsLoaded.Count > 0)
{
foreach(Assembly asm in _componentsLoaded.Values)
{
IInstallComponent installComp = null;
Type[] types = asm.GetTypes();
foreach (Type t in types)
{
if (t.GetInterface(typeof(IInstallComponent).Name) != null)
{
installComp = (IInstallComponent) asm.CreateInstance(t.FullName);
break;
}
}
// Check IInstallComponent was found
if (installComp == null)
{
Common.Log.Error(String.Format("Component {0} contains no IInstallComponent Definition.", AssemblyW.GetAssemblyName(asm)));
continue;
}
// Check if class also implements ISetup
if(installComp is ISetup)
((ISetup) installComp).ComponentLoaded(ref setupEventObj);
// Add to Install Components
ComponentsToInstall.Add(installComp);
}
}
return ComponentsToInstall.ToArray();
}
/// <summary>
/// Retrieves the list of all installed components, in order to uninstall
/// </summary>
/// <returns>a list of all installed components, null otherwise</returns>
public IInstallComponent[] GetAllInstalledComponents(string ComponentsSeperatedbySemiColonOrBlankForAll, ref SetupEvents setupEventObj)
{
// TO DO:
return null;
}
/// <summary>
/// Retrieves the list of all installed components
/// </summary>
/// <returns>a list of all installed components, null otherwise</returns>
public ComponentConfig.Component[] GetAllInstalledComponents()
{
if (Common.InstalledConfig != null && Common.InstalledConfig.BinaryComponents.Components.Length > 0)
return Common.InstalledConfig.BinaryComponents.Components;
return null;
}
/// <summary>
/// Retrieves the list of all installed componentsW
/// </summary>
/// <returns>a list of all installed componentsW, null otherwise</returns>
public ComponentConfig.ComponentW GetAllInstalledComponentsW()
{
return Common.InstalledConfig.BinaryComponents;
}
/// <summary>
/// Retrieves the list of all Embedded components
/// </summary>
/// <returns>a list of all embedded components, null otherwise</returns>
public ComponentConfig.Component[] GetAllEmbeddedComponents()
{
if (Common.EmbeddedConfig != null && Common.EmbeddedConfig.BinaryComponents.Components.Length > 0)
return Common.EmbeddedConfig.BinaryComponents.Components;
return null;
}
#endregion
#region Private Helpers
/// <summary>
/// Private Helper to physically extract the bits from the resource and write them to a temporary
/// file location
/// </summary>
/// <param name="component">Component, whose files are to be extracted</param>
/// <returns>true, if successful, false otherwise</returns>
private bool ExtractComponentFromResourceToTempFileLocation(ComponentConfig.Component component)
{
if (component != null)
{
// Extract the component to the Temp Directory,
// if it is not already there...
for (int i = 0; i < component.FileNames.Length; ++i)
{
// First try loading the assembly
string asmName = "Component.Binary." + component.UniqueLabel;
Assembly asm = Assembly.Load(asmName);
if (asm == null)
return false;
else
_componentsLoaded[component.UniqueLabel] = asm; // <- imp
string FileName = component.FileNames[i];
string TempFileNameNPath = component.TempFileNamesNPath[i];
if (!File.Exists(TempFileNameNPath))
{
using (BinaryReader br = new BinaryReader(asm.GetManifestResourceStream(asmName + "." + FileName)))
using (BinaryWriter bw = new BinaryWriter(new FileStream(TempFileNameNPath, FileMode.Create)))
{
byte[] buffer = new byte[64 * 1024];
int numread = br.Read(buffer, 0, buffer.Length);
while (numread > 0)
{
bw.Write(buffer, 0, numread);
numread = br.Read(buffer, 0, buffer.Length);
}
bw.Flush();
}
}
}
return true;
}
return false;
}
#endregion
#region IDisposable Members
/// <summary>
/// Dispose of all extracted files
/// </summary>
public void Dispose()
{
Dispose(true);
// Use SupressFinalize in case a subclass
// of this type implements a finalizer
GC.SuppressFinalize(this);
}
/// <summary>
/// Make sure to conserve disk space, to delete all files that were extracted
/// by this program
/// </summary>
/// <param name="disposing">if true, delete all files extracted by this dll</param>
protected virtual void Dispose(bool disposing)
{
if (!_disposed)
{
if (disposing)
{
// When Disposing, Delete all Temporary Files on the System that may exist
foreach (ComponentConfig.Component component in GetAllEmbeddedComponents())
{
foreach (string tFileNameNPath in component.TempFileNamesNPath)
{
if (File.Exists(tFileNameNPath))
File.Delete(tFileNameNPath);
}
}
_componentsLoaded.Clear();
_componentsLoaded = null;
}
// Indicate that the instance has been disposed.
_disposed = true;
}
}
#endregion
}
}

View File

@@ -0,0 +1,213 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Reflection;
using Yaulw.Assembly;
namespace Installables.All
{
/// <summary>
/// Responsible for working with setup components which don't require any special treatment
/// </summary>
public class Component_Setup_Manager : IDisposable, IManageComponents
{
#region Private Members
private bool _disposed = false;
private Dictionary<string, Assembly> _componentsLoaded = new Dictionary<string, Assembly>();
#endregion
#region Construction
/// <summary>
/// Constructor
/// </summary>
public Component_Setup_Manager()
{
}
/// <summary>
/// Finalizer
/// </summary>
~Component_Setup_Manager()
{
Dispose(true);
}
#endregion
#region IManageComponents Members
/// <summary>
/// Checks if there are Newer Components embedded then that were installed on the system
/// </summary>
/// <returns>true, if newer components were found, false otherwise</returns>
public bool AreNewerComponentsAvailable()
{
//# If nothing is installed, no need to continue
if (GetAllInstalledComponents() == null)
return true;
// if the lengths don't match, something must get installed
if (GetAllInstalledComponents().Length != GetAllEmbeddedComponents().Length)
return true;
// # Otherwise, let's determine 1 by 1
foreach (ComponentConfig.Component component in GetAllEmbeddedComponents())
{
int nIndex = Common.GetIndexForComponentUniqueLabel(component.UniqueLabel, GetAllInstalledComponents());
if (nIndex == -1)
return true;
else if (GetAllInstalledComponents()[nIndex].CompareTo(component) != 0)
return true;
}
return false;
}
/// <summary>
/// Returns the Component Definitions for all Newer components found on the system
/// </summary>
/// <returns>a list of newer setup components, or empty list for none</returns>
public IInstallComponent[] GetNewerComponents(ref SetupEvents setupEventObj)
{
// # Extract all, or let's determine 1 by 1 and extract
bool bInstalledCompsFound = (GetAllInstalledComponents() != null);
foreach (ComponentConfig.Component component in GetAllEmbeddedComponents())
{
bool bInstall = true;
if (bInstalledCompsFound)
{
int nIndex = Common.GetIndexForComponentUniqueLabel(component.UniqueLabel, GetAllInstalledComponents());
if (nIndex != -1)
bInstall = (GetAllInstalledComponents()[nIndex].CompareTo(component) != 0);
}
// mark component for Installation
if (bInstall)
{
string asmName = "Component.Setup." + component.UniqueLabel;
_componentsLoaded[component.UniqueLabel] = Assembly.Load(asmName);
}
}
List<IInstallComponent> ComponentsToInstall = new List<IInstallComponent>();
if (_componentsLoaded.Count > 0)
{
foreach (Assembly asm in _componentsLoaded.Values)
{
IInstallComponent installComp = null;
Type[] types = asm.GetTypes();
foreach (Type t in types)
{
if (t.GetInterface(typeof(IInstallComponent).Name) != null)
{
installComp = (IInstallComponent)asm.CreateInstance(t.FullName);
break;
}
}
// Check IInstallComponent was found
if (installComp == null)
{
Common.Log.Error(String.Format("Component {0} contains no IInstallComponent Definition.", AssemblyW.GetAssemblyName(asm)));
continue;
}
// Check if class also implements ISetup
if (installComp is ISetup)
((ISetup)installComp).ComponentLoaded(ref setupEventObj);
// Add to Install Components
ComponentsToInstall.Add(installComp);
}
}
return ComponentsToInstall.ToArray();
}
/// <summary>
/// Retrieves the list of all installed components, in order to uninstall
/// </summary>
/// <returns>a list of all installed components, null otherwise</returns>
public IInstallComponent[] GetAllInstalledComponents(string ComponentsSeperatedbySemiColonOrBlankForAll, ref SetupEvents setupEventObj)
{
// TO DO:
//string[] ComponentsUniqueLabels = null;
//if (!String.IsNullOrEmpty(ComponentsSeperatedbySemiColonOrBlankForAll))
// ComponentsUniqueLabels = ComponentsSeperatedbySemiColonOrBlankForAll.Split(';');
return null;
}
/// <summary>
/// Retrieves the list of all installed components
/// </summary>
/// <returns>a list of all installed components, null otherwise</returns>
public ComponentConfig.Component[] GetAllInstalledComponents()
{
if (Common.InstalledConfig != null && Common.InstalledConfig.SetupComponents.Components.Length > 0)
return Common.InstalledConfig.SetupComponents.Components;
return null;
}
/// <summary>
/// Retrieves the list of all installed componentsW
/// </summary>
/// <returns>a list of all installed componentsW, null otherwise</returns>
public ComponentConfig.ComponentW GetAllInstalledComponentsW()
{
return Common.InstalledConfig.SetupComponents;
}
/// <summary>
/// Retrieves the list of all Embedded components
/// </summary>
/// <returns>a list of all embedded components, null otherwise</returns>
public ComponentConfig.Component[] GetAllEmbeddedComponents()
{
if (Common.EmbeddedConfig != null && Common.EmbeddedConfig.SetupComponents.Components.Length > 0)
return Common.EmbeddedConfig.SetupComponents.Components;
return null;
}
#endregion
#region IDisposable Members
/// <summary>
/// Dispose of all extracted files
/// </summary>
public void Dispose()
{
Dispose(true);
// Use SupressFinalize in case a subclass
// of this type implements a finalizer
GC.SuppressFinalize(this);
}
/// <summary>
/// Make sure to conserve disk space, to delete all files that were extracted
/// by this program
/// </summary>
/// <param name="disposing">if true, delete all files extracted by this dll</param>
protected virtual void Dispose(bool disposing)
{
if (!_disposed)
{
if (disposing)
{
_componentsLoaded.Clear();
_componentsLoaded = null;
}
// Indicate that the instance has been disposed.
_disposed = true;
}
}
#endregion
}
}

View File

@@ -0,0 +1,5 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectView>ShowAllFiles</ProjectView>
</PropertyGroup>
</Project>

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<ComponentConfig xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="BridgeConnect">
<BinaryComponents>
</BinaryComponents>
<SetupComponents>
<Component UniqueLabel="BridgeService" Version="1.0.0.0">BridgeService.exe</Component>
</SetupComponents>
</ComponentConfig>

View File

@@ -0,0 +1,328 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Yaulw.Thread;
namespace Installables.All
{
/// <summary>
/// Calls GenericInstaller in order to perform an install/uninstall
/// * Does so in a threaded fashion *
/// </summary>
public class GenericInstall
{
// Let the Caller know that a) the thread Completed b) it did so successfully
public static bool s_PerformInstallCompleted = false;
public static bool s_PerformInstallCompletedSuccessfully = false;
// Let the Caller know that a) the thread Completed b) it did so successfully
public static bool s_PerformUninstallCompleted = false;
public static bool s_PerformUninstallCompletedSuccessfully = false;
// Private ComponentMgmtObjects
private static GenericInstaller<Component_Binary_Manager> s_binaryInstaller = null;
private static GenericInstaller<Component_Setup_Manager> s_setupInstaller = null;
private static SetupEvents s_SetupEvents = new SetupEvents();
/// <summary>
/// Perform a Threaded Install
/// </summary>
public static void PerformInstall()
{
TStarter.ThreadMethod tMethod = delegate()
{
s_PerformInstallCompleted = false;
s_PerformInstallCompletedSuccessfully = false;
bool bBinaryInstallNeeded = false;
bool bSetupInstallNeeded = false;
// # Let's see if we need to update/install Binary Components
if(s_binaryInstaller == null)
s_binaryInstaller = new GenericInstaller<Component_Binary_Manager>();
bBinaryInstallNeeded = s_binaryInstaller.IsInstallNeeded(ref s_SetupEvents);
// # Let's see if we need to update/install Setup Components
if(s_setupInstaller == null)
s_setupInstaller = new GenericInstaller<Component_Setup_Manager>();
bSetupInstallNeeded = s_setupInstaller.IsInstallNeeded(ref s_SetupEvents);
// # Let's Install, Baby...
if (bBinaryInstallNeeded || bSetupInstallNeeded)
{
// # Trigger Start Install Event
s_SetupEvents.Raise_Before_Install_Event();
bool bBinarySuccess = true;
bool bSetupbSuccess = true;
// update/install Binary Components
if (bBinaryInstallNeeded)
bBinarySuccess = s_binaryInstaller.Install();
// update/install Setup Components
if (bSetupInstallNeeded)
bSetupbSuccess = s_setupInstaller.Install();
// # Trigger End Install Event
if (bBinaryInstallNeeded || bSetupInstallNeeded)
s_SetupEvents.Raise_After_Install_Event();
// # We fail if one of them fails
s_PerformInstallCompletedSuccessfully = bBinarySuccess && bSetupbSuccess;
}
// # Let External Callers know that this Thread Completed
s_PerformInstallCompleted = true;
};
TStarter.StartThread(tMethod, "PerformInstall", System.Threading.ApartmentState.MTA, false, System.Threading.ThreadPriority.Normal);
}
/// <summary>
/// Perform a Threaded Uninstall
/// </summary>
public static void PerformUninstall(string ComponentsSeperatedbySemiColonOrBlankForAll)
{
s_PerformUninstallCompleted = false;
s_PerformUninstallCompletedSuccessfully = false;
}
/// <summary>
/// Call this function to let every object know that either PerformInstall or PerformUninstall was called,
/// the Gui then may have made some other modifications, and we are now completed
/// </summary>
public static void SetupMainCompleted()
{
// Notify all components that Setup is now complete
s_SetupEvents.Raise_Ending_Setup_Event();
// # Imp! - We must call dispose on our Setup Objects
if (s_binaryInstaller != null)
{
s_binaryInstaller.Dispose();
s_binaryInstaller = null;
}
if (s_setupInstaller != null)
{
s_setupInstaller.Dispose();
s_setupInstaller = null;
}
}
}
/// <summary>
/// Generic Install Class used for IManageComponents
/// </summary>
/// <typeparam name="T">IManageComponents responsible for Installing</typeparam>
public class GenericInstaller<T> : IDisposable where T : IManageComponents, IDisposable, new()
{
#region Private Members
private T _ComponentMGR = default(T);
private IInstallComponent[] _ComponentsToPerformWorkOn = null;
private bool _disposed = false;
#endregion
#region Construction
/// <summary>
/// Construct the T Object
/// </summary>
public GenericInstaller()
{
_ComponentMGR = new T();
}
/// <summary>
/// Finalizer
/// </summary>
~GenericInstaller()
{
Dispose(true);
}
#endregion
#region Public Methods
/// <summary>
///
/// </summary>
/// <param name="setupEventObj"></param>
/// <returns></returns>
public bool IsInstallNeeded(ref SetupEvents setupEventObj)
{
if (_ComponentMGR.AreNewerComponentsAvailable())
{
Common.Log.Info(String.Format("Newer Components available for Type {0}.", _ComponentMGR.GetType().Name));
_ComponentsToPerformWorkOn = _ComponentMGR.GetNewerComponents(ref setupEventObj);
if (_ComponentsToPerformWorkOn != null && _ComponentsToPerformWorkOn.Length > 0)
{
Common.Log.Info(String.Format("Found {0} Newer Components.", _ComponentsToPerformWorkOn.Length));
return true;
}
}
Common.Log.Info(String.Format("No Newer Components available for Type {0}.", _ComponentMGR.GetType().Name));
return false;
}
/// <summary>
/// Perform Install on the IManageComponents specified when Constructing the GenericInstaller Object
/// </summary>
/// <returns>true if no error occurs, false otherwise</returns>
public bool Install()
{
bool bErrorsOccured = false;
List<ComponentConfig.Component> successfullyInstalledComponents = new List<ComponentConfig.Component>();
if (_ComponentsToPerformWorkOn != null && _ComponentsToPerformWorkOn.Length > 0)
{
// # Start Install
foreach (IInstallComponent installComp in _ComponentsToPerformWorkOn)
{
ComponentConfig.Component component = installComp.GetComponent();
if (installComp.BEFORE_INSTALLING_COMPONENT())
{
Common.Log.Info(String.Format("Installing Component {0} with Version {1}.", component.UniqueLabel, component.Version));
bool bInstallSuccess = installComp.INSTALL_COMPONENT();
bInstallSuccess = bInstallSuccess && installComp.AFTER_INSTALLING_COMPONENT();
if (bInstallSuccess)
{
Common.Log.Info(String.Format("Component {0} with version {1} was correctly installed.", component.UniqueLabel, component.Version));
successfullyInstalledComponents.Add(component);
}
else
{
bErrorsOccured = true;
string msg = String.Format("Component {0} with version {1} was not correctly installed.", component.UniqueLabel, component.Version);
Common.Log.Error(msg);
}
}
}
// # End Install
// Add any installed components to the Installed Configuration
foreach (ComponentConfig.Component component in successfullyInstalledComponents)
_ComponentMGR.GetAllInstalledComponentsW().AddUpdateComponent(component.UniqueLabel, component.Version, component.FileName);
// Write out the installed Configuration
Common.WriteOutChangesToInstalledConfig();
}
Common.Log.Info(String.Format("Exiting Install() for Type {0} with bErrorsOccured set to = {1}", _ComponentMGR.GetType().Name, bErrorsOccured));
return !bErrorsOccured;
}
/// <summary>
///
/// </summary>
/// <param name="setupEventObj"></param>
/// <returns></returns>
public bool IsUninstallNeeded(ref SetupEvents setupEventObj, string ComponentsSeperatedbySemiColonOrBlankForAll)
{
if(_ComponentMGR.GetAllInstalledComponents() != null)
{
Common.Log.Info(String.Format("Installed Components available for Type {0}.", _ComponentMGR.GetType().Name));
_ComponentsToPerformWorkOn = _ComponentMGR.GetAllInstalledComponents(ComponentsSeperatedbySemiColonOrBlankForAll, ref setupEventObj);
if (_ComponentsToPerformWorkOn != null && _ComponentsToPerformWorkOn.Length > 0)
{
Common.Log.Info(String.Format("Found {0} Components to Uninstall.", _ComponentsToPerformWorkOn.Length));
return true;
}
}
Common.Log.Info(String.Format("No Installed Components to Uninstall for Type {0}.", _ComponentMGR.GetType().Name));
return false;
}
/// <summary>
/// Perform Uninstall on the IManageComponents specified when Constructing the GenericInstaller Object
/// </summary>
/// <param name="ComponentsSeperatedbySemiColonOrBlankForAll">coma-seperated Unique Labels of components to uninstall, blank for all</param>
/// <returns>true if no error occurs, false otherwise</returns>
public bool Uninstall(ref SetupEvents setupEventObj, string ComponentsSeperatedbySemiColonOrBlankForAll)
{
bool bErrorsOccured = false;
List<ComponentConfig.Component> successfullyUninstalledComponents = new List<ComponentConfig.Component>();
if (_ComponentsToPerformWorkOn != null && _ComponentsToPerformWorkOn.Length > 0)
{
// # Start Uninstall
foreach (IInstallComponent uninstallComp in _ComponentsToPerformWorkOn)
{
if (!uninstallComp.SUPPORTS_UNINSTALL()) // Not all components support uninstall * although they should, we should allow for this contigency
continue;
ComponentConfig.Component component = uninstallComp.GetComponent();
if (uninstallComp.BEFORE_UNINSTALLING_COMPONENT())
{
Common.Log.Info(String.Format("About to Uninstall Component {0} with Version {1}.", component.UniqueLabel, component.Version));
bool bUninstallSuccess = uninstallComp.UNINSTALL_COMPONENT();
if (!bUninstallSuccess)
bErrorsOccured = true;
bUninstallSuccess = bUninstallSuccess && uninstallComp.AFTER_UNINSTALLING_COMPONENT();
if (bUninstallSuccess)
{
Common.Log.Info(String.Format("Component {0} with version {1} was uninstalled.", component.UniqueLabel, component.Version));
successfullyUninstalledComponents.Add(component);
}
else
{
string msg = String.Format("Component {0} with version {1} was not uninstalled.", component.UniqueLabel, component.Version);
Common.Log.Error(msg);
}
}
}
// # End Uninstall
// Remove any uninstalled components from the Installed Configuration
foreach (ComponentConfig.Component component in successfullyUninstalledComponents)
_ComponentMGR.GetAllInstalledComponentsW().RemoveComponent(component.UniqueLabel);
// Write out the installed Configuration
Common.WriteOutChangesToInstalledConfig();
}
Common.Log.Info(String.Format("Exiting Uninstall() for Type {0} with bErrorsOccured set to = {1}", _ComponentMGR.GetType().Name, bErrorsOccured));
return !bErrorsOccured;
}
#endregion
#region IDisposable Members
/// <summary>
/// Dispose of all extracted files
/// </summary>
public void Dispose()
{
Dispose(true);
// Use SupressFinalize in case a subclass
// of this type implements a finalizer
GC.SuppressFinalize(this);
}
/// <summary>
/// Make sure to call Dispose on the ComponentMGR for it to perform any cleanup
/// </summary>
/// <param name="disposing">if true, dispose ComponentMGR</param>
protected virtual void Dispose(bool disposing)
{
if (!_disposed)
{
if (disposing)
{
_ComponentMGR.Dispose();
_ComponentMGR = default(T);
}
// Indicate that the instance has been disposed.
_disposed = true;
}
}
#endregion
}
}

View File

@@ -0,0 +1,61 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Installables.All
{
/// <summary>
/// All Components that install themselves must support this interface
/// </summary>
public interface IInstallComponent
{
/// <summary>
/// Get the Corresponding Component for this IInstallComponent
/// </summary>
/// <returns>the component for this IInstallCompoent</returns>
ComponentConfig.Component GetComponent();
/// <summary>
/// Used to determine if the component is needed to install
/// </summary>
/// <returns>true to continue to Install, false otherwise</returns>
bool BEFORE_INSTALLING_COMPONENT();
/// <summary>
/// Used to install a component
/// </summary>
/// <returns>true, if install was successful, false otherwise</returns>
bool INSTALL_COMPONENT();
/// <summary>
/// Used to do any validation after install occured
/// </summary>
/// <returns>true, if validation was successful, false otherwise</returns>
bool AFTER_INSTALLING_COMPONENT();
/// <summary>
/// Used to determine if the component supports uninstalling
/// </summary>
/// <returns>true, if component supports uninstalling, false otherwise</returns>
bool SUPPORTS_UNINSTALL();
/// <summary>
/// Used to determine if the component is needed to uninstall
/// </summary>
/// <returns>true to continue to uninstall, false otherwise</returns>
bool BEFORE_UNINSTALLING_COMPONENT();
/// <summary>
/// Used to uninstall a component
/// </summary>
/// <returns>true, if uninstall was successful, false otherwise</returns>
bool UNINSTALL_COMPONENT();
/// <summary>
/// Used to do any validation after uninstall occured
/// </summary>
/// <returns>true, if validation was successful, false otherwise</returns>
bool AFTER_UNINSTALLING_COMPONENT();
}
}

View File

@@ -0,0 +1,53 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Installables.All
{
/// <summary>
/// Used by the Binary and Setup Component Manager,
/// could possible be reused later for a new Component Manager
/// </summary>
public interface IManageComponents
{
/// <summary>
/// Quick Check to see if newer Components are available
/// </summary>
/// <returns>true, if newer components are available, false otherwise</returns>
bool AreNewerComponentsAvailable();
/// <summary>
/// Retrieves the list of newer components that need to be installed
/// </summary>
/// <param name="setupEventObj">Setup Event Object is passed, for component manager to pass down to it's components</param>
/// <returns>a list of newer components to install, null otherwise</returns>
IInstallComponent[] GetNewerComponents(ref SetupEvents setupEventObj);
/// <summary>
/// Retrieves the list of all installed components, in order to uninstall
/// </summary>
/// <param name="ComponentsSeperatedbySemiColonOrBlankForAll">Specify Component Filter</param>
/// <param name="setupEventObj">Setup Event Object is passed, for component manager to pass down to it's components</param>
/// <returns>a list of all installed components, null otherwise</returns>
IInstallComponent[] GetAllInstalledComponents(string ComponentsSeperatedbySemiColonOrBlankForAll, ref SetupEvents setupEventObj);
/// <summary>
/// Retrieves the list of all installed components
/// </summary>
/// <returns>a list of all installed components, null otherwise</returns>
ComponentConfig.Component[] GetAllInstalledComponents();
/// <summary>
/// Retrieves the list of all installed componentsW
/// </summary>
/// <returns>a list of all installed componentsW, null otherwise</returns>
ComponentConfig.ComponentW GetAllInstalledComponentsW();
/// <summary>
/// Retrieves the list of all Embedded components
/// </summary>
/// <returns>a list of all embedded components, null otherwise</returns>
ComponentConfig.Component[] GetAllEmbeddedComponents();
}
}

View File

@@ -0,0 +1,112 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Installables.All
{
/// <summary>
/// Class is passed into ISetup ComponentLoaded() giving each component
/// a chance to subscribe to it
/// </summary>
public class SetupEvents
{
#region Events
/// <summary>
/// Delegate used to handle Setup Events
/// </summary>
public delegate void SetupEvent();
/// <summary>
/// Called after the entire Setup Application ends
/// </summary>
public event SetupEvent Ending_Setup;
/// <summary>
/// Called before the entire Install Process Begins
/// </summary>
public event SetupEvent Before_Install;
/// <summary>
/// Called after the entire Install Process ends
/// </summary>
public event SetupEvent After_Install;
/// <summary>
/// Called before the entire Uninstall Process Begins
/// </summary>
public event SetupEvent Before_Uninstall;
/// <summary>
/// Called after the entire Uninstall Process ends
/// </summary>
public event SetupEvent After_Uninstall;
#endregion
# region Event Raisers
/// <summary>
/// Raise the Ending Setup Event
/// </summary>
public void Raise_Ending_Setup_Event()
{
if (Ending_Setup != null)
Ending_Setup();
}
/// <summary>
/// Raise the Before Install Event
/// </summary>
public void Raise_Before_Install_Event()
{
if (Before_Install != null)
Before_Install();
}
/// <summary>
/// Raise the After Install Event
/// </summary>
public void Raise_After_Install_Event()
{
if (After_Install != null)
After_Install();
}
/// <summary>
/// Raise the Before Uninstall Event
/// </summary>
public void Raise_Before_Uninstall_Event()
{
if (Before_Uninstall != null)
Before_Uninstall();
}
/// <summary>
/// Raise the After Uninstall Event
/// </summary>
public void Raise_After_Uninstall_Event()
{
if (After_Uninstall != null)
After_Uninstall();
}
#endregion
}
/// <summary>
/// All Components that install themselves will implement this interface, if they are interested to
/// listen to / Handle Setup Events
/// </summary>
public interface ISetup
{
/// <summary>
/// Called when the Component is loaded. Components are only loaded
/// when an Install on them is iminent. The component has a chance to
/// listen to/handle events in the setup process.
/// </summary>
void ComponentLoaded(ref SetupEvents subscribeToDesiredEvents);
}
}

View File

@@ -0,0 +1,115 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.30729</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{94CB1BBA-5CF1-4155-827E-1527032D3921}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Installables.All</RootNamespace>
<AssemblyName>Installables.All</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<FileUpgradeFlags>
</FileUpgradeFlags>
<OldToolsVersion>3.5</OldToolsVersion>
<UpgradeBackupLocation />
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\..\Target\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PlatformTarget>x86</PlatformTarget>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\..\Target\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PlatformTarget>x86</PlatformTarget>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Xml.Linq">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Data.DataSetExtensions">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="Yaulw, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\MSLMobile\Components\Yaulw.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Common.cs" />
<Compile Include="Common_MediLytec.cs" />
<Compile Include="ComponentConfig.cs" />
<Compile Include="Component_Binary_Manager.cs" />
<Compile Include="Component_Setup_Manager.cs" />
<Compile Include="GenericInstaller.cs" />
<Compile Include="IInstallComponent.cs" />
<Compile Include="IManageComponents.cs" />
<Compile Include="ISetup.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="EmbeddedComponentConfig.xml" />
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
<Visible>False</Visible>
<ProductName>Windows Installer 3.1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<PublishUrlHistory />
<InstallUrlHistory />
<SupportUrlHistory />
<UpdateUrlHistory />
<BootstrapperUrlHistory />
<ErrorReportUrlHistory />
<FallbackCulture>en-US</FallbackCulture>
<VerifyUploadedFiles>false</VerifyUploadedFiles>
</PropertyGroup>
</Project>

View File

@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
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("Components")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Microsoft")]
[assembly: AssemblyProduct("Components")]
[assembly: AssemblyCopyright("Copyright © Microsoft 2011")]
[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("ae8a648a-90cf-48ce-9b71-6e6b4cc417aa")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View File

@@ -0,0 +1,5 @@
C:\Users\Administrator\Projects\Pluto\Server\Target\Debug\Installables.All.dll
C:\Users\Administrator\Projects\Pluto\Server\Target\Debug\Installables.All.pdb
C:\Users\Administrator\Projects\Pluto\Server\Installables\Installables.All\obj\Debug\ResolveAssemblyReference.cache
C:\Users\Administrator\Projects\Pluto\Server\Installables\Installables.All\obj\Debug\Installables.All.dll
C:\Users\Administrator\Projects\Pluto\Server\Installables\Installables.All\obj\Debug\Installables.All.pdb

View File

@@ -0,0 +1,5 @@
C:\Users\Administrator\Projects\Pluto\Server\Target\Release\Installables.All.dll
C:\Users\Administrator\Projects\Pluto\Server\Target\Release\Installables.All.pdb
C:\Users\Administrator\Projects\Pluto\Server\Installables\Installables.All\obj\Release\ResolveAssemblyReference.cache
C:\Users\Administrator\Projects\Pluto\Server\Installables\Installables.All\obj\Release\Installables.All.dll
C:\Users\Administrator\Projects\Pluto\Server\Installables\Installables.All\obj\Release\Installables.All.pdb

View File

@@ -0,0 +1,254 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Installables.All;
using Microsoft.Win32;
using Yaulw.Assembly;
using System.IO;
using Yaulw.Xml;
namespace Installables.Setup.PlutoServerMSLService
{
public class InstallComponent : IInstallComponent , ISetup
{
#region Private Helpers
public const string BRIDGE_SERVICE_TITLE = Common_MediLytec.MediLytecPoundDef.BRIDGE_SERVICE_TITLE;
public const string BRIDGE_SERVICE_ASSEMBLY = Common_MediLytec.MediLytecPoundDef.BRIDGE_SERVICE_ASSEMBLY;
public const string BRIDGE_SERVICE_NAME = Common_MediLytec.MediLytecPoundDef.BRIDGE_SERVICE_NAME;
/// <summary>
/// Write Service Configuration to the ImagePath for the Service
/// </summary>
/// <returns></returns>
public static bool WriteServiceConfigurationToServiceInRegistry(InstallConfig config)
{
try
{
using (RegistryKey service = Registry.LocalMachine.OpenSubKey("System\\CurrentControlSet\\services\\" + BRIDGE_SERVICE_TITLE, true))
{
// # Determine Image Path Parameter
string ImagePathParameter = "";
switch (config)
{
case InstallConfig.LytecMD:
ImagePathParameter = " /Lytec";
break;
case InstallConfig.MedisoftClinical:
ImagePathParameter = " /Medisoft";
break;
}
// # Set Image Path Parameter
string serviceAssembly = "\"" + AssemblyW.SpecializedAssemblyInfo.GetAssemblyPath(AssemblyW.AssemblyST.Executing) + "\\" + BRIDGE_SERVICE_ASSEMBLY + "\"";
service.SetValue("ImagePath", serviceAssembly + ImagePathParameter);
return true;
}
}
catch (Exception) { /* ignore */ }
return false;
}
#endregion
#region IInstallComponent Members
public ComponentConfig.Component GetComponent()
{
return Common.EmbeddedConfig.SetupComponents.GetComponent("BridgeService");
}
public bool BEFORE_INSTALLING_COMPONENT()
{
// Stop Service BRIDGE_SERVICE_NAME
if (!Common.StopService(BRIDGE_SERVICE_NAME))
{
Common.Log.Error(String.Format("Couldn't stop the {0} Service.", BRIDGE_SERVICE_NAME));
return false;
}
// Read the Service Configuration from the Registry
InstallConfig config = Common_MediLytec.RetrieveInstallConfigFromRegistry();
if (config == InstallConfig.LytecMD)
{
bool bSuccess = false;
string result = Common.RunCmdLine("netsh firewall set portopening tcp 5000 BridgeService_LytecBridgeIn ENABLE ALL");
bSuccess = result.Contains("successfully") || result.Contains("Ok.") || result.Contains("The service has not been started");
if (bSuccess)
{
result = Common.RunCmdLine("netsh firewall set portopening tcp 5001 BridgeService_LytecMirthOut ENABLE ALL");
bSuccess = result.Contains("successfully") || result.Contains("Ok.") || result.Contains("The service has not been started");
}
if (bSuccess)
{
return true;
}
else
{
Common.Log.Error(String.Format("Opening up ports for Lytec '{0}' failed", BRIDGE_SERVICE_NAME));
return false;
}
}
else if (config == InstallConfig.MedisoftClinical)
{
bool bSuccess = false;
string result = Common.RunCmdLine("netsh firewall set portopening tcp 7000 BridgeService_MedisoftBridgeIn ENABLE ALL");
bSuccess = result.Contains("successfully") || result.Contains("Ok.") || result.Contains("The service has not been started");
if (bSuccess)
{
result = Common.RunCmdLine("netsh firewall set portopening tcp 7001 BridgeService_MedisoftMirthOut ENABLE ALL");
bSuccess = result.Contains("successfully") || result.Contains("Ok.") || result.Contains("The service has not been started");
}
if (bSuccess)
{
return true;
}
else
{
Common.Log.Error(String.Format("Opening up ports for Medisoft '{0}' failed", BRIDGE_SERVICE_NAME));
return false;
}
}
return true;
}
/// <summary>
///
/// </summary>
/// <returns></returns>
public bool INSTALL_COMPONENT()
{
// Uninstall Bridge Service, if it exists, and re-install
if (Common.ServiceExists(BRIDGE_SERVICE_NAME))
UNINSTALL_COMPONENT();
string installUtil = Common.GetNetFrameworkUtilFileNameNPathFile("installutil.exe");
string serviceAssembly = AssemblyW.SpecializedAssemblyInfo.GetAssemblyPath(AssemblyW.AssemblyST.Entry) + "\\" + BRIDGE_SERVICE_ASSEMBLY;
if (!String.IsNullOrEmpty(installUtil))
{
Common.StopService(BRIDGE_SERVICE_NAME);
string result = Common.RunCmdLine(installUtil + " \"" + serviceAssembly + "\"");
bool bSuccess = !result.Contains("failed");
if (bSuccess)
{
// Write the Service Configuration to the Registry
InstallConfig config = Common_MediLytec.RetrieveInstallConfigFromRegistry();
bSuccess = WriteServiceConfigurationToServiceInRegistry(config);
}
if (!bSuccess)
{
Common.Log.Error(String.Format("Errors Occured installing {0}.", BRIDGE_SERVICE_NAME));
}
return bSuccess;
}
return false;
}
public bool AFTER_INSTALLING_COMPONENT()
{
// Make sure service exists
if (!Common.ServiceExists(BRIDGE_SERVICE_NAME))
{
Common.Log.Error(String.Format("Service {0} does Not Exist. Install Failed", BRIDGE_SERVICE_NAME));
return false;
}
// Make sure Service is stopped
Common.StopService(BRIDGE_SERVICE_NAME);
return true;
}
public bool SUPPORTS_UNINSTALL()
{
return false;
}
public bool BEFORE_UNINSTALLING_COMPONENT()
{
// Stop Service BRIDGE_SERVICE_NAME
if (!Common.StopService(BRIDGE_SERVICE_NAME))
{
Common.Log.Error(String.Format("Couldn't stop the {0} Service.", BRIDGE_SERVICE_NAME));
return false;
}
return true;
}
public bool UNINSTALL_COMPONENT()
{
if (Common.ServiceExists(BRIDGE_SERVICE_NAME))
{
Common.StopService(BRIDGE_SERVICE_NAME);
string installUtil = Common.GetNetFrameworkUtilFileNameNPathFile("installutil.exe");
string serviceAssembly = AssemblyW.SpecializedAssemblyInfo.GetAssemblyPath(AssemblyW.AssemblyST.Entry) + "\\" + BRIDGE_SERVICE_ASSEMBLY;
if (!String.IsNullOrEmpty(installUtil))
{
string result = Common.RunCmdLine(installUtil + " /u \"" + serviceAssembly + "\"");
bool bSuccess = !result.Contains("failed");
if(!bSuccess)
Common.Log.Error(String.Format("Errors Occured uninstalling {0}.", BRIDGE_SERVICE_NAME));
return bSuccess;
}
}
return false;
}
public bool AFTER_UNINSTALLING_COMPONENT()
{
if (Common.ServiceExists(BRIDGE_SERVICE_NAME))
{
Common.Log.Error(String.Format("Service {0} Still Exists. Uninstall Failed", BRIDGE_SERVICE_NAME));
return false;
}
return true;
}
#endregion
#region ISetup Members
public void ComponentLoaded(ref SetupEvents subscribeToDesiredEvents)
{
subscribeToDesiredEvents.Before_Install += new SetupEvents.SetupEvent(subscribeToDesiredEvents_Before_Install);
subscribeToDesiredEvents.After_Install += new SetupEvents.SetupEvent(subscribeToDesiredEvents_After_Install);
subscribeToDesiredEvents.Ending_Setup += new SetupEvents.SetupEvent(subscribeToDesiredEvents_Ending_Setup);
}
void subscribeToDesiredEvents_Ending_Setup()
{
if (Common.ServiceExists(BRIDGE_SERVICE_NAME))
{
string path = Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData) + "\\McKesson\\Bridge\\BridgeConfig.xml";
if (File.Exists(path))
{
XSerializer serialize = new XSerializer();
// * Go over this *
//XMLConfig config = serialize.ReadFromFile<XMLConfig>(path);
//if (config != null)
//{
// // Read the Service Configuration from the Registry
// InstallConfig sconfig = Common_MediLytec.RetrieveInstallConfigFromRegistry();
// if (sconfig == InstallConfig.LytecMD && !String.IsNullOrEmpty(config.DefaultMapping.Lytec))
// Common.StartService(BRIDGE_SERVICE_NAME);
// else if(sconfig == InstallConfig.MedisoftClinical && !String.IsNullOrEmpty(config.DefaultMapping.Medisoft))
// Common.StartService(BRIDGE_SERVICE_NAME);
//}
}
}
}
void subscribeToDesiredEvents_Before_Install()
{
}
void subscribeToDesiredEvents_After_Install()
{
}
#endregion
}
}

View File

@@ -0,0 +1,104 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.30729</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{F1203E2C-B58B-49A6-9B6E-6F89949A06C5}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Installables.Setup.PlutoServerMSLService</RootNamespace>
<AssemblyName>Installables.Setup.PlutoServerMSLService</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<FileUpgradeFlags>
</FileUpgradeFlags>
<OldToolsVersion>3.5</OldToolsVersion>
<UpgradeBackupLocation />
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\..\Target\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PlatformTarget>x86</PlatformTarget>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\..\Target\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PlatformTarget>x86</PlatformTarget>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Xml.Linq">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Data.DataSetExtensions">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="Yaulw, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\MSLMobile\Components\Yaulw.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="InstallComponent.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
<Visible>False</Visible>
<ProductName>Windows Installer 3.1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<PublishUrlHistory />
<InstallUrlHistory />
<SupportUrlHistory />
<UpdateUrlHistory />
<BootstrapperUrlHistory />
<ErrorReportUrlHistory />
<FallbackCulture>en-US</FallbackCulture>
<VerifyUploadedFiles>false</VerifyUploadedFiles>
</PropertyGroup>
</Project>

View File

@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
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("Component.Setup.BridgeService")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Microsoft")]
[assembly: AssemblyProduct("Component.Setup.BridgeService")]
[assembly: AssemblyCopyright("Copyright © Microsoft 2011")]
[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("53b1ed79-4f04-4cf5-a80f-8d56da25dbfb")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View File

@@ -0,0 +1,5 @@
C:\Users\Administrator\Projects\Pluto\Server\Target\Debug\Installables.Setup.PlutoServerMSLService.dll
C:\Users\Administrator\Projects\Pluto\Server\Target\Debug\Installables.Setup.PlutoServerMSLService.pdb
C:\Users\Administrator\Projects\Pluto\Server\Installables\Installables.Setup.PlutoServerMSLService\obj\Debug\ResolveAssemblyReference.cache
C:\Users\Administrator\Projects\Pluto\Server\Installables\Installables.Setup.PlutoServerMSLService\obj\Debug\Installables.Setup.PlutoServerMSLService.dll
C:\Users\Administrator\Projects\Pluto\Server\Installables\Installables.Setup.PlutoServerMSLService\obj\Debug\Installables.Setup.PlutoServerMSLService.pdb

View File

@@ -0,0 +1,5 @@
C:\Users\Administrator\Projects\Pluto\Server\Installables\Installables.Setup.PlutoServerMSLService\obj\Release\ResolveAssemblyReference.cache
C:\Users\Administrator\Projects\Pluto\Server\Target\Release\Installables.Setup.PlutoServerMSLService.dll
C:\Users\Administrator\Projects\Pluto\Server\Target\Release\Installables.Setup.PlutoServerMSLService.pdb
C:\Users\Administrator\Projects\Pluto\Server\Installables\Installables.Setup.PlutoServerMSLService\obj\Release\Installables.Setup.PlutoServerMSLService.dll
C:\Users\Administrator\Projects\Pluto\Server\Installables\Installables.Setup.PlutoServerMSLService\obj\Release\Installables.Setup.PlutoServerMSLService.pdb