Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Initial project scaffold from auto-gen-py-project

[0.15.2]: https://github.com/axcel-blade/DevKit/releases/tag/v0.15.2
[0.15.1]: https://github.com/axcel-blade/DevKit/releases/tag/v0.15.1
[0.15.0]: https://github.com/axcel-blade/DevKit/releases/tag/v0.15.0
[0.14.0]: https://github.com/axcel-blade/DevKit/releases/tag/v0.14.0
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "devkit"
version = "0.15.1"
version = "0.15.2"
edition = "2021"
description = "DevKit application — install developer SDKs and configure environment variables"
license = "MIT"
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# DevKit

[![Version](https://img.shields.io/badge/version-0.15.1-blue.svg)](CHANGELOG.md)
[![Version](https://img.shields.io/badge/version-0.15.2-blue.svg)](CHANGELOG.md)
[![CI](https://github.com/axcel-blade/DevKit/actions/workflows/ci.yml/badge.svg)](https://github.com/axcel-blade/DevKit/actions/workflows/ci.yml)
[![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE.md)
[![Rust](https://img.shields.io/badge/rust-2021_edition-orange.svg?logo=rust)](https://www.rust-lang.org/)
Expand Down Expand Up @@ -31,7 +31,7 @@ Checking for available versions ...

DevKit
OS: Windows
Version: 0.15.1
Version: 0.15.2
# ID NAME STATUS INSTALLED AVAILABLE
--------------------------------------------------------------------------------------------------------
1 anaconda Anaconda not_installed - 2026.07-1
Expand Down
2 changes: 1 addition & 1 deletion SUPPORT.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

## What to include in a bug report

- DevKit version (`cargo run --release -- --version`) — current is **0.15.1**
- DevKit version (`cargo run --release -- --version`) — current is **0.15.2**
- OS and architecture
- Command you ran
- Full error output
Expand Down
77 changes: 71 additions & 6 deletions devkit.bat
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,15 @@ REM 1. Use Rust from the machine `dev` folder (`C:\dev\rust`, or DEVKIT_HOME\rus
REM If cargo is missing there, require an internet connection and install
REM rustup stable into that folder (same rustup-init flags as the rust
REM plugin: -y --no-modify-path).
REM 2. Rebuild the release binary (a no-op when it is already up to date), so
REM 2. Make sure the MSVC linker (link.exe from Visual Studio Build Tools with
REM the "Desktop development with C++" workload) is present. The msvc Rust
REM toolchain cannot link anything without it, and several dependencies
REM (ring, zstd-sys, lzma-sys, bzip2-sys) also need its C compiler. When
REM missing, install the Build Tools through winget, or through Microsoft's
REM vs_BuildTools.exe bootstrapper when winget is unavailable.
REM 3. Rebuild the release binary (a no-op when it is already up to date), so
REM a stale binary from an older checkout never hides new features.
REM 3. Run it. With no arguments (e.g. double-clicking this file) the
REM 4. Run it. With no arguments (e.g. double-clicking this file) the
REM interactive plugin menu is shown.
setlocal EnableDelayedExpansion

Expand Down Expand Up @@ -76,14 +82,20 @@ if not exist "%CARGO_EXE%" (
echo Rust installed at %DEVROOT%\rust.
)

REM Step 2: always run cargo build. Cargo only recompiles when sources
set "BUILD_LOG=%TEMP%\devkit-build.log"
if exist "%BUILD_LOG%" del /f /q "%BUILD_LOG%" >nul 2>&1

REM Step 2: the msvc toolchain needs link.exe from the Visual C++ Build Tools.
call :ensure_msvc
if errorlevel 1 goto :build_failed

REM Step 3: always run cargo build. Cargo only recompiles when sources
REM changed, so this is fast when up to date, and it guarantees the binary
REM matches this checkout (an old binary may predate the plugin menu).
REM
REM Windows cannot delete a running executable (Access denied, os error 5).
REM A previous DevKit window keeps target\release\devkit.exe locked. Rename
REM that image aside — a running exe can be renamed — then link a new one.
set "BUILD_LOG=%TEMP%\devkit-build.log"
del /f /q "%ROOT%target\release\devkit-*.old" >nul 2>&1
call :cargo_build
if not errorlevel 1 goto :run
Expand All @@ -106,15 +118,15 @@ del /f /q "%ROOT%target\release\devkit-*.old" >nul 2>&1
goto :run

:build_failed
type "%BUILD_LOG%"
if exist "%BUILD_LOG%" type "%BUILD_LOG%"
if not exist "%BIN%" (
echo Build failed.
goto :fail
)
echo Warning: build failed, running the previously built binary.

:run
REM Step 3: no arguments means the user just launched DevKit (e.g. by
REM Step 4: no arguments means the user just launched DevKit (e.g. by
REM double-clicking), so open the interactive menu explicitly.
if "%~1"=="" (
"%BIN%" menu
Expand All @@ -123,6 +135,59 @@ if "%~1"=="" (
)
exit /b %ERRORLEVEL%

REM Succeeds when the Visual C++ toolset (and so link.exe) is installed.
REM vswhere ships with every Visual Studio / Build Tools installer and is how
REM rustc itself locates link.exe, so a VS install that lacks the C++ tools
REM component counts as missing. A link.exe already on PATH (e.g. inside a
REM Developer Command Prompt) is accepted too.
:has_msvc
set "VSWHERE=%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe"
set "VSPATH="
if exist "%VSWHERE%" (
for /f "usebackq delims=" %%I in (`"%VSWHERE%" -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath`) do set "VSPATH=%%I"
)
if defined VSPATH exit /b 0
where link.exe >nul 2>&1
exit /b %ERRORLEVEL%

REM Installs Visual Studio Build Tools with the VC++ workload when missing.
REM The installer asks for administrator rights (UAC) and takes a few minutes.
:ensure_msvc
call :has_msvc
if not errorlevel 1 exit /b 0

echo The Microsoft C++ linker ^(link.exe^) was not found.
echo Rust's msvc toolchain needs Visual Studio Build Tools with the C++ workload.
echo Installing Visual Studio Build Tools ^(several minutes, asks for admin rights^)...
set "VS_ARGS=--quiet --wait --norestart --nocache --add Microsoft.VisualStudio.Workload.VCTools --includeRecommended"

where winget >nul 2>&1
if not errorlevel 1 (
winget install --id Microsoft.VisualStudio.2022.BuildTools -e --source winget --accept-package-agreements --accept-source-agreements --override "!VS_ARGS!"
) else (
REM No winget: fall back to Microsoft's Build Tools bootstrapper.
mkdir "%TEMP%\devkit" >nul 2>nul
set "VS_BOOT=%TEMP%\devkit\vs_BuildTools.exe"
powershell -NoProfile -NonInteractive -Command ^
"Invoke-WebRequest -UseBasicParsing -Uri 'https://aka.ms/vs/17/release/vs_BuildTools.exe' -OutFile '!VS_BOOT!'"
if exist "!VS_BOOT!" (
"!VS_BOOT!" !VS_ARGS!
del /f /q "!VS_BOOT!" >nul 2>nul
) else (
echo Failed to download the Visual Studio Build Tools installer.
)
)

call :has_msvc
if not errorlevel 1 (
echo Visual Studio Build Tools installed.
exit /b 0
)
echo Error: the C++ Build Tools are still missing.
echo Install "Build Tools for Visual Studio" from https://visualstudio.microsoft.com/visual-cpp-build-tools/
echo with the "Desktop development with C++" workload, then run DevKit again.
exit /b 1

:cargo_build
"%CARGO_EXE%" build --release --quiet --manifest-path "%ROOT%Cargo.toml" > "%BUILD_LOG%" 2>&1
exit /b %ERRORLEVEL%
Expand Down
4 changes: 2 additions & 2 deletions docs/architecture.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Architecture

DevKit **0.15.1** is a CLI application with a plugin pipeline.
DevKit **0.15.2** is a CLI application with a plugin pipeline.

```text
target/release/devkit (binary) / devkit.bat / devkit.sh
Expand Down Expand Up @@ -66,7 +66,7 @@ Checking for available versions ...

DevKit
OS: Windows
Version: 0.15.1
Version: 0.15.2
# ID NAME STATUS INSTALLED AVAILABLE
--------------------------------------------------------------------------------------------------------
1 anaconda Anaconda not_installed - 2026.07-1
Expand Down
6 changes: 5 additions & 1 deletion docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
`devkit.sh` install rustup stable there when `cargo` is missing. Running
`cargo run` yourself still needs a toolchain on PATH (the one in `dev/rust`
works if you export `CARGO_HOME` / `RUSTUP_HOME` first).
- Windows only: Visual Studio Build Tools with the "Desktop development with
C++" workload, which provides the MSVC linker (`link.exe`) and C compiler
the msvc Rust toolchain needs. `devkit.bat` installs them (winget, or the
`vs_BuildTools.exe` bootstrapper; asks for admin rights) when missing.
- On Linux / WSL / macOS, a system C linker (`cc`). `devkit.sh` and the
Makefile install the distro toolchain (`build-essential`, `base-devel`, ...)
when it is missing.
Expand Down Expand Up @@ -65,7 +69,7 @@ Checking for available versions ...

DevKit
OS: Windows
Version: 0.15.1
Version: 0.15.2
# ID NAME STATUS INSTALLED AVAILABLE
--------------------------------------------------------------------------------------------------------
1 anaconda Anaconda not_installed - 2026.07-1
Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Documentation

DevKit **0.15.1** documentation index.
DevKit **0.15.2** documentation index.

| Page | Description |
|------|-------------|
Expand Down
4 changes: 2 additions & 2 deletions docs/plugins.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Plugins

DevKit **0.15.1** ships these built-in plugins. The OS column is where the menu lists the plugin and where `devkit install` accepts it.
DevKit **0.15.2** ships these built-in plugins. The OS column is where the menu lists the plugin and where `devkit install` accepts it.

| ID | OS | Notes |
|----|----|-------|
Expand Down Expand Up @@ -107,7 +107,7 @@ Checking for available versions ...

DevKit
OS: Windows
Version: 0.15.1
Version: 0.15.2
# ID NAME STATUS INSTALLED AVAILABLE
--------------------------------------------------------------------------------------------------------
1 anaconda Anaconda not_installed - 2026.07-1
Expand Down
Loading