@@ -58,8 +58,8 @@ sub createProject {
5858 my $uuid = generate_guid($name );
5959 $$build_structure {" $prefix${target} _GUID" } = $uuid ;
6060 my $vcxproj = $target ;
61- $vcxproj =~ s / (.*\/ )?(.*)/ $& \/ $2 .vcxproj/ ;
62- $vcxproj =~ s / ([^\/ ]*)(\/ lib)\/ (lib.vcxproj)/ $1$2 \/ $1_$3 / ;
61+ $vcxproj =~ s / (.*\/ )?(.*)/ $& .proj \/ $2 .vcxproj/ ;
62+ $vcxproj =~ s / ([^\/ ]*)(\/ lib\. proj )\/ (lib.vcxproj)/ $1$2 \/ $1_$3 / ;
6363 $$build_structure {" $prefix${target} _VCXPROJ" } = $vcxproj ;
6464
6565 my @srcs = sort (map (" $rel_dir \\ $_ " , @{$$build_structure {" $prefix${name} _SOURCES" }}));
@@ -88,7 +88,9 @@ sub createProject {
8888 $defines =~ s / >/ >/ g ;
8989 $defines =~ s /\' // g ;
9090
91- die " Could not create the directory $target for $label project!\n " unless (-d " $target " || mkdir " $target " );
91+ my $dir = $vcxproj ;
92+ $dir =~ s /\/ [^\/ ]*$// ;
93+ die " Could not create the directory $dir for $label project!\n " unless (-d " $dir " || mkdir " $dir " );
9294
9395 open F, " >$vcxproj " or die " Could not open $vcxproj for writing!\n " ;
9496 binmode F, " :crlf :utf8" ;
236238
237239 print F << "EOM" ;
238240 <ItemGroup>
239- <ProjectReference Include="$cdup \\ libgit\\ libgit.vcxproj">
241+ <ProjectReference Include="$cdup \\ libgit.proj \\ libgit.vcxproj">
240242 <Project>$uuid_libgit </Project>
241243 <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
242244 </ProjectReference>
251253 }
252254 if (!($name =~ ' xdiff' )) {
253255 print F << "EOM" ;
254- <ProjectReference Include="$cdup \\ xdiff\\ lib\\ xdiff_lib.vcxproj">
256+ <ProjectReference Include="$cdup \\ xdiff\\ lib.proj \\ xdiff_lib.vcxproj">
255257 <Project>$uuid_xdiff_lib </Project>
256258 <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
257259 </ProjectReference>
260262 if ($name =~ / (test-(line-buffer|svn-fe)|^git-remote-testsvn)\. exe$ / ) {
261263 my $uuid_vcs_svn_lib = $$build_structure {" LIBS_vcs-svn/lib_GUID" };
262264 print F << "EOM" ;
263- <ProjectReference Include="$cdup \\ vcs-svn\\ lib\\ vcs-svn_lib.vcxproj">
265+ <ProjectReference Include="$cdup \\ vcs-svn\\ lib.proj \\ vcs-svn_lib.vcxproj">
264266 <Project>$uuid_vcs_svn_lib </Project>
265267 <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
266268 </ProjectReference>
@@ -337,7 +339,7 @@ sub createGlueProject {
337339 my $vcxproj = $build_structure {" APPS_${appname} _VCXPROJ" };
338340 $vcxproj =~ s /\/ / \\ / g ;
339341 $appname =~ s / .*\/ // ;
340- print F " \" ${appname} \" , \" ${vcxproj} \" , \" ${uuid} \" " ;
342+ print F " \" ${appname} .proj \" , \" ${vcxproj} \" , \" ${uuid} \" " ;
341343 print F " $SLN_POST " ;
342344 }
343345 foreach (@libs ) {
@@ -347,7 +349,7 @@ sub createGlueProject {
347349 my $vcxproj = $build_structure {" LIBS_${libname} _VCXPROJ" };
348350 $vcxproj =~ s /\/ / \\ / g ;
349351 $libname =~ s /\/ / _/ g ;
350- print F " \" ${libname} \" , \" ${vcxproj} \" , \" ${uuid} \" " ;
352+ print F " \" ${libname} .proj \" , \" ${vcxproj} \" , \" ${uuid} \" " ;
351353 print F " $SLN_POST " ;
352354 }
353355
0 commit comments