Closed paroj closed 8 years ago
[author="engine", created="Fri, 16 Oct 2015 09:48:50 +0100"]
Fixed: glew2.cpp
static void open_libgl(void)
{
CFStringRef frameworkPath = CFSTR("/System/Library/Frameworks/OpenGLES.framework");
NSString *sysVersion = [UIDevice currentDevice].systemVersion;
NSArray *sysVersionComponents = [sysVersion componentsSeparatedByString:@"."];
#if TARGET_IPHONE_SIMULATOR
// Ask where Xcode is installed
std::string xcodePath = "/Applications/Xcode.app/Contents/Developer\n";
// The result contains an end line character. Remove it.
size_t pos = xcodePath.find("\n");
xcodePath.erase(pos);
char tempPath[PATH_MAX];
sprintf(tempPath,
"%s/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator%s.%s.sdk/System/Library/Frameworks/OpenGLES.framework",
xcodePath.c_str(),
[[sysVersionComponents objectAtIndex:0] cStringUsingEncoding:NSUTF8StringEncoding],
[[sysVersionComponents objectAtIndex:1] cStringUsingEncoding:NSUTF8StringEncoding]);
frameworkPath = CFStringCreateWithCString(kCFAllocatorDefault, tempPath, kCFStringEncodingUTF8);
#else
// device code
#endif
/*BOOL isSimulator = ([[UIDevice currentDevice].model rangeOfString:@"Simulator"].location != NSNotFound);
if(isSimulator)
{
// Ask where Xcode is installed std::string xcodePath = "/Applications/Xcode.app/Contents/Developer\n";
// The result contains an end line character. Remove it. size_t pos = xcodePath.find("\n"); xcodePath.erase(pos);
char tempPath[PATH_MAX]; sprintf(tempPath, "%s/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator%s.%s.sdk/System/Library/Frameworks/OpenGLES.framework", xcodePath.c_str(), [[sysVersionComponents objectAtIndex:0] cStringUsingEncoding:NSUTF8StringEncoding], [[sysVersionComponents objectAtIndex:1] cStringUsingEncoding:NSUTF8StringEncoding]); frameworkPath = CFStringCreateWithCString(kCFAllocatorDefault, tempPath, kCFStringEncodingUTF8); }
*/
bundleURL = CFURLCreateWithFileSystemPath(kCFAllocatorDefault,
frameworkPath,
kCFURLPOSIXPathStyle, true);
CFRelease(frameworkPath);
bundle = CFBundleCreate(kCFAllocatorDefault, bundleURL);
assert(bundle != NULL);
}
[reporter="ENGine", created="Wed, 14 Oct 2015 12:26:40 +0100"]
Hi, all.
Few day ago I had to upgrade my soft from XCode 6.4 to XCode7.0.1 and now I'm facing the Ogre's bug (for iOS Simulator):
I tried to rebuild Ogre 1.9 from Source (https://bitbucket.org/sinbad/ogre/get/5b731ea126bb.zip + http://sourceforge.net/projects/ogre/fi ... g/download) for XCode7.0.1, but there is the same bug (for iOS Simulator).
Thus, my project works for XCode6.4, iOS SDK 8.4, but when I launch this project under new XCode7.0.1, there is crash.
Also if I'm trying to build the app for iOS device, then the app works without bug! I reinstalled the XCode7.0.1 few times to double check that there are no reasons of XCode, but for the simulator the app doesn't still work
Please, help, guys. Thanks
Original post: http://www.ogre3d.org/forums/viewtopic.php?f=2&t=84195