> > As for the replace comment, I'm not > > sure it is needed since I think quoting is not the task for > > AddLibrary/AddIncludeDir in the first place (and AddIncludeDir > > doesn't have the same comment). The attached 3rd version of the patch contains no comment in AddLibrary().
Sorry, forgot to attach the patch to the previous mail.
diff --git a/src/tools/msvc/Mkvcbuild.pm b/src/tools/msvc/Mkvcbuild.pm index d1d0aed07e..76834f5188 100644 --- a/src/tools/msvc/Mkvcbuild.pm +++ b/src/tools/msvc/Mkvcbuild.pm @@ -495,7 +495,7 @@ sub mkvcbuild my $pythonprog = "import sys;print(sys.prefix);" . "print(str(sys.version_info[0])+str(sys.version_info[1]))"; my $prefixcmd = - $solution->{options}->{python} . "\\python -c \"$pythonprog\""; + "\"$solution->{options}->{python}\\python\" -c \"$pythonprog\""; my $pyout = `$prefixcmd`; die "Could not query for python version!\n" if $?; my ($pyprefix, $pyver) = split(/\r?\n/, $pyout); diff --git a/src/tools/msvc/Project.pm b/src/tools/msvc/Project.pm index b5d1dc6e89..88e9e3187d 100644 --- a/src/tools/msvc/Project.pm +++ b/src/tools/msvc/Project.pm @@ -132,11 +132,6 @@ sub AddLibrary { my ($self, $lib, $dbgsuffix) = @_; - if ($lib =~ m/\s/) - { - $lib = '"' . $lib . """; - } - push @{ $self->{libraries} }, $lib; if ($dbgsuffix) { diff --git a/src/tools/msvc/Solution.pm b/src/tools/msvc/Solution.pm index 318594db5d..327e556c53 100644 --- a/src/tools/msvc/Solution.pm +++ b/src/tools/msvc/Solution.pm @@ -126,7 +126,7 @@ sub GetOpenSSLVersion # Attempt to get OpenSSL version and location. This assumes that # openssl.exe is in the specified directory. my $opensslcmd = - $self->{options}->{openssl} . "\\bin\\openssl.exe version 2>&1"; + "\"$self->{options}->{openssl}\\bin\\openssl.exe\" version 2>&1"; my $sslout = `$opensslcmd`; $? >> 8 == 0