File tree Expand file tree Collapse file tree 4 files changed +23
-4
lines changed
Expand file tree Collapse file tree 4 files changed +23
-4
lines changed Original file line number Diff line number Diff line change 2929 <IncludeBuildOutput >false</IncludeBuildOutput >
3030 </PropertyGroup >
3131
32+ <PropertyGroup >
33+ <TarPath Condition =" '$(TarPath)' == '' and $([MSBuild]::IsOSPlatform('Windows'))" >$(SystemRoot)\System32\tar.exe</TarPath >
34+ <TarPath Condition =" '$(TarPath)' == ''" >tar</TarPath >
35+ </PropertyGroup >
36+
3237 <ItemGroup >
3338 <ProjectReference Include =" ..\WitBindgen\WitBindgen.csproj" PrivateAssets =" None" />
3439 </ItemGroup >
96101 <Target Name =" DownloadWasmTools" Inputs =" @(PrebuiltWasmToolsOutputs)" Outputs =" @(PrebuiltWasmToolsOutputs)" >
97102 <DownloadFile SourceUrl =" $(PrebuiltWasmToolsBaseUrl)-%(WasmToolsTarget.Identity)%(WasmToolsTarget.Ext)" DestinationFolder =" tools\temp" DestinationFileName =" %(WasmToolsTarget.Rid)%(WasmToolsTarget.Ext)" />
98103 <MakeDir Directories =" tools\%(WasmToolsTarget.Rid)" />
99- <Exec Command =" tar -xf " temp/%(WasmToolsTarget.Rid)%(WasmToolsTarget.Ext)" -C %(WasmToolsTarget.Rid) --strip-components=1" WorkingDirectory =" tools" />
104+ <Exec Command =" $(TarPath) -xf " temp/%(WasmToolsTarget.Rid)%(WasmToolsTarget.Ext)" -C %(WasmToolsTarget.Rid) --strip-components=1" WorkingDirectory =" tools" />
100105 <RemoveDir Directories =" tools\temp" />
101106 </Target >
102107
Original file line number Diff line number Diff line change 3333 <IncludeBuildOutput >false</IncludeBuildOutput >
3434 </PropertyGroup >
3535
36+ <PropertyGroup >
37+ <TarPath Condition =" '$(TarPath)' == '' and $([MSBuild]::IsOSPlatform('Windows'))" >$(SystemRoot)\System32\tar.exe</TarPath >
38+ <TarPath Condition =" '$(TarPath)' == ''" >tar</TarPath >
39+ </PropertyGroup >
40+
3641 <ItemGroup >
3742 <None Include =" ../../Readme.md" Pack =" true" PackagePath =" \" />
3843 </ItemGroup >
7479 <MakeDir Directories =" tools\%(PrebuiltToolTarget.Rid)" />
7580 <DownloadFile SourceUrl =" $(PrebuiltWitBindgenBaseUrl)-%(PrebuiltToolTarget.Identity)%(PrebuiltToolTarget.Ext)" DestinationFolder =" tools\temp" DestinationFileName =" %(PrebuiltToolTarget.Rid)%(PrebuiltToolTarget.Ext)" />
7681 <WriteLinesToFile File =" $(CurrentWitBindgenVersion)" Lines =" $(PrebuiltWitBindgenVersion)" Overwrite =" true" WriteOnlyWhenDifferent =" true" />
77- <Exec Command =" tar -xf " temp/%(PrebuiltToolTarget.Rid)%(PrebuiltToolTarget.Ext)" -C %(PrebuiltToolTarget.Rid) --strip-components=1" WorkingDirectory =" tools" />
82+ <Exec Command =" $(TarPath) -xf " temp/%(PrebuiltToolTarget.Rid)%(PrebuiltToolTarget.Ext)" -C %(PrebuiltToolTarget.Rid) --strip-components=1" WorkingDirectory =" tools" />
7883 <RemoveDir Directories =" tools\temp" />
7984
8085 <DownloadFile SourceUrl =" $(PrebuildWkgBaseUrl)-%(PrebuiltToolTarget.wkg)" DestinationFolder =" tools\%(PrebuiltToolTarget.Rid)" DestinationFileName =" wkg%(PrebuiltToolTarget.ExeExt)" />
Original file line number Diff line number Diff line change 1111
1212 </PropertyGroup >
1313
14+ <PropertyGroup >
15+ <TarPath Condition =" '$(TarPath)' == '' and $([MSBuild]::IsOSPlatform('Windows'))" >$(SystemRoot)\System32\tar.exe</TarPath >
16+ <TarPath Condition =" '$(TarPath)' == ''" >tar</TarPath >
17+ </PropertyGroup >
18+
1419 <!--
1520 MSBuild stuff to acquire the necessary SDKs (WASI SDK) automatically. It will take a few mins on the
1621 first build on a given machine, but after that should no-op.
3641 <!-- Windows 10+ has tar built in, so this should work cross-platform -->
3742 <Message Importance =" high" Text =" Extracting @(WasiSdkDownloadTempFile) to $(WasiSdkRoot)..." />
3843 <MakeDir Directories =" $(WasiSdkRoot)" />
39- <Exec Command =" tar -xf " @(WasiSdkDownloadTempFile)" -C . --strip-components=1" WorkingDirectory =" $(WasiSdkRoot)" />
44+ <Exec Command =" $(TarPath) -xf " @(WasiSdkDownloadTempFile)" -C . --strip-components=1" WorkingDirectory =" $(WasiSdkRoot)" />
4045 <RemoveDir Directories =" $(WasiSdkDownloadTempDir)" />
4146 </Target >
4247
Original file line number Diff line number Diff line change 1717 <WasmtimeUrl >https://github.com/bytecodealliance/wasmtime/releases/download/v$(WasmtimeVersion)/wasmtime-v$(WasmtimeVersion)-$(WasmtimeTarget)$(WasmtimeUrlExtension)</WasmtimeUrl >
1818 </PropertyGroup >
1919
20+ <PropertyGroup >
21+ <TarPath Condition =" '$(TarPath)' == '' and $([MSBuild]::IsOSPlatform('Windows'))" >$(SystemRoot)\System32\tar.exe</TarPath >
22+ <TarPath Condition =" '$(TarPath)' == ''" >tar</TarPath >
23+ </PropertyGroup >
2024
2125 <Target Name =" AcquireWasmtime" Condition =" !Exists('$(CurrentWasmtimeVersion)')" BeforeTargets =" CoreBuild" >
2226 <RemoveDir Directories =" $(MSBuildThisFileDirectory)tools" />
2327 <DownloadFile SourceUrl =" $(WasmtimeUrl)" DestinationFolder =" $(MSBuildThisFileDirectory)tools" DestinationFileName =" temp$(WasmtimeUrlExtension)" />
2428 <WriteLinesToFile File =" $(CurrentWasmtimeVersion)" Lines =" $(WasmtimeVersion)" Overwrite =" true" WriteOnlyWhenDifferent =" true" />
25- <Exec Command =" tar -xf temp$(WasmtimeUrlExtension) --strip-components=1" WorkingDirectory =" $(MSBuildThisFileDirectory)tools" />
29+ <Exec Command =" $(TarPath) -xf temp$(WasmtimeUrlExtension) --strip-components=1" WorkingDirectory =" $(MSBuildThisFileDirectory)tools" />
2630 <Delete Files =" $(MSBuildThisFileDirectory)tools\temp$(WasmtimeUrlExtension)" />
2731 </Target >
2832</Project >
You can’t perform that action at this time.
0 commit comments