1. コンポーネント Visual Studio インストーラーをインストールします。展開して更新 --> オンライン --> 検索
2. プロジェクトを作成します: ファイル -> 新規 -> プロジェクト -> その他のタイプ -> プロジェクトのセットアップ
3. 編集: プロジェクト -> 表示 -> ファイル システム
キーダイアグラム
4. ビルド: プロジェクト -> ビルド
5. テスト: プロジェクト -> インストール | アンインストール
注記:
空ではないリソース ディレクトリは直接削除できません。次の C++ 関数コードで実現できます。
bool removeSetupBuilderDir(std::string path/*=xxx..vdproj*/, std::string tag/*= /dirname/*/)
{
std::fstream file(path, std::ios::in);
if (file.is_open()) {
std::string line;
std::vector<std::string> lines;
bool isFind = false;
while (std::getline(file, line)) {
std::cout << line << std::endl;
std::string::size_type pos = 0;
if ((pos = line.find(tag, pos)) != std::string::npos) {
lines.erase(lines.end() - 1);
lines.erase(lines.end() - 1);
isFind = true;
continue;
}
if (!isFind)
{
lines.push_back(line);
}
else
{
if (*(line.end() - 1) == '}') {
isFind = false;
}
}
}
file.close();
file.open(path, std::ios::out | std::ios::trunc);
for (const auto& i : lines) {
file << i << std::endl;
}
}
return false;
}