Skip to content
Permalink
Browse files

feat(maker): add Wix support

  • Loading branch information
MarshallOfSound authored and malept committed Dec 1, 2017
1 parent ad7bf1f commit 76166af3ab6f95b83cacb68e20ff2e437825dea6
Showing with 34 additions and 1 deletion.
  1. +1 −0 README.md
  2. +2 −1 package.json
  3. +31 −0 src/makers/win32/wix.js
@@ -181,6 +181,7 @@ config object:
| `zip` | All | Zips your packaged application | None | Yes | `zip` on Darwin/Linux |
| `squirrel` | Windows | Generates an installer and `.nupkg` files for Squirrel.Windows | [`electronWinstallerConfig`](https://github.com/electron/windows-installer#usage) | Yes | |
| `appx` | Windows | Generates a Windows Store package | [`windowsStoreConfig`](https://github.com/felixrieseberg/electron-windows-store#programmatic-usage) | No | |
| `wix` | Windows | Generates a traditional MSI file | [`electronWixMSIConfig`](https://github.com/felixrieseberg/electron-wix-msi#configuration) | No | [Wix Toolit](https://github.com/felixrieseberg/electron-wix-msi#prerequisites) |
| `dmg` | Darwin | Generates a DMG file | [`electronInstallerDMG`](https://github.com/mongodb-js/electron-installer-dmg#api) | No | |
| `deb` | Linux | Generates a Debian package | [`electronInstallerDebian`](https://github.com/unindented/electron-installer-debian#options) | Yes | [`fakeroot` and `dpkg`](https://github.com/unindented/electron-installer-debian#requirements) |
| `rpm` | Linux | Generates an RPM package | [`electronInstallerRedhat`](https://github.com/unindented/electron-installer-redhat#options) | Yes | [`rpm`](https://github.com/unindented/electron-installer-redhatn#requirements) |
@@ -158,7 +158,8 @@
"electron-installer-flatpak": "^0.8.0",
"electron-installer-redhat": "^0.5.0",
"electron-windows-store": "^0.12.0",
"electron-winstaller": "^2.5.0"
"electron-winstaller": "^2.5.0",
"electron-wix-msi": "^1.2.3"
},
"engines": {
"node": ">= 6.0"
@@ -0,0 +1,31 @@
import path from 'path';

import { ensureDirectory } from '../../util/ensure-output';
import configFn from '../../util/config-fn';
import isInstalled from '../../util/is-installed';
import { getDistinguishedNameFromAuthor } from './appx';

export const isSupportedOnCurrentPlatform = async () => isInstalled('electron-wix-msi');

export default async ({ dir, appName, targetArch, forgeConfig, packageJSON }) => {
const { MSICreator } = require('electron-wix-msi');

const outPath = path.resolve(dir, `../make/wix/${targetArch}`);
await ensureDirectory(outPath);

const creator = new MSICreator(Object.assign({
description: packageJSON.description,
name: appName,
version: packageJSON.version,
manufacturer: getDistinguishedNameFromAuthor(packageJSON.author).substr(3),
exe: `${appName}.exe`,
}, configFn(forgeConfig.electronWixMSIConfig, targetArch), {
appDirectory: dir,
outputDirectory: outPath,
}));

await creator.create();
const { msiFile } = await creator.compile();

return [msiFile];
};

0 comments on commit 76166af

Please sign in to comment.
You can’t perform that action at this time.