mirror of https://github.com/axmolengine/axmol.git
Rework CMake Xcode support. (#20205)
- Build using C++17 by default. - Simplified customization of Xcode project via cmake. - Add documentation to demonstrate how to use the customization. - NOTE: I believe we could compile with bitcode enabled if the box2d library was compiled using bitcode.
This commit is contained in:
parent
cbf3233b59
commit
1a04787287
|
@ -202,6 +202,10 @@ function(setup_cocos_app_config app_name)
|
|||
if(XCODE OR VS)
|
||||
cocos_mark_code_files(${app_name})
|
||||
endif()
|
||||
|
||||
if (XCODE)
|
||||
cocos_config_app_xcode_property(${app_name})
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
# if cc_variable not set, then set it cc_value
|
||||
|
@ -211,52 +215,6 @@ macro(cocos_set_default_value cc_variable cc_value)
|
|||
endif()
|
||||
endmacro()
|
||||
|
||||
# generate macOS app package infomations, need improve for example, the using of info.plist
|
||||
function(cocos_pak_xcode cocos_target)
|
||||
set(oneValueArgs
|
||||
INFO_PLIST
|
||||
BUNDLE_NAME
|
||||
BUNDLE_VERSION
|
||||
COPYRIGHT
|
||||
GUI_IDENTIFIER
|
||||
ICON_FILE
|
||||
INFO_STRING
|
||||
LONG_VERSION_STRING
|
||||
SHORT_VERSION_STRING
|
||||
)
|
||||
set(multiValueArgs)
|
||||
cmake_parse_arguments(ARGS "" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
|
||||
|
||||
string(TIMESTAMP ARGS_COPYRIGHT_YEAR "%Y")
|
||||
# set default value
|
||||
cocos_set_default_value(ARGS_INFO_PLIST "MacOSXBundleInfo.plist.in")
|
||||
cocos_set_default_value(ARGS_BUNDLE_NAME "\${PRODUCT_NAME}")
|
||||
cocos_set_default_value(ARGS_BUNDLE_VERSION "1")
|
||||
cocos_set_default_value(ARGS_COPYRIGHT "Copyright © ${ARGS_COPYRIGHT_YEAR}. All rights reserved.")
|
||||
cocos_set_default_value(ARGS_GUI_IDENTIFIER "org.cocos2dx.${APP_NAME}")
|
||||
cocos_set_default_value(ARGS_ICON_FILE "Icon")
|
||||
cocos_set_default_value(ARGS_INFO_STRING "cocos2d-x app")
|
||||
cocos_set_default_value(ARGS_LONG_VERSION_STRING "1.0.0")
|
||||
cocos_set_default_value(ARGS_SHORT_VERSION_STRING "1.0")
|
||||
# set default values for Info.plist template
|
||||
set_target_properties(${cocos_target}
|
||||
PROPERTIES
|
||||
MACOSX_BUNDLE_INFO_PLIST ${ARGS_INFO_PLIST}
|
||||
)
|
||||
set(MACOSX_BUNDLE_BUNDLE_NAME ${ARGS_BUNDLE_NAME} PARENT_SCOPE)
|
||||
set(MACOSX_BUNDLE_BUNDLE_VERSION ${ARGS_BUNDLE_VERSION} PARENT_SCOPE)
|
||||
set(MACOSX_BUNDLE_COPYRIGHT ${ARGS_COPYRIGHT} PARENT_SCOPE)
|
||||
set(MACOSX_BUNDLE_GUI_IDENTIFIER ${ARGS_GUI_IDENTIFIER} PARENT_SCOPE)
|
||||
set(MACOSX_BUNDLE_ICON_FILE ${ARGS_ICON_FILE} PARENT_SCOPE)
|
||||
set(MACOSX_BUNDLE_INFO_STRING ${ARGS_INFO_STRING} PARENT_SCOPE)
|
||||
set(MACOSX_BUNDLE_LONG_VERSION_STRING ${ARGS_LONG_VERSION_STRING} PARENT_SCOPE)
|
||||
set(MACOSX_BUNDLE_SHORT_VERSION_STRING ${ARGS_SHORT_VERSION_STRING} PARENT_SCOPE)
|
||||
|
||||
message(STATUS "cocos package: ${cocos_target}, plist file: ${ARGS_INFO_PLIST}")
|
||||
|
||||
cocos_config_app_xcode_property(${cocos_target})
|
||||
endfunction()
|
||||
|
||||
# set Xcode property for application, include all depend target
|
||||
macro(cocos_config_app_xcode_property cocos_app)
|
||||
set(depend_libs)
|
||||
|
@ -271,7 +229,6 @@ endmacro()
|
|||
# custom Xcode property for iOS target
|
||||
macro(cocos_config_target_xcode_property cocos_target)
|
||||
if(IOS)
|
||||
set_xcode_property(${cocos_target} IPHONEOS_DEPLOYMENT_TARGET "8.0")
|
||||
set_xcode_property(${cocos_target} ENABLE_BITCODE "NO")
|
||||
set_xcode_property(${cocos_target} ONLY_ACTIVE_ARCH "YES")
|
||||
endif()
|
||||
|
|
|
@ -76,6 +76,7 @@ set(CMAKE_C_STANDARD 99)
|
|||
set(CMAKE_C_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||
|
||||
# check visual studio version
|
||||
if(WINDOWS)
|
||||
|
|
|
@ -1,51 +0,0 @@
|
|||
<?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</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>${MACOSX_BUNDLE_EXECUTABLE_NAME}</string>
|
||||
<key>CFBundleGetInfoString</key>
|
||||
<string>${MACOSX_BUNDLE_INFO_STRING}</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>${MACOSX_BUNDLE_ICON_FILE}</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>${MACOSX_BUNDLE_GUI_IDENTIFIER}</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleLongVersionString</key>
|
||||
<string>${MACOSX_BUNDLE_LONG_VERSION_STRING}</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>${MACOSX_BUNDLE_BUNDLE_NAME}</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>${MACOSX_BUNDLE_SHORT_VERSION_STRING}</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>${MACOSX_BUNDLE_BUNDLE_VERSION}</string>
|
||||
<key>CSResourcesFileMapped</key>
|
||||
<true/>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>UIStatusBarHidden</key>
|
||||
<true/>
|
||||
<key>UIRequiresFullScreen</key>
|
||||
<true/>
|
||||
<key>UILaunchStoryboardName</key>
|
||||
<string>LaunchScreen</string>
|
||||
<key>UISupportedInterfaceOrientations</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
</array>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>${MACOSX_BUNDLE_COPYRIGHT}</string>
|
||||
<key>CFBundleIconFiles</key>
|
||||
<array>
|
||||
<string>${MACOSX_BUNDLE_ICON_FILE}</string>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
|
@ -60,9 +60,52 @@ cmake .. -GXcode -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_SYSROOT=iphoneos
|
|||
open Cocos2d-x.xcodeproj
|
||||
```
|
||||
|
||||
The parameter `-DCMAKE_OSX_SYSROOT=iphoneos` is optional, it generates a build for running on the iOS device. If you want to run in the simulator, please add `-DCMAKE_OSX_SYSROOT=iphonesimulator`, but remember you can't run a metal-support app in the simulator until Xcode 11 and MacOS 10.15.
|
||||
#### How do I customize the generated Xcode project?
|
||||
|
||||
Xcode project settings that you want to affect both the app project and the Cocos2d-X library project should be passed on the command
|
||||
line when invoking `cmake`.
|
||||
|
||||
Xcode project settings that you want to affect the app project only shoudl be put into the its `CMakeLists.txt` file.
|
||||
|
||||
Any Xcode Build Setting can be changed by setting `CMAKE_XCODE_ATTRIBUTE_XXX` where `XXX` is the name found within the Xcode Build
|
||||
Settings page of the target. The following image shows the name of the iOS Deployment Target:
|
||||
|
||||
![Find Xcode Build Setting](images/Xcode_Find_Setting_Name.png)
|
||||
|
||||
Cocos also provides the function `set_xcode_property()` to make this easier to set from within a `CMakeLists.txt` file, where only
|
||||
the `XXX` part needed to be specified:
|
||||
|
||||
```
|
||||
set_xcode_property(${APP_NAME} XXX "Value")
|
||||
```
|
||||
|
||||
##### Deployment Target
|
||||
|
||||
As explained above, pass this on the command line so both the app the Cocos2d-x are built using the same version:
|
||||
|
||||
For iOS pass `-DCMAKE_XCODE_ATTRIBUTE_IPHONEOS_DEPLOYMENT_TARGET=version`, where `version` is `9.0`, `10.0`, etc.
|
||||
|
||||
For macOS pass `-DCMAKE_XCODE_ATTRIBUTE_MACOSX_DEPLOYMENT_TARGET=version`, where `version` is `10.12`, `10.13`, etc.
|
||||
|
||||
##### Code Signing Development Team
|
||||
|
||||
This should be set in the app `CMakeLists.txt` file. You only need to set the "Development Team" as Xcode will automatically manage the
|
||||
other settings (certificate type, etc.). However the value you set is the 10-digit serial number following the development team name,
|
||||
which you can see in the top-right of the [Apple Developer Certificates](https://developer.apple.com/account/resources/certificates/list) page.
|
||||
|
||||
Set it like this:
|
||||
```
|
||||
set_xcode_property(${APP_NAME} DEVELOPMENT_TEAM "GRLXXXX2K9")
|
||||
```
|
||||
|
||||
##### Bundle Identifier, Version numbers and Device Support
|
||||
|
||||
All this information is held in the `Info.plist` file that is part of the app's source files and is therefore not generated by `cmake`. Therefore
|
||||
you can update these values from the `General` page of the Xcode target and the values will be preserved the next time you regenerate the project
|
||||
from `cmake`:
|
||||
|
||||
![Xcode General Page](images/Xcode_General_Page.png)
|
||||
|
||||
if you want to sign iOS app in CMake, you will need to fill development team ID into `set_xcode_property(${APP_NAME} DEVELOPMENT_TEAM "")`, or select to sign in Xcode after project files generated.
|
||||
|
||||
### Android Studio
|
||||
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 363 KiB |
Binary file not shown.
After Width: | Height: | Size: 252 KiB |
|
@ -152,3 +152,9 @@ if(WINDOWS)
|
|||
# compile c as c++. needed for precompiled header
|
||||
set_source_files_properties(${COCOS_SPINE_SRC} base/ccFPSImages.c PROPERTIES LANGUAGE CXX)
|
||||
endif()
|
||||
|
||||
#if(XCODE)
|
||||
# # Later versions of Xcode clang want to compile C++17 with aligned allocation turned on and this is only supported on iOS 11.0+
|
||||
# # TODO: Only turn this off if ${CMAKE_XCODE_ATTRIBUTE_IPHONEOS_DEPLOYMENT_TARGET} < 11.0
|
||||
# target_compile_options(cocos2d PUBLIC $<$<COMPILE_LANGUAGE:CXX>:-fno-aligned-allocation>)
|
||||
#endif()
|
||||
|
|
|
@ -27,8 +27,9 @@
|
|||
"cmake/Modules/Findflatbuffers.cmake",
|
||||
"cmake/Modules/Findxxhash.cmake",
|
||||
"cmake/Modules/PreventInSourceBuilds.cmake",
|
||||
"cmake/Modules/iOSBundleInfo.plist.in",
|
||||
"cmake/README.md",
|
||||
"cmake/images/Xcode_Find_Setting_Name.png",
|
||||
"cmake/images/Xcode_General_Page.png",
|
||||
"cocos/2d/CCAction.cpp",
|
||||
"cocos/2d/CCAction.h",
|
||||
"cocos/2d/CCActionCamera.cpp",
|
||||
|
|
|
@ -133,16 +133,16 @@ target_include_directories(${APP_NAME}
|
|||
setup_cocos_app_config(${APP_NAME})
|
||||
if(APPLE)
|
||||
set_target_properties(${APP_NAME} PROPERTIES RESOURCE "${APP_UI_RES}")
|
||||
|
||||
if(MACOSX)
|
||||
set_target_properties(${APP_NAME} PROPERTIES
|
||||
MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/proj.ios_mac/mac/Info.plist"
|
||||
)
|
||||
set_xcode_property(${APP_NAME} INFOPLIST_FILE "${CMAKE_CURRENT_SOURCE_DIR}/proj.ios_mac/mac/Info.plist")
|
||||
elseif(IOS)
|
||||
cocos_pak_xcode(${APP_NAME} INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/proj.ios_mac/ios/Info.plist")
|
||||
set_xcode_property(${APP_NAME} INFOPLIST_FILE "${CMAKE_CURRENT_SOURCE_DIR}/proj.ios_mac/ios/Info.plist")
|
||||
set_xcode_property(${APP_NAME} ASSETCATALOG_COMPILER_APPICON_NAME "AppIcon")
|
||||
set_xcode_property(${APP_NAME} DEVELOPMENT_TEAM "")
|
||||
set_xcode_property(${APP_NAME} CODE_SIGN_IDENTITY "iPhone Developer")
|
||||
endif()
|
||||
|
||||
# For code-signing, set the DEVELOPMENT_TEAM:
|
||||
#set_xcode_property(${APP_NAME} DEVELOPMENT_TEAM "GRLXXXX2K9")
|
||||
elseif(WINDOWS)
|
||||
cocos_copy_target_dll(${APP_NAME})
|
||||
endif()
|
||||
|
|
|
@ -7,25 +7,23 @@
|
|||
<key>CFBundleDisplayName</key>
|
||||
<string>${PRODUCT_NAME}</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>${MACOSX_BUNDLE_EXECUTABLE_NAME}</string>
|
||||
<string>${EXECUTABLE_NAME}</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>Icon-57.png</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>org.cocos2dx.hellocpp</string>
|
||||
<string>org.cocos2dx.${PRODUCT_NAME}</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>${MACOSX_BUNDLE_BUNDLE_NAME}</string>
|
||||
<key>CFBundleLongVersionString</key>
|
||||
<string>${MACOSX_BUNDLE_LONG_VERSION_STRING}</string>
|
||||
<string>${PRODUCT_NAME}</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>${MACOSX_BUNDLE_SHORT_VERSION_STRING}</string>
|
||||
<string>1.0</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>${MACOSX_BUNDLE_BUNDLE_VERSION}</string>
|
||||
<string>1</string>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>UIAppFonts</key>
|
||||
|
@ -42,6 +40,6 @@
|
|||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
</array>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>${MACOSX_BUNDLE_COPYRIGHT}</string>
|
||||
<string>Copyright © 2019. All rights reserved.</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
|
@ -7,21 +7,19 @@
|
|||
<key>CFBundleDisplayName</key>
|
||||
<string>${PRODUCT_NAME}</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>${MACOSX_BUNDLE_EXECUTABLE_NAME}</string>
|
||||
<string>${EXECUTABLE_NAME}</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>Icon-57.png</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>org.cocos2dx.hellolua</string>
|
||||
<string>org.cocos2dx.${PRODUCT_NAME}</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>${MACOSX_BUNDLE_BUNDLE_VERSION}</string>
|
||||
<string>1</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>${MACOSX_BUNDLE_BUNDLE_NAME}</string>
|
||||
<key>CFBundleLongVersionString</key>
|
||||
<string>${MACOSX_BUNDLE_LONG_VERSION_STRING}</string>
|
||||
<string>${PRODUCT_NAME}</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>${MACOSX_BUNDLE_SHORT_VERSION_STRING}</string>
|
||||
<string>1.0</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleSignature</key>
|
||||
|
@ -47,6 +45,6 @@
|
|||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
</array>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>${MACOSX_BUNDLE_COPYRIGHT}</string>
|
||||
<string>Copyright © 2019. All rights reserved.</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<key>CFBundleIconFile</key>
|
||||
<string>Icon</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>org.cocos2dx.hellolua</string>
|
||||
<string>org.cocos2dx.${PRODUCT_NAME}</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
|
@ -24,10 +24,8 @@
|
|||
<string>1</string>
|
||||
<key>LSApplicationCategoryType</key>
|
||||
<string>public.app-category.games</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>${MACOSX_DEPLOYMENT_TARGET}</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright © 2013. All rights reserved.</string>
|
||||
<string>Copyright © 2019. All rights reserved.</string>
|
||||
<key>NSMainNibFile</key>
|
||||
<string>MainMenu</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
|
|
|
@ -123,21 +123,19 @@ target_link_libraries(${APP_NAME} cocos2d)
|
|||
|
||||
target_include_directories(${APP_NAME} PRIVATE Classes)
|
||||
|
||||
# mark app resources
|
||||
setup_cocos_app_config(${APP_NAME})
|
||||
if(APPLE)
|
||||
if(XCODE)
|
||||
set_target_properties(${APP_NAME} PROPERTIES RESOURCE "${APP_UI_RES}")
|
||||
|
||||
if(MACOSX)
|
||||
set_target_properties(${APP_NAME} PROPERTIES
|
||||
MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/proj.mac/Info.plist"
|
||||
)
|
||||
set_xcode_property(${APP_NAME} INFOPLIST_FILE "${CMAKE_CURRENT_SOURCE_DIR}/proj.mac/Info.plist")
|
||||
elseif(IOS)
|
||||
cocos_pak_xcode(${APP_NAME} INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/proj.ios/Info.plist")
|
||||
set_xcode_property(${APP_NAME} INFOPLIST_FILE "${CMAKE_CURRENT_SOURCE_DIR}/proj.ios/Info.plist")
|
||||
set_xcode_property(${APP_NAME} ASSETCATALOG_COMPILER_APPICON_NAME "AppIcon-${APP_NAME}")
|
||||
set_xcode_property(${APP_NAME} CODE_SIGN_IDENTITY "iPhone Developer")
|
||||
set_xcode_property(${APP_NAME} DEVELOPMENT_TEAM "")
|
||||
set_xcode_property(${APP_NAME} CODE_SIGN_IDENTITY "iPhone Developer")
|
||||
endif()
|
||||
|
||||
# For code-signing, set the DEVELOPMENT_TEAM:
|
||||
#set_xcode_property(${APP_NAME} DEVELOPMENT_TEAM "GRLXXXX2K9")
|
||||
elseif(WINDOWS)
|
||||
cocos_copy_target_dll(${APP_NAME})
|
||||
endif()
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<key>CFBundleDisplayName</key>
|
||||
<string>${PRODUCT_NAME}</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>${MACOSX_BUNDLE_EXECUTABLE_NAME}</string>
|
||||
<string>${EXECUTABLE_NAME}</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>Icon-57.png</string>
|
||||
<key>CFBundleIconFiles</key>
|
||||
|
@ -24,19 +24,19 @@
|
|||
<key>CFBundleIcons~ipad</key>
|
||||
<dict/>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>${MACOSX_BUNDLE_GUI_IDENTIFIER}</string>
|
||||
<string>org.cocos2dx.${PRODUCT_NAME}</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>${MACOSX_BUNDLE_BUNDLE_NAME}</string>
|
||||
<string>${PRODUCT_NAME}</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>${MACOSX_BUNDLE_SHORT_VERSION_STRING}</string>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>${MACOSX_BUNDLE_BUNDLE_VERSION}</string>
|
||||
<string>1</string>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>UILaunchStoryboardName</key>
|
||||
|
@ -50,6 +50,6 @@
|
|||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>${MACOSX_BUNDLE_COPYRIGHT}</string>
|
||||
<string>Copyright © 2019. All rights reserved.</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<key>CFBundleIconFile</key>
|
||||
<string>Icon</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<string>org.cocos2dx.${PRODUCT_NAME}</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
|
@ -22,10 +22,8 @@
|
|||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>${MACOSX_DEPLOYMENT_TARGET}</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright © 2012. All rights reserved.</string>
|
||||
<string>Copyright © 2019. All rights reserved.</string>
|
||||
<key>NSMainNibFile</key>
|
||||
<string>MainMenu</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
|
|
|
@ -459,17 +459,16 @@ target_include_directories(${APP_NAME}
|
|||
setup_cocos_app_config(${APP_NAME})
|
||||
if(APPLE)
|
||||
set_target_properties(${APP_NAME} PROPERTIES RESOURCE "${APP_UI_RES}")
|
||||
|
||||
if(MACOSX)
|
||||
set_target_properties(${APP_NAME} PROPERTIES
|
||||
MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/proj.mac/Info.plist"
|
||||
)
|
||||
set_xcode_property(${APP_NAME} INFOPLIST_FILE "${CMAKE_CURRENT_SOURCE_DIR}/proj.mac/Info.plist")
|
||||
elseif(IOS)
|
||||
# set custom fonts
|
||||
cocos_pak_xcode(${APP_NAME} INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/proj.ios/Info.plist")
|
||||
set_xcode_property(${APP_NAME} INFOPLIST_FILE "${CMAKE_CURRENT_SOURCE_DIR}/proj.ios/Info.plist")
|
||||
set_xcode_property(${APP_NAME} ASSETCATALOG_COMPILER_APPICON_NAME "AppIcon-${APP_NAME}")
|
||||
set_xcode_property(${APP_NAME} DEVELOPMENT_TEAM "")
|
||||
set_xcode_property(${APP_NAME} CODE_SIGN_IDENTITY "iPhone Developer")
|
||||
endif()
|
||||
|
||||
# For code-signing, set the DEVELOPMENT_TEAM:
|
||||
#set_xcode_property(${APP_NAME} DEVELOPMENT_TEAM "GRLXXXX2K9")
|
||||
elseif(WINDOWS)
|
||||
# "too large PDB" error often occurs in cpp-tests when using default "/Zi"
|
||||
target_compile_options(${APP_NAME} PRIVATE /Z7)
|
||||
|
|
|
@ -7,31 +7,25 @@
|
|||
<key>CFBundleDisplayName</key>
|
||||
<string>${PRODUCT_NAME}</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>${MACOSX_BUNDLE_EXECUTABLE_NAME}</string>
|
||||
<string>${EXECUTABLE_NAME}</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>${MACOSX_BUNDLE_ICON_FILE}</string>
|
||||
<string>Icon</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>${MACOSX_BUNDLE_GUI_IDENTIFIER}</string>
|
||||
<string>org.cocos2dx.${PRODUCT_NAME}</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>${MACOSX_BUNDLE_BUNDLE_NAME}</string>
|
||||
<string>${PRODUCT_NAME}</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleLongVersionString</key>
|
||||
<string>${MACOSX_BUNDLE_LONG_VERSION_STRING}</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>${MACOSX_BUNDLE_SHORT_VERSION_STRING}</string>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>${MACOSX_BUNDLE_BUNDLE_VERSION}</string>
|
||||
<string>1</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>${MACOSX_BUNDLE_COPYRIGHT}</string>
|
||||
<key>CFBundleIconFiles</key>
|
||||
<array>
|
||||
<string>${MACOSX_BUNDLE_ICON_FILE}</string>
|
||||
</array>
|
||||
<string>Copyright © 2019. All rights reserved.</string>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>NSAppTransportSecurity</key>
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<key>CFBundleIconFile</key>
|
||||
<string>Icon</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<string>org.cocos2dx.${PRODUCT_NAME}</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
|
@ -24,15 +24,13 @@
|
|||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>${MACOSX_DEPLOYMENT_TARGET}</string>
|
||||
<key>NSAppTransportSecurity</key>
|
||||
<dict>
|
||||
<key>NSAllowsArbitraryLoads</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright © 2012. All rights reserved.</string>
|
||||
<string>Copyright © 2019. All rights reserved.</string>
|
||||
<key>NSMainNibFile</key>
|
||||
<string>MainMenu</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
|
|
|
@ -99,16 +99,16 @@ target_include_directories(${APP_NAME} PRIVATE Classes)
|
|||
setup_cocos_app_config(${APP_NAME})
|
||||
if(APPLE)
|
||||
set_target_properties(${APP_NAME} PROPERTIES RESOURCE "${APP_UI_RES}")
|
||||
|
||||
if(MACOSX)
|
||||
set_target_properties(${APP_NAME} PROPERTIES
|
||||
MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/proj.mac/Info.plist"
|
||||
)
|
||||
set_xcode_property(${APP_NAME} INFOPLIST_FILE "${CMAKE_CURRENT_SOURCE_DIR}/proj.mac/Info.plist")
|
||||
elseif(IOS)
|
||||
cocos_pak_xcode(${APP_NAME} INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/proj.ios/Info.plist")
|
||||
set_xcode_property(${APP_NAME} INFOPLIST_FILE "${CMAKE_CURRENT_SOURCE_DIR}/proj.ios/Info.plist")
|
||||
set_xcode_property(${APP_NAME} ASSETCATALOG_COMPILER_APPICON_NAME "AppIcon-${APP_NAME}")
|
||||
set_xcode_property(${APP_NAME} DEVELOPMENT_TEAM "")
|
||||
set_xcode_property(${APP_NAME} CODE_SIGN_IDENTITY "iPhone Developer")
|
||||
endif()
|
||||
|
||||
# For code-signing, set the DEVELOPMENT_TEAM:
|
||||
#set_xcode_property(${APP_NAME} DEVELOPMENT_TEAM "GRLXXXX2K9")
|
||||
elseif(WINDOWS)
|
||||
cocos_copy_target_dll(${APP_NAME})
|
||||
endif()
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<key>CFBundleDisplayName</key>
|
||||
<string>${PRODUCT_NAME}</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>${MACOSX_BUNDLE_EXECUTABLE_NAME}</string>
|
||||
<string>${EXECUTABLE_NAME}</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>Icon-57.png</string>
|
||||
<key>CFBundleIcons</key>
|
||||
|
@ -15,23 +15,21 @@
|
|||
<key>CFBundleIcons~ipad</key>
|
||||
<dict/>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>${MACOSX_BUNDLE_GUI_IDENTIFIER}</string>
|
||||
<string>org.cocos2dx.${PRODUCT_NAME}</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>${MACOSX_BUNDLE_BUNDLE_NAME}</string>
|
||||
<string>${PRODUCT_NAME}</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleLongVersionString</key>
|
||||
<string>${MACOSX_BUNDLE_LONG_VERSION_STRING}</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>${MACOSX_BUNDLE_SHORT_VERSION_STRING}</string>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>${MACOSX_BUNDLE_BUNDLE_VERSION}</string>
|
||||
<string>1</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>${MACOSX_BUNDLE_COPYRIGHT}</string>
|
||||
<string>Copyright © 2019. All rights reserved.</string>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>UILaunchStoryboardName</key>
|
||||
|
@ -42,8 +40,6 @@
|
|||
<dict>
|
||||
<key>accelerometer</key>
|
||||
<true/>
|
||||
<key>opengles-1</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>UIStatusBarHidden</key>
|
||||
<true/>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<key>CFBundleIconFile</key>
|
||||
<string>Icon</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<string>org.cocos2dx.${PRODUCT_NAME}</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
|
@ -25,7 +25,7 @@
|
|||
<key>LSMinimumSystemVersion</key>
|
||||
<string>${MACOSX_DEPLOYMENT_TARGET}</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright © 2012. All rights reserved.</string>
|
||||
<string>Copyright © 2019. All rights reserved.</string>
|
||||
<key>NSMainNibFile</key>
|
||||
<string>MainMenu</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
|
|
|
@ -112,16 +112,16 @@ target_include_directories(${APP_NAME} PRIVATE Classes)
|
|||
setup_cocos_app_config(${APP_NAME})
|
||||
if(APPLE)
|
||||
set_target_properties(${APP_NAME} PROPERTIES RESOURCE "${APP_UI_RES}")
|
||||
|
||||
if(MACOSX)
|
||||
set_target_properties(${APP_NAME} PROPERTIES
|
||||
MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/proj.ios_mac/mac/Info.plist"
|
||||
)
|
||||
set_xcode_property(${APP_NAME} INFOPLIST_FILE "${CMAKE_CURRENT_SOURCE_DIR}/proj.ios_mac/mac/Info.plist")
|
||||
elseif(IOS)
|
||||
cocos_pak_xcode(${APP_NAME} INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/proj.ios_mac/ios/Info.plist")
|
||||
set_xcode_property(${APP_NAME} INFOPLIST_FILE "${CMAKE_CURRENT_SOURCE_DIR}/proj.ios_mac/ios/Info.plist")
|
||||
set_xcode_property(${APP_NAME} ASSETCATALOG_COMPILER_APPICON_NAME "AppIcon-${APP_NAME}")
|
||||
set_xcode_property(${APP_NAME} DEVELOPMENT_TEAM "")
|
||||
set_xcode_property(${APP_NAME} CODE_SIGN_IDENTITY "iPhone Developer")
|
||||
endif()
|
||||
|
||||
# For code-signing, set the DEVELOPMENT_TEAM:
|
||||
#set_xcode_property(${APP_NAME} DEVELOPMENT_TEAM "GRLXXXX2K9")
|
||||
elseif(WINDOWS)
|
||||
cocos_copy_target_dll(${APP_NAME})
|
||||
endif()
|
||||
|
|
|
@ -7,9 +7,9 @@
|
|||
<key>CFBundleDisplayName</key>
|
||||
<string>${PRODUCT_NAME}</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>${MACOSX_BUNDLE_EXECUTABLE_NAME}</string>
|
||||
<string>${EXECUTABLE_NAME}</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>${MACOSX_BUNDLE_ICON_FILE}</string>
|
||||
<string>Icon</string>
|
||||
<key>CFBundleIconFiles</key>
|
||||
<array>
|
||||
<string>Icon-57.png</string>
|
||||
|
@ -22,17 +22,19 @@
|
|||
<key>CFBundleIcons~ipad</key>
|
||||
<dict/>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>${MACOSX_BUNDLE_GUI_IDENTIFIER}</string>
|
||||
<string>org.cocos2dx.$(PRODUCT_NAME)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>${MACOSX_BUNDLE_BUNDLE_NAME}</string>
|
||||
<string>$(PRODUCT_NAME)</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>${MACOSX_BUNDLE_BUNDLE_VERSION}</string>
|
||||
<string>1</string>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>NSAppTransportSecurity</key>
|
||||
|
@ -57,8 +59,6 @@
|
|||
<dict>
|
||||
<key>accelerometer</key>
|
||||
<true/>
|
||||
<key>opengles-1</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>UIStatusBarHidden</key>
|
||||
<true/>
|
||||
|
@ -68,6 +68,6 @@
|
|||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
</array>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>${MACOSX_BUNDLE_COPYRIGHT}</string>
|
||||
<string>Copyright © 2019. All rights reserved.</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<key>CFBundleIconFile</key>
|
||||
<string>Icon</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<string>org.cocos2dx.${PRODUCT_NAME}</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
|
@ -24,10 +24,8 @@
|
|||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>${MACOSX_DEPLOYMENT_TARGET}</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright © 2012. All rights reserved.</string>
|
||||
<string>Copyright © 2019. All rights reserved.</string>
|
||||
<key>NSMainNibFile</key>
|
||||
<string>MainMenu</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
<string>Icon-144.png</string>
|
||||
</array>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<string>org.cocos2dx.${PRODUCT_NAME}</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
|
@ -50,11 +50,11 @@
|
|||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string></string>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
<string>1</string>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>UIAppFonts</key>
|
||||
|
@ -151,5 +151,7 @@
|
|||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
</array>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright © 2019. All rights reserved.</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<key>CFBundleIconFile</key>
|
||||
<string>Icon</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<string>org.cocos2dx.${PRODUCT_NAME}</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
|
@ -24,10 +24,8 @@
|
|||
<string>1</string>
|
||||
<key>LSApplicationCategoryType</key>
|
||||
<string>public.app-category.games</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>${MACOSX_DEPLOYMENT_TARGET}</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright © 2013. All rights reserved.</string>
|
||||
<string>Copyright © 2019. All rights reserved.</string>
|
||||
<key>NSMainNibFile</key>
|
||||
<string>MainMenu</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
|
|
Loading…
Reference in New Issue