# HG changeset patch # User John Donoghue # Date 1433877148 14400 # Node ID 9d402d735dd1309dcd0f941112eb24d4bae9e927 # Parent 76247f439f517d5a197d26aacd2b508eba0c85bb 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 diff -r 76247f439f51 -r 9d402d735dd1 binary-dist-rules.mk --- 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 diff -r 76247f439f51 -r 9d402d735dd1 dist-files.mk --- 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 \ diff -r 76247f439f51 -r 9d402d735dd1 installer-files/cmdshell.bat --- /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 + + diff -r 76247f439f51 -r 9d402d735dd1 makeinst-script.sh --- 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