moving project files into a separate folder.
deleting remaining bff ignoring project files from git
This commit is contained in:
+15
-13
@@ -1124,9 +1124,9 @@ static void GenerateProject(const char* projectName, const char* projectDir, con
|
||||
}
|
||||
|
||||
offset += sprintf_s(buf + offset, (4 * 1024 * 1024) - offset,
|
||||
" <LocalDebuggerWorkingDirectory>$(SolutionDir)bin\\x64-%s\\</LocalDebuggerWorkingDirectory>\n"
|
||||
" <IntDir>$(SolutionDir)Intermediate\\x64-%s\\%s\\</IntDir>\n"
|
||||
" <OutDir>$(SolutionDir)bin\\x64-%s\\</OutDir>\n"
|
||||
" <LocalDebuggerWorkingDirectory>$(SolutionDir)..\\bin\\x64-%s\\</LocalDebuggerWorkingDirectory>\n"
|
||||
" <IntDir>$(SolutionDir)..\\Intermediate\\x64-%s\\%s\\</IntDir>\n"
|
||||
" <OutDir>$(SolutionDir)..\\bin\\x64-%s\\</OutDir>\n"
|
||||
" </PropertyGroup>\n", cfg, cfg, projectName, cfg);
|
||||
}
|
||||
|
||||
@@ -1140,9 +1140,9 @@ static void GenerateProject(const char* projectName, const char* projectDir, con
|
||||
}
|
||||
|
||||
if (EndsWithNoCase(path, ".cpp") || EndsWithNoCase(path, ".c")) {
|
||||
offset += sprintf_s(buf + offset, (4 * 1024 * 1024) - offset, " <ClCompile Include=\"%s\" />\n", relPath);
|
||||
offset += sprintf_s(buf + offset, (4 * 1024 * 1024) - offset, " <ClCompile Include=\"..\\%s\" />\n", path);
|
||||
} else {
|
||||
offset += sprintf_s(buf + offset, (4 * 1024 * 1024) - offset, " <ClInclude Include=\"%s\" />\n", relPath);
|
||||
offset += sprintf_s(buf + offset, (4 * 1024 * 1024) - offset, " <ClInclude Include=\"..\\%s\" />\n", path);
|
||||
}
|
||||
}
|
||||
offset += sprintf_s(buf + offset, (4 * 1024 * 1024) - offset, " </ItemGroup>\n");
|
||||
@@ -1154,7 +1154,8 @@ static void GenerateProject(const char* projectName, const char* projectDir, con
|
||||
"</Project>\n");
|
||||
|
||||
char outPath[MAX_PATH_LEN];
|
||||
snprintf(outPath, sizeof(outPath), "%s\\%s.vcxproj", projectDir, projectName);
|
||||
CreateDirectoryA("vs", NULL);
|
||||
snprintf(outPath, sizeof(outPath), "vs\\%s.vcxproj", projectName);
|
||||
WriteEntireFile(outPath, buf, offset);
|
||||
printf("Generated %s\n", outPath);
|
||||
|
||||
@@ -1239,19 +1240,19 @@ static void GenerateProject(const char* projectName, const char* projectDir, con
|
||||
dir[len] = '\0';
|
||||
|
||||
filterOffset += sprintf_s(filterBuf + filterOffset, (4 * 1024 * 1024) - filterOffset,
|
||||
" <%s Include=\"%s\">\n"
|
||||
" <%s Include=\"..\\%s\">\n"
|
||||
" <Filter>%s</Filter>\n"
|
||||
" </%s>\n", type, relPath, dir, type);
|
||||
" </%s>\n", type, path, dir, type);
|
||||
} else {
|
||||
filterOffset += sprintf_s(filterBuf + filterOffset, (4 * 1024 * 1024) - filterOffset,
|
||||
" <%s Include=\"%s\" />\n", type, relPath);
|
||||
" <%s Include=\"..\\%s\" />\n", type, path);
|
||||
}
|
||||
}
|
||||
filterOffset += sprintf_s(filterBuf + filterOffset, (4 * 1024 * 1024) - filterOffset,
|
||||
" </ItemGroup>\n</Project>\n");
|
||||
|
||||
char filterOutPath[MAX_PATH_LEN];
|
||||
snprintf(filterOutPath, sizeof(filterOutPath), "%s\\%s.vcxproj.filters", projectDir, projectName);
|
||||
snprintf(filterOutPath, sizeof(filterOutPath), "vs\\%s.vcxproj.filters", projectName);
|
||||
WriteEntireFile(filterOutPath, filterBuf, filterOffset);
|
||||
printf("Generated %s\n", filterOutPath);
|
||||
}
|
||||
@@ -1269,8 +1270,8 @@ static void GenerateSolution(const char* slnName, const char** projectNames, con
|
||||
|
||||
for (int i = 0; i < projCount; i++) {
|
||||
offset += sprintf_s(buf + offset, (4 * 1024 * 1024) - offset,
|
||||
"Project(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"%s\", \"%s\\%s.vcxproj\", \"{%s}\"\n"
|
||||
"EndProject\n", projectNames[i], projectDirs[i], projectNames[i], projectGuids[i]);
|
||||
"Project(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"%s\", \"%s.vcxproj\", \"{%s}\"\n"
|
||||
"EndProject\n", projectNames[i], projectNames[i], projectGuids[i]);
|
||||
}
|
||||
|
||||
offset += sprintf_s(buf + offset, (4 * 1024 * 1024) - offset,
|
||||
@@ -1305,7 +1306,8 @@ static void GenerateSolution(const char* slnName, const char** projectNames, con
|
||||
"EndGlobal\n");
|
||||
|
||||
char outPath[MAX_PATH_LEN];
|
||||
snprintf(outPath, sizeof(outPath), "%s.sln", slnName);
|
||||
CreateDirectoryA("vs", NULL);
|
||||
snprintf(outPath, sizeof(outPath), "vs\\%s.sln", slnName);
|
||||
WriteEntireFile(outPath, buf, offset);
|
||||
printf("Generated %s\n", outPath);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user