Skip to content

Commit

Permalink
Copy translation files to plugin dir on build
Browse files Browse the repository at this point in the history
Save trouble of having to manually copy changes over
  • Loading branch information
molsonkiko committed Sep 19, 2024
1 parent d4dd19b commit 170a577
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 deletions.
21 changes: 13 additions & 8 deletions JsonToolsNppPlugin/JsonToolsNppPlugin.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -275,15 +275,20 @@
<ItemGroup />
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<Import Project="$(MSBuildProjectDirectory)\PluginInfrastructure\DllExport\NppPlugin.DllExport.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
<Target Name="CopyTestFiles" BeforeTargets="Build">
<Target Name="CopyTranslation" AfterTargets="Build" DependsOnTargets="Build">
<ItemGroup>
<TESTFILES Include="testfiles\**\*.*" />
<NPP32BIT Include="$(MSBuildProgramFiles32)\Notepad++\plugins\JsonTools" />
<NPP64BIT Include="$(ProgramW6432)\Notepad++\plugins\JsonTools" />
<TRANSLATION_ORIGIN Include="..\translation\*.json5" />
<TRANSLATION32 Include="$(MSBuildProgramFiles32)\Notepad++\plugins\JsonTools\translation" />
<TRANSLATION64 Include="$(ProgramW6432)\Notepad++\plugins\JsonTools\translation" />
</ItemGroup>
<Copy SourceFiles="@(TESTFILES)" DestinationFolder="$(ProgramW6432)\Notepad++\plugins\JsonTools\%(RecursiveDir)" SkipUnchangedFiles="true" />
<Copy SourceFiles="@(TESTFILES)" DestinationFolder="$(MSBuildProgramFiles32)\Notepad++\plugins\JsonTools\%(RecursiveDir)" SkipUnchangedFiles="true" />
<MakeDir Directories="@(NPP64BIT)" Condition=" '$(Platform)' == 'x64' " />
<MakeDir Directories="@(NPP32BIT)" Condition=" '$(Platform)' == 'x86' " />
<!-- copy all translation files to NPP plugin dir's subdirectory -->
<MakeDir Directories="@(TRANSLATION64)" Condition=" '$(Platform)' == 'x64' " />
<MakeDir Directories="@(TRANSLATION32)" Condition=" '$(Platform)' == 'x86' " />
<Copy Condition=" '$(Platform)' == 'x64' " SourceFiles="@(TRANSLATION_ORIGIN)" DestinationFolder="@(TRANSLATION64)" SkipUnchangedFiles="true" />
<Copy Condition=" '$(Platform)' == 'x86' " SourceFiles="@(TRANSLATION_ORIGIN)" DestinationFolder="@(TRANSLATION32)" SkipUnchangedFiles="true" />
</Target>
-->
</Project>
4 changes: 2 additions & 2 deletions JsonToolsNppPlugin/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@
// Build Number
// Revision
//
[assembly: AssemblyVersion("8.1.0.8")]
[assembly: AssemblyFileVersion("8.1.0.8")]
[assembly: AssemblyVersion("8.1.0.9")]
[assembly: AssemblyFileVersion("8.1.0.9")]

0 comments on commit 170a577

Please sign in to comment.