-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmake.bat
More file actions
177 lines (153 loc) · 5.39 KB
/
make.bat
File metadata and controls
177 lines (153 loc) · 5.39 KB
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
@ECHO OFF
REM USE MAKE.BAT 64 to compile 64-bit version!
REM
REM Use FPC [www.freepascal.org] in $DELPHI mode.
REM
SET COMPILE_PARAMS=-MDELPHI -O2 -Xs -FuUnitsCommon\;UnitsFits\ -FiUnitsFits\ -FEbin-out\
SET COMPILER="c:\lazarus32\fpc\3.2.2\bin\i386-win32\fpc.exe" %COMPILE_PARAMS% -FUbin-out\unit32
SET COMPIL64="C:\lazarus64\fpc\3.2.2\bin\x86_64-win64\fpc.exe" %COMPILE_PARAMS% -FUbin-out\unit64
REM
REM To make source-code ZIP, run this script with "AA" command-line option: make.bat AA
REM WARNING: run clean.bat or clean2.bat first
SET A7z="c:\Program Files\7-zip\7z.exe"
IF "%1"=="AA" GOTO :ARCHIVE
IF "%1"=="64" GOTO :X64
GOTO :COMPILE
:X64
SET COMPILER=%COMPIL64%
:COMPILE
REM fihed.exe: Print/edit FITS header, multifile mode
%COMPILER% FitsHeader2\fihed.lpr
IF ERRORLEVEL 1 GOTO :ERROR
ECHO .
REM idobs.exe: calculate mean DATE-OBS for set of files to be stacked
%COMPILER% IrisDateObs\idobs.lpr
IF ERRORLEVEL 1 GOTO :ERROR
ECHO .
REM FitsStat
%COMPILER% IrisDateFix\idfix.lpr
IF ERRORLEVEL 1 GOTO :ERROR
ECHO .
REM iren.exe: rename files according to IRIS naming convention
%COMPILER% IrisRename\iren.lpr
IF ERRORLEVEL 1 GOTO :ERROR
ECHO .
REM ipdat.exe: Convert IRIS photometry output to csv-file
%COMPILER% IPDAT\ipdat.lpr
IF ERRORLEVEL 1 GOTO :ERROR
ECHO .
REM apdat.exe: Convert AIJ photometry output to csv-file
%COMPILER% APDAT\apdat.lpr
IF ERRORLEVEL 1 GOTO :ERROR
ECHO .
REM igagen.exe: IrisScriptGroupAlign
%COMPILER% IrisScriptGroupAlign\igagen.lpr
IF ERRORLEVEL 1 GOTO :ERROR
ECHO .
REM fflip.exe: Flips 2-dimensional FITS
%COMPILER% FitsFlip\fflip.lpr
IF ERRORLEVEL 1 GOTO :ERROR
ECHO .
REM fitscfa.exe: Splits CFA to color channels
%COMPILER% FitsCfa\FitsCfa.lpr
IF ERRORLEVEL 1 GOTO :ERROR
copy FitsCfa\FitsCfa.ini bin-out\
ECHO .
REM fitsrgb.exe: Splits RGB to color channels
%COMPILER% FitsRGB\FitsRGB.lpr
IF ERRORLEVEL 1 GOTO :ERROR
ECHO .
REM iconvraw.exe: RAW->FITS converter
%COMPILER% iconvraw\iconvraw.lpr
IF ERRORLEVEL 1 GOTO :ERROR
IF "%COMPIL64%"=="%COMPILER%" GOTO :LIBRAW64
rem copy iconvraw\LibRawMxWrapper_s_crt_0_19_0-beta1.dll bin-out\
copy iconvraw\librawmxwrapper_s_crt.dll bin-out\
:LIBRAW64
IF "%COMPIL64%"=="%COMPILER%" copy iconvraw\librawmxwrapper_s_crt_64.dll bin-out\
IF ERRORLEVEL 1 GOTO :ERROR
ECHO .
REM MakeStack
%COMPILER% makestack\makestack.lpr
IF ERRORLEVEL 1 GOTO :ERROR
IF "%COMPIL64%"=="%COMPILER%" GOTO :SKIP3264
IF "%1"=="32" GOTO :SKIP3264
REN bin-out\makestack.exe makestack32.exe
IF ERRORLEVEL 1 GOTO :ERROR
%COMPIL64% makestack\makestack.lpr
IF ERRORLEVEL 1 GOTO :ERROR
REN bin-out\makestack.exe makestack64.exe
IF ERRORLEVEL 1 GOTO :ERROR
:SKIP3264
ECHO .
REM find_hot
%COMPILER% FINDHOT\find_hot.lpr
IF ERRORLEVEL 1 GOTO :ERROR
ECHO .
REM CFA2RGB
%COMPILER% CFA2RGB\cfa2rgb.lpr
IF ERRORLEVEL 1 GOTO :ERROR
ECHO .
REM FitsStat
%COMPILER% FITSstat\FITSstat.lpr
IF ERRORLEVEL 1 GOTO :ERROR
ECHO .
REM ...
%COMPILER% IrisConvFITS\iconvfits.lpr
IF ERRORLEVEL 1 GOTO :ERROR
ECHO .
REM ...
%COMPILER% Hello\HelloIRISFITS.pas
IF ERRORLEVEL 1 GOTO :ERROR
ECHO .
GOTO :END
:ARCHIVE
echo FitsHeader2\fihed.* > ziplist.txt
echo FitsHeader2\FihedSwitchChars.pas >> ziplist.txt
echo FitsFlip\fflip.* >> ziplist.txt
echo IrisDateObs\idobs.* >> ziplist.txt
echo IrisDateFix\idfix.* >> ziplist.txt
echo IrisRename\iren.* >> ziplist.txt
echo IPDAT\ipdat.* >> ziplist.txt
echo IPDAT\testdata\*.dat >> ziplist.txt
echo APDAT\apdat.* >> ziplist.txt
echo APDAT\testdata\*.dat >> ziplist.txt
echo IrisScriptGroupAlign\igagen.* >> ziplist.txt
echo FitsCfa\fitscfa.* >> ziplist.txt
echo FitsRGB\fitsrgb.* >> ziplist.txt
echo CFA2RGB\cfa2rgb.* >> ziplist.txt
echo FitsStat\fitsstat.* >> ziplist.txt
echo iconvraw\iconvraw.* >> ziplist.txt
echo iconvraw\ConvUtils.pas >> ziplist.txt
echo iconvraw\LibRawMxWrapper*.dll >> ziplist.txt
echo makestack\makestack.* >> ziplist.txt
echo makestack\CalcThread.pas >> ziplist.txt
echo IrisConvFITS\iconvfits.* >> ziplist.txt
echo IrisConvFITS\convutils.pas >> ziplist.txt
echo FindHot\find_hot.* >> ziplist.txt
echo Hello\*.pas >> ziplist.txt
echo UnitsCommon\*.pas >> ziplist.txt
echo UnitsFits\*.pas >> ziplist.txt
echo UnitsFits\*.inc >> ziplist.txt
echo Scripts\* >> ziplist.txt
echo Samples\* >> ziplist.txt
echo Setup\*.iss >> ziplist.txt
echo Setup\output\dirinfo >> ziplist.txt
echo bin-out\dirinfo >> ziplist.txt
echo bin-out\fitsutils.ini >> ziplist.txt
echo bin-out\fitsutils.txt >> ziplist.txt
echo bin-out\unit32\dirinfo >> ziplist.txt
echo bin-out\unit64\dirinfo >> ziplist.txt
echo clean.bat >> ziplist.txt
echo clean2.bat >> ziplist.txt
echo make.bat >> ziplist.txt
echo bin-out\LICENSE >> ziplist.txt
del FITSutils_src.zip
%A7z% a FITSutils_src.zip @ziplist.txt
REM LibrawWrapper sources
%A7z% a LibRawWrapper_src.zip -r LibRawWrapper\* LibRawWrapper64\*
GOTO :END
:ERROR
ECHO ***** ERROR! CANNOT COMPILE.
:END
REM pause