Nevron Open Vision Documentation
Framework / Resources / Resource Maker
In This Topic
    Resource Maker
    In This Topic

    The Nevron Resource Maker is a command line tool that creates C# source code files from a set of files you want to use as embedded resources in your NOV application. It expects three arguments separated by a space: the resources root path, the resources XML file, and the LOG file.

    The Nevron Resource Maker is currently only available as a Windows executable command line tool. You can find it in the "Tools\Bin" subfolder of your Nevron Open Vision installation. It is by default:

    "C:\Program Files (x86)\Nevron Software\Nevron Open Vision 2017.1\Tools\Bin".


    You can use the resource maker either at command line or as a pre-build event for your Visual Studio project.

    Sample Usage at Command Prompt
    Copy Code
    C:\NResourceMaker.exe D:\MyProject\Resources Resources.xml ResourceLog.txt
    Sample Usage as a Visual Studio Pre-Build Event
    Copy Code
    $(ProjectDir)NResourceMaker $(ProjectDir)\Resources\ Resources.xml ResourcesLog.txt

    The above syntax asumes that NResourceMaker.exe is located in the project's root directory and the project has a sub directory "Resources" where all resources are placed.


    The Nevron Resource Maker lets you configure the process of resource creation through a XML configuration file in the following format:

    Nevron Resource Maker Default Settings
    Copy Code
      <source excludeFilter="*.scc">
        <binary includeFilter="*" />
        <cursors includeFilter="*.cur" />
        <fonts includeFilter="*.ttf" />
        <images includeFilter="*.png;*.jpg;*.jpeg;*.bmp;*.gif;*.wmf;*.emf" />
        <text includeFilter="*.txt;*.xml;*.csv;*.json;*.ini;*.cfg;*.htm;*.html;*.css;*.js" />
      <target file="NResources.cs" class="NResources" access="internal" namespace="Nevron.Nov.Examples" />

    Element and attribute names are case insensitive and have the following meaning:

    • source (OPTIONAL) - lets you define the files from the source directory to exclude, wildcard characters are supported. You should use semicolon (;) to separate the file filters.
      • binary (OPTIONAL) - specifies the binary files to include
      • cursors (OPTIONAL) - specifies the cursor files to include
      • fonts (OPTIONAL) - specifies the font files to include
      • images (OPTIONAL) - specifies the image files to include
      • text (OPTIONAL) - specifies the text files to include
    • target (REQUIRED) - defines the name of the generated resource file as well as its class name, access modifier and namespace. This file will contain the resource definitions. In its folder will also be created one or more files named "NResourceData1.cs", "NResourceData2.cs", etc., which will contain the actual resource data and which should be manually included in your project when generated for the first time.
    Note that only the target element is required. All other elements are optional and can be omitted. If omitted, they will have the default values shown in the XML document above.


    See Also