Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Compile SWT natives for Windows on Arm64 (WoA).
This commit mainly contains changes to the build.bat file, to support compiling the SWT natives for the WoA platform. On a WoA box, run the following commands to produce the SWT natives (swt*.dll) for WoA: cd binaries\org.eclipse.swt.win32.win32.aarch64 mvn clean process-resources -Dnative=win32.win32.aarch64 and the swt*.dll files for WoA will be created in the current directory. (Similarly, to recompile the existing SWT x64 natives, run the following commands on an x64 box: cd binaries\org.eclipse.swt.win32.win32.x86_64 mvn clean process-resources -Dnative=win32.win32.x86_64 ) Cross-compiling between the x64 and Arm64 platforms, where either of them can be host or target, is also possible, after setting up the TARGET_ARCH environment variable with correct target architecture value, and with the SWT_JAVA_HOME property pointing to an available JDK of the target architecture. For example, to cross-compile on an x64 host and produce SWT natives for Arm64 target, run the following commands: set TARGET_ARCH=arm64 cd binaries\org.eclipse.swt.win32.win32.aarch64 mvn clean process-resources -Dnative=win32.win32.aarch64 -DSWT_JAVA_HOME=\path\to\arm64_jdk and the swt*.dll files for WoA will be created in the current directory. Note the above SWT_JAVA_HOME property in the command line which points to an available Arm64 JDK of the target architecture. Similarly, to cross-compile on an Arm64 host and produce SWT natives for x64 target, run the following commands: set TARGET_ARCH=x64 cd binaries\org.eclipse.swt.win32.win32.x86_64 mvn clean process-resources -Dnative=win32.win32.x86_64 -DSWT_JAVA_HOME=\path\to\x64_jdk and the swt*.dll files for x64 will be created in the current directory. For cross-compiling between x64 and Arm64 to work, install the MSVC compiler version 2022, with mandatory build tools for both platforms.
- Loading branch information
Showing
3 changed files
with
108 additions
and
6 deletions.
There are no files selected for viewing
34 changes: 34 additions & 0 deletions
34
binaries/org.eclipse.swt.win32.win32.aarch64/META-INF/MANIFEST.MF
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
Manifest-Version: 1.0 | ||
Fragment-Host: org.eclipse.swt;bundle-version="[3.125.0,4.0.0)" | ||
Bundle-Name: %fragmentName | ||
Bundle-Vendor: %providerName | ||
Bundle-SymbolicName: org.eclipse.swt.win32.win32.aarch64; singleton:=true | ||
Bundle-Version: 3.125.0.qualifier | ||
Bundle-ManifestVersion: 2 | ||
Bundle-Localization: fragment | ||
Export-Package: | ||
org.eclipse.swt, | ||
org.eclipse.swt.accessibility, | ||
org.eclipse.swt.awt, | ||
org.eclipse.swt.browser, | ||
org.eclipse.swt.custom, | ||
org.eclipse.swt.dnd, | ||
org.eclipse.swt.events, | ||
org.eclipse.swt.graphics, | ||
org.eclipse.swt.layout, | ||
org.eclipse.swt.opengl, | ||
org.eclipse.swt.printing, | ||
org.eclipse.swt.program, | ||
org.eclipse.swt.widgets, | ||
org.eclipse.swt.internal; x-friends:="org.eclipse.ui", | ||
org.eclipse.swt.internal.image; x-internal:=true, | ||
org.eclipse.swt.ole.win32, | ||
org.eclipse.swt.internal.gdip; x-internal:=true, | ||
org.eclipse.swt.internal.ole.win32; x-internal:=true, | ||
org.eclipse.swt.internal.win32; x-internal:=true, | ||
org.eclipse.swt.internal.opengl.win32; x-internal:=true | ||
Eclipse-PlatformFilter: (& (osgi.ws=win32) (osgi.os=win32) (osgi.arch=aarch64)) | ||
SWT-WS: win32 | ||
SWT-OS: win32 | ||
SWT-Arch: aarch64 | ||
Automatic-Module-Name: org.eclipse.swt.win32.win32.aarch64 |
40 changes: 40 additions & 0 deletions
40
binaries/org.eclipse.swt.win32.win32.aarch64/build.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
############################################################################### | ||
# Copyright (c) 2023, 2024 Tue Ton and others. | ||
# All rights reserved. This program and the accompanying materials | ||
# are made available under the terms of the Eclipse Public License v1.0 | ||
# which accompanies this distribution, and is available at | ||
# http://www.eclipse.org/legal/epl-v10.html | ||
# | ||
# Contributors: | ||
# Tue Ton - initial API and implementation | ||
# Hannes Wellmann - Leverage Tycho pomless | ||
############################################################################### | ||
custom = true | ||
bin.includes = .,*.dll,about_files/,about.html,fragment.properties | ||
bin.excludes = library/ | ||
source.. = \ | ||
../../bundles/org.eclipse.swt/Eclipse SWT/win32,\ | ||
../../bundles/org.eclipse.swt/Eclipse SWT/common,\ | ||
../../bundles/org.eclipse.swt/Eclipse SWT PI/common,\ | ||
../../bundles/org.eclipse.swt/Eclipse SWT PI/win32,\ | ||
../../bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32,\ | ||
../../bundles/org.eclipse.swt/Eclipse SWT Accessibility/win32,\ | ||
../../bundles/org.eclipse.swt/Eclipse SWT Accessibility/common,\ | ||
../../bundles/org.eclipse.swt/Eclipse SWT AWT/win32,\ | ||
../../bundles/org.eclipse.swt/Eclipse SWT AWT/common,\ | ||
../../bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32,\ | ||
../../bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/common,\ | ||
../../bundles/org.eclipse.swt/Eclipse SWT Printing/win32,\ | ||
../../bundles/org.eclipse.swt/Eclipse SWT Printing/common,\ | ||
../../bundles/org.eclipse.swt/Eclipse SWT Program/win32,\ | ||
../../bundles/org.eclipse.swt/Eclipse SWT Program/common,\ | ||
../../bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common,\ | ||
../../bundles/org.eclipse.swt/Eclipse SWT Browser/common,\ | ||
../../bundles/org.eclipse.swt/Eclipse SWT Browser/win32,\ | ||
../../bundles/org.eclipse.swt/Eclipse SWT OpenGL/win32,\ | ||
../../bundles/org.eclipse.swt/Eclipse SWT OpenGL/common | ||
src.includes = about.html,about_files/ | ||
|
||
pom.model.property.os=win32 | ||
pom.model.property.ws=win32 | ||
pom.model.property.arch=aarch64 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters