summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRodney Dawes <dobey@novell.com>2005-05-01 19:26:24 +0000
committerRodney Dawes <dobey@novell.com>2005-05-01 19:26:24 +0000
commitf61fc8ef256f43d1ada47fb5851f8954fea4cdea (patch)
tree210b0ad30ed690b63576da561954091987622fb3
parent893cde9e754b805f1e62c517740919c04d9490e0 (diff)
downloadmana-f61fc8ef256f43d1ada47fb5851f8954fea4cdea.tar.gz
mana-f61fc8ef256f43d1ada47fb5851f8954fea4cdea.tar.bz2
mana-f61fc8ef256f43d1ada47fb5851f8954fea4cdea.tar.xz
mana-f61fc8ef256f43d1ada47fb5851f8954fea4cdea.zip
- Added installation of game data, install required on *nix systems
- Updated desktop file to work better - Install the desktop file to the standard location - Install the icon as tmw.png in the standard pixmaps data dir
-rw-r--r--ChangeLog4
-rw-r--r--Makefile.am11
-rwxr-xr-xconfigure.ac19
-rw-r--r--data/Makefile.am39
-rw-r--r--data/graphics/Makefile.am2
-rw-r--r--data/graphics/gui/Makefile.am36
-rw-r--r--data/graphics/images/Makefile.am8
-rw-r--r--data/icons/Makefile.am17
-rw-r--r--src/Makefile.am4
-rw-r--r--src/game.cpp2
-rw-r--r--src/gui/char_select.cpp2
-rw-r--r--src/gui/gui.cpp2
-rw-r--r--src/main.cpp4
-rw-r--r--src/main.h4
-rw-r--r--src/resources/itemmanager.cpp4
-rw-r--r--src/resources/resourcemanager.cpp1
-rw-r--r--tmw.desktop16
17 files changed, 119 insertions, 56 deletions
diff --git a/ChangeLog b/ChangeLog
index 0c226599..8b591ff6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,8 @@
0.0.12 (1 May 2005)
+- Added installation of game data, install required on *nix systems
+- Updated desktop file to work better
+- Install the desktop file to the standard location
+- Install the icon as tmw.png in the standard pixmaps data dir
- Added new map (a cave), tiles, monsters and items
- Added volume sliders in setup window
- Added attack and level up samples
diff --git a/Makefile.am b/Makefile.am
index 76263c6e..7306c71f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,8 +1,9 @@
-# Subdirectories to include in a distribution
-DIST_SUBDIRS = src data docs
-
# Subdirectories to build
-SUBDIRS = src
+SUBDIRS = data docs src
+
+desktopdir = $(datadir)/applications
+
+desktop_DATA = tmw.desktop
# Extra files to include
-EXTRA_DIST = tmw.desktop
+EXTRA_DIST = $(desktop_DATA)
diff --git a/configure.ac b/configure.ac
index c5c90612..6df47582 100755
--- a/configure.ac
+++ b/configure.ac
@@ -125,8 +125,19 @@ fi
AC_SUBST(LIBSDL_LIBS)
AC_SUBST(LIBSDL_CFLAGS)
-AC_CONFIG_FILES([Makefile
- src/Makefile
- data/Makefile
- docs/Makefile])
+AC_CONFIG_FILES([
+Makefile
+src/Makefile
+data/Makefile
+data/graphics/Makefile
+data/graphics/gui/Makefile
+data/graphics/images/Makefile
+data/graphics/sprites/Makefile
+data/graphics/tiles/Makefile
+data/icons/Makefile
+data/maps/Makefile
+data/sfx/Makefile
+docs/Makefile
+])
+
AC_OUTPUT
diff --git a/data/Makefile.am b/data/Makefile.am
index 252e8b5a..039fe68c 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -1,29 +1,10 @@
-EXTRA_DIST = maps/new_1-1.tmx.gz \
- maps/new_3-1.tmx.gz \
- graphics/gui/bg_quad_dis.png \
- graphics/gui/button.png \
- graphics/gui/button_disabled.png \
- graphics/gui/buttonhi.png \
- graphics/gui/buttonpress.png \
- graphics/gui/checkbox.png \
- graphics/gui/fixedfont.png \
- graphics/gui/mouse.png \
- graphics/gui/radioin.png \
- graphics/gui/radioout.png \
- graphics/gui/slider.png \
- graphics/gui/textbox.png \
- graphics/gui/vscroll_blue.png \
- graphics/gui/vscroll_grey.png \
- graphics/gui/vscroll_red.png \
- graphics/tiles/desert1.png \
- graphics/tiles/desert2.png \
- graphics/tiles/collision.png \
- graphics/sprites/emotions.png \
- graphics/sprites/items.png \
- graphics/sprites/monsters.png \
- graphics/sprites/npcs.png \
- graphics/sprites/player_male_base.png \
- graphics/sprites/player_male_hair.png \
- graphics/sprites/weapons.png \
- graphics/images/login_wallpaper.png \
- sfx/bow_shoot_1.ogg
+
+SUBDIRS = graphics icons maps sfx
+
+tmwdatadir = $(pkgdatadir)/data
+
+tmwdata_DATA = \
+ items.xml
+
+EXTRA_DIST = \
+ $(tmwdata_DATA) \ No newline at end of file
diff --git a/data/graphics/Makefile.am b/data/graphics/Makefile.am
new file mode 100644
index 00000000..43354894
--- /dev/null
+++ b/data/graphics/Makefile.am
@@ -0,0 +1,2 @@
+
+SUBDIRS = gui images sprites tiles
diff --git a/data/graphics/gui/Makefile.am b/data/graphics/gui/Makefile.am
new file mode 100644
index 00000000..c01d83a6
--- /dev/null
+++ b/data/graphics/gui/Makefile.am
@@ -0,0 +1,36 @@
+
+guidir = $(pkgdatadir)/data/graphics/gui
+
+gui_DATA = \
+ bg_quad_dis.png \
+ button.png \
+ button_disabled.png \
+ buttonhi.png \
+ buttonpress.png \
+ checkbox.png \
+ fixedfont.png \
+ hscroll_left_default.png \
+ hscroll_left_highlight.png \
+ hscroll_left_pressed.png \
+ hscroll_right_default.png \
+ hscroll_right_highlight.png \
+ hscroll_right_pressed.png \
+ mouse.png \
+ radioin.png \
+ radioout.png \
+ selection.png \
+ slider.png \
+ textbox.png \
+ thickborder.png \
+ vscroll_blue.png \
+ vscroll_down_default.png \
+ vscroll_down_highlight.png \
+ vscroll_down_pressed.png \
+ vscroll_grey.png \
+ vscroll_red.png \
+ vscroll_up_default.png \
+ vscroll_up_highlight.png \
+ vscroll_up_pressed.png
+
+EXTRA_DIST = \
+ $(gui_DATA)
diff --git a/data/graphics/images/Makefile.am b/data/graphics/images/Makefile.am
new file mode 100644
index 00000000..d06fcf11
--- /dev/null
+++ b/data/graphics/images/Makefile.am
@@ -0,0 +1,8 @@
+
+imagesdir = $(pkgdatadir)/data/graphics/images
+
+images_DATA = \
+ login_wallpaper.png
+
+EXTRA_DIST = \
+ $(images_DATA)
diff --git a/data/icons/Makefile.am b/data/icons/Makefile.am
new file mode 100644
index 00000000..26dcd623
--- /dev/null
+++ b/data/icons/Makefile.am
@@ -0,0 +1,17 @@
+
+iconsdir = $(pkgdatadir)/data/icons
+
+icons_DATA = \
+ tmw-icon.ico \
+ tmw-icon.png \
+ tmw-icon.xpm
+
+install-data-local:
+ $(mkinstalldirs) $(DESTDIR)$(datadir)/pixmaps
+ $(INSTALL) $(srcdir)/tmw-icon.png $(DESTDIR)$(datadir)/pixmaps/tmw.png
+
+uninstall-local:
+ rm -f $(DESTDIR)$(datadir)/pixmaps/tmw.png
+
+EXTRA_DIST = \
+ $(icons_DATA)
diff --git a/src/Makefile.am b/src/Makefile.am
index 47bb0cb5..067736a3 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -125,7 +125,9 @@ tmw_SOURCES = graphic/spriteset.cpp \
sound.h
# set the include path found by configure
-INCLUDES= $(all_includes)
+INCLUDES = \
+ $(all_includes) \
+ -DTMW_DATADIR=\""$(pkgdatadir)/"\"
# the library search path.
tmw_LDFLAGS = $(all_libraries) $(LIBSDL_RPATH) -lguichan_sdl -lguichan `pkg-config --libs libxml-2.0`
diff --git a/src/game.cpp b/src/game.cpp
index 0f1f0bdb..7e538346 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -945,7 +945,7 @@ void do_parse()
// Warp
case 0x0091:
memset(map_path, '\0', 480);
- strcat(map_path, "data/maps/");
+ strcat(map_path, TMW_DATADIR "data/maps/");
strncat(map_path, RFIFOP(2), 497 - strlen(map_path));
logger.log("Warping to %s (%d, %d)",
map_path, RFIFOW(18), RFIFOW(20));
diff --git a/src/gui/char_select.cpp b/src/gui/char_select.cpp
index 3e5a4b09..31c5298a 100644
--- a/src/gui/char_select.cpp
+++ b/src/gui/char_select.cpp
@@ -227,7 +227,7 @@ void CharSelectDialog::serverCharSelect()
}
char_ID = RFIFOL(2);
memset(map_path, '\0', 480);
- strcat(map_path, "data/maps/");
+ strcat(map_path, TMW_DATADIR "data/maps/");
strncat(map_path, RFIFOP(6), 479 - strlen(map_path));
map_address = RFIFOL(22);
map_port = RFIFOW(26);
diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp
index 625d348f..c9f7e571 100644
--- a/src/gui/gui.cpp
+++ b/src/gui/gui.cpp
@@ -64,7 +64,7 @@ Gui::Gui(Graphics *graphics):
setTop(guiTop);
// Set global font
- guiFont = new gcn::ImageFont("data/graphics/gui/fixedfont.png",
+ guiFont = new gcn::ImageFont(TMW_DATADIR "data/graphics/gui/fixedfont.png",
" abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789:@"
"!\"$%&/=?^+*#[]{}()<>_;'.,\\|-~`"
);
diff --git a/src/main.cpp b/src/main.cpp
index ed62fe21..c8d71212 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -225,7 +225,7 @@ void init_engine()
screenH = (int)config.getValue("screenheight", 600);
bitDepth = (int)config.getValue("colordepth", 16);
- SDL_WM_SetIcon(IMG_Load("data/icons/tmw-icon.png"), NULL);
+ SDL_WM_SetIcon(IMG_Load(TMW_DATADIR "data/icons/tmw-icon.png"), NULL);
screen = SDL_SetVideoMode(screenW, screenH, bitDepth, displayFlags);
if (screen == NULL) {
@@ -351,7 +351,7 @@ int main(int argc, char *argv[])
switch (state) {
case LOGIN:
logger.log("State: LOGIN");
- sound.playMusic("data/music/Ivano(de)Jeanette.ogg");
+ sound.playMusic(TMW_DATADIR "data/music/Ivano(de)Jeanette.ogg");
/*bgm = resman->getMusic("music/Ivano(de)Jeanette.ogg");
bgm->play(-1);*/
login();
diff --git a/src/main.h b/src/main.h
index bf45ec55..95fa99bb 100644
--- a/src/main.h
+++ b/src/main.h
@@ -38,6 +38,10 @@
#include <stdio.h>
#include <memory>
+#ifndef TMW_DATADIR
+#define TMW_DATADIR ""
+#endif
+
#ifdef ERROR
#undef ERROR
#endif
diff --git a/src/resources/itemmanager.cpp b/src/resources/itemmanager.cpp
index 6453b55c..ecccd20c 100644
--- a/src/resources/itemmanager.cpp
+++ b/src/resources/itemmanager.cpp
@@ -40,14 +40,14 @@ ItemManager::ItemManager()
{
// Check that file exists before trying to parse it
std::fstream dbFile;
- dbFile.open("./data/items.xml", std::ios::in);
+ dbFile.open(TMW_DATADIR "data/items.xml", std::ios::in);
if (!dbFile.is_open()) {
logger.log("Cannot find item database!");
return;
}
dbFile.close();
- xmlDocPtr doc = xmlParseFile("./data/items.xml");
+ xmlDocPtr doc = xmlParseFile(TMW_DATADIR "data/items.xml");
if (doc) {
xmlNodePtr node = xmlDocGetRootElement(doc);
diff --git a/src/resources/resourcemanager.cpp b/src/resources/resourcemanager.cpp
index 8606816e..ba990734 100644
--- a/src/resources/resourcemanager.cpp
+++ b/src/resources/resourcemanager.cpp
@@ -210,6 +210,7 @@ void ResourceManager::deleteInstance()
void ResourceManager::searchAndAddZipFiles()
{
// Add the main data directory to our PhysicsFS search path
+ PHYSFS_addToSearchPath(TMW_DATADIR "data", 1);
PHYSFS_addToSearchPath("data", 1);
// Define the path in which to search
diff --git a/tmw.desktop b/tmw.desktop
index 0f9af160..596a4b11 100644
--- a/tmw.desktop
+++ b/tmw.desktop
@@ -1,22 +1,18 @@
[Desktop Entry]
-Version=1.0
+Version=0.9.4
Encoding=UTF-8
Type=Application
Name=The Mana World
Name[fr]=Le Monde de Mana
-GenericName=Arcade Game
-GenericName[de]=Arcade Spiel
-GenericName[it]=Gioco Arcade
-GenericName[fr]=Jeu d'Arcade En Ligne
-GenericName[nl]=Arcade Spel
-Comment=A fantasy on-line game
+Comment=An on-line fantasy role playing game
Comment[fr]=Un jeu en ligne dans un univers fantastique
Comment[de]=ein Online Fantasy Spiel
Comment[it]=Un gioco fantasy online
Comment[nl]=Een online role playing game
-Icon=tmw-icon.png
+Icon=tmw.png
FilePattern=tmw
TryExec=tmw
Exec=tmw
-Categories=Application;Game;ArcadeGame;
-StartupNotify=false;
+Categories=Application;Game;
+StartupNotify=false
+Terminal=false