public inbox for cygwin-apps-cvs@sourceware.org
help / color / mirror / Atom feed
* [setup - the official Cygwin setup program] branch master, updated. release_2.906
@ 2021-03-16 18:31 Jon TURNEY
  0 siblings, 0 replies; 2+ messages in thread
From: Jon TURNEY @ 2021-03-16 18:31 UTC (permalink / raw)
  To: cygwin-apps-cvs




https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=d4527e2a3b55874b40e1286c7e390fabf7102b07

commit d4527e2a3b55874b40e1286c7e390fabf7102b07
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date:   Tue Mar 16 16:35:59 2021 +0000

    Add a github action to cross-build on Fedora

https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=b3487b36ad848cf1a1e8df06fde280e2c9c8e147

commit b3487b36ad848cf1a1e8df06fde280e2c9c8e147
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date:   Wed Feb 26 00:45:25 2020 +0000

    Add scripts used in packaging

https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=ca68262f8959338c333ed309f629efa79ec93c0d

commit ca68262f8959338c333ed309f629efa79ec93c0d
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date:   Tue Mar 16 17:38:49 2021 +0000

    Link with libssp
    
    Fedora builds some of the libraries we use with -D_FORTIFY_SOURCE=2, so
    we need to link with libssp to provide __memcpy_chk etc.
    
    Future work: build setup itself with -D_FORTIFY_SOURCE=2.

https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=2752cfd1600fe0180f749a91954e0538e8a4acd9

commit 2752cfd1600fe0180f749a91954e0538e8a4acd9
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date:   Tue Mar 16 15:55:59 2021 +0000

    Turn on __USE_MINGW_ANSI_STDIO everywhere
    
    __USE_MINGW_ANSI_STDIO is turned on by C++ STL headers, so we're getting
    this define due to that in most places, except where we happen to
    include stdio.h before them. archive_tar.cc happens to do that, and
    wants ANSI stdio since da31ad35, so turn it on unconditionally.
    
    It's also turned on for C++11 by MinGW headers >= 8.0.0, which Cygwin
    already has, so this already works when building there, and we're going
    to have to deal with any other problem that might cause elsewhere in the
    source eventually anyhow.
    
    This fixes building since da31ad35 on F33, which only has mingw-headers
    7.0.0.


Diff:
---
 .github/workflows/fedora.yml                | 24 ++++++++++++++++++++++++
 Makefile.am                                 |  6 ++++--
 packaging-scripts/checkout.sh               |  7 +++++++
 packaging-scripts/conf.sh                   | 21 +++++++++++++++++++++
 packaging-scripts/fedora-prereqs-install.sh | 11 +++++++++++
 5 files changed, 67 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/fedora.yml b/.github/workflows/fedora.yml
new file mode 100644
index 00000000..f732d296
--- /dev/null
+++ b/.github/workflows/fedora.yml
@@ -0,0 +1,24 @@
+name: Fedora
+
+on: push
+
+jobs:
+  fedora-build:
+    name: Fedora
+    runs-on: ubuntu-latest
+    container: fedora:latest
+    steps:
+    # install git, so checkout uses git to fetch repository, so 'git describe' works
+    - name: Install git
+      run: dnf install -y git
+
+    # fetch all history for all tags for 'git describe'
+    - uses: actions/checkout@v2
+      with:
+        fetch-depth: 0
+
+    - name: Install build prerequisites
+      run: packaging-scripts/fedora-prereqs-install.sh
+
+    - name: Build
+      run: packaging-scripts/conf.sh upx
diff --git a/Makefile.am b/Makefile.am
index 1a2171c9..d10ad6b1 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -28,7 +28,8 @@ AM_CFLAGS = $(BASECXXFLAGS) -Wmissing-declarations -Winline \
 AM_YFLAGS = -d
 AM_LFLAGS = -8
 WINDRES = @WINDRES@
-AM_CPPFLAGS = -DLZMA_API_STATIC -I$(srcdir)/libgetopt++/include \
+AM_CPPFLAGS = -D__USE_MINGW_ANSI_STDIO=1 -DLZMA_API_STATIC\
+	       -I$(srcdir)/libgetopt++/include \
 	       $(ZLIB_CFLAGS) $(LZMA_CFLAGS) $(ZSTD_CFLAGS) $(LIBCRYPT_CFLAGS) $(LIBSOLV_CFLAGS)
 
 inilex_CXXFLAGS:=-Wno-sign-compare
@@ -93,7 +94,8 @@ inilint_SOURCES = \
 	$(BZ2_LIBS) \
 	$(ZLIB_LIBS) \
 	$(LIBSOLV_LIBS) -lregex \
-	-lshlwapi -lcomctl32 -lole32 -lpsapi -luuid -lntdll -lwininet -lws2_32 -lmingw32
+	-lshlwapi -lcomctl32 -lole32 -lpsapi -luuid -lntdll -lwininet -lws2_32 \
+	-lmingw32 -lssp
 @SETUP@_LDFLAGS = -mwindows -Wc,-static -static-libtool-libs
 @SETUP@_SOURCES = \
 	actionlist.h \
diff --git a/packaging-scripts/checkout.sh b/packaging-scripts/checkout.sh
new file mode 100755
index 00000000..42616c85
--- /dev/null
+++ b/packaging-scripts/checkout.sh
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+rm -rf setup
+mkdir setup
+cd setup
+git clone git://cygwin.com/git/cygwin-setup.git
+
diff --git a/packaging-scripts/conf.sh b/packaging-scripts/conf.sh
new file mode 100755
index 00000000..10d78b46
--- /dev/null
+++ b/packaging-scripts/conf.sh
@@ -0,0 +1,21 @@
+#!/bin/bash -e
+
+TARGET=${1:-upx}
+
+function arch() {
+cpu=$1
+rm -rf $cpu
+mkdir $cpu
+cd $cpu
+
+NOCONFIGURE=1 ../bootstrap.sh
+../configure --host=$cpu-w64-mingw32 --target=$cpu-w64-mingw32
+
+make ${TARGET}
+
+cd ..
+}
+
+for ARCH in i686 x86_64 ; do
+    arch ${ARCH}
+done
diff --git a/packaging-scripts/fedora-prereqs-install.sh b/packaging-scripts/fedora-prereqs-install.sh
new file mode 100755
index 00000000..edc50b10
--- /dev/null
+++ b/packaging-scripts/fedora-prereqs-install.sh
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+sudo dnf -y install automake bison diffutils flex libtool make upx
+sudo dnf -y install mingw32-gcc-c++ mingw32-zlib-static mingw32-libgcrypt-static mingw32-bzip2-static mingw32-xz-libs-static mingw32-winpthreads-static
+sudo dnf -y install mingw64-gcc-c++ mingw64-zlib-static mingw64-libgcrypt-static mingw64-bzip2-static mingw64-xz-libs-static mingw64-winpthreads-static
+sudo dnf -y install 'dnf-command(copr)'
+sudo dnf -y copr enable jturney/mingw-libsolv
+sudo dnf -y install mingw32-libsolv-static mingw64-libsolv-static
+sudo dnf -y install mingw32-libgnurx-static mingw64-libgnurx-static
+sudo dnf -y copr enable jturney/mingw-zstd
+sudo dnf -y install mingw32-libzstd-static mingw64-libzstd-static



^ permalink raw reply	[flat|nested] 2+ messages in thread
* [setup - the official Cygwin setup program] branch master, updated. release_2.906
@ 2021-03-15 17:58 Jon TURNEY
  0 siblings, 0 replies; 2+ messages in thread
From: Jon TURNEY @ 2021-03-15 17:58 UTC (permalink / raw)
  To: cygwin-apps-cvs




https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=2024cace3d41b80fb6cab9e84806cc2f012e1a60

commit 2024cace3d41b80fb6cab9e84806cc2f012e1a60
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date:   Mon Mar 15 17:40:51 2021 +0000

    Update displayed copyright to 2021

https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=898fa4a1437c234a969ae84d6a3944c37d711559

commit 898fa4a1437c234a969ae84d6a3944c37d711559
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date:   Mon Mar 15 17:38:13 2021 +0000

    Revert "Remove pointless variable from do_download_site_info_thread()"
    
    This reverts commit d15c11e7954977ee27712989b36e7102fc70639e.
    
    This wasn't pointless, as it was causing the site list to be fetched
    only once, even if we passed through that page more than once.

https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=f34a20e7adaead364fd29c8f00393fdfcfba359b

commit f34a20e7adaead364fd29c8f00393fdfcfba359b
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date:   Sun Sep 6 19:23:23 2020 +0100

    Move package action strings to string table resource
    
    Move package action strings to string table resource.
    Switch ListView control to wide-char.

https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=e32e0a4ac9805799abe9ceb08970a25b8343e40c

commit e32e0a4ac9805799abe9ceb08970a25b8343e40c
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date:   Wed Sep 16 22:21:08 2020 +0100

    Add a UTF-8 string to wstring utility function.

https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=cd8da753011e50126ba56cfeb7c55ead89fa7af7

commit cd8da753011e50126ba56cfeb7c55ead89fa7af7
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date:   Sun Sep 6 17:04:20 2020 +0100

    Remove long-obsolete 'DISCARABLE' from resource file
    
    The 'DISCARDABLE' memory attribute was only signficant on Win16.

https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=b3cc8ab6692d0ff958a999fe690424fb90b79a8b

commit b3cc8ab6692d0ff958a999fe690424fb90b79a8b
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date:   Tue Sep 1 01:43:53 2020 +0100

    Move installation progress strings to string table resource

https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=207380f40cc6944fd40fe41862dc57eec0eac38d

commit 207380f40cc6944fd40fe41862dc57eec0eac38d
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date:   Fri Sep 4 16:03:08 2020 +0100

    Allow progress status to be set directly from a resource
    
    Allow progress status to be set directly from a (localizable) resource.

https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=a2362bc587ca3152e4f6711a72afb5d291cd762a

commit a2362bc587ca3152e4f6711a72afb5d291cd762a
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date:   Fri Sep 4 16:40:14 2020 +0100

    Add LoadStringW to std::wstring utility function

https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=0a416c48c885e7a31920bf7d17821ce7494e9521

commit 0a416c48c885e7a31920bf7d17821ce7494e9521
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date:   Mon Aug 31 20:34:24 2020 +0100

    Fix version used when not built from a git checkout

https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=0af398cfca4f0dd461e9cd973b8fd9bb972509f3

commit 0af398cfca4f0dd461e9cd973b8fd9bb972509f3
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date:   Wed Aug 26 18:24:18 2020 +0100

    Warn about unknown package names
    
    Warn about unknown package names used with '--packages' or
    '--remove-packages' options.

https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=a692b7f48448efd96c8ff26ff106d3f774ee9686

commit a692b7f48448efd96c8ff26ff106d3f774ee9686
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date:   Wed Aug 26 18:10:24 2020 +0100

    Downgrade logging of looking for AV service
    
    Downgrade to debug always emitted logging about trying to find AV
    service.


Diff:
---
 ActionList.h        | 12 ++++++--
 AntiVirus.cc        |  4 +--
 ListView.cc         | 39 ++++++++++++++------------
 ListView.h          |  2 +-
 Makefile.am         |  2 +-
 PickCategoryLine.cc | 17 ++++++------
 PickCategoryLine.h  |  2 +-
 PickPackageLine.cc  | 16 +++++------
 PickPackageLine.h   |  2 +-
 String++.cc         | 18 ++++++++++++
 String++.h          |  2 ++
 download.cc         |  2 +-
 geturl.cc           |  4 +--
 ini.cc              |  6 ++--
 install.cc          |  8 +++---
 package_meta.cc     | 60 +++++++++++++++++++++++++---------------
 package_meta.h      |  4 +--
 package_source.cc   |  5 ++--
 postinstall.cc      |  2 +-
 prereq.cc           |  2 +-
 res.rc              | 79 +++++++++++++++++++++++++++++++++--------------------
 resource.h          | 25 +++++++++++++++--
 site.cc             |  6 ++--
 threebar.cc         | 24 ++++++++++++++++
 threebar.h          |  5 ++++
 win32.cc            | 12 ++++++++
 win32.h             |  2 ++
 27 files changed, 249 insertions(+), 113 deletions(-)

diff --git a/ActionList.h b/ActionList.h
index 2e2d424e..be424538 100644
--- a/ActionList.h
+++ b/ActionList.h
@@ -16,6 +16,7 @@
 
 #include <string>
 #include <vector>
+#include "win32.h"
 
 // ---------------------------------------------------------------------------
 // interface to class ActionList
@@ -26,14 +27,14 @@
 class Action
 {
  public:
-  Action(const std::string &_name, int _id, bool _selected, bool _enabled) :
+  Action(const std::wstring &_name, int _id, bool _selected, bool _enabled) :
     name(_name),
     id(_id),
     selected(_selected),
     enabled(_enabled)
   { };
 
-  std::string name;
+  std::wstring name;
   int id;
   bool selected;
   bool enabled;
@@ -44,11 +45,16 @@ typedef std::vector<Action> Actions;
 class ActionList
 {
  public:
-  void add(const std::string &name, int id, bool selected, bool enabled)
+  void add(const std::wstring &name, int id, bool selected, bool enabled)
   {
     Action act(name, id, selected, enabled);
     list.push_back(act);
   };
+  void add(unsigned int name_res, int id, bool selected, bool enabled)
+  {
+    const std::wstring name = LoadStringW(name_res);
+    add(name, id, selected, enabled);
+  };
   Actions list;
 };
 
diff --git a/AntiVirus.cc b/AntiVirus.cc
index 876eb027..051a434d 100644
--- a/AntiVirus.cc
+++ b/AntiVirus.cc
@@ -163,7 +163,7 @@ detect ()
     SCM = OpenSCManager (NULL, NULL, SC_MANAGER_ALL_ACCESS);
 
     if (!SCM) {
-	Log (LOG_PLAIN) << "Could not open Service control manager" << endLog;
+	Log (LOG_BABBLE) << "Could not open Service control manager" << endLog;
 	return;
     }
 
@@ -174,7 +174,7 @@ detect ()
 	SERVICE_QUERY_STATUS| SERVICE_STOP| SERVICE_START);
 
     if (!McAfeeService) {
-	Log (LOG_PLAIN) << "Could not open service McShield for query, start and stop. McAfee may not be installed, or we don't have access." << endLog;
+	Log (LOG_BABBLE) << "Could not open service McShield for query, start and stop. McAfee may not be installed, or we don't have access." << endLog;
 	CloseServiceHandle(SCM);
 	return;
     }
diff --git a/ListView.cc b/ListView.cc
index a6dc56d8..db99d98a 100644
--- a/ListView.cc
+++ b/ListView.cc
@@ -14,6 +14,7 @@
 #include "ListView.h"
 #include "LogSingleton.h"
 #include "resource.h"
+#include "String++.h"
 
 #include <commctrl.h>
 
@@ -95,6 +96,9 @@ ListView::init(HWND parent, int id, HeaderList headers)
   SendMessage(hWndTip, TTM_SETDELAYTIME, TTDT_AUTOPOP, (LPARAM) MAKELONG (30000, 0));
   // match tip width used elsewhere
   SendMessage(hWndTip, TTM_SETMAXTIPWIDTH, 0, 450);
+
+  // switch to using wide-char WM_NOTIFY messages
+  ListView_SetUnicodeFormat(hWndListView, TRUE);
 }
 
 void
@@ -256,29 +260,30 @@ ListView::setContents(ListViewContents *_contents, bool tree)
   RedrawWindow(hWndListView, NULL, NULL, RDW_ERASE | RDW_FRAME | RDW_INVALIDATE | RDW_ALLCHILDREN);
 }
 
-// Helper class: The char * pointer we hand back needs to remain valid for some
-// time after OnNotify returns, when the std::string we have retrieved has gone
-// out of scope, so a static instance of this class maintains a local cache.
-class StringCache
+// Helper class: The pointer we hand back needs to remain valid for some time
+// after OnNotify returns, when the string object we have retrieved has gone out
+// of scope, so a static instance of this class maintains a local cache.
+template <class T> class StringCache
 {
+  typedef typename T::traits_type::char_type char_type;
 public:
   StringCache() : cache(NULL), cache_size(0) { }
-  StringCache & operator = (const std::string & s)
+  StringCache & operator = (const T & s)
   {
     if ((s.length() + 1) > cache_size)
       {
         cache_size = s.length() + 1;
-        cache = (char *)realloc(cache, cache_size);
+        cache = (char_type *)realloc(cache, cache_size * sizeof(char_type));
       }
-    strcpy(cache, s.c_str());
+    memcpy(cache, s.c_str(), cache_size * sizeof(char_type));
     return *this;
   }
-  operator char *() const
+  operator char_type *() const
   {
     return cache;
   }
 private:
-  char *cache;
+  char_type *cache;
   size_t cache_size;
 };
 
@@ -291,9 +296,9 @@ ListView::OnNotify (NMHDR *pNmHdr, LRESULT *pResult)
 
   switch (pNmHdr->code)
   {
-  case LVN_GETDISPINFO:
+  case LVN_GETDISPINFOW:
     {
-      NMLVDISPINFO *pNmLvDispInfo = (NMLVDISPINFO *)pNmHdr;
+      NMLVDISPINFOW *pNmLvDispInfo = (NMLVDISPINFOW *)pNmHdr;
 #if DEBUG
       Log (LOG_BABBLE) << "LVN_GETDISPINFO " << pNmLvDispInfo->item.iItem << endLog;
 #endif
@@ -302,7 +307,7 @@ ListView::OnNotify (NMHDR *pNmHdr, LRESULT *pResult)
           int iRow = pNmLvDispInfo->item.iItem;
           int iCol = pNmLvDispInfo->item.iSubItem;
 
-          static StringCache s;
+          static StringCache<std::wstring> s;
           s = (*contents)[iRow]->get_text(iCol);
           pNmLvDispInfo->item.pszText = s;
 
@@ -429,7 +434,7 @@ ListView::OnNotify (NMHDR *pNmHdr, LRESULT *pResult)
 
               case ListView::ControlType::checkbox:
                 {
-                  // get the subitem text
+                  // get the subitem text (as ASCII)
                   char buf[3];
                   ListView_GetItemText(hWndListView, iRow, iCol, buf, _countof(buf));
 
@@ -592,7 +597,7 @@ ListView::OnNotify (NMHDR *pNmHdr, LRESULT *pResult)
 #endif
 
       // get the tooltip text for that item/subitem
-      static StringCache tooltip;
+      static StringCache<std::string> tooltip;
       tooltip = "";
       if (contents)
         tooltip = (*contents)[iRow]->get_tooltip(iCol);
@@ -631,7 +636,7 @@ ListView::popup_menu(int iRow, int iCol, POINT p)
   // construct menu
   HMENU hMenu = CreatePopupMenu();
 
-  MENUITEMINFO mii;
+  MENUITEMINFOW mii;
   memset(&mii, 0, sizeof(mii));
   mii.cbSize = sizeof(mii);
   mii.fMask = MIIM_FTYPE | MIIM_STATE | MIIM_STRING | MIIM_ID;
@@ -644,12 +649,12 @@ ListView::popup_menu(int iRow, int iCol, POINT p)
   for (i = al->list.begin (); i != al->list.end (); ++i, ++j)
     {
       BOOL res;
-      mii.dwTypeData = (char *)i->name.c_str();
+      mii.dwTypeData = const_cast <wchar_t *> (i->name.c_str());
       mii.fState = (i->selected ? MFS_CHECKED : MFS_UNCHECKED |
                     i->enabled ? MFS_ENABLED : MFS_DISABLED);
       mii.wID = j;
 
-      res = InsertMenuItem(hMenu, -1, TRUE, &mii);
+      res = InsertMenuItemW(hMenu, -1, TRUE, &mii);
       if (!res) Log (LOG_BABBLE) << "InsertMenuItem failed " << endLog;
     }
 
diff --git a/ListView.h b/ListView.h
index 519b61a4..d6a5e32f 100644
--- a/ListView.h
+++ b/ListView.h
@@ -31,7 +31,7 @@ class ListViewLine
   enum class State { collapsed, expanded, nothing=-1 };
 
   virtual ~ListViewLine() {};
-  virtual const std::string get_text(int col) const = 0;
+  virtual const std::wstring get_text(int col) const = 0;
   virtual State get_state() const = 0;
   virtual const std::string get_tooltip(int col) const = 0;
   virtual int get_indent() const = 0;
diff --git a/Makefile.am b/Makefile.am
index b316764f..1a2171c9 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -259,7 +259,7 @@ inilint_SOURCES = \
 	csu_util/version_compare.cc \
 	csu_util/version_compare.h
 
-GITVER := $(shell cd $(srcdir) && git describe --match release_\* --abbrev=6 --dirty || "N/A")
+GITVER := $(shell cd $(srcdir) && git describe --match release_\* --abbrev=6 --dirty || echo "N/A")
 VER := $(subst release_,,$(GITVER))
 ARCH := @ARCH@
 
diff --git a/PickCategoryLine.cc b/PickCategoryLine.cc
index 7c1d464b..d2ac8992 100644
--- a/PickCategoryLine.cc
+++ b/PickCategoryLine.cc
@@ -18,9 +18,10 @@
 #include "PickView.h"
 #include "window.h"
 #include "package_meta.h"
+#include "resource.h"
 #include <sstream>
 
-const std::string
+const std::wstring
 PickCategoryLine::get_text (int col_num) const
 {
   if (col_num == pkgname_col)
@@ -29,13 +30,13 @@ PickCategoryLine::get_text (int col_num) const
       s << cat_tree->category().first;
       if (pkgcount)
         s << " (" << pkgcount << ")";
-      return s.str();
+      return string_to_wstring(s.str());
     }
   else if (col_num == new_col)
     {
-      return packagemeta::action_caption (cat_tree->action());
+      return LoadStringW(packagemeta::action_caption (cat_tree->action()));
     }
-  return "";
+  return L"";
 }
 
 int
@@ -68,11 +69,11 @@ PickCategoryLine::get_actions(int col) const
   ActionList *al = new ActionList();
   packagemeta::_actions current_default = cat_tree->action();
 
-  al->add("Default", (int)packagemeta::NoChange_action, (current_default == packagemeta::NoChange_action), TRUE);
-  al->add("Install", (int)packagemeta::Install_action, (current_default == packagemeta::Install_action), TRUE);
-  al->add(packagedb::task == PackageDB_Install ? "Reinstall" : "Retrieve",
+  al->add(IDS_ACTION_DEFAULT, (int)packagemeta::NoChange_action, (current_default == packagemeta::NoChange_action), TRUE);
+  al->add(IDS_ACTION_INSTALL, (int)packagemeta::Install_action, (current_default == packagemeta::Install_action), TRUE);
+  al->add(packagedb::task == PackageDB_Install ? IDS_ACTION_REINSTALL : IDS_ACTION_RETRIEVE,
           (int)packagemeta::Reinstall_action, (current_default == packagemeta::Reinstall_action), TRUE);
-  al->add("Uninstall", (int)packagemeta::Uninstall_action, (current_default == packagemeta::Uninstall_action), TRUE);
+  al->add(IDS_ACTION_UNINSTALL, (int)packagemeta::Uninstall_action, (current_default == packagemeta::Uninstall_action), TRUE);
 
   return al;
 }
diff --git a/PickCategoryLine.h b/PickCategoryLine.h
index 35b90e68..6a7321d1 100644
--- a/PickCategoryLine.h
+++ b/PickCategoryLine.h
@@ -34,7 +34,7 @@ public:
   {
   }
 
-  const std::string get_text(int col) const;
+  const std::wstring get_text(int col) const;
   State get_state() const;
   const std::string get_tooltip(int col) const;
   int get_indent() const;
diff --git a/PickPackageLine.cc b/PickPackageLine.cc
index f64c1012..ae1e5204 100644
--- a/PickPackageLine.cc
+++ b/PickPackageLine.cc
@@ -17,16 +17,16 @@
 #include "PickView.h"
 #include "package_db.h"
 
-const std::string
+const std::wstring
 PickPackageLine::get_text(int col_num) const
 {
   if (col_num == pkgname_col)
     {
-      return pkg.name;
+      return string_to_wstring(pkg.name);
     }
   else if (col_num == current_col)
     {
-      return pkg.installed.Canonical_version ();
+      return string_to_wstring(pkg.installed.Canonical_version());
     }
   else if (col_num == new_col)
     {
@@ -44,11 +44,11 @@ PickPackageLine::get_text(int col_num) const
       else
         srctick = "no";
 
-      return srctick;
+      return string_to_wstring(srctick);
     }
   else if (col_num == cat_col)
     {
-      return pkg.getReadableCategoryList();
+      return string_to_wstring(pkg.getReadableCategoryList());
     }
   else if (col_num == size_col)
     {
@@ -75,14 +75,14 @@ PickPackageLine::get_text(int col_num) const
       /* If size still 0, size must be unknown.  */
       std::string size = (sz == 0) ? "?" : format_1000s((sz+1023)/1024) + "k";
 
-      return size;
+      return string_to_wstring(size);
     }
   else if (col_num == pkg_col)
     {
-      return pkg.SDesc();
+      return string_to_wstring(pkg.SDesc());
     }
 
-  return "unknown";
+  return L"unknown";
 }
 
 const std::string
diff --git a/PickPackageLine.h b/PickPackageLine.h
index 3877a4b8..2c59e902 100644
--- a/PickPackageLine.h
+++ b/PickPackageLine.h
@@ -30,7 +30,7 @@ public:
     indent (aindent)
   {
   };
-  const std::string get_text(int col) const;
+  const std::wstring get_text(int col) const;
   State get_state() const { return State::nothing; }
   const std::string get_tooltip(int col) const;
   int get_indent() const;
diff --git a/String++.cc b/String++.cc
index 35106e54..0f88c61d 100644
--- a/String++.cc
+++ b/String++.cc
@@ -11,6 +11,7 @@
  */
 
 #include "String++.h"
+#include "win32.h"
 #include <string.h>
 #include <sstream>
 #include <algorithm>
@@ -96,3 +97,20 @@ replace(const std::string& haystack, const std::string& needle,
     search_start = pos + r_len;
   }
 }
+
+// convert a UTF-8 string to a UTF-16 wstring
+std::wstring string_to_wstring(const std::string &s)
+{
+  int n = MultiByteToWideChar(CP_UTF8, 0, s.c_str(), -1, NULL, 0);
+
+  if (n <= 0)
+    return L"conversion failed";
+
+  wchar_t *buf = new wchar_t[n+1];
+  MultiByteToWideChar(CP_UTF8, 0, s.c_str(), -1, buf, n);
+
+  std::wstring w(buf);
+  delete[] buf;
+
+  return w;
+}
diff --git a/String++.h b/String++.h
index e93252ab..3d977e9e 100644
--- a/String++.h
+++ b/String++.h
@@ -42,4 +42,6 @@ class casecompare_lt_op
 inline std::string operator+ (const char *a, const std::string& b)
 { return std::string(a) + b; }
 
+std::wstring string_to_wstring(const std::string &s);
+
 #endif /* SETUP_STRING___H */
diff --git a/download.cc b/download.cc
index e1512b41..3c3df7ec 100644
--- a/download.cc
+++ b/download.cc
@@ -278,7 +278,7 @@ do_download_thread (HINSTANCE h, HWND owner)
   total_download_bytes_sofar = 0;
   download_failures.clear ();
 
-  Progress.SetText1 ("Checking for packages to download...");
+  Progress.SetText1 (IDS_PROGRESS_CHECKING);
   Progress.SetText2 ("");
   Progress.SetText3 ("");
 
diff --git a/geturl.cc b/geturl.cc
index 78b7ce7e..321259e8 100644
--- a/geturl.cc
+++ b/geturl.cc
@@ -62,10 +62,10 @@ init_dialog (const std::string &url, int length)
 
   std::string::size_type divide = url.find_last_of('/');
   max_bytes = length;
-  Progress.SetText1("Downloading...");
+  Progress.SetText1(IDS_PROGRESS_DOWNLOADING);
   Progress.SetText2((url.substr(divide + 1) + " from "
                      + url.substr(0, divide)).c_str());
-  Progress.SetText3("Connecting...");
+  Progress.SetText3(IDS_PROGRESS_CONNECTING);
   Progress.SetBar1(0);
   start_tics = GetTickCount ();
 }
diff --git a/ini.cc b/ini.cc
index ee9c6482..54128342 100644
--- a/ini.cc
+++ b/ini.cc
@@ -71,7 +71,7 @@ public:
     {
       Progress.SetText2 ("");
       Progress.SetText3 ("");
-      Progress.SetText4 ("Progress:");
+      Progress.SetText4 (IDS_PROGRESS_PARSING);
 
       yyerror_count = 0;
       yyerror_messages.clear ();
@@ -98,7 +98,7 @@ public:
     }
   virtual void iniName (const std::string& name)
     {
-      Progress.SetText1 ("Parsing...");
+      Progress.SetText1 (IDS_PROGRESS_PARSING);
       Progress.SetText2 (name.c_str ());
       Progress.SetText3 ("");
       filename = name;
@@ -134,7 +134,7 @@ public:
     }
   virtual ~ GuiParseFeedback ()
     {
-      Progress.SetText4 ("Package:");
+      Progress.SetText4 (IDS_PROGRESS_PACKAGE);
     }
 private:
   unsigned int lastpct;
diff --git a/install.cc b/install.cc
index d1fb2ddf..51ec4b57 100644
--- a/install.cc
+++ b/install.cc
@@ -148,7 +148,7 @@ static int num_installs, num_uninstalls;
 void
 Installer::preremoveOne (packagemeta & pkg)
 {
-  Progress.SetText1 ("Running preremove script...");
+  Progress.SetText1 (IDS_PROGRESS_PREREMOVE);
   Progress.SetText2 (pkg.name.c_str());
   Log (LOG_BABBLE) << "Running preremove script for " << pkg.name << endLog;
   const unsigned numexts = 4;
@@ -163,7 +163,7 @@ Installer::uninstallOne (packagemeta & pkg)
   if (!pkg.installed)
     return;
 
-  Progress.SetText1 ("Uninstalling...");
+  Progress.SetText1 (IDS_PROGRESS_UNINSTALL);
   Progress.SetText2 (pkg.name.c_str());
   Log (LOG_PLAIN) << "Uninstalling " << pkg.name << endLog;
 
@@ -427,7 +427,7 @@ Installer::installOne (packagemeta &pkgm, const packageversion &ver,
 {
   if (!source.Canonical())
     return;
-  Progress.SetText1 ("Installing");
+  Progress.SetText1 (IDS_PROGRESS_INSTALL);
   Progress.SetText2 ((pkgm.name + "-" + ver.Canonical_version()).c_str());
 
   io_stream *pkgfile = NULL;
@@ -818,7 +818,7 @@ do_install_thread (HINSTANCE h, HWND owner)
   const SolverTransactionList &t = db.solution.transactions();
 
   /* Calculate the amount of data to md5sum */
-  Progress.SetText1("Calculating...");
+  Progress.SetText1(IDS_PROGRESS_CALCULATING);
   long long int md5sum_total_bytes = 0;
   for (SolverTransactionList::const_iterator i = t.begin (); i != t.end (); ++i)
   {
diff --git a/package_meta.cc b/package_meta.cc
index 61b7620b..73239f18 100644
--- a/package_meta.cc
+++ b/package_meta.cc
@@ -52,22 +52,22 @@ bool hasManualSelections = 0;
 /*****************/
 
 /* Return an appropriate category caption given the action */
-char const *
+unsigned int
 packagemeta::action_caption (_actions _value)
 {
   switch (_value)
     {
     case NoChange_action:
-      return "Default";
+      return IDS_ACTION_DEFAULT;
     case Install_action:
-      return "Install";
+      return IDS_ACTION_INSTALL;
     case Reinstall_action:
-      return "Reinstall";
+      return IDS_ACTION_REINSTALL;
     case Uninstall_action:
-      return "Uninstall";
+      return IDS_ACTION_UNINSTALL;
     }
 
-  return "Unknown";
+  return IDS_ACTION_UNKNOWN;
 }
 
 packagemeta::packagemeta (packagemeta const &rhs) :
@@ -295,6 +295,21 @@ parseNames (std::set<std::string> &parsed, std::string &option)
     parsed.insert (option);
 }
 
+static void
+validatePackageNames (std::set<std::string> &names)
+{
+  packagedb db;
+  for (std::set<std::string>::iterator n = names.begin();
+       n != names.end();
+       ++n)
+    {
+      if (db.packages.find(*n) == db.packages.end())
+        {
+          Log(LOG_PLAIN) << "Package '" << *n << "' not found." << endLog;
+        }
+    }
+}
+
 bool packagemeta::isManuallyWanted() const
 {
   static bool parsed_yet = false;
@@ -315,6 +330,7 @@ bool packagemeta::isManuallyWanted() const
       {
 	parseNames (parsed_names, *n);
       }
+    validatePackageNames (parsed_names);
     for (std::vector<std::string>::iterator n = categories_options.begin ();
 		n != categories_options.end (); ++n)
       {
@@ -365,6 +381,7 @@ bool packagemeta::isManuallyDeleted() const
       {
 	parseNames (parsed_delete, *n);
       }
+    validatePackageNames (parsed_delete);
     for (std::vector<std::string>::iterator n = categories_options.begin ();
 		n != categories_options.end (); ++n)
       {
@@ -423,26 +440,26 @@ packagemeta::LDesc () const
 };
 
 /* Return an appropriate caption given the current action. */
-std::string
+std::wstring
 packagemeta::action_caption () const
 {
   switch (_action)
     {
     case Uninstall_action:
-      return "Uninstall";
+      return LoadStringW(IDS_ACTION_UNINSTALL);
     case NoChange_action:
       if (!desired)
-        return "Skip";
+        return LoadStringW(IDS_ACTION_SKIP);
       if (desired.sourcePackage() && srcpicked())
         /* FIXME: Redo source should come up if the tarball is already present locally */
-        return "Source";
-      return "Keep";
+        return LoadStringW(IDS_ACTION_SOURCE);
+      return LoadStringW(IDS_ACTION_KEEP);
     case Reinstall_action:
-      return packagedb::task == PackageDB_Install ? "Reinstall" : "Retrieve";
+      return LoadStringW(packagedb::task == PackageDB_Install ? IDS_ACTION_REINSTALL : IDS_ACTION_RETRIEVE);
     case Install_action:
-      return desired.Canonical_version ();
+      return string_to_wstring(desired.Canonical_version());
     }
-  return "Unknown";
+  return LoadStringW(IDS_ACTION_UNKNOWN);
 }
 
 void
@@ -493,23 +510,23 @@ packagemeta::list_actions(trusts const trust)
   // build the list of possible actions
   ActionList *al = new ActionList();
 
-  al->add("Uninstall", (int)Uninstall_action, (_action == Uninstall_action), bool(installed));
-  al->add("Skip", (int)NoChange_action, (_action == NoChange_action) && !installed, !installed);
+  al->add(IDS_ACTION_UNINSTALL, (int)Uninstall_action, (_action == Uninstall_action), bool(installed));
+  al->add(IDS_ACTION_SKIP, (int)NoChange_action, (_action == NoChange_action) && !installed, !installed);
 
   std::set<packageversion>::iterator i;
   for (i = versions.begin (); i != versions.end (); ++i)
     {
       if (*i == installed)
         {
-          al->add("Keep", (int)NoChange_action, (_action == NoChange_action), TRUE);
-          al->add(packagedb::task == PackageDB_Install ? "Reinstall" : "Retrieve",
+          al->add(IDS_ACTION_KEEP, (int)NoChange_action, (_action == NoChange_action), TRUE);
+          al->add(packagedb::task == PackageDB_Install ? IDS_ACTION_REINSTALL : IDS_ACTION_RETRIEVE,
                   (int)Reinstall_action, (_action == Reinstall_action), TRUE);
         }
       else
         {
-          std::string label = i->Canonical_version().c_str();
+          std::wstring label = string_to_wstring(i->Canonical_version());
           if (packagedb::solver.is_test_package(*i))
-            label += " (Test)";
+            label += L" (Test)";
           al->add(label,
                   -std::distance(versions.begin (), i),
                   (_action == Install_action) && (*i == desired),
@@ -711,11 +728,10 @@ packagemeta::logSelectionStatus() const
   packagemeta const & pkg = *this;
   const char *trust = ((pkg.desired == pkg.curr) ? "curr"
                : (pkg.desired == pkg.exp) ? "test" : "unknown");
-  std::string action = pkg.action_caption ();
   const std::string installed =
    pkg.installed ? pkg.installed.Canonical_version () : "none";
 
-  Log (LOG_BABBLE) << "[" << pkg.name << "] action=" << action << " trust=" << trust << " installed=" << installed << " src?=" << (pkg.desired && srcpicked() ? "yes" : "no") << endLog;
+  Log (LOG_BABBLE) << "[" << pkg.name << "] action=" << _action << " trust=" << trust << " installed=" << installed << " src?=" << (pkg.desired && srcpicked() ? "yes" : "no") << endLog;
   if (pkg.categories.size ())
     Log (LOG_BABBLE) << "     categories=" << for_each(pkg.categories.begin(), pkg.categories.end(), StringConcatenator(", ")).result << endLog;
 #if 0
diff --git a/package_meta.h b/package_meta.h
index 1f4f3be9..4faff410 100644
--- a/package_meta.h
+++ b/package_meta.h
@@ -58,7 +58,7 @@ public:
      Reinstall_action,
      Uninstall_action,
     };
-  static const char *action_caption (_actions value);
+  static unsigned int action_caption (_actions value);
 
   void set_action (_actions, packageversion const & default_version,
                    bool useraction = false);
@@ -77,7 +77,7 @@ public:
     version_blacklist = _list;
   }
 
-  std::string action_caption () const;
+  std::wstring action_caption () const;
   packageversion trustp (bool _default, trusts const t) const
   {
     /* If the user chose "test" and a "test" version is available, return it. */
diff --git a/package_source.cc b/package_source.cc
index dca1945e..9ae08cb7 100644
--- a/package_source.cc
+++ b/package_source.cc
@@ -25,6 +25,7 @@
 #include "Exception.h"
 #include "filemanip.h"
 #include "io_stream.h"
+#include "resource.h"
 
 extern ThreeBarProgressPage Progress;
 
@@ -113,7 +114,7 @@ packagesource::check_sha512 (const std::string fullname) const
   Log (LOG_BABBLE) << "Checking SHA512 for " << fullname << endLog;
 
   Progress.SetText1 (("Checking SHA512 for " + shortname).c_str ());
-  Progress.SetText4 ("Progress:");
+  Progress.SetText4 (IDS_PROGRESS_PROGRESS);
   Progress.SetBar1 (0);
 
   unsigned char buffer[64 * 1024];
@@ -162,7 +163,7 @@ packagesource::check_md5 (const std::string fullname) const
   Log (LOG_BABBLE) << "Checking MD5 for " << fullname << endLog;
 
   Progress.SetText1 (("Checking MD5 for " + shortname).c_str ());
-  Progress.SetText4 ("Progress:");
+  Progress.SetText4 (IDS_PROGRESS_PROGRESS);
   Progress.SetBar1 (0);
 
   unsigned char buffer[64 * 1024];
diff --git a/postinstall.cc b/postinstall.cc
index b4e0981a..136f40f1 100644
--- a/postinstall.cc
+++ b/postinstall.cc
@@ -145,7 +145,7 @@ private:
 static std::string
 do_postinstall_thread (HINSTANCE h, HWND owner)
 {
-  Progress.SetText1 ("Running...");
+  Progress.SetText1 (IDS_PROGRESS_POSTINSTALL);
   Progress.SetText2 ("");
   Progress.SetText3 ("");
   Progress.SetBar1 (0, 1);
diff --git a/prereq.cc b/prereq.cc
index a9aab21a..2382ee21 100644
--- a/prereq.cc
+++ b/prereq.cc
@@ -163,7 +163,7 @@ PrereqChecker::isMet ()
 {
   packagedb db;
 
-  Progress.SetText1 ("Solving dependencies...");
+  Progress.SetText1 (IDS_PROGRESS_SOLVING);
   Progress.SetText2 ("");
   Progress.SetText3 ("");
 
diff --git a/res.rc b/res.rc
index 2165545a..8739278d 100644
--- a/res.rc
+++ b/res.rc
@@ -28,7 +28,7 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
 // this topic is at:
 //   http://sources.redhat.com/ml/cygwin-apps/2003-05/msg00177.html
 
-IDD_SOURCE DIALOG DISCARDABLE  0, 0, SETUP_STANDARD_DIALOG_DIMS
+IDD_SOURCE DIALOG 0, 0, SETUP_STANDARD_DIALOG_DIMS
 STYLE DS_MODALFRAME | DS_CENTER | WS_CHILD | WS_CAPTION | WS_SYSMENU
 CAPTION "Cygwin Setup - Choose Installation Type"
 FONT 8, "MS Shell Dlg"
@@ -58,7 +58,7 @@ BEGIN
                     21, 9, 239, 16, NOT WS_GROUP
 END
 
-IDD_VIRUS DIALOG DISCARDABLE  0, 0, SETUP_STANDARD_DIALOG_DIMS
+IDD_VIRUS DIALOG 0, 0, SETUP_STANDARD_DIALOG_DIMS
 STYLE DS_MODALFRAME | DS_CENTER | WS_CHILD | WS_CAPTION | WS_SYSMENU
 CAPTION "Cygwin Setup - Disable Virus Scanner?"
 FONT 8, "MS Shell Dlg"
@@ -78,7 +78,7 @@ BEGIN
                     IDC_STATIC,21,32,239,24,NOT WS_GROUP
 END
 
-IDD_LOCAL_DIR DIALOG DISCARDABLE  0, 0, SETUP_STANDARD_DIALOG_DIMS
+IDD_LOCAL_DIR DIALOG 0, 0, SETUP_STANDARD_DIALOG_DIMS
 STYLE DS_MODALFRAME | DS_CENTER | WS_CHILD | WS_CAPTION | WS_SYSMENU
 CAPTION "Cygwin Setup - Select Local Package Directory"
 FONT 8, "MS Shell Dlg"
@@ -95,7 +95,7 @@ BEGIN
     PUSHBUTTON      "B&rowse...",IDC_LOCAL_DIR_BROWSE,285,47,44,14,WS_TABSTOP
 END
 
-IDD_ROOT DIALOG DISCARDABLE  0, 0, SETUP_STANDARD_DIALOG_DIMS
+IDD_ROOT DIALOG 0, 0, SETUP_STANDARD_DIALOG_DIMS
 STYLE DS_MODALFRAME | DS_CENTER | WS_CHILD | WS_CAPTION | WS_SYSMENU
 CAPTION "Cygwin Setup - Choose Installation Directory"
 FONT 8, "MS Shell Dlg"
@@ -128,7 +128,7 @@ BEGIN
                     IDC_JUSTME_TEXT,25,140,300,32
 END
 
-IDD_SITE DIALOG DISCARDABLE  0, 0, SETUP_STANDARD_DIALOG_DIMS
+IDD_SITE DIALOG 0, 0, SETUP_STANDARD_DIALOG_DIMS
 STYLE DS_MODALFRAME | DS_3DLOOK | DS_CENTER | WS_CHILD | WS_VISIBLE | 
     WS_CAPTION | WS_SYSMENU
 EXSTYLE WS_EX_CONTROLPARENT
@@ -153,7 +153,7 @@ BEGIN
     PUSHBUTTON      "Add",IDC_BUTTON_ADD_URL,255,160,50,14
 END
 
-IDD_NET DIALOG DISCARDABLE  0, 0, SETUP_STANDARD_DIALOG_DIMS
+IDD_NET DIALOG 0, 0, SETUP_STANDARD_DIALOG_DIMS
 STYLE DS_MODALFRAME | DS_CENTER | WS_CHILD | WS_CAPTION | WS_SYSMENU
 CAPTION "Cygwin Setup - Select Connection Type"
 FONT 8, "MS Shell Dlg"
@@ -182,7 +182,7 @@ BEGIN
                     IDC_STATIC_HEADER_TITLE,7,0,258,8,NOT WS_GROUP
 END
 
-IDD_INSTATUS DIALOG DISCARDABLE  0, 0, SETUP_STANDARD_DIALOG_DIMS
+IDD_INSTATUS DIALOG 0, 0, SETUP_STANDARD_DIALOG_DIMS
 STYLE DS_MODALFRAME | DS_CENTER | WS_CHILD | WS_VISIBLE | WS_CAPTION | 
     WS_SYSMENU
 CAPTION "Cygwin Setup"
@@ -209,7 +209,7 @@ BEGIN
                     WS_GROUP
 END
 
-IDD_PROXY_AUTH DIALOG DISCARDABLE  0, 0, SETUP_SMALL_DIALOG_DIMS
+IDD_PROXY_AUTH DIALOG 0, 0, SETUP_SMALL_DIALOG_DIMS
 STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
 CAPTION "Proxy Authentication required"
 FONT 8, "MS Shell Dlg"
@@ -226,7 +226,7 @@ BEGIN
     PUSHBUTTON      "Cancel",IDCANCEL,165,75,45,15
 END
 
-IDD_NET_AUTH DIALOG DISCARDABLE  0, 0, SETUP_SMALL_DIALOG_DIMS
+IDD_NET_AUTH DIALOG 0, 0, SETUP_SMALL_DIALOG_DIMS
 STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
 CAPTION "Server Authentication required"
 FONT 8, "MS Shell Dlg"
@@ -243,7 +243,7 @@ BEGIN
     PUSHBUTTON      "Cancel",IDCANCEL,165,75,45,15
 END
 
-IDD_SPLASH DIALOG DISCARDABLE  0, 0, SETUP_STANDARD_DIALOG_DIMS
+IDD_SPLASH DIALOG 0, 0, SETUP_STANDARD_DIALOG_DIMS
 STYLE DS_MODALFRAME | DS_3DLOOK | DS_CENTER | WS_CHILD | WS_VISIBLE | 
     WS_CAPTION | WS_SYSMENU
 CAPTION "Cygwin Setup"
@@ -266,11 +266,11 @@ BEGIN
                     "necessary.",IDC_SPLASH_TEXT,115,25,195,90
     ICON            IDI_CYGWIN,IDC_SPLASH_ICON,4,6,0,0,SS_ICON | SS_REALSIZEIMAGE
     LTEXT           "Version (unknown)",IDC_VERSION,115,127,195,10
-    LTEXT           "Copyright 2000-2020",IDC_SPLASH_COPYR,115,140,195,8
+    LTEXT           "Copyright 2000-2021",IDC_SPLASH_COPYR,115,140,195,8
     LTEXT           "https://cygwin.com/",IDC_SPLASH_URL,115,152,90,8
 END
 
-IDD_DESKTOP DIALOG DISCARDABLE  0, 0, SETUP_STANDARD_DIALOG_DIMS
+IDD_DESKTOP DIALOG 0, 0, SETUP_STANDARD_DIALOG_DIMS
 STYLE DS_MODALFRAME | DS_3DLOOK | DS_CENTER | WS_CHILD | WS_VISIBLE | 
     WS_CAPTION | WS_SYSMENU
 CAPTION "Cygwin Setup - Installation Status and Create Icons"
@@ -294,7 +294,7 @@ BEGIN
                     21,149,279,36,NOT WS_GROUP
 END
 
-IDD_FTP_AUTH DIALOG DISCARDABLE  0, 0, SETUP_SMALL_DIALOG_DIMS
+IDD_FTP_AUTH DIALOG 0, 0, SETUP_SMALL_DIALOG_DIMS
 STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
 CAPTION "FTP Authentication required"
 FONT 8, "MS Shell Dlg"
@@ -332,7 +332,7 @@ END
 #define SETUP_CLEAR_X		(SETUP_SEARCHTEXT_X + SETUP_SEARCHTEXT_W + 2)
 #define SETUP_CLEAR_W		(22)
 
-IDD_CHOOSE DIALOG DISCARDABLE  0, 0, SETUP_STANDARD_DIALOG_DIMS
+IDD_CHOOSE DIALOG 0, 0, SETUP_STANDARD_DIALOG_DIMS
 STYLE DS_MODALFRAME | DS_3DLOOK | WS_CHILD | WS_VISIBLE | WS_CAPTION | 
     WS_SYSMENU
 CAPTION "Cygwin Setup - Select Packages"
@@ -371,7 +371,7 @@ BEGIN
                     NOT WS_GROUP
 END
 
-IDD_PREREQ DIALOG DISCARDABLE  0, 0, SETUP_STANDARD_DIALOG_DIMS
+IDD_PREREQ DIALOG 0, 0, SETUP_STANDARD_DIALOG_DIMS
 STYLE DS_MODALFRAME | DS_3DLOOK | WS_CHILD | WS_VISIBLE | WS_CAPTION | 
     WS_SYSMENU
 CAPTION "Cygwin Setup - Resolving Dependencies"
@@ -393,7 +393,7 @@ BEGIN
 
 END
 
-IDD_CONFIRM DIALOG DISCARDABLE  0, 0, SETUP_STANDARD_DIALOG_DIMS
+IDD_CONFIRM DIALOG 0, 0, SETUP_STANDARD_DIALOG_DIMS
 STYLE DS_MODALFRAME | DS_3DLOOK | WS_CHILD | WS_VISIBLE | WS_CAPTION |
     WS_SYSMENU
 CAPTION "Cygwin Setup - Review and confirm changes"
@@ -409,7 +409,7 @@ BEGIN
                     ES_AUTOVSCROLL
 END
 
-IDD_DROPPED DIALOG DISCARDABLE  0, 0, SETUP_STANDARD_DIALOG_W, 142
+IDD_DROPPED DIALOG 0, 0, SETUP_STANDARD_DIALOG_W, 142
 STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
 CAPTION "Cygwin Setup - Use dropped mirrors?"
 FONT 8, "MS Shell Dlg"
@@ -435,7 +435,7 @@ BEGIN
 
 END
 
-IDD_DOWNLOAD_ERROR DIALOG DISCARDABLE  0, 0, SETUP_STANDARD_DIALOG_DIMS
+IDD_DOWNLOAD_ERROR DIALOG 0, 0, SETUP_STANDARD_DIALOG_DIMS
 STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION
 CAPTION "Download Incomplete"
 FONT 8, "MS Shell Dlg"
@@ -457,7 +457,7 @@ BEGIN
     PUSHBUTTON      "Cancel",IDABORT,240,150,50,15
 END
 
-IDD_POSTINSTALL DIALOG DISCARDABLE  0, 0, SETUP_STANDARD_DIALOG_W, 142
+IDD_POSTINSTALL DIALOG 0, 0, SETUP_STANDARD_DIALOG_W, 142
 STYLE DS_MODALFRAME | DS_3DLOOK | DS_CENTER | WS_CHILD | WS_VISIBLE |
     WS_CAPTION | WS_SYSMENU
 CAPTION "Cygwin Setup - Running postinstall scripts"
@@ -478,7 +478,7 @@ BEGIN
 
 END
 
-IDD_FILE_INUSE DIALOG DISCARDABLE  0, 0, SETUP_MEDIUM_DIALOG_DIMS
+IDD_FILE_INUSE DIALOG 0, 0, SETUP_MEDIUM_DIALOG_DIMS
 STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION
 CAPTION "In-use file detected"
 FONT 8, "MS Shell Dlg"
@@ -514,27 +514,27 @@ CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "setup.exe.manifest"
 
 // Icon with lowest ID value placed first to ensure application icon
 // remains consistent on all systems.
-IDI_CYGWIN_SETUP        ICON    DISCARDABLE     "cygwin-setup.ico"
-IDI_CYGWIN              ICON    DISCARDABLE     "cygwin.ico"
-IDI_CYGWIN_TERMINAL     ICON    DISCARDABLE     "cygwin-terminal.ico"
-IDI_TREE_PLUS           ICON    DISCARDABLE     "tree-plus.ico"
-IDI_TREE_MINUS          ICON    DISCARDABLE     "tree-minus.ico"
+IDI_CYGWIN_SETUP        ICON    "cygwin-setup.ico"
+IDI_CYGWIN              ICON    "cygwin.ico"
+IDI_CYGWIN_TERMINAL     ICON    "cygwin-terminal.ico"
+IDI_TREE_PLUS           ICON    "tree-plus.ico"
+IDI_TREE_MINUS          ICON    "tree-minus.ico"
 
 /////////////////////////////////////////////////////////////////////////////
 //
 // FILE
 //
 
-CYGWIN-SETUP.ICON       FILE    DISCARDABLE     "cygwin-setup.ico"
-CYGWIN.ICON             FILE    DISCARDABLE     "cygwin.ico"
-CYGWIN-TERMINAL.ICON    FILE    DISCARDABLE     "cygwin-terminal.ico"
+CYGWIN-SETUP.ICON       FILE    "cygwin-setup.ico"
+CYGWIN.ICON             FILE    "cygwin.ico"
+CYGWIN-TERMINAL.ICON    FILE    "cygwin-terminal.ico"
 
 /////////////////////////////////////////////////////////////////////////////
 //
 // String Table
 //
 
-STRINGTABLE DISCARDABLE 
+STRINGTABLE
 BEGIN
     IDS_ROOT_SLASH          "Warning: we recommend you do not use the root of your hard drive as the cygwin root, to prevent possible conflicts with other programs.  Proceed anyway?"
     IDS_ROOT_SPACE          "You should not choose a root path that include spaces in directory names.  Proceed anyway?"
@@ -607,4 +607,25 @@ BEGIN
     IDS_ELEVATED       "Hand installation over to elevated child process."
     IDS_INSTALLEDB_VERSION "Unknown INSTALLED.DB version"
     IDS_NO_MIRROR_LST  "Could not download mirror sites list"
+    IDS_PROGRESS_PROGRESS "Progress:"
+    IDS_PROGRESS_PACKAGE "Package:"
+    IDS_PROGRESS_CONNECTING "Connecting..."
+    IDS_PROGRESS_CHECKING "Checking for packages to download..."
+    IDS_PROGRESS_DOWNLOADING "Downloading..."
+    IDS_PROGRESS_PARSING "Parsing..."
+    IDS_PROGRESS_PREREMOVE "Running preremove script..."
+    IDS_PROGRESS_UNINSTALL "Uninstalling..."
+    IDS_PROGRESS_INSTALL "Installing..."
+    IDS_PROGRESS_CALCULATING "Calculating..."
+    IDS_PROGRESS_POSTINSTALL "Running..."
+    IDS_PROGRESS_SOLVING "Solving dependencies..."
+    IDS_ACTION_DEFAULT "Default"
+    IDS_ACTION_INSTALL "Install"
+    IDS_ACTION_UNINSTALL "Uninstall"
+    IDS_ACTION_SKIP "Skip"
+    IDS_ACTION_KEEP "Keep"
+    IDS_ACTION_REINSTALL "Reinstall"
+    IDS_ACTION_RETRIEVE "Retrieve"
+    IDS_ACTION_UNKNOWN "Unknown"
+    IDS_ACTION_SOURCE "Source"
 END
diff --git a/resource.h b/resource.h
index a98924cc..f377e572 100644
--- a/resource.h
+++ b/resource.h
@@ -35,13 +35,34 @@
 #define IDS_LOCAL_DIR_INSTALL             135
 #define IDS_MAYBE_MKDIR                   136
 #define IDS_CANT_MKDIR                    137
-#define IDS_NO_LOCALDIR			  138
-#define IDS_ELEVATED			  139
+#define IDS_NO_LOCALDIR                   138
+#define IDS_ELEVATED                      139
 #define IDS_INSTALLEDB_VERSION            140
 #define IDS_DOWNLOAD_INCOMPLETE_EXIT      141
 #define IDS_QUERY_CORRUPT                 142
 #define IDS_TRUSTSYNC_TOOLTIP             143
 #define IDS_NO_MIRROR_LST                 144
+#define IDS_PROGRESS_PROGRESS             145
+#define IDS_PROGRESS_PACKAGE              146
+#define IDS_PROGRESS_CONNECTING           147
+#define IDS_PROGRESS_CHECKING             148
+#define IDS_PROGRESS_DOWNLOADING          149
+#define IDS_PROGRESS_PARSING              150
+#define IDS_PROGRESS_PREREMOVE            151
+#define IDS_PROGRESS_UNINSTALL            152
+#define IDS_PROGRESS_INSTALL              153
+#define IDS_PROGRESS_CALCULATING          154
+#define IDS_PROGRESS_POSTINSTALL          155
+#define IDS_PROGRESS_SOLVING              156
+#define IDS_ACTION_DEFAULT                157
+#define IDS_ACTION_SKIP                   158
+#define IDS_ACTION_KEEP                   159
+#define IDS_ACTION_INSTALL                160
+#define IDS_ACTION_UNINSTALL              161
+#define IDS_ACTION_REINSTALL              162
+#define IDS_ACTION_RETRIEVE               163
+#define IDS_ACTION_UNKNOWN                164
+#define IDS_ACTION_SOURCE                 165
 
 // Dialogs
 
diff --git a/site.cc b/site.cc
index d5cd1e0e..ed3b95f2 100644
--- a/site.cc
+++ b/site.cc
@@ -457,7 +457,8 @@ do_download_site_info_thread (void *p)
   {
     hinst = (HINSTANCE) (context[0]);
     h = (HWND) (context[1]);
-    if (get_site_list (hinst, h))
+    static bool downloaded = false;
+    if (!downloaded && get_site_list (hinst, h))
     {
       // Error: Couldn't download the site info.
       // Go back to the Net setup page.
@@ -468,8 +469,9 @@ do_download_site_info_thread (void *p)
       // Tell the progress page that we're done downloading
       Progress.PostMessageNow (WM_APP_SITE_INFO_DOWNLOAD_COMPLETE, 0, IDD_NET);
     }
-    else
+    else 
     {
+      downloaded = true;
       // Everything worked, go to the site select page
       // Tell the progress page that we're done downloading
       Progress.PostMessageNow (WM_APP_SITE_INFO_DOWNLOAD_COMPLETE, 0, IDD_SITE);
diff --git a/threebar.cc b/threebar.cc
index cadf3e70..f0f7473e 100644
--- a/threebar.cc
+++ b/threebar.cc
@@ -99,6 +99,30 @@ ThreeBarProgressPage::SetText4 (const TCHAR * t)
   ::SetWindowText (ins_bl_package, t);
 }
 
+void
+ThreeBarProgressPage::SetText1 (unsigned int id)
+{
+  ::SetWindowTextW (ins_action, LoadStringW(id).c_str());
+}
+
+void
+ThreeBarProgressPage::SetText2 (unsigned int id)
+{
+  ::SetWindowTextW (ins_pkgname, LoadStringW(id).c_str());
+}
+
+void
+ThreeBarProgressPage::SetText3 (unsigned int id)
+{
+  ::SetWindowTextW (ins_filename, LoadStringW(id).c_str());
+}
+
+void
+ThreeBarProgressPage::SetText4 (unsigned int id)
+{
+  ::SetWindowTextW (ins_bl_package, LoadStringW(id).c_str());
+}
+
 void
 ThreeBarProgressPage::SetBar1 (long progress, long max)
 {
diff --git a/threebar.h b/threebar.h
index 744eb1d4..8f03f6bc 100644
--- a/threebar.h
+++ b/threebar.h
@@ -74,6 +74,11 @@ public:
   void SetText3 (const TCHAR * t);
   void SetText4 (const TCHAR * t);
 
+  void SetText1 (unsigned int id);
+  void SetText2 (unsigned int id);
+  void SetText3 (unsigned int id);
+  void SetText4 (unsigned int id);
+
   void SetBar1 (long progress, long max = 100);
   void SetBar2 (long long progress, long long max = 100);
   void SetBar3 (long progress, long max = 100);
diff --git a/win32.cc b/win32.cc
index 45c7bf1b..acc01bf8 100644
--- a/win32.cc
+++ b/win32.cc
@@ -419,3 +419,15 @@ WowNativeMachine ()
   return IMAGE_FILE_MACHINE_I386;
 #endif
 }
+
+const std::wstring
+LoadStringW(unsigned int uID)
+{
+  wchar_t *buf;
+
+  int len = ::LoadStringW(GetModuleHandle(NULL), uID, (LPWSTR)&buf, 0);
+  if (len > 0)
+    return std::wstring(buf, len);
+
+  return L"";
+}
diff --git a/win32.h b/win32.h
index a7d025d2..daebf2e6 100644
--- a/win32.h
+++ b/win32.h
@@ -193,4 +193,6 @@ SetDlgItemRect (HWND h, int item, LPRECT r)
 	      r->right - r->left, r->bottom - r->top, TRUE);
 }
 
+const std::wstring LoadStringW(unsigned int uID);
+
 #endif /* SETUP_WIN32_H */



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-03-16 18:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-16 18:31 [setup - the official Cygwin setup program] branch master, updated. release_2.906 Jon TURNEY
  -- strict thread matches above, loose matches on Subject: below --
2021-03-15 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).