From 94e3be208a0712065a9a9fd86f4a1323ef7920f8 Mon Sep 17 00:00:00 2001 From: Sergei Vorobev Date: Wed, 15 Jun 2016 03:49:46 -0700 Subject: [PATCH] Update resources.md doc, partialy fix #746 --- docs/workflow/resources.md | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/docs/workflow/resources.md b/docs/workflow/resources.md index 874394de8..7cd7071f8 100644 --- a/docs/workflow/resources.md +++ b/docs/workflow/resources.md @@ -5,9 +5,13 @@ They live in `src\\resources` folders. At the moment `dotnet cli` doesn't support generating C# bindings (strongly typed resource files). -We are using `src\windows-build\gen` folder in [src\windows-build](https://github.com/PowerShell/psl-windows-build) -with pre-generated `.cs` files to work-around it. -See [issue 756](https://github.com/PowerShell/PowerShell/issues/746) for details. +We are using our own `Start-ResGen` to generate them. + +Usually it's called as part of the regular build with + +``` +Start-PSBuild -ResGen +``` ## Editing resx files @@ -17,15 +21,6 @@ It will try to create `.cs` files for you and you will get whole bunch of hard-t To edit resource file, use any **plain text editor**. Resource file is a simple xml, and it's easy to edit. -### Updating string +## Adding resx files -If you just updated the string value, that's all you need to do: no need to re-generate `.cs` files - -### Adding or removing string - -When you adding or removing string, `.cs` file need to be changed. - -1. Run `Start-ResGen` function from `build.psm1` -1. Make sure your code is building with newly generated resources (run `Start-PSBuild`). -1. Go to submodule (`cd src\windows-build`) and perform the [submodule commit dance](../git/committing.md). -Follow working with [submodule rules](../../.github/CONTRIBUTING.md#submodules) +Add corresponding entries in `Start-ResGen` in `.\build.psm1`.