What is the proper way to add multiple class libra

2019-07-26 14:28发布

I am trying to create a wix installer for window service. My service consists four class library projects. My questions is how can i add multiple class library projects in wix installer. I followed this link https://github.com/Robs79/How-to-create-a-Windows-Service-MSI-Installer-Using-WiX/blob/master/WindowsService.Installer/Product.wxs its not shows how to add multiple class library projects. Please some one help me out how can do this. or provide some reference link where i can refer.

Thanks in Advance

Product.wxs:

<?define Manufacturer = "IRIZ ID TECH" ?>
<?define VersionNumber = "1.0.0.0" ?>
<?define UpgradeCode = "{FF9D7B21-A4FE-4DEB-A2FE-E77228F95831}" ?>


<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
  <Product Id="*"
           UpgradeCode="$(var.UpgradeCode)"
           Version="$(var.VersionNumber)"
           Language="1033"
           Name="$(var.Name)"
           Manufacturer="$(var.Manufacturer)">

    <Package InstallerVersion="300" Compressed="yes" InstallScope="perMachine" />
    <Media Id="1" Cabinet="ESS_VillageMateIntegrtion" EmbedCab="yes"></Media>

    <!-- Allow upgrades and prevent downgrades -->
    <MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
    <MediaTemplate />

    <Feature Id="ProductFeature" Title="WindowsService.Installer" Level="1">
      <ComponentGroupRef Id="ProductComponents" />
    </Feature>
  </Product>

  <Fragment>
    <!-- Define the directory structure -->

    <Directory Id="TARGETDIR" Name="SourceDir">
      <Directory Id="ProgramFilesFolder">
        <Directory Id="ROOTDIRECTORY" Name="$(var.Manufacturer)">
          <Directory Id="APPLICATIONROOTDIRECTORY" Name="$(var.Name)" />
        </Directory>
      </Directory>
    </Directory>
  </Fragment>



  <!-- Add files to your installer package -->
  <Fragment>
    <DirectoryRef Id="APPLICATIONROOTDIRECTORY">
      <Component Id="$(var.ESS_VillageMateIntegrtion.TargetFileName)" Guid="{F03996CC-3A49-47A7-91F1-27DBF563AE83}">
        <File Id="$(var.ESS_VillageMateIntegrtion.TargetFileName)" Source="$(var.ESS_VillageMateIntegrtion.TargetPath)" KeyPath="yes" />
      </Component>

      <Component Id="$(var.ESS_VillageMateIntegrtionServiceConfig.TargetFileName)" Guid="{CC064C9B-298A-4D6D-AF64-40DA3657AAAB}">
        <File Id="$(var.ESS_VillageMateIntegrtionServiceConfig.TargetFileName)" Source="$(var.ESS_VillageMateIntegrtionServiceConfig.TargetPath)" KeyPath="yes" />
      </Component>

      <Component Id="$(var.ESS_VillageMateService.TargetFileName)" Guid="{CB37D43D-BB08-4DF2-A7B0-87A819A66CED}">
        <File Id="$(var.ESS_VillageMateService.TargetFileName)" Source="$(var.ESS_VillageMateService.TargetPath)" KeyPath="yes" />
      </Component>

      <Component Id="$(var.ESS_VillageMateIntegrationTray.TargetFileName)" Guid="{71FD65C9-A657-4093-8D5A-28743972E536}">
        <File Id="$(var.ESS_VillageMateIntegrationTray.TargetFileName)" Source="$(var.ESS_VillageMateIntegrationTray.TargetPath)" KeyPath="yes" />
      </Component>

      <Component Id="Components">
        <!-- Remove the log file on uninstall -->
        <RemoveFile Id="log" Name="*.txt" On="both" />

        <!-- Tell WiX to install the Service -->
        <ServiceInstall Id="ServiceInstaller"
                        Type="ownProcess"
                        Vital="yes"
                        Name="ESS_VillageMateIntegrtion"
                        DisplayName="ESS_VillageMateIntegrtion Service"
                        Description="Write Data one DB to another DB"
                        Start="auto"
                        Account="LocalSystem"
                        ErrorControl="normal" />

        <!-- Tell WiX to start the Service -->
        <ServiceControl Id="StartService"
                        Start="install"
                        Stop="both"
                        Remove="uninstall"
                        Name="ESS_VillageMateIntegrtion"
                        Wait="yes" />
      </Component>
    </DirectoryRef>
  </Fragment>

</Wix>

标签: windows wix
0条回答
登录 后发表回答