From a182649fa7a0daebc8858c11a40cc8484fc7f456 Mon Sep 17 00:00:00 2001 From: Dirk Thomas Date: Wed, 11 Apr 2018 11:53:46 -0700 Subject: [PATCH 1/5] use Connext 5.3.1 --- linux_docker_resources/Dockerfile | 2 +- linux_docker_resources/entry_point.sh | 2 +- ros2_batch_job/linux_batch/__init__.py | 2 +- ros2_batch_job/osx_batch/__init__.py | 2 +- ros2_batch_job/windows_batch/__init__.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/linux_docker_resources/Dockerfile b/linux_docker_resources/Dockerfile index 35b8b1d66..590ea6951 100644 --- a/linux_docker_resources/Dockerfile +++ b/linux_docker_resources/Dockerfile @@ -52,7 +52,7 @@ RUN if test ${PLATFORM} = x86; then apt-get update && apt-get install --no-insta RUN pip3 install pexpect # Get and install the RTI web binaries. -RUN cd /tmp && curl --silent https://s3.amazonaws.com/RTI/Bundles/5.3.0/Evaluation/rti_connext_dds_secure-5.3.0-eval-x64Linux3gcc5.4.0.tar.gz | tar -xz +RUN cd /tmp && curl --silent https://s3.amazonaws.com/RTI/Bundles/5.3.1/Evaluation/rti_connext_dds_secure-5.3.1-eval-x64Linux3gcc5.4.0.tar.gz | tar -xz ADD rti_web_binaries_install_script.py /tmp/rti_web_binaries_install_script.py # Add the RTI license file. diff --git a/linux_docker_resources/entry_point.sh b/linux_docker_resources/entry_point.sh index 81a84a9a9..d3ed838aa 100644 --- a/linux_docker_resources/entry_point.sh +++ b/linux_docker_resources/entry_point.sh @@ -32,7 +32,7 @@ case "${CI_ARGS}" in ;; *) echo "Installing Connext binaries off RTI website..." - python3 -u /tmp/rti_web_binaries_install_script.py /tmp/rti_connext_dds-5.3.0-eval-x64Linux3gcc5.4.0.run /home/rosbuild/rti_connext_dds-5.3.0 --rtipkg_paths /tmp/rti_security_plugins-5.3.0-eval-x64Linux3gcc5.4.0.rtipkg + python3 -u /tmp/rti_web_binaries_install_script.py /tmp/rti_connext_dds-5.3.1-eval-x64Linux3gcc5.4.0.run /home/rosbuild/rti_connext_dds-5.3.1 --rtipkg_paths /tmp/rti_security_plugins-5.3.1-eval-x64Linux3gcc5.4.0.rtipkg if [ $? -ne 0 ] then echo "Connext not installed correctly (maybe you're on an ARM machine?)." >&2 diff --git a/ros2_batch_job/linux_batch/__init__.py b/ros2_batch_job/linux_batch/__init__.py index a8ec5b6de..1a259c883 100644 --- a/ros2_batch_job/linux_batch/__init__.py +++ b/ros2_batch_job/linux_batch/__init__.py @@ -62,7 +62,7 @@ def setup_env(self): if self.args.connext: # Try to find the connext env file to later source it connext_env_file = os.path.join( - os.path.expanduser('~'), 'rti_connext_dds-5.3.0', 'resource', 'scripts', + os.path.expanduser('~'), 'rti_connext_dds-5.3.1', 'resource', 'scripts', 'rtisetenv_x64Linux3gcc5.4.0.bash') if os.path.exists(connext_env_file): diff --git a/ros2_batch_job/osx_batch/__init__.py b/ros2_batch_job/osx_batch/__init__.py index 0108cf347..1f9ef8e1d 100644 --- a/ros2_batch_job/osx_batch/__init__.py +++ b/ros2_batch_job/osx_batch/__init__.py @@ -73,7 +73,7 @@ def setup_env(self): if self.args.connext: # Try to find the connext env file and source it connext_env_file = os.path.join( - '/Applications', 'rti_connext_dds-5.3.0', 'resource', 'scripts', + '/Applications', 'rti_connext_dds-5.3.1', 'resource', 'scripts', 'rtisetenv_x64Darwin16clang8.0.bash') if not os.path.exists(connext_env_file): warn("Asked to use Connext but the RTI env was not found at '{0}'".format( diff --git a/ros2_batch_job/windows_batch/__init__.py b/ros2_batch_job/windows_batch/__init__.py index 726201245..15413cd0d 100644 --- a/ros2_batch_job/windows_batch/__init__.py +++ b/ros2_batch_job/windows_batch/__init__.py @@ -44,7 +44,7 @@ def setup_env(self): if self.args.connext: pf = os.environ.get('ProgramFiles', "C:\\Program Files\\") connext_env_file = os.path.join( - pf, 'rti_connext_dds-5.3.0', 'resource', 'scripts', 'rtisetenv_X64Win64VS2015.bat') + pf, 'rti_connext_dds-5.3.1', 'resource', 'scripts', 'rtisetenv_X64Win64VS2017.bat') if not os.path.exists(connext_env_file): warn("Asked to use Connext but the RTI env was not found at '{0}'".format( connext_env_file)) From 1626b0753034b173fea4c1ed84af0fed013c7977 Mon Sep 17 00:00:00 2001 From: Dirk Thomas Date: Wed, 11 Apr 2018 12:07:05 -0700 Subject: [PATCH 2/5] update non-Connext parts to Visual Studio 2017 --- ros2_batch_job/packaging.py | 4 ++-- ros2_batch_job/windows_batch/__init__.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ros2_batch_job/packaging.py b/ros2_batch_job/packaging.py index 9c56f35e6..8566a06f7 100644 --- a/ros2_batch_job/packaging.py +++ b/ros2_batch_job/packaging.py @@ -171,8 +171,8 @@ def exclude(filename): h.add(args.installspace, arcname=folder_name, exclude=exclude) elif args.os == 'windows': archive_path = 'ros2-package-windows-%s.zip' % platform.machine() - # NOTE(esteve): hack to copy our custom built VS2015-compatible OpenCV DLLs - opencv_libdir = os.path.join(os.environ['OpenCV_DIR'], 'x64', 'vc14', 'bin') + # NOTE(esteve): hack to copy our custom built VS2017-compatible OpenCV DLLs + opencv_libdir = os.path.join(os.environ['OpenCV_DIR'], 'x64', 'vc15', 'bin') for libpath in glob.glob('%s/*.dll' % opencv_libdir): shutil.copy(libpath, os.path.join(args.installspace, 'bin', os.path.basename(libpath))) with zipfile.ZipFile(archive_path, 'w') as zf: diff --git a/ros2_batch_job/windows_batch/__init__.py b/ros2_batch_job/windows_batch/__init__.py index 15413cd0d..3533e971b 100644 --- a/ros2_batch_job/windows_batch/__init__.py +++ b/ros2_batch_job/windows_batch/__init__.py @@ -67,8 +67,8 @@ def setup_env(self): f.write("@echo off" + os.linesep) f.write( 'call ' - '"C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\vcvarsall.bat" ' - 'x86_amd64 8.1' + os.linesep) + '"C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Auxiliary\\Build\\vcvarsall.bat" ' + 'x86_amd64' + os.linesep) if connext_env_file is not None: f.write('call "%s"%s' % (connext_env_file, os.linesep)) if opensplice_env_file is not None: From 2d50aed6145a8e0b22155859744e955d4b247e8c Mon Sep 17 00:00:00 2001 From: Dirk Thomas Date: Wed, 11 Apr 2018 13:56:56 -0700 Subject: [PATCH 3/5] fix case of Connext script --- ros2_batch_job/windows_batch/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ros2_batch_job/windows_batch/__init__.py b/ros2_batch_job/windows_batch/__init__.py index 3533e971b..47ba57def 100644 --- a/ros2_batch_job/windows_batch/__init__.py +++ b/ros2_batch_job/windows_batch/__init__.py @@ -44,7 +44,7 @@ def setup_env(self): if self.args.connext: pf = os.environ.get('ProgramFiles', "C:\\Program Files\\") connext_env_file = os.path.join( - pf, 'rti_connext_dds-5.3.1', 'resource', 'scripts', 'rtisetenv_X64Win64VS2017.bat') + pf, 'rti_connext_dds-5.3.1', 'resource', 'scripts', 'rtisetenv_x64Win64VS2017.bat') if not os.path.exists(connext_env_file): warn("Asked to use Connext but the RTI env was not found at '{0}'".format( connext_env_file)) From 479d6fb0c8dd7e74e2ef169ed736b4f953ef0d2c Mon Sep 17 00:00:00 2001 From: dhood Date: Fri, 13 Apr 2018 10:56:43 -0700 Subject: [PATCH 4/5] Support additional option in connext installer --- .../rti_web_binaries_install_script.py | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/linux_docker_resources/rti_web_binaries_install_script.py b/linux_docker_resources/rti_web_binaries_install_script.py index 05ac0c7c0..788df54eb 100644 --- a/linux_docker_resources/rti_web_binaries_install_script.py +++ b/linux_docker_resources/rti_web_binaries_install_script.py @@ -36,11 +36,18 @@ def install_connext(installer_path, install_directory): child.sendline(install_directory) child.expect_exact('Do you want to continue? [Y/n]:') child.sendline('y') - result_index = child.expect_exact([ - 'Create an RTI Launcher shortcut on the Desktop [y/N]: ', pexpect.EOF], timeout=120) - if result_index == 0: - child.sendline('n') - child.expect(pexpect.EOF) + while True: + result_index = child.expect_exact([ + pexpect.EOF, + 'Disable copying of examples to rti_workspace [y/N]: ', + 'Create an RTI Launcher shortcut on the Desktop [y/N]: ', + ], timeout=120) + if result_index == 0: + return + elif result_index == 1: + child.sendline('y') + elif result_index == 2: + child.sendline('n') except (pexpect.TIMEOUT, pexpect.EOF): raise RuntimeError( From 1523332b8838ccc584b1f98b6d746e52054709a3 Mon Sep 17 00:00:00 2001 From: Dirk Thomas Date: Fri, 13 Apr 2018 14:21:08 -0700 Subject: [PATCH 5/5] add exception for unexpected value --- linux_docker_resources/rti_web_binaries_install_script.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/linux_docker_resources/rti_web_binaries_install_script.py b/linux_docker_resources/rti_web_binaries_install_script.py index 788df54eb..b75a4da2a 100644 --- a/linux_docker_resources/rti_web_binaries_install_script.py +++ b/linux_docker_resources/rti_web_binaries_install_script.py @@ -48,6 +48,8 @@ def install_connext(installer_path, install_directory): child.sendline('y') elif result_index == 2: child.sendline('n') + else: + raise RuntimeError('Unexpected result index: %d' % result_index) except (pexpect.TIMEOUT, pexpect.EOF): raise RuntimeError(