-
Notifications
You must be signed in to change notification settings - Fork 28
/
CopyFilesForRelease.bat
209 lines (147 loc) · 4.56 KB
/
CopyFilesForRelease.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
@ECHO OFF
::=======================================================================================================
:: run a script to set all of the path locations needed to copy files
CALL .\Compiling\Set_FAST_Paths.bat
::=======================================================================================================
SET bin_dir=.\bin
SET depend_dir=.\Source\dependencies
SET SW_ModuleOnly=-MODULE
IF /I "%1"=="%SW_ModuleOnly%" goto %2
:BinDir
ECHO Binaries
COPY "%CRUNCH%" "%bin_dir%"
IF /I "%1"=="%SW_ModuleOnly%" GOTO ClearVars
:dependencies
:Registry
ECHO FAST Registry
COPY "%Registry%" "%bin_dir%\Registry_Win32.exe"
SET src_folder=%REG_Loc%
SET dst_folder=%depend_dir%\Registry
@CALL :CopyFileFolder
IF /I "%1"=="%SW_ModuleOnly%" GOTO ClearVars
:ElastoDyn
ECHO ElastoDyn
SET src_folder=%ED_Loc%
SET dst_folder=%depend_dir%\ElastoDyn
@CALL :CopyFileFolder
IF /I "%1"=="%SW_ModuleOnly%" GOTO ClearVars
:BeamDyn
ECHO BeamDyn
SET src_folder=%BD_Loc%\..
SET dst_folder=%depend_dir%\BeamDyn
SET list_of_files=%src_folder%\FAST_SourceFiles.txt
@CALL :CopyFileList
IF /I "%1"=="%SW_ModuleOnly%" GOTO ClearVars
:ServoDyn
:TMD
ECHO ServoDyn and TMD
SET src_folder=%SrvD_Loc%
SET dst_folder=%depend_dir%\ServoDyn
@CALL :CopyFileFolder
:: put TMD in ServoDyn folder for now
copy /Y "%TMD_Loc%\*" "%dst_folder%"
IF /I "%1"=="%SW_ModuleOnly%" GOTO ClearVars
:InflowWind
ECHO InflowWind
SET src_folder=%IfW_Loc%
SET dst_folder=%depend_dir%\InflowWind
@CALL :CopyFileFolder
SET src_folder=%IfW_Reg_Loc%
copy /Y "%src_folder%\*" "%dst_folder%"
IF /I "%1"=="%SW_ModuleOnly%" GOTO ClearVars
:AeroDyn14
ECHO AeroDyn14
SET src_folder=%AD14_Loc%\..
SET dst_folder=%depend_dir%\AeroDyn14
SET list_of_files=%src_folder%\FAST_SourceFiles.txt
@CALL :CopyFileList
IF /I "%1"=="%SW_ModuleOnly%" GOTO ClearVars
:AeroDyn
ECHO AeroDyn
SET src_folder=%AD_Loc%\..
SET dst_folder=%depend_dir%\AeroDyn
SET list_of_files=%src_folder%\FAST_SourceFiles.txt
@CALL :CopyFileList
IF /I "%1"=="%SW_ModuleOnly%" GOTO ClearVars
:HydroDyn
ECHO HydroDyn
SET src_folder=%HD_Loc%\..
SET dst_folder=%depend_dir%\HydroDyn
SET list_of_files=%src_folder%\FAST_SourceFiles.txt
@CALL :CopyFileList
IF /I "%1"=="%SW_ModuleOnly%" GOTO ClearVars
:SubDyn
ECHO SubDyn
SET src_folder=%SD_Loc%\..
SET dst_folder=%depend_dir%\SubDyn
SET list_of_files=%src_folder%\FAST_SourceFiles.txt
@CALL :CopyFileList
IF /I "%1"=="%SW_ModuleOnly%" GOTO ClearVars
:IceFloe
ECHO IceFloe
SET dst_folder=%depend_dir%\IceFloe
SET src_folder=%IceF_Loc%
@CALL :CopyFileFolder
SET src_folder=%IceF_RanLux_Loc%
copy /Y "%src_folder%\*" "%dst_folder%"
SET src_folder=%IceF_Loc2%
copy /Y "%src_folder%\*" "%dst_folder%"
IF /I "%1"=="%SW_ModuleOnly%" GOTO ClearVars
:IceDyn
ECHO IceDyn
SET src_folder=%IceD_Loc%
SET dst_folder=%depend_dir%\IceDyn
@CALL :CopyFileFolder
IF /I "%1"=="%SW_ModuleOnly%" GOTO ClearVars
:MAP
ECHO MAP
COPY "%MAP_DLL%" "%bin_dir%"
COPY "%MAP_DLL64%" "%bin_dir%"
SET src_folder=%MAP_Loc%
SET dst_folder=%depend_dir%\MAP
SET list_of_files=%src_folder%\FAST_SourceFiles.txt
@CALL :CopyFileList
rem Change the case of this source file, if necessary:
MOVE "%dst_folder%\map.f90" "%dst_folder%\MAP.f90"
IF /I "%1"=="%SW_ModuleOnly%" GOTO ClearVars
:MoorDyn
ECHO MoorDyn
SET src_folder=%MD_Loc%\..
SET dst_folder=%depend_dir%\MoorDyn
SET list_of_files=%src_folder%\FAST_SourceFiles.txt
@CALL :CopyFileList
IF /I "%1"=="%SW_ModuleOnly%" GOTO ClearVars
:FEAMooring
ECHO FEAMooring
SET src_folder=%FEAM_Loc%
SET dst_folder=%depend_dir%\FEAMooring
@CALL :CopyFileFolder
IF /I "%1"=="%SW_ModuleOnly%" GOTO ClearVars
:OrcaFlex
ECHO OrcaFlex Interface
SET src_folder=%Orca_Loc%\..
SET dst_folder=%depend_dir%\OrcaFlex
SET list_of_files=%src_folder%\FAST_SourceFiles.txt
@CALL :CopyFileList
IF /I "%1"=="%SW_ModuleOnly%" GOTO ClearVars
REM -------------------------------------
goto ClearVars
REM -------------------------------------
:CopyFileList
if exist "%dst_folder%\*" DEL "%dst_folder%\*"
for /f %%i in (%list_of_files%) DO copy /Y "%src_folder%\%%i" "%dst_folder%"
EXIT /B
REM -------------------------------------
:CopyFileFolder
if exist "%dst_folder%\*" DEL "%dst_folder%\*"
copy /Y "%src_folder%\*" "%dst_folder%"
EXIT /B
REM -------------------------------------
:ClearVars
SET bin_dir=
SET depend_dir=
SET src_folder=
SET dst_folder=
SET list_of_files=
SET SW_ModuleOnly=
:Done