1 diff --git a/src/tools/msvc/Install.pm b/src/tools/msvc/Install.pm
2 index d109b2c90..75c7446e6 100644
3 --- a/src/tools/msvc/Install.pm
4 +++ b/src/tools/msvc/Install.pm
5 @@ -106,7 +106,7 @@ sub Install
9 - CopySetOfFiles('config files', $sample_files, $target . '/share/');
10 + CopySetOfFiles('config files', $sample_files, $target . '/share/libpq/');
14 @@ -78,10 +78,10 @@ sub Install
15 my $majorver = DetermineMajorVersion();
16 print "Installing version $majorver for $conf in $target\n";
18 - my @client_dirs = ('bin', 'lib', 'share', 'symbols');
19 + my @client_dirs = ('bin', 'lib', 'share', 'tools', 'share/libpq', 'tools/libpq');
21 - @client_dirs, 'doc', 'doc/contrib', 'doc/extension', 'share/contrib',
22 - 'share/extension', 'share/timezonesets', 'share/tsearch_data');
23 + @client_dirs, 'doc', 'doc/libpq', 'doc/libpq/contrib', 'doc/libpq/extension', 'share/libpq/contrib',
24 + 'share/libpq/extension', 'share/libpq/timezonesets', 'share/libpq/tsearch_data');
25 if ($insttype eq "client")
27 EnsureDirectories($target, @client_dirs);
28 @@ -120,35 +120,35 @@ sub Install
31 [ glob('src\timezone\tznames\*.txt') ],
32 - $target . '/share/timezonesets/');
33 + $target . '/share/libpq/timezonesets/');
36 - $target . '/share/timezonesets/',
37 + $target . '/share/libpq/timezonesets/',
38 'src/timezone/tznames/', 'Default', 'Australia', 'India');
41 [ glob("src\\backend\\catalog\\postgres.*") ],
42 - $target . '/share/');
43 + $target . '/share/libpq/');
46 [ glob("src\\backend\\catalog\\*.sql") ],
47 - $target . '/share/');
48 + $target . '/share/libpq/');
50 - 'Information schema data', $target . '/share/',
51 + 'Information schema data', $target . '/share/libpq/',
52 'src/backend/catalog/', 'sql_features.txt');
54 - 'Error code data', $target . '/share/',
55 + 'Error code data', $target . '/share/libpq/',
56 'src/backend/utils/', 'errcodes.txt');
57 GenerateTimezoneFiles($target, $conf);
58 GenerateTsearchFiles($target);
61 [ glob("src\\backend\\snowball\\stopwords\\*.stop") ],
62 - $target . '/share/tsearch_data/');
63 + $target . '/share/libpq/tsearch_data/');
65 'Dictionaries sample files',
66 [ glob("src\\backend\\tsearch\\dicts\\*_sample*") ],
67 - $target . '/share/tsearch_data/');
68 + $target . '/share/libpq/tsearch_data/');
70 my $pl_extension_files = [];
71 my @pldirs = ('src/pl/plpgsql/src');
72 @@ -167,7 +167,7 @@ sub Install
75 CopySetOfFiles('PL Extension files',
76 - $pl_extension_files, $target . '/share/extension/');
77 + $pl_extension_files, $target . '/share/libpq/extension/');
80 GenerateNLSFiles($target, $config->{nls}, $majorver) if ($config->{nls});
81 @@ -282,23 +282,26 @@ sub CopySolutionOutput
85 - push(@{ $install_list{'bin'} }, "exe");
86 + push(@{ $install_list{'tools\\libpq'} }, "exe");
90 - push(@{ $install_list{'lib'} }, "dll");
91 + push(@{ $install_list{'bin'} }, "dll");
94 push(@{ $install_list{'bin'} }, "dll");
95 push(@{ $install_list{'lib'} }, "lib");
99 + push(@{ $install_list{'lib'} }, "lib");
105 + push(@{ $install_list{'lib'} }, "lib");
106 # Static libraries, such as libpgport, only used internally
107 # during build, don't install.
111 elsif ($vcproj eq 'vcxproj'
112 @@ -306,11 +309,11 @@ sub CopySolutionOutput
114 if ($1 eq 'Application')
116 - push(@{ $install_list{'bin'} }, "exe");
117 + push(@{ $install_list{'tools\\libpq'} }, "exe");
119 elsif ($1 eq 'DynamicLibrary')
121 - push(@{ $install_list{'lib'} }, "dll");
122 + push(@{ $install_list{'bin'} }, "dll");
125 push(@{ $install_list{'bin'} }, "dll");
126 @@ -319,10 +322,9 @@ sub CopySolutionOutput
128 else # 'StaticLibrary'
131 + push(@{ $install_list{'lib'} }, "lib");
132 # Static lib, such as libpgport, only used internally
133 # during build, don't install.
138 @@ -339,7 +339,7 @@ sub CopySolutionOutput
139 || croak "Could not copy $pf.$ext\n";
142 - lcopy("$conf\\$pf\\$pf.pdb", "$target\\symbols\\$pf.pdb")
143 + lcopy("$conf\\$pf\\$pf.pdb", "$target\\bin\\$pf.pdb")
144 || croak "Could not copy $pf.pdb\n";
147 @@ -366,7 +366,7 @@ sub GenerateTimezoneFiles
148 print "Generating timezone files...";
151 - ("$conf/zic/zic", '-d', "$target/share/timezone", '-p', "$posixrules");
152 + ("$conf/zic/zic", '-d', "$target/share/libpq/timezone", '-p', "$posixrules");
156 @@ -391,7 +391,7 @@ sub GenerateTsearchFiles
157 $mf =~ /^LANGUAGES\s*=\s*(.*)$/m
158 || die "Could not find LANGUAGES line in snowball Makefile\n";
159 my @pieces = split /\s+/, $1;
160 - open($F, '>', "$target/share/snowball_create.sql")
161 + open($F, '>', "$target/share/libpq/snowball_create.sql")
162 || die "Could not write snowball_create.sql";
163 print $F read_file('src/backend/snowball/snowball_func.sql.in');
165 @@ -476,7 +476,7 @@ sub CopySubdirFiles
166 foreach my $f (split /\s+/, $flist)
168 lcopy("$subdir/$module/$f.control",
169 - "$target/share/extension/$f.control")
170 + "$target/share/libpq/extension/$f.control")
171 || croak("Could not copy file $f.control in contrib $module");
174 @@ -494,7 +494,7 @@ sub CopySubdirFiles
175 foreach my $f (split /\s+/, $flist)
177 lcopy("$subdir/$module/$f",
178 - "$target/share/$moduledir/" . basename($f))
179 + "$target/share/libpq/$moduledir/" . basename($f))
180 || croak("Could not copy file $f in contrib $module");
183 @@ -509,7 +509,7 @@ sub CopySubdirFiles
184 foreach my $f (split /\s+/, $flist)
186 lcopy("$subdir/$module/$f",
187 - "$target/share/tsearch_data/" . basename($f))
188 + "$target/share/libpq/tsearch_data/" . basename($f))
189 || croak("Could not copy file $f in $subdir $module");
192 @@ -572,7 +572,7 @@ sub CopySubdirFiles
193 if ($module eq 'spi');
194 foreach my $f (split /\s+/, $flist)
196 - lcopy("$subdir/$module/$f", "$target/doc/$moduledir/$f")
197 + lcopy("$subdir/$module/$f", "$target/doc/libpq/$moduledir/$f")
198 || croak("Could not copy file $f in contrib $module");
201 @@ -701,7 +701,7 @@ sub GenerateNLSFiles
202 my $majorver = shift;
204 print "Installing NLS files...";
205 - EnsureDirectories($target, "share/locale");
206 + EnsureDirectories($target, "share/libpq/locale");
210 @@ -723,12 +723,12 @@ sub GenerateNLSFiles
211 next unless /([^\/]+)\.po/;
214 - EnsureDirectories($target, "share/locale/$lang",
215 - "share/locale/$lang/LC_MESSAGES");
216 + EnsureDirectories($target, "share/libpq/locale/$lang",
217 + "share/libpq/locale/$lang/LC_MESSAGES");
219 "$nlspath\\bin\\msgfmt",
221 - "$target\\share\\locale\\$lang\\LC_MESSAGES\\$prgm-$majorver.mo",
222 + "$target\\share\\libpq\\locale\\$lang\\LC_MESSAGES\\$prgm-$majorver.mo",
224 system(@args) && croak("Could not run msgfmt on $dir\\$_");