Browse Source

Platform: make magnum-info actually useful on iOS.

pull/141/head
Vladimír Vondruš 10 years ago
parent
commit
23074760f3
  1. 5
      src/Magnum/Platform/CMakeLists.txt
  2. 25
      src/Magnum/Platform/MacOSXBundleInfo.plist.in
  3. 10
      src/Magnum/Platform/magnum-info.cpp

5
src/Magnum/Platform/CMakeLists.txt

@ -719,6 +719,11 @@ if(WITH_MAGNUMINFO)
install(FILES magnum-info-nacl.html DESTINATION ${MAGNUM_DATA_INSTALL_DIR} RENAME magnum-info.html)
install(FILES magnum-info-nacl.nmf DESTINATION ${MAGNUM_DATA_INSTALL_DIR} RENAME magnum-info.nmf)
list(APPEND MagnumPlatform_FILES magnum-info-nacl.html magnum-info-nacl.nmf)
elseif(CORRADE_TARGET_IOS)
set_target_properties(magnum-info PROPERTIES
MACOSX_BUNDLE ON
MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/MacOSXBundleInfo.plist.in
XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED "YES")
endif()
# Magnum info target alias for superprojects

25
src/Magnum/Platform/MacOSXBundleInfo.plist.in

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en-US</string>
<key>CFBundleExecutable</key>
<string>${MACOSX_BUNDLE_EXECUTABLE_NAME}</string>
<key>CFBundleIdentifier</key>
<string>cz.mosra.magnum.magnum-info</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>magnum-info</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>opengles-2</string>
</array>
<key>NSHighResolutionCapable</key>
<true/>
</dict>
</plist>

10
src/Magnum/Platform/magnum-info.cpp

@ -154,7 +154,13 @@ MagnumInfo::MagnumInfo(const Arguments& arguments): Platform::WindowlessApplicat
* @todo Make this work in NaCl, somehow the arguments aren't passed to
* constructor but to Init() or whatnot
*/
#ifndef CORRADE_TARGET_NACL
#ifdef CORRADE_TARGET_IOS
{
static_cast<void>(arguments);
const char* iosArguments[] = { "", "--limits" };
args.parse(2, iosArguments);
}
#elif !defined(CORRADE_TARGET_NACL)
args.parse(arguments.argc, arguments.argv);
#endif
@ -175,6 +181,8 @@ MagnumInfo::MagnumInfo(const Arguments& arguments): Platform::WindowlessApplicat
Debug() << "Used application: Platform::WindowlessEglApplication";
#elif defined(MAGNUM_WINDOWLESSNACLAPPLICATION_MAIN)
Debug() << "Used application: Platform::WindowlessNaClApplication";
#elif defined(MAGNUM_WINDOWLESSIOSAPPLICATION_MAIN)
Debug() << "Used application: Platform::WindowlessIosApplication";
#elif defined(MAGNUM_WINDOWLESSCGLAPPLICATION_MAIN)
Debug() << "Used application: Platform::WindowlessCglApplication";
#elif defined(MAGNUM_WINDOWLESSGLXAPPLICATION_MAIN)

Loading…
Cancel
Save