diff options
author | Siep Kroonenberg <siepo@cybercomm.nl> | 2020-03-07 20:55:10 +0000 |
---|---|---|
committer | Siep Kroonenberg <siepo@cybercomm.nl> | 2020-03-07 20:55:10 +0000 |
commit | 1de52c472c057116f161fedd34067aae8c02b2ea (patch) | |
tree | 27737fe771ea57d0f0b5c614549280971d41cb5e /Master | |
parent | 45439dafa0d37736d87386859ae71d305376e907 (diff) |
Eliminate need for Win32::OLE::NLS module
git-svn-id: svn://tug.org/texlive/trunk@54152 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r-- | Master/tlpkg/TeXLive/TLWinGoo.pm | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Master/tlpkg/TeXLive/TLWinGoo.pm b/Master/tlpkg/TeXLive/TLWinGoo.pm index 232a4099e1a..a1288110796 100644 --- a/Master/tlpkg/TeXLive/TLWinGoo.pm +++ b/Master/tlpkg/TeXLive/TLWinGoo.pm @@ -140,7 +140,6 @@ BEGIN { $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,18 +163,20 @@ my $is_win = ($^O =~ /^MSWin/i); # 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 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 @@ Two-letter country code representing the locale of the current user =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/", |