Skip to content

Commit

Permalink
Include manual and other documentation pdf files into windows package
Browse files Browse the repository at this point in the history
Signed-off-by: Martin <Ho-Ro@users.noreply.github.com>
  • Loading branch information
Ho-Ro committed Apr 8, 2022
1 parent 5be939a commit e82b183
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 2 deletions.
18 changes: 18 additions & 0 deletions cmake/docs_on_windows.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
if (NOT WIN32)
return()
endif()

# where are the documents (*.pdf)
set(DOCS_DIR "${CMAKE_CURRENT_LIST_DIR}/../docs")
set(DOCUMENTS "documents")

# execute commands
add_custom_command(TARGET ${PROJECT_NAME}
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E make_directory ${DOCS}
COMMAND ${CMAKE_COMMAND} -E copy_if_different "${DOCS_DIR}/OpenHantek6022_User_Manual.pdf" $<TARGET_FILE_DIR:"${PROJECT_NAME}/${DOCUMENTS}">
COMMAND ${CMAKE_COMMAND} -E copy_if_different "${DOCS_DIR}/HANTEK6022_AC_Modification.pdf" $<TARGET_FILE_DIR:"${PROJECT_NAME}/${DOCUMENTS}">
COMMAND ${CMAKE_COMMAND} -E copy_if_different "${DOCS_DIR}/HANTEK6022_Frequency_Generator_Modification.pdf" $<TARGET_FILE_DIR:"${PROJECT_NAME}/${DOCUMENTS}">
COMMAND ${CMAKE_COMMAND} -E copy_if_different "${DOCS_DIR}/OpenHantek6022_zadig_Win10.pdf" $<TARGET_FILE_DIR:"${PROJECT_NAME}/${DOCUMENTS}">
COMMENT "Copy manual and documentation files for ${PROJECT_NAME}"
)
1 change: 1 addition & 0 deletions openhantek/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ else()
target_compile_options(${PROJECT_NAME} PRIVATE "$<$<CONFIG:RELEASE>:-fno-rtti>")
endif()

include(../cmake/docs_on_windows.cmake)
include(../cmake/fftw_on_windows.cmake)
include(../cmake/libusb_on_windows.cmake)

Expand Down
2 changes: 1 addition & 1 deletion openhantek/src/OH_BUILD.h
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// Do not edit, will be re-created at each commit!
#define OH_BUILD "20220407 - commit 987"
#define OH_BUILD "20220408 - commit 988"
8 changes: 7 additions & 1 deletion openhantek/src/viewconstants.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,17 @@
#define USER_MANUAL_NAME "OpenHantek6022_User_Manual.pdf"
#define AC_MODIFICATION_NAME "HANTEK6022_AC_Modification.pdf"
#define FREQUENCY_GENERATOR_MODIFICATION_NAME "HANTEK6022_Frequency_Generator_Modification.pdf"

// where are the (local) documents?
#ifdef __FreeBSD__
#ifdef Q_OS_WIN
#define DOC_PATH "./documents"
#else
#ifdef Q_OS_FREEBSD
#define DOC_PATH "/usr/local/share/doc/openhantek/"
#else
#define DOC_PATH "/usr/share/doc/openhantek/"
#endif
#endif

// GitHub doc location
#define DOC_URL "https://github.com/OpenHantek/OpenHantek6022/blob/main/docs/"

0 comments on commit e82b183

Please sign in to comment.