Skip to content

Commit

Permalink
Install SwisPowerShell module from OrionSDK.msi (fixes #155) (#156)
Browse files Browse the repository at this point in the history
* Install PowerShell module, not just snapin

* PowerShell module directory must match version in .psd1 manifest
  • Loading branch information
tdanner authored Nov 20, 2018
1 parent ab87198 commit 3f68b75
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Src/Install/GlobalVariables.wxi
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,9 @@
<!-- Version and FullVersion are being changed automatically by a build script.
Editing this manually has no effect.-->
<?define ProductVersion="1.0.0.0" ?>
<?define ProductVersion_Major="1" ?>
<?define ProductVersion_Minor="1" ?>
<?define ProductVersion_Build="1" ?>
<?define ProductVersion_Release="1" ?>

</Include>
40 changes: 40 additions & 0 deletions Src/Install/Product.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
<?define TempDir = "[TempFolder]" ?>
<?define OutputDir = "..\..\bin\Release" ?>

<?define BuildNumber = "$(var.ProductVersion_Major).$(var.ProductVersion_Minor).$(var.ProductVersion_Release).$(var.ProductVersion_Build)" ?>

<Product
Id="*"
Name="SolarWinds Orion SDK v$(var.ProductVersion)"
Expand All @@ -22,6 +24,7 @@
<Package
InstallerVersion="200"
Compressed="yes"
Platform="x64"
InstallScope="perMachine" />

<PropertyRef Id="NETFRAMEWORK40FULL"/>
Expand Down Expand Up @@ -134,8 +137,43 @@

</Directory>
</Directory>

<Directory Id="WindowsPowerShell" Name="WindowsPowerShell">
<Directory Id="Modules" Name="Modules">
<Directory Id="SwisPowerShell" Name="SwisPowerShell">
<Directory Id="psm_Version" Name="$(var.BuildNumber)">
<Component Id="SwisPowerShellModule" Guid="077E4881-0A55-4646-BF7A-25F1B084348B">
<File Id="psm_SwisPowerShellDll" Source="..\SwisPowerShell\bin\Release\SwisPowerShell.dll" />
<File Id="psm_SwisPowerShell.psd1" Source="..\SwisPowerShell\bin\Release\SwisPowerShell.psd1" />
<File Id="psm_SolarWinds.SDK.Swis.Contract.dll" Source="$(var.OutputDir)\SolarWinds.SDK.Swis.Contract.dll" />
<File Id="psm_log4net.dll" Source="$(var.OutputDir)\log4net.dll" />
<File Id="psm_SolarWinds.Logging.dll" Source="$(var.OutputDir)\SolarWinds.Logging.dll" />
</Component>
</Directory>
</Directory>
</Directory>
</Directory>
</Directory>

<Directory Id="ProgramFiles64Folder">
<Directory Id="WindowsPowerShell64" Name="WindowsPowerShell">
<Directory Id="Modules64" Name="Modules">
<Directory Id="SwisPowerShell64" Name="SwisPowerShell">
<Directory Id="psm64_Version" Name="$(var.BuildNumber)">
<Component Id="SwisPowerShellModule64" Win64="yes" Guid="8618CFEC-57A9-4C6D-8128-6D204B13015A">
<File Id="psm64_SwisPowerShellDll" Source="..\SwisPowerShell\bin\Release\SwisPowerShell.dll" />
<File Id="psm64_SwisPowerShell.psd1" Source="..\SwisPowerShell\bin\Release\SwisPowerShell.psd1" />
<File Id="psm64_SolarWinds.SDK.Swis.Contract.dll" Source="$(var.OutputDir)\SolarWinds.SDK.Swis.Contract.dll" />
<File Id="psm64_log4net.dll" Source="$(var.OutputDir)\log4net.dll" />
<File Id="psm64_SolarWinds.Logging.dll" Source="$(var.OutputDir)\SolarWinds.Logging.dll" />
</Component>
</Directory>
</Directory>
</Directory>
</Directory>
</Directory>


<Directory Id="ProgramMenuFolder" Name="Programs">
<Directory Id="ProgramMenuDir" Name="SolarWinds Orion SDK">
<Component Id="ProgramMenuDirComponent" Guid="5D7CB7DD-5A30-434b-9543-4FB42EEB1670">
Expand Down Expand Up @@ -198,6 +236,8 @@
<ComponentRef Id="SwqlStudioComponent" />
<ComponentRef Id="ProgramMenuDirComponent" />
<ComponentRef Id="SwisSnapInComponent" />
<ComponentRef Id="SwisPowerShellModule" />
<ComponentRef Id="SwisPowerShellModule64" />
</Feature>

<InstallExecuteSequence>
Expand Down

0 comments on commit 3f68b75

Please sign in to comment.