forked from vslavik/poedit
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Poedit.Targets
152 lines (129 loc) · 6.29 KB
/
Poedit.Targets
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"
ToolsVersion="4.0">
<PropertyGroup>
<MSBuildCommunityTasksPath>$(MSBuildProjectDirectory)\packages\MSBuildTasks.1.4.0.88\tools</MSBuildCommunityTasksPath>
</PropertyGroup>
<Import Project="$(MSBuildCommunityTasksPath)\MSBuild.Community.Tasks.targets"
Condition="Exists('$(MSBuildCommunityTasksPath)\MSBuild.Community.Tasks.targets')" />
<UsingTask AssemblyFile="$(MSBuildCommunityTasksLib)" TaskName="MSBuild.Community.Tasks.Git.GitCommits"
Condition="Exists('$(MSBuildCommunityTasksPath)\MSBuild.Community.Tasks.targets')" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<DebugSuffix>d</DebugSuffix>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<DebugSuffix></DebugSuffix>
</PropertyGroup>
<PropertyGroup>
<ResourcesOutDir>$(OutDir)Resources\</ResourcesOutDir>
<TranslationsOutDir>$(OutDir)Translations\</TranslationsOutDir>
<GettextOutDir>$(OutDir)GettextTools\</GettextOutDir>
<GettextBinDir>packages\Gettext.Tools.0.19.5.1\tools\</GettextBinDir>
<Msgfmt>$(GettextBinDir)msgfmt.exe -c</Msgfmt>
<PoDirPoedit>locales</PoDirPoedit>
<PoDirWX>deps\wx\locale</PoDirWX>
<PoDirWXMSW>deps\wx\locale\msw</PoDirWXMSW>
</PropertyGroup>
<ItemGroup>
<DLLs Include="deps\icu4c\bin\icudt??.dll" />
<DLLs Include="deps\icu4c\bin\icuuc??$(DebugSuffix).dll" />
<DLLs Include="deps\icu4c\bin\icuin??$(DebugSuffix).dll" />
<DLLs Include="deps\icu4c\source\data\in\icudt*.dat" />
</ItemGroup>
<ItemGroup>
<DataFiles Include="src\resources\*.xrc" />
<DataFiles Include="artwork\*.png" />
<DataFiles Include="artwork\windows\*.png" />
<DataFiles Include="artwork\windows\*.ico" />
<DataFiles Include="artwork\windows\vista\*.ico" />
</ItemGroup>
<ItemGroup>
<TranslationFiles Include="$(PoDirPoedit)\*.po" />
<TranslationFilesWX Include="$(PoDirWX)\*.po" />
<TranslationFilesWXMSW Include="$(PoDirWXMSW)\*.po" />
<!--<TranslationFilesGettext Include="$(GettextDir)share\**\*.mo" />-->
</ItemGroup>
<ItemGroup>
<GettextFiles Include="$(GettextBinDir)\msgcat.exe" />
<GettextFiles Include="$(GettextBinDir)\msgfmt.exe" />
<GettextFiles Include="$(GettextBinDir)\msgunfmt.exe" />
<GettextFiles Include="$(GettextBinDir)\msguniq.exe" />
<GettextFiles Include="$(GettextBinDir)\msgmerge.exe" />
<GettextFiles Include="$(GettextBinDir)\xgettext.exe" />
<GettextFiles Include="$(GettextBinDir)\*.dll" />
</ItemGroup>
<PropertyGroup>
<GitBuildNumberFile>$(MSBuildProjectDirectory)\$(IntermediateOutputPath)\git_build_number.h</GitBuildNumberFile>
<GitBuildNumberOldDefine Condition="Exists('$(GitBuildNumberFile)')">$([System.IO.File]::ReadAllText($(GitBuildNumberFile)).Trim())</GitBuildNumberOldDefine>
</PropertyGroup>
<Target Name="GetGitVersion" BeforeTargets="ClCompile">
<GitCommits>
<Output TaskParameter="CommitsCount" PropertyName="GitBuildNumber" />
</GitCommits>
<CreateProperty Value="#define POEDIT_GIT_BUILD_NUMBER $(GitBuildNumber)">
<Output TaskParameter="Value" PropertyName="GitBuildNumberDefine"/>
</CreateProperty>
<Message Importance="High" Text="Updating git build number to $(GitBuildNumber)..."
Condition="$(GitBuildNumberDefine)!=$(GitBuildNumberOldDefine)" />
<WriteLinesToFile File="$(GitBuildNumberFile)" Lines="$(GitBuildNumberDefine)" Overwrite="true"
Condition="$(GitBuildNumberDefine)!=$(GitBuildNumberOldDefine)" />
</Target>
<Target Name="CopyDLLs" AfterTargets="Link">
<Message Importance="High" Text="Copying 3rd party DLLs to $(OutDir)" />
<Copy
SourceFiles="@(DLLs)"
DestinationFolder="$(OutDir)"
SkipUnchangedFiles="true"
/>
</Target>
<Target Name="CopyDataFiles" AfterTargets="Link">
<Message Importance="High" Text="Copying resources to $(ResourcesOutDir)" />
<MakeDir Directories="$(ResourcesOutDir)" />
<Copy
SourceFiles="@(DataFiles)"
DestinationFolder="$(ResourcesOutDir)"
SkipUnchangedFiles="true"
/>
</Target>
<Target Name="CopyTranslations_Poedit" AfterTargets="Link"
Inputs="@(TranslationFiles)"
Outputs="@(TranslationFiles->'$(TranslationsOutDir)%(Filename)\poedit.mo')">
<MakeDir Directories="@(TranslationFiles->'$(TranslationsOutDir)\%(Filename)')" />
<Exec Command='$(Msgfmt) -o "$(TranslationsOutDir)%(TranslationFiles.Filename)\poedit.mo" @(TranslationFiles)' />
</Target>
<Target Name="CopyTranslations_WX" AfterTargets="Link"
Inputs="@(TranslationFilesWX)"
Outputs="@(TranslationFilesWX->'$(TranslationsOutDir)%(Filename)\wxstd.mo')">
<MakeDir Directories="@(TranslationFilesWX->'$(TranslationsOutDir)\%(Filename)')" />
<Exec Command='$(Msgfmt) -o "$(TranslationsOutDir)%(TranslationFilesWX.Filename)\wxstd.mo" @(TranslationFilesWX)' />
</Target>
<Target Name="CopyTranslations_WXMSW" AfterTargets="Link"
Inputs="@(TranslationFilesWXMSW)"
Outputs="@(TranslationFilesWXMSW->'$(TranslationsOutDir)%(Filename)\wxmsw.mo')">
<MakeDir Directories="@(TranslationFilesWXMSW->'$(TranslationsOutDir)\%(Filename)')" />
<Exec Command='$(Msgfmt) -o "$(TranslationsOutDir)%(TranslationFilesWXMSW.Filename)\wxmsw.mo" @(TranslationFilesWXMSW)' />
</Target>
<Target Name="CleanDataFiles" AfterTargets="Clean">
<Message Importance="High" Text="Cleaning resources, translations etc." />
<RemoveDir Directories="$(ResourcesOutDir)" />
<RemoveDir Directories="$(TranslationsOutDir)" />
<RemoveDir Directories="$(GettextOutDir)" />
</Target>
<Target Name="CopyGettextTools" AfterTargets="Link">
<Message Importance="High" Text="Copying gettext tools binaries to $(GettextOutDir) [@(TranslationFilesGettext)]" />
<MakeDir Directories="$(GettextOutDir)\bin" />
<!--<MakeDir Directories="$(GettextOutDir)\share" />-->
<Copy
SourceFiles="@(GettextFiles)"
DestinationFolder="$(GettextOutDir)\bin"
SkipUnchangedFiles="true"
/>
<!--
<Copy
SourceFiles="@(TranslationFilesGettext)"
DestinationFolder="$(GettextOutDir)\share\%(RecursiveDir)"
SkipUnchangedFiles="true"
/>
-->
</Target>
</Project>