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"
|
||||
UseHardlinksIfPossible="False" />
|
||||
|
||||
<!-- Create layout: postinst -->
|
||||
<Copy
|
||||
DestinationFiles= "$(DebianPostinstFile)"
|
||||
SourceFiles="$(DebianPostinstTemplateFile)"
|
||||
OverwriteReadOnlyFiles="True"
|
||||
SkipUnchangedFiles="False"
|
||||
UseHardlinksIfPossible="False" />
|
||||
<!-- Create layout: Generate and Place postinst -->
|
||||
<ReplaceFileContents
|
||||
InputFile="$(DebianPostinstTemplateFile)"
|
||||
DestinationFile="$(DebianPostinstFile)"
|
||||
ReplacementItems="@(DebianPostInstTokenValues)" />
|
||||
|
||||
<Chmod
|
||||
Glob="$(DebianPostinstFile)"
|
||||
Mode="ugo+x" />
|
||||
|
||||
<!-- Create layout: Generate and Place debian_config.json -->
|
||||
<ReplaceFileContents
|
||||
|
|
|
@ -105,6 +105,10 @@
|
|||
<DebianConfigTokenValues Include="%CLI_SDK_BRAND_NAME%">
|
||||
<ReplacementString>$(SdkBrandName)</ReplacementString>
|
||||
</DebianConfigTokenValues>
|
||||
|
||||
<DebianPostInstTokenValues Include="%SDK_VERSION%">
|
||||
<ReplacementString>$(SdkVersion)</ReplacementString>
|
||||
</DebianPostInstTokenValues>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
@ -14,6 +14,9 @@
|
|||
|
||||
<SdkPkgSourcesRootDirectory>$(RepoRoot)/packaging/osx/clisdk</SdkPkgSourcesRootDirectory>
|
||||
<SdkPkgScriptsDirectory>$(SdkPkgSourcesRootDirectory)/scripts</SdkPkgScriptsDirectory>
|
||||
<SdkPkgScriptTemplateFile>$(SdkPkgScriptsDirectory)/postinstall</SdkPkgScriptTemplateFile>
|
||||
<SdkPkgDestinationScriptsDirectory>$(PkgIntermediateDirectory)/scripts</SdkPkgDestinationScriptsDirectory>
|
||||
<SdkPkgScriptFile>$(SdkPkgDestinationScriptsDirectory)/postinstall</SdkPkgScriptFile>
|
||||
<SdkProductArchiveResourcesDirectory>$(SdkPkgSourcesRootDirectory)/resources</SdkProductArchiveResourcesDirectory>
|
||||
|
||||
<SdkProductArchiveDistributionTemplateFile>$(SdkPkgSourcesRootDirectory)/Distribution-Template</SdkProductArchiveDistributionTemplateFile>
|
||||
|
@ -54,6 +57,10 @@
|
|||
<DistributionTemplateReplacement Include="{HostFxrBrandName}">
|
||||
<ReplacementString>$(HostFxrBrandName)</ReplacementString>
|
||||
</DistributionTemplateReplacement>
|
||||
|
||||
<PostInstallScriptReplacement Include="%SDK_VERSION%">
|
||||
<ReplacementString>$(SdkVersion)</ReplacementString>
|
||||
</PostInstallScriptReplacement>
|
||||
</ItemGroup>
|
||||
|
||||
<!-- Consumed By Publish -->
|
||||
|
@ -83,12 +90,22 @@
|
|||
<Copy SourceFiles="@(AspNetRuntimeFilesInput)"
|
||||
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
|
||||
--root '$(SdkLayoutOutputDirectory)'
|
||||
--identifier '$(SdkComponentId)'
|
||||
--version '$(SdkVersion)'
|
||||
--install-location '$(PkgInstallDirectory)'
|
||||
--scripts '$(SdkPkgScriptsDirectory)'
|
||||
--scripts '$(SdkPkgDestinationScriptsDirectory)'
|
||||
'$(SdkInstallerFile)'" />
|
||||
</Target>
|
||||
|
||||
|
|
|
@ -4,5 +4,6 @@
|
|||
<RpmConfigJsonName>rpm_config.json</RpmConfigJsonName>
|
||||
<TemplatesDir>$(RepoRoot)/packaging/rpm/templates</TemplatesDir>
|
||||
<ScriptsDir>$(RepoRoot)/packaging/rpm/scripts</ScriptsDir>
|
||||
<AfterInstallHostScriptName>after_install_host.sh</AfterInstallHostScriptName>
|
||||
</PropertyGroup>
|
||||
</Project>
|
|
@ -55,6 +55,8 @@
|
|||
<AspNetCoreRuntimePackageName>$(AspNetCoreRuntimePackageBrandName)-$(AspNetCoreVersionAndRelease)-$(AspNetCoreRuntimePackageTimestamp)</AspNetCoreRuntimePackageName>
|
||||
<AspNetCoreRuntimePackageVersion>$(AspNetCoreVersion)-$(AspNetCoreRelease)-$(AspNetCoreRuntimePackageTimestamp)</AspNetCoreRuntimePackageVersion>
|
||||
<AspNetCoreRuntimeRpmInstallerFileName>$(AspNetCoreRuntimePackageBrandName)-$(AspNetCoreVersionAndRelease)-$(AspNetCoreRuntimePackageTimestamp)-$(HostRidInAspNetCoreRuntimeRpmInstallerFileName).rpm</AspNetCoreRuntimeRpmInstallerFileName>
|
||||
<AfterInstallHostScriptTemplateFile>$(ScriptsDir)/$(AfterInstallHostScriptName)</AfterInstallHostScriptTemplateFile>
|
||||
<AfterInstallHostScriptDestinationFile>$(RpmLayoutScripts)/$(AfterInstallHostScriptName)</AfterInstallHostScriptDestinationFile>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
|
@ -78,7 +80,7 @@
|
|||
<SDKFiles Include="$(InputRoot)/**/*"/>
|
||||
<SDKManpages Include="$(ManPagesDir)/**/*"/>
|
||||
<SDKTemplatesFiles Include="$(TemplatesDir)/**/*"/>
|
||||
<SDKScriptsFiles Include="$(ScriptsDir)/**/*"/>
|
||||
<SDKScriptsFiles Include="$(ScriptsDir)/after_remove_host.sh"/>
|
||||
</ItemGroup>
|
||||
|
||||
<Copy SourceFiles="@(SDKFiles)"
|
||||
|
@ -128,6 +130,10 @@
|
|||
<SDKTokenValue Include="%SDK_RPM_PACKAGE_NAME%">
|
||||
<ReplacementString>$(SdkRpmPackageName)</ReplacementString>
|
||||
</SDKTokenValue>
|
||||
|
||||
<AfterInstallHostTokenValue Include="%SDK_VERSION%">
|
||||
<ReplacementString>$(SdkVersion)</ReplacementString>
|
||||
</AfterInstallHostTokenValue>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
@ -135,6 +141,14 @@
|
|||
<GeneratedInstallers Include="$(SdkInstallerFile)" />
|
||||
</ItemGroup>
|
||||
|
||||
<ReplaceFileContents InputFile="$(AfterInstallHostScriptTemplateFile)"
|
||||
DestinationFile="$(AfterInstallHostScriptDestinationFile)"
|
||||
ReplacementItems="@(AfterInstallHostTokenValue)"/>
|
||||
|
||||
<Chmod
|
||||
Glob="$(AfterInstallHostScriptDestinationFile)"
|
||||
Mode="ugo+x" />
|
||||
|
||||
<ReplaceFileContents InputFile="$(ConfigJsonFile)"
|
||||
DestinationFile="$(RpmLayoutDirectory)$(RpmConfigJsonName)"
|
||||
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."
|
||||
|
||||
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)
|
||||
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
|
||||
|
|
|
@ -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."
|
||||
|
||||
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="RTM_ProductVersion" Value="$(var.Dotnet_ProductVersion)" />
|
||||
<Property Id="MSIFASTINSTALL" Value="7" />
|
||||
<Property Id="NUGETVERSION" Value="$(var.NugetVersion)" />
|
||||
<WixVariable Id="WixUILicenseRtf" Value="$(var.MicrosoftEula)" />
|
||||
|
||||
<Property Id="DOTNETEXE">
|
||||
|
@ -32,7 +33,7 @@
|
|||
|
||||
<CustomAction Id="PropertyAssignPrimeCacheAndTelemetry"
|
||||
Property="QtExecPrimeCacheAndTelemetryTarget"
|
||||
Value=""[DOTNETHOME]\dotnet.exe" internal-reportinstallsuccess "[EXEFULLPATH]""
|
||||
Value=""[DOTNETHOME]\dotnet.exe" exec "[DOTNETHOME]\sdk\[NUGETVERSION]\dotnet.dll" internal-reportinstallsuccess "[EXEFULLPATH]""
|
||||
Execute="immediate" />
|
||||
<CustomAction Id="QtExecPrimeCacheAndTelemetryTarget"
|
||||
BinaryKey="WixCA"
|
||||
|
|
Loading…
Reference in a new issue