mirror of
https://github.com/curl/curl.git
synced 2026-04-14 18:11:40 +03:00
projects: fix Windows project 'clean' function
- Fix generate.bat "-clean" option.
- Change version template substitutes to match old files, eg go back to
using format version "11.00" instead of "11.0".
- Limit the vcxproj filters file types that are filtered to c, h, rc.
- Get rid of the tmpl extension from template files and add a README
to the tmpl directory explaining the purpose of the files.
- gitignore VCxx directories entirely rather than individual file types.
- Do not remove the VC directories during clean, instead remove just the
generated project files.
Removing the VC directories has the unwanted behavior of removing files
other than those generated. Visual Studio will generate its own
preference files (like if you have some debug arguments in your .suo)
and those files sit in the VC directories. We ignore those files since
they are the user's files and should not be deleted. Also the user may
have their own untracked files that we shouldn't be deleting.
Follow-up to 57d349fe which consolidated the project templates.
Assisted-by: Viktor Szakats
Closes https://github.com/curl/curl/pull/18412
This commit is contained in:
parent
ad42850b23
commit
c72bb7aec4
10 changed files with 44 additions and 43 deletions
9
projects/Windows/.gitignore
vendored
9
projects/Windows/.gitignore
vendored
|
|
@ -2,9 +2,6 @@
|
|||
#
|
||||
# SPDX-License-Identifier: curl
|
||||
|
||||
*.ncb
|
||||
*.opensdf
|
||||
*.sdf
|
||||
*.suo
|
||||
*.user
|
||||
*.vcxproj
|
||||
VC10/
|
||||
VC11/
|
||||
VC12/
|
||||
|
|
|
|||
6
projects/Windows/tmpl/README.txt
Normal file
6
projects/Windows/tmpl/README.txt
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
The files in this directory are not meant to be opened with Visual Studio.
|
||||
|
||||
This directory contains template files that are used to generate project files
|
||||
for legacy versions of Visual Studio 2010, 2012 and 2013. To generate the
|
||||
files run generate.bat in the projects directory and refer to that directory's
|
||||
README.
|
||||
|
|
@ -1,5 +1,4 @@
|
|||
Microsoft Visual Studio Solution File, Format Version $FORMATVER
|
||||
# Visual Studio $FORMATYEAR
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "curl", "src\curl.vcxproj", "{5228E9CE-A216-422F-A5E6-58E95E2DD71D}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{DA6F56B4-06A4-441D-AD70-AC5A7D51FADB} = {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
Microsoft Visual Studio Solution File, Format Version $FORMATVER
|
||||
# Visual Studio $FORMATYEAR
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "curl", "curl.vcxproj", "{5228E9CE-A216-422F-A5E6-58E95E2DD71D}"
|
||||
EndProject
|
||||
Global
|
||||
|
|
|
|||
|
|
@ -1,17 +1,17 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="$TOOLSVER" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
<Extensions>c</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||
<Extensions>h</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||
<Extensions>rc</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
Microsoft Visual Studio Solution File, Format Version $FORMATVER
|
||||
# Visual Studio $FORMATYEAR
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcurl", "libcurl.vcxproj", "{DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}"
|
||||
EndProject
|
||||
Global
|
||||
|
|
|
|||
|
|
@ -1,17 +1,17 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="$TOOLSVER" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
<Extensions>c</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||
<Extensions>h</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||
<Extensions>rc</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -109,14 +109,14 @@ rem
|
|||
:generate_proj
|
||||
echo.
|
||||
echo Generating %1 project files
|
||||
md Windows\%1\lib
|
||||
md Windows\%1\src
|
||||
if not exist Windows\%1\lib md Windows\%1\lib
|
||||
if not exist Windows\%1\src md Windows\%1\src
|
||||
call :generate %1 Windows\tmpl\curl-all.sln Windows\%1\curl-all.sln
|
||||
call :generate %1 Windows\tmpl\curl.sln Windows\%1\src\curl.sln
|
||||
call :generate %1 Windows\tmpl\curl.vcxproj.tmpl Windows\%1\src\curl.vcxproj
|
||||
call :generate %1 Windows\tmpl\curl.vcxproj Windows\%1\src\curl.vcxproj
|
||||
call :generate %1 Windows\tmpl\curl.vcxproj.filters Windows\%1\src\curl.vcxproj.filters
|
||||
call :generate %1 Windows\tmpl\libcurl.sln Windows\%1\lib\libcurl.sln
|
||||
call :generate %1 Windows\tmpl\libcurl.vcxproj.tmpl Windows\%1\lib\libcurl.vcxproj
|
||||
call :generate %1 Windows\tmpl\libcurl.vcxproj Windows\%1\lib\libcurl.vcxproj
|
||||
call :generate %1 Windows\tmpl\libcurl.vcxproj.filters Windows\%1\lib\libcurl.vcxproj.filters
|
||||
|
||||
exit /B
|
||||
|
|
@ -125,10 +125,16 @@ rem Main project clean function.
|
|||
rem
|
||||
rem %1 - version
|
||||
rem
|
||||
:generate_proj
|
||||
:clean_proj
|
||||
echo.
|
||||
echo Removing %1 project files
|
||||
rd /Q /S Windows\%1
|
||||
call :clean Windows\%1\curl-all.sln
|
||||
call :clean Windows\%1\src\curl.sln
|
||||
call :clean Windows\%1\src\curl.vcxproj
|
||||
call :clean Windows\%1\src\curl.vcxproj.filters
|
||||
call :clean Windows\%1\lib\libcurl.sln
|
||||
call :clean Windows\%1\lib\libcurl.vcxproj
|
||||
call :clean Windows\%1\lib\libcurl.vcxproj.filters
|
||||
|
||||
exit /B
|
||||
|
||||
|
|
@ -150,29 +156,25 @@ rem
|
|||
)
|
||||
|
||||
set "S01=$FORMATVER"
|
||||
set "S02=$FORMATYEAR"
|
||||
set "S03=$PLATFORMTOOLSET"
|
||||
set "S04=$SUBDIR"
|
||||
set "S05=$TOOLSVER"
|
||||
set "S02=$PLATFORMTOOLSET"
|
||||
set "S03=$SUBDIR"
|
||||
set "S04=$TOOLSVER"
|
||||
|
||||
if "%1" == "VC10" (
|
||||
set "R01=11.0"
|
||||
set "R02=2010"
|
||||
set "R03=v100"
|
||||
set "R04=VC10"
|
||||
set "R05=4.0"
|
||||
set "R01=11.00"
|
||||
set "R02=v100"
|
||||
set "R03=VC10"
|
||||
set "R04=4.0"
|
||||
) else if "%1%" == "VC11" (
|
||||
set "R01=12.0"
|
||||
set "R02=2012"
|
||||
set "R03=v110"
|
||||
set "R04=VC11"
|
||||
set "R05=4.0"
|
||||
set "R01=12.00"
|
||||
set "R02=v110"
|
||||
set "R03=VC11"
|
||||
set "R04=4.0"
|
||||
) else if "%1%" == "VC12" (
|
||||
set "R01=12.0"
|
||||
set "R02=2013"
|
||||
set "R03=v120"
|
||||
set "R04=VC12"
|
||||
set "R05=12.0"
|
||||
set "R01=12.00"
|
||||
set "R02=v120"
|
||||
set "R03=VC12"
|
||||
set "R04=12.0"
|
||||
)
|
||||
|
||||
echo * %CD%\%3
|
||||
|
|
@ -183,7 +185,6 @@ rem
|
|||
set "var=!var:%S02%=%R02%!"
|
||||
set "var=!var:%S03%=%R03%!"
|
||||
set "var=!var:%S04%=%R04%!"
|
||||
set "var=!var:%S05%=%R05%!"
|
||||
|
||||
set "var=!var:*:=!"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue