[PATCH setup 16/16] Add beginnings of a command line installation tool

2024-03-08 Thread Jon Turney via Cygwin-apps
At the moment, all this can do is retrieve setup.ini from a selected mirror and parse it. --- Makefile.am| 22 +- cli/cyclops.cc | 186 + 2 files changed, 207 insertions(+), 1 deletion(-) create mode 100644 cli/cyclops.cc diff --git a/Make

[PATCH setup 15/16] Put various shared subcomponents into a convenience library

2024-03-08 Thread Jon Turney via Cygwin-apps
* logging, settings, netio, iostream, decompressors, packagedb, csu_util, hashes, signature checking, URL fetching, Exception class, ini fetching and parsing, global state, version --- Makefile.am | 246 +++- 1 file changed, 126 insertions(+), 120 de

[PATCH setup 14/16] Push check_for_cached into package_source

2024-03-08 Thread Jon Turney via Cygwin-apps
This is kind of half-right. It helps make the package database code self-contained (since that needs to use check_for_cached as part of ScanDownloadedFiles), but also pulls apart the 'cache checking' and 'download file and put it in the cache'. There's probably some scope for an package_source int

[PATCH setup 12/16] Spit out GetNetAuth from NetIO

2024-03-08 Thread Jon Turney via Cygwin-apps
There's still all kinds of janky stuff here: The network proxy configuration fetched by ConnectionSetting is stored into static members of the NetIO class, rather than held there and accessed. Again, define a virtual class as the interface through which user interaction takes place, and implement

[PATCH setup 08/16] Instantiate found_ini_list in ini.cc

2024-03-08 Thread Jon Turney via Cygwin-apps
This is the list of ini files found by fromcwd.cc:do_from_local_dir(). Maybe that should be unkinked by actually doing that scan inside ini.cc, where we could have some progress feedback? This makes it possible to build ini.cc without fromcwd.cc --- fromcwd.cc | 2 -- ini.cc | 1 + 2 files c

[PATCH setup 13/16] Split out hash checking progress reporting

2024-03-08 Thread Jon Turney via Cygwin-apps
--- Feedback.h | 4 Makefile.am | 2 ++ choose.cc | 4 +++- cli/CliFeedback.h | 5 + cli/CliHashCheckFeedback.cc | 30 ++ download.cc | 24 download.h

[PATCH setup 09/16] Move is_64bit to state

2024-03-08 Thread Jon Turney via Cygwin-apps
Note this controls what we will install, not indicating how we are built, so it's use in splash is questionable, and is downright wrong in the messages from IniDbBuilderPackage giving URLs for an updated version of setup. This controls stuff all over the place! --- ini.h | 1 - main.cc | 3

[PATCH setup 11/16] Drop hinstance global

2024-03-08 Thread Jon Turney via Cygwin-apps
We do not need to retain the hInstance value passed into WinMain(), as it's always available as GetModuleHandle(NULL). Note that DialogBox() accepts NULL meaning "the current executable" in any case. Future work: there's still some completely unnecessary storing it in class Window and passing it

[PATCH setup 07/16] Split out URL fetching progress reporting

2024-03-08 Thread Jon Turney via Cygwin-apps
Rename IniParseFeedback.h to Feedback.h Do URL fetching progress reporting via an interface defined by the methods added to the interface defined by the virtual base class Feedback, which can be implemented for GUI (via ThreeBar) or CLI feedback. This is all a bit ad-hoc at the moment, based on t

[PATCH setup 06/16] Simplify invocation of UserSettings::open_settings()

2024-03-08 Thread Jon Turney via Cygwin-apps
Simplify how we check for a setup.rc settings file in the local cache dir (Who knew that setup even did this?): pass the directory down to UserSettings::open_settings() as a parameter, rather than by storing it in an (otherwise unused) member. Also: rename the 'cwd' parameter, because it's actuall

[PATCH setup 10/16] Move setup.ini pathame components to ini.cc

2024-03-08 Thread Jon Turney via Cygwin-apps
Move SetupBaseNameOption to ini.cc Eliminate SetupIniDir, it's just SetupArch + "/" Change SetupArch() and SetupBaseName() into functions, to avoid having to do global initialization at the right time. --- fromcwd.cc | 8 ini.cc | 22 +- ini.h | 5 ++--- mai

[PATCH setup 03/16] Split GuiParseFeedback out from ini fetcher

2024-03-08 Thread Jon Turney via Cygwin-apps
This will ultimately make it possible to fetch and parse an ini file without having a GUI. --- Makefile.am | 1 + gui/GuiParseFeedback.cc | 139 ini.cc | 134 ++ ini.h |

[PATCH setup 04/16] Split out site into SiteSettings and SitePage

2024-03-08 Thread Jon Turney via Cygwin-apps
Again, this will ultimately make it possible to specify, or store and retrieve from settings a site, without having a GUI. --- Makefile.am| 6 +- SiteSetting.cc | 193 + site.h => SiteSetting.h| 57 +++ site.cc => gui/S

[PATCH setup 05/16] Don't call Antivirus::AtExit() directly from Logger::exit()

2024-03-08 Thread Jon Turney via Cygwin-apps
The call to Antivirus::AtExit() needs to be take place before we write the log, so we see in the log if it failed. But calling it directly from Logger::exit() is a horrible layering violation, which makes it impossible to use the logger in other executables... Add LogFile::atexit() method, which r

[PATCH setup 02/16] Move setup_exts[] to the only place it's used

2024-03-08 Thread Jon Turney via Cygwin-apps
--- ini.cc | 1 + ini.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ini.cc b/ini.cc index 3ef1311..112a0ad 100644 --- a/ini.cc +++ b/ini.cc @@ -58,6 +58,7 @@ extern ThreeBarProgressPage Progress; unsigned int setup_timestamp = 0; std::string ini_setup_version; // TODO

[PATCH setup 01/16] Drop forward declaration of non-existent class IniState

2024-03-08 Thread Jon Turney via Cygwin-apps
Also: move forward declaration of class io_stream after includes with other forward declarations. --- ini.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ini.h b/ini.h index ecc4b78..d4eaf87 100644 --- a/ini.h +++ b/ini.h @@ -16,7 +16,6 @@ #ifndef SETUP_INI_H #define SE

[PATCH setup 00/16] Groundwork for a GUI-less installation tool

2024-03-08 Thread Jon Turney via Cygwin-apps
This is patch sequence I started sometime in 2020, but only got around to finishing off recently. This includes various small tidy-ups, and then lays some groundwork for a command line installation tool. At the moment, all this can do is retrieve a (compressed) setup.ini from a selected mirror an

Re: [ITP] afflib 3.7.20-1

2024-03-08 Thread Christian Franke via Cygwin-apps
marco atzeri wrote: On Wed, Mar 6, 2024 at 11:26 PM Christian Franke via Cygwin-apps wrote: Jon Turney wrote: On 06/03/2024 15:39, Christian Franke via Cygwin-apps wrote: Jon Turney wrote: Thanks! libafflib_CONTENTS=" usr/bin/cygafflib-*.dll Any reason why this package doesn't includ