Permalink
Please
sign in to comment.
Showing
with
34 additions
and 1 deletion.
- +1 −0 README.md
- +2 −1 package.json
- +31 −0 src/makers/win32/wix.js
@@ -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