Merge pull request #7285 from livarcocc/native_installers_use_installed_sdk
Updating the native installers to use the SDK just installed for first run
This commit is contained in:
commit
fa4bf8d0fb
9 changed files with 52 additions and 13 deletions
|
@ -43,13 +43,15 @@
|
||||||
SkipUnchangedFiles="False"
|
SkipUnchangedFiles="False"
|
||||||
UseHardlinksIfPossible="False" />
|
UseHardlinksIfPossible="False" />
|
||||||
|
|
||||||
<!-- Create layout: postinst -->
|
<!-- Create layout: Generate and Place postinst -->
|
||||||
<Copy
|
<ReplaceFileContents
|
||||||
DestinationFiles= "$(DebianPostinstFile)"
|
InputFile="$(DebianPostinstTemplateFile)"
|
||||||
SourceFiles="$(DebianPostinstTemplateFile)"
|
DestinationFile="$(DebianPostinstFile)"
|
||||||
OverwriteReadOnlyFiles="True"
|
ReplacementItems="@(DebianPostInstTokenValues)" />
|
||||||
SkipUnchangedFiles="False"
|
|
||||||
UseHardlinksIfPossible="False" />
|
<Chmod
|
||||||
|
Glob="$(DebianPostinstFile)"
|
||||||
|
Mode="ugo+x" />
|
||||||
|
|
||||||
<!-- Create layout: Generate and Place debian_config.json -->
|
<!-- Create layout: Generate and Place debian_config.json -->
|
||||||
<ReplaceFileContents
|
<ReplaceFileContents
|
||||||
|
|
|
@ -105,6 +105,10 @@
|
||||||
<DebianConfigTokenValues Include="%CLI_SDK_BRAND_NAME%">
|
<DebianConfigTokenValues Include="%CLI_SDK_BRAND_NAME%">
|
||||||
<ReplacementString>$(SdkBrandName)</ReplacementString>
|
<ReplacementString>$(SdkBrandName)</ReplacementString>
|
||||||
</DebianConfigTokenValues>
|
</DebianConfigTokenValues>
|
||||||
|
|
||||||
|
<DebianPostInstTokenValues Include="%SDK_VERSION%">
|
||||||
|
<ReplacementString>$(SdkVersion)</ReplacementString>
|
||||||
|
</DebianPostInstTokenValues>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
@ -14,6 +14,9 @@
|
||||||
|
|
||||||
<SdkPkgSourcesRootDirectory>$(RepoRoot)/packaging/osx/clisdk</SdkPkgSourcesRootDirectory>
|
<SdkPkgSourcesRootDirectory>$(RepoRoot)/packaging/osx/clisdk</SdkPkgSourcesRootDirectory>
|
||||||
<SdkPkgScriptsDirectory>$(SdkPkgSourcesRootDirectory)/scripts</SdkPkgScriptsDirectory>
|
<SdkPkgScriptsDirectory>$(SdkPkgSourcesRootDirectory)/scripts</SdkPkgScriptsDirectory>
|
||||||
|
<SdkPkgScriptTemplateFile>$(SdkPkgScriptsDirectory)/postinstall</SdkPkgScriptTemplateFile>
|
||||||
|
<SdkPkgDestinationScriptsDirectory>$(PkgIntermediateDirectory)/scripts</SdkPkgDestinationScriptsDirectory>
|
||||||
|
<SdkPkgScriptFile>$(SdkPkgDestinationScriptsDirectory)/postinstall</SdkPkgScriptFile>
|
||||||
<SdkProductArchiveResourcesDirectory>$(SdkPkgSourcesRootDirectory)/resources</SdkProductArchiveResourcesDirectory>
|
<SdkProductArchiveResourcesDirectory>$(SdkPkgSourcesRootDirectory)/resources</SdkProductArchiveResourcesDirectory>
|
||||||
|
|
||||||
<SdkProductArchiveDistributionTemplateFile>$(SdkPkgSourcesRootDirectory)/Distribution-Template</SdkProductArchiveDistributionTemplateFile>
|
<SdkProductArchiveDistributionTemplateFile>$(SdkPkgSourcesRootDirectory)/Distribution-Template</SdkProductArchiveDistributionTemplateFile>
|
||||||
|
@ -54,6 +57,10 @@
|
||||||
<DistributionTemplateReplacement Include="{HostFxrBrandName}">
|
<DistributionTemplateReplacement Include="{HostFxrBrandName}">
|
||||||
<ReplacementString>$(HostFxrBrandName)</ReplacementString>
|
<ReplacementString>$(HostFxrBrandName)</ReplacementString>
|
||||||
</DistributionTemplateReplacement>
|
</DistributionTemplateReplacement>
|
||||||
|
|
||||||
|
<PostInstallScriptReplacement Include="%SDK_VERSION%">
|
||||||
|
<ReplacementString>$(SdkVersion)</ReplacementString>
|
||||||
|
</PostInstallScriptReplacement>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<!-- Consumed By Publish -->
|
<!-- Consumed By Publish -->
|
||||||
|
@ -83,12 +90,22 @@
|
||||||
<Copy SourceFiles="@(AspNetRuntimeFilesInput)"
|
<Copy SourceFiles="@(AspNetRuntimeFilesInput)"
|
||||||
DestinationFiles="@(AspNetRuntimeFilesInput->'$(SdkLayoutOutputDirectory)/%(RecursiveDir)%(FileName)%(Extension)')" />
|
DestinationFiles="@(AspNetRuntimeFilesInput->'$(SdkLayoutOutputDirectory)/%(RecursiveDir)%(FileName)%(Extension)')" />
|
||||||
|
|
||||||
|
<ReplaceFileContents
|
||||||
|
InputFile="$(SdkPkgScriptTemplateFile)"
|
||||||
|
DestinationFile="$(SdkPkgScriptFile)"
|
||||||
|
ReplacementPatterns="@(PostInstallScriptReplacement -> '%(Identity)')"
|
||||||
|
ReplacementStrings="@(PostInstallScriptReplacement -> '%(ReplacementString)')" />
|
||||||
|
|
||||||
|
<Chmod
|
||||||
|
Glob="$(SdkPkgScriptFile)"
|
||||||
|
Mode="ugo+x" />
|
||||||
|
|
||||||
<Exec Command="pkgbuild
|
<Exec Command="pkgbuild
|
||||||
--root '$(SdkLayoutOutputDirectory)'
|
--root '$(SdkLayoutOutputDirectory)'
|
||||||
--identifier '$(SdkComponentId)'
|
--identifier '$(SdkComponentId)'
|
||||||
--version '$(SdkVersion)'
|
--version '$(SdkVersion)'
|
||||||
--install-location '$(PkgInstallDirectory)'
|
--install-location '$(PkgInstallDirectory)'
|
||||||
--scripts '$(SdkPkgScriptsDirectory)'
|
--scripts '$(SdkPkgDestinationScriptsDirectory)'
|
||||||
'$(SdkInstallerFile)'" />
|
'$(SdkInstallerFile)'" />
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
|
|
|
@ -4,5 +4,6 @@
|
||||||
<RpmConfigJsonName>rpm_config.json</RpmConfigJsonName>
|
<RpmConfigJsonName>rpm_config.json</RpmConfigJsonName>
|
||||||
<TemplatesDir>$(RepoRoot)/packaging/rpm/templates</TemplatesDir>
|
<TemplatesDir>$(RepoRoot)/packaging/rpm/templates</TemplatesDir>
|
||||||
<ScriptsDir>$(RepoRoot)/packaging/rpm/scripts</ScriptsDir>
|
<ScriptsDir>$(RepoRoot)/packaging/rpm/scripts</ScriptsDir>
|
||||||
|
<AfterInstallHostScriptName>after_install_host.sh</AfterInstallHostScriptName>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
|
@ -55,6 +55,8 @@
|
||||||
<AspNetCoreRuntimePackageName>$(AspNetCoreRuntimePackageBrandName)-$(AspNetCoreVersionAndRelease)-$(AspNetCoreRuntimePackageTimestamp)</AspNetCoreRuntimePackageName>
|
<AspNetCoreRuntimePackageName>$(AspNetCoreRuntimePackageBrandName)-$(AspNetCoreVersionAndRelease)-$(AspNetCoreRuntimePackageTimestamp)</AspNetCoreRuntimePackageName>
|
||||||
<AspNetCoreRuntimePackageVersion>$(AspNetCoreVersion)-$(AspNetCoreRelease)-$(AspNetCoreRuntimePackageTimestamp)</AspNetCoreRuntimePackageVersion>
|
<AspNetCoreRuntimePackageVersion>$(AspNetCoreVersion)-$(AspNetCoreRelease)-$(AspNetCoreRuntimePackageTimestamp)</AspNetCoreRuntimePackageVersion>
|
||||||
<AspNetCoreRuntimeRpmInstallerFileName>$(AspNetCoreRuntimePackageBrandName)-$(AspNetCoreVersionAndRelease)-$(AspNetCoreRuntimePackageTimestamp)-$(HostRidInAspNetCoreRuntimeRpmInstallerFileName).rpm</AspNetCoreRuntimeRpmInstallerFileName>
|
<AspNetCoreRuntimeRpmInstallerFileName>$(AspNetCoreRuntimePackageBrandName)-$(AspNetCoreVersionAndRelease)-$(AspNetCoreRuntimePackageTimestamp)-$(HostRidInAspNetCoreRuntimeRpmInstallerFileName).rpm</AspNetCoreRuntimeRpmInstallerFileName>
|
||||||
|
<AfterInstallHostScriptTemplateFile>$(ScriptsDir)/$(AfterInstallHostScriptName)</AfterInstallHostScriptTemplateFile>
|
||||||
|
<AfterInstallHostScriptDestinationFile>$(RpmLayoutScripts)/$(AfterInstallHostScriptName)</AfterInstallHostScriptDestinationFile>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
|
@ -78,7 +80,7 @@
|
||||||
<SDKFiles Include="$(InputRoot)/**/*"/>
|
<SDKFiles Include="$(InputRoot)/**/*"/>
|
||||||
<SDKManpages Include="$(ManPagesDir)/**/*"/>
|
<SDKManpages Include="$(ManPagesDir)/**/*"/>
|
||||||
<SDKTemplatesFiles Include="$(TemplatesDir)/**/*"/>
|
<SDKTemplatesFiles Include="$(TemplatesDir)/**/*"/>
|
||||||
<SDKScriptsFiles Include="$(ScriptsDir)/**/*"/>
|
<SDKScriptsFiles Include="$(ScriptsDir)/after_remove_host.sh"/>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<Copy SourceFiles="@(SDKFiles)"
|
<Copy SourceFiles="@(SDKFiles)"
|
||||||
|
@ -128,6 +130,10 @@
|
||||||
<SDKTokenValue Include="%SDK_RPM_PACKAGE_NAME%">
|
<SDKTokenValue Include="%SDK_RPM_PACKAGE_NAME%">
|
||||||
<ReplacementString>$(SdkRpmPackageName)</ReplacementString>
|
<ReplacementString>$(SdkRpmPackageName)</ReplacementString>
|
||||||
</SDKTokenValue>
|
</SDKTokenValue>
|
||||||
|
|
||||||
|
<AfterInstallHostTokenValue Include="%SDK_VERSION%">
|
||||||
|
<ReplacementString>$(SdkVersion)</ReplacementString>
|
||||||
|
</AfterInstallHostTokenValue>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
@ -135,6 +141,14 @@
|
||||||
<GeneratedInstallers Include="$(SdkInstallerFile)" />
|
<GeneratedInstallers Include="$(SdkInstallerFile)" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ReplaceFileContents InputFile="$(AfterInstallHostScriptTemplateFile)"
|
||||||
|
DestinationFile="$(AfterInstallHostScriptDestinationFile)"
|
||||||
|
ReplacementItems="@(AfterInstallHostTokenValue)"/>
|
||||||
|
|
||||||
|
<Chmod
|
||||||
|
Glob="$(AfterInstallHostScriptDestinationFile)"
|
||||||
|
Mode="ugo+x" />
|
||||||
|
|
||||||
<ReplaceFileContents InputFile="$(ConfigJsonFile)"
|
<ReplaceFileContents InputFile="$(ConfigJsonFile)"
|
||||||
DestinationFile="$(RpmLayoutDirectory)$(RpmConfigJsonName)"
|
DestinationFile="$(RpmLayoutDirectory)$(RpmConfigJsonName)"
|
||||||
ReplacementItems="@(SDKTokenValue)"/>
|
ReplacementItems="@(SDKTokenValue)"/>
|
||||||
|
|
|
@ -19,4 +19,4 @@ Installation Note
|
||||||
--------------
|
--------------
|
||||||
A command will be run during the install process that will improve project restore speed and enable offline access. It will take up to a minute to complete."
|
A command will be run during the install process that will improve project restore speed and enable offline access. It will take up to a minute to complete."
|
||||||
|
|
||||||
dotnet internal-reportinstallsuccess "debianpackage" > /dev/null 2>&1 || true
|
/usr/share/dotnet/dotnet exec /usr/share/dotnet/sdk/%SDK_VERSION%/dotnet.dll internal-reportinstallsuccess "debianpackage" > /dev/null 2>&1 || true
|
||||||
|
|
|
@ -11,6 +11,6 @@ INSTALL_DESTINATION=$2
|
||||||
# A temporary fix for the permissions issue(s)
|
# A temporary fix for the permissions issue(s)
|
||||||
chmod -R 755 $INSTALL_DESTINATION
|
chmod -R 755 $INSTALL_DESTINATION
|
||||||
|
|
||||||
$INSTALL_DESTINATION/dotnet internal-reportinstallsuccess "$1" > /dev/null 2>&1 || true
|
$INSTALL_DESTINATION/dotnet exec $INSTALL_DESTINATION/sdk/%SDK_VERSION%/dotnet.dll internal-reportinstallsuccess "$1" > /dev/null 2>&1 || true
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|
|
@ -23,4 +23,4 @@ Installation Note
|
||||||
--------------
|
--------------
|
||||||
A command will be run during the install process that will improve project restore speed and enable offline access. It will take up to a minute to complete."
|
A command will be run during the install process that will improve project restore speed and enable offline access. It will take up to a minute to complete."
|
||||||
|
|
||||||
dotnet internal-reportinstallsuccess "rpmpackage" > /dev/null 2>&1 || true
|
/usr/share/dotnet/dotnet exec /usr/share/dotnet/sdk/%SDK_VERSION%/dotnet.dll internal-reportinstallsuccess "rpmpackage" > /dev/null 2>&1 || true
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
<Property Id="ProductCPU" Value="$(var.Platform)" />
|
<Property Id="ProductCPU" Value="$(var.Platform)" />
|
||||||
<Property Id="RTM_ProductVersion" Value="$(var.Dotnet_ProductVersion)" />
|
<Property Id="RTM_ProductVersion" Value="$(var.Dotnet_ProductVersion)" />
|
||||||
<Property Id="MSIFASTINSTALL" Value="7" />
|
<Property Id="MSIFASTINSTALL" Value="7" />
|
||||||
|
<Property Id="NUGETVERSION" Value="$(var.NugetVersion)" />
|
||||||
<WixVariable Id="WixUILicenseRtf" Value="$(var.MicrosoftEula)" />
|
<WixVariable Id="WixUILicenseRtf" Value="$(var.MicrosoftEula)" />
|
||||||
|
|
||||||
<Property Id="DOTNETEXE">
|
<Property Id="DOTNETEXE">
|
||||||
|
@ -32,7 +33,7 @@
|
||||||
|
|
||||||
<CustomAction Id="PropertyAssignPrimeCacheAndTelemetry"
|
<CustomAction Id="PropertyAssignPrimeCacheAndTelemetry"
|
||||||
Property="QtExecPrimeCacheAndTelemetryTarget"
|
Property="QtExecPrimeCacheAndTelemetryTarget"
|
||||||
Value=""[DOTNETHOME]\dotnet.exe" internal-reportinstallsuccess "[EXEFULLPATH]""
|
Value=""[DOTNETHOME]\dotnet.exe" exec "[DOTNETHOME]\sdk\[NUGETVERSION]\dotnet.dll" internal-reportinstallsuccess "[EXEFULLPATH]""
|
||||||
Execute="immediate" />
|
Execute="immediate" />
|
||||||
<CustomAction Id="QtExecPrimeCacheAndTelemetryTarget"
|
<CustomAction Id="QtExecPrimeCacheAndTelemetryTarget"
|
||||||
BinaryKey="WixCA"
|
BinaryKey="WixCA"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue