Skip to content

Commit

Permalink
[GR-52403] Update Windows installation guide to be compatible with Gr…
Browse files Browse the repository at this point in the history
…aalVM for JDK 22

PullRequest: graal/17335
  • Loading branch information
olyagpl committed Apr 7, 2024
2 parents 5ac4fcd + 19ab773 commit 3e9ab2b
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 34 deletions.
30 changes: 15 additions & 15 deletions docs/getting-started/graalvm-community/windows.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,36 +48,36 @@ Repeat the same for the `PATH` environment variable.

## Prerequisites for Native Image on Windows

On Windows, Native Image requires Visual Studio and Microsoft Visual C++(MSVC).
You can use Visual Studio 2022 version 17.1.0 or later.
On Windows, Native Image requires Visual Studio and Microsoft Visual C++(MSVC).
Use **Visual Studio 2022 version 17.6.0 or later**.

### Install Visual Studio Build Tools and Windows SDK

1. Download the Visual Studio Build Tools (C development environment) from [visualstudio.microsoft.com](https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=BuildTools&rel=16){:target="_blank"}.
1. Download the Visual Studio Build Tools 2022 or later (C development environment) from [visualstudio.microsoft.com](https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=BuildTools&rel=16){:target="_blank"}.

2. Start the Visual Studio Build Tools installation by clicking on the _.exe_ file, and then press Continue:
2. Start the installation by opening the file you downloaded, and then click **Continue**:

![Install Visual Studio Build Tools](../img/visual_studio_installer.png)

3. Check the **Desktop development with C++** box in the main window. Also, on the right side under Installation Details, choose **Windows SDK**, and click the Install button.
3. Select the **Desktop development with C++** checkbox in the main window. On the right side under Installation Details, make sure that the two requirements, **Windows 11 SDK** and **MSVC (...) C++ x64/x86 build tools**, are selected. Continue by clicking **Install**.

![Select Desktop development with C++](../img/desktop_development_with_C.png)

4. After the installation completes, reboot your system.
You should now be able to build with GraalVM Native Image.

5. Next ensure Windows SDK is indeed available. Open the Visual Studio Installer:
### Checking Existing Visual Studio Installations

![Open the Visual Studio Installer](../img/open_vs_installer.png)
If Visual Studio is already installed on your system, follow these steps to check that the correct components are installed.

1. Open the Visual Studio Installer:

6. Under the Installed tab, click Modify and choose Individual Components:
![Open the Visual Studio Installer](../img/open_vs_installer.png)

![Visual Studio Installed Components](../img/visual-studio-installed-components.png)
2. Under the Installed tab, click **Modify** and choose **Individual Components**:

7. Then scroll to the bottom and check if Windows SDK is installed and confirm the build tools are checked:

![Windows SDK Installed](../img/windows-10-installed.png)
![Visual Studio Installed Components](../img/visual-studio-installed-components-modify.png)

Now that you have the Windows SDK and Visual Studio tooling installed, you can start using GraalVM Native Image.
3. Then scroll to the bottom and confirm that the Windows 11 SDK and Visual Studio SDK checkboxes are selected. Now you can start using Native Image.

### Start Using Native Image

Expand All @@ -99,4 +99,4 @@ To build a project using the [Native Build Tools Gradle plugin](https://graalvm.
gradlew.bat nativeCompile
```

This guide was written for Windows 10, but should be valid for Windows 8 and 11.
This guide was written for Windows 11, but should be valid for Windows 8 and 10.
30 changes: 15 additions & 15 deletions docs/getting-started/graalvm-enterprise/windows.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,36 +46,36 @@ Repeat the same for the `PATH` environment variable.

## Prerequisites for Native Image on Windows

On Windows, Native Image requires Visual Studio and Microsoft Visual C++(MSVC).
You can use Visual Studio 2022 version 17.1.0 or later.
On Windows, Native Image requires Visual Studio and Microsoft Visual C++(MSVC).
Use **Visual Studio 2022 version 17.6.0 or later**.

### Install Visual Studio Build Tools and Windows SDK

1. Download the Visual Studio Build Tools (C development environment) from [visualstudio.microsoft.com](https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=BuildTools&rel=16){:target="_blank"}.
1. Download the Visual Studio Build Tools 2022 or later (C development environment) from [visualstudio.microsoft.com](https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=BuildTools&rel=16){:target="_blank"}.

2. Start the Visual Studio Build Tools installation by clicking on the _.exe_ file, and then press Continue:
2. Start the installation by clicking on the _.exe_ file, and then click Continue:

![Install Visual Studio Build Tools](../img/visual_studio_installer.png)

3. Check the **Desktop development with C++** box in the main window. Also, on the right side under Installation Details, choose **Windows SDK**, and click the Install button.
3. Select the **Desktop development with C++** check box in the main window. On the right side under Installation Details, make sure that the two requirements, **Windows 11 SDK** and **MSVC (...) C++ x64/x86 build tools**, are selected. Continue by clicking Install.

![Select Desktop development with C++](../img/desktop_development_with_C.png)

4. After the installation completes, reboot your system.
You should now be able to build with GraalVM Native Image.

5. Next ensure Windows SDK is indeed available. Open the Visual Studio Installer:
### Checking Existing Visual Studio Installations

![Open the Visual Studio Installer](../img/open_vs_installer.png)
If Visual Studio is already installed on your system, follow these steps to check that the right components are installed.

1. Open the Visual Studio Installer:

6. Under the Installed tab, click Modify and choose Individual Components:
![Open the Visual Studio Installer](../img/open_vs_installer.png)

![Visual Studio Installed Components](../img/visual-studio-installed-components.png)
2. Under the Installed tab, click Modify and choose Individual Components:

7. Then scroll to the bottom and check if Windows SDK is installed and confirm the build tools are checked:

![Windows SDK Installed](../img/windows-10-installed.png)
![Visual Studio Installed Components](../img/visual-studio-installed-components-modify.png)

Now that you have the Windows SDK and Visual Studio tooling installed, you can start using Oracle GraalVM Native Image.
3. Then scroll to the bottom and confirm that Windows 11 SDK and Visual Studio SDK are checked. Now you can start using Native Image.

### Start Using Native Image

Expand All @@ -97,4 +97,4 @@ To build a project using the [Native Build Tools Gradle plugin](https://graalvm.
gradlew.bat nativeCompile
```

This guide was written for Windows 10, but should be valid for Windows 8 and 11.
This guide was written for Windows 11, but should be valid for Windows 8 and 10.
Binary file modified docs/getting-started/img/desktop_development_with_C.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file removed docs/getting-started/img/windows-10-installed.png
Binary file not shown.
8 changes: 4 additions & 4 deletions docs/reference-manual/native-image/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,13 @@ xcode-select --install
#### Windows
To use Native Image on Windows, install [Visual Studio 2022](https://visualstudio.microsoft.com/vs/) version 17.1.0 or later, and Microsoft Visual C++ (MSVC). There are two installation options:
* Install the Visual Studio Build Tools with the Windows 10 or later SDK
* Install Visual Studio with the Windows 10 or later SDK
To use Native Image on Windows, install [Visual Studio 2022](https://visualstudio.microsoft.com/vs/) version 17.6.0 or later, and Microsoft Visual C++ (MSVC). There are two installation options:
* Install the Visual Studio Build Tools with the Windows 11 SDK (or later version)
* Install Visual Studio with the Windows 11 SDK (or later version)
Native Image runs in both a PowerShell or Command Prompt and will automatically set up build environments on Windows, given that it can find a suitable Visual Studio installation.
For more information, see [Using GraalVM and Native Image on Windows 10](https://medium.com/graalvm/using-graalvm-and-native-image-on-windows-10-9954dc071311). -->
For more information, see [Using GraalVM and Native Image on Windows](https://medium.com/graalvm/using-graalvm-and-native-image-on-windows-10-9954dc071311). -->

## Build a Native Executable

Expand Down

0 comments on commit 3e9ab2b

Please sign in to comment.