[openrtm-commit:00123] r2148 - in branches/RELENG_1_1/OpenRTM-aist: build win32/OpenRTM-aist win32/OpenRTM-aist/etc
openrtm @ openrtm.org
openrtm @ openrtm.org
2011年 5月 28日 (土) 01:07:39 JST
Author: n-ando
Date: 2011-05-28 01:07:39 +0900 (Sat, 28 May 2011)
New Revision: 2148
Added:
branches/RELENG_1_1/OpenRTM-aist/build/vsprops2cmake.py
Modified:
branches/RELENG_1_1/OpenRTM-aist/build/Makefile.am
branches/RELENG_1_1/OpenRTM-aist/win32/OpenRTM-aist/autobuild_vc10.bat
branches/RELENG_1_1/OpenRTM-aist/win32/OpenRTM-aist/autobuild_vc8.bat
branches/RELENG_1_1/OpenRTM-aist/win32/OpenRTM-aist/autobuild_vc9.bat
branches/RELENG_1_1/OpenRTM-aist/win32/OpenRTM-aist/etc/etc.yaml
Log:
rtm_config.cmake and its generator tool have been introduced.
Modified: branches/RELENG_1_1/OpenRTM-aist/build/Makefile.am
===================================================================
--- branches/RELENG_1_1/OpenRTM-aist/build/Makefile.am 2011-05-27 15:40:30 UTC (rev 2147)
+++ branches/RELENG_1_1/OpenRTM-aist/build/Makefile.am 2011-05-27 16:07:39 UTC (rev 2148)
@@ -16,6 +16,7 @@
makedeffile.py \
slntool.py \
vcprojtool.py \
+ vsprops2cmake.py \
makewxs.py \
makewrapper.pl \
makewrapper.py \
Added: branches/RELENG_1_1/OpenRTM-aist/build/vsprops2cmake.py
===================================================================
--- branches/RELENG_1_1/OpenRTM-aist/build/vsprops2cmake.py (rev 0)
+++ branches/RELENG_1_1/OpenRTM-aist/build/vsprops2cmake.py 2011-05-27 16:07:39 UTC (rev 2148)
@@ -0,0 +1,44 @@
+#!/usr/bin/env python
+
+from xml.dom import minidom, Node
+import sys
+import re
+import os
+
+if __name__ == '__main__':
+ if len(sys.argv) < 2:
+ print "please specify vsprops file"
+ sys.exit(1)
+
+ fname = sys.argv[1]
+ if fname.split(".")[-1] != "vsprops":
+ print "please specify vsprops file"
+ sys.exit(1)
+
+ f = file(sys.argv[1], "r")
+ text = f.read().replace("shift_jis", "utf-8")
+ f.close()
+
+ doc = minidom.parseString(text)
+
+ cmakefname = fname.replace(".vsprops", ".cmake")
+ cf = file(cmakefname, "w")
+
+ for node in doc.getElementsByTagName('UserMacro'):
+ name = node.getAttribute("Name")
+ value = node.getAttribute("Value")
+
+ # escape backslash
+ value = value.replace("\\", "\\\\")
+ # escape quote
+ value = re.sub("\"", "\\\"", value)
+ # replace environment variable specifier
+ value = re.sub("\%(.*?)\%", "$ENV{\\1}", value)
+ # repalce variable expression (vsprops->cmake)
+ value = re.sub("\$\((.*?)\)", "${\\1}", value)
+ # keep solution directory variable
+ value = re.sub("{SolutionDir}", "(SolutionDir)", value)
+
+ cf.write("set (" + name + " \"" + value + "\")\n")
+
+ cf.close()
Modified: branches/RELENG_1_1/OpenRTM-aist/win32/OpenRTM-aist/autobuild_vc10.bat
===================================================================
--- branches/RELENG_1_1/OpenRTM-aist/win32/OpenRTM-aist/autobuild_vc10.bat 2011-05-27 15:40:30 UTC (rev 2147)
+++ branches/RELENG_1_1/OpenRTM-aist/win32/OpenRTM-aist/autobuild_vc10.bat 2011-05-27 16:07:39 UTC (rev 2148)
@@ -1,52 +1,64 @@
- at rem
- at rem @brief Visual Studio automatic build script
- at rem @date $Date: 2008-03-06 06:55:42 $
- at rem @author Norkai Ando <n-ando at aist.go.jp>
- at rem
- at rem Copyright (C) 2008-2010
- at rem Noriaki Ando
- at rem Task-intelligence Research Group,
- at rem Intelligent Systems Research Institute,
- at rem National Institute of
- at rem Advanced Industrial Science and Technology (AIST), Japan
- at rem All rights reserved.
- at rem
- at rem $Id: autobuild_vc10.bat 726 2008-05-14 03:05:42Z n-ando $
- at rem
-
- at rem ------------------------------------------------------------
- at rem Notice:
- at rem omniORB should be under the following OMNI_ROOT directory.
- at rem RTSE should be under the following OMNI_ROOT directory.
- at rem ------------------------------------------------------------
- at set RTM_ROOT=%~dp0
- at set PATH="C:\Program Files\Microsoft Visual Studio 10.0\VC\vcpackages";%PATH%
- at set OMNI_ROOT=C:\distribution\omniORB-4.1.4_vc10
- at set RTSE_ROOT=C:\distribution\OpenRTP\RTSystemEditor
- at set VC_VERSION=Visual C++ 2010
-
- at rem ============================================================
- at rem copy property sheet
- at rem ============================================================
-copy etc\rtm_config_omni414.vsprops rtm_config.vsprops
-copy etc\rtm_config_omni414.props rtm_config.props
-copy etc\rtm_config_omni414.props examples\USBCamera\rtm_config.props
-copy coil_config.props examples\USBCamera\coil_config.props
-
- at rem ============================================================
- at rem build OpenRTM-aist
- at rem ============================================================
-
-msbuild /M:2 /t:rebuild /p:configuration=debug OpenRTM-aist_vc10.sln
-msbuild /M:2 /t:rebuild /p:configuration=release OpenRTM-aist_vc10.sln
-
- at rem ============================================================
- at rem build USBCamera examples
- at rem ============================================================
-msbuild /M:2 /t:rebuild /p:configuration=debug examples\USBCamera\USBCamera_vc10.sln
-msbuild /M:2 /t:rebuild /p:configuration=release examples\USBCamera\USBCamera_vc10.sln
-
-cd installer
-call autowix.cmd
-cd ..
-
+ at rem
+ at rem @brief Visual Studio automatic build script
+ at rem @date $Date: 2008-03-06 06:55:42 $
+ at rem @author Norkai Ando <n-ando at aist.go.jp>
+ at rem
+ at rem Copyright (C) 2008-2010
+ at rem Noriaki Ando
+ at rem Task-intelligence Research Group,
+ at rem Intelligent Systems Research Institute,
+ at rem National Institute of
+ at rem Advanced Industrial Science and Technology (AIST), Japan
+ at rem All rights reserved.
+ at rem
+ at rem $Id: autobuild_vc10.bat 726 2008-05-14 03:05:42Z n-ando $
+ at rem
+
+ at rem ------------------------------------------------------------
+ at rem Notice:
+ at rem omniORB should be under the following OMNI_ROOT directory.
+ at rem RTSE should be under the following OMNI_ROOT directory.
+ at rem ------------------------------------------------------------
+ at set RTM_ROOT=%~dp0
+ at set PATH="C:\Program Files\Microsoft Visual Studio 10.0\VC\vcpackages";%PATH%
+ at set OMNI_ROOT=C:\distribution\omniORB-4.1.4_vc10
+ at set RTSE_ROOT=C:\distribution\OpenRTP\RTSystemEditor
+ at set VC_VERSION=Visual C++ 2010
+
+ at rem ============================================================
+ at rem copy property sheet
+ at rem ============================================================
+copy etc\rtm_config_omni414.vsprops rtm_config.vsprops
+copy etc\rtm_config_omni414.props rtm_config.props
+copy etc\rtm_config_omni414.props examples\USBCamera\rtm_config.props
+copy coil_config.props examples\USBCamera\coil_config.props
+
+ at rem ============================================================
+ at rem convert property sheet to cmake
+ at rem ============================================================
+if not exist rtm_config.cmake (
+
+ set TMP_PYTHONPATH=%PYTHONPATH%
+ set PYTHONPATH=./bin;%PYTHONPATH%
+ echo Generating cmake file
+ build\vsprops2cmake.py rtm_config.vsprops
+ set PYTHONPATH=%TMP_PYTHONPATH%
+)
+
+ at rem ============================================================
+ at rem build OpenRTM-aist
+ at rem ============================================================
+
+msbuild /M:2 /t:rebuild /p:configuration=debug OpenRTM-aist_vc10.sln
+msbuild /M:2 /t:rebuild /p:configuration=release OpenRTM-aist_vc10.sln
+
+ at rem ============================================================
+ at rem build USBCamera examples
+ at rem ============================================================
+msbuild /M:2 /t:rebuild /p:configuration=debug examples\USBCamera\USBCamera_vc10.sln
+msbuild /M:2 /t:rebuild /p:configuration=release examples\USBCamera\USBCamera_vc10.sln
+
+cd installer
+call autowix.cmd
+cd ..
+
Modified: branches/RELENG_1_1/OpenRTM-aist/win32/OpenRTM-aist/autobuild_vc8.bat
===================================================================
--- branches/RELENG_1_1/OpenRTM-aist/win32/OpenRTM-aist/autobuild_vc8.bat 2011-05-27 15:40:30 UTC (rev 2147)
+++ branches/RELENG_1_1/OpenRTM-aist/win32/OpenRTM-aist/autobuild_vc8.bat 2011-05-27 16:07:39 UTC (rev 2148)
@@ -33,6 +33,18 @@
copy etc\rtm_config_omni414.vsprops rtm_config.vsprops
@rem ============================================================
+ at rem convert property sheet to cmake
+ at rem ============================================================
+if not exist rtm_config.cmake (
+
+ set TMP_PYTHONPATH=%PYTHONPATH%
+ set PYTHONPATH=./bin;%PYTHONPATH%
+ echo Generating cmake file
+ build\vsprops2cmake.py rtm_config.vsprops
+ set PYTHONPATH=%TMP_PYTHONPATH%
+)
+
+ at rem ============================================================
@rem build OpenRTM-aist
@rem ============================================================
Modified: branches/RELENG_1_1/OpenRTM-aist/win32/OpenRTM-aist/autobuild_vc9.bat
===================================================================
--- branches/RELENG_1_1/OpenRTM-aist/win32/OpenRTM-aist/autobuild_vc9.bat 2011-05-27 15:40:30 UTC (rev 2147)
+++ branches/RELENG_1_1/OpenRTM-aist/win32/OpenRTM-aist/autobuild_vc9.bat 2011-05-27 16:07:39 UTC (rev 2148)
@@ -33,6 +33,18 @@
copy etc\rtm_config_omni414.vsprops rtm_config.vsprops
@rem ============================================================
+ at rem convert property sheet to cmake
+ at rem ============================================================
+if not exist rtm_config.cmake (
+
+ set TMP_PYTHONPATH=%PYTHONPATH%
+ set PYTHONPATH=./bin;%PYTHONPATH%
+ echo Generating cmake file
+ build\vsprops2cmake.py rtm_config.vsprops
+ set PYTHONPATH=%TMP_PYTHONPATH%
+)
+
+ at rem ============================================================
@rem build OpenRTM-aist
@rem ============================================================
Modified: branches/RELENG_1_1/OpenRTM-aist/win32/OpenRTM-aist/etc/etc.yaml
===================================================================
--- branches/RELENG_1_1/OpenRTM-aist/win32/OpenRTM-aist/etc/etc.yaml 2011-05-27 15:40:30 UTC (rev 2147)
+++ branches/RELENG_1_1/OpenRTM-aist/win32/OpenRTM-aist/etc/etc.yaml 2011-05-27 16:07:39 UTC (rev 2148)
@@ -17,3 +17,7 @@
ShortName: rtc.con
Name: rtc.conf.sample
Source: ..\\etc\\rtc.conf.sample
+ - Id: Etc0005
+ ShortName: rtm_c000.cma
+ Name: rtm_config.cmake
+ Source: ..\\rtm_config.cmake
openrtm-commit メーリングリストの案内