重複の可能性:
Ant文字列関数?
wixインストールの一部としてwxiファイルを変更し、GUIDを更新しています。「ペダンティック」警告設定の一部として、GUIDが小文字の場合、wixビルドは失敗します。
どうすればGUIDをantの大文字の文字列に変換できますか?
編集:Ant文字列関数スレッドは間違いなく進むべき道です-Ant文字列関数?
Ant プラグイン Flakaを使用できます。スクリプト言語を使用する必要はありません =
<project name="demo" xmlns:fl="antlib:it.haefelinger.flaka">
<fl:install-property-handler />
<property name="guid" value="a7655b5e-f074-4df1-9636-391aa234f4f4"/>
<!-- simple echo -->
<echo>
#{'${guid}'.toupper}
</echo>
<!-- create new property for further processing -->
<fl:let>
guidtoupper := '#{'${guid}'.toupper}'
</fl:let>
<echo> $${guid} before => ${guid}</echo>
<!-- overwrite existing property -->
<fl:let>
guid ::= '#{'${guid}'.toupper}'
</fl:let>
<echo> $${guid} after => ${guid}</echo>
</project>
出力:
[echo] A7655B5E-F074-4DF1-9636-391AA234F4F4
[echo]
[echo] ${guid} before => a7655b5e-f074-4df1-9636-391aa234f4f4
[echo] ${guid} after => A7655B5E-F074-4DF1-9636-391AA234F4F4