From kde-commits Sat May 31 21:25:06 2003 From: Nicolas Hadacek Date: Sat, 31 May 2003 21:25:06 +0000 To: kde-commits Subject: kdegames/kmines X-MARC-Message: https://marc.info/?l=kde-commits&m=105441631131316 CVS commit by hadacek: adapt to possibly use the system-wide highscores: - call the init method - install with correct permissions and ownership M +30 -1 Makefile.am 1.38 M +2 -2 generic/Makefile.am 1.18 M +3 -0 main.cpp 1.97 --- kdegames/kmines/Makefile.am #1.37:1.38 @@ -3,5 +3,5 @@ bin_PROGRAMS = kmines -kmines_LDFLAGS = $(all_libraries) $(KDE_RPATH) +kmines_LDFLAGS = $(LIB_KDEGAMES) $(all_libraries) $(KDE_RPATH) kmines_LDADD = ./solver/libsolver.la ./generic/libkmines.la kmines_SOURCES = defines.cpp highscores.cpp \ @@ -15,2 +15,31 @@ $(XGETTEXT) rc.cpp *.cpp solver/*.cpp -o $(podir)/kmines.pot +# for system-wide highscore file +DESTBIN = $(DESTDIR)$(bindir)/$(bin_PROGRAMS) +DESTSCORES = $(HIGHSCORE_DIRECTORY)/$(bin_PROGRAMS).scores + +install-data-local: + @(test x$(HIGHSCORE_DIRECTORY) != x \ + && echo "********************************************************" \ + && echo "" \ + && echo "This game is installed sgid \"games\" to use the" \ + && echo "system-wide highscore file (in "$(HIGHSCORE_DIRECTORY)")." \ + && echo "" \ + && echo "If the system-wide highscore file does not exist, it is" \ + && echo "created with the correct ownership and permissions. See the" \ + && echo "INSTALL file in \"kdegames/libkdegames/highscore\" for details." \ + && echo "" \ + && echo "********************************************************" \ + ) || true + +install-exec-hook: + @(test x$(HIGHSCORE_DIRECTORY) != x \ + && ((chown root:games $(DESTBIN) && chmod 2755 $(DESTBIN)) \ + || echo "Error: Could not install the game with correct permissions !!" \ + )) || true + + @(test x$(HIGHSCORE_DIRECTORY) != x \ + && ((touch $(DESTSCORES) && chown root.games $(DESTSCORES) \ + && chmod 0660 $(DESTSCORES)) \ + || echo "Error: Could not create system-wide highscore file with correct permissions !!" \ + )) || true --- kdegames/kmines/main.cpp #1.96:1.97 @@ -36,4 +36,5 @@ #include #include +#include #include "status.h" @@ -236,4 +237,6 @@ static const char *DESCRIPTION int main(int argc, char **argv) { + KHighscore::init("kmines"); + KAboutData aboutData("kmines", I18N_NOOP("KMines"), LONG_VERSION, DESCRIPTION, KAboutData::License_GPL, --- kdegames/kmines/generic/Makefile.am #1.17:1.18 @@ -1,7 +1,7 @@ -INCLUDES = -I$(top_srcdir)/libkdegames $(all_includes) +INCLUDES = $(all_includes) noinst_LTLIBRARIES = libkmines.la libkmines_la_LDFLAGS = $(all_libraries) -libkmines_la_LIBADD = $(LIB_KDEGAMES) $(LIB_KIO) +libkmines_la_LIBADD = $(LIB_KDEUI) libkmines_la_SOURCES = gstring.cpp gsettings.cpp