changeset 3963:9d402d735dd1

nsis-installer: add bash window menu if devel tools enabled * binary-dist-rules.mk: if devel tools enabled, install cmdshell.bat, fix paths that were in build tools prefix * dist-files.mk: add cmdshell.bat * installer-files/cmdshell.bat: new file * makeinst-script.sh: if cmdshell.bat exists, include in installer, and add shortcut
author John Donoghue
date Tue, 09 Jun 2015 15:12:28 -0400
parents 76247f439f51
children 5ad15d20d11b
files binary-dist-rules.mk dist-files.mk installer-files/cmdshell.bat makeinst-script.sh
diffstat 4 files changed, 28 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/binary-dist-rules.mk	Mon Jun 08 13:49:11 2015 -0400
+++ b/binary-dist-rules.mk	Tue Jun 09 15:12:28 2015 -0400
@@ -78,10 +78,14 @@
       cp $(TOP_DIR)/installer-files/octave.bat $(OCTAVE_DIST_DIR)/
       cp $(TOP_DIR)/installer-files/octave.vbs $(OCTAVE_DIST_DIR)/
       echo "  updating libtool references..."
-      find '$(OCTAVE_DIST_DIR)/' -type f -name "*.la" -exec $(SED) -i 's|$(HOST_PREFIX)|/usr|g' {} \; ;
+      find '$(OCTAVE_DIST_DIR)/' -type f -name "*.la" \
+        -exec $(SED) -i 's|$(HOST_PREFIX)|/usr|g;s|$(BUILD_TOOLS_PREFIX)|/usr|g' {} \; ;
       echo "  updating pkg-config .pc references..."
-      find '$(OCTAVE_DIST_DIR)/lib/pkgconfig' -type f -name "*.pc" -exec $(SED) -i 's|$(HOST_PREFIX)|/usr|g' {} \; ;
-      
+      find '$(OCTAVE_DIST_DIR)/lib/pkgconfig' -type f -name "*.pc" \
+        -exec $(SED) -i 's|$(HOST_PREFIX)|/usr|g;s|$(BUILD_TOOLS_PREFIX)|/usr|g' {} \; ;
+      if [ "$(ENABLE_DEVEL_TOOLS)" = "yes" ]; then \
+        cp $(TOP_DIR)/installer-files/cmdshell.bat $(OCTAVE_DIST_DIR)/; \
+      fi
     endef
   else
     define copy-windows-dist-files
--- a/dist-files.mk	Mon Jun 08 13:49:11 2015 -0400
+++ b/dist-files.mk	Tue Jun 09 15:12:28 2015 -0400
@@ -848,6 +848,7 @@
   octaverc
 
 INSTALL_FILES_1 := \
+  cmdshell.bat \
   gpl-3.0.txt \
   octave.bat \
   octave.bmp \
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installer-files/cmdshell.bat	Tue Jun 09 15:12:28 2015 -0400
@@ -0,0 +1,13 @@
+@echo off
+
+set OCT_HOME=%~dp0
+
+Rem   Set up PATH. Make sure the octave bin dir
+Rem   comes first.
+
+set PATH=%OCT_HOME%bin;%PATH%
+set TERM=cygwin
+
+%OCT_HOME%\bin\bash.exe
+
+
--- a/makeinst-script.sh	Mon Jun 08 13:49:11 2015 -0400
+++ b/makeinst-script.sh	Tue Jun 09 15:12:28 2015 -0400
@@ -226,6 +226,9 @@
 
   ; distro files
 EOF
+  if [ -f $OCTAVE_SOURCE/cmdshell.bat ]; then 
+    echo "File '$OCTAVE_SOURCE/cmdshell.bat'" >> $OUTFILE
+  fi
 
 # insert the files
   IFS=$'\n'
@@ -273,6 +276,10 @@
  CreateShortCut "\$SMPROGRAMS\\Octave-$VERSION\\Octave (GUI).lnk" "\$INSTDIR\\octave.vbs" "--force-gui" "\$INSTDIR\\$ICON" 0 SW_SHOWMINIMIZED
  SetOutPath "\$INSTDIR"
 EOF
+  # shortcut for cmd win
+  if [ -f $OCTAVE_SOURCE/cmdshell.bat ]; then 
+    echo "CreateShortCut '\$SMPROGRAMS\\Octave-$VERSION\\Bash Shell.lnk' '\$INSTDIR\\cmdshell.bat' '' '' 0" >> $OUTFILE
+  fi
   # if we have documentation files, create shortcuts
   if [ -d $OCTAVE_SOURCE/share/doc/octave ]; then
     cat >> $OUTFILE << EOF