Setting SWT windows native build setup
Software needed for setting up windows native build
-
Microsoft 'Visual Studio - Community 2022' and 'Windows 10 SDK', link to download page
- Run the web installer.
- Go to "Desktop development with C++".
- Select/turn the check-box ON for below items from the list:
- MSVC v143 - VS 2022 C++ x64/x86 tools(Latest)
- Windows 10 SDK (10.0.19041.0) for Desktop C++
Note: [Version numbers (v141, 10.0.19041.0) mentioned above get revised as per latest Microsoft 'Visual Studio' update.]
-
JDK11 64bit link to Oracle JDK or IBM JDK
- Cygwin [Optional for local setup]
Note: [Eclipse SWT Windows build scripts upgraded to latest "Win10 SDK" and "Visual Studio 2022" via bugzilla bug 578519]
Steps to set up Windows native build:
- [Optional for local setup] Install and configure Cygwin SSH Server on Windows.
Note: Make sure 'openssh' package is also installed.
For more details on how to configuring SSH refer: link
- [Optional for local setup] Configure the machine for password-less SSH authentication with the build machine.
Sharing some key steps below(which I recall):
-
Generate the 'dsa' public/private key from your "swtbuild" account from windows machine.
-
Now login to the build machine with "swtbuild" account.
-
Copy the public keys and register then on the build machine.. this should enable password-less authentication.
-
-
'SWT_BUILDDIR' root directory contain various libraries like Visual Studio libraries, JDK, etc..
Setup your own 'SWT_BUILDDIR' with below like directory structure:
-
Install Visual Studio Community 2019 libraries in default location or in: 'SWT_BUILDDIR\Microsoft\Visual Studio\2019'
-
Windows10 SDK gets installed in "Program Files (x86)" directory by default like: 'C:\Program Files (x86)\Windows Kits\10'
-
Install/Unzip JDK8 64bit in 'SWT_BUILDDIR\Java\Oracle\jdk1.8.0-latest\x64'
-
-
For local testing, Run as Ant build below file with 'build_libraries' as target(assuming SWT setup is in place):
${workspace_loc:/org.eclipse.swt.win32.win32.x86_64/build.xml}
- [Optional for local setup] Now you can point the Windows build job to this machine and trigger a native build.
Note: For testing purpose from build machine, temporarily turn the nativeChanges flag to 'true' to force a native build compilation.