[setup - the official Cygwin setup program] branch master, updated. release_2.932-3-g64f8b310
Jon Turney
jturney@sourceware.org
Sun Jul 21 15:53:41 GMT 2024
https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=64f8b31078f3990fde5f6d9bf79f0cb114ab9d46
commit 64f8b31078f3990fde5f6d9bf79f0cb114ab9d46
Author: Yang Yulin <yylofficial@hotmail.com>
Date: Sun Jul 7 09:37:05 2024 +0800
Added dpiAwareness element to manifest
This causes top-level and child HWNDs to be notified of DPI changes,
which avoid the content of the window appearing blurry when changing
DPI.
https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=a8d773ed09b265716b9fcb736907cd2f55a2d31f
commit a8d773ed09b265716b9fcb736907cd2f55a2d31f
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date: Sun Jun 23 19:26:27 2024 +0100
Remove the odd "Drop back to attended mode" logic
Remove the odd "Drop back to attended mode" logic, only used in one
place (when we do not have any selected sites), and instead report this
as a problem and terminate with non-zero exit code.
https://cygwin.com/pipermail/cygwin/2024-June/256158.html
https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=f4653c810dad8c8400409ae32eb8d8d1227457a6
commit f4653c810dad8c8400409ae32eb8d8d1227457a6
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date: Thu Jun 6 16:56:56 2024 +0100
Add support for 'redir' flag in mirrors.lst
Diff:
---
proppage.cc | 14 +++++++-------
setup.exe.manifest | 5 +++--
site.cc | 46 +++++++++++++++++++++++++++++++++++++++++-----
site.h | 6 +++++-
4 files changed, 56 insertions(+), 15 deletions(-)
diff --git a/proppage.cc b/proppage.cc
index 514c1085..d177f2dd 100644
--- a/proppage.cc
+++ b/proppage.cc
@@ -25,7 +25,7 @@
#include "getopt++/BoolOption.h"
#include "Exception.h"
-#include "LogSingleton.h"
+#include "LogFile.h"
bool PropertyPage::DoOnceForSheet = true;
@@ -196,17 +196,17 @@ PropertyPage::DialogProc (UINT message, WPARAM wParam, LPARAM lParam)
OnActivate ();
- if (unattended_mode)
+ if (unattended_mode)
{
- // -2 == disable unattended mode, display page
+ // -2 == cannot continue in unattended mode
// -1 == display page but stay in unattended mode (progress bars)
// 0 == skip to next page (in propsheet sequence)
// IDD_* == skip to specified page
long nextwindow = OnUnattended();
if (nextwindow == -2)
{
- unattended_mode = attended;
- SetWindowLongPtr (GetHWND (), DWLP_MSGRESULT, 0);
+ Log (LOG_PLAIN) << "Unable to continue" << endLog;
+ Logger ().exit (1);
return TRUE;
}
else if (nextwindow == -1)
@@ -224,8 +224,8 @@ PropertyPage::DialogProc (UINT message, WPARAM wParam, LPARAM lParam)
SetWindowLongPtr (GetHWND (), DWLP_MSGRESULT, nextwindow);
return TRUE;
}
- }
- else
+ }
+ else
{
// 0 == Accept activation, -1 = Don't accept
::SetWindowLongPtr (GetHWND (), DWLP_MSGRESULT, 0);
diff --git a/setup.exe.manifest b/setup.exe.manifest
index 45a5f082..f3820fac 100755
--- a/setup.exe.manifest
+++ b/setup.exe.manifest
@@ -40,8 +40,9 @@
</application>
</compatibility>
<asmv3:application xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
- <asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
- <dpiAware>true</dpiAware>
+ <asmv3:windowsSettings>
+ <dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true/pm</dpiAware>
+ <dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitorV2</dpiAwareness>
</asmv3:windowsSettings>
</asmv3:application>
</assembly>
diff --git a/site.cc b/site.cc
index 569235a9..aa605617 100644
--- a/site.cc
+++ b/site.cc
@@ -142,7 +142,8 @@ site_list_type::site_list_type (const std::string &_url,
const std::string &_area,
const std::string &_location,
bool _from_mirrors_lst,
- bool _noshow = false)
+ bool _noshow = false,
+ const std::string &_redir = "")
{
url = _url;
servername = _servername;
@@ -150,6 +151,7 @@ site_list_type::site_list_type (const std::string &_url,
location = _location;
from_mirrors_lst = _from_mirrors_lst;
noshow = _noshow;
+ redir = _redir;
/* Canonicalize URL to ensure it ends with a '/' */
if (url.at(url.length()-1) != '/')
@@ -286,9 +288,25 @@ load_site_list (SiteList& theSites, char *theString)
if (!semi[0] || !semi[1] || !semi[2])
continue;
- bool noshow = semi[3] && (strncmp(semi[3], "noshow", 6) == 0);
+ /* fourth part is an optional, comma-delimited set of flags */
+ bool noshow = FALSE;
+ const char *redir = "";
- site_list_type newsite (bol, semi[0], semi[1], semi[2], true, noshow);
+ char *flag = semi[3];
+ while (flag)
+ {
+ if (strncmp(flag, "noshow", 6) == 0)
+ noshow = TRUE;
+ else if (strncmp(flag, "redir=", 6) == 0)
+ redir = flag+6;
+
+ flag = strchr (flag, ',');
+ if (flag)
+ *flag++ = 0;
+ }
+
+ /* add site to list */
+ site_list_type newsite (bol, semi[0], semi[1], semi[2], true, noshow, redir);
site_list_insert (theSites, newsite);
}
else
@@ -324,6 +342,23 @@ migrate_selected_site_list()
*i = migrate;
}
}
+
+ /* If the saved selected site URL appears in the site list with a redir
+ flag, replace with the redirected URL */
+ {
+ SiteList::iterator j = find (all_site_list.begin(),
+ all_site_list.end(), *i);
+
+ if (j != all_site_list.end())
+ {
+ if (!j->redir.empty())
+ {
+ site_list_type migrate(j->redir, "", "", "", false);
+ Log (LOG_PLAIN) << "Migrated " << i->url << " to " << j->redir << endLog;
+ *i = migrate;
+ }
+ }
+ }
}
}
@@ -630,8 +665,9 @@ SitePage::OnUnattended ()
{
if (SendMessage (GetDlgItem (IDC_URL_LIST), LB_GETSELCOUNT, 0, 0) > 0)
return OnNext ();
- else
- return -2;
+
+ Log (LOG_PLAIN) << "No package repository site(s) specified" << endLog;
+ return -2;
}
void
diff --git a/site.h b/site.h
index 6ec7cf39..387de29d 100644
--- a/site.h
+++ b/site.h
@@ -50,7 +50,8 @@ class site_list_type
public:
site_list_type () : url (), displayed_url (), key () {};
site_list_type (const std::string& , const std::string& ,
- const std::string& , const std::string&, bool, bool);
+ const std::string& , const std::string&, bool, bool,
+ const std::string &);
~site_list_type () {};
std::string url;
// provided by mirrors.lst but not used
@@ -61,6 +62,9 @@ public:
bool from_mirrors_lst;
// marked as "noshow"
bool noshow;
+ // url to redirect to
+ std::string redir;
+
std::string displayed_url;
// sort key
std::string key;
More information about the Cygwin-apps-cvs
mailing list