comparison makeinst-script.sh @ 3570:c7725f722155

NSIS installer: use Open BLAS by default
author John W. Eaton <jwe@octave.org>
date Wed, 19 Mar 2014 15:12:53 -0400
parents b82ff8ba6a8a
children da8c477d3041
comparison
equal deleted inserted replaced
3569:c53ea91b338b 3570:c7725f722155
8 8
9 OUTFILE="$2" 9 OUTFILE="$2"
10 TOPDIR=`dirname $1` 10 TOPDIR=`dirname $1`
11 OCTAVE_SOURCE=`basename $1` 11 OCTAVE_SOURCE=`basename $1`
12 12
13 echo "Generating installer script ... "
14
15 cd $TOPDIR 13 cd $TOPDIR
16 MXEDIR=`cd ..; pwd` 14 MXEDIR=`cd ..; pwd`
15
16 if [ -e $OCTAVE_SOURCE/bin/libopenblas.dll ]; then
17 DEFAULT_BLAS="OpenBLAS"
18 else
19 DEFAULT_BLAS="Reference BLAS"
20 fi
21
17 22
18 # find octave shortcut icon 23 # find octave shortcut icon
19 ICON=`find $OCTAVE_SOURCE -name octave-logo.ico -printf "%P" | head -1 | sed 's,/,\\\\,g'` 24 ICON=`find $OCTAVE_SOURCE -name octave-logo.ico -printf "%P" | head -1 | sed 's,/,\\\\,g'`
20 25
21 # extract version number 26 # extract version number
159 \${NSD_CreateLabel} 0 70 110u 12u "BLAS library implementation:" 164 \${NSD_CreateLabel} 0 70 110u 12u "BLAS library implementation:"
160 Pop \$0 165 Pop \$0
161 166
162 \${NSD_CreateDropList} 120u 70 100u 80u "" 167 \${NSD_CreateDropList} 120u 70 100u 80u ""
163 Pop \$InstallBlasLibCtrl 168 Pop \$InstallBlasLibCtrl
164 \${NSD_CB_AddString} \$InstallBlasLibCtrl "Reference BLAS"
165 EOF 169 EOF
166 # add option to install libopenblas if we have the dll present 170 # add option to install libopenblas if we have the dll present
167 if [ -e $OCTAVE_SOURCE/bin/libopenblas.dll ]; then 171 if [ -e $OCTAVE_SOURCE/bin/libopenblas.dll ]; then
168 cat >> $OUTFILE << EOF 172 cat >> $OUTFILE << EOF
169 \${NSD_CB_AddString} \$InstallBlasLibCtrl "OpenBLAS" 173 \${NSD_CB_AddString} \$InstallBlasLibCtrl "OpenBLAS"
170 EOF 174 EOF
171 fi 175 fi
172 cat >> $OUTFILE << EOF 176 cat >> $OUTFILE << EOF
173 \${NSD_CB_SelectString} \$InstallBlasLibCtrl "Reference BLAS" 177 \${NSD_CB_AddString} \$InstallBlasLibCtrl "Reference BLAS"
178 EOF
179
180 cat >> $OUTFILE << EOF
181 \${NSD_CB_SelectString} \$InstallBlasLibCtrl "$DEFAULT_BLAS"
174 182
175 !insertmacro MUI_HEADER_TEXT "Install Options" "Choose options for installing" 183 !insertmacro MUI_HEADER_TEXT "Install Options" "Choose options for installing"
176 nsDialogs::Show 184 nsDialogs::Show
177 Pop \$0 185 Pop \$0
178 FunctionEnd 186 FunctionEnd
282 \${EndIf} 290 \${EndIf}
283 \${Endif} 291 \${Endif}
284 292
285 ; BLAS set up 293 ; BLAS set up
286 \${If} \$InstallBlasLib == 1 294 \${If} \$InstallBlasLib == 1
295 ; Reference BLAS
296 CopyFiles /SILENT "\$INSTDIR\\bin\\librefblas.dll" "\$INSTDIR\\bin\\libblas.dll"
297 \${Else}
287 ; OpenBLAS 298 ; OpenBLAS
288 CopyFiles /SILENT "\$INSTDIR\\bin\\libopenblas.dll" "\$INSTDIR\\bin\\libblas.dll" 299 CopyFiles /SILENT "\$INSTDIR\\bin\\libopenblas.dll" "\$INSTDIR\\bin\\libblas.dll"
289 \${Else}
290 ; Reference BLAS
291 CopyFiles /SILENT "\$INSTDIR\\bin\\librefblas.dll" "\$INSTDIR\\bin\\libblas.dll"
292 \${EndIf} 300 \${EndIf}
293 301
294 SectionEnd 302 SectionEnd
295 303
296 Section "FileTypeRego" 304 Section "FileTypeRego"
466 continue: 474 continue:
467 Pop \$R1 475 Pop \$R1
468 Pop \$R0 476 Pop \$R0
469 FunctionEnd 477 FunctionEnd
470 EOF 478 EOF
471
472 echo "Generation Completed"