Skip to content

Latest commit

 

History

History
89 lines (65 loc) · 2.4 KB

README.md

File metadata and controls

89 lines (65 loc) · 2.4 KB

node-resourcehacker

Node module to edit windows executable resources (icons, ...) This is a simple node wrapper of Resource Hacker

OS Support

Windows

Works natively on windows

Linux & Mac OS X

Works if wine is installed

Note: even if it is fully command line, it requires a X server to work. You can use Xvfb :

xvfb-run resourcehacker args
`xvfb-run node yourscript.js
xvfb-run grunt yourtask

Usage

Command line
npm install -g resourcehacker
resourcehacker -add ExeFileName, ResultingFileName, ResourceAddress, ResourceType, ResourceName,
resourcehacker -addskip ExeFileName, ResultingFileName, ResourceAddress, ResourceType, ResourceName,
resourcehacker -addoverwrite ExeFileName, ResultingFileName, ResourceAddress, ResourceType, ResourceName,
resourcehacker -modify ExeFileName, ResultingFileName, ResourceAddress, ResourceType, ResourceName,
resourcehacker -extract ExeFileName, ResourceAddress, ResourceType, ResourceName,
resourcehacker -delete ExeFileName, ResultingFileName, ResourceType, ResourceName,
Node JS
npm install resourcehacker
var resourcehacker = require("resourcehacker");

resourcehacker("-add ExeFileName, ResultingFileName, ResourceAddress, ResourceType, ResourceName,", callback);
resourcehacker("-addskip ExeFileName, ResultingFileName, ResourceAddress, ResourceType, ResourceName,", callback);
resourcehacker("-addoverwrite ExeFileName, ResultingFileName, ResourceAddress, ResourceType, ResourceName,", callback);
resourcehacker("-modify ExeFileName, ResultingFileName, ResourceAddress, ResourceType, ResourceName,", callback);
resourcehacker("-extract ExeFileName, ResourceAddress, ResourceType, ResourceName,", callback);
resourcehacker("-delete ExeFileName, ResultingFileName, ResourceType, ResourceName,", callback);
Grunt
npm install resourcehacker --save-dev
grunt.loadNpmTasks('resourcehacker');
...
grunt.initConfig({
	...
	"resourcehacker": {
		your_target: {
			command: "-add ExeFileName, ResultingFileName, ResourceAddress, ResourceType, ResourceName,"
		}
	}
	...
});

Credits

Thanks to Angus Johnson for his amazing work on Resource Hacker