summaryrefslogtreecommitdiffstats
path: root/host
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2011-04-28 22:44:13 -0700
committerJosh Blum <josh@joshknows.com>2011-04-28 22:44:13 -0700
commitf289d03d63b3e8f6009e1635ddcffbb196fb9eba (patch)
tree27308072e0c35c304d604f4eafb4335b2b07c893 /host
parent424462cb99a3c4b12ac8a79ed9bb0670e1426cba (diff)
downloaduhd-f289d03d63b3e8f6009e1635ddcffbb196fb9eba.tar.gz
uhd-f289d03d63b3e8f6009e1635ddcffbb196fb9eba.tar.bz2
uhd-f289d03d63b3e8f6009e1635ddcffbb196fb9eba.zip
usrp2: include dd.exe in windows installers
uhd build system downloads dd.exe from ettus.com so we dont have to check it in
Diffstat (limited to 'host')
-rw-r--r--host/Modules/UHDPackage.cmake2
-rw-r--r--host/utils/CMakeLists.txt11
-rwxr-xr-xhost/utils/usrp2_card_burner.py2
3 files changed, 15 insertions, 0 deletions
diff --git a/host/Modules/UHDPackage.cmake b/host/Modules/UHDPackage.cmake
index 416d89998..c230f1b1e 100644
--- a/host/Modules/UHDPackage.cmake
+++ b/host/Modules/UHDPackage.cmake
@@ -18,6 +18,8 @@
########################################################################
INCLUDE(UHDVersion) #sets version information
+SET(UHD_RELEASE_MODE "${UHD_RELEASE_MODE}" CACHE BOOL "set UHD to release mode to build installers")
+
########################################################################
# Setup additional defines for OS types
########################################################################
diff --git a/host/utils/CMakeLists.txt b/host/utils/CMakeLists.txt
index 98b5d41fb..b2dd697fc 100644
--- a/host/utils/CMakeLists.txt
+++ b/host/utils/CMakeLists.txt
@@ -54,6 +54,17 @@ FOREACH(util_source ${util_share_sources})
ENDFOREACH(util_source)
IF(ENABLE_USRP2)
+ IF(WIN32 AND UHD_RELEASE_MODE) #include dd.exe
+ FILE(DOWNLOAD
+ "http://www.ettus.com/downloads/dd.exe"
+ ${CMAKE_CURRENT_BINARY_DIR}/dd.exe
+ )
+ INSTALL(FILES
+ ${CMAKE_CURRENT_BINARY_DIR}/dd.exe
+ DESTINATION ${PKG_DATA_DIR}/utils
+ COMPONENT utilities
+ )
+ ENDIF(WIN32 AND UHD_RELEASE_MODE)
INSTALL(PROGRAMS
usrp2_recovery.py
usrp2_card_burner.py
diff --git a/host/utils/usrp2_card_burner.py b/host/utils/usrp2_card_burner.py
index 741c7e3e1..b1335dd6a 100755
--- a/host/utils/usrp2_card_burner.py
+++ b/host/utils/usrp2_card_burner.py
@@ -56,6 +56,8 @@ def command(*args):
def get_dd_path():
if platform.system() == 'Windows':
+ dd_path = os.path.join(os.path.dirname(__file__), 'dd.exe')
+ if os.path.exists(dd_path): return dd_path
dd_path = os.path.join(tempfile.gettempdir(), 'dd.exe')
if not os.path.exists(dd_path):
print('Downloading dd.exe to %s'%dd_path)