33 lines
794 B
JavaScript
33 lines
794 B
JavaScript
|
/*jshint node:true */
|
||
|
|
||
|
'use strict';
|
||
|
|
||
|
var rcedit = require('rcedit');
|
||
|
|
||
|
module.exports = function (grunt) {
|
||
|
grunt.registerMultiTask('rebrand', 'Rebrand .exe', function (platform) {
|
||
|
if (platform !== 'win') {
|
||
|
return;
|
||
|
}
|
||
|
|
||
|
var done = this.async();
|
||
|
|
||
|
rcedit(this.data.src, {
|
||
|
'icon': this.data.icon,
|
||
|
'version-string': this.data.meta
|
||
|
}, function (err) {
|
||
|
if (err) {
|
||
|
grunt.fail.warn(err);
|
||
|
return;
|
||
|
}
|
||
|
|
||
|
done();
|
||
|
});
|
||
|
});
|
||
|
|
||
|
grunt.config('rebrand.rebrand-exe', {
|
||
|
src: 'build/<%= paths.exe[grunt.task.current.args[0]] %>',
|
||
|
icon: 'images/logos/logo.ico',
|
||
|
meta: grunt.config.get('meta')
|
||
|
});
|
||
|
};
|