55 </PropertyGroup >
66 <Target Name =" CleanChrome" BeforeTargets =" Clean" >
77 <RemoveDir
8- Directories =" $(OutDir)chrome-for-testing-$(Version)"
9- Condition =" Exists('$(OutDir)chrome-for-testing-$(Version)')"
8+ Directories =" $(OutDir)chrome-for-testing-$(Version)"
9+ Condition =" Exists('$(OutDir)chrome-for-testing-$(Version)')"
1010 />
1111 </Target >
1212 <Target Name =" DownloadChromeInBuild" AfterTargets =" Build" >
13- <MakeDir Directories =" $(Cache)" Condition =" !Exists('$(Cache)')" />
13+ <MakeDir Directories =" $(Cache)" Condition =" !Exists('$(Cache)')" />
1414 <MakeDir Directories =" $(OutDir)chrome-for-testing-$(Version)"
15- Condition =" !Exists('$(OutDir)chrome-for-testing-$(Version)')" />
16- <!-- Linux-->
17- <Exec Command =" uname -m" ConsoleToMSBuild =" true"
18- Condition =" $([MSBuild]::IsOSPlatform('Linux'))" >
19- <Output TaskParameter =" ConsoleOutput" PropertyName =" OSArchitecture" />
15+ Condition =" !Exists('$(OutDir)chrome-for-testing-$(Version)')" />
16+
17+ <!-- Linux -->
18+ <Exec Command =" uname -m"
19+ ConsoleToMSBuild =" true"
20+ Condition =" $([MSBuild]::IsOSPlatform('Linux'))" >
21+ <Output TaskParameter =" ConsoleOutput" PropertyName =" OSArchitecture" />
2022 </Exec >
2123 <Error Text =" Only x86_64 is supported on linux"
22- Condition =" $([MSBuild]::IsOSPlatform('Linux')) AND '$(OSArchitecture)' != 'x86_64'" />
24+ Condition =" $([MSBuild]::IsOSPlatform('Linux')) AND '$(OSArchitecture)' != 'x86_64'" />
2325 <PropertyGroup >
2426 <ChromePlatrofm Condition =" $([MSBuild]::IsOSPlatform('Linux')) AND '$(OSArchitecture)' == 'x86_64'" >linux64</ChromePlatrofm >
2527 </PropertyGroup >
2628 <DownloadFile
27- Condition =" $([MSBuild]::IsOSPlatform('Linux'))"
28- SourceUrl =" https://github.com/madcoons/chrome-for-testing-nuget/releases/download/v$(Version)/chrome-linux64.tar.gz"
29- DestinationFolder =" $(Cache)"
30- DestinationFileName =" chrome-linux64.tar.gz" >
29+ Condition =" $([MSBuild]::IsOSPlatform('Linux'))"
30+ SourceUrl =" https://github.com/madcoons/chrome-for-testing-nuget/releases/download/v$(Version)/chrome-linux64.tar.gz"
31+ DestinationFolder =" $(Cache)"
32+ DestinationFileName =" chrome-linux64.tar.gz" >
3133 </DownloadFile >
3234 <Exec
33- Command =" tar -xf '$(Cache)chrome-linux64.tar.gz' -C '$(OutDir)chrome-for-testing-$(Version)'"
34- Condition =" $([MSBuild]::IsOSPlatform('Linux')) And !Exists('$(OutDir)chrome-for-testing-$(Version)/chrome-root')" />
35- <!-- MacOS-->
36- <Exec Command =" uname -m" ConsoleToMSBuild =" true"
37- Condition =" $([MSBuild]::IsOSPlatform('OSX'))" >
38- <Output TaskParameter =" ConsoleOutput" PropertyName =" OSArchitecture" />
35+ Command =" tar -xf '$(Cache)chrome-linux64.tar.gz' -C '$(OutDir)chrome-for-testing-$(Version)'"
36+ Condition =" $([MSBuild]::IsOSPlatform('Linux')) And !Exists('$(OutDir)chrome-for-testing-$(Version)/chrome-root')" />
37+
38+ <!-- MacOS -->
39+ <Exec Command =" uname -m"
40+ ConsoleToMSBuild =" true"
41+ Condition =" $([MSBuild]::IsOSPlatform('OSX'))" >
42+ <Output TaskParameter =" ConsoleOutput" PropertyName =" OSArchitecture" />
3943 </Exec >
4044 <Error Text =" Only x86_64 and arm64 are supported on mac"
41- Condition =" $([MSBuild]::IsOSPlatform('OSX')) AND '$(OSArchitecture)' != 'x86_64' AND '$(OSArchitecture)' != 'arm64'" />
45+ Condition =" $([MSBuild]::IsOSPlatform('OSX')) AND '$(OSArchitecture)' != 'x86_64' AND '$(OSArchitecture)' != 'arm64'" />
4246 <PropertyGroup >
4347 <ChromePlatrofm Condition =" $([MSBuild]::IsOSPlatform('OSX')) AND '$(OSArchitecture)' == 'arm64'" >mac-arm64</ChromePlatrofm >
4448 <ChromePlatrofm Condition =" $([MSBuild]::IsOSPlatform('OSX')) AND '$(OSArchitecture)' == 'x86_64'" >mac-x64</ChromePlatrofm >
4549 </PropertyGroup >
4650 <DownloadFile
47- Condition =" $([MSBuild]::IsOSPlatform('OSX'))"
48- SourceUrl =" https://storage.googleapis.com/chrome-for-testing-public/$(ChromeVersion)/$(ChromePlatrofm)/chrome-$(ChromePlatrofm).zip"
49- DestinationFolder =" $(Cache)"
50- DestinationFileName =" chrome.zip" >
51+ Condition =" $([MSBuild]::IsOSPlatform('OSX'))"
52+ SourceUrl =" https://storage.googleapis.com/chrome-for-testing-public/$(ChromeVersion)/$(ChromePlatrofm)/chrome-$(ChromePlatrofm).zip"
53+ DestinationFolder =" $(Cache)"
54+ DestinationFileName =" chrome.zip" >
55+ </DownloadFile >
56+ <Exec
57+ Command =" unzip '$(Cache)chrome.zip' -d '$(OutDir)chrome-for-testing-$(Version)'"
58+ Condition =" $([MSBuild]::IsOSPlatform('OSX')) And !Exists('$(OutDir)chrome-for-testing-$(Version)/chrome-$(ChromePlatrofm)')" />
59+
60+ <!-- Windows -->
61+ <Exec Command =" powershell -NoProfile -Command " [System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture" "
62+ ConsoleToMSBuild =" true"
63+ Condition =" $([MSBuild]::IsOSPlatform('Windows_NT'))" >
64+ <Output TaskParameter =" ConsoleOutput" PropertyName =" OSArchitecture" />
65+ </Exec >
66+ <Error Text =" Only x86 and x64 are supported on windows"
67+ Condition =" $([MSBuild]::IsOSPlatform('Windows_NT')) AND '$(OSArchitecture)' != 'X86' AND '$(OSArchitecture)' != 'X64'" />
68+ <PropertyGroup >
69+ <ChromePlatrofm Condition =" $([MSBuild]::IsOSPlatform('Windows_NT')) AND '$(OSArchitecture)' == 'X86'" >win32</ChromePlatrofm >
70+ <ChromePlatrofm Condition =" $([MSBuild]::IsOSPlatform('Windows_NT')) AND '$(OSArchitecture)' == 'X64'" >win64</ChromePlatrofm >
71+ </PropertyGroup >
72+ <DownloadFile
73+ Condition =" $([MSBuild]::IsOSPlatform('Windows_NT'))"
74+ SourceUrl =" https://storage.googleapis.com/chrome-for-testing-public/$(ChromeVersion)/$(ChromePlatrofm)/chrome-$(ChromePlatrofm).zip"
75+ DestinationFolder =" $(Cache)"
76+ DestinationFileName =" chrome.zip" >
5177 </DownloadFile >
5278 <Exec
53- Command =" unzip '$(Cache)chrome.zip' -d '$(OutDir)chrome-for-testing-$(Version)'"
54- Condition =" $([MSBuild]::IsOSPlatform('OSX ')) And !Exists('$(OutDir)chrome-for-testing-$(Version)/chrome-$(ChromePlatrofm) ')" />
79+ Command =" powershell -Command " Expand-Archive -Path '$(Cache)chrome.zip' -DestinationPath '$(OutDir)chrome-for-testing-$(Version)'" "
80+ Condition =" $([MSBuild]::IsOSPlatform('Windows_NT ')) And !Exists('$(OutDir)chrome-for-testing-$(Version)/chrome.exe ')" />
5581 </Target >
5682
5783 <Target Name =" DownloadChromeInPublish" AfterTargets =" Publish" >
58- <MakeDir Directories =" $(Cache)" Condition =" !Exists('$(Cache)')" />
84+ <MakeDir Directories =" $(Cache)" Condition =" !Exists('$(Cache)')" />
5985 <MakeDir Directories =" $(PublishDir)chrome-for-testing-$(Version)"
60- Condition =" !Exists('$(PublishDir)chrome-for-testing-$(Version)')" />
61- <!-- Linux-->
62- <Exec Command =" uname -m" ConsoleToMSBuild =" true"
63- Condition =" $([MSBuild]::IsOSPlatform('Linux'))" >
64- <Output TaskParameter =" ConsoleOutput" PropertyName =" OSArchitecture" />
86+ Condition =" !Exists('$(PublishDir)chrome-for-testing-$(Version)')" />
87+ <!-- Linux -->
88+ <Exec Command =" uname -m"
89+ ConsoleToMSBuild =" true"
90+ Condition =" $([MSBuild]::IsOSPlatform('Linux'))" >
91+ <Output TaskParameter =" ConsoleOutput" PropertyName =" OSArchitecture" />
6592 </Exec >
6693 <Error Text =" Only x86_64 is supported on linux"
67- Condition =" $([MSBuild]::IsOSPlatform('Linux')) AND '$(OSArchitecture)' != 'x86_64'" />
94+ Condition =" $([MSBuild]::IsOSPlatform('Linux')) AND '$(OSArchitecture)' != 'x86_64'" />
6895 <PropertyGroup >
6996 <ChromePlatrofm Condition =" $([MSBuild]::IsOSPlatform('Linux')) AND '$(OSArchitecture)' == 'x86_64'" >linux64</ChromePlatrofm >
7097 </PropertyGroup >
7198 <DownloadFile
72- Condition =" $([MSBuild]::IsOSPlatform('Linux'))"
73- SourceUrl =" https://github.com/madcoons/chrome-for-testing-nuget/releases/download/v$(Version)/chrome-linux64.tar.gz"
74- DestinationFolder =" $(Cache)"
75- DestinationFileName =" chrome-linux64.tar.gz" >
99+ Condition =" $([MSBuild]::IsOSPlatform('Linux'))"
100+ SourceUrl =" https://github.com/madcoons/chrome-for-testing-nuget/releases/download/v$(Version)/chrome-linux64.tar.gz"
101+ DestinationFolder =" $(Cache)"
102+ DestinationFileName =" chrome-linux64.tar.gz" >
76103 </DownloadFile >
77104 <Exec
78- Command =" tar -xf '$(Cache)chrome-linux64.tar.gz' -C '$(PublishDir)chrome-for-testing-$(Version)'"
79- Condition =" $([MSBuild]::IsOSPlatform('Linux')) And !Exists('$(PublishDir)chrome-for-testing-$(Version)/chrome-root')" />
80- <!-- MacOS-->
81- <Exec Command =" uname -m" ConsoleToMSBuild =" true"
82- Condition =" $([MSBuild]::IsOSPlatform('OSX'))" >
83- <Output TaskParameter =" ConsoleOutput" PropertyName =" OSArchitecture" />
105+ Command =" tar -xf '$(Cache)chrome-linux64.tar.gz' -C '$(PublishDir)chrome-for-testing-$(Version)'"
106+ Condition =" $([MSBuild]::IsOSPlatform('Linux')) And !Exists('$(PublishDir)chrome-for-testing-$(Version)/chrome-root')" />
107+ <!-- MacOS -->
108+ <Exec Command =" uname -m"
109+ ConsoleToMSBuild =" true"
110+ Condition =" $([MSBuild]::IsOSPlatform('OSX'))" >
111+ <Output TaskParameter =" ConsoleOutput" PropertyName =" OSArchitecture" />
84112 </Exec >
85113 <Error Text =" Only x86_64 and arm64 are supported on mac"
86- Condition =" $([MSBuild]::IsOSPlatform('OSX')) AND '$(OSArchitecture)' != 'x86_64' AND '$(OSArchitecture)' != 'arm64'" />
114+ Condition =" $([MSBuild]::IsOSPlatform('OSX')) AND '$(OSArchitecture)' != 'x86_64' AND '$(OSArchitecture)' != 'arm64'" />
87115 <PropertyGroup >
88116 <ChromePlatrofm Condition =" $([MSBuild]::IsOSPlatform('OSX')) AND '$(OSArchitecture)' == 'arm64'" >mac-arm64</ChromePlatrofm >
89117 <ChromePlatrofm Condition =" $([MSBuild]::IsOSPlatform('OSX')) AND '$(OSArchitecture)' == 'x86_64'" >mac-x64</ChromePlatrofm >
90118 </PropertyGroup >
91119 <DownloadFile
92- Condition =" $([MSBuild]::IsOSPlatform('OSX'))"
93- SourceUrl =" https://storage.googleapis.com/chrome-for-testing-public/$(ChromeVersion)/$(ChromePlatrofm)/chrome-$(ChromePlatrofm).zip"
94- DestinationFolder =" $(Cache)"
95- DestinationFileName =" chrome.zip" >
120+ Condition =" $([MSBuild]::IsOSPlatform('OSX'))"
121+ SourceUrl =" https://storage.googleapis.com/chrome-for-testing-public/$(ChromeVersion)/$(ChromePlatrofm)/chrome-$(ChromePlatrofm).zip"
122+ DestinationFolder =" $(Cache)"
123+ DestinationFileName =" chrome.zip" >
124+ </DownloadFile >
125+ <Exec
126+ Command =" unzip '$(Cache)chrome.zip' -d '$(PublishDir)chrome-for-testing-$(Version)'"
127+ Condition =" $([MSBuild]::IsOSPlatform('OSX')) And !Exists('$(PublishDir)chrome-for-testing-$(Version)/chrome-$(ChromePlatrofm)')" />
128+
129+ <!-- Windows -->
130+ <Exec Command =" powershell -NoProfile -Command " [System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture" "
131+ ConsoleToMSBuild =" true"
132+ Condition =" $([MSBuild]::IsOSPlatform('Windows_NT'))" >
133+ <Output TaskParameter =" ConsoleOutput" PropertyName =" OSArchitecture" />
134+ </Exec >
135+ <Error Text =" Only x86 and x64 are supported on windows"
136+ Condition =" $([MSBuild]::IsOSPlatform('Windows_NT')) AND '$(OSArchitecture)' != 'X86' AND '$(OSArchitecture)' != 'X64'" />
137+ <PropertyGroup >
138+ <ChromePlatrofm Condition =" $([MSBuild]::IsOSPlatform('Windows_NT')) AND '$(OSArchitecture)' == 'X86'" >win32</ChromePlatrofm >
139+ <ChromePlatrofm Condition =" $([MSBuild]::IsOSPlatform('Windows_NT')) AND '$(OSArchitecture)' == 'X64'" >win64</ChromePlatrofm >
140+ </PropertyGroup >
141+ <DownloadFile
142+ Condition =" $([MSBuild]::IsOSPlatform('Windows_NT'))"
143+ SourceUrl =" https://storage.googleapis.com/chrome-for-testing-public/$(ChromeVersion)/$(ChromePlatrofm)/chrome-$(ChromePlatrofm).zip"
144+ DestinationFolder =" $(Cache)"
145+ DestinationFileName =" chrome.zip" >
96146 </DownloadFile >
97147 <Exec
98- Command =" unzip '$(Cache)chrome.zip' -d '$(PublishDir)chrome-for-testing-$(Version)'"
99- Condition =" $([MSBuild]::IsOSPlatform('OSX ')) And !Exists('$(PublishDir)chrome-for-testing-$(Version)/chrome-$(ChromePlatrofm) ')" />
148+ Command =" powershell -Command " Expand-Archive -Path '$(Cache)chrome.zip' -DestinationPath '$(PublishDir)chrome-for-testing-$(Version)'" "
149+ Condition =" $([MSBuild]::IsOSPlatform('Windows_NT ')) And !Exists('$(PublishDir)chrome-for-testing-$(Version)/chrome.exe ')" />
100150 </Target >
101151</Project >
0 commit comments