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
|
# 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)
|
file(GLOB help_files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${help_category_dir}/E/*.txt)
|
||||||
list(SORT help_files)
|
list(SORT help_files)
|
||||||
if(PO4A AND EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${help_category_dir}/po/)
|
if(PO4A AND EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${help_category_dir}/po/)
|
||||||
|
@ -19,14 +19,14 @@ function(add_help_category help_category_dir)
|
||||||
else()
|
else()
|
||||||
set(translated_help_dirs "")
|
set(translated_help_dirs "")
|
||||||
endif()
|
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})
|
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()
|
endforeach()
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
|
|
||||||
add_help_category(bots)
|
add_help_category(bots "object")
|
||||||
add_help_category(cbot)
|
add_help_category(cbot "cbot")
|
||||||
add_help_category(generic)
|
add_help_category(generic "")
|
||||||
add_help_category(object)
|
add_help_category(object "object")
|
||||||
|
|
|
@ -29,8 +29,8 @@ function(generate_help_i18n
|
||||||
file(GLOB po_files ${po_dir}/*.po)
|
file(GLOB po_files ${po_dir}/*.po)
|
||||||
foreach(po_file ${po_files})
|
foreach(po_file ${po_files})
|
||||||
get_language_char(language_char ${po_file})
|
get_language_char(language_char ${po_file})
|
||||||
set(language_help_subdir ${work_dir}/${language_char})
|
#set(language_help_subdir ${work_dir}/${language_char})
|
||||||
list(APPEND output_help_subdirs ${language_help_subdir})
|
list(APPEND output_help_subdirs ${language_char})
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
# add translation rules for help files
|
# add translation rules for help files
|
||||||
|
|
Loading…
Reference in New Issue