<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Thanks for your help. Things are better, but far from perfect, see below<br>
<br>
Le 21/05/10 22:34, Werner Smekal a écrit :
<blockquote cite="mid:4BF6EE5F.9090808@iap.tuwien.ac.at" type="cite">
<pre wrap="">
Hi Jerome,
On 5/21/10 4:42 PM, Jérôme VERNET wrote:
</pre>
# copy SDL frameworks into app bundle for Mac OS X<br>
<pre wrap="">if(APPLE)
        INSTALL(DIRECTORY /Users/smekal/Library/Frameworks/SDL.framework
                                        DESTINATION xrick.app/Contents/Frameworks)
        INSTALL(DIRECTORY /Users/smekal/Library/Frameworks/SDL_mixer.framework
                                        DESTINATION xrick.app/Contents/Frameworks)
        INSTALL(DIRECTORY /Users/smekal/Library/Frameworks/SDL_ttf.framework
                                        DESTINATION xrick.app/Contents/Frameworks)
endif(APPLE)
</pre>
</blockquote>
I tried that. <br>
<font face="Courier New, Courier, monospace" size="-1">if(ENABLE_OSX_BUNDLE)<br>
message("***Install for MacOsX***")<br>
install(TARGETS hatari BUNDLE DESTINATION /Applications)<br>
INSTALL(DIRECTORY /Library/Frameworks/SDL.framework<br>
DESTINATION
/Applications/hatari.app/Contents/Resources)<br>
INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/gui-osx/French.lproj
DESTINATION /Applications/hatari.app/Contents/Resources/)<br>
INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/gui-osx/English.lproj
DESTINATION /Applications/hatari.app/Contents/Resources/)<br>
endif(ENABLE_OSX_BUNDLE)<br>
<br>
</font>It worked. Great.<br>
<br>
But... it's awfull ! Hard coded links (may be the path to SDL Framework
can be found, there is PATH variable somewhere)... Need to do make
install.... As the project have also other library, docs, etc...<br>
<br>
I though that cmake can handle, automatically, all these things, but
cannot find how... May be not.<br>
<blockquote cite="mid:4BF6EE5F.9090808@iap.tuwien.ac.at" type="cite">
<pre wrap="">I don't know where the localized resource should go into (resource
directory?), but again e.g. I do:
</pre>
</blockquote>
Yes.<br>
<blockquote cite="mid:4BF6EE5F.9090808@iap.tuwien.ac.at" type="cite">
<pre wrap="">
if(APPLE)
        add_executable(
                xrick MACOSX_BUNDLE
                        ${xrick_SRCS}
                        ${xrick_data}
                        ${xrick_RSRCS}
        )
        # Mac OS X bundle specific settings
        set(MACOSX_BUNDLE true)
        set(MACOSX_BUNDLE_BUNDLE_NAME xrick)
        set(MACOSX_BUNDLE_INFO_STRING "xrick ${xrick_VERSION}")
        set(MACOSX_BUNDLE_LONG_VERSION_STRING "${xrick_VERSION}")
        set(MACOSX_BUNDLE_SHORT_VERSION_STRING "${xrick_VERSION}")
        set(MACOSX_BUNDLE_BUNDLE_VERSION "${xrick_VERSION}")
set(MACOSX_BUNDLE_ICON_FILE xrick.icns)
# paths for data files in bundle
set_source_files_properties(
${xrick_RSRCS}
PROPERTIES
MACOSX_PACKAGE_LOCATION Resources
)
set_source_files_properties(
${xrick_data}
PROPERTIES
MACOSX_PACKAGE_LOCATION MacOS
)
endif(APPLE)
Resources etc. get copied in to the app bundle "automatically".
</pre>
</blockquote>
That's not working with folder. Hélas....<br>
<blockquote cite="mid:4BF6EE5F.9090808@iap.tuwien.ac.at" type="cite"><br>
<pre wrap="">Read the BundleUtilities.cmake module in the cmake.app - there is a lot
of documentation. Short example
</pre>
</blockquote>
Cannot understand all what is supposed to do "fix_bundle", but, sure,
it's not finished. Yes, it does copy Library and Framework (i test it),
but do not work with SDL. And do not handle Localized Resources....<br>
<blockquote cite="mid:4BF6EE5F.9090808@iap.tuwien.ac.at" type="cite"><br>
<pre wrap="">make two build directories. in one run cmake with
</pre>
</blockquote>
How do you do that ? I tried to change the Binaries path in CMake GUI,
got 1234 errors....<br>
<blockquote cite="mid:4BF6EE5F.9090808@iap.tuwien.ac.at" type="cite">
<pre wrap="">cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_OSX_ARCHITECTURES=i386 ..
and in the other
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_ARCHITECTURES=i386;ppc ..
</pre>
</blockquote>
<br>
I'll be back to XCode project as fast as I try to fix Hatari cmake
build system. <br>
<br>
<br>
<br>
Jerome<br>
</body>
</html>