修訂 | ab4d976b4db0ee9a73e70e2cfaed766530d514de (tree) |
---|---|
時間 | 2015-05-23 16:57:43 |
作者 | Masaki Murase |
Commiter | Masaki Murase |
add build.bat and modified Visual Studio project of CoreFunctions
to build variaous Platform and Configuration
@@ -0,0 +1,84 @@ | ||
1 | +@echo off | |
2 | + | |
3 | +@rem Usage: | |
4 | +@rem build [CONFIG] [ARCH] | |
5 | +@rem ( CONFIG: Release, Debug or both(default), ARCH: x86(default) or x64 ) | |
6 | +@rem | |
7 | +@rem Caution: This batch file is just tested on Windows 7 | |
8 | +@rem | |
9 | +if {%1}=="" (set CONFIG=Release Debug) else (set CONFIG=%1) | |
10 | +if {%2}=="" (set ARCH=x86) else (set ARCH=%2) | |
11 | +@rem PLTFRM: Win32 or x64 | |
12 | +if {%2}=={x64} (set PLTFRM=x64) else (set PLTFRM=Win32) | |
13 | + | |
14 | + | |
15 | + | |
16 | +@echo on | |
17 | +@echo Builiding Mass++ for %ARCH% at %time% on %date%. | |
18 | +@echo off | |
19 | + | |
20 | +@rem remove old backup log and backup latest log | |
21 | +for %%c in (%CONFIG%) do ( | |
22 | + if exist build-%ARCH%-%%c.log.bak del build-%ARCH%-%%c.log.bak | |
23 | + if exist build-%ARCH%-%%c.log ren build-%ARCH%-%%c.log build-%ARCH%-%%c.log.bak | |
24 | + echo Start of building Mass++ for %ARCH% at %time% on %date%. >> build-%ARCH%-%%c.log 2>&1 | |
25 | + echo; >> build-%ARCH%-%%c.log 2>&1 | |
26 | +) | |
27 | + | |
28 | +@rem Build Plug-ins written in Native Code | |
29 | + | |
30 | +for %%s in ( | |
31 | + common-lib | |
32 | + common-exe | |
33 | + common-plugin-analyze | |
34 | + common-plugin-io | |
35 | + shimadzu-input-plugin | |
36 | + common-plugin-operation | |
37 | + common-plugin-view | |
38 | + eisai-common-plugin | |
39 | +) do ( | |
40 | + for %%c in (%CONFIG%) do ( | |
41 | + call :build-savelog %%s %%c %PLTFRM% %ARCH% | |
42 | +)) | |
43 | + | |
44 | + | |
45 | +@rem Build Plug-ins written in Managed Code | |
46 | +for %%s in ( | |
47 | + shimadzu-win-plugin | |
48 | +) do ( | |
49 | + for %%c in (%CONFIG%) do ( | |
50 | + call :build-savelog %%s %%c %ARCH% %ARCH% | |
51 | +)) | |
52 | + | |
53 | + | |
54 | +echo Finished building Mass++ for %ARCH% at %time% on %date%. | |
55 | + | |
56 | +goto :eof | |
57 | + | |
58 | + | |
59 | +@rem | |
60 | +@rem SUBROUTINE | |
61 | +@rem | |
62 | + | |
63 | +:build-savelog | |
64 | +@rem %1:solution ,%2:Debug or Release, %3: Win32, x86, x64, etc %4: x86 or x64 | |
65 | +call :addcomment %1 %4 %2 %3 Start | |
66 | +call :build %1 %2 %3 %4 | |
67 | +call :addcomment %1 %4 %2 %3 End | |
68 | +goto :eof | |
69 | + | |
70 | + | |
71 | +:build | |
72 | +@rem %1:solution name, %2:Debug or Release, %3:Win32, x86, x64, etc. %4: %ARCH% | |
73 | +@echo on | |
74 | +msbuild %1/%1.sln /p:Platform=%3 /p:Configuration=%2 >> build-%4-%2.log 2>&1 | |
75 | +@echo off | |
76 | +goto :eof | |
77 | + | |
78 | +:addcomment | |
79 | +@rem %1 solution %2:ARCH %3:Config %4:Win32, x86, x64, etc. %5 End or Start | |
80 | +@echo; >> build-%2-%3.log 2>&1 | |
81 | +@echo %5 of building %1 (%3) for %4 at %time% on %date%. >> build-%2-%3.log 2>&1 | |
82 | +@echo; >> build-%2-%3.log 2>&1 | |
83 | +@echo off | |
84 | +goto :eof |
@@ -102,16 +102,16 @@ | ||
102 | 102 | <TargetMachine>MachineX86</TargetMachine> |
103 | 103 | </Link> |
104 | 104 | <PostBuildEvent> |
105 | - <Command>mkdir $(SolutionDir)..\..\..\..\include\kome\$(ProjectName) | |
106 | -copy $(SolutionDir)..\..\..\..\src\$(SolutionName)\$(ProjectName)\*.h $(SolutionDir)..\..\..\..\include\kome\$(ProjectName) | |
107 | -del $(SolutionDir)..\..\..\..\include\kome\$(ProjectName)\stdafx.h | |
108 | -copy $(SolutionDir)..\..\..\..\include\kome\$(ProjectName)\$(ProjectName).h $(SolutionDir)..\..\..\..\include\kome\ | |
109 | -del $(SolutionDir)..\..\..\..\include\kome\$(ProjectName)\$(ProjectName).h | |
110 | -mkdir $(SolutionDir)..\..\stage\$(Platform)-$(Configuration)\bin | |
111 | -copy $(TargetPath) $(SolutionDir)..\..\stage\$(Platform)-$(Configuration)\bin | |
112 | -copy $(TargetPath) $(SolutionDir)..\..\..\..\lib\msvs\$(Platform)-$(Configuration)\ | |
113 | -copy $(TargetDir)$(TargetName).lib $(SolutionDir)..\..\..\..\lib\msvs\$(Platform)-$(Configuration)\ | |
114 | -</Command> | |
105 | + <Command>mkdir $(SolutionDir)..\..\..\..\include\kome\$(ProjectName) | |
106 | +copy $(SolutionDir)..\..\..\..\src\$(SolutionName)\$(ProjectName)\*.h $(SolutionDir)..\..\..\..\include\kome\$(ProjectName) | |
107 | +del $(SolutionDir)..\..\..\..\include\kome\$(ProjectName)\stdafx.h | |
108 | +copy $(SolutionDir)..\..\..\..\include\kome\$(ProjectName)\$(ProjectName).h $(SolutionDir)..\..\..\..\include\kome\ | |
109 | +del $(SolutionDir)..\..\..\..\include\kome\$(ProjectName)\$(ProjectName).h | |
110 | +mkdir $(SolutionDir)..\..\stage\$(Platform)-$(Configuration)\bin | |
111 | +copy $(TargetPath) $(SolutionDir)..\..\stage\$(Platform)-$(Configuration)\bin | |
112 | +mkdir $(SolutionDir)..\..\..\..\lib\msvs\$(Platform)-$(Configuration) | |
113 | +copy $(TargetPath) $(SolutionDir)..\..\..\..\lib\msvs\$(Platform)-$(Configuration)\ | |
114 | +copy $(TargetDir)$(TargetName).lib $(SolutionDir)..\..\..\..\lib\msvs\$(Platform)-$(Configuration)\</Command> | |
115 | 115 | </PostBuildEvent> |
116 | 116 | </ItemDefinitionGroup> |
117 | 117 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> |
@@ -134,16 +134,16 @@ | ||
134 | 134 | <SubSystem>Windows</SubSystem> |
135 | 135 | </Link> |
136 | 136 | <PostBuildEvent> |
137 | - <Command>mkdir $(SolutionDir)..\..\..\..\include\kome\$(ProjectName) | |
138 | -copy $(SolutionDir)..\..\..\..\src\$(SolutionName)\$(ProjectName)\*.h $(SolutionDir)..\..\..\..\include\kome\$(ProjectName) | |
139 | -del $(SolutionDir)..\..\..\..\include\kome\$(ProjectName)\stdafx.h | |
140 | -copy $(SolutionDir)..\..\..\..\include\kome\$(ProjectName)\$(ProjectName).h $(SolutionDir)..\..\..\..\include\kome\ | |
141 | -del $(SolutionDir)..\..\..\..\include\kome\$(ProjectName)\$(ProjectName).h | |
142 | -mkdir $(SolutionDir)..\..\stage\$(Platform)-$(Configuration)\bin | |
143 | -copy $(TargetPath) $(SolutionDir)..\..\stage\$(Platform)-$(Configuration)\bin | |
144 | -copy $(TargetPath) $(SolutionDir)..\..\..\..\lib\msvs\$(Platform)-$(Configuration)\ | |
145 | -copy $(TargetDir)$(TargetName).lib $(SolutionDir)..\..\..\..\lib\msvs\$(Platform)-$(Configuration)\ | |
146 | -</Command> | |
137 | + <Command>mkdir $(SolutionDir)..\..\..\..\include\kome\$(ProjectName) | |
138 | +copy $(SolutionDir)..\..\..\..\src\$(SolutionName)\$(ProjectName)\*.h $(SolutionDir)..\..\..\..\include\kome\$(ProjectName) | |
139 | +del $(SolutionDir)..\..\..\..\include\kome\$(ProjectName)\stdafx.h | |
140 | +copy $(SolutionDir)..\..\..\..\include\kome\$(ProjectName)\$(ProjectName).h $(SolutionDir)..\..\..\..\include\kome\ | |
141 | +del $(SolutionDir)..\..\..\..\include\kome\$(ProjectName)\$(ProjectName).h | |
142 | +mkdir $(SolutionDir)..\..\stage\$(Platform)-$(Configuration)\bin | |
143 | +copy $(TargetPath) $(SolutionDir)..\..\stage\$(Platform)-$(Configuration)\bin | |
144 | +mkdir $(SolutionDir)..\..\..\..\lib\msvs\$(Platform)-$(Configuration) | |
145 | +copy $(TargetPath) $(SolutionDir)..\..\..\..\lib\msvs\$(Platform)-$(Configuration)\ | |
146 | +copy $(TargetDir)$(TargetName).lib $(SolutionDir)..\..\..\..\lib\msvs\$(Platform)-$(Configuration)\</Command> | |
147 | 147 | </PostBuildEvent> |
148 | 148 | </ItemDefinitionGroup> |
149 | 149 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> |
@@ -214,16 +214,16 @@ | ||
214 | 214 | <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile> |
215 | 215 | </Link> |
216 | 216 | <PostBuildEvent> |
217 | - <Command>mkdir $(SolutionDir)..\..\..\..\include\kome\$(ProjectName) | |
218 | -copy $(SolutionDir)..\..\..\..\src\$(SolutionName)\$(ProjectName)\*.h $(SolutionDir)..\..\..\..\include\kome\$(ProjectName) | |
219 | -del $(SolutionDir)..\..\..\..\include\kome\$(ProjectName)\stdafx.h | |
220 | -copy $(SolutionDir)..\..\..\..\include\kome\$(ProjectName)\$(ProjectName).h $(SolutionDir)..\..\..\..\include\kome\ | |
221 | -del $(SolutionDir)..\..\..\..\include\kome\$(ProjectName)\$(ProjectName).h | |
222 | -mkdir $(SolutionDir)..\..\stage\$(Platform)-$(Configuration)\bin | |
223 | -copy $(TargetPath) $(SolutionDir)..\..\stage\$(Platform)-$(Configuration)\bin | |
224 | -copy $(TargetPath) $(SolutionDir)..\..\..\..\lib\msvs\$(Platform)-$(Configuration)\ | |
225 | -copy $(TargetDir)$(TargetName).lib $(SolutionDir)..\..\..\..\lib\msvs\$(Platform)-$(Configuration)\ | |
226 | -</Command> | |
217 | + <Command>mkdir $(SolutionDir)..\..\..\..\include\kome\$(ProjectName) | |
218 | +copy $(SolutionDir)..\..\..\..\src\$(SolutionName)\$(ProjectName)\*.h $(SolutionDir)..\..\..\..\include\kome\$(ProjectName) | |
219 | +del $(SolutionDir)..\..\..\..\include\kome\$(ProjectName)\stdafx.h | |
220 | +copy $(SolutionDir)..\..\..\..\include\kome\$(ProjectName)\$(ProjectName).h $(SolutionDir)..\..\..\..\include\kome\ | |
221 | +del $(SolutionDir)..\..\..\..\include\kome\$(ProjectName)\$(ProjectName).h | |
222 | +mkdir $(SolutionDir)..\..\stage\$(Platform)-$(Configuration)\bin | |
223 | +copy $(TargetPath) $(SolutionDir)..\..\stage\$(Platform)-$(Configuration)\bin | |
224 | +mkdir $(SolutionDir)..\..\..\..\lib\msvs\$(Platform)-$(Configuration) | |
225 | +copy $(TargetPath) $(SolutionDir)..\..\..\..\lib\msvs\$(Platform)-$(Configuration)\ | |
226 | +copy $(TargetDir)$(TargetName).lib $(SolutionDir)..\..\..\..\lib\msvs\$(Platform)-$(Configuration)\</Command> | |
227 | 227 | </PostBuildEvent> |
228 | 228 | </ItemDefinitionGroup> |
229 | 229 | <ItemGroup> |