diff --git a/packages/maker/wix/src/Config.ts b/packages/maker/wix/src/Config.ts index dfaec21fb9..65c4a0e278 100644 --- a/packages/maker/wix/src/Config.ts +++ b/packages/maker/wix/src/Config.ts @@ -1,3 +1,5 @@ +import { MSICreator } from 'electron-wix-msi/lib/creator'; + export interface MakerWixConfig { /** * String to set as appUserModelId on the shortcut. If none is passed, it'll @@ -68,6 +70,10 @@ export interface MakerWixConfig { * The password to decrypt the certificate given in `certificateFile`. */ certificatePassword?: string; + /** + * Allows for the modification of the MSICreator before create is called. + */ + beforeCreate?: (creator: MSICreator) => Promise | void; } export interface UIOptions { /** diff --git a/packages/maker/wix/src/MakerWix.ts b/packages/maker/wix/src/MakerWix.ts index 1321619637..f3e41388e1 100644 --- a/packages/maker/wix/src/MakerWix.ts +++ b/packages/maker/wix/src/MakerWix.ts @@ -38,6 +38,9 @@ export default class MakerWix extends MakerBase { outputDirectory: outPath, }) as MSICreatorOptions); + if (this.config.beforeCreate) { + await Promise.resolve(this.config.beforeCreate(creator)); + } await creator.create(); const { msiFile } = await creator.compile();