JDK-8264219 : tools/scripts/build.ps1 is out of date and no longer works
  • Type: Bug
  • Component: javafx
  • Sub-Component: build
  • Affected Version: openjfx17
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2021-03-25
  • Updated: 2021-06-01
  • Resolved: 2021-05-18
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
openjfx17Fixed
Related Reports
Relates :  
Relates :  
Description
A comment was added to PR #212 [1], which was the review for JDK-8242508 to update the JavaFX build to use Visual Studio 2019 (from 2017), to the effect that the tools/scripts/build.ps1 script no longer works.

That script still attempts to install and use the VS 2017 tool chain, which may not work properly. We do not use or reference that script at all. It used to be used in our old sandbox repo when running AppVeyor builds on GItHub, and also some developers may be using it (at least the one who added the comment to the PR).

The comment lists three problems:

1. Build script located in tools/scripts needs to be updated [to use VS 2019]

2. Build fails with `FAIL: WINSDK_DIR not defined`

3. It's not possible to install Windows SDK 7.1 on Windows 10

The dependency on Windows SDK 7.1 has been eliminated, so that should just be removed from the script. Given the fix for JDK-8255713 it probably wouldn't be too hard for someone to update the script to use VS 2019 and get this working again.

[1] https://github.com/openjdk/jfx/pull/212#issuecomment-790105330
Comments
Changeset: 485b242d Author: Kevin Rushforth <kcr@openjdk.org> Date: 2021-05-18 17:50:56 +0000 URL: https://git.openjdk.java.net/jfx/commit/485b242d5993024e5e2b7dcf8d306e0a889ce07e
18-05-2021

I agree with this. Given that we don't use it, it isn't surprising that it has bit-rotted. The best solution for this bug is to remove the obsolete tools/scripts/build.ps1 script.
07-05-2021

Since the script does not seem to be working, but especially since it is not required (we don't use it to build), I believe it is better to remove it from the repository rather than trying to maintain it (now and then). This still allows others in the wider community to create a repository with this and similar scripts.
07-05-2021

The attachments were deleted per request.
03-05-2021

> Is it your three attachments on this JBS issue (JDK-8264219) that you want me to delete? Yes, I already copied the files to the two new bug reports listed in my previous comment. They don't belong on this bug report anymore. Thank you, Kevin.
03-05-2021

[~jgneff] The problem with not being able to delete attachments is a known issue. I can delete them if you would like. Is it your three attachments on this JBS issue (JDK-8264219) that you want me to delete?
03-05-2021

I created two separate bug reports for the issues in my previous comment: JDK-8266396 - Fix Windows build error: WINSDK_DIR not defined JDK-8266405 - Fix CMake Generator error building Windows WebKit I'm unable to delete my attachments to this bug report, though. I get a Communications Breakdown error: "The Jira server was contacted but has returned an error response. We are unsure of the result of this operation." I'll keep trying.
01-05-2021

In addition to working around the WINSDK_DIR error, I had to patch the file 'modules/javafx.web/src/main/native/Tools/Scripts/webkitdirs.pm' to build WebKit on Windows with Visual Studio 2019. See the attached file 'webkitdirs.pm.patch' for my temporary fix. My work-around for the WINSDK_DIR error is attached as the file 'windows_tools.properties' and an easier-to-read version called 'windows_tools.properties.txt'. The file must be moved to the location 'build/windows_tools.properties' before each build.
14-04-2021

[~jgneff] Can you file a new bug for the WebKit build issue? Getting that fixed seems like a good thing, and it isn't really related to tools/scripts/build.ps1 (which we are unlikely to fix).
14-04-2021

Given that we don't use this tool, and I don't have a good way to test it, I will leave it for someone in the community to do this.
25-03-2021