Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Windows on Arm64 (WoA). #559

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 13 additions & 1 deletion Jenkinsfile
Expand Up @@ -48,6 +48,18 @@ spec:

/** Returns the download URL of the JDK against whoose C headers (in the 'include/' folder) and native libaries the natives are compiled.*/
def getNativeJdkUrl(String os, String arch) { // To update the used JDK version update the URL template below
if('win32'.equals(os) && 'aarch64'.equals(arch)) {
// Temporary workaround until there are official Temurin GA releases for Windows on ARM that can be consumed through JustJ
dir("${WORKSPACE}/repackage-win32.aarch64-jdk") {
sh """
curl -L 'https://github.com/adoptium/temurin17-binaries/releases/download/jdk17u-2024-02-07-14-14-beta/OpenJDK17U-jdk_aarch64_windows_hotspot_2024-02-07-14-14.zip' > jdk.zip
unzip -q jdk.zip jdk-17.0.11+1/include/** jdk-17.0.11+1/lib/**
cd jdk-17.0.11+1
tar -czf ../jdk.tar.gz include/ lib/
"""
}
return "file://${WORKSPACE}/repackage-win32.aarch64-jdk/jdk.tar.gz"
}
return "https://download.eclipse.org/justj/jres/17/downloads/20230428_1804/org.eclipse.justj.openjdk.hotspot.jre.minimal.stripped-17.0.7-${os}-${arch}.tar.gz"
}

Expand Down Expand Up @@ -169,7 +181,7 @@ pipeline {
axes {
axis {
name 'PLATFORM'
values 'cocoa.macosx.aarch64' , 'cocoa.macosx.x86_64', 'gtk.linux.aarch64', 'gtk.linux.ppc64le', 'gtk.linux.x86_64', 'win32.win32.x86_64'
values 'cocoa.macosx.aarch64' , 'cocoa.macosx.x86_64', 'gtk.linux.aarch64', 'gtk.linux.ppc64le', 'gtk.linux.x86_64', 'win32.win32.aarch64', 'win32.win32.x86_64'
}
}
stages {
Expand Down
22 changes: 22 additions & 0 deletions bundles/org.eclipse.equinox.launcher.win32.win32.aarch64/.project
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>org.eclipse.equinox.launcher.win32.win32.aarch64</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
</natures>
</projectDescription>
@@ -0,0 +1,2 @@
eclipse.preferences.version=1
encoding/<project>=UTF-8
@@ -0,0 +1,10 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-Vendor: %providerName
Bundle-SymbolicName: org.eclipse.equinox.launcher.win32.win32.aarch64;singleton:=true
Bundle-Version: 1.2.1000.qualifier
Fragment-Host: org.eclipse.equinox.launcher;bundle-version="[1.5.0,1.7.0)"
Eclipse-PlatformFilter: (& (osgi.ws=win32) (osgi.os=win32) (osgi.arch=aarch64))
Bundle-Localization: launcher.win32.win32.aarch64
Eclipse-BundleShape: dir
@@ -0,0 +1,36 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>About</title>
</head>
<body lang="EN-US">
<h2>About This Content</h2>

<p>November 30, 2017</p>
<h3>License</h3>

<p>
The Eclipse Foundation makes available all content in this plug-in
(&quot;Content&quot;). Unless otherwise indicated below, the Content
is provided to you under the terms and conditions of the Eclipse
Public License Version 2.0 (&quot;EPL&quot;). A copy of the EPL is
available at <a href="http://www.eclipse.org/legal/epl-2.0">http://www.eclipse.org/legal/epl-2.0</a>.
For purposes of the EPL, &quot;Program&quot; will mean the Content.
</p>

<p>
If you did not receive this Content directly from the Eclipse
Foundation, the Content is being redistributed by another party
(&quot;Redistributor&quot;) and different terms and conditions may
apply to your use of any object code in the Content. Check the
Redistributor's license that was provided with the Content. If no such
license exists, contact the Redistributor. Unless otherwise indicated
below, the terms and conditions of the EPL still apply to any source
code in the Content and such source code may be obtained at <a
href="http://www.eclipse.org/">http://www.eclipse.org</a>.
</p>

</body>
</html>
@@ -0,0 +1,25 @@
###############################################################################
# Copyright (c) 2023, 2024 Eclipse Foundation.
#
# This program and the accompanying materials
# are made available under the terms of the Eclipse Public License 2.0
# which accompanies this distribution, and is available at
# https://www.eclipse.org/legal/epl-2.0/
#
# SPDX-License-Identifier: EPL-2.0
#
# Contributors:
# Tue Ton - initial API and implementation
###############################################################################
bin.includes = META-INF/,\
launcher.win32.win32.aarch64.properties,\
about.html

generateSourceBundle=false
binaryTag=LBv1-1901

# Maven properties, see https://github.com/eclipse/tycho/wiki/Tycho-Pomless
tycho.pomless.parent = ../../launcher-binary-parent
pom.model.property.os = win32
pom.model.property.ws = win32
pom.model.property.arch = aarch64
@@ -0,0 +1,15 @@
###############################################################################
# Copyright (c) 2023, 2024 Eclipse Foundation.
#
# This program and the accompanying materials
# are made available under the terms of the Eclipse Public License 2.0
# which accompanies this distribution, and is available at
# https://www.eclipse.org/legal/epl-2.0/
#
# SPDX-License-Identifier: EPL-2.0
#
# Contributors:
# Tue Ton - initial API and implementation
###############################################################################
pluginName = Equinox Launcher Win32 Arm64 Fragment
providerName = Eclipse.org - Equinox
Expand Up @@ -21,6 +21,9 @@ bin.includes = bin/,\
####Even though marked as custom, the content of the build.properties needs to be updated to ensure correctness of RCP app exported
#root.permissions.755=${launcherName}

root.win32.win32.aarch64=bin/win32/win32/aarch64
root.win32.win32.aarch64.permissions.755=launcher.exe

root.win32.win32.x86_64=bin/win32/win32/x86_64
root.win32.win32.x86_64.permissions.755=launcher.exe

Expand Down
7 changes: 7 additions & 0 deletions features/org.eclipse.equinox.executable.feature/feature.xml
Expand Up @@ -65,6 +65,13 @@
arch="x86_64"
version="0.0.0"/>

<plugin
id="org.eclipse.equinox.launcher.win32.win32.aarch64"
os="win32"
ws="win32"
arch="aarch64"
version="0.0.0"/>

<plugin
id="org.eclipse.equinox.launcher.win32.win32.x86_64"
os="win32"
Expand Down
Expand Up @@ -42,6 +42,31 @@ IF "%MSVC_EDITION%"=="" set "MSVC_EDITION=auto"
@rem Specify VisualStudio Version: '2022', '2019' etc.
IF "%MSVC_VERSION%"=="" set "MSVC_VERSION=auto"

@REM Compose host architecture string for MSVC
IF "%PROCESSOR_ARCHITECTURE%"=="AMD64" (
SET HOST_ARCH=x64
SET defaultOSArch=x86_64
) ELSE IF "%PROCESSOR_ARCHITECTURE%"=="ARM64" (
SET HOST_ARCH=arm64
SET defaultOSArch=aarch64
) ELSE (
CALL :ECHO "ERROR: Unknown host architecture: %PROCESSOR_ARCHITECTURE%."
EXIT /B 1
)

@REM %TARGET_ARCH% may be specified by the caller for cross-compiling.
@REM If not, build for builder machine's architecture
IF "%TARGET_ARCH%"=="" (
SET TARGET_ARCH=%HOST_ARCH%
)

@REM Compose build argument for MSVC
IF "%TARGET_ARCH%"=="%HOST_ARCH%" (
SET BUILD_ARCH=%TARGET_ARCH%
) ELSE (
SET BUILD_ARCH=%HOST_ARCH%_%TARGET_ARCH%
)

@rem Search for a usable Visual Studio
@rem ---------------------------------
IF "%MSVC_HOME%"=="" echo "'MSVC_HOME' was not provided, auto-searching for Visual Studio..."
Expand All @@ -58,14 +83,14 @@ IF EXIST "%MSVC_HOME%" (
echo " Refer steps for SWT Windows native setup: https://www.eclipse.org/swt/swt_win_native.php"
)
IF EXIST "%JAVA_HOME%" (
echo "JAVA_HOME x64: %JAVA_HOME%"
echo "JAVA_HOME 64-bit: %JAVA_HOME%"
) ELSE (
echo "WARNING: x64 Java JDK not found. Please set JAVA_HOME to your JDK directory."
echo "WARNING: 64-bit Java JDK not found. Please set JAVA_HOME to your JDK directory."
echo " Refer steps for SWT Windows native setup: https://www.eclipse.org/swt/swt_win_native.php"
)
set javaHome=%JAVA_HOME%
set makefile=make_win64.mak
call "%MSVC_HOME%\VC\Auxiliary\Build\vcvarsall.bat" x64
call "%MSVC_HOME%\VC\Auxiliary\Build\vcvarsall.bat" %BUILD_ARCH%

rem --------------------------
rem Define default values for environment variables used in the makefiles.
Expand All @@ -74,7 +99,6 @@ set programOutput=eclipse.exe
set programLibrary=eclipse.dll
set defaultOS=win32
set defaultWS=win32
set defaultOSArch=x86_64

rem --------------------------
rem Parse the command line arguments and override the default values.
Expand Down
15 changes: 15 additions & 0 deletions features/org.eclipse.equinox.executable.feature/pom.xml
Expand Up @@ -91,6 +91,20 @@
</execution>
</executions>
</plugin>
<!-- Temporary work-around until win32.win32.aarch64 environment is enabled in general. -->
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>target-platform-configuration</artifactId>
<configuration>
<environments combine.children="append">
<environment>
<os>win32</os>
<ws>win32</ws>
<arch>aarch64</arch>
</environment>
</environments>
</configuration>
</plugin>
</plugins>
</build>

Expand Down Expand Up @@ -125,6 +139,7 @@
<include name="gtk/linux/ppc64le/**/*"/>
<include name="gtk/linux/aarch64/**/*"/>
<include name="gtk/linux/x86_64/**/*"/>
<include name="win32/win32/aarch64/**/*"/>
<include name="win32/win32/x86_64/**/*"/>
</fileset>
</copy>
Expand Down
Expand Up @@ -17,6 +17,9 @@ custom = true
####Even though marked as custom, the content of the build.properties needs to be updated to ensure correctness of RCP app exported
root.permissions.755=${launcherName}

root.win32.win32.aarch64=file:bin/win32/win32/aarch64/launcher.exe
root.win32.win32.aarch64.permissions.755=launcher.exe

root.win32.win32.x86_64=file:bin/win32/win32/x86_64/launcher.exe
root.win32.win32.x86_64.permissions.755=launcher.exe

Expand Down
Expand Up @@ -48,6 +48,16 @@
<subant target="rootFiles${os}_${ws}_${arch}" buildpath="." failonerror="false" inheritall="true"/>
</target>

<target name="rootFileswin32_win32_aarch64">
<mkdir dir="${feature.base}/win32.win32.aarch64/${collectingFolder}"/>
<copy todir="${feature.base}/win32.win32.aarch64/${collectingFolder}" failonerror="true" overwrite="true">
<fileset dir="${basedir}/bin/win32/win32/aarch64">
<include name="launcher.exe"/>
</fileset>
</copy>
<chmod perm="755" dir="${feature.base}/win32.win32.aarch64/${collectingFolder}" includes="launcher.exe" />
</target>

<target name="rootFileswin32_win32_x86_64">
<mkdir dir="${feature.base}/win32.win32.x86_64/${collectingFolder}"/>
<copy todir="${feature.base}/win32.win32.x86_64/${collectingFolder}" failonerror="true" overwrite="true">
Expand Down Expand Up @@ -152,6 +162,7 @@
<chmod perm="755" dir="${feature.base}/hpux.gtk.ia64/${collectingFolder}" includes="launcher" />
</target>
<target name="rootFilesgroup_group_group">
<antcall target="rootFileswin32_win32_aarch64"/>
<antcall target="rootFileswin32_win32_x86_64"/>
<antcall target="rootFilesmacosx_cocoa_x86_64"/>
<antcall target="rootFileslinux_gtk_ppc64le"/>
Expand Down
1 change: 1 addition & 0 deletions pom.xml
Expand Up @@ -219,6 +219,7 @@
<module>bundles/org.eclipse.equinox.launcher.gtk.linux.aarch64</module>
<module>bundles/org.eclipse.equinox.launcher.gtk.linux.ppc64le</module>
<module>bundles/org.eclipse.equinox.launcher.gtk.linux.x86_64</module>
<module>bundles/org.eclipse.equinox.launcher.win32.win32.aarch64</module>
<module>bundles/org.eclipse.equinox.launcher.win32.win32.x86_64</module>
<module>bundles/org.eclipse.equinox.launcher.tests</module>

Expand Down