aboutsummaryrefslogtreecommitdiff
path: root/devtools/create_project/xcode.cpp
diff options
context:
space:
mode:
authorKamil Zbróg2013-11-26 18:53:03 +0000
committerKamil Zbróg2013-11-26 18:53:03 +0000
commit15bb1c61eda48f09253ccb8d2a42ccad59f3b00a (patch)
treec2f5ac2907225730c6f1cdaa000f549ef7951183 /devtools/create_project/xcode.cpp
parent446c57d281e592653c9935c896d33334d23f0519 (diff)
parente1afc7d0d777dad4b7ca0a58f0bb0324b24f9584 (diff)
downloadscummvm-rg350-15bb1c61eda48f09253ccb8d2a42ccad59f3b00a.tar.gz
scummvm-rg350-15bb1c61eda48f09253ccb8d2a42ccad59f3b00a.tar.bz2
scummvm-rg350-15bb1c61eda48f09253ccb8d2a42ccad59f3b00a.zip
Merge remote-tracking branch 'sync/master' into prince-malik
Conflicts: engines/configure.engines engines/engines.mk engines/plugins_table.h
Diffstat (limited to 'devtools/create_project/xcode.cpp')
-rw-r--r--devtools/create_project/xcode.cpp31
1 files changed, 1 insertions, 30 deletions
diff --git a/devtools/create_project/xcode.cpp b/devtools/create_project/xcode.cpp
index a9b8e7a752..d95bf3e9ee 100644
--- a/devtools/create_project/xcode.cpp
+++ b/devtools/create_project/xcode.cpp
@@ -26,15 +26,6 @@
#include <fstream>
#include <algorithm>
-#if defined(_WIN32) || defined(WIN32)
-#include <windows.h>
-#else
-#include <sys/param.h>
-#include <sys/stat.h>
-#include <dirent.h>
-#include <errno.h>
-#endif
-
namespace CreateProjectTool {
#define DEBUG_XCODE_HASH 0
@@ -88,27 +79,7 @@ XCodeProvider::XCodeProvider(StringList &global_warnings, std::map<std::string,
void XCodeProvider::createWorkspace(const BuildSetup &setup) {
// Create project folder
std::string workspace = setup.outputDir + '/' + PROJECT_NAME ".xcodeproj";
-
-#if defined(_WIN32) || defined(WIN32)
- if (!CreateDirectory(workspace.c_str(), NULL))
- if (GetLastError() != ERROR_ALREADY_EXISTS)
- error("Could not create folder \"" + setup.outputDir + '/' + PROJECT_NAME ".xcodeproj\"");
-#else
- if (mkdir(workspace.c_str(), 0777) == -1) {
- if (errno == EEXIST) {
- // Try to open as a folder (might be a file / symbolic link)
- DIR *dirp = opendir(workspace.c_str());
- if (dirp == NULL) {
- error("Could not create folder \"" + setup.outputDir + '/' + PROJECT_NAME ".xcodeproj\"");
- } else {
- // The folder exists, just close the stream and return
- closedir(dirp);
- }
- } else {
- error("Could not create folder \"" + setup.outputDir + '/' + PROJECT_NAME ".xcodeproj\"");
- }
- }
-#endif
+ createDirectory(workspace);
// Setup global objects
setupDefines(setup);