From f933f9d10c33e5bef63e1989776030dbe58c7d73 Mon Sep 17 00:00:00 2001 From: Jeremy Wu Date: Sun, 8 Mar 2020 14:48:24 +1100 Subject: [PATCH] cater for debug mode --- Wox.Core/Configuration/Portable.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Wox.Core/Configuration/Portable.cs b/Wox.Core/Configuration/Portable.cs index 388f52042..7789072bd 100644 --- a/Wox.Core/Configuration/Portable.cs +++ b/Wox.Core/Configuration/Portable.cs @@ -22,8 +22,13 @@ namespace Wox.Core.Configuration try { MoveUserDataFolder(DataLocation.PortableDataPath, DataLocation.RoamingDataPath); +#if DEBUG + // Create shortcuts and uninstaller are not required in debug mode, + // otherwise will repoint the path of the actual installed production version to the debug version +#else CreateShortcuts(); CreateUninstallerEntry(); +#endif IndicateDeletion(DataLocation.PortableDataPath); MessageBox.Show("Wox needs to restart to finish disabling portable mode, " + @@ -53,8 +58,13 @@ namespace Wox.Core.Configuration try { MoveUserDataFolder(DataLocation.RoamingDataPath, DataLocation.PortableDataPath); +#if DEBUG + // Remove shortcuts and uninstaller are not required in debug mode, + // otherwise will delete the actual installed production version +#else RemoveShortcuts(); RemoveUninstallerEntry(); +#endif IndicateDeletion(DataLocation.RoamingDataPath); MessageBox.Show("Wox needs to restart to finish enabling portable mode, " +