[tools] MSVC environment loader, POSIX vulkan/MSVC install scripts #2993

Merged
MaranBr merged 25 commits from DraVee/eden:docs/update-win into master 2025-11-15 17:53:14 +01:00
Member
  • also move install-vulkan-sdk.ps1 to tools
* also move install-vulkan-sdk.ps1 to tools
DraVee changed title from WIP: Add "Convenience tool for loading MSVC envirroment" to WIP: [chore] Add "Convenience tool for loading MSVC envirroment" 2025-11-10 00:40:55 +01:00
DraVee changed title from WIP: [chore] Add "Convenience tool for loading MSVC envirroment" to [chore] Add "Convenience tool for loading MSVC envirroment" 2025-11-11 00:36:38 +01:00
DraVee changed title from [chore] Add "Convenience tool for loading MSVC envirroment" to WIP: [chore] Add "Convenience tool for loading MSVC envirroment" 2025-11-11 03:26:24 +01:00
DraVee changed title from WIP: [chore] Add "Convenience tool for loading MSVC envirroment" to [chore] Add "Convenience tool for loading MSVC envirroment" 2025-11-12 05:34:42 +01:00
Owner

While we're at it, might as well provide Git Bash versions

https://git.crueter.xyz/scripts/windev/src/branch/master/install.sh#L132
https://github.com/crueter-ci/FFmpeg/blob/master/tools/build.sh#L24

vulkan

: "${VULKAN_VER:=1.4.328.1}"
: "${VULKAN_ROOT:=C:/VulkanSDK/"$VULKAN_VER"}"
VULKAN_ROOT_UNIX=$(cygpath -u "$VULKAN_ROOT")

if [ -d "$VULKAN_ROOT_UNIX" ]; then
	echo "-- Vulkan SDK already installed"
	return
fi

echo "-- Installing Vulkan SDK..."
[ ! -f vulkan.exe ] && curl -L https://sdk.lunarg.com/sdk/download/$VULKAN_VER/windows/vulkan-sdk-windowxX64-$VULKAN_VER.exe -o vulkan.exe
./vulkan.exe --root "$VULKAN_ROOT" --accept-licenses --default-answer --confirm-command install

msvc, alternative(?)

# shellcheck disable=SC2154
CLPATH=$(cygpath -u "$VCToolsInstallDir\\bin\\Host${VSCMD_ARG_HOST_ARCH}\\${VSCMD_ARG_TGT_ARCH}")
export PATH="$CLPATH:$PATH"
While we're at it, might as well provide Git Bash versions https://git.crueter.xyz/scripts/windev/src/branch/master/install.sh#L132 https://github.com/crueter-ci/FFmpeg/blob/master/tools/build.sh#L24 vulkan ```sh : "${VULKAN_VER:=1.4.328.1}" : "${VULKAN_ROOT:=C:/VulkanSDK/"$VULKAN_VER"}" VULKAN_ROOT_UNIX=$(cygpath -u "$VULKAN_ROOT") if [ -d "$VULKAN_ROOT_UNIX" ]; then echo "-- Vulkan SDK already installed" return fi echo "-- Installing Vulkan SDK..." [ ! -f vulkan.exe ] && curl -L https://sdk.lunarg.com/sdk/download/$VULKAN_VER/windows/vulkan-sdk-windowxX64-$VULKAN_VER.exe -o vulkan.exe ./vulkan.exe --root "$VULKAN_ROOT" --accept-licenses --default-answer --confirm-command install ``` msvc, alternative(?) ```sh # shellcheck disable=SC2154 CLPATH=$(cygpath -u "$VCToolsInstallDir\\bin\\Host${VSCMD_ARG_HOST_ARCH}\\${VSCMD_ARG_TGT_ARCH}") export PATH="$CLPATH:$PATH" ```
DraVee changed title from [chore] Add "Convenience tool for loading MSVC envirroment" to WIP: [chore] Add "Convenience tool for loading MSVC envirroment" 2025-11-12 06:16:57 +01:00
DraVee force-pushed docs/update-win from afeeb5d02b
Some checks failed
eden-license / license-header (pull_request) Successful in 9m56s
GitHub Actions [CI] Build failed
to 7ac3f77b90
Some checks failed
eden-license / license-header (pull_request) Successful in 38s
GitHub Actions [CI] Build failed
2025-11-15 01:46:48 +01:00
Compare
DraVee force-pushed docs/update-win from 7ac3f77b90
Some checks failed
eden-license / license-header (pull_request) Successful in 38s
GitHub Actions [CI] Build failed
to 065b133b4b
Some checks reported errors
eden-license / license-header (pull_request) Successful in 38s
GitHub Actions [CI] Build cancelled
2025-11-15 03:24:24 +01:00
Compare
DraVee force-pushed docs/update-win from 157bfcf6d5
All checks were successful
eden-license / license-header (pull_request) Successful in 39s
GitHub Actions [CI] Build succeeded
GitHub Releases [CD] Build succeeded – Release published
to 6f60b0540e
All checks were successful
eden-license / license-header (pull_request) Successful in 38s
GitHub Actions [CI] Build succeeded
GitHub Releases [CD] Build succeeded – Release published
2025-11-15 04:35:01 +01:00
Compare
@ -0,0 +2,4 @@
# SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
# SPDX-License-Identifier: GPL-3.0-or-later
VCVARS_BASH_URL="https://github.com/Vee99BR/vcvars-bash/raw/refs/heads/main/vcvarsall.sh"
Author
Member

@crueter should we put it in-tree or clone to Eden-CI?

@crueter should we put it in-tree or clone to Eden-CI?
Owner

in-tree

in-tree
DraVee marked this conversation as resolved
DraVee changed title from WIP: [chore] Add "Convenience tool for loading MSVC envirroment" to [chore] Add "Convenience tool for loading MSVC envirroment" 2025-11-15 05:19:40 +01:00
crueter requested changes 2025-11-15 05:24:09 +01:00
Dismissed
docs/Deps.md Outdated
Owner

We can add KDevelop here

We can add KDevelop here
DraVee marked this conversation as resolved
@ -0,0 +25,4 @@
chmod +x "$DESTINATION"
echo "Finished downloading $EXE_FILE"
echo "Installing Vulkan SDK $VULKAN_SDK_VER..."
Owner

butwhy

butwhy
Author
Member

You need admin permissions to install Vulkan SDK, we can call PowerShell (another solution is just show an error)

You need admin permissions to install Vulkan SDK, we can call PowerShell (another solution is just show an error)
Owner

This has always worked for me without admin on Git Bash

This has always worked for me without admin on Git Bash
Author
Member

It fails cause we're writing to C:/ and don't show the real reason why it fails (just failed mkdir)

It fails cause we're writing to `C:/` and don't show the real reason why it fails (just failed mkdir)
Owner

uhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh try /c/VulkanSDK ????????????

uhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh try `/c/VulkanSDK` ????????????
crueter marked this conversation as resolved
@ -0,0 +28,4 @@
echo "Installing Vulkan SDK $VULKAN_SDK_VER..."
"$DESTINATION" --root "$VULKAN_ROOT_UNIX" --accept-licenses --default-answer --confirm-command install
echo "Finished installing Vulkan SDK $VULKAN_SDK_VER"
Owner

echo "-- message..."

`echo "-- message..."`
DraVee marked this conversation as resolved
@ -0,0 +4,4 @@
# shellcheck disable=SC2154
CLPATH=$(cygpath -u "$VCToolsInstallDir\\bin\\Host${VSCMD_ARG_HOST_ARCH}\\${VSCMD_ARG_TGT_ARCH}")
export PATH="$CLPATH:$PATH"
Owner

For this I kinda lied because you still need vswhere. This script specifically is getting cl.exe and link.exe into msys2

For this I kinda lied because you still need vswhere. This script specifically is getting cl.exe and link.exe into msys2
DraVee marked this conversation as resolved
crueter requested changes 2025-11-15 05:27:49 +01:00
Dismissed
crueter left a comment
Owner

ignore the other one, it got mangled

ignore the other one, it got mangled
docs/Build.md Outdated
@ -59,2 +62,4 @@
> - `tools/windows/load-msvc-env.ps1`
Availables `<GENERATOR>`:
- MSYS2: `MSYS Makefiles`
Owner

Available*

Available*
DraVee marked this conversation as resolved
docs/Build.md Outdated
@ -64,2 +69,3 @@
BUILD_TYPE should usually be `Release` or `RelWithDebInfo` (debug symbols--compiled executable will be large). If you are using a debugger and annoyed with stuff getting optimized out, try `Debug`.
Availables `<BUILD_TYPE>`:
- `Release` (default)
Owner

Available*

Available*
DraVee marked this conversation as resolved
docs/Build.md Outdated
@ -143,3 +150,4 @@
If you are using the `UNIX Makefiles` or `Visual Studio 17 2022` as `<GENERATOR>`, you must also want to add `--parallel $(nproc)` to this command to improve building time.
```
cmake --build build
Owner
you should also add `--parallel` for faster build times
``` you should also add `--parallel` for faster build times ```
DraVee marked this conversation as resolved
docs/Deps.md Outdated
@ -22,3 +25,3 @@
* On Linux, *BSD and macOS, this can be done by the package manager
- If you wish to use Qt Creator, append `qtcreator` or `qt-creator` to the commands seen below.
* MSVC/clang-cl users on Windows must install through the [official installer](https://www.qt.io/download-qt-installer-oss)
* MSVC/clang-cl users on Windows must install through the official [Qt 6](https://www.qt.io/download-qt-installer-oss) installer
Owner

kdevelop can be added here probably

kdevelop can be added here probably
Author
Member

Could be add in another occasion (I dont even use IDE)

Could be add in another occasion (I dont even use IDE)
DraVee marked this conversation as resolved
docs/Deps.md Outdated
@ -25,3 +27,4 @@
* MSVC/clang-cl users on Windows must install through the official [Qt 6](https://www.qt.io/download-qt-installer-oss) installer
* Linux and macOS users may choose to use the installer as well.
* MSYS2 can also install Qt 6 via the package manager
Owner

leave it as it was because this'll be valid for every future Qt version

leave it as it was because this'll be valid for every future Qt version
DraVee marked this conversation as resolved
@ -0,0 +25,4 @@
else
DESTINATION=$(cygpath -w "$PWD/$EXE_FILE")
powershell.exe -Command "
Start-Process \"$DESTINATION\" -Verb RunAs -ArgumentList @(
Owner

butwhy

butwhy
DraVee marked this conversation as resolved
crueter force-pushed docs/update-win from eab03dd1cb
Some checks failed
eden-license / license-header (pull_request) Successful in 41s
GitHub Actions [CI] Build failed
to 42ed048be7
All checks were successful
eden-license / license-header (pull_request) Successful in 38s
GitHub Actions [CI] Build succeeded
GitHub Releases [CD] Build succeeded – Release published
2025-11-15 08:19:02 +01:00
Compare
crueter approved these changes 2025-11-15 08:48:51 +01:00
crueter changed title from [chore] Add "Convenience tool for loading MSVC envirroment" to [tools] MSVC environment loader, POSIX vulkan/MSVC install scripts 2025-11-15 09:06:00 +01:00
MaranBr approved these changes 2025-11-15 17:53:07 +01:00
MaranBr merged commit 7e730a121b into master 2025-11-15 17:53:14 +01:00
Sign in to join this conversation.
No description provided.