Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Visual Studio .sln/.vcproj generation. #552

Merged
merged 1 commit into from
Dec 2, 2015

Conversation

duncansmart
Copy link

Was getting Can't use an undefined value as an ARRAY reference at /usr/src/git/contrib/buildsystems/engine.pl line 341. when running perl contrib/buildsystems/generate -g Vcproj

Was falling over on invalidcontinue.obj by translating it to invalidcontinue.cbj. Even after fixing regex, it turns out invalidcontinue.c doesn't exist anyway, so we now first check for existence.

Signed-off-by: Duncan Smart duncan.smart@gmail.com

@linquize
Copy link

linquize commented Dec 1, 2015

vcproj is too old vs2005/2008

@dscho
Copy link
Member

dscho commented Dec 1, 2015

@duncansmart thank you for your contribution!

I have to apologize right away because you would not have needed to work on this if I had integrated #256 already. Alas, the time...

Now, comparing your patch and d01d71f I think we might want to go with the latter because it is a bit more precise. Would you agree? If yes, could you replace your commit by the referenced one and add your sign-off?

Thanks.

@dscho
Copy link
Member

dscho commented Dec 1, 2015

vcproj is too old vs2005/2008

@linquize let's stay constructive.

@duncansmart
Copy link
Author

@dscho I agree, d01d71f looks like it was made by someone with a better grasp of Perl than me 😄. Sure go with that one, but I would feel a bit odd myself just appropriating someone else's patch though.

@PhilipOakley
Copy link

If you have a look at the earlier PRs you'll also see #256 which has a load of other goodies as well in getting the who package up to date.

The need for it to be fully VS2015 compatible when determinig some of the pre-requistes, nad personal time pressures, meant I never completed the final bits (plus discussions about "deactivated code" ;-).

I'm happy for it to be taken forward.

Also the dry-run problem was noticed recently on the main Git list (in another context), but I can't remember the outcome.

@dscho
Copy link
Member

dscho commented Dec 1, 2015

I would feel a bit odd myself just appropriating someone else's patch though.

@duncansmart You would not appropriate it but endorse it. And I would like to have that endorsement recorded.

Would you please make it so? We can easily take on the rest of #256 after that.

@dscho
Copy link
Member

dscho commented Dec 1, 2015

@PhilipOakley yeah, time seems to be at a premium with most code contributions 😄 I really appreciate that you pushed it that far, and I hope that I will be able to come back to it and finish it soon (with you, of course).

@linquize
Copy link

linquize commented Dec 1, 2015

@dscho shall we create *.vcxproj which is for vs2010+ ?

@PhilipOakley
Copy link

@linquize "shall we create *.vcxproj which is for vs2010+ ?"

In my experience, VS2010 (the free edition) will happily import the created *.vcproj files and convert them. I'm expecting that this will also be the case for VS2013/15 etc. (I think it worked on 2013 on a new m/c I had ten minutes on..)

It would be "nice" if the code could target a *.vcxproj format, but having seen the old code for the previous vcproj I'd have thought it a poor return on someone's coding time (though maybe good for a new coder, GSoC style) as long as the old format and the converters are provided by MS.

I.e that would be, in summary, a 'No' to coding a *.vcxproj export.

@linquize
Copy link

linquize commented Dec 1, 2015

The advantage of vcxproj is that a single project file can automatically support VS2010, VS2012, VS2013, VS2015 in a single file. The user do not need to upgrade the project file.

The old format (*.vcproj) cannot do like this.

<PropertyGroup>
  <PlatformToolset Condition="'$(PlatformToolset)' == '' and '$(VisualStudioVersion)' == '14.0'">v140_xp</PlatformToolset>
  <PlatformToolset Condition="'$(PlatformToolset)' == '' and '$(VisualStudioVersion)' == '12.0'">v120_xp</PlatformToolset>
  <PlatformToolset Condition="'$(PlatformToolset)' == '' and '$(VisualStudioVersion)' == '11.0'">v110_xp</PlatformToolset>
  <!-- default is v100 -->
<PropertyGroup>

@duncansmart
Copy link
Author

OK, hope I've done it correctly - I've re-pushed @PhilipOakley's cherry picked d01d71f ...

@dscho
Copy link
Member

dscho commented Dec 1, 2015

@duncansmart almost there. If you now re-add @PhilipOakley's sign-off ;-) Have a look e.g. here for Sign-off cascades (the latter Sign-offs tell us that somebody reviewed and re-submitted the code upstream).

Commit 4b623d8 (MSVC: link in invalidcontinue.obj for better
POSIX compatibility, 2014-03-29) introduced invalidcontinue.obj
into the Makefile output, which was not parsed correctly by the
buildsystem. Ignore it, as it is known to Visual Studio and,
there is no matching source file.

Only substitute filenames ending with .o when generating the
source .c filename, otherwise a .cbj file may be expected.

Split the .o and .obj processing; 'make' does not produce .obj
files.

In the future there may be source files that produce .obj files
so keep the two issues (.obj files with & without source files)
separate.

Signed-off-by: Philip Oakley <philipoakley@iee.org>
Signed-off-by: Duncan Smart <duncan.smart@gmail.com>

(cherry picked from commit d01d71f)
@duncansmart
Copy link
Author

@dscho done!

dscho added a commit that referenced this pull request Dec 2, 2015
Fix Visual Studio .sln/.vcproj generation.
@dscho dscho merged commit e58d559 into git-for-windows:master Dec 2, 2015
@dscho
Copy link
Member

dscho commented Dec 2, 2015

Thanks!

dscho added a commit that referenced this pull request Dec 11, 2015
Fix Visual Studio .sln/.vcproj generation.
dscho added a commit that referenced this pull request Jan 5, 2016
Fix Visual Studio .sln/.vcproj generation.
dscho added a commit that referenced this pull request Jan 28, 2016
Fix Visual Studio .sln/.vcproj generation.
dscho added a commit that referenced this pull request Feb 6, 2016
Fix Visual Studio .sln/.vcproj generation.
dscho added a commit that referenced this pull request Feb 23, 2016
Fix Visual Studio .sln/.vcproj generation.
dscho added a commit that referenced this pull request Mar 15, 2016
Fix Visual Studio .sln/.vcproj generation.
dscho added a commit that referenced this pull request Mar 18, 2016
Fix Visual Studio .sln/.vcproj generation.
dscho added a commit that referenced this pull request Mar 29, 2016
Fix Visual Studio .sln/.vcproj generation.
dscho added a commit that referenced this pull request Apr 4, 2016
Fix Visual Studio .sln/.vcproj generation.
dscho added a commit that referenced this pull request Jan 2, 2018
Fix Visual Studio .sln/.vcproj generation.
dscho added a commit that referenced this pull request Jan 18, 2018
Fix Visual Studio .sln/.vcproj generation.
git-for-windows-ci pushed a commit that referenced this pull request Jan 20, 2018
Fix Visual Studio .sln/.vcproj generation.
git-for-windows-ci pushed a commit that referenced this pull request Jan 22, 2018
Fix Visual Studio .sln/.vcproj generation.
git-for-windows-ci pushed a commit that referenced this pull request Jan 22, 2018
Fix Visual Studio .sln/.vcproj generation.
dscho added a commit that referenced this pull request Jan 22, 2018
Fix Visual Studio .sln/.vcproj generation.
dscho added a commit that referenced this pull request Feb 16, 2018
Fix Visual Studio .sln/.vcproj generation.
dscho added a commit that referenced this pull request Mar 23, 2018
Fix Visual Studio .sln/.vcproj generation.
dscho added a commit that referenced this pull request Apr 3, 2018
Fix Visual Studio .sln/.vcproj generation.
dscho added a commit that referenced this pull request May 29, 2018
Fix Visual Studio .sln/.vcproj generation.
dscho added a commit that referenced this pull request May 29, 2018
Fix Visual Studio .sln/.vcproj generation.
PKRoma pushed a commit to PKRoma/git-for-windows that referenced this pull request Jun 22, 2018
Fix Visual Studio .sln/.vcproj generation.
PKRoma pushed a commit to PKRoma/git-for-windows that referenced this pull request Jun 22, 2018
Fix Visual Studio .sln/.vcproj generation.
PKRoma pushed a commit to PKRoma/git-for-windows that referenced this pull request Jun 22, 2018
Fix Visual Studio .sln/.vcproj generation.
dscho added a commit that referenced this pull request Aug 22, 2018
Fix Visual Studio .sln/.vcproj generation.
dscho added a commit to dscho/git that referenced this pull request Aug 22, 2018
Fix Visual Studio .sln/.vcproj generation.
dscho added a commit that referenced this pull request Aug 23, 2018
Fix Visual Studio .sln/.vcproj generation.
dscho added a commit that referenced this pull request Aug 23, 2018
Fix Visual Studio .sln/.vcproj generation.
dscho added a commit that referenced this pull request Aug 23, 2018
Fix Visual Studio .sln/.vcproj generation.
jamill pushed a commit to jamill/git that referenced this pull request Aug 28, 2018
jamill pushed a commit to jamill/git that referenced this pull request Sep 5, 2018
git-for-windows-ci pushed a commit that referenced this pull request Sep 10, 2018
Fix Visual Studio .sln/.vcproj generation.
jamill pushed a commit to jamill/git that referenced this pull request Sep 11, 2018
git-for-windows-ci pushed a commit that referenced this pull request Sep 24, 2018
Fix Visual Studio .sln/.vcproj generation.
dscho added a commit that referenced this pull request Oct 10, 2018
Fix Visual Studio .sln/.vcproj generation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants