...
- Cygwin. Some packages to make sure are installed are:
openssh
zip
unzip
make
(needed to compile media)makedepend
(needed for media)- Optional:
git
- Microsoft Visual Studio 2022. You can use the Enterprise, either Professional, or Community edition or the command line BuildTools. The
Desktop development with C++
workload is required at most, but it may be possible to install individual components to satisfy the requirements.
...
All commands on this page are ran run inside Cygwin (and not in Windows CMD).
You will likely The JavaFX build will automatically locate your Visual Studio installation, as long as you installed it in the default location. You no longer need to set the following any env variables to point to your VS 2022 installation, since Microsoft no longer sets such variables. This presumes that:
- You installed JDK N in
C:\Program Files\Java\jdk-N
where N is the JDK version. - You installed the Community edition of Visual Studio 2022 in
C:\Program Files\Microsoft Visual Studio\2022\Community
. If this isn't set correctly, you might see an error during the build saying thatvcvars32.bat
is missing.
You should adjust these as needed for your system.
Code Block |
---|
export VS150COMNTOOLS="C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Auxiliary\\Build"
export JAVA_HOME="C:/Program Files/Java/jdk-N"
|
Note the use of the double backslash in the VS150COMNTOOLS
env var. This is needed because the cygwin shell uses the '\' as an escape character. With JAVA_HOME
it is easier to just set it using forward slashes (although backslashes are fine as long as you escape them).
If these definitions aren't persisted between launches of Cygwin, you can either set them in the Windows Environment Variables UI or in the /home/$user$/.bash_profile
file (these are ran on startup). Use export -p
to verify that the env variables are set correctly.
Missing paths issue
The initial build process that generates the needed resources is done by the \buildSrc
folder. On Windows, it tries to locate all the needed tools and write their paths to the \build\windows_tools.properties
file. Sometimes it fails and the file is left blank, which results in various path-not-found errors, e.g., on WINSDK_DIR
. This means that you will have to define these paths manually. For your convenience, here is a ready file from Win10 with VS2019 Community edition. You will need to correct the user name and possibly the version numbers, but it should give an idea of what the build looks for:
...
title | windows_tools.properties |
---|---|
collapse | true |
...
unless you installed Visual Studio in a non-standard location, for example, the D:
drive instead of the default C:
drive.
Missing paths issue
The initial build process that generates the needed resources is done by the buildSrc
folder. On Windows, it tries to locate all the needed tools and write their paths to the build\windows_tools.properties
file. If it fails, the file is left blank, which results in a fatal error. In this case, define the VSCOMNTOOLS
variable (older versions of JavaFX used VS150COMNTOOLS
) to point to the VC\Auxiliary\Build
directory in your Visual studio Installation. For example, use the following if you installed Visual Studio 2022 on the D:
drive.
Code Block | ||||
---|---|---|---|---|
| ||||
export VSCOMNTOOLS="D:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Auxiliary\\Build" |
Note the use of the double backslash in the VSCOMNTOOLS
env var. This is needed because the cygwin shell uses the '\' as an escape character.
If these definitions aren't persisted between launches of Cygwin, you can either set them in the Windows Environment Variables UI or in the /home/$user$/.bash_profile
file (these are ran on startup). Use export -p
to verify that the env variables are set correctly.
...
Mac
You will need macOS 12 (Monterey) or later.
...