21
21
22
22
<Import Project =" $(MSBuildThisFileDirectory)BrowserVersions.props" />
23
23
24
- <PropertyGroup Condition =" '$(BrowserHost)' != 'windows'" >
25
- <FirefoxUrl >https://ftp.mozilla.org/pub/firefox/releases/$(linux_FirefoxRevision)/linux-x86_64/en-US/firefox-$(linux_FirefoxRevision).tar.bz2</FirefoxUrl >
26
- <GeckoDriverUrl >https://github.com/mozilla/geckodriver/releases/download/v$(linux_GeckoDriverRevision)/geckodriver-v$(linux_GeckoDriverRevision)-linux64.tar.gz</GeckoDriverUrl >
27
- <FirefoxBinaryName >firefox</FirefoxBinaryName >
28
- <GeckoDriverBinaryName >geckodriver</GeckoDriverBinaryName >
24
+ <PropertyGroup >
29
25
<FirefoxDir >$(ArtifactsBinDir)firefox\</FirefoxDir >
30
26
<FirefoxDirName >firefox</FirefoxDirName >
31
27
<GeckoDriverDirName >geckodriver</GeckoDriverDirName >
32
28
<GeckoDriverDir >$(ArtifactsBinDir)geckodriver\</GeckoDriverDir >
29
+ </PropertyGroup >
30
+ <PropertyGroup Condition =" $([MSBuild]::IsOSPlatform('linux'))" >
31
+ <FirefoxUrl >https://ftp.mozilla.org/pub/firefox/releases/$(linux_FirefoxRevision)/linux-x86_64/en-US/firefox-$(linux_FirefoxRevision).tar.bz2</FirefoxUrl >
32
+ <GeckoDriverUrl >https://github.com/mozilla/geckodriver/releases/download/v$(linux_GeckoDriverRevision)/geckodriver-v$(linux_GeckoDriverRevision)-linux64.tar.gz</GeckoDriverUrl >
33
+ <FirefoxBinaryName >firefox</FirefoxBinaryName >
34
+ <GeckoDriverBinaryName >geckodriver</GeckoDriverBinaryName >
33
35
<FirefoxStampFile >$([MSBuild]::NormalizePath($(FirefoxDir), '.install-firefox-$(linux_FirefoxRevision).stamp'))</FirefoxStampFile >
34
36
<GeckoDriverStampFile >$([MSBuild]::NormalizePath($(GeckoDriverDir), '.install-geckodriver-$(linux_GeckoDriverRevision).stamp'))</GeckoDriverStampFile >
37
+ <FirefoxBinaryPath >$([MSBuild]::NormalizePath($(FirefoxDir), $(FirefoxDirName), $(FirefoxBinaryName)))</FirefoxBinaryPath >
38
+ <GeckoDriverBinaryPath >$([MSBuild]::NormalizePath($(GeckoDriverDir), $(GeckoDriverDirName), $(GeckoDriverBinaryName)))</GeckoDriverBinaryPath >
39
+ </PropertyGroup >
35
40
41
+ <PropertyGroup Condition =" $([MSBuild]::IsOSPlatform('windows'))" >
42
+ <FirefoxUrl >https://ftp.mozilla.org/pub/firefox/releases/$(win_FirefoxRevision)/win64/en-US/Firefox%20Setup%20$(win_FirefoxRevision).exe</FirefoxUrl >
43
+ <GeckoDriverUrl >https://github.com/mozilla/geckodriver/releases/download/v$(win_GeckoDriverRevision)/geckodriver-v$(win_GeckoDriverRevision)-win64.zip</GeckoDriverUrl >
44
+ <FirefoxBinaryName >firefox.exe</FirefoxBinaryName >
45
+ <GeckoDriverBinaryName >geckodriver.exe</GeckoDriverBinaryName >
46
+ <FirefoxStampFile >$([MSBuild]::NormalizePath($(FirefoxDir), '.install-firefox-$(win_FirefoxRevision).stamp'))</FirefoxStampFile >
47
+ <GeckoDriverStampFile >$([MSBuild]::NormalizePath($(GeckoDriverDir), '.install-geckodriver-$(win_GeckoDriverRevision).stamp'))</GeckoDriverStampFile >
36
48
<FirefoxBinaryPath >$([MSBuild]::NormalizePath($(FirefoxDir), $(FirefoxDirName), $(FirefoxBinaryName)))</FirefoxBinaryPath >
37
49
<GeckoDriverBinaryPath >$([MSBuild]::NormalizePath($(GeckoDriverDir), $(GeckoDriverDirName), $(GeckoDriverBinaryName)))</GeckoDriverBinaryPath >
38
50
</PropertyGroup >
@@ -183,7 +195,7 @@ export __SCRIPT_DIR=%24( cd -- "%24( dirname -- "%24{BASH_SOURCE[0]}" )" &>
183
195
184
196
<Target Name =" DownloadAndInstallFirefox"
185
197
AfterTargets =" $(WasmProvisionAfterTarget)"
186
- Condition =" !Exists($(FirefoxStampFile)) and '$(InstallFirefoxForTests)' == 'true' and !$([MSBuild]::IsOSPlatform('windows')) " >
198
+ Condition =" !Exists($(FirefoxStampFile)) and '$(InstallFirefoxForTests)' == 'true'" >
187
199
<ItemGroup >
188
200
<_StampFile Include =" $(_BrowserStampDir).install-firefox*.stamp" />
189
201
</ItemGroup >
@@ -197,24 +209,22 @@ export __SCRIPT_DIR=%24( cd -- "%24( dirname -- "%24{BASH_SOURCE[0]}" )" &>
197
209
<DownloadFile SourceUrl =" $(FirefoxUrl)" DestinationFolder =" $(FirefoxDir)" SkipUnchangedFiles =" true" >
198
210
<Output TaskParameter =" DownloadedFile" PropertyName =" _DownloadedFile" />
199
211
</DownloadFile >
200
- <Exec Command =" tar -xf $(_DownloadedFile) -C $(FirefoxDir)" />
201
- <Exec Command =" rm -rf $(_DownloadedFile)" />
202
-
203
- <PropertyGroup >
204
- <_FirefoxBinaryPath >$([MSBuild]::NormalizePath($(FirefoxDir), $(FirefoxBinaryName)))</_FirefoxBinaryPath >
205
- </PropertyGroup >
212
+ <MakeDir Directories =" $(FirefoxDir)\$(FirefoxDirName)" />
213
+ <Exec Command =" tar -xf $(_DownloadedFile) -C $(FirefoxDir)" Condition =" $([MSBuild]::IsOSPlatform('linux'))" />
214
+ <Exec Command =" " $(_DownloadedFile)" /InstallDirectoryPath=$(FirefoxDir)$(FirefoxDirName) /TaskbarShortcut=false /DesktopShortcut=false /StartMenuShortcut=false /PrivateBrowsingShortcut=false /MaintenanceService=false /PreventRebootRequired=true" Condition =" $([MSBuild]::IsOSPlatform('windows'))" />
215
+ <Delete Files =" $(_DownloadedFile)" />
206
216
207
- <Error Text =" Cannot find firefox at $(_FirefoxBinaryPath ) in the downloaded copy"
208
- Condition =" !Exists($(_FirefoxBinaryPath ))" />
217
+ <Error Text =" Cannot find firefox at $(FirefoxBinaryPath ) in the downloaded copy"
218
+ Condition =" !Exists($(FirefoxBinaryPath ))" />
209
219
210
- <Exec Command =" chmod +x $(_FirefoxBinaryPath )" />
220
+ <Exec Command =" chmod +x $(FirefoxBinaryPath) " Condition = " $([MSBuild]::IsOSPlatform('linux') )" />
211
221
212
222
<Touch Files =" $(FirefoxStampFile)" AlwaysCreate =" true" />
213
223
</Target >
214
224
215
225
<Target Name =" DownloadAndInstallGeckoDriver"
216
226
AfterTargets =" $(WasmProvisionAfterTarget)"
217
- Condition =" !Exists($(GeckoDriverStampFile)) and '$(InstallFirefoxForTests)' == 'true' and !$([MSBuild]::IsOSPlatform('windows')) " >
227
+ Condition =" !Exists($(GeckoDriverStampFile)) and '$(InstallFirefoxForTests)' == 'true'" >
218
228
<ItemGroup >
219
229
<_StampFile Include =" $(_BrowserStampDir).install-geckodriver*.stamp" />
220
230
</ItemGroup >
@@ -228,18 +238,15 @@ export __SCRIPT_DIR=%24( cd -- "%24( dirname -- "%24{BASH_SOURCE[0]}" )" &>
228
238
<DownloadFile SourceUrl =" $(GeckoDriverUrl)" DestinationFolder =" $(GeckoDriverDir)" SkipUnchangedFiles =" true" >
229
239
<Output TaskParameter =" DownloadedFile" PropertyName =" _DownloadedFile" />
230
240
</DownloadFile >
231
- <Exec Command =" mkdir -p $(GeckoDriverDir)/$(GeckoDriverDirName)" />
232
- <Exec Command =" tar -xf $(_DownloadedFile) -C $(GeckoDriverDir)/$(GeckoDriverDirName)" />
233
- <Exec Command =" rm -rf $(_DownloadedFile)" />
234
-
235
- <PropertyGroup >
236
- <_GeckoDriverBinaryPath >$([MSBuild]::NormalizePath($(GeckoDriverDir), $(GeckoDriverBinaryName)))</_GeckoDriverBinaryPath >
237
- </PropertyGroup >
241
+ <MakeDir Directories =" $(GeckoDriverDir)/$(GeckoDriverDirName)" />
242
+ <Exec Command =" tar -xf $(_DownloadedFile) -C $(GeckoDriverDir)/$(GeckoDriverDirName)" Condition =" $([MSBuild]::IsOSPlatform('linux'))" />
243
+ <Unzip SourceFiles =" $(_DownloadedFile)" DestinationFolder =" $(GeckoDriverDir)/$(GeckoDriverDirName)" Condition =" $([MSBuild]::IsOSPlatform('windows'))" />
244
+ <Delete Files =" $(_DownloadedFile)" />
238
245
239
- <Error Text =" Cannot find GeckoDriver at $(_GeckoDriverBinaryPath ) in the downloaded copy"
240
- Condition =" !Exists($(_GeckoDriverBinaryPath ))" />
246
+ <Error Text =" Cannot find GeckoDriver at $(GeckoDriverBinaryPath ) in the downloaded copy"
247
+ Condition =" !Exists($(GeckoDriverBinaryPath ))" />
241
248
242
- <Exec Command =" chmod +x $(_GeckoDriverBinaryPath) " />
249
+ <Exec Command =" chmod +x $(GeckoDriverBinaryPath) " Condition = " $([MSBuild]::IsOSPlatform('linux')) " />
243
250
244
251
<Touch Files =" $(GeckoDriverStampFile)" AlwaysCreate =" true" />
245
252
</Target >
0 commit comments