From 37f727ac0746fd85504aa46c1f023c09b3eff33a Mon Sep 17 00:00:00 2001 From: hibby Date: Fri, 16 Feb 2018 15:17:14 +0000 Subject: New upstream version 1.8.0+repack --- samples/130418_1742.wav | Bin 1440044 -> 0 bytes samples/130610_2343.wav | Bin 1440044 -> 0 bytes samples/CMakeLists.txt | 37 +++++++++ samples/FT8/170709_135615.wav | Bin 0 -> 360222 bytes samples/ISCAT/ISCAT-A/VK7MO_110401_235515.wav | Bin 0 -> 327724 bytes samples/ISCAT/ISCAT-B/K0AWU_100714_115000.wav | Bin 0 -> 661544 bytes samples/JT4/JT4A/DF2ZC_070926_040700.WAV | Bin 0 -> 1146924 bytes samples/JT4/JT4F/OK1KIR_141105_175700.WAV | Bin 0 -> 1146924 bytes samples/JT65/JT65B/DL7UAE_040308_002400.wav | Bin 0 -> 584369 bytes samples/JT9+JT65/130610_2343.wav | Bin 0 -> 1440044 bytes samples/JT9/130418_1742.wav | Bin 0 -> 1440044 bytes samples/MSK144/160915_113100.wav | Bin 0 -> 360226 bytes samples/MSK144/160915_113230.wav | Bin 0 -> 360226 bytes samples/QRA64/QRA64C/161113_0111.wav | Bin 0 -> 1440228 bytes samples/README | 20 +++++ samples/WSPR/150426_0918.wav | Bin 0 -> 2880044 bytes samples/make_contents.cmake | 107 ++++++++++++++++++++++++++ 17 files changed, 164 insertions(+) delete mode 100644 samples/130418_1742.wav delete mode 100644 samples/130610_2343.wav create mode 100644 samples/CMakeLists.txt create mode 100644 samples/FT8/170709_135615.wav create mode 100644 samples/ISCAT/ISCAT-A/VK7MO_110401_235515.wav create mode 100644 samples/ISCAT/ISCAT-B/K0AWU_100714_115000.wav create mode 100644 samples/JT4/JT4A/DF2ZC_070926_040700.WAV create mode 100644 samples/JT4/JT4F/OK1KIR_141105_175700.WAV create mode 100644 samples/JT65/JT65B/DL7UAE_040308_002400.wav create mode 100644 samples/JT9+JT65/130610_2343.wav create mode 100644 samples/JT9/130418_1742.wav create mode 100644 samples/MSK144/160915_113100.wav create mode 100644 samples/MSK144/160915_113230.wav create mode 100644 samples/QRA64/QRA64C/161113_0111.wav create mode 100644 samples/README create mode 100644 samples/WSPR/150426_0918.wav create mode 100644 samples/make_contents.cmake (limited to 'samples') diff --git a/samples/130418_1742.wav b/samples/130418_1742.wav deleted file mode 100644 index 056cd2e4..00000000 Binary files a/samples/130418_1742.wav and /dev/null differ diff --git a/samples/130610_2343.wav b/samples/130610_2343.wav deleted file mode 100644 index 1fbfaf2f..00000000 Binary files a/samples/130610_2343.wav and /dev/null differ diff --git a/samples/CMakeLists.txt b/samples/CMakeLists.txt new file mode 100644 index 00000000..8c5fa4a9 --- /dev/null +++ b/samples/CMakeLists.txt @@ -0,0 +1,37 @@ +set (SAMPLE_FILES + FT8/170709_135615.wav + ISCAT/ISCAT-A/VK7MO_110401_235515.wav + ISCAT/ISCAT-B/K0AWU_100714_115000.wav + JT4/JT4A/DF2ZC_070926_040700.WAV + JT4/JT4F/OK1KIR_141105_175700.WAV + JT65/JT65B/DL7UAE_040308_002400.wav + JT9+JT65/130610_2343.wav + JT9/130418_1742.wav + MSK144/160915_113100.wav + MSK144/160915_113230.wav + QRA64/QRA64C/161113_0111.wav + WSPR/150426_0918.wav + ) + +set (contents_file_name contents_${WSJTX_VERSION_MAJOR}.${WSJTX_VERSION_MINOR}.json) +set (contents_file ${CMAKE_CURRENT_BINARY_DIR}/${contents_file_name}) +set (web_tree ${CMAKE_CURRENT_BINARY_DIR}/web) +set_source_files_properties (${contents_file} PROPERTIES GENERATED ON) + +add_custom_command ( + OUTPUT ${contents_file} + COMMAND ${CMAKE_COMMAND} ARGS -Dcontents_file=${contents_file} -DFILES="${SAMPLE_FILES}" -DDEST=${CMAKE_CURRENT_BINARY_DIR} -P make_contents.cmake + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + DEPENDS ${SAMPLE_FILES} make_contents.cmake +) + +find_program (RSYNC_EXECUTABLE rsync) +add_custom_command ( + OUTPUT upload.timestamp + COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${contents_file} ${web_tree}/samples/${contents_file_name} + COMMAND ${RSYNC_EXECUTABLE} ARGS -avz --progress ${CMAKE_CURRENT_BINARY_DIR}/web/samples ${PROJECT_SAMPLES_UPLOAD_DEST} + COMMAND ${CMAKE_COMMAND} ARGS -E touch upload.timestamp + DEPENDS ${contents_file} + COMMENT "Uploading WSJT-X samples to web server" + ) +add_custom_target (upload-samples DEPENDS upload.timestamp) diff --git a/samples/FT8/170709_135615.wav b/samples/FT8/170709_135615.wav new file mode 100644 index 00000000..a3ebf883 Binary files /dev/null and b/samples/FT8/170709_135615.wav differ diff --git a/samples/ISCAT/ISCAT-A/VK7MO_110401_235515.wav b/samples/ISCAT/ISCAT-A/VK7MO_110401_235515.wav new file mode 100644 index 00000000..ca8cbf21 Binary files /dev/null and b/samples/ISCAT/ISCAT-A/VK7MO_110401_235515.wav differ diff --git a/samples/ISCAT/ISCAT-B/K0AWU_100714_115000.wav b/samples/ISCAT/ISCAT-B/K0AWU_100714_115000.wav new file mode 100644 index 00000000..405ba864 Binary files /dev/null and b/samples/ISCAT/ISCAT-B/K0AWU_100714_115000.wav differ diff --git a/samples/JT4/JT4A/DF2ZC_070926_040700.WAV b/samples/JT4/JT4A/DF2ZC_070926_040700.WAV new file mode 100644 index 00000000..76b2b106 Binary files /dev/null and b/samples/JT4/JT4A/DF2ZC_070926_040700.WAV differ diff --git a/samples/JT4/JT4F/OK1KIR_141105_175700.WAV b/samples/JT4/JT4F/OK1KIR_141105_175700.WAV new file mode 100644 index 00000000..5c260cd5 Binary files /dev/null and b/samples/JT4/JT4F/OK1KIR_141105_175700.WAV differ diff --git a/samples/JT65/JT65B/DL7UAE_040308_002400.wav b/samples/JT65/JT65B/DL7UAE_040308_002400.wav new file mode 100644 index 00000000..f0d3d58f Binary files /dev/null and b/samples/JT65/JT65B/DL7UAE_040308_002400.wav differ diff --git a/samples/JT9+JT65/130610_2343.wav b/samples/JT9+JT65/130610_2343.wav new file mode 100644 index 00000000..1fbfaf2f Binary files /dev/null and b/samples/JT9+JT65/130610_2343.wav differ diff --git a/samples/JT9/130418_1742.wav b/samples/JT9/130418_1742.wav new file mode 100644 index 00000000..056cd2e4 Binary files /dev/null and b/samples/JT9/130418_1742.wav differ diff --git a/samples/MSK144/160915_113100.wav b/samples/MSK144/160915_113100.wav new file mode 100644 index 00000000..295f11d6 Binary files /dev/null and b/samples/MSK144/160915_113100.wav differ diff --git a/samples/MSK144/160915_113230.wav b/samples/MSK144/160915_113230.wav new file mode 100644 index 00000000..f1337a70 Binary files /dev/null and b/samples/MSK144/160915_113230.wav differ diff --git a/samples/QRA64/QRA64C/161113_0111.wav b/samples/QRA64/QRA64C/161113_0111.wav new file mode 100644 index 00000000..03dec21b Binary files /dev/null and b/samples/QRA64/QRA64C/161113_0111.wav differ diff --git a/samples/README b/samples/README new file mode 100644 index 00000000..db1c18e5 --- /dev/null +++ b/samples/README @@ -0,0 +1,20 @@ +This directory contains the resources necessary to build the WSJT-X +samples database. The CMake build script creates a directory structure +ready for upload to the project samples web or ftp file server. The +CMake script also defines a build target 'upload-samples' which +uploads the sample database to the the destination defined by the +project CMake variable PROJECT_SAMPLES_UPLOAD_DEST (defined in the +project root CMake script). A suitably authorized user may use this +target to update the server with the latest samples. + +The samples database includes a JSON contents file for each +major/minor version combination of WSJT-X, this file is generated by +CMake and should not be manually edited. + +To add new samples simply add the files here and update the +SAMPLE_FILES list variable in the CMakeLists.txt file in this +directory. Sample files must be checked into source control. A +meaningful directory structure is advisable, the same directory +structure will be replicated by the WSJT-X sample downloader dialog +allowing WSJT-X users to easily identify wath each sample file +contains. diff --git a/samples/WSPR/150426_0918.wav b/samples/WSPR/150426_0918.wav new file mode 100644 index 00000000..c53ec20a Binary files /dev/null and b/samples/WSPR/150426_0918.wav differ diff --git a/samples/make_contents.cmake b/samples/make_contents.cmake new file mode 100644 index 00000000..42f2bead --- /dev/null +++ b/samples/make_contents.cmake @@ -0,0 +1,107 @@ +string (REPLACE " " ";" FILES ${FILES}) # make back into a list + +function(JOIN VALUES GLUE OUTPUT) + string (REGEX REPLACE "([^\\]|^);" "\\1${GLUE}" _TMP_STR "${VALUES}") + string (REGEX REPLACE "[\\](.)" "\\1" _TMP_STR "${_TMP_STR}") #fixes escaping + set (${OUTPUT} "${_TMP_STR}" PARENT_SCOPE) +endfunction() + +function (indent) + foreach (temp RANGE ${level}) + file (APPEND ${contents_file} " ") + endforeach () +endfunction () + +function (end_entry) + file (APPEND ${contents_file} "\n") + set(first 0 PARENT_SCOPE) + math (EXPR level "${level} - 1") + indent () + file (APPEND ${contents_file} "]\n") + math (EXPR level "${level} - 2") + indent () + file (APPEND ${contents_file} "}") + string (FIND "${dirs}" "${cwd}" pos) + set (level ${level} PARENT_SCOPE) +endfunction () + +file (WRITE ${contents_file} "[") +set (cwd) +set (level 0) +set (first 1) +list (SORT FILES) +foreach (file IN LISTS FILES) + string (REGEX MATCHALL "[^/]*/" dirs "${file}") + string (REPLACE "/" "" dirs "${dirs}") + string (REGEX MATCH "[^/]*$" name "${file}") + string (FIND "${dirs}" "${cwd}" pos) + list (LENGTH cwd cwd_count) + if (${pos} EQUAL 0) + # same root + while (${cwd_count} GREATER 0) + list (REMOVE_AT dirs 0) + math (EXPR cwd_count "${cwd_count} - 1") + endwhile () + else () + # reduce cwd until matched + while ((NOT ${pos} EQUAL 0) AND ${cwd_count} GREATER 0) + math (EXPR cwd_count "${cwd_count} - 1") + list (REMOVE_AT cwd ${cwd_count}) + string (FIND "${dirs}" "${cwd}" pos) + end_entry () + endwhile () + # back to same root + while (${cwd_count} GREATER 0) + list (REMOVE_AT dirs 0) + math (EXPR cwd_count "${cwd_count} - 1") + endwhile () + endif () + list (LENGTH cwd cwd_count) + list (LENGTH dirs path_count) + while (${path_count} GREATER 0) + list (GET dirs 0 dir) + list (APPEND cwd "${dir}") + list (REMOVE_AT dirs 0) + if (${first}) + file (APPEND ${contents_file} "\n") + set (first 0) + else () + file (APPEND ${contents_file} ",\n") + endif () + indent () + file (APPEND ${contents_file} "{\n") + math (EXPR level "${level} + 1") + indent () + file (APPEND ${contents_file} "\"type\": \"directory\",\n") + indent () + file (APPEND ${contents_file} "\"name\": \"${dir}\",\n") + indent () + file (APPEND ${contents_file} "\"entries\": [") + set (first 1) + math (EXPR level "${level} + 2") + math (EXPR path_count "${path_count} - 1") + endwhile () + JOIN ("${cwd}" "/" path) + file (COPY "${file}" DESTINATION "${DEST}/web/samples/${path}") + if (${first}) + file (APPEND ${contents_file} "\n") + set (first 0) + else () + file (APPEND ${contents_file} ",\n") + endif () + indent () + file (APPEND ${contents_file} "{\n") + math (EXPR level "${level} + 1") + indent () + file (APPEND ${contents_file} "\"type\": \"file\",\n") + indent () + file (APPEND ${contents_file} "\"name\": \"${name}\"\n") + math (EXPR level "${level} - 1") + indent () + file (APPEND ${contents_file} "}") + set (first 0) +endforeach () +if (${level} GREATER 1) + end_entry () +endif () +file (APPEND ${contents_file} "\n]\n") -- cgit v1.2.3