Skip to content

Commit 420eae9

Browse files
committed
Updating project post-build actions for .NET bindings
Moving to use project-relative paths for file copies instead of solution-relative paths.
1 parent 3b06dd4 commit 420eae9

File tree

2 files changed

+30
-30
lines changed

2 files changed

+30
-30
lines changed

Diff for: dotnet/src/webdriver/WebDriver.csproj

+16-16
Original file line numberDiff line numberDiff line change
@@ -312,36 +312,36 @@
312312
<PostBuildEvent>if %25PROCESSOR_ARCHITECTURE%25 == x86 (
313313
if not defined PROCESSOR_ARCHITEW6432 (
314314
echo Detected 32-bit platform
315-
if exist "$(SolutionDir)build\cpp\Win32\$(ConfigurationName)\IEDriverServer.exe" (
316-
echo Found IE 32-bit native binary, copying from Win32 build target $(SolutionDir)build\cpp\Win32\$(ConfigurationName)\IEDriverServer.exe
317-
copy /y "$(SolutionDir)build\cpp\Win32\$(ConfigurationName)\IEDriverServer.exe" "$(TargetDir)" &gt; NUL
315+
if exist "$(ProjectDir)..\..\..\build\cpp\Win32\$(ConfigurationName)\IEDriverServer.exe" (
316+
echo Found IE 32-bit native binary, copying from Win32 build target $(ProjectDir)..\..\..\build\cpp\Win32\$(ConfigurationName)\IEDriverServer.exe
317+
copy /y "$(ProjectDir)..\..\..\build\cpp\Win32\$(ConfigurationName)\IEDriverServer.exe" "$(TargetDir)" &gt; NUL
318318
) else (
319-
echo Missing IE 32-bit native binary, copying from Win32 prebuilt location $(SolutionDir)cpp\prebuilt\Win32\Release\IEDriverServer.exe
320-
copy /y "$(SolutionDir)cpp\prebuilt\Win32\Release\IEDriverServer.exe" "$(TargetDir)" &gt; NUL
319+
echo Missing IE 32-bit native binary, copying from Win32 prebuilt location $(ProjectDir)..\..\..\cpp\prebuilt\Win32\Release\IEDriverServer.exe
320+
copy /y "$(ProjectDir)..\..\..\cpp\prebuilt\Win32\Release\IEDriverServer.exe" "$(TargetDir)" &gt; NUL
321321
)
322322
goto end
323323
)
324324
)
325325

326326
echo Detected 64-bit platform
327-
if exist "$(SolutionDir)build\cpp\x64\$(ConfigurationName)\IEDriverServer.exe" (
328-
echo Found IE 64-bit native binary, copying from x64 build target $(SolutionDir)build\cpp\x64\$(ConfigurationName)\IEDriverServer.exe
329-
copy /y "$(SolutionDir)build\cpp\x64\$(ConfigurationName)\IEDriverServer.exe" "$(TargetDir)" &gt; NUL
327+
if exist "$(ProjectDir)..\..\..\build\cpp\x64\$(ConfigurationName)\IEDriverServer.exe" (
328+
echo Found IE 64-bit native binary, copying from x64 build target $(ProjectDir)..\..\..\build\cpp\x64\$(ConfigurationName)\IEDriverServer.exe
329+
copy /y "$(ProjectDir)..\..\..\build\cpp\x64\$(ConfigurationName)\IEDriverServer.exe" "$(TargetDir)" &gt; NUL
330330
) else (
331-
echo Missing IE 64-bit native binary, copying from x64 prebuilt location $(SolutionDir)cpp\prebuilt\x64\Release\IEDriverServer.exe
332-
copy /y "$(SolutionDir)cpp\prebuilt\x64\Release\IEDriverServer.exe" "$(TargetDir)" &gt; NUL
331+
echo Missing IE 64-bit native binary, copying from x64 prebuilt location $(ProjectDir)..\..\..\cpp\prebuilt\x64\Release\IEDriverServer.exe
332+
copy /y "$(ProjectDir)..\..\..\cpp\prebuilt\x64\Release\IEDriverServer.exe" "$(TargetDir)" &gt; NUL
333333
)
334334

335335
:end
336-
if exist $(SolutionDir)build\javascript\firefox-driver\webdriver.xpi (
337-
echo Copying Firefox extension from $(SolutionDir)build\javascript\firefox-driver\webdriver.xpi
338-
copy /y $(SolutionDir)build\javascript\firefox-driver\webdriver.xpi $(TargetDir) &gt; NUL
336+
if exist "$(ProjectDir)..\..\..\build\javascript\firefox-driver\webdriver.xpi" (
337+
echo Copying Firefox extension from $(ProjectDir)..\..\..\build\javascript\firefox-driver\webdriver.xpi
338+
copy /y "$(ProjectDir)..\..\..\build\javascript\firefox-driver\webdriver.xpi $(TargetDir)" &gt; NUL
339339
) else (
340-
echo WARN: No Firefox extension found at $(SolutionDir)build\javascript\firefox-driver\webdriver.xpi
340+
echo WARN: No Firefox extension found at $(ProjectDir)..\..\..\build\javascript\firefox-driver\webdriver.xpi
341341
)
342342

343-
echo Copying Firefox preferences file from $(SolutionDir)javascript\firefox-driver\webdriver.json
344-
copy /y $(SolutionDir)javascript\firefox-driver\webdriver.json $(TargetDir) &gt; NUL
343+
echo Copying Firefox preferences file from $(ProjectDir)..\..\..\javascript\firefox-driver\webdriver.json
344+
copy /y $(ProjectDir)..\..\..\javascript\firefox-driver\webdriver.json $(TargetDir) &gt; NUL
345345

346346
</PostBuildEvent>
347347
</PropertyGroup>

Diff for: dotnet/src/webdriverbackedselenium/Selenium.WebDriverBackedSelenium.csproj

+14-14
Original file line numberDiff line numberDiff line change
@@ -234,20 +234,20 @@
234234
</BootstrapperPackage>
235235
</ItemGroup>
236236
<PropertyGroup>
237-
<PostBuildEvent>copy /y "$(SolutionDir)java\client\src\org\openqa\selenium\internal\seleniumemulation\injectableSelenium.js" "$(TargetDir)"
238-
copy /y "$(SolutionDir)java\client\src\org\openqa\selenium\internal\seleniumemulation\htmlutils.js" "$(TargetDir)"
239-
if exist $(SolutionDir)build\javascript\selenium-atoms\findElement.js copy /y $(SolutionDir)build\javascript\selenium-atoms\findElement.js $(TargetDir)
240-
if exist $(SolutionDir)build\javascript\selenium-atoms\findOption.js copy /y $(SolutionDir)build\javascript\selenium-atoms\findOption.js $(TargetDir)
241-
if exist $(SolutionDir)build\javascript\selenium-atoms\fireEvent.js copy /y $(SolutionDir)build\javascript\selenium-atoms\fireEvent.js $(TargetDir)
242-
if exist $(SolutionDir)build\javascript\selenium-atoms\fireEventAt.js copy /y $(SolutionDir)build\javascript\selenium-atoms\fireEventAt.js $(TargetDir)
243-
if exist $(SolutionDir)build\javascript\selenium-atoms\getAttribute.js copy /y $(SolutionDir)build\javascript\selenium-atoms\getAttribute.js $(TargetDir)
244-
if exist $(SolutionDir)build\javascript\selenium-atoms\getText.js copy /y $(SolutionDir)build\javascript\selenium-atoms\getText.js $(TargetDir)
245-
if exist $(SolutionDir)build\javascript\selenium-atoms\linkLocator.js copy /y $(SolutionDir)build\javascript\selenium-atoms\linkLocator.js $(TargetDir)
246-
if exist $(SolutionDir)build\javascript\selenium-atoms\isElementPresent.js copy /y $(SolutionDir)build\javascript\selenium-atoms\isElementPresent.js $(TargetDir)
247-
if exist $(SolutionDir)build\javascript\selenium-atoms\isSomethingSelected.js copy /y $(SolutionDir)build\javascript\selenium-atoms\isSomethingSelected.js $(TargetDir)
248-
if exist $(SolutionDir)build\javascript\selenium-atoms\isTextPresent.js copy /y $(SolutionDir)build\javascript\selenium-atoms\isTextPresent.js $(TargetDir)
249-
if exist $(SolutionDir)build\javascript\selenium-atoms\isVisible.js copy /y $(SolutionDir)build\javascript\selenium-atoms\isVisible.js $(TargetDir)
250-
if exist $(SolutionDir)build\javascript\selenium-atoms\type.js copy /y $(SolutionDir)build\javascript\selenium-atoms\type.js $(TargetDir)
237+
<PostBuildEvent>copy /y "$(ProjectDir)..\..\..\java\client\src\com\thoughtworks\selenium\webdriven\injectableSelenium.js" "$(TargetDir)"
238+
copy /y "$(ProjectDir)..\..\..\java\client\src\com\thoughtworks\selenium\webdriven\htmlutils.js" "$(TargetDir)"
239+
if exist $(ProjectDir)..\..\..\build\javascript\selenium-atoms\findElement.js copy /y $(ProjectDir)..\..\..\build\javascript\selenium-atoms\findElement.js $(TargetDir)
240+
if exist $(ProjectDir)..\..\..\build\javascript\selenium-atoms\findOption.js copy /y $(ProjectDir)..\..\..\build\javascript\selenium-atoms\findOption.js $(TargetDir)
241+
if exist $(ProjectDir)..\..\..\build\javascript\selenium-atoms\fireEvent.js copy /y $(ProjectDir)..\..\..\build\javascript\selenium-atoms\fireEvent.js $(TargetDir)
242+
if exist $(ProjectDir)..\..\..\build\javascript\selenium-atoms\fireEventAt.js copy /y $(ProjectDir)..\..\..\build\javascript\selenium-atoms\fireEventAt.js $(TargetDir)
243+
if exist $(ProjectDir)..\..\..\build\javascript\selenium-atoms\getAttribute.js copy /y $(ProjectDir)..\..\..\build\javascript\selenium-atoms\getAttribute.js $(TargetDir)
244+
if exist $(ProjectDir)..\..\..\build\javascript\selenium-atoms\getText.js copy /y $(ProjectDir)..\..\..\build\javascript\selenium-atoms\getText.js $(TargetDir)
245+
if exist $(ProjectDir)..\..\..\build\javascript\selenium-atoms\linkLocator.js copy /y $(ProjectDir)..\..\..\build\javascript\selenium-atoms\linkLocator.js $(TargetDir)
246+
if exist $(ProjectDir)..\..\..\build\javascript\selenium-atoms\isElementPresent.js copy /y $(ProjectDir)..\..\..\build\javascript\selenium-atoms\isElementPresent.js $(TargetDir)
247+
if exist $(ProjectDir)..\..\..\build\javascript\selenium-atoms\isSomethingSelected.js copy /y $(ProjectDir)..\..\..\build\javascript\selenium-atoms\isSomethingSelected.js $(TargetDir)
248+
if exist $(ProjectDir)..\..\..\build\javascript\selenium-atoms\isTextPresent.js copy /y $(ProjectDir)..\..\..\build\javascript\selenium-atoms\isTextPresent.js $(TargetDir)
249+
if exist $(ProjectDir)..\..\..\build\javascript\selenium-atoms\isVisible.js copy /y $(ProjectDir)..\..\..\build\javascript\selenium-atoms\isVisible.js $(TargetDir)
250+
if exist $(ProjectDir)..\..\..\build\javascript\selenium-atoms\type.js copy /y $(ProjectDir)..\..\..\build\javascript\selenium-atoms\type.js $(TargetDir)
251251

252252
</PostBuildEvent>
253253
</PropertyGroup>

0 commit comments

Comments
 (0)