PowerToys/.pipelines/build-localization.cmd
Arjun Balgovind dde19380e9
[Localization] Add localized resource dlls to the MSI installer (#6986)
* Added PowerLauncher resource files

* Fixed typo in language

* Updated localized .NET framework projects to include all resx files

* Fixed typo in FZEditor.csproj

* Added FZ Editor (.NET framework) resource dlls

* Updated pipeline

* Tweaked artifact statement to get all resource dlls in pipeline

* Fix SvgPreviewHandler resx inclusion in csproj

* Added condition to allow local MSI builds to run without resources

* Generalized directory code

* Added all resources that are to be added from C# projects, Settings UWP pending

* Added markdown prev handler as keypath

* Added loc script for Settings to move resw files to UWP file format

* Separate markdown and svg resource components to allow guid auto-generation

* Removed old image resizer resources

* Fixed formatting

* Changed tabs to space
2020-10-13 08:20:33 -07:00

34 lines
1.3 KiB
Batchfile

@echo off
rem This script will fail to run unless you have the appropriate permissions
cd /D "%~dp0"
echo Preparing localization build...
setlocal
rem In this sample, the repo root is identical to the script directory path. Adjust the value of the RepoRoot variable accordingly based on your environment.
rem Again, ensure the RepoRoot variable is set to the real repo root location, otherwise the localization toolset wouldn't work as intended.
rem Note that the resolved %~dp0 ends with \.
set RepoRootWithoutBackslash=%~dp0..
set RepoRoot=%RepoRootWithoutBackslash%\
set OutDir=%RepoRoot%out
set NUGET_PACKAGES=%RepoRoot%packages
set LocalizationXLocPkgVer=2.0.0
echo Running localization build...
set XLocPath=%NUGET_PACKAGES%\Localization.XLoc.%LocalizationXLocPkgVer%
set LocProjectDirectory=%RepoRootWithoutBackslash%
rem Run the localization tool on all LocProject.json files in the src directory and it's subdirectories (directory format must not end with \)
dotnet "%XLocPath%\tools\netcore\Microsoft.Localization.XLoc.dll" /f "%LocProjectDirectory%"
echo Localization build finished with exit code '%errorlevel%'.
rem Move UWP resource files to correct file paths as per file path expected by UWP project
cd %RepoRootWithoutBackslash%
powershell -NonInteractive -executionpolicy Unrestricted ".\tools\localization\move_uwp_resources.ps1"
exit /b %errorlevel%