Befehlszeilenoptionen für „MakePri.exe“

MakePri.exe verfügt über den Satz von Befehlen createconfig, dump, , new, resourcepackund versioned. In diesem Thema werden die Befehlszeilenoptionen für ihre Verwendung erläutert.

Hinweis

MakePri.exe ist installiert, wenn Sie die Option Windows SDK für verwaltete UWP-Apps beim Installieren des Windows Software Development Kit markieren. Sie wird auf dem Pfad %WindowsSdkDir%bin\<WindowsTargetPlatformVersion>\x64\makepri.exe installiert (sowie in Ordnern, die für die anderen Architekturen benannt sind). Beispiel: C:\Program Files (x86)\Windows Kits\10\bin\10.0.17713.0\x64\makepri.exe.

Abrufen von Hilfe über die Befehlszeile

Sie können die Befehle ausführen MakePri.exe help oder MakePri.exe /? anzeigen, die Sie mit MakePri.exe verwenden können. Sie können auch Probleme mit MakePri.exe <command> /? den Einzelheiten zu einem Befehl anzeigen und in sehr seltenen Fällen auch MakePri.exe <command> <option> Details zu einer Option anzeigen.

MakePri-Befehle

C:\>makepri help

Usage:
------
    MakePri.exe <command> [options]

Example:
--------
    MakePri.exe new /cf C:\MyApp\priconfig.xml /pr C:\MyApp\src\ /in PackageName

Description:
------------
    Creates, dumps, and performs utility functions on a PRI file. A PRI file is 
    an index of application resources, such as strings and image files.

Command Options:
----------------
    MakePri.exe createconfig   Creates a PRI config file for use with other
                               commands
    MakePri.exe dump           Dumps the contents of a PRI file
    MakePri.exe new            Creates a new PRI file from scratch
    MakePri.exe resourcepack   Creates a PRI file that contains additional
                               resource variants for a base PRI file
    MakePri.exe versioned      Creates a PRI file based on a previous version

Help:
-----
    MakePri.exe help           Show this help page
    MakePri.exe <command> /?   Shows detailed help for <command>

    For example,
    MakePri.exe createconfig /?

Befehl "Createconfig"

Der createconfig Befehl erstellt eine neue, initialisierte PRI-Konfigurationsdatei, die die von Ihnen angegebenen Qualifiziererstandardwerte definiert. Führen Sie die Ausführung MakePri.exe createconfig /? aus, um detaillierte Hilfe zu diesem Befehl anzuzeigen.

C:\>makepri createconfig /?

Usage:
------
    MakePri.exe createconfig /cf <config file destination> /dq
    <default qualifiers> [options]

Example:
--------
    MakePri.exe createconfig /cf C:\MyApp\priconfig.xml /dq lang-en-US /o /pv 10.0.0

Description:
------------
    Creates a PRI configuration file at <config file destination> with default 
    qualifiers specified by <default qualifiers>. Multiple qualifiers are separated 
    by underscores (_)

Required Parameters:
--------------------
    /ConfigXml(cf)    : <FILEPATH> Configuration file output location
    /Default(dq)      : <QUALIFIERS> The default qualifiers to set in the
                        configuration file. A language qualifier is required

Options:
--------
    /ExtensionDll(ex) : <FILEPATH> Location of the Resource Management System
                        environment extension DLL. This DLL must be signed by
                        a Microsoft-issued certificate. Default is an empty path
                        (no DLL will be used)
    /Overwrite(o)     : Overwrite an existing output file of the same name
                        without prompting
    /Platform(pv)     : <VERSION> Platform version to use for generated
                        configuration file

    FILEPATH          - a path to a file, either relative to the current
                        directory or absolute
    QUALIFIERS        - a valid qualifier token
                        (for example, lang-en-US_scale-100_contrast-high)

Help:
-----
    /Help(h, ?)       : Display the usage help text

Befehl 'Dump'

Mit dem dump Befehl wird eine abgebildete XML-Datei ausgegeben, die eine Liste aller Ressourcen in einer angegebenen PRI-Datei enthält. Führen Sie die Ausführung MakePri.exe dump /? aus, um detaillierte Hilfe zu diesem Befehl anzuzeigen.

Hinweis

Ein schemafreies Ressourcenpaket ist ein Ressourcenpaket, das mit dem Switch omitSchemaFromResourcePacks in der PRI-Konfigurationsdatei erstellt wurde. Verwenden Sie den Switch /es <main_package_PRI_file>, um ein schemafreies Ressourcenpaket abzubilden. Wenn Sie die Hauptdatei nicht angeben, wird die Fehlermeldung "The resources.pri in the package was corrupted so encryption failed (error PRI222: 0xdef0000f - Unspecified error occurred)" angezeigt.

C:\>makepri dump /?

Usage:
------
    MakePri.exe dump [options]

Example:
--------
    MakePri.exe dump /if C:\MyApp\resources.pri /of C:\resources.pri.xml

Description:
------------
    Outputs a dumped xml file at <output file> containing a list of all 
    resources in <index file>.

Options:
--------
    /DumpType(dt)       : <STRING> Format of the dumped file, default is
                          Basic
    /ExtensionDll(ex)   : <FILEPATH> Location of the Resource Management System
                          environment extension DLL. This DLL must be signed by a
                          Microsoft-issued certificate. Default is an empty path
                          (no DLL will be used)
    /ExternalSchema(es) : <FILEPATH> Location of the external schema file
    /IndexFile(if)      : <FILEPATH> Location of the PRI file to dump from.
                          Default is .\resources.pri
    /OutputFile(of)     : <FILEPATH> Output location of the dump file, default
                          is .\[indexfile].xml
    /OutputOptions(oo)  : <OPTIONS> Options to provide detailed control over
                          contents of XML output files.
    /Overwrite(o)       : Overwrite an existing output file of the same name
                          without prompting
    /Verbose(v)         : Causes verbose messages to be output to the console

    Dump Type:
        Either 'Basic', 'Detailed', 'Schema', or 'Summary'

    FILEPATH            - a path to a file, either relative to the current
                          directory or absolute
Help:
-----
    /Help(h, ?)         : Display the usage help text

Neuer Befehl

Mit dem new Befehl wird eine neue PRI-Datei erstellt, indem die Dateien in Ihrem Projekt wie in der Konfigurationsdatei indiziert werden. Führen Sie die Ausführung MakePri.exe new /? aus, um detaillierte Hilfe zu diesem Befehl anzuzeigen.

C:\>makepri new /?

Usage:
------
    MakePri.exe new /cf <config file> /pr <project root> [options]

Example:
--------
    MakePri.exe new /cf C:\MyApp\priconfig.xml /pr C:\MyApp\src\ 
    /mn C:\MyApp\AppXManifest.xml /o /of C:\MyApp\src\resources.pri

Description:
------------
    Creates a PRI file at <output file> by indexing all files in
    <project root> and its subdirectories as directed by <config file>. The
    index will be assigned <index name> to reference resources in the app

Required Parameters:
--------------------
    /ConfigXml(cf)    : <FILEPATH> Configuration file location. Use the
                        'Makepri.exe createconfig' command to generate one
    /ProjectRoot(pr)  : <FOLDERPATH> Root location of project files

Options:
--------
    /AutoMerge(am)    : This flag is not recommended for normal use with .appx
                        packages. It causes Makepri.exe to set the auto
                        merge flag within the PRI file. Default is not set.
    /ExtensionDll(ex) : <FILEPATH> Location of the Resource Management System
                        environment extension DLL. This DLL must be signed by
                        a Microsoft-issued certificate. Default is an empty path
                        (no DLL will be used)
    /IndexLog(il)     : <FILEPATH> XML Log of indexed resources, no file
                        generated by default
    /IndexName(in)    : <STRING> Name for the generated index of resources.
                        Typically matches the .appx package name, class library
                        simple name, etc. May be supplied via the
                        [manifest] parameter.
    /IndexOptions(io) : <OPTIONS> Options to provide detailed control over
                        behavior of resource indexers.
    /Manifest(mn)     : <FILEPATH> Location of the application or component's
                        manifest. This parameter is ignored if [indexname]
                        is given. Default is [projectroot]\AppXManifest.xml
    /MappingFile(mf)  : <MAPPINGFILETYPE> Generate a mapping file in the given
                        file format.
    /OutputFile(of)   : <FILEPATH> Output location of PRI file, default is
                        .\resources.pri
    /Overwrite(o)     : Overwrite an existing output file of the same name
                        without prompting
    /ReverseMap(rm)   : Generate a reverse mapping section in the PRI file
                        which can be used for debugging purposes.
    /SchemaFile(sf)   : <FILEPATH> Output location of XML resource schema
                        description.
    /Verbose(v)       : Causes verbose messages to be output to the console
    /VersionMajor(vma): <INTEGER> [Deprecated] Major version number for
                        index, default is 1

    FOLDERPATH        - a path to a folder
    FILEPATH          - a path to a file, either relative to the current
                        directory or absolute
    MAPPINGFILETYPE   - Supported File type(s): 'AppX'

Help:
-----
    /Help(h, ?)        : Display the usage help text

ResourcePack-Befehl

Mit dem resourcepack Befehl wird eine neue PRI-Datei erstellt, indem die Dateien in Ihrem Projekt wie in der Konfigurationsdatei indiziert werden. Eine PRI-Datei des Ressourcenpakets enthält nur zusätzliche Ressourcenvarianten, die bereits in einer vorhandenen PRI-Datei angegeben sind. Führen Sie die Ausführung MakePri.exe resourcepack /? aus, um detaillierte Hilfe zu diesem Befehl anzuzeigen.

C:\>makepri resourcepack /?

Usage:
------
    MakePri.exe resourcepack /pr <project root> /cf <config file> [options]

Example:
--------
    MakePri.exe resourcepack /cf C:\MyAppEs\priconfig.xml /pr C:\MyAppEs\src\ 
    /if C:\MyApp\1.2\resources.pri /o /of C:\MyAppEs\resources.pri

Description:
------------
    Creates a PRI file at <output file> by indexing all files in 
    <project root> and its subdirectories as directed by <config file>. A 
    resource pack PRI file contains only additional variants of resources 
    already specified in <index file>.

Required Parameters:
--------------------
    /ConfigXml(cf)    : <FILEPATH> Configuration file location. Use
                        'Makepri.exe createconfig' command to generate one
    /ProjectRoot(pr)  : <FOLDERPATH> Root location of project files

Options:
--------
    /AutoMerge(am)    : This flag is not recommended for normal use with .appx
                        packages. It causes Makepri.exe to set the auto
                        merge flag within the PRI file. By default it is set
                        to same as the base PRI file.
    /ExtensionDll(ex) : <FILEPATH> Location of the Resource Management System
                        environment extension DLL. This DLL must be signed by
                        a Microsoft-issued certificate. Default is an empty path
                        (no DLL will be used)
    /IndexFile(if)    : <FILEPATH> Location of the base PRI or XML schema file.
                        Default is <ProjectRoot>\resources.pri
    /IndexLog(il)     : <FILEPATH> XML Log of indexed resources, no file
                        generated by default
    /IndexOptions(io) : <OPTIONS> Options to provide detailed control over
                        behavior of resource indexers.
    /MappingFile(mf)  : <MAPPINGFILETYPE> Generate a mapping file in the given
                        file format.
    /OutputFile(of)   : <FILEPATH> Output location of PRI file, default is
                        .\resources.pri
    /Overwrite(o)     : Overwrite an existing output file of the same name
                        without prompting
    /ReverseMap(rm)   : Generate a reverse mapping section in the PRI file
                        which can be used for debugging purposes.
    /SchemaFile(sf)   : <FILEPATH> Output location of XML resource schema
                        description.
    /Verbose(v)       : Causes verbose messages to be output to the console

    FOLDERPATH        - a path to a folder
    FILEPATH          - a path to a file, either relative to the current
                        directory or absolute
    MAPPINGFILETYPE   - Supported File type(s): 'AppX'

Help:
-----
    /Help(h, ?)        : Display the usage help text

Befehl "Versionsverwaltung"

Mit dem versioned Befehl wird eine versionsgesteuerte PRI-Datei erstellt, indem die Dateien in Ihrem Projekt wie in der Konfigurationsdatei indiziert werden. Führen Sie die Ausführung MakePri.exe versioned /? aus, um detaillierte Hilfe zu diesem Befehl anzuzeigen.

C:\>makepri versioned /?

Usage:
------
    MakePri.exe versioned /cf <config file> /pr <project root> [options]

Example:
--------
    MakePri.exe versioned /cf C:\MyApp\priconfig.xml /pr C:\MyApp\src 
    /if C:\MyApp\1.2\resources.pri /o /of C:\MyApp\src\resources.pri /o

Description:
------------
    Creates a versioned PRI file at <output file> by indexing all files in 
    <project root> and its subdirectories as directed by <config file>.

Required Parameters:
--------------------
    /ConfigXml(cf)    : <FILEPATH> Configuration file location. Use
                        'Makepri.exe createconfig' command to generate one
    /ProjectRoot(pr)  : <FOLDERPATH> Root location of project files

Options:
--------
    /AutoMerge(am)    : This flag is not recommended for normal use with .appx
                        packages. It causes Makepri.exe to set the auto
                        merge flag within the PRI file. By default it is set
                        to same as the base PRI file.
    /ExtensionDll(ex) : <FILEPATH> Location of the Resource Management System
                        environment extension DLL. This DLL must be signed by
                        a Microsoft-issued certificate. Default is an empty path
                        (no DLL will be used)
    /IndexFile(if)    : <FILEPATH> Location of the base PRI or XML schema file
                        to version from. Default is <ProjectRoot>\resources.pri
    /IndexLog(il)     : <FILEPATH> XML Log of indexed resources, no file
                        generated by default
    /IndexOptions(io) : <OPTIONS> Options to provide detailed control over
                        behavior of resource indexers.
    /MappingFile(mf)  : <MAPPINGFILETYPE> Generate a mapping file in the given
                        file format.
    /OutputFile(of)   : <FILEPATH> Output location of PRI file, default is
                        [current directory]\resources.pri
    /Overwrite(o)     : Overwrite an existing output file of the same name
                        without prompting
    /ReverseMap(rm)   : Generate a reverse mapping section in the PRI file
                        which can be used for debugging purposes.
    /SchemaFile(sf)   : <FILEPATH> Output location of XML resource schema
                        description.
    /Verbose(v)       : Causes verbose messages to be output to the console

    FOLDERPATH        - a path to a folder
    FILEPATH          - a path to a file, either relative to the current
                        directory or absolute
    MAPPINGFILETYPE   - Supported File type(s): 'AppX'

Help:
-----
    /Help(h, ?)        : Display the usage help text

/ExtensionDll(ex)

Sie verwenden die Erweiterungs-DLL-Option (/ex) mit createconfig, dump, , new, resourcepackund versioned geben den Speicherort der Ressourcenverwaltungssystem-Umgebungserweiterungs-DLL an.

Protokollierungs-/Metadatendatei

MakePri kann Spezifische Informationen zu einem Ressourcenpaket in der Indexer-Metadatendatei enthalten. Hier ist ein Beispiel für eine Protokolldatei für resources.pri Ressourcen-PRI-Dateien german.pri und highresolution.pri.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<root>
  <package filename="resources.pri">
    <instance itemname="Files\logo.jpg" qualifiers="Scale-100" src="" type="Path">
      <value>logo.scale-100.jpg</value>
    </instance>
    <instance itemname="resources\string2" qualifiers="Language-en-us" src="C:\Users\alias\Desktop\repro\app4\project\en-us\resources.resw" type="String">
      <value>value2</value>
    </instance>
    <instance itemname="resources\string1" qualifiers="Language-en-us" src="C:\Users\alias\Desktop\repro\app4\project\en-us\resources.resw" type="String">
      <value>value1</value>
    </instance>
  </package>
  <package filename="german.pri">
    <instance itemname="resources\string2" qualifiers="Language-de-de" src="C:\Users\alias\Desktop\repro\app4\project\de-de\resources.resw" type="String">
      <value>value2</value>
    </instance>
    <instance itemname="resources\string1" qualifiers="Language-de-de" src="C:\Users\alias\Desktop\repro\app4\project\de-de\resources.resw" type="String">
      <value>value1</value>
    </instance>
  </package>
  <package filename="highresolution.pri">
    <instance itemname="Files\logo.jpg" qualifiers="Scale-200" src="" type="Path">
      <value>logo.scale-200.jpg</value>
    </instance>
  </package>
</root>

/IndexFile(if) option

Sie verwenden die Indexdateioption (/wenn) mit dump, resourcepackund versioned geben Sie eine PRI-Eingabedatei an.

versionedStatt resourcepack eine PRI-Datei als Eingabeparameter für /IndexFile(if) bereitzustellen, können Sie stattdessen eine Schemadatei bereitstellen.

/IndexFile(if) <FILEPATH>

FILEPATH ist ein Token, das den Speicherort der EINGABE-PRI- oder PRI-Schemadatei angibt.

/IndexOptions(io)-Option

Sie verwenden die Indexoptionenoption (/io) mit new, resourcepackund versioned geben Sie Optionen an, die detaillierte Kontrolle über das Verhalten von Ressourcenindexern bieten. Indexoptionen sind standardmäßig deaktiviert.

/IndexOptions(io) <OPTIONS>

OPTIONS ist eine durch Trennzeichen getrennte Liste, die aus den folgenden Optionen besteht.

  • +/-HiddenFiles(hf). Index (+) oder ignorieren (-) ausgeblendete Dateien und Ordner.
  • +/-LinkedFiles(lf). Index (+) oder ignoriert (-) verknüpfte Dateien und Ordner.

/MappingFile(mf)-Option

Sie verwenden die Zuordnungsdateioption (/mf) mit new, resourcepackund versioned generieren eine Zuordnungsdatei. MakeAppx.exe verwendet die Zuordnungsdatei zum Generieren von App-Paketen.

/MappingFile(mf) <MAPPINGFILETYPE>

MAPPINGFILETYPE ist ein Token, das das Format der Zuordnungsdatei angibt. Das einzige gültige unterstützte Format ist appx.

/mf appx

Dies ist ein Beispielinhalt einer Hauptzuordnungsdatei.

"ResourceDimensions"                   "language-de-de"

Dies ist ein Beispielinhalt einer Ressourcenpaketzuordnungsdatei.

"ResourceId"                           "Resources184.la5decaf08"
"ResourceDimensions"                   "language-de-de"

Ausgabezusammenfassung

Wenn Ressourcenpakete erstellt werden, ist die Ausgabezusammenfassung aus MakePRI.exe ausführlicher. Im Folgenden sehen Sie ein Beispiel.

Index Pass Completed: ResourcePackTests\TestApp_ResourcePack
Language Qualifiers: fr-FR, de-DE

Finished building
Version: 1.0
Resource Map Name: AppTest
Named Resources: 11

Resource PRI: fr-FR.pri
Version: 1.0
Resource Candidates: 4
Language: fr-FR

Resource PRI: de-DE.pri
Version: 1.0
Resource Candidates: 4
Language: de-DE

Output File(s) at TempTestResults
Successfully Completed

/Overwrite(o)-Option

Wenn die Option zum Überschreiben (/o) nicht angegeben ist und die angegebenen Ausgabedateien bereits vorhanden sind, erfordert MakePri.exe vor dem Überschreiben eine Bestätigung.

Following file(s) already exist at output location:
<file(s)>
Overwrite these file(s)? [Y]es (any other key to cancel):

/OutputFile(of)-Option

Sie verwenden die Ausgabedateioption (/von) mit dump, new, resourcepackund versioned geben Sie den Ausgabespeicherort und den Namen der zu generierenden PRI-Datei an. Wenn MakePri.exe mehrere PRI-Ressourcendateien generiert, werden sie im übergeordneten Ordner der Zieldatei platziert. Wenn Sie z. B. angeben/of MyParentFolder\TargetFile.pri, wird MakePri.exe generiert TargetFile.language-en.pri und TargetFile.scale-100.pri neben .TargetFile.pri ParentFolder

Hier ist eine Beispielfehlerbedingung und die entsprechende Fehlermeldung.

Fehlerbedingung Fehlermeldung
Der Name der Ausgabedatei entspricht einem der Ressourcenpaketnamen in der Konfiguration. Ungültige Konfiguration: Der Ressourcenpaketname des Ressourcenpakets <darf nicht mit der Ausgabedatei <"outputfilename.pri>" übereinstimmen.>

/ReverseMap(rm)-Option

Sie verwenden die Reverse map-Option (/rm) mit new, resourcepackund versioned generieren einen Reverse-Mapping-Abschnitt in der PRI-Datei, der zum Debuggen verwendet werden kann.

/SchemaFile(sf)-Option

Sie verwenden die Schemadateioption (/sf) mit new, resourcepackund versioned schreiben eine Schemadatei an dem angegebenen Speicherort.

versionedStatt resourcepack eine PRI-Datei als Eingabeparameter für /IndexFile(if) bereitzustellen, können Sie stattdessen eine Schemadatei bereitstellen.

/SchemaFile(sf) <FILEPATH>

FILEPATH ist ein Token, das angibt, wo die Schemadatei geschrieben werden soll.

Dies ist ein Beispiel für eine Schemadatei.

<PriInfo>
	<ResourceMap name="IndexName" resourceVersion="1.0"> 
		<ResourceMapSubtree name="Resources" index="1">
			<NamedResource name="String1" index="1"/>
			<NamedResource name="String2" index="1"/>
		</ResourceMapSubtree>
		<ResourceMapSubtree name="Files" index="2">
			<NamedResource name="logo.png" index="2"/>
			<ResourceMapSubtree name="images" index="3">
				<NamedResource name="success.png" index="3"/>
				<NamedResource name="error.png" index="3"/>
			</ResourceMapSubtree>
		</ResourceMapSubtree>
	</ResourceMap>
</PriInfo>

/VersionMajor(vma) ist veraltet

Die Hauptversionsoption (/vma) (für den new Befehl) ist veraltet, und die Verwendung führt zu dieser Warnmeldung.

'VersionMajor (vma)' input parameter has been deprecated. Please specify major version in the configuration file using 'majorVersion' attribute on 'resources' node.

Verwenden Sie zum Angeben der Hauptversionsnummer das attribut resources@majorVersion in Ihrer Konfigurationsdatei.