diff makeinst-script.sh @ 3471:6a97f4d1dedb

installer: Add ref BLAS/OpenBLAS install option * Makefile.in: Add rule for ALL blas libraries * binary-dist-rules.mk: add blas packages to installed dependancies and copy libblas to refblas. * makeinst-script.sh: Add dropdown list to options page to select BLAS and set selected to libblas.dll. * installer-files/README.html: Add information on the BLAS libs.
author John Donoghue <john.donoghue@ieee.org>
date Tue, 28 Jan 2014 22:52:05 -0500
parents 608931797a53
children c21ca79d7980
line wrap: on
line diff
--- a/makeinst-script.sh	Tue Jan 28 18:23:35 2014 -0500
+++ b/makeinst-script.sh	Tue Jan 28 22:52:05 2014 -0500
@@ -71,6 +71,12 @@
 
 ; custom dialogs
 !include nsDialogs.nsh
+!macro __DropList_GetCurSel CONTROL VAR
+        SendMessage \${CONTROL} \${CB_GETCURSEL} 0 0 \${VAR}
+!macroend
+
+!define DropList_GetCurSel \`!insertmacro __DropList_GetCurSel\`
+
 ; additional logic
 !include LogicLib.nsh
 
@@ -123,6 +129,8 @@
 Var InstallShortcutsCtrl
 Var RegisterOctaveFileType
 Var RegisterOctaveFileTypeCtrl
+Var InstallBlasLibCtrl
+Var InstallBlasLib
 
 Function octaveOptionsPage 
   Push \$0
@@ -145,6 +153,15 @@
   Pop \$RegisterOctaveFileTypeCtrl
   \${NSD_SetState} \$RegisterOctaveFileTypeCtrl \${BST_CHECKED}
 
+  \${NSD_CreateLabel} 0 70 110u 12u "BLAS library implementation:"
+  Pop \$0
+
+  \${NSD_CreateDropList} 120u 70 100u 80u ""
+  Pop \$InstallBlasLibCtrl
+  \${NSD_CB_AddString} \$InstallBlasLibCtrl "Reference BLAS"
+  \${NSD_CB_AddString} \$InstallBlasLibCtrl "OpenBLAS"
+  \${NSD_CB_SelectString} \$InstallBlasLibCtrl "Reference BLAS"
+
   !insertmacro MUI_HEADER_TEXT "Install Options" "Choose options for installing"
   nsDialogs::Show  
   Pop \$0
@@ -154,6 +171,7 @@
   \${NSD_GetState} \$InstallAllUsersCtrl \$InstallAllUsers
   \${NSD_GetState} \$InstallShortcutsCtrl \$InstallShortcuts
   \${NSD_GetState} \$RegisterOctaveFileTypeCtrl \$RegisterOctaveFileType
+  \${DropList_GetCurSel} \$InstallBlasLibCtrl \$InstallBlasLib
 FunctionEnd
 
 ######################################################################
@@ -244,6 +262,15 @@
     CreateShortCut "\$desktop\\Octave-$VERSION (Experimental GUI).lnk" "\$INSTDIR\\bin\\octave-gui.exe" "" "\$INSTDIR\\$ICON" 0
   \${Endif}
 
+  ; BLAS set up
+  \${If} \$InstallBlasLib == 1
+    ; 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
 
 Section "FileTypeRego"