bugGNU Octave - Bugs: bug #45899, Installing on Windows - initial...

 
 

bug #45899: Installing on Windows - initial working directory

Submitted by:  Lloyd Wood <lloydwood>
Submitted on:  Wed 09 Sep 2015 06:27:44 AM UTC  
 
Category: InterpreterSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: FixedAssigned to: John Donoghue <lostbard>
Originator Name: Lloyd WoodOpen/Closed: Closed
Release: 4.0.0Operating System: Microsoft Windows

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Mon 21 Sep 2015 06:22:21 PM UTC, comment #10:

Closing as fixed

John Donoghue <lostbard>
Project MemberIn charge of this item.
Mon 21 Sep 2015 05:20:32 PM UTC, comment #9:

Works for me: Initial directory on Win 7 is c:\users\<user>

Avinoam Kalma <avinoam>
Project Member
Sat 19 Sep 2015 12:11:43 PM UTC, comment #8:

Pushed http://hg.octave.org/mxe-octave/rev/8803dfa40236

John Donoghue <lostbard>
Project MemberIn charge of this item.
Wed 16 Sep 2015 12:22:23 PM UTC, comment #7:

Patch attached that works for me

(file #34897)

John Donoghue <lostbard>
Project MemberIn charge of this item.
Tue 15 Sep 2015 01:27:48 PM UTC, comment #6:

Running a install on my machine and keeping the run octave check box checked at the end of the install, and I do see it open in the system32 directory.

I have the octave config dir etc, and even on uninstalling and installing again, it does the same thing.

The installer bumps to admin access on running, however uses explorer to run octave at the end of the script, so I am guessing at that point, it hasn't set the start directory.

I'll take a look at the start folder issue

John Donoghue <lostbard>
Project MemberIn charge of this item.
Mon 14 Sep 2015 01:13:00 PM UTC, comment #5:

I have never seen this (not even on one of my Windows boxes where I still work with admin privileges, I still forgot to make myself power user there). But that I didn't see it may have the following reason:

Reading Lloyd's (the OP) scenario, I suspect it has to do with an initially lacking C:\Users\<username>\.config\octave subdir where in the file qt-settings the start directory is set. qt-settings is only made after Octave starts up for the first time, so that may be why Octave starts up for the very first time in a "rogue" subdirectory.
If this were true, subsequent Octave installations should not portray this behavior anymore. A quick check would be to move this .config subdir out of the way and see what happens when starting Octave.
Even then, I assume Octave's startup dir should initially be determined by the "Start in" field in the shortcut (in the Start Menu or on the desktop). Looking at my Octave installation(s) on Windows, this is currently set to %USERPROFILE%
So, the above test should be executed with an empty "Start in" field in Octave's shortcut, or maybe using the tart Menu's "run" command.

Looking in the makeinst-script.sh file in mxe-octave I see this field isn't initialized there, other than implicitly using $INSTDIR (= Octave's installation directory)
...and it would be futile for the GUI anyway as the initial working directory is set by the user in the Preferences|General tab (= in file qt-settings).

I also see no reason why Octave would start in Windows' system32 folder; I suppose that can only happen if no start directory has been set anywhere and Windows' program launcher location is substituted (that probably lives in %WINDIR%\system32).
I know too little about NSIS to say anything more specific here.

Philip Nienhuis <philipnienhuis>
Project Member
Thu 10 Sep 2015 04:21:03 AM UTC, comment #4:

Doug Stewart reported by email (which doesn't get recorded by the tracker):

"I saw this also. Just the first run from the installer."

Just recording that here.

Lloyd Wood <lloydwood>
Thu 10 Sep 2015 12:54:13 AM UTC, comment #3:

If you want to be able to install Octave in a path with spaces, please help make that happen if it's important to you. And please report as a separate bug report if so.

Let's keep this bug report focused on the original, which was that the working directory was C:\Windows\system32 the first time Octave started and different on subsequent runs.

Can any other Windows users/devs confirm or have any insight?

Mike Miller <mtmiller>
Project Administrator
Wed 09 Sep 2015 11:12:22 AM UTC, comment #2:

Handling spaces in pathnames correctly is done by escaping the space (backslash then space) or by placing quotes around string variables containing pathnames that may have spaces.

And it's essential for working on Mac OS X.

If a pathname with spaces can't be handled, it's a bug to be fixed with quoting and escaping.

Lloyd Wood <lloydwood>
Wed 09 Sep 2015 07:20:37 AM UTC, comment #1:

"Also related to install, it's very odd that Octave installs under C:\Octave rather than under Program Files (x86)\Octave or Program Files\octave;"

It is, but programs from a UNIX environment hates whitespace in filenames despite a valid filename can contain any character except '/' and '\0'. Thus octave cannot be installed in "Program Files (x86)"

Anonymous
Wed 09 Sep 2015 06:27:44 AM UTC, original submission:

On installing Octave 4.0 on Windows (7, Enterprise, my account has admin privileges, installed under that account) and running for the first time, Octave's directory path was initially set to C:\Windows\system32

An odd choice - users should never see that.

On subsequent launches of Octave its path was set to C:\Users\myaccount
as you would expect. Possibly something not being fully initialised by the installer?

[Also related to install, it's very odd that Octave installs under C:\Octave rather than under Program Files (x86)\Octave or Program Files\octave; Octave configured for i686-w64-mingw32. Not clear from that if I'm running a 32 or 64 bit version, though mingw32 suggests 32-bit, ie should be under Program Files\ and that I'm going to run into problems with large datasets...

If I need to debug differences in behaviour between 32 and 64-bit versions (as I do with Cygwin itself - I have both installed, and they do exhibit behavioural differences), how would I even do that? Would expect to see a 32/64-bit installation option for 64-bit systems eventually.]

Lloyd Wood <lloydwood>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #34897:  bug45899.patch added by lostbard (3KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by avinoam (Posted a comment)
  • -unavailable- added by lostbard (Posted a comment)
  • -unavailable- added by mtmiller (Posted a comment)
  • -unavailable- added by lloydwood (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 11 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 21 Sep 2015 06:22:21 PM UTClostbardStatusReady For Test=>Fixed
      Open/ClosedOpen=>Closed
    Sat 19 Sep 2015 12:11:43 PM UTClostbardStatusPatch Submitted=>Ready For Test
    Wed 16 Sep 2015 12:22:23 PM UTClostbardAttached File-=>Added bug45899.patch, #34897
      StatusConfirmed=>Patch Submitted
    Tue 15 Sep 2015 09:36:12 PM UTClostbardStatusNeed Info=>Confirmed
      Assigned toNone=>lostbard
    Thu 10 Sep 2015 12:54:13 AM UTCmtmillerCategoryNone=>Interpreter
      Item GroupNone=>Incorrect Result
      StatusNone=>Need Info
      SummaryInstalling on Windows - file directory=>Installing on Windows - initial working directory

    Back to the top


    Powered by Savane 3.1-cleanup1