Skip to main content

Setting SWT windows native build setup

Software needed for setting up windows native build

  1. Microsoft 'Visual Studio - Community 2017' and 'Windows 10 SDK', link to download page

  2. JDK8 64bit and 32bit, link to Oracle JDK or IBM JDK

  3. Webkit SDKs:

    1. WebKit-r72896

    2. WebKitSupportLibrary

    Disclaimer:

    Note these Webkit SDKs are an older version being consumed by SWT native build process and Webkit build binaries are no more available for download in public Webkit download page.

    But WebKit-r72896 sources are still avilable for download in public main link and also on backup link.

  4. Cygwin [Optional for local setup]

Note: [Moved to latest "Win10 SDK" and "Visual Studio 2017 community edition" via bugzilla bug 526802]

Steps to set up Windows native build:

  1. [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

  2. [Optional for local setup] Configure the machine for password-less SSH authentication with the Hudson machine.

    For more details you can refer: public guide

    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 Hudson machine with "swtbuild" account.

    • Copy the public keys and register then on the Hudson machine.. this should enable password-less authentication.

  3. 'SWT_BUILDDIR' root directory contain various libraries like Visual Studio libraries, JDK and libraries for compiling Webkit etc..

    Setup your own 'SWT_BUILDDIR' with below like directory structure:

    • Install Visual Studio Community 2017 libraries in default location or in: 'SWT_BUILDDIR\Microsoft\Visual Studio\2017'

    • Windows10 SDK gets installed in "Program Files (x86)" directory by default like: 'C:\Program Files (x86)\Windows Kits\10'

    • Unzip the two Webkit SDKs into 'SWT_BUILDDIR\Webkit' as below directories:

      1. 'SWT_BUILDDIR\Webkit\r72896'

      2. 'SWT_BUILDDIR\Webkit\SupportLibrary'

      Note: SWT's Webkit support exists for SWT 32bit on Windows, so Webkit SDKs are consumed only by the SWT 32bit build process.

    • Install/Unzip JDK8 64bit in 'SWT_BUILDDIR\Java\Oracle\jdk1.8.0-latest\x64'

    • Install/Unzip JDK8 32bit in 'SWT_BUILDDIR\Java\Oracle\jdk1.8.0-latest\x86'

  4. 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}

    For building windows native build for 32bit, you need to convert the source to 32bit first, by running 'replace.64.to.32' target

    Once sources are converted to 32bit you can run the 'build_libraries' target for ${workspace_loc:/org.eclipse.swt.win32.win32.x86/build.xml}

  5. [Optional for local setup] Now you can point the Windows hudson job to this machine and trigger a native build.

    Note: For testing purpose from hudson, temporarily turn the nativeChanges flag to 'true' to force a native build compilation.

Back to the top