nwixtoolset
Version:
Node module wrapper around the WIX Toolset executables.
59 lines (58 loc) • 3.34 kB
JavaScript
;
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });
const run_1 = require("./run");
const util_1 = require("./util");
/**
* Generates WiX authoring from various input formats.
* It is used for harvesting files, Visual Studio projects and Internet Information Server web sites,
* "harvesting" these files into components and generating Windows Installer XML Source files (.wxs).
*
* Heat is good to use when you begin authoring your first Windows Installer package for a product.
*
* @param harvestType The harvest type. Supported values are (dir, file, payload, perf, project, reg, website).
* @param harvestSource The harvest to process.
* @param [options] Options for the compiler.
*/
function heat(harvestType, harvestSource, options = {}) {
return __awaiter(this, void 0, void 0, function* () {
const args = [harvestType];
yield util_1.addPathFile(args, harvestSource);
args.push("-nologo");
util_1.addArgument(args, "-ag", options.autoGenerateGuid);
util_1.addArgument(args, "-cg", options.componentGroup);
util_1.addArgument(args, "-configuration", options.configuration);
util_1.addArgument(args, "-directoryid", options.directoryId);
util_1.addArgument(args, "-dr", options.directoryRef);
util_1.addArgument(args, "-g1", options.noBrackets);
util_1.addArgument(args, "-generate", options.generate);
util_1.addArgument(args, "-gg", options.generateGuidsNow);
util_1.addArgument(args, "-indent", options.indent);
util_1.addArgument(args, "-ke", options.keepEmptyDirs);
yield util_1.addPathArgument(args, "-out", options.out);
util_1.addArgument(args, "-platform", options.platform);
util_1.addArgument(args, "-pog", options.outputGroup);
util_1.addArgument(args, "-projectname", options.projectName);
util_1.addArgument(args, "-scom", options.suppressCOM);
util_1.addArgument(args, "-sfrag", options.suppressFragments);
util_1.addArgument(args, "-srd", options.suppressRootDir);
util_1.addArgument(args, "-sreg", options.suppressRegistry);
util_1.addArgument(args, "-suid", options.suppressUID);
util_1.addArgument(args, "-svb6", options.suppressVB6);
util_1.addArgument(args, "-t", options.transformXSL);
util_1.addArgument(args, "-template", options.template);
util_1.addArgument(args, "-var", options.var);
util_1.addArgument(args, "-wixvar", options.wixvar);
util_1.addCommonArguments(args, options);
return run_1.raw.heat(args, options);
});
}
exports.heat = heat;