winemaker: Improved check for libXML at runtime

André Hentschel nerv at dawncrow.de
Wed Aug 7 17:10:43 CDT 2013


---
 tools/winemaker | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/tools/winemaker b/tools/winemaker
index c6eb480..af26243 100755
--- a/tools/winemaker
+++ b/tools/winemaker
@@ -873,8 +873,12 @@ sub source_scan_project_file($$$)
         push @{@$project_settings[$T_DEFINES]},$prj_target_defines;
         push @{@$project_settings[$T_LDFLAGS]},$prj_target_ldflags;
     } elsif ($filename =~ /.vcproj$/i) {
-        # Import XML::LibXML, you need the libxml package (deb: libxml-libxml-perl, rpm: perl-libxml-perl)
-        require XML::LibXML;
+        eval {
+            require XML::LibXML;
+        };
+        if ($@) {
+            die "Error: You need the libxml package (deb: libxml-libxml-perl, rpm: perl-libxml-perl)";
+        }
 
         my $xmlparser = XML::LibXML->new();
         my $project_xml = $xmlparser->parse_file($filename);
-- 
1.8.1.2



More information about the wine-patches mailing list