From: Perttu Ahola Date: Thu, 10 Nov 2011 21:30:12 +0000 (+0200) Subject: Move images to data/textures and fix some path stuff; hope that installation still... X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=ee8b6d34447acab3ffb318dc8c070df890c1b810;p=zefram%2Fminetest%2Fminetest_engine.git Move images to data/textures and fix some path stuff; hope that installation still works --- diff --git a/data/apple.png b/data/apple.png deleted file mode 100644 index 9593f28f..00000000 Binary files a/data/apple.png and /dev/null differ diff --git a/data/apple_iron.png b/data/apple_iron.png deleted file mode 100644 index 2dffdf01..00000000 Binary files a/data/apple_iron.png and /dev/null differ diff --git a/data/book.png b/data/book.png deleted file mode 100644 index 176fb6aa..00000000 Binary files a/data/book.png and /dev/null differ diff --git a/data/bookshelf.png b/data/bookshelf.png deleted file mode 100644 index 5ecc50ff..00000000 Binary files a/data/bookshelf.png and /dev/null differ diff --git a/data/brick.png b/data/brick.png deleted file mode 100644 index 32d77f34..00000000 Binary files a/data/brick.png and /dev/null differ diff --git a/data/cactus_side.png b/data/cactus_side.png deleted file mode 100644 index fc479fde..00000000 Binary files a/data/cactus_side.png and /dev/null differ diff --git a/data/cactus_top.png b/data/cactus_top.png deleted file mode 100644 index f9e68df5..00000000 Binary files a/data/cactus_top.png and /dev/null differ diff --git a/data/chest_front.png b/data/chest_front.png deleted file mode 100644 index c5628af9..00000000 Binary files a/data/chest_front.png and /dev/null differ diff --git a/data/chest_lock.png b/data/chest_lock.png deleted file mode 100644 index ae038fae..00000000 Binary files a/data/chest_lock.png and /dev/null differ diff --git a/data/chest_side.png b/data/chest_side.png deleted file mode 100644 index 916dd784..00000000 Binary files a/data/chest_side.png and /dev/null differ diff --git a/data/chest_top.png b/data/chest_top.png deleted file mode 100644 index 58c79674..00000000 Binary files a/data/chest_top.png and /dev/null differ diff --git a/data/clay.png b/data/clay.png deleted file mode 100644 index 3557429d..00000000 Binary files a/data/clay.png and /dev/null differ diff --git a/data/clay_brick.png b/data/clay_brick.png deleted file mode 100644 index e36648e4..00000000 Binary files a/data/clay_brick.png and /dev/null differ diff --git a/data/cloud.png b/data/cloud.png deleted file mode 100644 index 24091a37..00000000 Binary files a/data/cloud.png and /dev/null differ diff --git a/data/cobble.png b/data/cobble.png deleted file mode 100644 index 7d044741..00000000 Binary files a/data/cobble.png and /dev/null differ diff --git a/data/cooked_rat.png b/data/cooked_rat.png deleted file mode 100644 index daad3be0..00000000 Binary files a/data/cooked_rat.png and /dev/null differ diff --git a/data/crack.png b/data/crack.png deleted file mode 100644 index 49978398..00000000 Binary files a/data/crack.png and /dev/null differ diff --git a/data/dungeon_master.png b/data/dungeon_master.png deleted file mode 100644 index 3457c822..00000000 Binary files a/data/dungeon_master.png and /dev/null differ diff --git a/data/fence.png b/data/fence.png deleted file mode 100644 index 0b99f0eb..00000000 Binary files a/data/fence.png and /dev/null differ diff --git a/data/fireball.png b/data/fireball.png deleted file mode 100644 index 52314285..00000000 Binary files a/data/fireball.png and /dev/null differ diff --git a/data/firefly.png b/data/firefly.png deleted file mode 100644 index 40df7fa1..00000000 Binary files a/data/firefly.png and /dev/null differ diff --git a/data/fontlucida.png b/data/fontlucida.png deleted file mode 100644 index c63fa02b..00000000 Binary files a/data/fontlucida.png and /dev/null differ diff --git a/data/furnace_front.png b/data/furnace_front.png deleted file mode 100644 index 1620a27c..00000000 Binary files a/data/furnace_front.png and /dev/null differ diff --git a/data/furnace_side.png b/data/furnace_side.png deleted file mode 100644 index 63cb162f..00000000 Binary files a/data/furnace_side.png and /dev/null differ diff --git a/data/glass.png b/data/glass.png deleted file mode 100644 index 8598ce67..00000000 Binary files a/data/glass.png and /dev/null differ diff --git a/data/grass.png b/data/grass.png deleted file mode 100644 index 3610bb2b..00000000 Binary files a/data/grass.png and /dev/null differ diff --git a/data/grass_footsteps.png b/data/grass_footsteps.png deleted file mode 100644 index 57e063d8..00000000 Binary files a/data/grass_footsteps.png and /dev/null differ diff --git a/data/grass_side.png b/data/grass_side.png deleted file mode 100644 index 4f4f680b..00000000 Binary files a/data/grass_side.png and /dev/null differ diff --git a/data/gravel.png b/data/gravel.png deleted file mode 100644 index f08666ad..00000000 Binary files a/data/gravel.png and /dev/null differ diff --git a/data/heart.png b/data/heart.png deleted file mode 100644 index 6bc183e0..00000000 Binary files a/data/heart.png and /dev/null differ diff --git a/data/junglegrass.png b/data/junglegrass.png deleted file mode 100644 index eea87c07..00000000 Binary files a/data/junglegrass.png and /dev/null differ diff --git a/data/jungletree.png b/data/jungletree.png deleted file mode 100644 index ccd20ac7..00000000 Binary files a/data/jungletree.png and /dev/null differ diff --git a/data/jungletree_top.png b/data/jungletree_top.png deleted file mode 100644 index 2a9b5137..00000000 Binary files a/data/jungletree_top.png and /dev/null differ diff --git a/data/ladder.png b/data/ladder.png deleted file mode 100644 index 11056359..00000000 Binary files a/data/ladder.png and /dev/null differ diff --git a/data/lava.png b/data/lava.png deleted file mode 100644 index cb02ada1..00000000 Binary files a/data/lava.png and /dev/null differ diff --git a/data/leaves.png b/data/leaves.png deleted file mode 100644 index 7a25126e..00000000 Binary files a/data/leaves.png and /dev/null differ diff --git a/data/lump_of_clay.png b/data/lump_of_clay.png deleted file mode 100644 index be0bab9d..00000000 Binary files a/data/lump_of_clay.png and /dev/null differ diff --git a/data/lump_of_coal.png b/data/lump_of_coal.png deleted file mode 100644 index bad901ef..00000000 Binary files a/data/lump_of_coal.png and /dev/null differ diff --git a/data/lump_of_iron.png b/data/lump_of_iron.png deleted file mode 100644 index edb93101..00000000 Binary files a/data/lump_of_iron.png and /dev/null differ diff --git a/data/menulogo.png b/data/menulogo.png deleted file mode 100644 index 76595c48..00000000 Binary files a/data/menulogo.png and /dev/null differ diff --git a/data/mese.png b/data/mese.png deleted file mode 100644 index 4c876cdc..00000000 Binary files a/data/mese.png and /dev/null differ diff --git a/data/mineral_coal.png b/data/mineral_coal.png deleted file mode 100644 index 3ff9692f..00000000 Binary files a/data/mineral_coal.png and /dev/null differ diff --git a/data/mineral_iron.png b/data/mineral_iron.png deleted file mode 100644 index 51b15d95..00000000 Binary files a/data/mineral_iron.png and /dev/null differ diff --git a/data/mossycobble.png b/data/mossycobble.png deleted file mode 100644 index fad1b33f..00000000 Binary files a/data/mossycobble.png and /dev/null differ diff --git a/data/mud.png b/data/mud.png deleted file mode 100644 index 7cb9c89a..00000000 Binary files a/data/mud.png and /dev/null differ diff --git a/data/nc_back.png b/data/nc_back.png deleted file mode 100644 index f09f4165..00000000 Binary files a/data/nc_back.png and /dev/null differ diff --git a/data/nc_front.png b/data/nc_front.png deleted file mode 100644 index cad9edab..00000000 Binary files a/data/nc_front.png and /dev/null differ diff --git a/data/nc_rb.png b/data/nc_rb.png deleted file mode 100644 index 7ebc9930..00000000 Binary files a/data/nc_rb.png and /dev/null differ diff --git a/data/nc_side.png b/data/nc_side.png deleted file mode 100644 index f954045f..00000000 Binary files a/data/nc_side.png and /dev/null differ diff --git a/data/oerkki1.png b/data/oerkki1.png deleted file mode 100644 index 33cbac9e..00000000 Binary files a/data/oerkki1.png and /dev/null differ diff --git a/data/oerkki1_damaged.png b/data/oerkki1_damaged.png deleted file mode 100644 index 9b777387..00000000 Binary files a/data/oerkki1_damaged.png and /dev/null differ diff --git a/data/paper.png b/data/paper.png deleted file mode 100644 index ae5c06bc..00000000 Binary files a/data/paper.png and /dev/null differ diff --git a/data/papyrus.png b/data/papyrus.png deleted file mode 100644 index bf0dec7f..00000000 Binary files a/data/papyrus.png and /dev/null differ diff --git a/data/player.png b/data/player.png deleted file mode 100644 index 90adf974..00000000 Binary files a/data/player.png and /dev/null differ diff --git a/data/player_back.png b/data/player_back.png deleted file mode 100644 index 530aa751..00000000 Binary files a/data/player_back.png and /dev/null differ diff --git a/data/rail.png b/data/rail.png deleted file mode 100644 index 18176d9f..00000000 Binary files a/data/rail.png and /dev/null differ diff --git a/data/rail_crossing.png b/data/rail_crossing.png deleted file mode 100644 index 98464057..00000000 Binary files a/data/rail_crossing.png and /dev/null differ diff --git a/data/rail_curved.png b/data/rail_curved.png deleted file mode 100644 index 62afa3d2..00000000 Binary files a/data/rail_curved.png and /dev/null differ diff --git a/data/rail_t_junction.png b/data/rail_t_junction.png deleted file mode 100644 index 9985f63c..00000000 Binary files a/data/rail_t_junction.png and /dev/null differ diff --git a/data/rat.png b/data/rat.png deleted file mode 100644 index d1a0e2ae..00000000 Binary files a/data/rat.png and /dev/null differ diff --git a/data/sand.png b/data/sand.png deleted file mode 100644 index 15101a7e..00000000 Binary files a/data/sand.png and /dev/null differ diff --git a/data/sandstone.png b/data/sandstone.png deleted file mode 100644 index c4759b4d..00000000 Binary files a/data/sandstone.png and /dev/null differ diff --git a/data/sapling.png b/data/sapling.png deleted file mode 100644 index 73f50230..00000000 Binary files a/data/sapling.png and /dev/null differ diff --git a/data/scorched_stuff.png b/data/scorched_stuff.png deleted file mode 100644 index 9ced2fbe..00000000 Binary files a/data/scorched_stuff.png and /dev/null differ diff --git a/data/sign.png b/data/sign.png deleted file mode 100644 index 2e0b3cbe..00000000 Binary files a/data/sign.png and /dev/null differ diff --git a/data/sign_back.png b/data/sign_back.png deleted file mode 100644 index 779e4bc2..00000000 Binary files a/data/sign_back.png and /dev/null differ diff --git a/data/sign_wall.png b/data/sign_wall.png deleted file mode 100644 index 06eac1ee..00000000 Binary files a/data/sign_wall.png and /dev/null differ diff --git a/data/skybox1.png b/data/skybox1.png deleted file mode 100644 index 9801d5f4..00000000 Binary files a/data/skybox1.png and /dev/null differ diff --git a/data/skybox1_dawn.png b/data/skybox1_dawn.png deleted file mode 100644 index 9711c478..00000000 Binary files a/data/skybox1_dawn.png and /dev/null differ diff --git a/data/skybox1_night.png b/data/skybox1_night.png deleted file mode 100644 index 32e43a63..00000000 Binary files a/data/skybox1_night.png and /dev/null differ diff --git a/data/skybox2.png b/data/skybox2.png deleted file mode 100644 index a8c94b4d..00000000 Binary files a/data/skybox2.png and /dev/null differ diff --git a/data/skybox2_dawn.png b/data/skybox2_dawn.png deleted file mode 100644 index a761dff2..00000000 Binary files a/data/skybox2_dawn.png and /dev/null differ diff --git a/data/skybox2_night.png b/data/skybox2_night.png deleted file mode 100644 index beb07a9c..00000000 Binary files a/data/skybox2_night.png and /dev/null differ diff --git a/data/skybox3.png b/data/skybox3.png deleted file mode 100644 index 2776ec71..00000000 Binary files a/data/skybox3.png and /dev/null differ diff --git a/data/skybox3_dawn.png b/data/skybox3_dawn.png deleted file mode 100644 index 22c8cbef..00000000 Binary files a/data/skybox3_dawn.png and /dev/null differ diff --git a/data/skybox3_night.png b/data/skybox3_night.png deleted file mode 100644 index bb509789..00000000 Binary files a/data/skybox3_night.png and /dev/null differ diff --git a/data/steel_block.png b/data/steel_block.png deleted file mode 100644 index 8e202008..00000000 Binary files a/data/steel_block.png and /dev/null differ diff --git a/data/steel_ingot.png b/data/steel_ingot.png deleted file mode 100644 index f6c9414e..00000000 Binary files a/data/steel_ingot.png and /dev/null differ diff --git a/data/stick.png b/data/stick.png deleted file mode 100644 index 2d31797f..00000000 Binary files a/data/stick.png and /dev/null differ diff --git a/data/stone.png b/data/stone.png deleted file mode 100644 index cad0dbe2..00000000 Binary files a/data/stone.png and /dev/null differ diff --git a/data/tool_mesepick.png b/data/tool_mesepick.png deleted file mode 100644 index a1f3812e..00000000 Binary files a/data/tool_mesepick.png and /dev/null differ diff --git a/data/tool_steelaxe.png b/data/tool_steelaxe.png deleted file mode 100644 index 0ad23c93..00000000 Binary files a/data/tool_steelaxe.png and /dev/null differ diff --git a/data/tool_steelpick.png b/data/tool_steelpick.png deleted file mode 100644 index 7982dafe..00000000 Binary files a/data/tool_steelpick.png and /dev/null differ diff --git a/data/tool_steelshovel.png b/data/tool_steelshovel.png deleted file mode 100644 index ed841384..00000000 Binary files a/data/tool_steelshovel.png and /dev/null differ diff --git a/data/tool_steelsword.png b/data/tool_steelsword.png deleted file mode 100644 index a7458123..00000000 Binary files a/data/tool_steelsword.png and /dev/null differ diff --git a/data/tool_stoneaxe.png b/data/tool_stoneaxe.png deleted file mode 100644 index 698ac918..00000000 Binary files a/data/tool_stoneaxe.png and /dev/null differ diff --git a/data/tool_stonepick.png b/data/tool_stonepick.png deleted file mode 100644 index b34de6f3..00000000 Binary files a/data/tool_stonepick.png and /dev/null differ diff --git a/data/tool_stoneshovel.png b/data/tool_stoneshovel.png deleted file mode 100644 index ba524310..00000000 Binary files a/data/tool_stoneshovel.png and /dev/null differ diff --git a/data/tool_stonesword.png b/data/tool_stonesword.png deleted file mode 100644 index 8f8191f9..00000000 Binary files a/data/tool_stonesword.png and /dev/null differ diff --git a/data/tool_woodaxe.png b/data/tool_woodaxe.png deleted file mode 100644 index 3daa4af7..00000000 Binary files a/data/tool_woodaxe.png and /dev/null differ diff --git a/data/tool_woodpick.png b/data/tool_woodpick.png deleted file mode 100644 index ea728cca..00000000 Binary files a/data/tool_woodpick.png and /dev/null differ diff --git a/data/tool_woodshovel.png b/data/tool_woodshovel.png deleted file mode 100644 index 649ab4c3..00000000 Binary files a/data/tool_woodshovel.png and /dev/null differ diff --git a/data/tool_woodsword.png b/data/tool_woodsword.png deleted file mode 100644 index d6c6be32..00000000 Binary files a/data/tool_woodsword.png and /dev/null differ diff --git a/data/torch.png b/data/torch.png deleted file mode 100644 index 7a953c22..00000000 Binary files a/data/torch.png and /dev/null differ diff --git a/data/torch_on_ceiling.png b/data/torch_on_ceiling.png deleted file mode 100644 index 6965d380..00000000 Binary files a/data/torch_on_ceiling.png and /dev/null differ diff --git a/data/torch_on_floor.png b/data/torch_on_floor.png deleted file mode 100644 index 76d1dd5a..00000000 Binary files a/data/torch_on_floor.png and /dev/null differ diff --git a/data/tree.png b/data/tree.png deleted file mode 100644 index 65abfc24..00000000 Binary files a/data/tree.png and /dev/null differ diff --git a/data/tree_top.png b/data/tree_top.png deleted file mode 100644 index 2cdd94f8..00000000 Binary files a/data/tree_top.png and /dev/null differ diff --git a/data/treeprop.png b/data/treeprop.png deleted file mode 100644 index 77ea4d6d..00000000 Binary files a/data/treeprop.png and /dev/null differ diff --git a/data/unknown_block.png b/data/unknown_block.png deleted file mode 100644 index a27cb8ca..00000000 Binary files a/data/unknown_block.png and /dev/null differ diff --git a/data/water.png b/data/water.png deleted file mode 100644 index e5f8cdc2..00000000 Binary files a/data/water.png and /dev/null differ diff --git a/data/wood.png b/data/wood.png deleted file mode 100644 index 57c1d7c1..00000000 Binary files a/data/wood.png and /dev/null differ diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 7a45bf1d..f75c182b 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -299,9 +299,8 @@ install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/../minetest.conf.example" DESTINATION if(BUILD_CLIENT) install(TARGETS ${PROJECT_NAME} DESTINATION ${BINDIR}) - file(GLOB images "${CMAKE_CURRENT_SOURCE_DIR}/../data/*.png") - - install(FILES ${images} DESTINATION ${DATADIR}) + file(GLOB images "${CMAKE_CURRENT_SOURCE_DIR}/../data/textures/*.png") + install(FILES ${images} DESTINATION ${DATADIR}/textures) if(USE_GETTEXT) foreach(LOCALE ${GETTEXT_AVAILABLE_LOCALES}) diff --git a/src/porting.cpp b/src/porting.cpp index f3a0ab07..00595b06 100644 --- a/src/porting.cpp +++ b/src/porting.cpp @@ -125,6 +125,11 @@ void signal_handler_init(void) std::string path_data = ".." DIR_DELIM "data"; std::string path_userdata = ".."; +std::string getDataPath(const char *subpath) +{ + return path_data + DIR_DELIM + subpath; +} + void pathRemoveFile(char *path, char delim) { // Remove filename and path delimiter diff --git a/src/porting.h b/src/porting.h index 3f9486b6..4970a847 100644 --- a/src/porting.h +++ b/src/porting.h @@ -73,10 +73,7 @@ extern std::string path_userdata; Get full path of stuff in data directory. Example: "stone.png" -> "../data/stone.png" */ -inline std::string getDataPath(const char *subpath) -{ - return path_data + "/" + subpath; -} +std::string getDataPath(const char *subpath); /* Initialize path_data and path_userdata. diff --git a/src/server.cpp b/src/server.cpp index 33038872..e7cfc9af 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -950,8 +950,8 @@ Server::Server( ): m_env(new ServerMap(mapsavedir), this), m_con(PROTOCOL_ID, 512, CONNECTION_TIMEOUT, this), - m_authmanager(mapsavedir+"/auth.txt"), - m_banmanager(mapsavedir+"/ipban.txt"), + m_authmanager(mapsavedir+DIR_DELIM+"auth.txt"), + m_banmanager(mapsavedir+DIR_DELIM+"ipban.txt"), m_thread(this), m_emergethread(this), m_time_counter(0), @@ -978,7 +978,7 @@ Server::Server( m_env.getMap().addEventReceiver(this); // If file exists, load environment metadata - if(fs::PathExists(m_mapsavedir+"/env_meta.txt")) + if(fs::PathExists(m_mapsavedir+DIR_DELIM+"env_meta.txt")) { infostream<<"Server: Loading environment metadata"<