2014-11-08 17:52:36 +00:00
|
|
|
/*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,
|
2014-11-09 18:01:00 +00:00
|
|
|
'file-version': this.data.meta.FileVersion,
|
|
|
|
'product-version': this.data.meta.ProductVersion,
|
2014-11-08 17:52:36 +00:00
|
|
|
'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')
|
|
|
|
});
|
|
|
|
};
|