Skip to content

Commit 09f17f2

Browse files
committed
Extend App.config
- Added InstallRedistributablePackage (AutoUpdate may fail, if this is disabled) Fixes: #362
1 parent bc34c84 commit 09f17f2

File tree

4 files changed

+31
-7
lines changed

4 files changed

+31
-7
lines changed

SimpleDnsCrypt/App.config

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,9 @@
7777
<setting name="TrayMode" serializeAs="String">
7878
<value>True</value>
7979
</setting>
80+
<setting name="InstallRedistributablePackage" serializeAs="String">
81+
<value>True</value>
82+
</setting>
8083
</SimpleDnsCrypt.Properties.Settings>
8184
</userSettings>
8285
</configuration>

SimpleDnsCrypt/Properties/Settings.Designer.cs

Lines changed: 13 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

SimpleDnsCrypt/Properties/Settings.settings

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,5 +53,8 @@
5353
<Setting Name="TrayMode" Type="System.Boolean" Scope="User">
5454
<Value Profile="(Default)">True</Value>
5555
</Setting>
56+
<Setting Name="InstallRedistributablePackage" Type="System.Boolean" Scope="User">
57+
<Value Profile="(Default)">True</Value>
58+
</Setting>
5659
</Settings>
5760
</SettingsFile>

SimpleDnsCrypt/ViewModels/LoaderViewModel.cs

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,19 @@ private async void InitializeApplication()
5959
}
6060
else
6161
{
62-
ProgressText = LocalizationEx.GetUiString("loader_redistributable_package_installing", Thread.CurrentThread.CurrentCulture);
63-
//minisign needs this (to verify the installer with libsodium)
64-
await PrerequisiteHelper.DownloadAndInstallRedistributablePackage();
65-
if (PrerequisiteHelper.IsRedistributablePackageInstalled())
62+
//Note: if this is disabled, the auto update may not work
63+
if (Properties.Settings.Default.InstallRedistributablePackage)
6664
{
67-
ProgressText = LocalizationEx.GetUiString("loader_redistributable_package_ready", Thread.CurrentThread.CurrentCulture);
68-
await Task.Delay(1000).ConfigureAwait(false);
65+
ProgressText = LocalizationEx.GetUiString("loader_redistributable_package_installing",
66+
Thread.CurrentThread.CurrentCulture);
67+
//minisign needs this (to verify the installer with libsodium)
68+
await PrerequisiteHelper.DownloadAndInstallRedistributablePackage();
69+
if (PrerequisiteHelper.IsRedistributablePackageInstalled())
70+
{
71+
ProgressText = LocalizationEx.GetUiString("loader_redistributable_package_ready",
72+
Thread.CurrentThread.CurrentCulture);
73+
await Task.Delay(1000).ConfigureAwait(false);
74+
}
6975
}
7076
}
7177

0 commit comments

Comments
 (0)