Alexandre Julliard : makefiles: Move l_intl.nls to a new nls directory.
Alexandre Julliard
julliard at winehq.org
Tue Feb 11 15:44:54 CST 2020
Module: wine
Branch: master
Commit: 42a30a693a8e9a75dfec95e67635ea140d4db877
URL: https://source.winehq.org/git/wine.git/?a=commit;h=42a30a693a8e9a75dfec95e67635ea140d4db877
Author: Alexandre Julliard <julliard at winehq.org>
Date: Tue Feb 11 09:01:27 2020 +0100
makefiles: Move l_intl.nls to a new nls directory.
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
Makefile.in | 1 +
configure | 4 +++-
configure.ac | 3 ++-
dlls/ntdll/locale.c | 10 ++++------
loader/Makefile.in | 1 -
loader/wine.inf.in | 27 +++++++++++++++------------
nls/Makefile.in | 2 ++
{loader => nls}/l_intl.nls | Bin
tools/make_makefiles | 13 +++++++++++++
tools/make_unicode | 2 +-
tools/makedep.c | 2 +-
11 files changed, 42 insertions(+), 23 deletions(-)
diff --git a/Makefile.in b/Makefile.in
index fb67236b68..0e9b50c8f5 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -28,6 +28,7 @@ datadir = @datadir@
mandir = @mandir@
includedir = @includedir@
fontdir = ${datadir}/wine/fonts
+nlsdir = ${datadir}/wine/nls
dlldir = ${libdir}/wine
top_srcdir = @top_srcdir@
top_builddir = @top_builddir@
diff --git a/configure b/configure
index 9f23d268e8..2f9654fca0 100755
--- a/configure
+++ b/configure
@@ -1714,6 +1714,7 @@ enable_port
enable_wine
enable_wpp
enable_loader
+enable_nls
enable_po
enable_arp
enable_aspnet_regiis
@@ -21064,6 +21065,7 @@ wine_fn_config_makefile libs/port enable_port
wine_fn_config_makefile libs/wine enable_wine
wine_fn_config_makefile libs/wpp enable_wpp
wine_fn_config_makefile loader enable_loader
+wine_fn_config_makefile nls enable_nls
wine_fn_config_makefile po enable_po
wine_fn_config_makefile programs/arp enable_arp
wine_fn_config_makefile programs/aspnet_regiis enable_aspnet_regiis
@@ -21250,10 +21252,10 @@ else
TOP_INSTALL_DEV="$TOP_INSTALL_DEV include"
TOP_INSTALL_LIB="$TOP_INSTALL_LIB \
fonts \
-loader/l_intl.nls \
loader/wine.inf \
loader/winebus.inf \
loader/winehid.inf \
+nls \
programs/msidb/msidb \
programs/msiexec/msiexec \
programs/notepad/notepad \
diff --git a/configure.ac b/configure.ac
index e06743c2ea..28d3173335 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3871,6 +3871,7 @@ WINE_CONFIG_MAKEFILE(libs/port)
WINE_CONFIG_MAKEFILE(libs/wine)
WINE_CONFIG_MAKEFILE(libs/wpp)
WINE_CONFIG_MAKEFILE(loader)
+WINE_CONFIG_MAKEFILE(nls)
WINE_CONFIG_MAKEFILE(po)
WINE_CONFIG_MAKEFILE(programs/arp)
WINE_CONFIG_MAKEFILE(programs/aspnet_regiis)
@@ -4074,10 +4075,10 @@ else
TOP_INSTALL_DEV="$TOP_INSTALL_DEV include"
TOP_INSTALL_LIB="$TOP_INSTALL_LIB \
fonts \
-loader/l_intl.nls \
loader/wine.inf \
loader/winebus.inf \
loader/winehid.inf \
+nls \
programs/msidb/msidb \
programs/msiexec/msiexec \
programs/notepad/notepad \
diff --git a/dlls/ntdll/locale.c b/dlls/ntdll/locale.c
index 784203378a..42eedf9b5d 100644
--- a/dlls/ntdll/locale.c
+++ b/dlls/ntdll/locale.c
@@ -316,8 +316,7 @@ static NTSTATUS open_nls_data_file( ULONG type, ULONG id, HANDLE *file )
static const WCHAR langfmtW[] = {'%','0','4','x',0};
static const WCHAR winedatadirW[] = {'W','I','N','E','D','A','T','A','D','I','R',0};
static const WCHAR winebuilddirW[] = {'W','I','N','E','B','U','I','L','D','D','I','R',0};
- static const WCHAR dataprefixW[] = {'\\',0};
- static const WCHAR buildprefixW[] = {'\\','l','o','a','d','e','r','\\',0};
+ static const WCHAR dataprefixW[] = {'\\','n','l','s','\\',0};
static const WCHAR cpdefaultW[] = {'c','_','%','0','3','d','.','n','l','s',0};
static const WCHAR intlW[] = {'l','_','i','n','t','l','.','n','l','s',0};
static const WCHAR normnfcW[] = {'n','o','r','m','n','f','c','.','n','l','s',0};
@@ -332,7 +331,7 @@ static NTSTATUS open_nls_data_file( ULONG type, ULONG id, HANDLE *file )
OBJECT_ATTRIBUTES attr;
UNICODE_STRING nameW, valueW;
WCHAR buffer[MAX_PATH], value[10];
- const WCHAR *name = NULL, *prefix = buildprefixW;
+ const WCHAR *name = NULL;
KEY_VALUE_PARTIAL_INFORMATION *info;
/* get filename from registry */
@@ -413,16 +412,15 @@ static NTSTATUS open_nls_data_file( ULONG type, ULONG id, HANDLE *file )
if (RtlQueryEnvironmentVariable_U( NULL, &nameW, &valueW ) != STATUS_BUFFER_TOO_SMALL)
{
RtlInitUnicodeString( &nameW, winedatadirW );
- prefix = dataprefixW;
if (RtlQueryEnvironmentVariable_U( NULL, &nameW, &valueW ) != STATUS_BUFFER_TOO_SMALL)
return status;
}
- valueW.MaximumLength = valueW.Length + sizeof(buildprefixW) + strlenW(name) * sizeof(WCHAR);
+ valueW.MaximumLength = valueW.Length + sizeof(dataprefixW) + strlenW(name) * sizeof(WCHAR);
if (!(valueW.Buffer = RtlAllocateHeap( GetProcessHeap(), 0, valueW.MaximumLength )))
return STATUS_NO_MEMORY;
if (!RtlQueryEnvironmentVariable_U( NULL, &nameW, &valueW ))
{
- strcatW( valueW.Buffer, prefix );
+ strcatW( valueW.Buffer, dataprefixW );
strcatW( valueW.Buffer, name );
valueW.Length = strlenW(valueW.Buffer) * sizeof(WCHAR);
InitializeObjectAttributes( &attr, &valueW, 0, 0, NULL );
diff --git a/loader/Makefile.in b/loader/Makefile.in
index 11a476103c..f9b2fa9293 100644
--- a/loader/Makefile.in
+++ b/loader/Makefile.in
@@ -1,5 +1,4 @@
SOURCES = \
- l_intl.nls \
main.c \
preloader.c \
preloader_mac.c \
diff --git a/loader/wine.inf.in b/loader/wine.inf.in
index 05fd28fcd7..188737547b 100644
--- a/loader/wine.inf.in
+++ b/loader/wine.inf.in
@@ -30,7 +30,7 @@ signature="$CHICAGO$"
RegisterDlls=RegisterDllsSection
WineFakeDlls=FakeDllsWin32,FakeDlls
UpdateInis=SystemIni
-CopyFiles=l_intl_section, inf_section
+CopyFiles=InfFiles,NlsFiles
AddReg=\
Classes,\
ContentIndex,\
@@ -54,7 +54,7 @@ AddReg=\
RegisterDlls=RegisterDllsSection
WineFakeDlls=FakeDllsWin32,FakeDlls
UpdateInis=SystemIni
-CopyFiles=l_intl_section, inf_section
+CopyFiles=InfFiles,NlsFiles
AddReg=\
Classes,\
ContentIndex,\
@@ -80,7 +80,7 @@ RegisterDlls=RegisterDllsSection
WineFakeDlls=FakeDllsWin64,FakeDlls
WinePreInstall=Wow64
UpdateInis=SystemIni
-CopyFiles=l_intl_section, inf_section
+CopyFiles=InfFiles,NlsFiles
AddReg=\
Classes,\
ContentIndex,\
@@ -107,7 +107,7 @@ RegisterDlls=RegisterDllsSection
WineFakeDlls=FakeDllsWin64,FakeDlls
WinePreInstall=Wow64
UpdateInis=SystemIni
-CopyFiles=l_intl_section, inf_section
+CopyFiles=InfFiles,NlsFiles
AddReg=\
Classes,\
ContentIndex,\
@@ -132,7 +132,7 @@ AddReg=\
[Wow64Install]
RegisterDlls=RegisterDllsSection
WineFakeDlls=FakeDllsWin32,FakeDllsWow64
-CopyFiles=l_intl_section
+CopyFiles=NlsFiles
AddReg=\
CurrentVersion,\
CurrentVersionWow64,\
@@ -3849,13 +3849,16 @@ HKLM,Software\Wine\LicenseInformation,"Shell-InBoxGames-Solitaire-EnableGame",0x
HKLM,Software\Wine\LicenseInformation,"Shell-InBoxGames-SpiderSolitaire-EnableGame",0x10001,0x00000001
HKLM,Software\Wine\LicenseInformation,"Shell-PremiumInBoxGames-Chess-EnableGame",0x10001,0x00000001
-[DestinationDirs]
-l_intl_section = 11
-inf_section = 17
+[InfFiles]
+winebus.inf
+winehid.inf
-[l_intl_section]
+[NlsFiles]
l_intl.nls
-[inf_section]
-winebus.inf
-winehid.inf
+[WineSourceDirs]
+NlsFiles=nls
+
+[DestinationDirs]
+InfFiles = 17
+NlsFiles = 11
diff --git a/nls/Makefile.in b/nls/Makefile.in
new file mode 100644
index 0000000000..dc9893030a
--- /dev/null
+++ b/nls/Makefile.in
@@ -0,0 +1,2 @@
+SOURCES = \
+ l_intl.nls
diff --git a/loader/l_intl.nls b/nls/l_intl.nls
similarity index 100%
rename from loader/l_intl.nls
rename to nls/l_intl.nls
diff --git a/tools/make_makefiles b/tools/make_makefiles
index 7c376aca92..b96fc4f387 100755
--- a/tools/make_makefiles
+++ b/tools/make_makefiles
@@ -74,6 +74,7 @@ my @source_vars = (
);
my (@makefiles, %makefiles);
+my @nls_files;
sub dirname($)
{
@@ -389,6 +390,10 @@ sub assign_sources_to_makefiles(@)
{
next unless defined ${$make}{"TESTDLL"};
}
+ elsif ($name =~ /\.nls$/)
+ {
+ push @nls_files, $name if $dir eq "nls";
+ }
elsif ($dir ne "loader") # loader dir contains misc files
{
next;
@@ -480,6 +485,13 @@ sub update_makefiles(@)
replace_in_file( "configure.ac", '^WINE_CONFIG_MAKEFILE', '^dnl End of auto-generated output commands\n$', @lines);
}
+sub update_wine_inf()
+{
+ my @lines;
+
+ push @lines, "[NlsFiles]", @nls_files, "\n";
+ replace_in_file "loader/wine.inf.in", '^\[NlsFiles\]', '^$', join( "\n", @lines );
+}
my $git_dir = $ENV{GIT_DIR} || ".git";
die "needs to be run from a git checkout" unless -d $git_dir;
@@ -496,3 +508,4 @@ foreach my $file (sort @makefiles)
assign_sources_to_makefiles( @all_files );
update_makefiles( @makefiles );
+update_wine_inf();
diff --git a/tools/make_unicode b/tools/make_unicode
index 7b7a02d0d9..bd6126e256 100755
--- a/tools/make_unicode
+++ b/tools/make_unicode
@@ -2560,10 +2560,10 @@ dump_linebreak( "dlls/usp10/linebreak.c" );
dump_linebreak( "dlls/dwrite/linebreak.c" );
dump_scripts( "dlls/dwrite/scripts" );
dump_indic( "dlls/usp10/indicsyllable.c" );
-dump_intl_nls("loader/l_intl.nls");
dump_vertical( "dlls/gdi32/vertical.c" );
dump_vertical( "dlls/wineps.drv/vertical.c" );
dump_nameprep( "dlls/kernel32/nameprep.c" );
+dump_intl_nls("nls/l_intl.nls");
foreach my $file (@allfiles) { handle_codepage_file( @{$file} ); }
diff --git a/tools/makedep.c b/tools/makedep.c
index f7261795fc..a819cffca9 100644
--- a/tools/makedep.c
+++ b/tools/makedep.c
@@ -2921,7 +2921,7 @@ static void output_source_svg( struct makefile *make, struct incl_file *source,
static void output_source_nls( struct makefile *make, struct incl_file *source, const char *obj )
{
add_install_rule( make, source->name, source->name,
- strmake( "D$(datadir)/wine/%s", source->name ));
+ strmake( "D$(nlsdir)/%s", source->name ));
output_srcdir_symlink( make, strmake( "%s.nls", obj ));
}
More information about the wine-cvs
mailing list