{"id":18451938,"url":"https://github.com/tc-hib/go-winres","last_synced_at":"2026-01-14T23:56:32.307Z","repository":{"id":37316735,"uuid":"332099330","full_name":"tc-hib/go-winres","owner":"tc-hib","description":"Command line tool for adding Windows resources to executable files","archived":false,"fork":false,"pushed_at":"2024-04-11T12:06:10.000Z","size":242,"stargazers_count":372,"open_issues_count":3,"forks_count":19,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-10-21T11:52:34.864Z","etag":null,"topics":["golang","icon","manifest","rsrc","windows"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"0bsd","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tc-hib.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-01-23T01:04:06.000Z","updated_at":"2025-10-15T03:54:23.000Z","dependencies_parsed_at":"2024-04-11T13:29:04.049Z","dependency_job_id":"db860a16-27fe-4642-9759-3d8986717cdd","html_url":"https://github.com/tc-hib/go-winres","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/tc-hib/go-winres","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tc-hib%2Fgo-winres","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tc-hib%2Fgo-winres/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tc-hib%2Fgo-winres/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tc-hib%2Fgo-winres/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tc-hib","download_url":"https://codeload.github.com/tc-hib/go-winres/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tc-hib%2Fgo-winres/sbom","scorecard":{"id":870405,"data":{"date":"2025-08-11","repo":{"name":"github.com/tc-hib/go-winres","commit":"c4d55a3dfc2e22a4a9fb95ae0280ce106daadce9"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"name":"Code-Review","score":2,"reason":"Found 5/25 approved changesets -- score normalized to 2","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":8,"reason":"binaries present in source code","details":["Warn: binary detected: _testdata/rh.exe:1","Warn: binary detected: _testdata/vs0.exe:1"],"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: BSD Zero Clause License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact v0.3.3 not signed: https://api.github.com/repos/tc-hib/go-winres/releases/150743297","Warn: release artifact v0.3.1 not signed: https://api.github.com/repos/tc-hib/go-winres/releases/87051770","Warn: release artifact v0.2.3 not signed: https://api.github.com/repos/tc-hib/go-winres/releases/46971589","Warn: release artifact v0.2.0 not signed: https://api.github.com/repos/tc-hib/go-winres/releases/39639631","Warn: release artifact v0.1.0 not signed: https://api.github.com/repos/tc-hib/go-winres/releases/39355329","Warn: release artifact v0.3.3 does not have provenance: https://api.github.com/repos/tc-hib/go-winres/releases/150743297","Warn: release artifact v0.3.1 does not have provenance: https://api.github.com/repos/tc-hib/go-winres/releases/87051770","Warn: release artifact v0.2.3 does not have provenance: https://api.github.com/repos/tc-hib/go-winres/releases/46971589","Warn: release artifact v0.2.0 does not have provenance: https://api.github.com/repos/tc-hib/go-winres/releases/39639631","Warn: release artifact v0.1.0 does not have provenance: https://api.github.com/repos/tc-hib/go-winres/releases/39355329"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 10 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":9,"reason":"1 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GO-2024-2937 / GHSA-9phm-fm57-rhg8"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-24T04:01:57.875Z","repository_id":37316735,"created_at":"2025-08-24T04:01:57.875Z","updated_at":"2025-08-24T04:01:57.875Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28439589,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T22:37:52.437Z","status":"ssl_error","status_checked_at":"2026-01-14T22:37:31.496Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["golang","icon","manifest","rsrc","windows"],"created_at":"2024-11-06T07:29:48.342Z","updated_at":"2026-01-14T23:56:32.286Z","avatar_url":"https://github.com/tc-hib.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# go-winres\n\nA simple command line tool for embedding usual resources in Windows executables built with Go:\n\n- A manifest\n- An application icon\n- Version information (the Details tab in file properties)\n- Other icons and cursors\n\nYou might want to directly use winres as a library too: [github.com/tc-hib/winres](https://github.com/tc-hib/winres)\n\n## Installation\n\nTo install the go-winres command, run:\n\n```shell\ngo install github.com/tc-hib/go-winres@latest\n```\n\n## Usage\n\nPlease type `go-winres help` to get a list of commands and options.\n\nTypical usage would be:\n\n* Run `go-winres init` to create a `winres` directory\n* Modify the contents of `winres.json`\n* Before `go build`, run `go-winres make`\n\n`go-winres make` creates files named `rsrc_windows_*.syso` that `go build` automatically embeds in the executable.\n\nThe suffix `_windows_amd64` is very important.\nThanks to it, `go build` knows it should not include that object in a Linux or 386 build.\n\n### Automatic version from git\n\nThe `--file-version` and `--product-version` flags can take a special value: `git-tag`.\nThis will retrieve the current tag with `git describe --tags` and add it to the file properties of the executable.\n\n### Using `go generate`\n\nYou can use a `//go:generate` comment as well:\n\n```\n//go:generate go-winres make --product-version=git-tag\n```\n\n### Subcommands\n\nThere are other subcommands:\n\n* `go-winres simply` is a simpler `make` that does not rely on a json file.\n* `go-winres extract` extracts resources from an `exe` file or a `dll`.\n* `go-winres patch` replaces resources directly in an `exe` file or a `dll`.\n  For example, to enhance a 7z self extracting archive, you may change its icon,\n  and add a manifest to make it look better on high DPI screens.\n\n## JSON format\n\nThe JSON file follows this hierarchy:\n\n* Resource type (e.g. `\"RT_GROUP_ICON\"` or `\"#42\"` or `\"MY_TYPE\"`)\n    * Resource name (e.g. `\"MY_ICON\"` or `\"#1\"`)\n        * Language ID (e.g. `\"0409\"` for en-US)\n            * Actual resource: a filename or a json structure\n\nStandard resource types can be found [there](https://docs.microsoft.com/en-us/windows/win32/menurc/resource-types). But\nplease never use `RT_ICON` or `RT_CURSOR`. Use `RT_GROUP_ICON` and `RT_GROUP_CURSOR` instead.\n\n### Icon JSON\n\n```json\n{\n  \"RT_GROUP_ICON\": {\n    \"APP\": {\n      \"0000\": [\n        \"icon_64.png\",\n        \"icon_48.png\",\n        \"icon_32.png\",\n        \"icon_16.png\"\n      ]\n    },\n    \"OTHER\": {\n      \"0000\": \"icon.png\"\n    },\n    \"#42\": {\n      \"0409\": \"icon_EN.ico\",\n      \"040C\": \"icon_FR.ico\"\n    }\n  }\n}\n```\n\nThis example contains 3 icons:\n\n* `\"APP\"`\n* `\"OTHER\"`\n* `42`\n\nWindows Explorer will display `\"APP\"` because it is the first one. Icons are sorted by name in case sensitive ascending\norder, then by ID.\n\n`42` is an ID, not a name, this is why it comes last.\n\n* `\"APP\"` is made of 4 png files.\n* `\"OTHER\"` will be generated from one png file. It will be resized to 256x256, 64x64, 48x48, 32x32, and 16x16.\n* `42` is a native icon, it probably already contains several images.\n\nFinally, `42` will display a different icon for french users.\n\n* `\"0409\"` means en-US, which is the default.\n* `\"040C\"` means fr-FR.\n\nYou can find other language IDs [there](https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-lcid/).\n\n### Cursor JSON\n\n```json\n{\n  \"RT_GROUP_CURSOR\": {\n    \"ARROW\": {\n      \"0000\": [\n        {\n          \"image\": \"arrow_32.png\",\n          \"x\": 28,\n          \"y\": 4\n        },\n        {\n          \"image\": \"arrow_48.png\",\n          \"x\": 40,\n          \"y\": 6\n        }\n      ]\n    },\n    \"MOVE\": {\n      \"0409\": \"move_EN.cur\",\n      \"040C\": \"move_FR.cur\"\n    },\n    \"#1\": {\n      \"0000\": {\n        \"image\": \"cross.png\",\n        \"x\": 16,\n        \"y\": 16\n      }\n    }\n  }\n}\n```\n\nThis example contains 3 cursors:\n\n* `\"ARROW\"` contains two images (one for higher DPI). It is a json array.\n* `\"MOVE\"` uses cur files directly. It is different in French. It is a string.\n* `1` contains one image. It is an object.\n\nWhen a cursor is made with a png file, you have to provide the coordinates of the \"hot spot\", that is, the pixel that\nclicks.\n\n### Manifest\n\nThe manifest should be defined as resource `1` with language `0409`.\n\n#### As a JSON object\n\n```json\n{\n  \"RT_MANIFEST\": {\n    \"#1\": {\n      \"0409\": {\n        \"identity\": {\n          \"name\": \"\",\n          \"version\": \"\"\n        },\n        \"description\": \"\",\n        \"minimum-os\": \"win7\",\n        \"execution-level\": \"as invoker\",\n        \"ui-access\": false,\n        \"auto-elevate\": false,\n        \"dpi-awareness\": \"system\",\n        \"disable-theming\": false,\n        \"disable-window-filtering\": false,\n        \"high-resolution-scrolling-aware\": false,\n        \"ultra-high-resolution-scrolling-aware\": false,\n        \"long-path-aware\": false,\n        \"printer-driver-isolation\": false,\n        \"gdi-scaling\": false,\n        \"segment-heap\": false,\n        \"use-common-controls-v6\": false\n      }\n    }\n  }\n}\n```\n\nAll boolean values default to `false`.\n\nIt is recommended to omit `identity` if your program is a plain application, not meant to be a side-by-side\ndependency.\n\n##### Values for `\"execution-level\"`:\n\n- `\"\"` (default)\n- `\"highest\"`: elevates to the highest level available to the current user\n- `\"administrator\"`: require the user to be an administrator and elevate to this level\n\n##### Values for `\"minimum-os\"`:\n\n- `\"vista\"`\n- `\"win7\"` (default)\n- `\"win8\"`\n- `\"win8.1\"`\n- `\"win10\"`\n\n##### Values for `\"dpi-awareness\"`:\n\n- `\"unaware\"`\n- `\"system\"` (default)\n- `\"per monitor\"`\n- `\"per monitor v2\"` (recommended)\n\n#### As an XML file\n\n```json\n{\n  \"RT_MANIFEST\": {\n    \"#1\": {\n      \"0409\": \"my_manifest.xml\"\n    }\n  }\n}\n```\n\n### VersionInfo JSON\n\nHere is an example JSON file containing every standard info field, a French translation, and every possible flag.\n`\"0409\"` and `\"040C\"` are language code identifiers (LCID) for `en-US` and `fr-FR` respectively.\n\n```json\n{\n  \"RT_VERSION\": {\n    \"#1\": {\n      \"0000\": {\n        \"fixed\": {\n          \"file_version\": \"1.2.3.4\",\n          \"product_version\": \"1.2.3.42\",\n          \"flags\": \"Debug,Prerelease,Patched,PrivateBuild,SpecialBuild\",\n          \"timestamp\": \"2020-12-18T23:00:00+01:00\"\n        },\n        \"info\": {\n          \"0409\": {\n            \"Comments\": \"Comments\",\n            \"CompanyName\": \"Company\",\n            \"FileDescription\": \"A description\",\n            \"FileVersion\": \"1.2.3.4\",\n            \"InternalName\": \"\",\n            \"LegalCopyright\": \"© You\",\n            \"LegalTrademarks\": \"\",\n            \"OriginalFilename\": \"X.EXE\",\n            \"PrivateBuild\": \"\",\n            \"ProductName\": \"Product\",\n            \"ProductVersion\": \"1.2.3.42 beta\",\n            \"SpecialBuild\": \"\"\n          },\n          \"040C\": {\n            \"Comments\": \"Commentaire\",\n            \"CompanyName\": \"Compagnie\",\n            \"FileDescription\": \"Une description\",\n            \"FileVersion\": \"1.2.3.4\",\n            \"InternalName\": \"\",\n            \"LegalCopyright\": \"© Vous\",\n            \"LegalTrademarks\": \"\",\n            \"OriginalFilename\": \"X.EXE\",\n            \"PrivateBuild\": \"\",\n            \"ProductName\": \"Produit\",\n            \"ProductVersion\": \"1.2.3.42 bêta\",\n            \"SpecialBuild\": \"\"\n          }\n        }\n      }\n    }\n  }\n}\n```\n\n## Alternatives\n\nThis project is similar to [akavel/rsrc](https://www.github.com/akavel/rsrc/)\nand [josephspurrier/goversioninfo](https://github.com/josephspurrier/goversioninfo).\n\nAdditional features are:\n\n- Multilingual resources\n- Multilingual VersionInfo that works in Windows Explorer\n- Explicitly named resources, by ID or by string (so you can use them in runtime)\n- Extracting resources from `exe` or `dll` files\n- Replacing resources in `exe` or `dll` files\n- Simplified VersionInfo definition\n- Simplified manifest definition\n- Support for custom information in VersionInfo\n- Making an icon or a cursor from a PNG file\n- Embedding custom resources\n\nIt might be closer to Microsoft specifications too.\n\n## Limitations\n\n`go-winres` is not a real resource compiler, which means it won't help you embed these UI templates:\n\n- `ACCELERATORS`\n- `DIALOGEX`\n- `MENUEX`\n- `POPUP`\n\nIf you ever need them, you can use one of those tools instead:\n\n- `rc.exe` and `cvtres.exe` from Visual Studio\n- `windres` from GNU Binary Utilities\n- `llvm-rc` and `llvm-cvtres` from LLVM tools\n\nSee [Resource Compiler](https://docs.microsoft.com/en-us/windows/win32/menurc/resource-compiler) for more information.\n\n## Thanks\n\nMany thanks to [akavel](https://github.com/akavel) for his help.\n\nThis project uses these very helpful libs:\n\n- [nfnt/resize](https://github.com/nfnt/resize) - pure Go image resizing\n- [urfave/cli](https://github.com/urfave/cli) - makes building a CLI easier\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftc-hib%2Fgo-winres","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftc-hib%2Fgo-winres","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftc-hib%2Fgo-winres/lists"}