Skip to content

Commit

Permalink
2041: run dump-shortcuts during build and integrate into manual code
Browse files Browse the repository at this point in the history
  • Loading branch information
kduske committed Sep 27, 2019
1 parent 66de160 commit fb4d496
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 817 deletions.
13 changes: 10 additions & 3 deletions app/cmake/GenerateManual.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,14 @@ add_custom_command(OUTPUT "${INDEX_OUTPUT_PATH}"
COMMENT "Creating manual file ${INDEX_OUTPUT_PATH}"
)

# Dump the keyboard shortcuts
set(DOC_MANUAL_SHORTCUTS_JS_TARGET_ABSOLUTE "${DOC_MANUAL_TARGET_DIR}/shortcuts.js")
add_custom_command(
OUTPUT "${DOC_MANUAL_SHORTCUTS_JS_TARGET_ABSOLUTE}"
COMMAND dump-shortcuts ARGS "${DOC_MANUAL_SHORTCUTS_JS_TARGET_ABSOLUTE}"
DEPENDS "${DOC_MANUAL_TARGET_DIR}"
VERBATIM)

# Collect resources and copy them to the correct locations
# DOC_MANUAL_SOURCE_FILES_ABSOLUTE contains the absolute paths to all source resource files
# DOC_MANUAL_SOURCE_IMAGE_FILES_RELATIVE contains the relative paths to all source resource files, relative to DOC_MANUAL_IMAGES_SOURCE_DIR
Expand All @@ -70,8 +78,7 @@ foreach(MANUAL_SOURCE_FILE_ABSOLUTE ${DOC_MANUAL_SOURCE_FILES_ABSOLUTE})

set(DOC_MANUAL_TARGET_FILES_ABSOLUTE
${DOC_MANUAL_TARGET_FILES_ABSOLUTE}
"${MANUAL_TARGET_FILE_ABSOLUTE}"
)
"${MANUAL_TARGET_FILE_ABSOLUTE}")
endforeach(MANUAL_SOURCE_FILE_ABSOLUTE)

# Copy the images using the relative paths (absolute paths would yield very long command lines which are then truncated by MSVC)
Expand Down Expand Up @@ -117,4 +124,4 @@ add_custom_command(OUTPUT ${DOC_MANUAL_TARGET_IMAGE_FILES_ABSOLUTE}
COMMENT "Copying image files to ${DOC_MANUAL_IMAGES_TARGET_DIR}"
)

add_custom_target(GenerateManual DEPENDS ${INDEX_OUTPUT_PATH} ${DOC_MANUAL_TARGET_FILES_ABSOLUTE} ${DOC_MANUAL_TARGET_IMAGE_FILES_ABSOLUTE})
add_custom_target(GenerateManual DEPENDS ${INDEX_OUTPUT_PATH} ${DOC_MANUAL_TARGET_FILES_ABSOLUTE} ${DOC_MANUAL_SHORTCUTS_JS_TARGET_ABSOLUTE} ${DOC_MANUAL_TARGET_IMAGE_FILES_ABSOLUTE})
Loading

0 comments on commit fb4d496

Please sign in to comment.