diff --git a/Makefile.in b/Makefile.in index fb67236b68b..0e9b50c8f5a 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 9f23d268e8e..2f9654fca0a 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 e06743c2ea3..28d31733353 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 784203378ab..42eedf9b5d4 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 11a476103c1..f9b2fa92938 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 05fd28fcd7d..188737547b8 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 - -[l_intl_section] -l_intl.nls - -[inf_section] +[InfFiles] winebus.inf winehid.inf + +[NlsFiles] +l_intl.nls + +[WineSourceDirs] +NlsFiles=nls + +[DestinationDirs] +InfFiles = 17 +NlsFiles = 11 diff --git a/nls/Makefile.in b/nls/Makefile.in new file mode 100644 index 00000000000..dc9893030ad --- /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 7c376aca924..b96fc4f387b 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 7b7a02d0d94..bd6126e2561 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 f7261795fc7..a819cffca91 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 )); }