[openrtm-commit:01415] r2542 - in trunk/OpenRTM-aist: build src/lib/coil/build win32/OpenRTM-aist
openrtm @ openrtm.org
openrtm @ openrtm.org
2014年 3月 29日 (土) 17:37:35 JST
Author: n-ando
Date: 2014-03-29 17:37:35 +0900 (Sat, 29 Mar 2014)
New Revision: 2542
Modified:
trunk/OpenRTM-aist/build/vcxprojtool.py
trunk/OpenRTM-aist/src/lib/coil/build/vcxprojtool.py
trunk/OpenRTM-aist/win32/OpenRTM-aist/build.bat
Log:
[compat,->RELENG_1_1] Build scripts and tools have been updated for windows.
Modified: trunk/OpenRTM-aist/build/vcxprojtool.py
===================================================================
--- trunk/OpenRTM-aist/build/vcxprojtool.py 2014-03-29 08:18:32 UTC (rev 2541)
+++ trunk/OpenRTM-aist/build/vcxprojtool.py 2014-03-29 08:37:35 UTC (rev 2542)
@@ -18,7 +18,7 @@
# Generic vcxproj template
#------------------------------------------------------------
vcxproj_template = """<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" ToolsVersion="[Version]" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
@@ -1108,6 +1108,8 @@
text = text.replace("__VERSION__", self.version)
if self.vcversion:
text = text.replace("__VCVERSION__", self.vcversion)
+ text = text.replace("__VCSHORTVER__",
+ self.vcversion.replace(".",""))
return text
#------------------------------------------------------------
Modified: trunk/OpenRTM-aist/src/lib/coil/build/vcxprojtool.py
===================================================================
--- trunk/OpenRTM-aist/src/lib/coil/build/vcxprojtool.py 2014-03-29 08:18:32 UTC (rev 2541)
+++ trunk/OpenRTM-aist/src/lib/coil/build/vcxprojtool.py 2014-03-29 08:37:35 UTC (rev 2542)
@@ -18,7 +18,7 @@
# Generic vcxproj template
#------------------------------------------------------------
vcxproj_template = """<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" ToolsVersion="[Version]" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
@@ -273,6 +273,18 @@
VC10_InheritedPropertySheets: # Set vsprops file if you need
"""
+def get_after_config(text):
+ import re
+ ret = ""
+ flag = False
+ for l in text.splitlines():
+ m = re.match("^Configurations:", l)
+ if m:
+ flag = True
+ continue
+ if flag:
+ ret += l.replace("Win32", "x64") + "\n"
+ return ret
#------------------------------------------------------------
# Yaml template
@@ -418,7 +430,7 @@
# VCWebDeploymentTool:
# VC10_VCPostBuildEventTool:
"""
-exe_yaml = exe_yaml + "\n" + exe_yaml.replace("Win32", "x64")
+exe_yaml = exe_yaml + get_after_config(exe_yaml)
dll_yaml = """ProjectType: "Visual C++"
Version: "__VCVERSION__"
@@ -565,7 +577,7 @@
copy "$(OutDir)\\\\$(TargetName).lib" "$(SolutionDir)bin\\\\"
copy "$(OutDir)\\\\$(TargetName).dll" "$(SolutionDir)bin\\\\"
"""
-dll_yaml = dll_yaml + "\n" + dll_yaml.replace("Win32", "x64")
+dll_yaml = dll_yaml + get_after_config(dll_yaml)
#------------------------------------------------------------
lib_yaml = """ProjectType: "Visual C++"
@@ -674,7 +686,7 @@
Value: |
copy "$(OutDir)\\\\libRTCSkel.lib" "$(SolutionDir)\\\\bin"
"""
-lib_yaml = lib_yaml + "\n" + lib_yaml.replace("Win32", "x64")
+lib_yaml = lib_yaml + get_after_config(lib_yaml)
rtcexe_yaml="""ProjectType: "Visual C++"
Version: "__VCVERSION__"
@@ -791,7 +803,7 @@
- Key: TargetMachine
Value: "MachineX86"
"""
-rtcexe_yaml = rtcexe_yaml + "\n" + rtcexe_yaml.replace("Win32", "x64")
+rtcexe_yaml = rtcexe_yaml + get_after_config(rtcexe_yaml)
rtcdll_yaml="""ProjectType: "Visual C++"
Version: "__VCVERSION__"
@@ -913,6 +925,7 @@
"""
+
def usage():
print """Usage:
vcprojtool.py cmd options
@@ -930,7 +943,7 @@
vcprojtool.py yaml --type [exe|dll|nmake|lib] --output
vcprojtool.py flist --out --source|--header|--resource *
"""
-rtcdll_yaml = rtcdll_yaml + "\n" + rtcdll_yaml.replace("Win32", "x64")
+rtcdll_yaml = rtcdll_yaml + get_after_config(rtcdll_yaml)
import sys
@@ -1095,6 +1108,8 @@
text = text.replace("__VERSION__", self.version)
if self.vcversion:
text = text.replace("__VCVERSION__", self.vcversion)
+ text = text.replace("__VCSHORTVER__",
+ self.vcversion.replace(".",""))
return text
#------------------------------------------------------------
Modified: trunk/OpenRTM-aist/win32/OpenRTM-aist/build.bat
===================================================================
--- trunk/OpenRTM-aist/win32/OpenRTM-aist/build.bat 2014-03-29 08:18:32 UTC (rev 2541)
+++ trunk/OpenRTM-aist/win32/OpenRTM-aist/build.bat 2014-03-29 08:37:35 UTC (rev 2542)
@@ -86,14 +86,17 @@
)
if %VC_VERSION% == 10 (
call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat%" x86
+ set VCTOOLSET=4.0
goto MSBUILDx86
)
if %VC_VERSION% == 11 (
call "C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\vcvarsall.bat" x86
+ set VCTOOLSET=4.0
goto MSBUILDx86
)
if %VC_VERSION% == 12 (
call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" x86
+ set VCTOOLSET=12.0
goto MSBUILDx86
)
@@ -112,10 +115,15 @@
:MSBUILDx86
echo Visual Studio Dir: %VSINSTALLDIR%
echo LIB: %LIB%
- at rem msbuild /M:2 /t:clean /p:configuration=debug /p:platform=Win32 OpenRTM-aist_vc%VC_VERSION%.sln
- at rem msbuild /M:2 /t:clean /p:configuration=release /p:platform=Win32 OpenRTM-aist_vc%VC_VERSION%.sln
- at rem msbuild /M:2 /t:rebuild /p:configuration=debug /p:platform=Win32 OpenRTM-aist_vc%VC_VERSION%.sln
-msbuild /M:2 /t:rebuild /p:configuration=release /p:platform=Win32 OpenRTM-aist_vc%VC_VERSION%.sln
+set OPT=/M:4 /toolsversion:$VCTOOLSET% /p:platform=Win32
+set SLN=OpenRTM-aist_vc%VC_VERSION%.sln
+set LOG=/fileLogger /flp:logfile=debug.log /v:diag
+
+msbuild /t:clean /p:configuration=debug %OPT% %SLN%
+msbuild /t:clean /p:configuration=release %OPT% %SLN%
+msbuild /t:rebuild /p:configuration=debug %OPT% %LOG% %SLN%
+msbuild /t:rebuild /p:configuration=release %OPT% %LOG% %SLN%
+
goto END
@rem ============================================================
@@ -130,14 +138,17 @@
)
if /i %VC_VERSION% == 10 (
call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" amd64
+ set VCTOOLSET=4.0
goto MSBUILDx64
)
if /i %VC_VERSION% == 11 (
call "C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\vcvarsall.bat" amd64
+ set VCTOOLSET=4.0
goto MSBUILDx64
)
if /i %VC_VERSION% == 12 (
call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" amd64
+ set VCTOOLSET=12.0
goto MSBUILDx64
)
echo Visual Studio Dir: %VSINSTALLDIR%
@@ -158,11 +169,15 @@
:MSBUILDx64
echo Visual Studio Dir: %VSINSTALLDIR%
echo LIB: %LIB%
-msbuild /M:4 /t:clean /fileLogger /flp:logfile=debug.log /v:diag /p:configuration=debug /p:platform=x64 OpenRTM-aist_vc%VC_VERSION%.sln
-msbuild /M:4 /t:clean /fileLogger /flp:logfile=release.log /v:diag /p:configuration=release /p:platform=x64 OpenRTM-aist_vc%VC_VERSION%.sln
+set OPT=/M:4 /toolsversion:$VCTOOLSET% /p:platform=x64
+set SLN=OpenRTM-aist_vc%VC_VERSION%.sln
+set LOG=/fileLogger /flp:logfile=debug.log /v:diag
- at rem msbuild /M:4 /t:rebuild /fileLogger /flp:logfile=debug.log /v:diag /p:configuration=debug /p:platform=x64 OpenRTM-aist_vc%VC_VERSION%.sln
- at rem msbuild /M:4 /t:rebuild /fileLogger /flp:logfile=release.log /v:diag /p:configuration=release /p:platform=x64 OpenRTM-aist_vc%VC_VERSION%.sln
+msbuild /t:clean /p:configuration=debug %OPT% %SLN%
+msbuild /t:clean /p:configuration=release %OPT% %SLN%
+msbuild /t:rebuild /p:configuration=debug %OPT% %LOG% %SLN%
+msbuild /t:rebuild /p:configuration=release %OPT% %LOG% %SLN%
+
goto END
:END
More information about the openrtm-commit
mailing list