Opened 8 years ago

Closed 8 years ago

#6635 closed enhancement (fixed)

makegdal_gen.bat doesn't work for newer versions of Visual Studio

Reported by: ilucena Owned by: ilucena
Priority: normal Milestone: 2.2.0
Component: ConfigBuild Version: svn-trunk
Severity: normal Keywords: makefiles
Cc: Even Rouault

Description

Introduced almost 10 years ago the batch script makegdal_gen.bat generates a .vcproj file that is a Makefile Project for older versions of Visual Studio, like VS 2005 for example.

After VS 2010 it was still possible to import the .vcproj file generated by makegdal_gen. While importing the project VS would update the project to the newest XML structure but the resulting project was not a "Makefile Project" anymore. It wouldn't run makefile.vc and it wouldn't used namke.local and make.opt settings.

In newer versions of Visual Studio is possible to build a new project "from existing" source. That is a popular options in other IDE. But for Visual Studio the two major problems, generate project is not a "Makefile" and the source code tree is not properly loaded into the project. Netbeans does it particularly well.

We need to update makegdal_gen.bat to produce the exact same XML structure that Visual Studio currently uses for "Makefile Project". That should cover VS 2010 and up.

The advantages of this kind of project is that we can continue to use the setting prepared for GDAL building on nmake.opt or on our personal nmake.local while enjoying the full benefits of a modern IDE. Cross reference, refactoring, usage-search and debugging.

See discussion thread on gdal-dev:

http://lists.osgeo.org/pipermail/gdal-dev/2016-August/044961.html

Change History (4)

comment:1 by ilucena, 8 years ago

At revision: 35258 we introduce a new script that generates Makefile Projects compatible with newer version of Visual C++

Here is the usage message:

Usage: makegdal_gen <Visual C++ version> [32|64] <(*) project file name>
Parameters:
   1 : Visual C++ version is not the same as Visual Studio version ( => 10.0 )
   2 : Windows platform 32 for Win32 and 64 for Win64
   3 : Base file name, with no path and no extension (*)
Examples:
   makegdal_gen 10.1 makefileproj_vs10
   makegdal_gen 11.0 makefileproj_vs11
   makegdal_gen 12.0 makefileproj_vs12
   makegdal_gen 14.0 makefileproj_vs14

Please let me know of any typo or problems.

Thanks.

comment:2 by Mateusz Łoskot, 8 years ago

I've tested the new script with VS2015, works well for me.

comment:3 by Even Rouault, 8 years ago

Can we close this ticket ?

comment:4 by Even Rouault, 8 years ago

Resolution: fixed
Status: newclosed

Closing under the assumption that everything required has been done.

Note: See TracTickets for help on using tickets.