-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
NR-52409: Windows packaging refactor Co-authored-by: Guillermo Sanchez Gavier <[email protected]>
- Loading branch information
Showing
8 changed files
with
155 additions
and
213 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,8 +27,6 @@ | |
**/obj/Release/** | ||
**/bin/Release/** | ||
|
||
**/Product.wxs | ||
|
||
**/versioninfo.json | ||
|
||
.DS_Store | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
195 changes: 97 additions & 98 deletions
195
.../nri-amd64-installer/Product.wxs.template → ...g/windows/nri-amd64-installer/Product.wxs
100755 → 100644
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,98 +1,97 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> | ||
<?define Version = "{IntegrationVersion}" ?> | ||
<?define ProductId = "*" ?> | ||
<?define UpgradeCode = "{upgradeGUID}" ?> | ||
|
||
<Product Id="$(var.ProductId)" | ||
Name="New Relic Prometheus Exporter Integration, {IntegrationName}" | ||
Language="1033" | ||
Version="$(var.Version)" | ||
Manufacturer="New Relic, Inc." | ||
UpgradeCode="$(var.UpgradeCode)"> | ||
<Package Id="*" | ||
InstallerVersion="200" | ||
Compressed="yes" | ||
InstallScope="perMachine" | ||
Platform="x64" | ||
Manufacturer="New Relic, Inc." | ||
Comments="(c) {Year} New Relic, Inc." | ||
Keywords="infrastructure,MSI,on-host,{IntegrationName}"/> | ||
|
||
<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed."/> | ||
<MediaTemplate EmbedCab="yes"/> | ||
|
||
<Feature Id="ProductFeature" Title="New Relic Prometheus Exporter Integration, {IntegrationName}" Level="1"> | ||
<ComponentRef Id="CMP_V1_CUSTOM_PLUGINS_BIN"/> | ||
<ComponentRef Id="CMP_V1_PLUGIN_CONFIGS"/> | ||
<ComponentGroupRef Id="PrometheusPluginsBinComponent"/> | ||
<ComponentGroupRef Id="PluginConfigsComponent"/> | ||
</Feature> | ||
</Product> | ||
|
||
<Fragment> | ||
<Directory Id="TARGETDIR" Name="SourceDir"> | ||
<Directory Id="ProgramFiles64Folder"> | ||
<Directory Id="PrometheusFolder" Name="Prometheus-exporters"> | ||
<Directory Id="CustomPluginsBinFolder" Name="bin"/> | ||
</Directory> | ||
<Directory Id="CompanyFolder" Name="New Relic"> | ||
<Directory Id="AgentBinaryFolder" Name="newrelic-infra"> | ||
<Directory Id="PluginConfigsFolder" Name="integrations.d"/> | ||
<Directory Id="CustomPluginsFolder" Name="newrelic-integrations"> | ||
<Directory Id="CustomPluginsBinFolderIntegration" Name="bin"/> | ||
</Directory> | ||
</Directory> | ||
</Directory> | ||
</Directory> | ||
</Directory> | ||
</Fragment> | ||
|
||
<Fragment> | ||
<DirectoryRef Id="CustomPluginsBinFolder"> | ||
<Component Id="CMP_V1_CUSTOM_PLUGINS_BIN" Guid="2244c368-dd8b-404a-bdc0-67c525d7422f" KeyPath="yes"> | ||
<CreateFolder/> | ||
</Component> | ||
</DirectoryRef> | ||
<DirectoryRef Id="CustomPluginsBinFolderIntegration"> | ||
<Component Id="CMP_V1_CUSTOM_PLUGINS_BIN_INTEGRATION" Guid="6eac0d38-fcc1-450b-8072-9573092bbfe1" KeyPath="yes"> | ||
<CreateFolder/> | ||
</Component> | ||
</DirectoryRef> | ||
<DirectoryRef Id="PluginConfigsFolder"> | ||
<Component Id="CMP_V1_PLUGIN_CONFIGS" Guid="803C978C-B2A1-47C7-BB17-A2DE9E6D3145" KeyPath="yes"> | ||
<CreateFolder/> | ||
</Component> | ||
</DirectoryRef> | ||
</Fragment> | ||
|
||
<Fragment> | ||
<ComponentGroup Id="PrometheusPluginsBinComponent" Directory="CustomPluginsBinFolder"> | ||
<Component Id="CMP_NRI_EXPORTER_EXE" Guid="{exporterBinGUID}" Win64="yes"> | ||
<File Id="FILE_NRI_EXPORTER_EXE" | ||
Source="$(var.BinariesPath){IntegrationExe}" | ||
KeyPath="yes"/> | ||
</Component> | ||
<Component Id="CMP_NRI_LICENSE" Guid="{licenseGUID}" Win64="yes"> | ||
<File Id="FILE_NRI_LICENSE" | ||
Source="$(var.BinariesPath){IntegrationName}-LICENSE" | ||
KeyPath="yes"/> | ||
</Component> | ||
</ComponentGroup> | ||
<ComponentGroup Id="CustomPluginsBinComponent" Directory="CustomPluginsBinFolderIntegration"> | ||
<Component Id="CMP_NRI_$(IntegrationName)_EXE" Guid="{nriGUID}" Win64="yes"> | ||
<File Id="FILE_NRI_$(IntegrationName)_EXE" | ||
Source="$(var.BinariesPath)nri-$(IntegrationName).exe" | ||
KeyPath="yes"/> | ||
</Component> | ||
<ComponentGroup Id="PluginConfigsComponent" Directory="PluginConfigsFolder"> | ||
<Component Id="CMP_NRI_EXPORTER_CONFIG" Guid="{configGUID}" Win64="yes"> | ||
<File Id="CMP_NRI_EXPORTER_CONFIG" | ||
Name="{IntegrationName}-config.yml.sample" | ||
Source="$(var.BinariesPath){IntegrationName}-config.yml.sample" | ||
KeyPath="yes"/> | ||
</Component> | ||
</ComponentGroup> | ||
</Fragment> | ||
|
||
</Wix> | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> | ||
<Product Id="*" | ||
Name="New Relic Prometheus Exporter Integration, $(var.IntegrationName)" | ||
Language="1033" | ||
Version="$(var.IntegrationVersion)" | ||
Manufacturer="New Relic, Inc." | ||
UpgradeCode="$(var.UpgradeCode)"> | ||
<Package Id="*" | ||
InstallerVersion="200" | ||
Compressed="yes" | ||
InstallScope="perMachine" | ||
Platform="x64" | ||
Manufacturer="New Relic, Inc." | ||
Comments="(c) New Relic, Inc." | ||
Keywords="infrastructure,MSI,on-host,$(var.IntegrationName)"/> | ||
|
||
<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed."/> | ||
<MediaTemplate EmbedCab="yes"/> | ||
|
||
<Feature Id="ProductFeature" Title="New Relic Prometheus Exporter Integration, $(var.IntegrationName)" Level="1"> | ||
<ComponentRef Id="CMP_V1_CUSTOM_PLUGINS_BIN"/> | ||
<ComponentRef Id="CMP_V1_CUSTOM_PLUGINS_BIN_INTEGRATION"/> | ||
<ComponentRef Id="CMP_V1_PLUGIN_CONFIGS"/> | ||
<ComponentGroupRef Id="PrometheusPluginsBinComponent"/> | ||
<ComponentGroupRef Id="CustomPluginsBinComponent"/> | ||
<ComponentGroupRef Id="PluginConfigsComponent"/> | ||
</Feature> | ||
</Product> | ||
|
||
<Fragment> | ||
<Directory Id="TARGETDIR" Name="SourceDir"> | ||
<Directory Id="$(var.ProgramFilesArch)"> | ||
<Directory Id="PrometheusFolder" Name="Prometheus-exporters"> | ||
<Directory Id="CustomPluginsBinFolder" Name="bin"/> | ||
</Directory> | ||
<Directory Id="CompanyFolder" Name="New Relic"> | ||
<Directory Id="AgentBinaryFolder" Name="newrelic-infra"> | ||
<Directory Id="PluginConfigsFolder" Name="integrations.d"/> | ||
<Directory Id="CustomPluginsFolder" Name="newrelic-integrations"> | ||
<Directory Id="CustomPluginsBinFolderIntegration" Name="bin"/> | ||
</Directory> | ||
</Directory> | ||
</Directory> | ||
</Directory> | ||
</Directory> | ||
</Fragment> | ||
|
||
<Fragment> | ||
<DirectoryRef Id="CustomPluginsBinFolder"> | ||
<Component Id="CMP_V1_CUSTOM_PLUGINS_BIN" Guid="DB8403D7-2F59-4008-B87F-4A22EE41D8D9" KeyPath="yes"> | ||
<CreateFolder/> | ||
</Component> | ||
</DirectoryRef> | ||
<DirectoryRef Id="CustomPluginsBinFolderIntegration"> | ||
<Component Id="CMP_V1_CUSTOM_PLUGINS_BIN_INTEGRATION" Guid="8FC720E9-55F5-490E-955F-1531E1FA79A5" KeyPath="yes"> | ||
<CreateFolder/> | ||
</Component> | ||
</DirectoryRef> | ||
<DirectoryRef Id="PluginConfigsFolder"> | ||
<Component Id="CMP_V1_PLUGIN_CONFIGS" Guid="ACD1A480-0C62-4165-8A17-2C124C6B1CB1" KeyPath="yes"> | ||
<CreateFolder/> | ||
</Component> | ||
</DirectoryRef> | ||
</Fragment> | ||
|
||
<Fragment> | ||
<ComponentGroup Id="PrometheusPluginsBinComponent" Directory="CustomPluginsBinFolder"> | ||
<Component Id="CMP_NRI_EXPORTER_EXE" Win64="$(var.Win64)"> | ||
<File Id="FILE_NRI_EXPORTER_EXE" | ||
Source="$(var.BinariesPath)$(var.IntegrationName)-exporter.exe" | ||
KeyPath="yes"/> | ||
</Component> | ||
<Component Id="CMP_NRI_LICENSE" Win64="$(var.Win64)"> | ||
<File Id="FILE_NRI_LICENSE" | ||
Source="..\..\..\..\exporters\$(var.IntegrationName)\target\source\usr\local\share\doc\prometheus-exporters\$(var.IntegrationName)-LICENSE" | ||
KeyPath="yes"/> | ||
</Component> | ||
</ComponentGroup> | ||
<ComponentGroup Id="CustomPluginsBinComponent" Directory="CustomPluginsBinFolderIntegration"> | ||
<Component Id="CMP_NRI_EXE" Win64="$(var.Win64)"> | ||
<File Id="FILE_NRI_EXE" | ||
Source="$(var.BinariesPath)nri-$(var.IntegrationName).exe" | ||
KeyPath="yes"/> | ||
</Component> | ||
</ComponentGroup> | ||
<ComponentGroup Id="PluginConfigsComponent" Directory="PluginConfigsFolder"> | ||
<Component Id="CMP_NRI_EXPORTER_CONFIG" Win64="$(var.Win64)"> | ||
<File Id="CMP_NRI_EXPORTER_CONFIG" | ||
Name="$(var.IntegrationName)-config.yml.sample" | ||
Source="..\..\..\..\exporters\$(var.IntegrationName)\$(var.IntegrationName)-config.yml.sample" | ||
KeyPath="yes"/> | ||
</Component> | ||
</ComponentGroup> | ||
</Fragment> | ||
|
||
</Wix> |
81 changes: 40 additions & 41 deletions
81
scripts/pkg/windows/nri-amd64-installer/nri-installer.wixproj
100755 → 100644
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,40 @@ | ||
<?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)' == '' ">Release</Configuration> | ||
<Platform Condition=" '$(Platform)' == '' ">x86</Platform> | ||
<ProductVersion>3.10</ProductVersion> | ||
<ProjectGuid>aa111bbb-b027-4591-8adf-d19585de0594</ProjectGuid> | ||
<SchemaVersion>2.0</SchemaVersion> | ||
<OutputName>nri-$(exporterName)-amd64</OutputName> | ||
<OutputType>Package</OutputType> | ||
<SignToolPath>C:\Program Files (x86)\Windows Kits\10\bin\x64\</SignToolPath> | ||
<WixTargetsPath Condition=" '$(WixTargetsPath)' == '' AND '$(MSBuildExtensionsPath32)' != '' ">$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath> | ||
<WixTargetsPath Condition=" '$(WixTargetsPath)' == '' ">$(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath> | ||
<Name>nri-$(exporterName)-installer</Name> | ||
<DefineSolutionProperties>false</DefineSolutionProperties> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> | ||
<OutputPath>bin\$(Configuration)\</OutputPath> | ||
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath> | ||
<DefineConstants>Debug;ProjectRootPath=..\..\..\..\;BinariesPath=..\..\..\..\exporters\$(exporterName)\target\bin\windows_amd64\</DefineConstants> | ||
<SuppressAllWarnings>True</SuppressAllWarnings> | ||
<Pedantic>False</Pedantic> | ||
<CompilerAdditionalOptions>-arch x64</CompilerAdditionalOptions> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' "> | ||
<OutputPath>bin\$(Configuration)\</OutputPath> | ||
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath> | ||
<DefineConstants>Debug;ProjectRootPath=..\..\..\..\;BinariesPath=..\..\..\..\exporters\$(exporterName)\target\bin\windows_amd64\</DefineConstants> | ||
<CompilerAdditionalOptions>-arch x64</CompilerAdditionalOptions> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Compile Include="Product.wxs"/> | ||
</ItemGroup> | ||
<Import Project="$(WixTargetsPath)"/> | ||
<Target Name="SignInstaller"> | ||
<Exec Command=""$(SignToolPath)signtool.exe" sign /d "New Relic Infrastructure Agent, $(exporterName)" /a "$(OutputPath)$(OutputName).msi""/> | ||
<Copy SourceFiles="$(OutputPath)$(OutputName).msi" DestinationFiles="$(OutputPath)$(OutputName).x.y.z.msi"/> | ||
<!-- <Delete Files="$(OutputPath)$(OutputName).msi" /> --> | ||
</Target> | ||
<Target Name="AfterBuild" DependsOnTargets="SignInstaller"/> | ||
</Project> | ||
<?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)' == '' ">Release</Configuration> | ||
<Platform Condition=" '$(Platform)' == '' ">x64</Platform> | ||
<ProductVersion>3.10</ProductVersion> | ||
<ProjectGuid>DA18FD42-B622-452B-9045-DDF7752F4D35</ProjectGuid> | ||
<SchemaVersion>2.0</SchemaVersion> | ||
<OutputName>nri-$(exporterName)-amd64</OutputName> | ||
<OutputType>Package</OutputType> | ||
<SignToolPath>C:\Program Files (x86)\Microsoft SDKs\ClickOnce\SignTool\</SignToolPath> | ||
<WixTargetsPath Condition=" '$(WixTargetsPath)' == '' AND '$(MSBuildExtensionsPath32)' != '' ">$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath> | ||
<WixTargetsPath Condition=" '$(WixTargetsPath)' == '' ">$(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath> | ||
<Name>nri-$(exporterName)-installer</Name> | ||
<DefineSolutionProperties>false</DefineSolutionProperties> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup Condition=" '$(Platform)' == 'x64' "> | ||
<OutputPath>bin\$(Configuration)\</OutputPath> | ||
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath> | ||
<DefineConstants>ProgramFilesArch=ProgramFiles64Folder;Win64=yes;BinariesPath=..\..\..\..\exporters\$(exporterName)\target\bin\;IntegrationName=$(exporterName);IntegrationVersion=$(IntegrationVersion);UpgradeCode=$(UpgradeCode)</DefineConstants> | ||
<SuppressAllWarnings>True</SuppressAllWarnings> | ||
<Pedantic>False</Pedantic> | ||
<CompilerAdditionalOptions>-arch x64</CompilerAdditionalOptions> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<Compile Include="Product.wxs"/> | ||
</ItemGroup> | ||
|
||
<Import Project="$(WixTargetsPath)"/> | ||
|
||
<Target Name="SignInstaller"> | ||
<Exec Command=""$(SignToolPath)signtool.exe" sign /d "New Relic Infrastructure Agent, $(exporterName)" /a "$(OutputPath)$(OutputName).msi""/> | ||
<Copy SourceFiles="$(OutputPath)$(OutputName).msi" DestinationFiles="$(OutputPath)$(OutputName).x.y.z.msi"/> | ||
<!-- <Delete Files="$(OutputPath)$(OutputName).msi" /> --> | ||
</Target> | ||
|
||
<Target Name="AfterBuild" DependsOnTargets="SignInstaller"/> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.