IOS: Create a separate for adding resources
This commit is contained in:
parent
51e5bb717d
commit
283eac7e5f
8 changed files with 27 additions and 2 deletions
|
@ -200,6 +200,11 @@ void CodeBlocksProvider::createProjectFile(const std::string &name, const std::s
|
|||
|
||||
}
|
||||
|
||||
void CodeBlocksProvider::addResourceFiles(const BuildSetup &setup, StringList &includeList, StringList &excludeList) {
|
||||
includeList.push_back(setup.srcDir + "/icons/" + setup.projectName + ".ico");
|
||||
includeList.push_back(setup.srcDir + "/dists/" + setup.projectName + ".rc");
|
||||
}
|
||||
|
||||
void CodeBlocksProvider::writeWarnings(const std::string &name, std::ofstream &output) const {
|
||||
|
||||
// Global warnings
|
||||
|
|
|
@ -37,6 +37,8 @@ protected:
|
|||
|
||||
void createOtherBuildFiles(const BuildSetup &) {}
|
||||
|
||||
void addResourceFiles(const BuildSetup &setup, StringList &includeList, StringList &excludeList);
|
||||
|
||||
void createProjectFile(const std::string &name, const std::string &uuid, const BuildSetup &setup, const std::string &moduleDir,
|
||||
const StringList &includeList, const StringList &excludeList);
|
||||
|
||||
|
|
|
@ -1334,8 +1334,7 @@ void ProjectProvider::createProject(BuildSetup &setup) {
|
|||
createModuleList(setup.srcDir + "/image", setup.defines, setup.testDirs, in, ex);
|
||||
|
||||
// Resource files
|
||||
in.push_back(setup.srcDir + "/icons/" + setup.projectName + ".ico");
|
||||
in.push_back(setup.srcDir + "/dists/" + setup.projectName + ".rc");
|
||||
addResourceFiles(setup, in, ex);
|
||||
|
||||
// Various text files
|
||||
in.push_back(setup.srcDir + "/AUTHORS");
|
||||
|
|
|
@ -418,6 +418,13 @@ protected:
|
|||
*/
|
||||
virtual void createOtherBuildFiles(const BuildSetup &setup) = 0;
|
||||
|
||||
/**
|
||||
* Add resources to the project
|
||||
*
|
||||
* @param setup Description of the desired build setup.
|
||||
*/
|
||||
virtual void addResourceFiles(const BuildSetup &setup, StringList &includeList, StringList &excludeList) = 0;
|
||||
|
||||
/**
|
||||
* Create a project file for the specified list of files.
|
||||
*
|
||||
|
|
|
@ -130,6 +130,11 @@ void MSVCProvider::createOtherBuildFiles(const BuildSetup &setup) {
|
|||
createBuildProp(setup, false, true, "LLVM");
|
||||
}
|
||||
|
||||
void MSVCProvider::addResourceFiles(const BuildSetup &setup, StringList &includeList, StringList &excludeList) {
|
||||
includeList.push_back(setup.srcDir + "/icons/" + setup.projectName + ".ico");
|
||||
includeList.push_back(setup.srcDir + "/dists/" + setup.projectName + ".rc");
|
||||
}
|
||||
|
||||
void MSVCProvider::createGlobalProp(const BuildSetup &setup) {
|
||||
std::ofstream properties((setup.outputDir + '/' + setup.projectDescription + "_Global" + getPropertiesExtension()).c_str());
|
||||
if (!properties)
|
||||
|
|
|
@ -39,6 +39,8 @@ protected:
|
|||
|
||||
void createOtherBuildFiles(const BuildSetup &setup);
|
||||
|
||||
void addResourceFiles(const BuildSetup &setup, StringList &includeList, StringList &excludeList);
|
||||
|
||||
/**
|
||||
* Create the global project properties.
|
||||
*
|
||||
|
|
|
@ -212,6 +212,9 @@ XcodeProvider::XcodeProvider(StringList &global_warnings, std::map<std::string,
|
|||
_rootSourceGroup = NULL;
|
||||
}
|
||||
|
||||
void XcodeProvider::addResourceFiles(const BuildSetup &setup, StringList &includeList, StringList &excludeList) {
|
||||
}
|
||||
|
||||
void XcodeProvider::createWorkspace(const BuildSetup &setup) {
|
||||
// Create project folder
|
||||
std::string workspace = setup.outputDir + '/' + PROJECT_NAME ".xcodeproj";
|
||||
|
|
|
@ -40,6 +40,8 @@ protected:
|
|||
|
||||
void createOtherBuildFiles(const BuildSetup &setup);
|
||||
|
||||
void addResourceFiles(const BuildSetup &setup, StringList &includeList, StringList &excludeList);
|
||||
|
||||
void createProjectFile(const std::string &name, const std::string &uuid, const BuildSetup &setup, const std::string &moduleDir,
|
||||
const StringList &includeList, const StringList &excludeList);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue