Commit e8c08b38 authored by Eike Ziller's avatar Eike Ziller

Merge remote-tracking branch 'origin/3.0' into 3.1

Conflicts:
	src/tools/3rdparty/iossim/iphonesimulator.mm
	src/tools/3rdparty/iossim/main.mm

Change-Id: I574d49a7af24fe3f861a5ab182e2b5999f8f2908
parents 6bf75aca 470f7973
CONFIG += console
QT += core
QT += gui
QT -= core
QT -= gui
QT -= test
CONFIG -= app_bundle
......
......@@ -11,6 +11,7 @@
#import <sys/types.h>
#import <sys/stat.h>
#import <Foundation/NSTask.h>
#import <Foundation/NSFileManager.h>
@class DTiPhoneSimulatorSystemRoot;
NSString *simulatorPrefrencesName = @"com.apple.iphonesimulator";
......@@ -477,7 +478,19 @@ NSString* FindDeveloperDir() {
nsprintf(@"Unable to find developer directory.");
exit(EXIT_FAILURE);
}
NSString* dvtFoundationPath = [developerDir stringByAppendingPathComponent:kDVTFoundationRelativePath];
if (![[NSFileManager defaultManager] fileExistsAtPath:dvtFoundationPath]) {
// execute old version
char *argNew = new char[strlen(argv[0] + 7)];
strcpy(argNew, argv[0]);
strcat(argNew, "_1_8_2");
char **argvNew = new char *[argc + 1];
argvNew[0] = argNew;
for (int iarg = 1; iarg < argc; ++iarg)
argvNew[iarg] = argv[iarg];
argvNew[argc] = 0;
execv(argNew, argvNew);
}
if (strcmp(argv[1], "showsdks") == 0) {
[self LoadSimulatorFramework:developerDir];
exit([self showSDKs]);
......
......@@ -7,6 +7,7 @@
/* derived from https://github.com/phonegap/ios-sim */
#import <AppKit/AppKit.h>
#import <Foundation/NSFileManager.h>
#import "iphonesimulator.h"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment