-
Notifications
You must be signed in to change notification settings - Fork 202
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
Switch back to patch instead of git apply. #470
Conversation
There were two problems with the fix for the ogre vendor patch: 1. The downloaded ogre sources is not a git repository 2. The fix used Unix line endings instead of DOS ones It seems that newer versions of git do not allow you to call 'git apply' on a directory that is not a git repository. Worse, 'git apply' silently fails to apply the patch in that case (actually, in all cases). So switch back to using patch, which does properly throw errors and does properly work in a non-git repository. Patch fails to apply mixed Unix-style and DOS-style line endings, so also fix the patch up to use only DOS. Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunate approval.
I assume that this means that there will still be a need for an Administrator console on Windows for |
Unfortunately, yes. |
Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
That's quite unfortunate. I was told by @mfriedrich74 (offline) that it is possible to add an xml somewhere to remove the administrator restriction. |
Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
See https://docs.microsoft.com/en-us/windows/win32/sbscs/application-manifests If the MS linker is used, you can use this: if you want manually want to write the application manifest (its linked as a resource of type RT_MANIFEST): manifest.xml
app.rc
app_res.h:
Then just compile app.rc and link the app.res into patch.exe. |
If you can't (re)compile patch.exe, try creating a patch.exe.manifest file in the same folder as patch.exe. |
Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
All right, I've now got it so that Windows doesn't show any warnings, builds are green, and I have an approval. I'll go ahead and merge this. @mfriedrich74 Thanks for the tips. If we are going to move forward with patch.exe, then I think we'd have to do something like you suggest. Another potential option would be to use the 'patch.exe' that is shipped as part of the Windows Git installation, in |
There were two problems with the fix for the ogre vendor patch:
It seems that newer versions of git do not allow you to call
'git apply' on a directory that is not a git repository. Worse,
'git apply' silently fails to apply the patch in that case
(actually, in all cases). So switch back to using patch, which
does properly throw errors and does properly work in a non-git
repository. Patch fails to apply mixed Unix-style and DOS-style
line endings, so also fix the patch up to use only DOS.
Signed-off-by: Chris Lalancette clalancette@openrobotics.org
Reviewers note: the final hunk of change to
pragma-patch.diff
seems like a no-op, but it subtly changes things so that we use CR/LF at the end of lines so Windows is happier with it.This should fix all of the compile warnings we are getting from the Windows nightly jobs, like: https://ci.ros2.org/view/nightly/job/nightly_win_deb/1401/warnings43Result/