1
1
#
2
+ # Update: 1 May 2023 (still 1.7 dev version)
3
+ #
4
+ # The original intention was to allow an easy way to download the most
5
+ # recent versions of some files.
6
+ #
7
+ # "update-data" would only work once.
8
+ #
9
+ # These locations are no longer being maintained:
10
+ # http://www.aprs.org/aprs11/tocalls.txt -- 14 Dec 2021
11
+ # http://www.aprs.org/symbols/symbols-new.txt -- 17 Mar 2021
12
+ # http://www.aprs.org/symbols/symbolsX.txt -- 25 Nov 2015
13
+ # so there is no reason to provide a capability grab the latest version.
14
+ #
15
+ # Rather than fixing an obsolete capability, it will just be removed.
16
+ #
2
17
# The destination field is often used to identify the manufacturer/model.
3
18
# These are not hardcoded into Dire Wolf. Instead they are read from
4
19
# a file called tocalls.txt at application start up time.
5
20
#
6
21
# The original permanent symbols are built in but the "new" symbols,
7
22
# using overlays, are often updated. These are also read from files.
8
23
#
9
- # You can obtain an updated copy by typing "make data-update".
10
- # This is not part of the normal build process. You have to do this explicitly.
11
- #
12
- # The locations below appear to be the most recent.
13
- # The copy at http://www.aprs.org/tocalls.txt is out of date.
14
- #
24
+
15
25
16
26
include (ExternalProject)
17
27
18
28
set (TOCALLS_TXT "tocalls.txt" )
19
- set (TOCALLS_TXT_BKP "tocalls.txt.old" )
20
- set (TOCALLS_URL "http://www.aprs.org/aprs11/tocalls.txt" )
21
29
set (SYMBOLS-NEW_TXT "symbols-new.txt" )
22
- set (SYMBOLS-NEW_TXT_BKP "symbols-new.txt.old" )
23
- set (SYMBOLS-NEW_URL "http://www.aprs.org/symbols/symbols-new.txt" )
24
30
set (SYMBOLSX_TXT "symbolsX.txt" )
25
- set (SYMBOLSX_TXT_BKP "symbolsX.txt.old" )
26
- set (SYMBOLSX_URL "http://www.aprs.org/symbols/symbolsX.txt" )
27
31
set (CUSTOM_BINARY_DATA_DIR "${CMAKE_BINARY_DIR} /data" )
28
32
29
33
# we can also move to a separate cmake file and use file(download)
@@ -32,63 +36,6 @@ file(COPY "${CUSTOM_DATA_DIR}/${TOCALLS_TXT}" DESTINATION "${CUSTOM_BINARY_DATA_
32
36
file (COPY "${CUSTOM_DATA_DIR} /${SYMBOLS-NEW_TXT}" DESTINATION "${CUSTOM_BINARY_DATA_DIR} " )
33
37
file (COPY "${CUSTOM_DATA_DIR} /${SYMBOLSX_TXT} " DESTINATION "${CUSTOM_BINARY_DATA_DIR} " )
34
38
35
- add_custom_target (data_rename
36
- COMMAND ${CMAKE_COMMAND} -E rename "${CUSTOM_BINARY_DATA_DIR} /${TOCALLS_TXT} " "${CUSTOM_BINARY_DATA_DIR} /${TOCALLS_TXT_BKP} "
37
- COMMAND ${CMAKE_COMMAND} -E rename "${CUSTOM_BINARY_DATA_DIR} /${SYMBOLS-NEW_TXT}" "${CUSTOM_BINARY_DATA_DIR} /${SYMBOLS-NEW_TXT_BKP}"
38
- COMMAND ${CMAKE_COMMAND} -E rename "${CUSTOM_BINARY_DATA_DIR} /${SYMBOLSX_TXT} " "${CUSTOM_BINARY_DATA_DIR} /${SYMBOLSX_TXT_BKP} "
39
- )
40
-
41
- ExternalProject_Add(download_tocalls
42
- DEPENDS data_rename
43
- URL ${TOCALLS_URL}
44
- PREFIX ""
45
- DOWNLOAD_DIR "${CUSTOM_BINARY_DATA_DIR} "
46
- DOWNLOAD_NAME "${TOCALLS_TXT} "
47
- DOWNLOAD_NO_EXTRACT 0
48
- EXCLUDE_FROM_ALL 1
49
- UPDATE_COMMAND ""
50
- PATCH_COMMAND ""
51
- CONFIGURE_COMMAND ""
52
- BUILD_COMMAND ""
53
- INSTALL_COMMAND ""
54
- TEST_COMMAND ""
55
- )
56
-
57
- ExternalProject_Add(download_symbols-new
58
- DEPENDS data_rename
59
- URL ${SYMBOLS-NEW_URL}
60
- PREFIX ""
61
- DOWNLOAD_DIR "${CUSTOM_BINARY_DATA_DIR} "
62
- DOWNLOAD_NAME "${SYMBOLS-NEW_TXT}"
63
- DOWNLOAD_NO_EXTRACT 0
64
- EXCLUDE_FROM_ALL 1
65
- UPDATE_COMMAND ""
66
- PATCH_COMMAND ""
67
- CONFIGURE_COMMAND ""
68
- BUILD_COMMAND ""
69
- INSTALL_COMMAND ""
70
- TEST_COMMAND ""
71
- )
72
-
73
- ExternalProject_Add(download_symbolsx
74
- DEPENDS data_rename
75
- URL ${SYMBOLSX_URL}
76
- PREFIX ""
77
- DOWNLOAD_DIR "${CUSTOM_BINARY_DATA_DIR} "
78
- DOWNLOAD_NAME "${SYMBOLSX_TXT} "
79
- DOWNLOAD_NO_EXTRACT 0
80
- EXCLUDE_FROM_ALL 1
81
- UPDATE_COMMAND ""
82
- PATCH_COMMAND ""
83
- CONFIGURE_COMMAND ""
84
- BUILD_COMMAND ""
85
- INSTALL_COMMAND ""
86
- TEST_COMMAND ""
87
- )
88
-
89
- add_custom_target (update-data)
90
- add_dependencies (update-data data_rename download_tocalls download_symbols-new download_symbolsx)
91
-
92
39
install (FILES "${CUSTOM_BINARY_DATA_DIR} /${TOCALLS_TXT} " DESTINATION ${INSTALL_DATA_DIR} )
93
40
install (FILES "${CUSTOM_BINARY_DATA_DIR} /${SYMBOLS-NEW_TXT}" DESTINATION ${INSTALL_DATA_DIR} )
94
41
install (FILES "${CUSTOM_BINARY_DATA_DIR} /${SYMBOLSX_TXT} " DESTINATION ${INSTALL_DATA_DIR} )
0 commit comments