greenshot/src/Directory.Build.props

118 lines
5.7 KiB
XML

<Project>
<PropertyGroup>
<Copyright>Copyright © Greenshot 2004-2021</Copyright>
<Authors>Greenshot</Authors>
<PackageIconUrl>https://getgreenshot.org/favicon.ico</PackageIconUrl>
<RepositoryUrl>https://github.com/greenshot/greenshot</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageProjectUrl>https://github.com/greenshot/greenshot</PackageProjectUrl>
<PackageLicenseUrl>https://www.gnu.org/licenses/gpl.html</PackageLicenseUrl>
<PackageLicenseExpression>GPL</PackageLicenseExpression>
<LangVersion>9</LangVersion>
<UseWPF>true</UseWPF>
<UseWindowsForms>true</UseWindowsForms>
<RuntimeIdentifiers>win10-x64;win10-x86;win-x64;win-x86</RuntimeIdentifiers>
<!-- Optional: Publish the repository URL in the built .nupkg (in the NuSpec <Repository> element) -->
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<!-- Optional: Embed source files that are not tracked by the source control manager in the PDB -->
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<TargetFramework>net472</TargetFramework>
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)' != 'Debug' And !$(MSBuildProjectName.Contains('Test')) And !$(MSBuildProjectName.Contains('Demo'))">
<GenerateDocumentationFile>false</GenerateDocumentationFile>
<IsPackable>true</IsPackable>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
</PropertyGroup>
<PropertyGroup Condition="$(MSBuildProjectName.Contains('Tests')) Or $(MSBuildProjectName.Contains('Demo'))">
<GenerateDocumentationFile>false</GenerateDocumentationFile>
<IsPackable>false</IsPackable>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugSymbols>True</DebugSymbols>
<CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
<DebugType>embedded</DebugType>
<Optimize>false</Optimize>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)' == 'Release'">
<Optimize>true</Optimize>
<DebugType>embedded</DebugType>
<DebugSymbols>True</DebugSymbols>
</PropertyGroup>
<ItemGroup Condition="!$(MSBuildProjectName.Contains('Tests')) And $(MSBuildProjectName.StartsWith('Greenshot'))">
<PackageReference Include="Nerdbank.GitVersioning" Version="3.4.194">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All"/>
</ItemGroup>
<ItemGroup>
<Tokens Include="Box13_ClientId">
<ReplacementValue>$(Box13_ClientId)</ReplacementValue>
</Tokens>
<Tokens Include="Box13_ClientSecret">
<ReplacementValue>$(Box13_ClientSecret)</ReplacementValue>
</Tokens>
<Tokens Include="DropBox13_ClientId">
<ReplacementValue>$(DropBox13_ClientId)</ReplacementValue>
</Tokens>
<Tokens Include="DropBox13_ClientSecret">
<ReplacementValue>$(DropBox13_ClientSecret)</ReplacementValue>
</Tokens>
<Tokens Include="Flickr_ClientId">
<ReplacementValue>$(Flickr_ClientId)</ReplacementValue>
</Tokens>
<Tokens Include="Flickr_ClientSecret">
<ReplacementValue>$(Flickr_ClientSecret)</ReplacementValue>
</Tokens>
<Tokens Include="Imgur13_ClientId">
<ReplacementValue>$(Imgur13_ClientId)</ReplacementValue>
</Tokens>
<Tokens Include="Imgur13_ClientSecret">
<ReplacementValue>$(Imgur13_ClientSecret)</ReplacementValue>
</Tokens>
<Tokens Include="Photobucket_ClientId">
<ReplacementValue>$(Photobucket_ClientId)</ReplacementValue>
</Tokens>
<Tokens Include="Photobucket_ClientSecret">
<ReplacementValue>$(Photobucket_ClientSecret)</ReplacementValue>
</Tokens>
<Tokens Include="Picasa_ClientId">
<ReplacementValue>$(Picasa_ClientId)</ReplacementValue>
</Tokens>
<Tokens Include="Picasa_ClientSecret">
<ReplacementValue>$(Picasa_ClientSecret)</ReplacementValue>
</Tokens>
</ItemGroup>
<!-- Add MSBuild.Community.Tasks to use the TemplateFile Task-->
<ItemGroup>
<PackageReference Include="MSBuildTasks" Version="1.5.0.235" GeneratePathProperty="true" DevelopmentDependency="true" />
</ItemGroup>
<Target Name="PostBuild" BeforeTargets="PostBuildEvent" Condition="$(MSBuildProjectName.StartsWith('Greenshot.Plugin.'))">
<Exec Command="
IF NOT EXIST &quot;$(SolutionDir)$(SolutionName)\$(OutDir)Plugins\$(TargetName)&quot; (&#xD;&#xA;
mkdir &quot;$(SolutionDir)$(SolutionName)\$(OutDir)Plugins\$(TargetName)&quot;&#xD;&#xA;
)&#xD;&#xA;
xcopy /f /y /d &quot;$(TargetDir)$(TargetName).*&quot; &quot;$(SolutionDir)$(SolutionName)\$(OutDir)\Plugins\$(TargetName)&quot;&#xD;&#xA;
xcopy /f /y /d &quot;$(TargetDir)*.dll&quot; &quot;$(SolutionDir)$(SolutionName)\$(OutDir)\Plugins\$(TargetName)&quot;&#xD;&#xA;
IF EXIST &quot;$(TargetDir)Languages&quot; (&#xD;&#xA;
IF NOT EXIST &quot;$(SolutionDir)$(SolutionName)\$(OutDir)Languages\$(TargetName)&quot; (&#xD;&#xA;
mkdir &quot;$(SolutionDir)$(SolutionName)\$(OutDir)Languages\$(TargetName)&quot;&#xD;&#xA;
)&#xD;&#xA;
xcopy /f /y /d &quot;$(TargetDir)Languages\*en-US.xml&quot; &quot;$(SolutionDir)$(SolutionName)\$(OutDir)Languages\$(TargetName)&quot;&#xD;&#xA;
)
for /f &quot;tokens=*&quot; %%F in ('dir /b /A-D $(SolutionDir)$(SolutionName)\$(OutDir)') do if EXIST &quot;$(SolutionDir)$(SolutionName)\$(OutDir)\Plugins\$(TargetName)\%%F&quot; (&#xD;&#xA;echo %%F&#xD;&#xA;del &quot;$(SolutionDir)$(SolutionName)\$(OutDir)\Plugins\$(TargetName)\%%F&quot;&#xD;&#xA;)&#xD;&#xA;
" />
</Target>
</Project>