diff --git a/.editorconfig b/.editorconfig index 6e5ae32..07f2465 100644 --- a/.editorconfig +++ b/.editorconfig @@ -97,6 +97,10 @@ trim_trailing_whitespace = true charset = utf-8-bom end_of_line = crlf -[*.{vcxproj,vcxproj.filters,wapproj,wapproj.user}] +[*.{props,targets}] +charset = utf-8 +end_of_line = lf + +[*.{csproj,vcxproj,vcxproj.filters,wapproj,wapproj.user}] charset = utf-8 end_of_line = crlf diff --git a/.gitattributes b/.gitattributes index 300461a..639ea0d 100644 --- a/.gitattributes +++ b/.gitattributes @@ -21,6 +21,9 @@ app.manifest text encoding=utf-8 eol=lf *.resw text encoding=utf-8-bom eol=crlf *.xaml text encoding=utf-8 eol=crlf *.sln text encoding=utf-8-bom eol=crlf +*.csproj text encoding=utf-8-bom eol=lf +*.props text encoding=utf-8 eol=lf +*.targets text encoding=utf-8 eol=lf *.vcxproj text encoding=utf-8 eol=crlf *.vcxproj.filters text encoding=utf-8-bom eol=crlf packages.config text encoding=utf-8-bom eol=crlf diff --git a/nuget/Mntone.RWinRT.props b/nuget/Mntone.RWinRT.props index c0233b5..d9dfc8d 100644 --- a/nuget/Mntone.RWinRT.props +++ b/nuget/Mntone.RWinRT.props @@ -1,15 +1,15 @@ - - - - - - $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - - - - - $(MSBuildThisFileDirectory)..\include\;%(AdditionalIncludeDirectories) - - - - + + + + + + $(MSBuildAllProjects);$(MSBuildThisFileFullPath) + + + + + $(MSBuildThisFileDirectory)..\include\;%(AdditionalIncludeDirectories) + + + + diff --git a/nuget/Mntone.RWinRT.targets b/nuget/Mntone.RWinRT.targets index e190c27..edf3de2 100644 --- a/nuget/Mntone.RWinRT.targets +++ b/nuget/Mntone.RWinRT.targets @@ -1,126 +1,130 @@ - - - - - Resources - LF - Space4 - - - - __impl - res.g.h - Cpp17 - - - - __Impl - Resources.g.cs - <_MntoneResourceGenerateLanguageVersion>$([MSBuild]::GetTargetFrameworkVersion('$(TargetFramework)')) - CSharp11 - CSharp10 - CSharp9 - CSharpLegacy - - - - en-US - - - - true - <_MntoneResourcePackageToolsFolder>$(MSBuildThisFileDirectory)..\tools\net6\ - <_MntoneResourceCompilerExePath Condition="$(_MntoneResourceCompilerExePath)==''">$(_MntoneResourcePackageToolsFolder)RWinRT.exe - - $(PrepareForBuildDependsOn); - _MntoneResourceGenerate; - - - _MntoneResourceSourceInclude; - $(CoreCompileDependsOn); - - - - - $(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)\AppxPackage\ - $(AppxMSBuildToolsPath)Microsoft.Build.AppxPackage.dll - - - - - $([System.IO.Path]::GetFullPath('$(GeneratedFilesDir)')) - $([MSBuild]::NormalizeDirectory('$(MSBuildProjectDirectory)', '$(IntermediateOutputPath)', 'Generated Files')) - - - - - - - - - - - - - - - - $(TargetName) - - $(RootNamespace) - $(RootNamespace) - - $(TargetName) - - - - <_MntoneResource - Include="@(PRIResource)" - Condition="'%(PRIResource.ExcludedFromBuild)'!='true' And '%(Extension)'=='.resw'" /> - - - - <_MntoneResourceContinueOnError>false - <_MntoneResourceExcludeParams Condition="'$(MntoneResourceExcludeResourceNames)'!=''">--exclude $(MntoneResourceExcludeResourceNames) - <_MntoneResourceParams Condition="'$(_MntoneResourceParams)'==''"> ---input @(_MntoneResource->'"%(FullPath)"',',') ---output "$(MntoneResourceGeneratedFilesDir.TrimEnd('\'))" -$(_MntoneResourceExcludeParams) ---filename $(MntoneResourceGenerateFileName) ---namespace $(MntoneResourceGenerateRootNamespace) ---impl-namespace $(MntoneResourceGenerateImplNamespace) ---default $(MntoneResourceGenerateDefaultResources) ---indent $(MntoneResourceGenerateIndent) ---language $(DefaultResourceLanguage) ---langver $(MntoneResourceGenerateLanguage) ---linebreak $(MntoneResourceGenerateLineBreak) - - - - - - - - - - - - - - - - - - - - + + + + + Resources + Space4 + LF + + + + __impl + res.g.h + Cpp17 + + + + __Impl + Resources.g.cs + <_MntoneResourceGenerateLanguageVersion>$([MSBuild]::GetTargetFrameworkVersion('$(TargetFramework)')) + CSharp11 + CSharp10 + CSharp9 + CSharpLegacy + + + + en-US + + + + true + <_MntoneResourcePackageToolsFolder>$(MSBuildThisFileDirectory)..\tools\net6\ + <_MntoneResourceCompilerExePath Condition="$(_MntoneResourceCompilerExePath)==''">$(_MntoneResourcePackageToolsFolder)RWinRT.exe + + $(PrepareForBuildDependsOn); + _MntoneResourceGenerate; + + + _MntoneResourceSourceInclude; + $(CoreCompileDependsOn); + + + + + $(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)\AppxPackage\ + $(AppxMSBuildToolsPath)Microsoft.Build.AppxPackage.dll + + + + + $([System.IO.Path]::GetFullPath('$(GeneratedFilesDir)')) + $([MSBuild]::NormalizeDirectory('$(MSBuildProjectDirectory)', '$(IntermediateOutputPath)', 'Generated Files')) + + + + + + + + + + + + + + + + $(TargetName) + + $(RootNamespace) + $(RootNamespace) + + $(TargetName) + + + + <_MntoneResource + Include="@(PRIResource)" + Condition="'%(PRIResource.ExcludedFromBuild)'!='true' And '%(Extension)'=='.resw'" /> + + + + <_MntoneResourceContinueOnError>false + <_MntoneResourceExcludeParams Condition="'$(MntoneResourceExcludeResourceNames)'!=''">--exclude $(MntoneResourceExcludeResourceNames) + <_MntoneResourceModeParams Condition="'$(MntoneResourceGenerateMode)'!=''">--mode $(MntoneResourceGenerateMode) + <_MntoneResourcePublicParams Condition="'$(MntoneResourcePublic)'=='true'">--public + <_MntoneResourceParams Condition="'$(_MntoneResourceParams)'==''"> +--input @(_MntoneResource->'"%(FullPath)"',',') +--output "$(MntoneResourceGeneratedFilesDir.TrimEnd('\'))" +$(_MntoneResourceExcludeParams) +--filename $(MntoneResourceGenerateFileName) +--namespace $(MntoneResourceGenerateRootNamespace) +--impl-namespace $(MntoneResourceGenerateImplNamespace) +--default $(MntoneResourceGenerateDefaultResources) +--indent $(MntoneResourceGenerateIndent) +--language $(DefaultResourceLanguage) +--langver $(MntoneResourceGenerateLanguage) +--linebreak $(MntoneResourceGenerateLineBreak) +$(_MntoneResourceModeParams) +$(_MntoneResourcePublicParams) + + + + + + + + + + + + + + + + + + + + diff --git a/nuget/build.cmd b/nuget/build.cmd index c6e0c34..5e56e78 100644 --- a/nuget/build.cmd +++ b/nuget/build.cmd @@ -18,7 +18,7 @@ goto MAIN echo +------------------------------------------- echo ^| Build %%f echo +------------------------------------------- - "%MSBUILD%" "%SOLUTION_FILE%" -fl -flp:logfile=msbuild_projection.log -m -t:"%%f":Clean;"%%f":Rebuild -p:Configuration=%TARGET_CONFIGURATION%;Platform=x86 + "%MSBUILD%" "%SOLUTION_FILE%" -fl -flp:logfile=msbuild_rwinrt.log -m -t:"%%f":Clean;"%%f":Rebuild -p:Configuration=%TARGET_CONFIGURATION%;Platform=x86 if errorlevel 1 goto ERROR if "%CLEAN_AFTER_BUILD%" == "true" ( rd /s /q "../obj/%TARGET_CONFIGURATION%/%%f" diff --git a/src/Options.cs b/src/Options.cs index 3646aad..2ef4214 100644 --- a/src/Options.cs +++ b/src/Options.cs @@ -42,7 +42,7 @@ public sealed class Options [Option("mode", Default = int.MaxValue, HelpText = "Output mode (Generator version).")] public int Mode { get; set; } - [Option("public", Default = false, HelpText = "Accessor level is public (C# only).")] + [Option('p', "public", Default = false, HelpText = "Accessor level is public (C# only).")] public bool IsPublic { get; set; } } }