Ask Learn
Preview
Ask Learn is an AI assistant that can answer questions, clarify concepts, and define terms using trusted Microsoft documentation.
Please sign in to use Ask Learn.
Sign inThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
English Follow (Added at 2-Feb).
以前に Desktop App Converter で変換したアプリで、スケーリング対応アセットを使用する方法を解説しました。先週頃(1/23の週)に DAC アプリが、バージョン 1.0.6 にアップデートされました。ドキュメント上は、Icon Extraction とクリーン アップの向上、バグ対応とだけ記載されていますが、使ってみて大きな変更点と言えるのが、提供されるアイコンなどのリソースの扱い方が変更されたことです。具体的には、次のような変更が行われています。
-MakeAppx オプションを指定しない場合は、次の2種類の対応が考えられます。
スケーリング対応アセットを使用しない場合は、使用されるアセットに応じて AppxManifest.xml を書き換えます。つまり、存在するファイルに書き換えることで、今までと同じようにするということになります。
PRI リソースを自分で作成するには、幾つかの作業を行う必要があります。大まかには、次のような作業が必要になります。
PRI ファイルを簡単に作成するには、-MakeAppx オプションの動作と同じにすることが考えられます。この作業のためには、次の手順に従って PriConfig.xml と layout.resfiles の 2 つのファイルを用意しておきます。
作業フォルダですが、次のような構造になっていると仮定します。
「C:\DAC\VLC」フォルダに、PriConfig.xml と layout.resfiles をコピーします。PriConfig.xml の layout.resfiles の指定を「..\layout.resfiles」のように書き換えます。この理由は、root 属性に指定されている「\」が Appx レイアウトのルートを意味していることから、layout.resfiles を配置したパスに指定するためです。
この作業ができたら、コマンド プロンプトを開いて、「C:\DAC\VLC」フォルダをカレント フォルダにして、次の MakePri.exe コマンドを入力します。
MakePri.exe new /pr .\PackageFiles /cf .\PriConfig.xml /o
このコマンドで「C:\DAC\VLC」フォルダに、resources.pri、resources.scale-100.pri、resources.scale-125.pri、resources.scale-150.pri、resources.scale-200.pri の 5 つの PRI ファイルが作成されます。この 5 つの PRI ファイルを PackageFiles フォルダへコピーします。
PRI ファイルのコピーができれば、MakeAppx.exe ユーティリティを使って Appx を作成します。
MakeAppx.exe pack /d .\PackageFiles /p VLC.appx /l
MakePri.exe ユーティリティを使う時の注意点としては、次のような点があります。
逆を言えば、アイコン アセットのファイル名を変更しないで、ファイルだけを置き換える場合は、Resources.pri を作り直す必要がないことになります。
簡単なのは、PackageFiles\Assets フォルダ内のファイル名を同じにして、ファイルを入れ替えて、本番用のアイコン アセットにすることです。このようにした場合は、MakeAppx.exe ユーティリティに「/l」(エル)オプションを指定して、Appxを作成するだけで済みます。もちろん、ファイル名などを変更する場合は、-MakeAppx オプションを指定しない場合で説明したように、MakePri.exe ユーティリティを使って Resources.pri を作成し直す必要があります。
English Version
Desktop App Converter updated at last week as 30-Jan. So DAC version became v1.0.6. This version include new features.
You chosen one from follow selection.
When chosen not use scaling assets, you must modify AppxManifest.xml as existing assets file name. So it's same way as previous DAC version.
When chosen "create PRI resources", work sequence is follow.
I think how to easy create PRI resources. So it's same way as DAC v1.0.6. This way is following steps.
I think that work folder structure is follow.
You copy PriConfig.xml and layout.resfiles to C:\DAC\VLC folder. So modify PriConfig.xml from "layout.refiles" to "..\layout.resfiles". Because "\" of root element mean Appx Layout root folder, need to become relative path of layout.resfiles.
Then open command prompt, set current folder to C':\DAC\VLC, input follow a command.
MakePri.exe new /pr .\PackageFiles /cf .\PriConfig.xml /o
This command output is "resources.pri" and "resources.scale-100.pri" and "resources.scale-125.pri" and "resources.scale-150.pri" and "resources.scale-200.pri". You must copy this 5 files to PackageFiles folder.
After copied 5 pri files, create appx package with MakeAppx.exe.
MakeAppx.exe pack /d .\PackageFiles /p VLV.appx /l
Notice using MakePRI.
Of course, no change assets file name and replace assets files, not need to re-create PRI resources.
I added English version at 2-Feb.
Ask Learn is an AI assistant that can answer questions, clarify concepts, and define terms using trusted Microsoft documentation.
Please sign in to use Ask Learn.
Sign in