Skip to content

fix: add Windows binary version info#2181

Open
he-yufeng wants to merge 1 commit into
MoonshotAI:mainfrom
he-yufeng:fix/windows-file-version-info
Open

fix: add Windows binary version info#2181
he-yufeng wants to merge 1 commit into
MoonshotAI:mainfrom
he-yufeng:fix/windows-file-version-info

Conversation

@he-yufeng
Copy link
Copy Markdown

@he-yufeng he-yufeng commented May 7, 2026

Summary

  • generate a PyInstaller Windows version-info file from pyproject.toml
  • pass that version resource into both one-file and one-dir kimi.spec builds on Windows
  • add a Windows CI assertion so release artifacts keep non-empty FileVersionInfo

Fixes #2178.

To verify

  • uv run ruff check scripts/pyinstaller_version_info.py tests/test_pyinstaller_version_info.py
  • uv run pytest tests/test_pyinstaller_version_info.py -q
  • uv run pyright scripts/pyinstaller_version_info.py tests/test_pyinstaller_version_info.py
  • uv run python scripts/pyinstaller_version_info.py --output dist/kimi_version_info.test.txt
  • uv run pyinstaller --noconfirm kimi.spec
  • (Get-Item dist\\kimi.exe).VersionInfo | Format-List FileVersion,ProductVersion,FileDescription,ProductName,CompanyName,OriginalFilename
  • dist\\kimi.exe --help

Open in Devin Review

Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 2 additional findings.

Open in Devin Review

@he-yufeng he-yufeng force-pushed the fix/windows-file-version-info branch from 421662a to d44bca9 Compare May 11, 2026 03:00
Copy link
Copy Markdown
Author

Rebased this onto the latest main; the only conflict was in kimi.spec, and the resolved spec keeps the Windows version-info generation while preserving the current upstream packaging layout.

Validation on head d44bca92:

  • python -m uv run pytest -p no:cacheprovider tests\test_pyinstaller_version_info.py -q (3 passed)
  • python -m uv run ruff check scripts\pyinstaller_version_info.py tests\test_pyinstaller_version_info.py
  • python -m py_compile scripts\pyinstaller_version_info.py tests\test_pyinstaller_version_info.py
  • git diff --check upstream/main..HEAD

The first pytest attempt hit a local Windows temp-directory permission error at C:\Users\He\AppData\Local\Temp\pytest-of-He, so I reran with TEMP/TMP pointed at a writable local temp directory and disabled pytest cache writes.

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.

[Bug] Windows: kimi.exe v1.41.0 has blank FileVersionInfo, causing VS Code extension to reject it as "incompatible"

1 participant