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-Tag: 0.4.dev-20111201-0~208 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=ee8b6d34447acab3ffb318dc8c070df890c1b810;p=oweals%2Fminetest.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 9593f28f6..000000000 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 2dffdf014..000000000 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 176fb6aa9..000000000 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 5ecc50ff3..000000000 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 32d77f347..000000000 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 fc479fde6..000000000 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 f9e68df51..000000000 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 c5628af94..000000000 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 ae038fae5..000000000 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 916dd784d..000000000 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 58c79674d..000000000 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 3557429d8..000000000 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 e36648e48..000000000 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 24091a377..000000000 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 7d0447419..000000000 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 daad3be0d..000000000 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 499783982..000000000 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 3457c8228..000000000 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 0b99f0eb5..000000000 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 523142850..000000000 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 40df7fa1c..000000000 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 c63fa02b7..000000000 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 1620a27c3..000000000 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 63cb162fe..000000000 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 8598ce670..000000000 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 3610bb2bc..000000000 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 57e063d8c..000000000 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 4f4f680be..000000000 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 f08666ad9..000000000 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 6bc183e04..000000000 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 eea87c07c..000000000 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 ccd20ac74..000000000 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 2a9b51373..000000000 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 11056359d..000000000 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 cb02ada13..000000000 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 7a25126e9..000000000 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 be0bab9d7..000000000 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 bad901efa..000000000 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 edb931018..000000000 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 76595c48d..000000000 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 4c876cdc5..000000000 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 3ff9692fb..000000000 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 51b15d95d..000000000 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 fad1b33ff..000000000 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 7cb9c89a6..000000000 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 f09f41658..000000000 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 cad9edab1..000000000 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 7ebc9930d..000000000 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 f954045fb..000000000 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 33cbac9e7..000000000 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 9b777387c..000000000 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 ae5c06bc6..000000000 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 bf0dec7fe..000000000 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 90adf9747..000000000 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 530aa7519..000000000 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 18176d9f3..000000000 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 984640577..000000000 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 62afa3d2b..000000000 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 9985f63cd..000000000 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 d1a0e2ae2..000000000 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 15101a7eb..000000000 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 c4759b4d0..000000000 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 73f502306..000000000 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 9ced2fbe8..000000000 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 2e0b3cbef..000000000 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 779e4bc2c..000000000 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 06eac1ee9..000000000 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 9801d5f4f..000000000 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 9711c4781..000000000 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 32e43a63e..000000000 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 a8c94b4d2..000000000 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 a761dff2d..000000000 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 beb07a9cf..000000000 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 2776ec712..000000000 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 22c8cbef5..000000000 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 bb509789b..000000000 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 8e2020081..000000000 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 f6c9414e7..000000000 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 2d31797f0..000000000 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 cad0dbe2b..000000000 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 a1f3812e0..000000000 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 0ad23c93b..000000000 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 7982dafeb..000000000 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 ed8413846..000000000 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 a74581238..000000000 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 698ac918f..000000000 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 b34de6f32..000000000 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 ba5243101..000000000 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 8f8191f92..000000000 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 3daa4af72..000000000 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 ea728cca3..000000000 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 649ab4c38..000000000 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 d6c6be325..000000000 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 7a953c222..000000000 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 6965d380e..000000000 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 76d1dd5ac..000000000 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 65abfc243..000000000 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 2cdd94f80..000000000 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 77ea4d6d4..000000000 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 a27cb8ca9..000000000 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 e5f8cdc25..000000000 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 57c1d7c12..000000000 Binary files a/data/wood.png and /dev/null differ diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 7a45bf1d1..f75c182bd 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 f3a0ab074..00595b06c 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 3f9486b63..4970a8478 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 330388727..e7cfc9afc 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"<