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

Albert Astals Cid aacid at kde.org
Sun Aug 26 22:46:01 UTC 2012


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?

> Now I have a new problem … :-(
> 
> PROBLEM 3)
> 
> The standalone build tries to install development stuff in my installed
> KDE 4.8.3 area, not into $KDEDIR/*, and fails on a privilege violation.
> 
>       Install the project...
>       -- Install configuration: "RelWithDebInfo"
>       CMake Error at cmake_install.cmake:33 (FILE):
>         file cannot create directory: /usr/local/share/applications/kde4. 
> Maybe need administrative privileges."
> 
> No way, Jose! … :-)
> 
> If I do the full build of KDE Games, development stuff gets compiled, built
> and installed correctly, as always.
> 
> Could someone please give this standalone CMake a thorough test?

As said, they all work for me, but i do not have the complex path you have (if 
the answer to your previous question is yes).

Cheers,
  Albert

> 
> Cheers, Ian W.
> 
> [1] The KGameRenderer API changed radically after KDE 4.8.
> 
> _______________________________________________
> kde-games-devel mailing list
> kde-games-devel at kde.org
> https://mail.kde.org/mailman/listinfo/kde-games-devel


More information about the kde-games-devel mailing list