UNPKG

nwixtoolset

Version:

Node module wrapper around the WIX Toolset executables.

39 lines (38 loc) 2.11 kB
"use strict"; 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"); /** * Converts a Windows Installer database into a set of WiX source files. * This tool is very useful for getting all your authoring into a WiX source file when you have an existing Windows Installer database. * However, you will then need to tweak this file to accomodate different languages and breaking things into fragments. * * @param src The MSI file to decompile. * @param [options] Options for the decompiler. */ function dark(src, options = {}) { return __awaiter(this, void 0, void 0, function* () { const args = ["-nologo"]; util_1.addArgument(args, "-notidy", options.notidy); yield util_1.addPathArgument(args, "-o", options.out); util_1.addArgument(args, "-sct", options.suppressCustomTables); util_1.addArgument(args, "-sdet", options.suppressDroppingEmptyTables); util_1.addArgument(args, "-sras", options.suppressRelativeActionSequencing); util_1.addArgument(args, "-sui", options.suppressUI); yield util_1.addPathArgument(args, "-x", options.export); util_1.addArgument(args, "-xo", options.wixout); util_1.addCommonArguments(args, options); yield util_1.addPathFile(args, src); return run_1.raw.dark(args, options); }); } exports.dark = dark;