diff --git a/package-lock.json b/package-lock.json
index 23af9a7..e963e4f 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -5,7 +5,8 @@
"requires": true,
"packages": {
"": {
- "version": "3.2.0",
+ "name": "electron-wix-msi",
+ "version": "4.0.0",
"license": "MIT",
"dependencies": {
"debug": "^4.3.4",
diff --git a/src/creator.ts b/src/creator.ts
index 2597a33..35ef101 100644
--- a/src/creator.ts
+++ b/src/creator.ts
@@ -62,6 +62,7 @@ export interface MSICreatorOptions {
rebootMode?: string;
installLevel?: number;
bundled?: boolean;
+ noDesktopShortcut?: boolean;
}
export interface UIOptions {
@@ -101,6 +102,8 @@ export class MSICreator {
public wixTemplate = getTemplate('wix');
public uiTemplate = getTemplate('ui', true);
public wixVariableTemplate = getTemplate('wix-variable', true);
+ public addDesktopTemplate = getTemplate('add-desktop-shortcut', true);
+ public addDesktopFeatureTemplate = getTemplate('add-desktop-shortcut-feature', true);
public updaterTemplate = getTemplate('updater-feature', true);
public updaterPermissions = getTemplate('updater-permissions');
public autoLaunchTemplate = getTemplate('auto-launch-feature', true);
@@ -143,6 +146,7 @@ export class MSICreator {
public rebootMode: string;
public installLevel: number;
public bundled: boolean;
+ public noDesktopShortcut?: boolean;
public ui: UIOptions | boolean;
@@ -182,6 +186,7 @@ export class MSICreator {
this.rebootMode = options.rebootMode || 'ReallySuppress';
this.installLevel = options.installLevel || 2;
this.bundled = options.bundled || false;
+ this.noDesktopShortcut = options.noDesktopShortcut || false;
this.appUserModelId = options.appUserModelId
|| `com.squirrel.${this.shortName}.${this.exe}`.toLowerCase();
@@ -288,6 +293,8 @@ export class MSICreator {
'': directories,
'': this.getUI(),
'': this.autoUpdate ? this.updaterPermissions : '{{remove newline}}',
+ '': this.noDesktopShortcut ? '{{remove newline}}' : this.addDesktopTemplate,
+ '': this.noDesktopShortcut ? '{{remove newline}}' : this.addDesktopFeatureTemplate,
'': this.autoUpdate ? this.updaterTemplate : '{{remove newline}}',
'': this.autoLaunch ? this.autoLaunchTemplate : '{{remove newline}}',
'': updaterComponentRefs.map(({ xml }) => xml).join('\n'),
diff --git a/static/add-desktop-shortcut-feature.xml b/static/add-desktop-shortcut-feature.xml
new file mode 100644
index 0000000..1ae34f0
--- /dev/null
+++ b/static/add-desktop-shortcut-feature.xml
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/static/add-desktop-shortcut.xml b/static/add-desktop-shortcut.xml
new file mode 100644
index 0000000..7b826c5
--- /dev/null
+++ b/static/add-desktop-shortcut.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/static/wix.xml b/static/wix.xml
index 6675847..f28327f 100644
--- a/static/wix.xml
+++ b/static/wix.xml
@@ -108,7 +108,7 @@
WorkingDirectory="APPLICATIONROOTDIRECTORY">
-
+
-
-
-
-
-
-
-
+
+
@@ -151,7 +137,7 @@
-
+