view installer-files/cmdshell.bat @ 5531:eae508c12529

Add build rule for build-octave (bug #49503). * src/build-octave.mk: Add new build rule for build-octave which can be used for cross-building binary packages that depend on Octave as a build tool. * dist-files.mk: Add new file to list. * index.html: Add new package to list. * src/of-communications.mk, src/of-image.mk, src/of-mapping.mk, src/of-optiminterp.mk, src/of-sparsersb.mk, src/of-statistics.mk, src/of-windows.mk: Add optional dependency on build-octave. * configure.ac: Add new configure switch "--disable-system-octave" that is needed to build the build-octave package. * Makefile.in: Add variable "USE_SYSTEM_OCTAVE". Exclude build-octave from the default build tools and build it only if a package explicitly depends on it. Display warning about missing native Octave version only if necessary.
author Markus Mützel <markus.muetzel@gmx.de>
date Tue, 08 Sep 2020 23:04:38 +0200
parents f146714a73c3
children 27b4f385c45d
line wrap: on
line source

@echo off

set OCTAVE_HOME=%~dp0
Rem NOTE: OCTAVE_HOME has a end \
Rem convert to 8.3 format
for %%I in ("%OCTAVE_HOME%") do set OCTAVE_HOME=%%~sI

Rem set home if not already set
if "%HOME%"=="" set HOME=%USERPROFILE%
if "%HOME%"=="" set HOME=%HOMEDRIVE%%HOMEPATH%

Rem set HOME to 8.3 format
for %%I in ("%HOME%") do set HOME=%%~sI

set MSYSDIR=%OCTAVE_HOME%
set MSYSTEM=MSYS

Rem if no msys-1.0, must be msys2
if NOT EXIST %OCTAVE_HOME%bin\msys-1.0.dll set MSYSDIR=%OCTAVE_HOME%usr

Rem 32 or 64 bit
if EXIST %OCTAVE_HOME%mingw32\bin\octave-cli.exe set MSYSTEM=MINGW32
if EXIST %OCTAVE_HOME%mingw64\bin\octave-cli.exe set MSYSTEM=MINGW64

if EXIST %OCTAVE_HOME%mingw32\bin\octave-cli.exe set OCTAVE_HOME=%OCTAVE_HOME%mingw32\
if EXIST %OCTAVE_HOME%mingw64\bin\octave-cli.exe set OCTAVE_HOME=%OCTAVE_HOME%mingw64\

Rem   Set up PATH. Make sure the octave bin dir
Rem   comes first.
set PATH=%OCTAVE_HOME%qt5\bin;%OCTAVE_HOME%bin;%OCTAVE_HOME%python;%PATH%
set TERM=cygwin
set GS=gs.exe
set GNUTERM=wxt

Rem tell msys2 to use the paths we set here which matches what octave would do
set MSYS2_PATH_TYPE=inherit

%MSYSDIR%\bin\bash.exe --login -i