Install data/* at "make install" time; have PIONEER_DATA_DIR set via configure.

master
Darren Salt 2011-05-08 14:03:28 +01:00 committed by Brian Ronald
parent cdc987cc03
commit 6fe38380b0
61 changed files with 23 additions and 3 deletions

View File

@ -68,5 +68,8 @@ fi
CXXFLAGS="$CFLAGS"
AC_CONFIG_FILES([Makefile src/Makefile src/collider/Makefile src/lua/Makefile src/oolua/Makefile])
PIONEER_DATA_DIR="${PIONEER_DATA_DIR:-data}"
AC_ARG_VAR([PIONEER_DATA_DIR], [where Pioneer expects its data files to be ["./data"]])
AC_CONFIG_FILES([Makefile data/Makefile src/Makefile src/collider/Makefile src/lua/Makefile src/oolua/Makefile])
AC_OUTPUT

2
data/Makefile.am Normal file
View File

@ -0,0 +1,2 @@
pioneerdatadir = @PIONEER_DATA_DIR@
nobase_pioneerdata_DATA = $(shell $(srcdir)/listdata.sh)

View File

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

Before

Width:  |  Height:  |  Size: 884 B

After

Width:  |  Height:  |  Size: 884 B

View File

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

View File

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

Before

Width:  |  Height:  |  Size: 767 B

After

Width:  |  Height:  |  Size: 767 B

View File

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

Before

Width:  |  Height:  |  Size: 823 B

After

Width:  |  Height:  |  Size: 823 B

View File

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

Before

Width:  |  Height:  |  Size: 792 B

After

Width:  |  Height:  |  Size: 792 B

View File

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

View File

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

3
data/listdata.exclude Normal file
View File

@ -0,0 +1,3 @@
^Makefile
^listdata
/Thumbs\.db$

3
data/listdata.sh Executable file
View File

@ -0,0 +1,3 @@
#! /bin/sh -e
cd "`dirname "$0"`"
find * -type f | grep -vf listdata.exclude | sort | sed -e 's/[ '\'']/\\&/g'

View File

@ -43,7 +43,15 @@ void CommodityTradeWidget::ShowAll()
if (!m_seller->DoesSell((Equip::Type)i)) continue;
int stock = m_seller->GetStock(static_cast<Equip::Type>(i));
Gui::Image *img = new Gui::Image((PIONEER_DATA_DIR "/icons/goods/" + std::string(EquipType::types[i].name) + ".png").c_str() );
// need to replace spaces in the item name
std::string imgname = std::string(EquipType::types[i].name);
size_t imgbad;
while ((imgbad = imgname.find(' ')) != std::string::npos) {
imgname.replace(imgbad, 1, "_");
}
Gui::Image *img = new Gui::Image((PIONEER_DATA_DIR "/icons/goods/" + imgname + ".png").c_str() );
innerbox->Add(img,0, num*YSEP);
Gui::Label *l = new Gui::Label(EquipType::types[i].name);
if (EquipType::types[i].description)

View File

@ -1,5 +1,6 @@
## Process this file with automake to produce Makefile.in
SUBDIRS = collider/ lua/ oolua/
AM_CPPFLAGS = -DPIONEER_DATA_DIR=@PIONEER_DATA_DIR@
bin_PROGRAMS = pioneer modelviewer
noinst_LIBRARIES = libgui.a

View File

@ -289,7 +289,7 @@ bool Player::FireMissile(int idx, Ship *target)
if (!Ship::FireMissile(idx, target))
return false;
Sound::PlaySfx("Missile launch", 1.0f, 1.0f, 0);
Sound::PlaySfx("Missile_launch", 1.0f, 1.0f, 0);
return true;
}