Skip to content

Commit 9767082

Browse files
committed
Add dnx scripts to zip layouts
1 parent 210c02b commit 9767082

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed

src/Layout/redist/dnx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/sh
2+
"$(dirname "$0")/dotnet" dnx "$@"

src/Layout/redist/dnx.cmd

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
@echo off
2+
"%~dp0dotnet.exe" dnx %*

src/Layout/redist/targets/GenerateInstallerLayout.targets

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,17 @@
6464
Overwrite="true" />
6565
</Target>
6666

67+
<Target Name="LayoutDnxScript">
68+
<PropertyGroup>
69+
<DnxScriptSource Condition="$([MSBuild]::IsOSPlatform('WINDOWS'))">dnx.cmd</DnxScriptSource>
70+
<DnxScriptSource Condition="!$([MSBuild]::IsOSPlatform('WINDOWS'))">dnx</DnxScriptSource>
71+
</PropertyGroup>
72+
<Copy SourceFiles="$(DnxScriptSource)" DestinationFolder="$(RedistInstallerLayoutPath)" />
73+
74+
<!-- Mark script as executable -->
75+
<Exec Command="chmod 644 &quot;$(RedistInstallerLayoutPath)/dnx&quot;" Condition="!$([MSBuild]::IsOSPlatform('Windows'))" />
76+
</Target>
77+
6778
<!-- Replace files from the runtime packs with symbolic links to the corresponding shared framework files (and hostfxr) to reduce the size of the runtime pack directories. -->
6879
<Target Name="ReplaceBundledRuntimePackFilesWithSymbolicLinks" DependsOnTargets="LayoutBundledComponents"
6980
Condition="'$(BundleRuntimePacks)' == 'true' and !$([MSBuild]::IsOSPlatform('WINDOWS'))">
@@ -81,6 +92,7 @@
8192
LayoutManifests;
8293
LayoutBaselineWorkloadSet;
8394
LayoutWorkloadUserLocalMarker;
95+
LayoutDnxScript;
8496
CrossgenLayout;
8597
ReplaceBundledRuntimePackFilesWithSymbolicLinks"
8698
AfterTargets="AfterBuild" />

0 commit comments

Comments
 (0)