Skip to content

feat: intelligent Qt toolchain kit selection and local install scripts - #4

Merged
FunToHard merged 5 commits into
mainfrom
feat/qt-toolchain-selection-and-install-scripts
Nov 7, 2026
Merged

FunToHard merged 5 commits into
mainfrom
feat/qt-toolchain-selection-and-install-scripts

Conversation

@FunToHard

Copy link
Copy Markdown
Contributor

Summary

1. Intelligent Qt Toolchain Kit Selection & Android Detection

  • Host Kit Prioritization: Resolves an issue where cross-compilation toolchains (such as \�ndroid_arm64_v8a) were selected over desktop kits (such as \mingw_64\ or \msvc2022_64) due to alphabetical sorting. Cross-compilation kits receive severe penalties unless targeting that specific platform.
  • Compiler Affinity: Detects the host compiler (MinGW vs MSVC vs Clang) from environment variables, workspace build artifacts (\CMakeCache.txt, .sln, .vcxproj, \compile_commands.json), and system PATH, scoring matching desktop Qt kits.
  • Target Platform Auto-Detection: Added \detectTargetPlatform\ to automatically discover Android Qt projects via \AndroidManifest.xml, \CMakeLists.txt\ (\CMAKE_SYSTEM_NAME Android), \CMakeCache.txt, and .pro/.pri\ files, properly selecting Android ABI kits when applicable.
  • Configuration Override: Added the \c-cpp-pro.discovery.qtToolchain\ setting to allow users to explicitly specify their preferred Qt kit subfolder (e.g. \mingw_64).
  • Documentation: Documented Qt toolchain auto-detection and configuration in \wiki/Compiler-Toolchain-Setup.md.

2. Local Extension Builder & Installer Scripts

  • Added cross-platform installation scripts in \scripts/:
    • \scripts/install.bat\ (Windows Command Prompt)
    • \scripts/install.ps1\ (PowerShell)
    • \scripts/install.sh\ (POSIX Bash / macOS / Linux)
  • Added \scripts/bump-version.js\ to automatically bump the extension patch version prior to packaging and installing, preventing VS Code from reusing cached extension bundles.
  • Added flag support for --no-bump\ / -NoBump\ and --skip-build\ / -SkipBuild.

Verification

  • Comprehensive code review completed with a clean PASS.
  • TypeScript typecheck (
    pm run check-types): 0 errors.
  • Unit test suite (
    pm test): 496 passing.
  • Strict No Emojis rule maintained across all code, comments, docs, and commit messages.

…ains

Resolves issue where Qt filesystem probing selected android_arm64_v8a over mingw_64 due to alphabetical ordering and unpenalized cross-compilation kits. Implements intelligent scoring favoring desktop toolchains matching active compiler (MinGW vs MSVC), adds automatic CMakeCache/workspace compiler inspection, purges obsolete cross-target Qt includes from .clangd, and adds c-cpp-pro.discovery.qtToolchain setting.
…ction

Adds detectTargetPlatform to automatically detect Qt Android projects via AndroidManifest.xml, CMakeLists.txt (CMAKE_SYSTEM_NAME Android, ANDROID_PACKAGE_SOURCE_DIR), CMakeCache.txt, and .pro files. Automatically routes Qt headers to android toolchains (with ABI matching for arm64-v8a vs x86_64) when targeting Android, while maintaining strict desktop prioritization for desktop projects. Also honors explicit preferredToolchain overrides.
… testing

Provides turnkey local development installation scripts that automate clean building, packaging, locating the latest VSIX artifact, and force-installing directly into VS Code (or code-insiders/codium).
@FunToHard
FunToHard merged commit ec7595d into main Nov 7, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant