texlive[54152] Master/tlpkg/TeXLive/TLWinGoo.pm: Eliminate need for
commits+siepo at tug.org
commits+siepo at tug.org
Sat Mar 7 21:55:11 CET 2020
Revision: 54152
http://tug.org/svn/texlive?view=revision&revision=54152
Author: siepo
Date: 2020-03-07 21:55:10 +0100 (Sat, 07 Mar 2020)
Log Message:
-----------
Eliminate need for Win32::OLE::NLS module
Modified Paths:
--------------
trunk/Master/tlpkg/TeXLive/TLWinGoo.pm
Modified: trunk/Master/tlpkg/TeXLive/TLWinGoo.pm
===================================================================
--- trunk/Master/tlpkg/TeXLive/TLWinGoo.pm 2020-03-07 18:12:15 UTC (rev 54151)
+++ trunk/Master/tlpkg/TeXLive/TLWinGoo.pm 2020-03-07 20:55:10 UTC (rev 54152)
@@ -140,7 +140,6 @@
$Registry->Delimiter('/');
$Registry->ArrayValues(0);
$Registry->FixSzNulls(1);
- require Win32::OLE::NLS;
require Win32::Shortcut;
Win32::Shortcut->import( qw( SW_SHOWNORMAL SW_SHOWMINNOACTIVE ) );
require Time::HiRes;
@@ -164,7 +163,6 @@
# Win32: import some wrappers for API functions
# failed to get Win32::API::More to work with raw API functions;
-# for now, use a tiny dll with perl-friendly wrappers
# import failures return a null result;
# call imported functions only if true/non-null
@@ -171,11 +169,14 @@
my $SendMessage = 0;
my $update_fu = 0;
+my $getlang = 0;
if ($is_win) {
$SendMessage = new Win32::API('user32', 'SendMessageTimeout', 'LLPPLLP', 'L');
debug ("Import failure SendMessage\n") unless $SendMessage;
$update_fu = new Win32::API('shell32', 'SHChangeNotify', 'LIPP', 'V');
debug ("Import failure assoc_notify\n") unless $update_fu;
+ $getlang = Win32::API::More->new('kernel32', 'long GetUserDefaultLangID()');
+ debug ("Import failure GetUserDefaultLangID\n") unless $getlang;
}
=pod
@@ -306,7 +307,8 @@
=cut
sub reg_country {
- my $value = Win32::OLE::NLS::GetUserDefaultLangID();
+ my $value = 0;
+ if ($getlang) {$value = $getlang->Call();}
return unless $value;
$value = sprintf ("%04x", $value);
my $lmkey = $Registry -> Open("HKEY_CLASSES_ROOT/MIME/Database/Rfc1766/",
More information about the tex-live-commits
mailing list.