@lorki97/node-resourcehacker

1.3.1 • Public • Published

@lorki97/node-resourcehacker

Just another Resource Hacker wrapper for node.js.

Updated original node-resourcehacker to utilize the new ResourceHacker CLI syntax.

Installation

$ npm install @lorki97/node-resourcehacker --save

During the first usage, the Resource Hacker binary will be automatically downloaded. I can't include a copy of Resource Hacker because it's illegal. Try setting HTTP_PROXY if you experience a slow download speed.

By specifying environment variable SOURCE_RESOURCE_HACKER, we are able to download Resource Hacker from somewhere else, or use a local archive instead.

Usage

const resourceHacker = require('@lorki97/node-resourcehacker');

// Use the beta release of Resource Hacker.
process.env['SOURCE_RESOURCE_HACKER'] = 'http://www.angusj.com/resourcehacker/resource_hacker_beta.zip';

// Use a local Resource Hacker archive.
process.env['SOURCE_RESOURCE_HACKER'] = '~/Downloads/resource_hacker.zip';

resourceHacker({
    operation: 'addoverwrite',
    input: 'nw.exe',
    output: 'nw.exe',
    resource: 'nw.ico',
    resourceType: 'ICONGROUP',
    resourceName: 'IDR_MAINFRAME',
}, (err) => {

    if(err) {
        return console.error(err);
    }

    console.log('Done.');

});

License

MIT.

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.3.12latest

Version History

VersionDownloads (Last 7 Days)Published
1.3.12

Package Sidebar

Install

npm i @lorki97/node-resourcehacker

Weekly Downloads

2

Version

1.3.1

License

MIT

Unpacked Size

10.7 kB

Total Files

4

Last publish

Collaborators

  • lorki97