There is no need to implement the detection logic in the PHP class;
instead we can get it from the Config object, where we try to get the
respective information from the environment, if not already set.
If dependencies for multiple CRTs are available, phpsdk_pgo didn't know
which one to use, since Config::$currentCrtName is not initialized.
Instead of adding an argument to phpsdk_pgo, we simply get the CRT to
use from the environment.
If there were vs16 packages listed in the series folder, the first
regex didn't parse these correctly, and if any vc packages were there,
the second regex was never executed. We fix this by merging the two
regexs into one.
After discussion with @weltling, this time we only fix what is
definitely known to be broken, i.e. wget relying on OpenSSL 1.1 (which
does not work yet in msys2), the OpenSSL DLLs which have been x86
binaries, and finally we remove the gcc_s DLL which was also a x86
binary.
While we're at it, we also bring all packages up to date.
Since wget 1.20.1-1 - 1.20.3-1 has issues with SSL, we're downgrading
to the latest working version, i.e. wget 1.19.5-1.
* Be more strict when looking for the desired VS
On systems where VS 2017 and VS 2019 are available, the starter script
may choose VS 2019 if vc15 is requested. The documentation on vswhere
isn't particularly clear regarding the -version parameter, but it
states that a version range is expected. Therefore we change the
shell setup script accordingly.
* Remove break constructs
These had been introduced to cater to multiple found VS installations,
to only use the first one. Since the ranges are supposed to find only
a single installation, and since apparently the order of multiple
findings is not guaranteed, we remove the break constructs for better
readability of the source code.
class.php of the pgo01org training case still uses PHP 4 style
constructors, which trigger deprecation notices and as such may
negatively affect the optimization. Until this will be fixed upstream,
we're employing the workaround to modify the file during the PGO
initialization step.