[openrtm-commit:00755] r2344 - in trunk/OpenRTM-aist/win32/OpenRTM-aist/installer: . OpenCV2.3

openrtm @ openrtm.org openrtm @ openrtm.org
2012年 3月 8日 (木) 23:35:15 JST


Author: kurihara
Date: 2012-03-08 23:35:14 +0900 (Thu, 08 Mar 2012)
New Revision: 2344

Added:
   trunk/OpenRTM-aist/win32/OpenRTM-aist/installer/OpenCV2.3/
   trunk/OpenRTM-aist/win32/OpenRTM-aist/installer/OpenCV2.3/OpenCV23_inc.wxs.in
   trunk/OpenRTM-aist/win32/OpenRTM-aist/installer/OpenCV2.3/opencvwxs.py
Log:
Now, the OpenCV2.3 has been installed by OpenRTM-aist installer. refs #2378

Added: trunk/OpenRTM-aist/win32/OpenRTM-aist/installer/OpenCV2.3/OpenCV23_inc.wxs.in
===================================================================
--- trunk/OpenRTM-aist/win32/OpenRTM-aist/installer/OpenCV2.3/OpenCV23_inc.wxs.in	                        (rev 0)
+++ trunk/OpenRTM-aist/win32/OpenRTM-aist/installer/OpenCV2.3/OpenCV23_inc.wxs.in	2012-03-08 14:35:14 UTC (rev 2344)
@@ -0,0 +1,230 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Include xmlns="http://schemas.microsoft.com/wix/2006/wi">
+  <!-- root directory -->		
+  <Directory Id="OpenCVRoot" Name="OpenCV2.3">
+    <Component Id="OpenCV" Guid="{% OpenCV.GUID %}">
+	  <Environment Id="OPENCV_DIR" Name="OpenCV_DIR" Action="set"
+		           System="yes" Value="[OpenCVRoot]" />
+	    {% for file in OpenCV.Files %}
+	      <File Id="{% file.Id %}" Name="{% file.Name %}"
+	            DiskId="1" Source="{% file.Source %}">
+	      </File>
+	    {% endfor %}
+    </Component>
+      
+    <!-- bin -->
+    <Directory Id="OpenCV_bin" Name="bin">
+      <Component Id="OpenCVBin" Guid="{% OpenCVBin.GUID %}">
+	    <Environment Id="OpenCVUpdatePath" Name="PATH" Action="set"
+			         System="yes" Part="last"
+			         Value="[OpenCV_bin]" />
+	      {% for file in OpenCVBin.Files %}
+	        <File Id="{% file.Id %}" Name="{% file.Name %}"
+		          DiskId="1" Source="{% file.Source %}">
+	        </File>
+	      {% endfor %}
+      </Component>
+    </Directory>
+
+    <!-- gpu -->
+    <Directory Id="OpenCV_gpu" Name="gpu">
+      <Directory Id="OpenCV_gpu_x86" Name="x86">
+		<Directory Id="OpenCV_gpu_x86_bin" Name="bin">
+		  <Component Id="OpenCVGpuX86Bin" Guid="{% OpenCVGpuX86Bin.GUID %}">
+			{% for file in OpenCVGpuX86Bin.Files %}
+			<File Id="{% file.Id %}" Name="{% file.Name %}"
+				  DiskId="1" Source="{% file.Source %}">
+			</File>
+			{% endfor %}
+		  </Component>
+		</Directory>
+		<Directory Id="OpenCV_gpu_x86_lib" Name="lib">
+		  <Component Id="OpenCVGpuX86Lib" Guid="{% OpenCVGpuX86Lib.GUID %}">
+			{% for file in OpenCVGpuX86Lib.Files %}
+			<File Id="{% file.Id %}" Name="{% file.Name %}"
+				  DiskId="1" Source="{% file.Source %}">
+			</File>
+			{% endfor %}
+		  </Component>
+		</Directory>
+      </Directory>
+    </Directory>
+      
+    <!-- include -->
+    <Directory Id="OpenCV_include" Name="include">
+      <Directory Id="OpenCV_include_opencv" Name="opencv">
+        <Component Id="OpenCVIncludeOpencv" Guid="{% OpenCVIncludeOpencv.GUID %}">
+	      {% for file in OpenCVIncludeOpencv.Files %}
+	        <File Id="{% file.Id %}" Name="{% file.Name %}"
+		          DiskId="1" Source="{% file.Source %}">
+	        </File>
+	      {% endfor %}
+        </Component>
+      </Directory>
+      <Directory Id="OpenCV_include_opencv2" Name="opencv2">
+        <Component Id="OpenCVIncludeOpencv2" Guid="{% OpenCVIncludeOpencv2.GUID %}">
+	      {% for file in OpenCVIncludeOpencv2.Files %}
+	      <File Id="{% file.Id %}" Name="{% file.Name %}"
+		        DiskId="1" Source="{% file.Source %}">
+	      </File>
+	      {% endfor %}
+        </Component>
+		<Directory Id="OpenCV_include_opencv2_calib3d" Name="calib3d">
+          <Component Id="OpenCVIncludeOpencv2Calib3d" Guid="{% OpenCVIncludeOpencv2Calib3d.GUID %}">
+			{% for file in OpenCVIncludeOpencv2Calib3d.Files %}
+			<File Id="{% file.Id %}" Name="{% file.Name %}"
+		          DiskId="1" Source="{% file.Source %}">
+			</File>
+			{% endfor %}
+          </Component>
+		</Directory>
+		<Directory Id="OpenCV_include_opencv2_contrib" Name="contrib">
+          <Component Id="OpenCVIncludeOpencv2Contrib" Guid="{% OpenCVIncludeOpencv2Contrib.GUID %}">
+			{% for file in OpenCVIncludeOpencv2Contrib.Files %}
+			<File Id="{% file.Id %}" Name="{% file.Name %}"
+		          DiskId="1" Source="{% file.Source %}">
+			</File>
+			{% endfor %}
+          </Component>
+		</Directory>
+		<Directory Id="OpenCV_include_opencv2_core" Name="core">
+          <Component Id="OpenCVIncludeOpencv2Core" Guid="{% OpenCVIncludeOpencv2Core.GUID %}">
+			{% for file in OpenCVIncludeOpencv2Core.Files %}
+			<File Id="{% file.Id %}" Name="{% file.Name %}"
+		          DiskId="1" Source="{% file.Source %}">
+			</File>
+			{% endfor %}
+          </Component>
+		</Directory>
+		<Directory Id="OpenCV_include_opencv2_features2d" Name="features2d">
+          <Component Id="OpenCVIncludeOpencv2Features2d" Guid="{% OpenCVIncludeOpencv2Features2d.GUID %}">
+			{% for file in OpenCVIncludeOpencv2Features2d.Files %}
+			<File Id="{% file.Id %}" Name="{% file.Name %}"
+		          DiskId="1" Source="{% file.Source %}">
+			</File>
+			{% endfor %}
+          </Component>
+		</Directory>
+		<Directory Id="OpenCV_include_opencv2_flann" Name="flann">
+          <Component Id="OpenCVIncludeOpencv2Flann" Guid="{% OpenCVIncludeOpencv2Flann.GUID %}">
+			{% for file in OpenCVIncludeOpencv2Flann.Files %}
+			<File Id="{% file.Id %}" Name="{% file.Name %}"
+		          DiskId="1" Source="{% file.Source %}">
+			</File>
+			{% endfor %}
+          </Component>
+		</Directory>
+		<Directory Id="OpenCV_include_opencv2_gpu" Name="gpu">
+          <Component Id="OpenCVIncludeOpencv2Gpu" Guid="{% OpenCVIncludeOpencv2Gpu.GUID %}">
+			{% for file in OpenCVIncludeOpencv2Gpu.Files %}
+			<File Id="{% file.Id %}" Name="{% file.Name %}"
+		          DiskId="1" Source="{% file.Source %}">
+			</File>
+			{% endfor %}
+          </Component>
+		</Directory>
+		<Directory Id="OpenCV_include_opencv2_highgui" Name="highgui">
+          <Component Id="OpenCVIncludeOpencv2Highgui" Guid="{% OpenCVIncludeOpencv2Highgui.GUID %}">
+			{% for file in OpenCVIncludeOpencv2Highgui.Files %}
+			<File Id="{% file.Id %}" Name="{% file.Name %}"
+		          DiskId="1" Source="{% file.Source %}">
+			</File>
+			{% endfor %}
+          </Component>
+		</Directory>
+		<Directory Id="OpenCV_include_opencv2_imgproc" Name="imgproc">
+          <Component Id="OpenCVIncludeOpencv2Imgproc" Guid="{% OpenCVIncludeOpencv2Imgproc.GUID %}">
+			{% for file in OpenCVIncludeOpencv2Imgproc.Files %}
+			<File Id="{% file.Id %}" Name="{% file.Name %}"
+		          DiskId="1" Source="{% file.Source %}">
+			</File>
+			{% endfor %}
+          </Component>
+		</Directory>
+		<Directory Id="OpenCV_include_opencv2_legacy" Name="legacy">
+          <Component Id="OpenCVIncludeOpencv2Legacy" Guid="{% OpenCVIncludeOpencv2Legacy.GUID %}">
+			{% for file in OpenCVIncludeOpencv2Legacy.Files %}
+			<File Id="{% file.Id %}" Name="{% file.Name %}"
+		          DiskId="1" Source="{% file.Source %}">
+			</File>
+			{% endfor %}
+          </Component>
+		</Directory>
+		<Directory Id="OpenCV_include_opencv2_ml" Name="ml">
+          <Component Id="OpenCVIncludeOpencv2Ml" Guid="{% OpenCVIncludeOpencv2Ml.GUID %}">
+			{% for file in OpenCVIncludeOpencv2Ml.Files %}
+			<File Id="{% file.Id %}" Name="{% file.Name %}"
+		          DiskId="1" Source="{% file.Source %}">
+			</File>
+			{% endfor %}
+          </Component>
+		</Directory>
+		<Directory Id="OpenCV_include_opencv2_objdetect" Name="objdetect">
+          <Component Id="OpenCVIncludeOpencv2Objdetect" Guid="{% OpenCVIncludeOpencv2Objdetect.GUID %}">
+			{% for file in OpenCVIncludeOpencv2Objdetect.Files %}
+			<File Id="{% file.Id %}" Name="{% file.Name %}"
+		          DiskId="1" Source="{% file.Source %}">
+			</File>
+			{% endfor %}
+          </Component>
+		</Directory>
+		<Directory Id="OpenCV_include_opencv2_ts" Name="ts">
+          <Component Id="OpenCVIncludeOpencv2Ts" Guid="{% OpenCVIncludeOpencv2Ts.GUID %}">
+			{% for file in OpenCVIncludeOpencv2Ts.Files %}
+			<File Id="{% file.Id %}" Name="{% file.Name %}"
+		          DiskId="1" Source="{% file.Source %}">
+			</File>
+			{% endfor %}
+          </Component>
+		</Directory>
+		<Directory Id="OpenCV_include_opencv2_video" Name="video">
+          <Component Id="OpenCVIncludeOpencv2Video" Guid="{% OpenCVIncludeOpencv2Video.GUID %}">
+			{% for file in OpenCVIncludeOpencv2Video.Files %}
+			<File Id="{% file.Id %}" Name="{% file.Name %}"
+		          DiskId="1" Source="{% file.Source %}">
+			</File>
+			{% endfor %}
+          </Component>
+		</Directory>
+      </Directory>
+    </Directory>
+
+      
+    <!-- lib -->
+    <Directory Id="OpenCV_lib" Name="lib">
+      <Component Id="OpenCVLib" Guid="{% OpenCVLib.GUID %}">
+	    {% for file in OpenCVLib.Files %}
+	      <File Id="{% file.Id %}" Name="{% file.Name %}"
+		        DiskId="1" Source="{% file.Source %}">
+	      </File>
+	    {% endfor %}
+      </Component>
+    </Directory>
+    <!-- end of lib -->
+
+    <!-- staticlib -->
+    <Directory Id="OpenCV_staticlib" Name="staticlib">
+      <Component Id="OpenCVStaticlib" Guid="{% OpenCVStaticlib.GUID %}">
+	    {% for file in OpenCVStaticlib.Files %}
+	      <File Id="{% file.Id %}" Name="{% file.Name %}"
+		        DiskId="1" Source="{% file.Source %}">
+	      </File>
+	    {% endfor %}
+      </Component>
+    </Directory>
+    <!-- end of lib -->
+
+    <!-- doc -->
+    <Directory Id="OpenCV_doc" Name="doc">
+      <Component Id="OpenCVDoc" Guid="{% OpenCVDoc.GUID %}">
+	    {% for file in OpenCVDoc.Files %}
+	      <File Id="{% file.Id %}" Name="{% file.Name %}"
+		        DiskId="1" Source="{% file.Source %}">
+	      </File>
+	    {% endfor %}
+      </Component>
+    </Directory>
+    <!-- end of doc -->
+  </Directory>
+</Include>
+

Added: trunk/OpenRTM-aist/win32/OpenRTM-aist/installer/OpenCV2.3/opencvwxs.py
===================================================================
--- trunk/OpenRTM-aist/win32/OpenRTM-aist/installer/OpenCV2.3/opencvwxs.py	                        (rev 0)
+++ trunk/OpenRTM-aist/win32/OpenRTM-aist/installer/OpenCV2.3/opencvwxs.py	2012-03-08 14:35:14 UTC (rev 2344)
@@ -0,0 +1,107 @@
+#!/usr/bin/env python
+#
+# @brief WiX wxs file generator for omniORB
+# @date $Date$
+# @author Norkai Ando <n-ando at aist.go.jp>
+#
+# Copyright (C) 2010
+#     Noriaki Ando
+#     Intelligent Systems Research Institute,
+#     National Institute of
+#         Advanced Industrial Science and Technology (AIST), Japan
+#     All rights reserved.
+#
+# $Id$
+#
+
+OpenCV_files = "README OpenCVConfig.cmake"
+
+data = [
+    ("",                OpenCV_files),
+    ("bin",             "*.dll"),
+    ("gpu/x86/bin",     "*.dll"),
+    ("gpu/x86/lib",     "*.lib"),
+    ("include/opencv",  "*.h *.hpp"),
+    ("include/opencv2", "*.h *.hpp"),
+    ("include/opencv2/calib3d", "*.h *.hpp"),
+    ("include/opencv2/contrib", "*.h *.hpp"),
+    ("include/opencv2/core", "*.h *.hpp"),
+    ("include/opencv2/features2d", "*.h *.hpp"),
+    ("include/opencv2/flann", "*.h *.hpp"),
+    ("include/opencv2/gpu", "*.h *.hpp"),
+    ("include/opencv2/highgui", "*.h *.hpp"),
+    ("include/opencv2/imgproc", "*.h *.hpp"),
+    ("include/opencv2/legacy", "*.h *.hpp"),
+    ("include/opencv2/ml", "*.h *.hpp"),
+    ("include/opencv2/objdetect", "*.h *.hpp"),
+    ("include/opencv2/ts", "*.h *.hpp"),
+    ("include/opencv2/video", "*.h *.hpp"),
+    ("lib",             "*.lib"),
+    ("staticlib",             "*.lib"),
+    ("doc",             "license.txt *.pdf")
+]
+
+import os
+base_dir = os.getenv("OPENCV_ROOT")
+base_dir = base_dir.replace("\"", "")
+
+if base_dir == None:
+    base_dir="C:\\distribution\\OpenCV2.3"
+else:
+    base_dir += "\\"
+
+def path_to_dir_id(path, prefix):
+    # path = "bin/x86_win32" prefix = "omni"
+    # output = "omni_bin_x86_win32"
+    # "." -> "_"
+    output = prefix + "_" + "_".join(path.split("/"))
+    return output.replace(".", "_")
+
+
+def path_to_comp_id(path, prefix):
+    # path = "bin/x86_win32" prefix = "omni"
+    # output = "OmniBinX86_win32"
+    # "." -> "_"
+    output = prefix
+    for c in path.split("/"):
+        output += c.capitalize()
+    return output.replace(".", "_")
+
+import makewxs
+
+for (path, files) in data:
+    # wxs component name
+    comp_name = path_to_comp_id(path, "OpenCV")
+    # wxs directory name
+    dir_name = path_to_dir_id(path, "OpenCV")
+
+    path = path.replace("/", "\\")
+
+    # full path to target directory
+    full_path = base_dir + "\\\\" + path
+
+    import glob
+    flist = []
+    for f in files.split(" "):
+        flist += glob.glob(full_path + "\\" + f)
+
+    cmd = ["flist",
+           "-c", comp_name,
+           "-o", dir_name + ".yaml",
+           "-p",  base_dir + path]
+    cmd += flist
+
+    makewxs.main(cmd)
+
+import re
+if None != re.search('2\.3',base_dir):
+    cmd = ["wxs",
+           "-o", "OpenCV_inc.wxs",
+           "-i", "OpenCV23_inc.wxs.in"]
+else:
+    cmd = ["wxs",
+           "-o", "OpenCV_inc.wxs",
+           "-i", "OpenCV23_inc.wxs.in"]
+
+cmd += glob.glob("*.yaml")
+makewxs.main(cmd)



openrtm-commit メーリングリストの案内