mirror of
https://github.com/minetest/minetestmapper.git
synced 2024-11-22 07:23:46 +01:00
Remove embedding of colors.txt in executable
This commit is contained in:
parent
5905c34ec0
commit
ac04a7bc8a
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,4 +1,3 @@
|
|||||||
colors.h
|
|
||||||
colors.txt
|
colors.txt
|
||||||
minetestmapper
|
minetestmapper
|
||||||
minetestmapper.exe
|
minetestmapper.exe
|
||||||
|
@ -56,24 +56,6 @@ if(ENABLE_LEVELDB)
|
|||||||
endif(LEVELDB_LIBRARY AND LEVELDB_INCLUDE_DIR)
|
endif(LEVELDB_LIBRARY AND LEVELDB_INCLUDE_DIR)
|
||||||
endif(ENABLE_LEVELDB)
|
endif(ENABLE_LEVELDB)
|
||||||
|
|
||||||
# Find xxd
|
|
||||||
find_program(XXD_EXECUTABLE xxd)
|
|
||||||
|
|
||||||
if (XXD_EXECUTABLE)
|
|
||||||
message(STATUS "Found xxd")
|
|
||||||
else (XXD_EXECUTABLE)
|
|
||||||
message(FATAL_ERROR "xxd not found")
|
|
||||||
endif (XXD_EXECUTABLE)
|
|
||||||
|
|
||||||
# Add command to turn colors.txt into a C header file
|
|
||||||
add_custom_command(
|
|
||||||
OUTPUT colors.h
|
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/colors.txt colors.txt
|
|
||||||
COMMAND ${XXD_EXECUTABLE} -i colors.txt colors.h
|
|
||||||
DEPENDS colors.txt
|
|
||||||
)
|
|
||||||
set_property(SOURCE TileGenerator.cpp APPEND PROPERTY OBJECT_DEPENDS colors.h)
|
|
||||||
|
|
||||||
include_directories(
|
include_directories(
|
||||||
"${PROJECT_BINARY_DIR}"
|
"${PROJECT_BINARY_DIR}"
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}"
|
"${CMAKE_CURRENT_SOURCE_DIR}"
|
||||||
|
@ -8,7 +8,6 @@ Requirements
|
|||||||
|
|
||||||
* libgd
|
* libgd
|
||||||
* sqlite3
|
* sqlite3
|
||||||
* xxd binary (You can get xxd from your distribution packages or use '' wget -O xxd.c http://www.opensource.apple.com/source/vim/vim-43/vim/src/xxd/xxd.c?txt && gcc xxd.c -o xxd '')
|
|
||||||
|
|
||||||
Compilation
|
Compilation
|
||||||
-----------
|
-----------
|
||||||
@ -68,8 +67,3 @@ backend:
|
|||||||
geometry:
|
geometry:
|
||||||
Limit area to specific geometry, `--geometry -800:-800+1600+1600`
|
Limit area to specific geometry, `--geometry -800:-800+1600+1600`
|
||||||
|
|
||||||
Customization of colors.txt
|
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
|
|
||||||
Default `colors.txt` is included in binary. Color definitions can be redefined
|
|
||||||
using external `colors.txt` file.
|
|
||||||
|
@ -22,7 +22,6 @@
|
|||||||
#include "PlayerAttributes.h"
|
#include "PlayerAttributes.h"
|
||||||
#include "TileGenerator.h"
|
#include "TileGenerator.h"
|
||||||
#include "ZlibDecompressor.h"
|
#include "ZlibDecompressor.h"
|
||||||
#include "colors.h"
|
|
||||||
#include "db-sqlite3.h"
|
#include "db-sqlite3.h"
|
||||||
#if USE_LEVELDB
|
#if USE_LEVELDB
|
||||||
#include "db-leveldb.h"
|
#include "db-leveldb.h"
|
||||||
@ -117,9 +116,6 @@ TileGenerator::TileGenerator():
|
|||||||
m_geomX2(INT_MAX),
|
m_geomX2(INT_MAX),
|
||||||
m_geomY2(INT_MAX)
|
m_geomY2(INT_MAX)
|
||||||
{
|
{
|
||||||
string colors_txt_data(reinterpret_cast<char *>(colors_txt), colors_txt_len);
|
|
||||||
istringstream colors_stream(colors_txt_data);
|
|
||||||
parseColorsStream(colors_stream);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TileGenerator::~TileGenerator()
|
TileGenerator::~TileGenerator()
|
||||||
|
Loading…
Reference in New Issue
Block a user