summaryrefslogtreecommitdiff
path: root/plugins/PluginUpdater/src
diff options
context:
space:
mode:
authorMataes <mataes2007@gmail.com>2018-08-26 15:56:34 +0300
committerMataes <mataes2007@gmail.com>2018-08-26 15:57:18 +0300
commitf09b69399786424ac800755f4aa94779ea39d0e8 (patch)
treea6249bbc66b9558c7f807f1518950e6cd314ada2 /plugins/PluginUpdater/src
parentcf57ec609dc7b02eb44433514af60bb74951e990 (diff)
PluginUpdater: added new variant of update "Stable version with debug symbols"
Diffstat (limited to 'plugins/PluginUpdater/src')
-rw-r--r--plugins/PluginUpdater/src/Options.cpp25
-rw-r--r--plugins/PluginUpdater/src/resource.h3
-rw-r--r--plugins/PluginUpdater/src/stdafx.h4
3 files changed, 30 insertions, 2 deletions
diff --git a/plugins/PluginUpdater/src/Options.cpp b/plugins/PluginUpdater/src/Options.cpp
index 89e6b9cf60..d52406cf41 100644
--- a/plugins/PluginUpdater/src/Options.cpp
+++ b/plugins/PluginUpdater/src/Options.cpp
@@ -125,6 +125,11 @@ static INT_PTR CALLBACK UpdateNotifyOptsProc(HWND hwndDlg, UINT msg, WPARAM wPar
SetDlgItemText(hwndDlg, IDC_CUSTOMURL, defurl);
CheckDlgButton(hwndDlg, IDC_STABLE, BST_CHECKED);
break;
+ case UPDATE_MODE_STABLE_SYMBOLS:
+ mir_snwprintf(defurl, DEFAULT_UPDATE_URL_STABLE_SYMBOLS, GetBits(hwndDlg));
+ SetDlgItemText(hwndDlg, IDC_CUSTOMURL, defurl);
+ CheckDlgButton(hwndDlg, IDC_STABLE_SYMBOLS, BST_CHECKED);
+ break;
case UPDATE_MODE_TRUNK:
mir_snwprintf(defurl, DEFAULT_UPDATE_URL_TRUNK, GetBits(hwndDlg));
SetDlgItemText(hwndDlg, IDC_CUSTOMURL, defurl);
@@ -203,6 +208,14 @@ static INT_PTR CALLBACK UpdateNotifyOptsProc(HWND hwndDlg, UINT msg, WPARAM wPar
SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
break;
+ case IDC_STABLE_SYMBOLS:
+ EnableWindow(GetDlgItem(hwndDlg, IDC_CHANGE_PLATFORM), TRUE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_CUSTOMURL), FALSE);
+ mir_snwprintf(defurl, DEFAULT_UPDATE_URL_STABLE_SYMBOLS, GetBits(hwndDlg));
+ SetDlgItemText(hwndDlg, IDC_CUSTOMURL, defurl);
+ SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
+ break;
+
case IDC_CUSTOM:
EnableWindow(GetDlgItem(hwndDlg, IDC_CHANGE_PLATFORM), FALSE);
EnableWindow(GetDlgItem(hwndDlg, IDC_CUSTOMURL), TRUE);
@@ -231,6 +244,10 @@ static INT_PTR CALLBACK UpdateNotifyOptsProc(HWND hwndDlg, UINT msg, WPARAM wPar
mir_snwprintf(defurl, DEFAULT_UPDATE_URL, GetBits(hwndDlg));
SetDlgItemText(hwndDlg, IDC_CUSTOMURL, defurl);
}
+ else if (IsDlgButtonChecked(hwndDlg, IDC_STABLE_SYMBOLS)) {
+ mir_snwprintf(defurl, DEFAULT_UPDATE_URL_STABLE_SYMBOLS, GetBits(hwndDlg));
+ SetDlgItemText(hwndDlg, IDC_CUSTOMURL, defurl);
+ }
else if (IsDlgButtonChecked(hwndDlg, IDC_TRUNK)) {
mir_snwprintf(defurl, DEFAULT_UPDATE_URL_TRUNK, GetBits(hwndDlg));
SetDlgItemText(hwndDlg, IDC_CUSTOMURL, defurl);
@@ -273,6 +290,14 @@ static INT_PTR CALLBACK UpdateNotifyOptsProc(HWND hwndDlg, UINT msg, WPARAM wPar
opts.bForceRedownload = 0;
db_unset(NULL, MODULENAME, DB_SETTING_REDOWNLOAD);
}
+ else if (IsDlgButtonChecked(hwndDlg, IDC_STABLE_SYMBOLS)) {
+ // Only set ForceRedownload if the previous UpdateMode was different
+ // to redownload all plugin with pdb files
+ if (db_get_b(NULL, MODULENAME, DB_SETTING_UPDATE_MODE, UPDATE_MODE_STABLE) != UPDATE_MODE_STABLE_SYMBOLS) {
+ db_set_b(NULL, MODULENAME, DB_SETTING_REDOWNLOAD, opts.bForceRedownload = 1);
+ db_set_b(NULL, MODULENAME, DB_SETTING_UPDATE_MODE, UPDATE_MODE_STABLE_SYMBOLS);
+ }
+ }
else if ( IsDlgButtonChecked(hwndDlg, IDC_TRUNK)) {
db_set_b(NULL, MODULENAME, DB_SETTING_UPDATE_MODE, UPDATE_MODE_TRUNK);
if (!opts.bChangePlatform)
diff --git a/plugins/PluginUpdater/src/resource.h b/plugins/PluginUpdater/src/resource.h
index 1c36dbb44e..26328ba77c 100644
--- a/plugins/PluginUpdater/src/resource.h
+++ b/plugins/PluginUpdater/src/resource.h
@@ -1,6 +1,6 @@
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
-// Used by d:\Miranda_orig\plugins\PluginUpdater\res\Resource.rc
+// Used by D:\Miranda NG Git_orig_commit\miranda-ng\plugins\PluginUpdater\res\Resource.rc
//
#define IDD_UPDATE 101
#define IDD_OPT_UPDATENOTIFY 102
@@ -50,6 +50,7 @@
#define IDC_SILENTMODE 1047
#define IDC_NEEDRESTARTLABEL 1048
#define IDC_BACKUP 1049
+#define IDC_STABLE_SYMBOLS 1050
#define IDC_CHANGE_PLATFORM 1052
#define IDC_MSG_BOXES 40071
#define IDC_ERRORS 40072
diff --git a/plugins/PluginUpdater/src/stdafx.h b/plugins/PluginUpdater/src/stdafx.h
index b05403facf..b0b79345e8 100644
--- a/plugins/PluginUpdater/src/stdafx.h
+++ b/plugins/PluginUpdater/src/stdafx.h
@@ -101,6 +101,7 @@ extern struct PlugOptions
#define DEFAULT_UPDATE_URL L"https://miranda-ng.org/distr/stable/x%d"
#define DEFAULT_UPDATE_URL_TRUNK L"https://miranda-ng.org/distr/x%d"
#define DEFAULT_UPDATE_URL_TRUNK_SYMBOLS L"https://miranda-ng.org/distr/pdb_x%d"
+#define DEFAULT_UPDATE_URL_STABLE_SYMBOLS L"https://miranda-ng.org/distr/stable/pdb_x%d"
#define FILENAME_X64 L"miranda64.exe"
@@ -128,7 +129,8 @@ extern struct PlugOptions
#define UPDATE_MODE_STABLE 1
#define UPDATE_MODE_TRUNK 2
#define UPDATE_MODE_TRUNK_SYMBOLS 3
-#define UPDATE_MODE_MAX_VALUE 3 // when adding new mode, increment this number
+#define UPDATE_MODE_STABLE_SYMBOLS 4
+#define UPDATE_MODE_MAX_VALUE 4 // when adding new mode, increment this number
#define DB_SETTING_UPDATE_MODE "UpdateMode"
#define DB_SETTING_UPDATE_URL "UpdateURL"