Use MSBuild task for Errors2Enum and Po2Resx tools.#98
Draft
rinrab wants to merge 12 commits intoAmpScm:mainfrom
Draft
Use MSBuild task for Errors2Enum and Po2Resx tools.#98rinrab wants to merge 12 commits intoAmpScm:mainfrom
rinrab wants to merge 12 commits intoAmpScm:mainfrom
Conversation
…is needed for feature usage of it from MSBuild task.
MSBuild requires the class name to be the same as task name.
* src/SharpSvn.MSBuild/Errors2Enum.tasks: * Add declaration of task via UsingTask tag. * Use Microsoft.Build.Tasks.Core.dll as assembly. * src/SharpSvn/Directory.Build.targets: * Add GenerateErrorEnums target and invoke Errors2Enum task from it. * Import Errors2Enum.tasks project. * src/SharpSvn.MSBuild/Errors2Enum.cs * Convert Errors2Enum utility to MSBuild task. * Replace args with parameters. * src/SharpSvn/SharpSvn.vcxproj * Remove execution of the Errors2Enum via command line. * Include Directory.Build.targets file. * src/SharpSvn/SharpSvn.vcxproj.filters * Include Directory.Build.targets file.
* src/SharpSvn/Directory.Build.targets: fix indentation.
* src/SharpSvn.MSBuild/Errors2Enum.cs
* Require WinErrorHeaderPath and ErrnoHeaderPath parameters
instead of VCPath, SDKPath, and UniversalSDKDir.
* Remove magic with finding headers paths.
* Use local variable for path of libssh2 header instead of
LibSsh2HeaderPath parameter.
* src/SharpSvn.MSBuild/Errors2Enum.tasks
* Update parameter list up to changes of the
src/SharpSvn.MSBuild/Errors2Enum.cs.
* src/SharpSvn/Directory.Build.targets
* Find paths of winerror and errno headers.
Logic of finding headers for now is little bit simplified than
it was before.
* src/SharpSvn.MSBuild/Errors2Enum.cs: remove second `if`.
* src/SharpSvn/Directory.Build.targets: * Remove draft and commented code for Po2Resx MSBuild task.
* src/SharpSvn/Directory.Build.targets * Add property group with all header paths. * Pass those properties to the Errors2Enum task.
Prevent regeneration of the errors enum by simply specifying
Inputs and Outputs of the GenerateErrorEnums target.
* src/SharpSvn.MSBuild/Errors2Enum.cs:
* Remove magic with code generation to temp file and latest
coping it the destination if nothing has changed.
* Remove magic with checking for the last changed date of all
header (source) files and comparing them with the destination
file. Now it is done by Inputs and Outputs of the GenerateErrorEnums
target.
* src/SharpSvn/Directory.Build.targets
* Add the GenerateErrorEnumsInputs ItemGroup.
* Specify Inputs and Outputs of the GenerateErrorEnums target.
* src/SharpSvn.MSBuild/Errors2Enum.cs
* Replace all logging to Console with logging to MSBuild logger
(for example, `Log.LogError("Message")`)
* src/SharpSvn/Directory.Build.targets
* Add CleanErrorEnums target which deletes the SvnWindowsError.h
file on rebuild and clean.
Member
|
Nice work. Please ping me if you ever complete this |
Member
|
I like the idea of this PR. We should do this from MSBuild. We shouldn't have our own in-build tooling in the deliverables. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.