Fixed help files installation
parent
4149a25707
commit
ce38c26dbf
|
@ -8,7 +8,7 @@ set(HELP_INSTALL_DATA_DIR ${COLOBOT_INSTALL_DATA_DIR}/help)
|
|||
##
|
||||
# Add help category directory
|
||||
##
|
||||
function(add_help_category help_category_dir)
|
||||
function(add_help_category help_category_dir install_dest_dir)
|
||||
file(GLOB help_files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${help_category_dir}/E/*.txt)
|
||||
list(SORT help_files)
|
||||
if(PO4A AND EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${help_category_dir}/po/)
|
||||
|
@ -19,14 +19,14 @@ function(add_help_category help_category_dir)
|
|||
else()
|
||||
set(translated_help_dirs "")
|
||||
endif()
|
||||
install(DIRECTORY ${help_category_dir}/E DESTINATION ${HELP_INSTALL_DATA_DIR}/${help_category_dir})
|
||||
install(DIRECTORY ${help_category_dir}/E/ DESTINATION ${HELP_INSTALL_DATA_DIR}/E/${install_dest_dir})
|
||||
foreach(translated_help_dir ${translated_help_dirs})
|
||||
install(DIRECTORY ${translated_help_dir} DESTINATION ${HELP_INSTALL_DATA_DIR}/${help_category_dir})
|
||||
install(DIRECTORY ${DATA_BINARY_DIR}/help-po/${help_category_dir}/${translated_help_dir}/ DESTINATION ${HELP_INSTALL_DATA_DIR}/${translated_help_dir}/${install_dest_dir})
|
||||
endforeach()
|
||||
endfunction()
|
||||
|
||||
|
||||
add_help_category(bots)
|
||||
add_help_category(cbot)
|
||||
add_help_category(generic)
|
||||
add_help_category(object)
|
||||
add_help_category(bots "object")
|
||||
add_help_category(cbot "cbot")
|
||||
add_help_category(generic "")
|
||||
add_help_category(object "object")
|
||||
|
|
|
@ -29,8 +29,8 @@ function(generate_help_i18n
|
|||
file(GLOB po_files ${po_dir}/*.po)
|
||||
foreach(po_file ${po_files})
|
||||
get_language_char(language_char ${po_file})
|
||||
set(language_help_subdir ${work_dir}/${language_char})
|
||||
list(APPEND output_help_subdirs ${language_help_subdir})
|
||||
#set(language_help_subdir ${work_dir}/${language_char})
|
||||
list(APPEND output_help_subdirs ${language_char})
|
||||
endforeach()
|
||||
|
||||
# add translation rules for help files
|
||||
|
|
Loading…
Reference in New Issue