From 112fd246fd4c9d54f268aa9a37b891840f695181 Mon Sep 17 00:00:00 2001 From: Henric Jungheim Date: Fri, 30 Jun 2017 18:00:23 -0700 Subject: [PATCH] Rework locale VS project to use CustomBuildStep. Make sure Clean, Build, and Build targets work. Use NuGet to provide gettext for msgfmt. --- win/Projects/locale/locale.vcxproj | 80 +++++++----- win/Projects/locale/locale.vcxproj.filters | 1 + win/Projects/locale/packages.config | 4 + win/Projects/locale/po.props | 21 ---- win/Projects/locale/po.rules | 33 ----- win/Projects/locale/po.targets | 83 ------------ win/Projects/locale/po.xml | 140 --------------------- 7 files changed, 54 insertions(+), 308 deletions(-) create mode 100644 win/Projects/locale/packages.config delete mode 100755 win/Projects/locale/po.props delete mode 100644 win/Projects/locale/po.rules delete mode 100755 win/Projects/locale/po.targets delete mode 100755 win/Projects/locale/po.xml diff --git a/win/Projects/locale/locale.vcxproj b/win/Projects/locale/locale.vcxproj index a594131e2..ed022c28c 100755 --- a/win/Projects/locale/locale.vcxproj +++ b/win/Projects/locale/locale.vcxproj @@ -15,6 +15,9 @@ locale + + $(MSBuildThisFileDirectory)..\..\packages\Gettext.Tools.0.19.8.1\tools\bin\msgfmt + Utility v120 @@ -24,9 +27,6 @@ v120_xp - - - @@ -45,29 +45,11 @@ $(SolutionDir)$(Configuration)\ $(Configuration)\ - - - for %%I in ("%WXWIN%\locale\*.po") do call :fmt %%~nI -goto :EOF - -:fmt -if not exist "$(OutDir)Languages\%1" mkdir "$(OutDir)Languages\%1" -msgfmt -o "$(OutDir)Languages\%1\wxstd.mo" "%WXWIN%\locale\%1.po" -goto :EOF - - - - - - for %%I in ("%WXWIN%\locale\*.po") do call :fmt %%~nI -goto :EOF - -:fmt -if not exist "$(OutDir)Languages\%1" mkdir "$(OutDir)Languages\%1" -msgfmt -o "$(OutDir)Languages\%1\wxstd.mo" "%WXWIN%\locale\%1.po" -goto :EOF - - + + + $(OutDir)Languages\%(Filename)\Audacity.mo + Compiling %(Filename) locale + @@ -127,10 +109,46 @@ goto :EOF - + + $(OutDir)Languages\gl\wxstd.mo + Compiling wxWidgets %(Filename) to gl locale + false + + + $(OutDir)Languages\ko\wxstd.mo + Compiling wxWidgets %(Filename) to ko locale + false + + + $(OutDir)Languages\pt_PT\wxstd.mo + Compiling wxWidgets %(Filename) to pt_PT locale + false + + + $(OutDir)Languages\%(Filename)\wxstd.mo + Compiling wxWidgets %(Filename) locale + false + + + + + + + + + + "$(MsgfmtCommand)" -o "%(OutputName)" "%(FullPath)" + %(FullPath) + %(OutputName) + + + + + + + + + - - - - \ No newline at end of file + diff --git a/win/Projects/locale/locale.vcxproj.filters b/win/Projects/locale/locale.vcxproj.filters index 23408d9b6..ae7e87066 100755 --- a/win/Projects/locale/locale.vcxproj.filters +++ b/win/Projects/locale/locale.vcxproj.filters @@ -176,5 +176,6 @@ Source Files + diff --git a/win/Projects/locale/packages.config b/win/Projects/locale/packages.config new file mode 100644 index 000000000..893533338 --- /dev/null +++ b/win/Projects/locale/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/win/Projects/locale/po.props b/win/Projects/locale/po.props deleted file mode 100755 index 64c779178..000000000 --- a/win/Projects/locale/po.props +++ /dev/null @@ -1,21 +0,0 @@ - - - - Midl - CustomBuild - - - _SelectedFiles;$(msgfmtDependsOn) - - - - False - $(OutDir)Languages\%(Filename)\Audacity.mo - msgfmt [AllOptions] [AdditionalOptions] [inputs] - %(OutputName) - Compiling %(Filename) locale - - - \ No newline at end of file diff --git a/win/Projects/locale/po.rules b/win/Projects/locale/po.rules deleted file mode 100644 index d17de9a71..000000000 --- a/win/Projects/locale/po.rules +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - diff --git a/win/Projects/locale/po.targets b/win/Projects/locale/po.targets deleted file mode 100755 index f028472a6..000000000 --- a/win/Projects/locale/po.targets +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - _msgfmt - - - - $(MSBuildThisFileDirectory)$(MSBuildThisFileName).xml - - - - - - - - @(msgfmt, '|') - - - - - - - - - $(ComputeLinkInputsTargets); - ComputemsgfmtOutput; - - - $(ComputeLibInputsTargets); - ComputemsgfmtOutput; - - - - - - - - - - - - \ No newline at end of file diff --git a/win/Projects/locale/po.xml b/win/Projects/locale/po.xml deleted file mode 100755 index 303572a53..000000000 --- a/win/Projects/locale/po.xml +++ /dev/null @@ -1,140 +0,0 @@ - - - - - - - - - - General - - - - - Command Line - - - - - - - - - - - - - - Execute Before - - - Specifies the targets for the build customization to run before. - - - - - - - - - - - Execute After - - - Specifies the targets for the build customization to run after. - - - - - - - - - - - - - - Additional Options - - - Additional Options - - - - - - - \ No newline at end of file