bundled documentation touch-ups, minor install fixes
This commit is contained in:
parent
e01c0d91f2
commit
313f55e72c
5 changed files with 50 additions and 7 deletions
|
@ -108,23 +108,36 @@ add_subdirectory(src)
|
|||
|
||||
if(RELATIVE)
|
||||
add_definitions(-DRELATIVE)
|
||||
set(DOC_DIR .)
|
||||
|
||||
if(APPLE)
|
||||
set(RES_DIR "Taisei.app/Contents/Resources")
|
||||
set(DATA_DIR "${RES_DIR}/data")
|
||||
install(FILES "OSX-iconset.icns" DESTINATION "${RES_DIR}" RENAME "Taisei.icns")
|
||||
else()
|
||||
set(DATA_DIR "data")
|
||||
set(DATA_DIR "data")
|
||||
endif()
|
||||
|
||||
install(FILES "story.txt" DESTINATION .)
|
||||
install(FILES "COPYING" DESTINATION . RENAME "COPYING.txt")
|
||||
else()
|
||||
set(DATA_DIR "share/taisei")
|
||||
set(DOC_DIR "share/doc/taisei")
|
||||
|
||||
install(FILES "taisei.desktop" DESTINATION "share/applications")
|
||||
install(FILES "taisei.png" DESTINATION "share/icons/hicolor/128x128/apps")
|
||||
install(FILES "story.txt" DESTINATION ${DATA_DIR})
|
||||
endif()
|
||||
|
||||
install(FILES "STORY.txt" DESTINATION "${DOC_DIR}")
|
||||
install(FILES "COPYING" DESTINATION "${DOC_DIR}" RENAME "COPYING.txt")
|
||||
install(FILES "README_installed.txt" DESTINATION "${DOC_DIR}" RENAME "README.txt")
|
||||
|
||||
if(WIN32)
|
||||
set(DOC_FILES "STORY.txt" "COPYING.txt" "README.txt")
|
||||
|
||||
configure_file(
|
||||
"${BUILDSCRIPTS_DIR}/Win32FixDocs.cmake.in"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/Win32FixDocs.cmake"
|
||||
@ONLY)
|
||||
|
||||
install(SCRIPT "${CMAKE_CURRENT_BINARY_DIR}/Win32FixDocs.cmake")
|
||||
endif()
|
||||
|
||||
set(GAME_RESOURCES_DIRS
|
||||
|
@ -143,7 +156,7 @@ if(PACKAGE_DATA)
|
|||
"${CMAKE_CURRENT_BINARY_DIR}/package_data.cmake"
|
||||
@ONLY)
|
||||
|
||||
install(SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/package_data.cmake)
|
||||
install(SCRIPT "${CMAKE_CURRENT_BINARY_DIR}/package_data.cmake")
|
||||
|
||||
if(PACKAGE_DATA_LEANIFY)
|
||||
find_program(LEANIFY_COMMAND "leanify")
|
||||
|
|
7
README_installed.txt
Normal file
7
README_installed.txt
Normal file
|
@ -0,0 +1,7 @@
|
|||
|
||||
Taisei Project
|
||||
https://taisei-project.org/
|
||||
|
||||
For more information and troubleshooting, visit:
|
||||
https://github.com/laochailan/taisei/blob/master/README.md
|
||||
|
|
@ -15,7 +15,7 @@ execute_process(
|
|||
"@OSX_LIB_PATH@"
|
||||
"@OSX_TOOL_PATH@"
|
||||
"@OSX_TOOL_PREFIX@"
|
||||
WORKING_DIRECTORY "@CMAKE_INSTALL_PREFIX@"
|
||||
WORKING_DIRECTORY "$ENV{DESTDIR}@CMAKE_INSTALL_PREFIX@"
|
||||
RESULT_VARIABLE ERRCODE
|
||||
)
|
||||
|
||||
|
|
23
scripts/Win32FixDocs.cmake.in
Normal file
23
scripts/Win32FixDocs.cmake.in
Normal file
|
@ -0,0 +1,23 @@
|
|||
|
||||
find_program(UNIX2DOS unix2dos)
|
||||
|
||||
if(NOT UNIX2DOS)
|
||||
message(FATAL_ERROR "unix2dos not found, please install it (probably comes with dos2unix)")
|
||||
endif()
|
||||
|
||||
set(DOC_PREFIX "$ENV{DESTDIR}@CMAKE_INSTALL_PREFIX@/@DOC_DIR@")
|
||||
set(DOC_FILES "@DOC_FILES@")
|
||||
|
||||
message(STATUS "Fixing line breaks in documentation")
|
||||
|
||||
foreach(FILE IN LISTS DOC_FILES)
|
||||
execute_process(
|
||||
COMMAND "${UNIX2DOS}" "${DOC_PREFIX}/${FILE}"
|
||||
WORKING_DIRECTORY "@CMAKE_INSTALL_PREFIX@"
|
||||
RESULT_VARIABLE ERRCODE
|
||||
)
|
||||
|
||||
if(NOT ERRCODE EQUAL 0)
|
||||
message(FATAL_ERROR "${UNIX2DOS} exited with error ${ERRCODE}")
|
||||
endif()
|
||||
endforeach()
|
Loading…
Reference in a new issue