From 5b83b3cf6d1dae3e075d720b4e0135b957a59242 Mon Sep 17 00:00:00 2001 From: Mahmoud Farshbaf Date: Wed, 23 Feb 2022 10:59:39 +0000 Subject: [PATCH] adding install support --- ros_opcua_impl_python_opcua/CMakeLists.txt | 19 ++++++++++--------- .../scripts/ros_server.py | 2 +- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/ros_opcua_impl_python_opcua/CMakeLists.txt b/ros_opcua_impl_python_opcua/CMakeLists.txt index 68514fa..0ee0332 100644 --- a/ros_opcua_impl_python_opcua/CMakeLists.txt +++ b/ros_opcua_impl_python_opcua/CMakeLists.txt @@ -122,10 +122,13 @@ include_directories( ## Mark executable scripts (Python etc.) for installation ## in contrast to setup.py, you can choose the destination -# install(PROGRAMS -# scripts/my_python_script -# DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} -# ) +install(PROGRAMS + scripts/ros_actions.py + scripts/ros_server.py + scripts/ros_services.py + scripts/ros_topics.py + DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} +) ## Mark executables and/or libraries for installation # install(TARGETS ros_opcua_impl_python_opcua ros_opcua_impl_python_opcua_node @@ -142,11 +145,9 @@ include_directories( # ) ## Mark other files for installation (e.g. launch and bag files, etc.) -# install(FILES -# # myfile1 -# # myfile2 -# DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} -# ) +install(DIRECTORY launch/ + DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/launch + ) ############# ## Testing ## diff --git a/ros_opcua_impl_python_opcua/scripts/ros_server.py b/ros_opcua_impl_python_opcua/scripts/ros_server.py index d382548..951c731 100755 --- a/ros_opcua_impl_python_opcua/scripts/ros_server.py +++ b/ros_opcua_impl_python_opcua/scripts/ros_server.py @@ -1,4 +1,4 @@ -#!/usr/bin/python3 +#!/usr/bin/env python import sys import time