winres
Windows resource file generator
Summary
| Latest Version | Unknown |
|---|---|
| License | MIT |
| CI Status | Failing |
| Downloads | 0 |
| Last Indexed | 2026-07-21 05:24 |
Tags
Installation
nimble install winres
choosenim install winres
git clone https://github.com/codehz/nim-winres
OS Compatibility
| Platform | Linux | macOS | Windows | FreeBSD | OpenBSD | NetBSD | Android | iOS | WASM | Embedded |
|---|---|---|---|---|---|---|---|---|---|---|
| winres | ✓ | ✓ | ✓ | - | - | - | - | - | - | - |
Source
| Repository | https://github.com/codehz/nim-winres |
|---|---|
| Homepage | https://github.com/codehz/nim-winres |
| Registry Source | nimble_official |
README
Nim windows resource generator
Generate windows res file with nim syntax.
Example:
import winres/[helper, version_code]
let version = parseVersionCode("0.1.2.0")
let icon = readIconData() # user provided
output(fmt"target.res"):
RT_ICON(1, 1033, icon)
RT_VERSION(2, 1033, 1200, FixedVersionInfo(file: version, product: version, kind: ftDll)) do:
# \StringFileInfo\XXXXXXXX\
FileDescription := "awesome nim project"
FileVersion := $version
ProductVersion := $version
do:
# \VarFileInfo\
# "Translation" value is automatically generated
AnyCustomKey := "custom data"
AnotherCustomKey := [1, 2, 3, 4]
RT_MANIFEST 3, 1033, """
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitorV2</dpiAwareness>
</windowsSettings>
</application>
</assembly>
"""
Currently only support RT_VERSION, RT_ICON and RT_MANIFEST