RE: windows installer - vbs vs bat startup script
"JohnD" <[email protected]>
| Newsgroups | gmane.comp.gnu.octave.maintainers |
|---|---|
| Message-ID | <[email protected]> |
From: Ian McCallion [mailto:[email protected]] Sent: Friday, August 28, 2020 3:23 PM To: JohnD Cc: John W. Eaton; Nicholas Jankowski; octave-maintainers Subject: Re: windows installer - vbs vs bat startup script On Fri, 28 Aug 2020 at 13:33, JohnD <[email protected]> wrote: From: Ian McCallion [mailto:[email protected]] 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 <[email protected]> wrote: > -----Original Message----- > From: John W. Eaton [mailto:[email protected]] > 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 Its not that simple – octave sets env paths for the octave when running pkg install, which is set in windows from the .bat file so cant just be removed ‘start’ creates a new wndow befefault unless is told not to, so that is expected behavior for the start calls. So the only one that could be changed to work differently would be octave-launcher --no-gui, if all ready running in a terminal