octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: windows installer - vbs vs bat startup script


From: Ian McCallion
Subject: Re: windows installer - vbs vs bat startup script
Date: Fri, 28 Aug 2020 20:22:51 +0100

On Fri, 28 Aug 2020 at 13:33, JohnD <john.david.donoghue@gmail.com> wrote:

 

 

From: Ian McCallion [mailto:ian.mccallion@gmail.com]
Sent: Friday, August 28, 2020 3:24 AM
To: JohnD
Cc: John W. Eaton; Nicholas Jankowski; octave-maintainers
Subject: Re: windows installer - vbs vs bat startup script

 

On Friday, 28 August 2020, JohnD <john.david.donoghue@gmail.com> wrote:



> -----Original Message-----
> From: John W. Eaton [mailto:jwe@octave.org]
> Sent: Thursday, August 27, 2020 11:49 AM
> To: Nicholas Jankowski; JohnD
> Cc: octave-maintainers
> Subject: Re: windows installer - vbs vs bat startup script
>
> On 8/27/20 11:44 AM, Nicholas Jankowski wrote:
> >     I wonder if the issue is trying to run the .vbs script, or trying to
> >     run a program as hidden from another program ?____
> >
> >     __ __
> >
> >     If it just the general act of running a .vbs script , we could just
> >     a small program using activex and call almost the same commands
> >     from within it.
> >
> >
> > if the issue with vbs files is the various, potentially conflicting,
> > non-standard security protocols,  is activex any better? I wasn't aware
> > it was supported outside of a browser environment.
>
> Does it need to be a script or could the same job be done with a
> separate .exe program file that sets up the environment appropriately
> and then execs the real Octave binary?
>
> jwe


Heres a launcher exe code that looks like will work. See comments in file for compiling.

It probally needs a little more work to ensure things don’t buffer run, and doesn’t do much error checking

It assumes its in the same directory as the octave executable and works out the paths from that.

Its pretty close to what is being done in the.vbs scrip, but in a different order for parts

 

Looks good John. If I may suggest octave-launcher.exe is always installed in the root folder for the release, independently of where the main exes get installed. This will avoid a potential cause of breakage between releases for user code that launches octave.

 

Cheers... Ian

 

 

Ok modded to expect to be in the root of the install directory where octave.vbs currently would reside.



I confirm it works launching the GUI with no black window appearing.

When launching the CLI it works the same as the .vbs, i.e. it creates a new window even if the launch is invoked from an existing commandline window. The .bat file however runs Octave in the existing window, see the following:

rem this runs octave-cli in existing window 
   call octave.bat --no-gui

rem all the following lines run octave-cli in new window
   start octave.bat  --no-gui
   call octave.vbs --no-gui
   start octave.vbs --no-gui
   call octave-launcher --no-gui
   start octave-launch --no-gui

The ideal would be for 
   call octave-launcher --no-gui
to run octave-cli in existing window. I believe then that both .bat and .vbs could then be deprecated or immediately deleted.

Cheers... Ian

reply via email to

[Prev in Thread] Current Thread [Next in Thread]