changeset 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 c53ea91b338b
children 44eb8941c35f
files makeinst-script.sh
diffstat 1 files changed, 15 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/makeinst-script.sh	Wed Mar 19 15:11:56 2014 -0400
+++ b/makeinst-script.sh	Wed Mar 19 15:12:53 2014 -0400
@@ -10,11 +10,16 @@
 TOPDIR=`dirname $1`
 OCTAVE_SOURCE=`basename $1`
 
-echo "Generating installer script ... "
-
 cd $TOPDIR
 MXEDIR=`cd ..; pwd`
 
+if [ -e $OCTAVE_SOURCE/bin/libopenblas.dll ]; then
+  DEFAULT_BLAS="OpenBLAS"
+else
+  DEFAULT_BLAS="Reference BLAS"
+fi
+
+
 # find octave shortcut icon
 ICON=`find $OCTAVE_SOURCE -name octave-logo.ico -printf "%P" | head -1 | sed 's,/,\\\\,g'`
 
@@ -161,7 +166,6 @@
 
   \${NSD_CreateDropList} 120u 70 100u 80u ""
   Pop \$InstallBlasLibCtrl
-  \${NSD_CB_AddString} \$InstallBlasLibCtrl "Reference BLAS"
 EOF
    # add option to install libopenblas if we have the dll present
    if [ -e $OCTAVE_SOURCE/bin/libopenblas.dll ]; then
@@ -170,7 +174,11 @@
 EOF
   fi
   cat >> $OUTFILE << EOF
-  \${NSD_CB_SelectString} \$InstallBlasLibCtrl "Reference BLAS"
+  \${NSD_CB_AddString} \$InstallBlasLibCtrl "Reference BLAS"
+EOF
+
+  cat >> $OUTFILE << EOF
+  \${NSD_CB_SelectString} \$InstallBlasLibCtrl "$DEFAULT_BLAS"
 
   !insertmacro MUI_HEADER_TEXT "Install Options" "Choose options for installing"
   nsDialogs::Show  
@@ -284,11 +292,11 @@
 
   ; BLAS set up
   \${If} \$InstallBlasLib == 1
+    ; Reference BLAS
+    CopyFiles /SILENT "\$INSTDIR\\bin\\librefblas.dll" "\$INSTDIR\\bin\\libblas.dll"
+  \${Else}
     ; OpenBLAS
     CopyFiles /SILENT "\$INSTDIR\\bin\\libopenblas.dll" "\$INSTDIR\\bin\\libblas.dll"
-  \${Else}
-    ; Reference BLAS
-    CopyFiles /SILENT "\$INSTDIR\\bin\\librefblas.dll" "\$INSTDIR\\bin\\libblas.dll"
   \${EndIf}
 
 SectionEnd
@@ -468,5 +476,3 @@
   Pop \$R0
 FunctionEnd
 EOF
-
-echo "Generation Completed"