mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-296416 WinShellIntegration: build for ARM64
GitOrigin-RevId: 1823d282d7dc9c0666828237adb60277cc73c81d
This commit is contained in:
committed by
intellij-monorepo-bot
parent
cad28570bc
commit
b5d107c9c8
@@ -12,20 +12,21 @@ Windows 8 and higher are supported.
|
||||
* C++17-compatible compiler;
|
||||
* [CMake](https://cmake.org/download/) >= `v3.15` (Note: it is already shipped with CLion);
|
||||
* [Optional: only for building [winshellintegrationbridge](src/winshellintegrationbridge) target]:
|
||||
An implementation of Java SE 11 or newer. It's highly recommended to use the JDK you are using to build IDEA.
|
||||
An implementation of Java SE 11 or newer. It's highly recommended to use the JDK you are using to build IntelliJ IDEA.
|
||||
|
||||
## Build
|
||||
Just use CMake normally.
|
||||
|
||||
If you want to build [winshellintegrationbridge](src/winshellintegrationbridge) target too
|
||||
you have to set the variable `JDK_PATH` to the path of JDK which will be used for build.
|
||||
path to a JDK is required. Build script will try to use `JDK_11_0_ARM64`, `JDK_11_0_X64` or `JDK_11_0` env variables depending on target architecture.
|
||||
However, if it fails, or if you want other JDK, you need to set the CMake variable `JDK_PATH` to the path of JDK which will be used for build.
|
||||
For example, if your `javac.exe` is located at `C:\Soft\jdk\bin\javac.exe` you should set the variable like
|
||||
`-DJDK_PATH="C:\Soft\jdk"`.
|
||||
|
||||
## Integration with CLion
|
||||
1. Configure the toolchain(s) (if you need help, please check [this guide](https://www.jetbrains.com/help/clion/quick-tutorial-on-configuring-clion-on-windows.html));
|
||||
2. Configure CMake profiles (if you need help, please check [this guide](https://www.jetbrains.com/help/clion/cmake-profile.html)).
|
||||
Don't forget to pass `JDK_PATH` variable (via `CMake options` field) if you want to build `winshellintegrationbridge` target.
|
||||
Optionally, pass `JDK_PATH` variable (via `CMake options` field) if you want to build `winshellintegrationbridge` target, see above.
|
||||
Also, you can set the root of each profile to [build](build) dir: it already has `.gitignore` file
|
||||
that will exclude everything under it.
|
||||
|
||||
|
||||
@@ -1,14 +1,27 @@
|
||||
# Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
# Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
|
||||
if (NOT JDK_PATH)
|
||||
message(SEND_ERROR "Path to the JDK is not specified. winshellintegrationbridge target will not be generated.")
|
||||
endif()
|
||||
include(CheckSymbolExists)
|
||||
check_symbol_exists("_M_ARM64" "" TARGET_ARM64)
|
||||
check_symbol_exists("_M_AMD64" "" TARGET_X64)
|
||||
|
||||
# output binary name
|
||||
if ("${CMAKE_SIZEOF_VOID_P}" STREQUAL "8")
|
||||
set(WSIBRIDGE_BINARY_NAME "WinShellIntegrationBridge64")
|
||||
if(TARGET_ARM64)
|
||||
set(WSIBRIDGE_BINARY_NAME "WinShellIntegrationBridge64a")
|
||||
set(JAVA_HOME $ENV{JDK_11_0_ARM64})
|
||||
elseif(TARGET_X64)
|
||||
set(WSIBRIDGE_BINARY_NAME "WinShellIntegrationBridge64")
|
||||
set(JAVA_HOME $ENV{JDK_11_0_x64})
|
||||
else()
|
||||
set(WSIBRIDGE_BINARY_NAME "WinShellIntegrationBridge")
|
||||
set(WSIBRIDGE_BINARY_NAME "WinShellIntegrationBridge")
|
||||
set(JAVA_HOME $ENV{JDK_11_0})
|
||||
endif()
|
||||
|
||||
if (NOT JDK_PATH)
|
||||
if (NOT JAVA_HOME)
|
||||
message(SEND_ERROR "Path to the JDK (JDK_PATH) is not specified, neither heuristics succeed. 'winshellintegrationbridge' target will not be generated.")
|
||||
else()
|
||||
set(JDK_PATH "${JAVA_HOME}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
configure_file("resources.rc.in" "${CMAKE_CURRENT_BINARY_DIR}/resources.rc" @ONLY)
|
||||
|
||||
@@ -3,6 +3,6 @@ JNI-Dll integrates native [winshellintegration](../winshellintegration) library
|
||||
|
||||
## Build dependencies
|
||||
* [winshellintegration](../winshellintegration) library;
|
||||
* An implementation of Java SE 11 or newer. It's highly recommended to use the JDK you are using to build IDEA;
|
||||
* An implementation of Java SE 11 or newer. It's highly recommended to use the JDK you are using to build IntelliJ IDEA;
|
||||
* C++17-compatible compiler;
|
||||
* [CMake](https://cmake.org/download/) >= `v3.15`.
|
||||
|
||||
Reference in New Issue
Block a user