public inbox for cygwin-apps-cvs@sourceware.org
help / color / mirror / Atom feed
* [setup - the official Cygwin setup program] branch master, updated. release_2.917
@ 2022-01-24 19:23 Jon TURNEY
0 siblings, 0 replies; 2+ messages in thread
From: Jon TURNEY @ 2022-01-24 19:23 UTC (permalink / raw)
To: cygwin-apps-cvs
https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=b41697a3adf8a0eb066be6206d7d38ee6272dfc1
commit b41697a3adf8a0eb066be6206d7d38ee6272dfc1
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date: Mon Jan 24 19:19:46 2022 +0000
Only show deprecation warning once if we're going to elevate
Diff:
---
main.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/main.cc b/main.cc
index a48ee423..9d1f419d 100644
--- a/main.cc
+++ b/main.cc
@@ -339,7 +339,7 @@ WinMain (HINSTANCE h,
}
/* Warn if Windows version is deprecated for Cygwin */
- if (!DeprecatedOption)
+ if (!DeprecatedOption && !elevate)
{
if
#ifdef _X86_
^ permalink raw reply [flat|nested] 2+ messages in thread
* [setup - the official Cygwin setup program] branch master, updated. release_2.917
@ 2022-01-24 17:58 Jon TURNEY
0 siblings, 0 replies; 2+ messages in thread
From: Jon TURNEY @ 2022-01-24 17:58 UTC (permalink / raw)
To: cygwin-apps-cvs
https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=6c940f562bece60e42aebe652d49c4023dfbd3cf
commit 6c940f562bece60e42aebe652d49c4023dfbd3cf
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date: Mon Jan 24 17:07:15 2022 +0000
Don't create install package if there's no install: line
Don't erroneously create an install package if there's no install: line
for that version.
If it's for the latest version and something depends on this package,
the solver will produce a solution containing that package & version,
so we'll try to download it without having a path to fetch it from,
leading to download errors which are impossible to resolve.
https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=71046cdd73cbcce2e2713d188c10d4b573c5dddf
commit 71046cdd73cbcce2e2713d188c10d4b573c5dddf
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date: Mon Jan 24 16:28:29 2022 +0000
Use SHMessageBoxCheck() for MessageBox with "don't show again" checkbox
Diff:
---
IniDBBuilderPackage.cc | 4 ++++
main.cc | 4 ++--
msg.cc | 20 +++++++++++++++++---
msg.h | 1 +
4 files changed, 24 insertions(+), 5 deletions(-)
diff --git a/IniDBBuilderPackage.cc b/IniDBBuilderPackage.cc
index 96517e9b..3a8f10f8 100644
--- a/IniDBBuilderPackage.cc
+++ b/IniDBBuilderPackage.cc
@@ -376,6 +376,10 @@ IniDBBuilderPackage::process ()
if (cbpv.version.empty())
return;
+ // no install: line, no package
+ if (!cbpv.archive.Canonical())
+ return;
+
#if DEBUG
Log (LOG_BABBLE) << "Finished with package " << name << endLog;
Log (LOG_BABBLE) << "Version " << cbpv.version << endLog;
diff --git a/main.cc b/main.cc
index ea4152f5..a48ee423 100644
--- a/main.cc
+++ b/main.cc
@@ -348,10 +348,10 @@ WinMain (HINSTANCE h,
(!is_64bit)
#endif
mbox (NULL, IDS_DEPRECATED_WINDOWS_ARCH,
- MB_ICONEXCLAMATION | MB_OK);
+ MB_ICONEXCLAMATION | MB_OK | MB_DSA_CHECKBOX);
else if ((OSMajorVersion () == 6) && (OSMinorVersion() < 1))
mbox (NULL, IDS_DEPRECATED_WINDOWS_VERSION,
- MB_ICONEXCLAMATION | MB_OK);
+ MB_ICONEXCLAMATION | MB_OK | MB_DSA_CHECKBOX);
}
/* Set default DACL and Group. */
diff --git a/msg.cc b/msg.cc
index 00eaf5aa..39d87ebe 100644
--- a/msg.cc
+++ b/msg.cc
@@ -20,6 +20,7 @@
#include "LogFile.h"
#include "win32.h"
+#include <shlwapi.h>
#include <stdio.h>
#include <stdarg.h>
@@ -32,8 +33,6 @@ static int
unattended_result(int mb_type)
{
// Return some default values.
- Log (LOG_PLAIN) << "unattended_mode is set at mbox: returning default value" << endLog;
-
switch (mb_type & MB_TYPEMASK)
{
case MB_OK:
@@ -62,7 +61,10 @@ mbox (HWND owner, const char *buf, const char *name, int type)
// 'name' is not the mbox caption, just some text written to the log
Log (LOG_PLAIN) << "mbox " << name << ": " << buf << endLog;
if (unattended_mode)
+ {
+ Log (LOG_PLAIN) << "unattended_mode is set at mbox: returning default value" << endLog;
return unattended_result(type);
+ }
char caption[32];
LoadString (hinstance, IDS_MBOX_CAPTION, caption, sizeof (caption));
@@ -126,6 +128,9 @@ LRESULT CALLBACK CBTProc(int nCode, WPARAM wParam, LPARAM lParam) {
return CallNextHookEx(hMsgBoxHook, nCode, wParam, lParam);
}
+// registry key to store "don't show this again" state, made unique by including a GUID
+static const char *regkey = "Cygwin-Setup-d975d7b8-8c44-44a1-915a-7cf44b79cd88";
+
int
mbox(HWND owner, unsigned int format_id, int mb_type, ...)
{
@@ -163,7 +168,16 @@ mbox(HWND owner, unsigned int format_id, int mb_type, ...)
}
std::wstring caption = LoadStringW(IDS_MBOX_CAPTION);
- int retval = MessageBoxW(owner, buf.c_str(), caption.c_str(), mb_type);
+ int retval;
+ if (mb_type & MB_DSA_CHECKBOX)
+ {
+ mb_type &= ~MB_DSA_CHECKBOX;
+ std::wstring regkey_msg = format(L"%s-%d", regkey, format_id);
+ retval = SHMessageBoxCheckW(owner, buf.c_str(), caption.c_str(), mb_type,
+ unattended_result(mb_type), regkey_msg.c_str());
+ }
+ else
+ retval = MessageBoxW(owner, buf.c_str(), caption.c_str(), mb_type);
// When the the retry_continue customization is active, adjust the return
// value for less confusing results
diff --git a/msg.h b/msg.h
index 98dff693..5f5d6578 100644
--- a/msg.h
+++ b/msg.h
@@ -38,5 +38,6 @@ int mbox (HWND owner, const char *buf, const char *name, int type);
int mbox(HWND owner, unsigned int format_id, int mb_type, ...);
#define MB_RETRYCONTINUE 7
+#define MB_DSA_CHECKBOX 0x80000000 // with a "Dont Show Me This Dialog Again" checkbox
#endif /* SETUP_MSG_H */
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-01-24 19:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-24 19:23 [setup - the official Cygwin setup program] branch master, updated. release_2.917 Jon TURNEY
-- strict thread matches above, loose matches on Subject: below --
2022-01-24 17:58 Jon TURNEY
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).