ENH: Improve Mac OSX bundle support
This commit is contained in:
parent
df3205e873
commit
1dbcfd2a98
@ -5,32 +5,32 @@
|
|||||||
<key>CFBundleDevelopmentRegion</key>
|
<key>CFBundleDevelopmentRegion</key>
|
||||||
<string>English</string>
|
<string>English</string>
|
||||||
<key>CFBundleExecutable</key>
|
<key>CFBundleExecutable</key>
|
||||||
<string>${APPLE_GUI_EXECUTABLE}</string>
|
<string>${MACOSX_BUNDLE_EXECUTABLE_NAME}</string>
|
||||||
<key>CFBundleGetInfoString</key>
|
<key>CFBundleGetInfoString</key>
|
||||||
<string>${APPLE_GUI_INFO_STRING}</string>
|
<string>${MACOSX_BUNDLE_INFO_STRING}</string>
|
||||||
<key>CFBundleIconFile</key>
|
<key>CFBundleIconFile</key>
|
||||||
<string>${APPLE_GUI_ICON}</string>
|
<string>${MACOSX_BUNDLE_ICON_FILE}</string>
|
||||||
<key>CFBundleIdentifier</key>
|
<key>CFBundleIdentifier</key>
|
||||||
<string>${APPLE_GUI_IDENTIFIER}</string>
|
<string>${MACOSX_BUNDLE_GUI_IDENTIFIER}</string>
|
||||||
<key>CFBundleInfoDictionaryVersion</key>
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
<string>6.0</string>
|
<string>6.0</string>
|
||||||
<key>CFBundleLongVersionString</key>
|
<key>CFBundleLongVersionString</key>
|
||||||
<string>${APPLE_GUI_LONG_VERSION_STRING}</string>
|
<string>${MACOSX_BUNDLE_LONG_VERSION_STRING}</string>
|
||||||
<key>CFBundleName</key>
|
<key>CFBundleName</key>
|
||||||
<string>${APPLE_GUI_BUNDLE_NAME}</string>
|
<string>${MACOSX_BUNDLE_BUNDLE_NAME}</string>
|
||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>APPL</string>
|
<string>APPL</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>${APPLE_GUI_SHORT_VERSION_STRING}</string>
|
<string>${MACOSX_BUNDLE_SHORT_VERSION_STRING}</string>
|
||||||
<key>CFBundleSignature</key>
|
<key>CFBundleSignature</key>
|
||||||
<string>????</string>
|
<string>????</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>${APPLE_GUI_BUNDLE_VERSION}</string>
|
<string>${MACOSX_BUNDLE_BUNDLE_VERSION}</string>
|
||||||
<key>CSResourcesFileMapped</key>
|
<key>CSResourcesFileMapped</key>
|
||||||
<true/>
|
<true/>
|
||||||
<key>LSRequiresCarbon</key>
|
<key>LSRequiresCarbon</key>
|
||||||
<true/>
|
<true/>
|
||||||
<key>NSHumanReadableCopyright</key>
|
<key>NSHumanReadableCopyright</key>
|
||||||
<string>${APPLE_GUI_COPYRIGHT}</string>
|
<string>${MACOSX_BUNDLE_COPYRIGHT}</string>
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
@ -83,6 +83,8 @@ bool cmAddExecutableCommand::InitialPass(std::vector<std::string> const& args)
|
|||||||
|
|
||||||
func.m_Arguments.push_back(cmListFileArgument(f1, true));
|
func.m_Arguments.push_back(cmListFileArgument(f1, true));
|
||||||
func.m_Arguments.push_back(cmListFileArgument(f2, true));
|
func.m_Arguments.push_back(cmListFileArgument(f2, true));
|
||||||
|
func.m_Arguments.push_back(cmListFileArgument("IMMEDIATE", true));
|
||||||
|
m_Makefile->AddDefinition("MACOSX_BUNDLE_EXECUTABLE_NAME", exename.c_str());
|
||||||
m_Makefile->ExecuteCommand(func);
|
m_Makefile->ExecuteCommand(func);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -61,13 +61,25 @@ public:
|
|||||||
virtual const char* GetFullDocumentation()
|
virtual const char* GetFullDocumentation()
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
" ADD_EXECUTABLE(exename [WIN32] source1\n"
|
" ADD_EXECUTABLE(exename [WIN32] [MACBUNDLE] source1\n"
|
||||||
" source2 ... sourceN)\n"
|
" source2 ... sourceN)\n"
|
||||||
"This command adds an executable target to the current directory. "
|
"This command adds an executable target to the current directory. "
|
||||||
"The executable will be built from the list of source files "
|
"The executable will be built from the list of source files "
|
||||||
"specified. The second argument to this command can be WIN32 "
|
"specified.\n"
|
||||||
"which indicates that the executable (when compiled on windows) "
|
"After specifying the executable name, WIN32 and/or MACBUNDLE can "
|
||||||
"is a windows app (using WinMain) not a console app (using main).";
|
"be specified. WIN32 indicates that the executable (when compiled on "
|
||||||
|
"windows) is a windows app (using WinMain) not a console app (using main). "
|
||||||
|
"MACBUNDLE indicates that when build on Mac OSX, executable should be in "
|
||||||
|
"the bundle form. The MACBUNDLE also allows several variables to be specified:\n"
|
||||||
|
" MACOSX_BUNDLE_INFO_STRING\n"
|
||||||
|
" MACOSX_BUNDLE_ICON_FILE\n"
|
||||||
|
" MACOSX_BUNDLE_GUI_IDENTIFIER\n"
|
||||||
|
" MACOSX_BUNDLE_LONG_VERSION_STRING\n"
|
||||||
|
" MACOSX_BUNDLE_BUNDLE_NAME\n"
|
||||||
|
" MACOSX_BUNDLE_SHORT_VERSION_STRING\n"
|
||||||
|
" MACOSX_BUNDLE_BUNDLE_VERSION\n"
|
||||||
|
" MACOSX_BUNDLE_COPYRIGHT\n"
|
||||||
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
cmTypeMacro(cmAddExecutableCommand, cmCommand);
|
cmTypeMacro(cmAddExecutableCommand, cmCommand);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user