1
0
mirror of git://projects.qi-hardware.com/openwrt-packages.git synced 2024-11-25 19:00:38 +02:00

QBall: a QT-base breakout game

This commit is contained in:
kyak 2010-12-14 21:25:16 +03:00
parent 7235d3929c
commit e5016eca07
2 changed files with 81 additions and 0 deletions

57
qball/Makefile Normal file
View File

@ -0,0 +1,57 @@
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=qball
PKG_VERSION:=1.1
PKG_RELEASE:=1
PKG_SOURCE_URL:=http://homepage.ntlworld.com/mark.harman/
PKG_SOURCE:=qball_src.zip
PKG_MD5SUM:=6748cf29650e6cb087d1b55e37f7361d
UNZIP_CMD=unzip -d $(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) $(DL_DIR)/$(PKG_SOURCE)
include $(INCLUDE_DIR)/package.mk
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)/QBall
$(call include_mk,qmake.mk)
define Package/qball
SECTION:=games
CATEGORY:=Games
TITLE:=simple breakout style game
DEPENDS:=+qt4 +qt4-gui +dejavu-fonts-ttf
URL:=http://homepage.ntlworld.com/mark.harman/comp_qball.html
endef
define Build/Prepare
$(call Build/Prepare/Default)
(\
cd $(PKG_BUILD_DIR); \
echo "QMAKE_UIC=$(STAGING_DIR_HOST)/bin/uic" >> QBall.pro; \
echo "QMAKE_MOC=$(STAGING_DIR_HOST)/bin/moc" >> QBall.pro; \
echo "QMAKE_RCC=$(STAGING_DIR_HOST)/bin/rcc" >> QBall.pro; \
echo "QMAKE_LINK=$(TARGET_CXX)" >> QBall.pro; \
echo "QMAKE_LIBS+=-L$(STAGING_DIR)/usr/lib/libintl/lib" >> QBall.pro; \
echo "QMAKE_LIBS+=-L$(STAGING_DIR)/usr/lib/libiconv/lib" >> QBall.pro; \
echo "QMAKE_LIBS+=-Wl,-rpath-link=$(STAGING_DIR)/usr/lib" >> QBall.pro; \
echo "INCLUDEPATH += $(STAGING_DIR)/usr/include" >> QBall.pro; \
echo "INCLUDEPATH += $(STAGING_DIR)/usr/include/Qt" >> QBall.pro; \
echo "INCLUDEPATH += $(STAGING_DIR)/usr/include/QtGui" >> QBall.pro; \
echo "INCLUDEPATH += $(STAGING_DIR)/usr/include/QtCore" >> QBall.pro; \
)
endef
define Build/Configure
$(call Build/Configure/Qmake,QBall)
endef
define Package/qball/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/QBall $(1)/usr/bin/qball
endef
$(eval $(call BuildPackage,qball))

View File

@ -0,0 +1,24 @@
diff -ur qball-1.1.or/QBall/main.cpp qball-1.1/QBall/main.cpp
--- qball-1.1.or/QBall/main.cpp 2010-12-14 21:13:48.387821716 +0300
+++ qball-1.1/QBall/main.cpp 2010-12-14 21:16:23.749898252 +0300
@@ -1,6 +1,10 @@
#include <QtGui/QApplication>
#include "mainwindow.h"
+#if defined(Q_WS_QWS)
+#include <QtGui/QWSServer>
+#endif
+
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
@@ -14,6 +18,9 @@
//w.show();
w.showFullScreen();
#endif
+#if defined(Q_WS_QWS)
+ QWSServer::setCursorVisible(false);
+#endif
//w.init();
//Gamestate *gamestate = new PlayingGamestate(&w);
Gamestate *gamestate = new OptionsGamestate(&w);