diff --git a/packages/maker/wix/src/MakerWix.ts b/packages/maker/wix/src/MakerWix.ts index 8850513337..4187b61a6f 100644 --- a/packages/maker/wix/src/MakerWix.ts +++ b/packages/maker/wix/src/MakerWix.ts @@ -1,6 +1,8 @@ import MakerBase, { MakerOptions } from '@electron-forge/maker-base'; import { ForgePlatform } from '@electron-forge/shared-types'; +import colors; +import logSymbols from 'log-symbols'; import path from 'path'; import { MSICreator, MSICreatorOptions } from 'electron-wix-msi/lib/creator'; @@ -28,10 +30,16 @@ export default class MakerWix extends MakerBase { const outPath = path.resolve(makeDir, `wix/${targetArch}`); await this.ensureDirectory(outPath); + let version = packageJSON.version; + if (version.includes('-')) { + console.warn(logSymbols.warning, 'WARNING: WiX distributables does not handle prerelease information in the app version, removing it from the MSI'.yellow); + version = this.normalizeWindowsVersion(version); + } + const creator = new MSICreator(({ description: packageJSON.description, name: appName, - version: packageJSON.version, + version, manufacturer: getNameFromAuthor(packageJSON.author), exe: `${appName}.exe`, ...this.config,