<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ja">
	<id>https://twiki.yo-net.jp/index.php?action=history&amp;feed=atom&amp;title=VC_PlusPlus%3A%E3%82%AB%E3%82%B9%E3%82%BF%E3%83%A0%E3%83%93%E3%83%AB%E3%83%89%E3%82%B9%E3%83%86%E3%83%83%E3%83%97_Custom_Build_Step</id>
	<title>VC PlusPlus:カスタムビルドステップ Custom Build Step - 版の履歴</title>
	<link rel="self" type="application/atom+xml" href="https://twiki.yo-net.jp/index.php?action=history&amp;feed=atom&amp;title=VC_PlusPlus%3A%E3%82%AB%E3%82%B9%E3%82%BF%E3%83%A0%E3%83%93%E3%83%AB%E3%83%89%E3%82%B9%E3%83%86%E3%83%83%E3%83%97_Custom_Build_Step"/>
	<link rel="alternate" type="text/html" href="https://twiki.yo-net.jp/index.php?title=VC_PlusPlus:%E3%82%AB%E3%82%B9%E3%82%BF%E3%83%A0%E3%83%93%E3%83%AB%E3%83%89%E3%82%B9%E3%83%86%E3%83%83%E3%83%97_Custom_Build_Step&amp;action=history"/>
	<updated>2026-04-05T03:29:37Z</updated>
	<subtitle>このウィキのこのページに関する変更履歴</subtitle>
	<generator>MediaWiki 1.38.2</generator>
	<entry>
		<id>https://twiki.yo-net.jp/index.php?title=VC_PlusPlus:%E3%82%AB%E3%82%B9%E3%82%BF%E3%83%A0%E3%83%93%E3%83%AB%E3%83%89%E3%82%B9%E3%83%86%E3%83%83%E3%83%97_Custom_Build_Step&amp;diff=32&amp;oldid=prev</id>
		<title>2022年9月26日 (月) 00:59にYo-netによる</title>
		<link rel="alternate" type="text/html" href="https://twiki.yo-net.jp/index.php?title=VC_PlusPlus:%E3%82%AB%E3%82%B9%E3%82%BF%E3%83%A0%E3%83%93%E3%83%AB%E3%83%89%E3%82%B9%E3%83%86%E3%83%83%E3%83%97_Custom_Build_Step&amp;diff=32&amp;oldid=prev"/>
		<updated>2022-09-26T00:59:20Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ja&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← 古い版&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;2022年9月26日 (月) 09:59時点における版&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l27&quot;&gt;27行目:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;27行目:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;以下のような感じで*.vcxprojの中にカスタムビルドコマンドは定義されています。&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;以下のような感じで*.vcxprojの中にカスタムビルドコマンドは定義されています。&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;syntaxhighlight2 &lt;/del&gt;lang=&amp;quot;text&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;syntaxhighlight &lt;/ins&gt;lang=&amp;quot;text&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;Command Condition=&amp;quot;'$(Configuration)|$(Platform)'=='Debug|Win32'&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;Command Condition=&amp;quot;'$(Configuration)|$(Platform)'=='Debug|Win32'&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;setlocale&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;setlocale&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l34&quot;&gt;34行目:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;34行目:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;:VCEnd&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;:VCEnd&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/Command&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/Command&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;syntaxhighlight2&lt;/del&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;syntaxhighlight&lt;/ins&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;　&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;　&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[VC PlusPlus]]に戻る&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[VC PlusPlus]]に戻る&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Yo-net</name></author>
	</entry>
	<entry>
		<id>https://twiki.yo-net.jp/index.php?title=VC_PlusPlus:%E3%82%AB%E3%82%B9%E3%82%BF%E3%83%A0%E3%83%93%E3%83%AB%E3%83%89%E3%82%B9%E3%83%86%E3%83%83%E3%83%97_Custom_Build_Step&amp;diff=31&amp;oldid=prev</id>
		<title>Yo-net: ページの作成:「VC PlusPlusに戻る == '''概要''' == 　Visual Studioには1つのファイルのような位置づけでソリューションというものがあります。テキストエディタで例えるならば、名前を付けて保存を使って作られるテキストファイル(*.txt)のようなものがソリューション(*.sln)です。ひとつのアプリケーション一式がソリューションです。アプリケーションはいくつかの…」</title>
		<link rel="alternate" type="text/html" href="https://twiki.yo-net.jp/index.php?title=VC_PlusPlus:%E3%82%AB%E3%82%B9%E3%82%BF%E3%83%A0%E3%83%93%E3%83%AB%E3%83%89%E3%82%B9%E3%83%86%E3%83%83%E3%83%97_Custom_Build_Step&amp;diff=31&amp;oldid=prev"/>
		<updated>2022-09-26T00:58:47Z</updated>

		<summary type="html">&lt;p&gt;ページの作成:「&lt;a href=&quot;/VC_PlusPlus&quot; title=&quot;VC PlusPlus&quot;&gt;VC PlusPlus&lt;/a&gt;に戻る == &amp;#039;&amp;#039;&amp;#039;概要&amp;#039;&amp;#039;&amp;#039; == 　Visual Studioには1つのファイルのような位置づけでソリューションというものがあります。テキストエディタで例えるならば、名前を付けて保存を使って作られるテキストファイル(*.txt)のようなものがソリューション(*.sln)です。ひとつのアプリケーション一式がソリューションです。アプリケーションはいくつかの…」&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新規ページ&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[[VC PlusPlus]]に戻る&lt;br /&gt;
== '''概要''' ==&lt;br /&gt;
　Visual Studioには1つのファイルのような位置づけでソリューションというものがあります。テキストエディタで例えるならば、名前を付けて保存を使って作られるテキストファイル(*.txt)のようなものがソリューション(*.sln)です。ひとつのアプリケーション一式がソリューションです。アプリケーションはいくつかのライブラリ(内部的に必要な静的ライブラリのlib、外部に作られる動的ライブラリ)とプログラム(*.exe)やその他の設定ファイル(*.ini, *.config, *.conf)や参照ファイル(*.data, *.dat, *.log, *.pak, *.xml, *.qm,* qml, *.mdあるいは*.(プログラム固有拡張子))から構成されます。管理人のような人間に成り損なったモノが作る簡単なアプリケーションならば、構成されているものは一つのプログラム(*.exe)だけだったりもします。優秀な人もいますよね。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
　ソリューションの説明の後に述べたような個々のモノはソリューションの中にあるプロジェクトと呼ばれる単位になります。一プロジェクトあたりに出力は一つという感じです。*.vcxprojという拡張子のファイルです。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
　vcxprojファイルには、プロジェクトに含まれるプログラムファイル名、コンパイラオプション、リンカーオプション、その他のプログラムファイル生成オプションがテキスト形式で記述されます。そしてビルドイベントとして、①ビルド前、②リンク前、③ビルド後の3つの部分で動作させるコマンドラインバッチ処理と④カスタムビルドステップ、⑤カスタムビルドルールという部分にもコマンドラインバッチ処理が実行できます。プログラムの他に使い方を記したテキストをプログラムから生成するというような使い方ができます。テキストの成型を手動で全部対応していると大変なのは、Web編集と同じです。このほか、プログラム以外のものを自動生成したい場合は、他のプロジェクトでプログラムを作って、それと連携してカスタムビルドを動かしたりするといったように様々なことが実施できます。ステップとイベントとツールと同じようなコマンドがあるけど、何なん？というと違いは動くタイミングです。&lt;br /&gt;
&lt;br /&gt;
*①ビルド前のイベント&lt;br /&gt;
*⑤各ファイルに対するカスタム ビルド ツール&lt;br /&gt;
*MIDL&lt;br /&gt;
*リソース コンパイラ&lt;br /&gt;
*C/C++ コンパイラ&lt;br /&gt;
*②Pre-Link イベント&lt;br /&gt;
*リンカーまたはライブラリアン (必要に応じて)&lt;br /&gt;
*マニフェスト ツール&lt;br /&gt;
*BSCMake&lt;br /&gt;
*④プロジェクトに対するカスタム ビルド ステップ&lt;br /&gt;
*③ビルド後のイベント&lt;br /&gt;
&lt;br /&gt;
　というようなタイミングで動作させることが出来ます。これは元々、MSBuildという名前のファイルで書かれていたコマンドだったのですが、vcxprojがこの機能を吸収した感じになっています。なので、本来は*.vcxprojに対して手動でテキストを記入するような感じだったのです。実は、2019の現在、今も手書きでカスタムビルドのようなコマンドを書くこともあります。この場合、プロジェクトのプロパティ(メニューの[プロジェクト]-[プロパティ]のカスタムビルド…の部分)からはどういうコマンドが実行されるのかわからない感じになります。*.vcxprojファイルをみないとわからない。人からもらってきた*.vcxprojはそのようになっていることもあります。不要なビルドステップが適当に書かれていたりもして、デバッグの都度、更新をしてもいないような、説明書や多国語対応のテキスト生成がされたりすることも起こります。人からもらってきた*.vcxprojなら中身をのぞいてみるような習慣は付けておいた方が良いでしょう。作者の意図を読み取ることができます。&lt;br /&gt;
&lt;br /&gt;
　ちなみに不要なコマンドはバッチ処理と変わらない記述方法なので、毎回実行する必要のないコマンドはコメント化のために先頭に「REM 」のような記述をすると良いでしょう。 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
以下のような感じで*.vcxprojの中にカスタムビルドコマンドは定義されています。&lt;br /&gt;
&amp;lt;syntaxhighlight2 lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;Command Condition=&amp;quot;'$(Configuration)|$(Platform)'=='Debug|Win32'&amp;quot;&amp;gt;&lt;br /&gt;
setlocale&lt;br /&gt;
REM echo&amp;quot;Custom Build Step&amp;quot;&lt;br /&gt;
&lt;br /&gt;
:VCEnd&lt;br /&gt;
&amp;lt;/Command&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight2&amp;gt;&lt;br /&gt;
　&lt;br /&gt;
&lt;br /&gt;
[[VC PlusPlus]]に戻る&lt;/div&gt;</summary>
		<author><name>Yo-net</name></author>
	</entry>
</feed>