[Kde-games-devel] Problems with standalone KDE Game build

Ian Wadham iandw.au at gmail.com
Mon Aug 27 02:42:02 UTC 2012


On 27/08/2012, at 8:46 AM, Albert Astals Cid wrote:

> El Diumenge, 26 d'agost de 2012, a les 12:11:47, Ian Wadham va escriure:
>> On 26/08/2012, at 2:27 AM, Wolfgang Rohdewald wrote:
>>> Am Samstag, 25. August 2012, 12:39:57 schrieb Ian Wadham:
>>>> For some time now I have been getting problems building a game
>>>> when its development source changes over to KGameRenderer.
>>> 
>>> which game would that be?
>> 
>> Ah, English is so deliciously vague - unlike French and German … :-)
>> 
>> I meant "any" game that changes over to KGameRenderer when it was
>> previously doing its own rendering and cacheing.  Roney Gomes has been
>> porting a few for GSoC 2012.  Most recently, I had trouble with standalone
>> compilation of Viranch Mehta's QML version of KBreakout.
>> 
>> http://quickgit.kde.org/index.php?p=scratch%2Fviranch%2Fkbreakout-qml.git&a=
>> summary git://anongit.kde.org/scratch/viranch/kbreakout-qml.git
>> 
>>>> -- KDEGAMES_INCLUDE_DIRS =
>>>> $KDEDIR/lib/cmake/KDEGames/../../../include$KDEDIR/lib/cmake/KDEGames/..
>>>> /../../include/KDE> 
>>> there should be  a space in front of the second $, see
>>> KDEGamesConfig.cmake, built from KDEGamesConfig.cmake.in
>> 
>> Yes.  If KDEGAMES_INCLUDE_DIRS had the (two-part) value:
>>       $KDEDIR/lib/cmake/KDEGames/../../../include
>>       $KDEDIR/lib/cmake/KDEGames/../../../include/KDE
>> all would be well --- and that would solve my problem 2, where
>> includes in the vanilla directory were not being seen.
>> 
>>> set(KDEGAMES_INCLUDE_DIRS "${KDEGAMES_INCLUDE_DIR}"
>>> "${KDEGAMES_INCLUDE_DIR}/KDE")
>>> 
>>> so - how do the above two files look on your system?
>> 
>> "${KDEGAMES_INCLUDE_DIR evaluates to
>> $KDEDIR/lib/cmake/KDEGames/../../../include, which is the same thing as
>> $KDEDIR/include, as expected.  That is where I have the include files for
>> KDE Games trunk are installed.  Similarly for
>> $KDEDIR/lib/cmake/KDEGames/../../../include/KDE
>>> KDEGamesConfig.cmake has about no history, it was added as is by Stefan
>>> Majewsky with> 
>>> this message:
>>>> add KDEGamesConfig.cmake and friends
>>>> 
>>>> This stuff is not working at the moment because of Weird Bugs™, but
>>>> let's hope we get to sort this out in time.
>>> 
>>> I have no idea what weird bugs there were nor if they are resolved.
>> 
>> Well, "sort this out in time" presumably means "before the move to GIT".
>> Has anybody tried standalone builds of individual games before now?
> 
> I have, they all work for me.
> 
>> I just went off on a wild goose chase through CMake and CMake doc, but
>> it appears that it is the MESSAGE command that concatenates its second
>> and subsequent argument values, not the SET command, leading to the
>> strange output I posted earlier.  Try MESSAGE (STATUS ${xxx_SRCS}),
>> where xxx is the name of a game, and you will see what I mean.
>> 
>> Looking at the CMake code we now have in every game:
>> 
>> if(NOT COMPILING_KDEGAMES)
>>        find_package(KDE4 REQUIRED)
>>        include(KDE4Defaults)
>>        include(MacroLibrary)
>>        find_package(KDEGames REQUIRED)
>> 
>>        add_definitions(${QT_DEFINITIONS} ${KDE4_DEFINITIONS})
>>        add_definitions(-DQT_USE_FAST_CONCATENATION
>> -DQT_USE_FAST_OPERATOR_PLUS) include_directories(${QDBUS_INCLUDE_DIRS}
>> ${KDE4_INCLUDES} ${KDEGAMES_INCLUDE_DIRS}) endif(NOT COMPILING_KDEGAMES)
>> 
>> I find that this works for me if I change the order of the
>> include_directories() parameters.  If ${KDEGAMES_INCLUDE_DIRS} comes before
>> ${KDE4_INCLUDES}, then the trunk versions of the KDE Games
>> include files are picked up before the installed KDE 4.8.3 versions
>> and trunk/development code using KGameRenderer and friends is
>> correctly compiled and linked[1].
>> 
>> What should be the final text (as released) of the above CMake code?
> 
> Interesting, you are have a "new" libkdegames header patth different than the 
> path that contains kdelibs and that also happens to contain the "old" 
> libkdegames headers, right?

Yes, KDE libs 4.8.3 and KDE Games 4.8.3 are installed at /opt/local, which
is owned by root, i.e. it is much like a Linux installation, except for the
prefix.  And I run an Apple OS X desktop, not KDE, but dbus and kdeinit
are running.  Trunk KDE Games is installed in my development area
at /kdedev/kde4, owned by me.  My setup of environment variables
and scripts is derived from those originated by David Faure, i.e. cs,
cb, findup, etc.

Perhaps the only unusual feature is that the KDE Games 4.8.3 is a
-devel type installation (containing "old" libkdegames headers).  That
might be an artefact of the Macports installer.  I don't know if Linux
distros would install libkdegames headers.

Cheers, Ian W.



More information about the kde-games-devel mailing list