Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb587baf

Browse files
author
Neil Conway
committed
This patch changes the installscript for vcbuild to actually parse the
generated solution files for what to install, instead of blindly copyingeverything as it previously did. With the previous quick-n-dirtyversion, it would copy old DLLs if you reconfigured in a way that didn'tinclude subprojects like a PL for example.Magnus Hagander.
1 parentee84009 commitb587baf

File tree

1 file changed

+38
-3
lines changed

1 file changed

+38
-3
lines changed

‎src/tools/msvc/install.pl

Lines changed: 38 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@
2121

2222
EnsureDirectories ('bin','lib','share','share/timezonesets');
2323

24-
CopySetOfFiles('programs',"$conf\\*.exe",$target .'/bin/');
25-
CopySetOfFiles('libraries',"$conf\\*.dll",$target .'/lib/');
24+
CopySolutionOutput($conf,$target);
2625
copy($target .'/lib/libpq.dll',$target .'/bin/libpq.dll');
2726
CopySetOfFiles('config files',"*.sample",$target .'/share/');
2827
CopySetOfFiles('timezone names','src\timezone\tznames\*.txt',$target .'/share/timezonesets/');
@@ -72,12 +71,48 @@ sub CopySetOfFiles {
7271
chomp;
7372
my$tgt =$target . basename($_);
7473
print".";
75-
copy($_,$tgt) || croak"Could not copy$_\n";
74+
copy($_,$tgt) || croak"Could not copy$_:$!\n";
7675
}
7776
close($D);
7877
print"\n";
7978
}
8079

80+
subCopySolutionOutput {
81+
my$conf =shift;
82+
my$target =shift;
83+
my$rem =qr{Project\("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}"\) = "([^"]+)"};
84+
85+
my$sln = read_file("pgsql.sln") || croak"Could not open pgsql.sln\n";
86+
print"Copying build output files...";
87+
while ($sln =~$rem) {
88+
my$pf =$1;
89+
my$dir;
90+
my$ext;
91+
92+
$sln =~s/$rem//;
93+
94+
my$proj = read_file("$pf.vcproj") || croak"Could not open$pf.vcproj\n";
95+
if ($proj !~qr{ConfigurationType="([^"]+)"}) {
96+
croak"Could not parse$pf.vcproj\n";
97+
}
98+
if ($1 == 1) {
99+
$dir ="bin";
100+
$ext ="exe";
101+
}
102+
elsif ($1 == 2) {
103+
$dir ="lib";
104+
$ext ="dll";
105+
}
106+
else {
107+
# Static lib, such as libpgport, only used internally during build, don't install
108+
next;
109+
}
110+
copy("$conf\\$pf\\$pf.$ext","$target\\$dir\\$pf.$ext") || croak"Could not copy$pf.$ext\n";
111+
print".";
112+
}
113+
print"\n";
114+
}
115+
81116
subGenerateConversionScript {
82117
my$sql ="";
83118
my$F;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp