Befehlszeilenoptionen für „MakePri.exe“

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

Hinweis

MakePri.exe wird installiert, wenn Sie beim Installieren des Windows Software Development Kit die Option Windows SDK für verwaltete UWP-Apps aktivieren. Es wird im 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.

Hilfe über die Befehlszeile erhalten

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, MakePri.exe <command> /? um Die Besonderheiten eines Befehls anzuzeigen, und in sehr seltenen Fällen sogar MakePri.exe <command> <option> , um Besonderheiten zu einer Option anzuzeigen.

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 /?

Createconfig-Befehl

Mit createconfig dem Befehl wird eine neue, initialisierte PRI-Konfigurationsdatei erstellt, in der die von Ihnen angegebenen Qualifiziererstandardeinstellungen definiert werden. Führen Sie aus MakePri.exe createconfig /? , um ausführliche 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"

Der dump Befehl gibt eine gespeicherte XML-Datei aus, die eine Liste aller Ressourcen in einer angegebenen PRI-Datei enthält. Führen Sie aus MakePri.exe dump /? , um ausführliche Hilfe zu diesem Befehl anzuzeigen.

Hinweis

Ein schemafreies Ressourcenpaket wurde mit dem Schalter omitSchemaFromResourcePacks in der PRI-Konfigurationsdatei erstellt. Um ein schemafreies Ressourcenpaket abzuspeichern, verwenden Sie den Schalter /es <main_package_PRI_file>. Wenn Sie die Standard-Datei nicht angeben, wird die Fehlermeldung "Die resources.pri im Paket wurde beschädigt, sodass die Verschlüsselung fehlgeschlagen ist (Fehler PRI222: 0xdef0000f – Nicht angegebener Fehler aufgetreten)".

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

Der new Befehl erstellt eine neue PRI-Datei, indem die Dateien in Ihrem Projekt gemäß den Anweisungen der Konfigurationsdatei indiziert werden. Führen Sie aus MakePri.exe new /? , um ausführliche 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

Der resourcepack Befehl erstellt eine neue PRI-Datei, indem die Dateien in Ihrem Projekt gemäß den Anweisungen der Konfigurationsdatei indiziert werden. Eine RESSOURCENPAKET-PRI-Datei enthält nur zusätzliche Varianten von Ressourcen, die bereits in einer vorhandenen PRI-Datei angegeben sind. Führen Sie aus MakePri.exe resourcepack /? , um ausführliche 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

Versionsverwaltungsbefehl

Der versioned Befehl erstellt eine versionierte PRI-Datei, indem die Dateien in Ihrem Projekt gemäß den Anweisungen der Konfigurationsdatei indiziert werden. Führen Sie aus MakePri.exe versioned /? , um ausführliche 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, , newresourcepackundversioned, um den Speicherort der Ressourcenverwaltungssystem-Umgebungserweiterungs-DLL anzugeben.

Protokollierungs-/Metadatendatei

MakePri kann Informationen, die für ein Ressourcenpaket spezifisch sind, in der Indexermetadatendatei enthalten. Hier sehen Sie ein Beispiel für eine Protokolldatei für resources.pri mit 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

Verwenden Sie die Indexdateioption (/if) mit dump, resourcepackund versioned , um eine EINGABE-PRI-Datei anzugeben.

Für resourcepack und versionedkönnen Sie anstelle einer PRI-Datei als Eingabeparameter für /IndexFile(if) 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 eine 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). Indiziere (+) oder ignorieren (-) ausgeblendete Dateien und Ordner.
  • +/-LinkedFiles(lf). Indiziere (+) oder ignoriere (-) verknüpfte Dateien und Ordner.

Option /MappingFile(mf)

Sie verwenden die Zuordnungsdateioption (/mf) mit new, resourcepackund versioned , um eine Zuordnungsdatei zu generieren. MakeAppx.exe verwendet die Zuordnungsdatei, um App-Pakete zu generieren.

/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 Standard Zuordnungsdatei.

"ResourceDimensions"                   "language-de-de"

Dies ist ein Beispielinhalt einer Ressourcenpaketzuordnungsdatei.

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

Zusammenfassung der Ausgabe

Wenn Ressourcenpakete erstellt werden, ist die Ausgabezusammenfassung von MakePRI.exe ausführlicher. Hier 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 Überschreiboption (/o) nicht angegeben wird 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 , um den Ausgabespeicherort und den Namen der zu generierenden PRI-Datei anzugeben. Wenn MakePri.exe mehr als eine RESSOURCEN-PRI-Datei generiert, werden diese im übergeordneten Ordner der Zieldatei abgelegt. Wenn Sie z. B. angeben /of MyParentFolder\TargetFile.pri , generiert MakePri.exe TargetFile.language-en.pri und TargetFile.scale-100.pri neben TargetFile.pri unter ParentFolder.

Hier sehen Sie eine Beispielfehlerbedingung und die entsprechende Fehlermeldung.

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

Option /ReverseMap(rm)

Sie verwenden die Reversezuordnungsoption (/rm) mit new, resourcepackund versioned , um einen Abschnitt mit umgekehrter Zuordnung in der PRI-Datei zu generieren, der zum Debuggen verwendet werden kann.

Option /SchemaFile(sf)

Verwenden Sie die Schemadateioption (/sf) mit new, resourcepackund versioned schreiben Sie eine Schemadatei am angegebenen Speicherort.

Für resourcepack und versionedkönnen Sie anstelle einer PRI-Datei als Eingabeparameter für /IndexFile(if) 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 ihre 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.

Um die Hauptversionsnummer anzugeben, verwenden Sie das Attribut resources@majorVersion in Ihrer Konfigurationsdatei.