Issue 5255 in pharo: windows startup errors, in #14317

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

Issue 5255 in pharo: windows startup errors, in #14317

pharo
Status: New
Owner: ----

New issue 5255 by [hidden email]: windows startup errors,  in #14317
http://code.google.com/p/pharo/issues/detail?id=5255


Pharo1.4a
Latest update: #14317

ShouldBeImplemented: #preferencesFolder should have been implemented in  
DosFileDirectory class

here the cs which fixing the issue by ignoring unimplemented stuff. so it  
doesn't makes startup scrript working, but at least doesn't barks on every  
image start and save.

Benjamin, check this.

Attachments:
        startupfixes.1.cs  3.6 KB


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5255 in pharo: windows startup errors, in #14317

pharo
Updates:
        Status: Workneeded
        Labels: Milestone-1.4

Comment #1 on issue 5255 by [hidden email]: windows startup errors,  
in #14317
http://code.google.com/p/pharo/issues/detail?id=5255

(No comment was entered for this change.)


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5255 in pharo: windows startup errors, in #14317

pharo

Comment #2 on issue 5255 by [hidden email]: windows startup  
errors,  in #14317
http://code.google.com/p/pharo/issues/detail?id=5255

I fixed this in my image Pharo-1.4-14315 as follows...

DosFileDirectory>>preferencesFolder
        | folderStringName list configPath path directory osMajorVer |

        folderStringName := 'Pharo\',SystemVersion current major  
asString,'.',SystemVersion current minor asString.
       
        "First try to adhere to Microsoft conventions.  ( We  really should be  
reading environment variables since %SYSTEMDRIVE% may not be C: )"
        "Windows OS Version numbers from  
http://msdn.microsoft.com/en-us/library/windows/desktop/ms724832%28v=vs.85%29.aspx"
       
        osMajorVer := Smalltalk os osVersion first.
        osMajorVer = $5 ifTrue: [ configPath := 'C:\Documents and Settings\All  
Users\'].
        osMajorVer = $6 ifTrue: [ configPath := 'C:\ProgramData\'].
        path := configPath, folderStringName,self slash.
        directory := self forFileName: path.
        directory exists  ifTrue: [ ^ directory ].
       
        "Fall back in case system locked down so user has not been able to create  
folders per Microsoft conventions above"
       
        list := (self default fullName subStrings: self slash) copyFrom: 1 to: 2.
        configPath := (list joinUsing: self slash) , self slash, '_config' , self  
slash.
        path := configPath, folderStringName,self slash.
        directory := self forFileName: path.
        ^ directory.
       


DosFileDirectory>>preferencesGeneralFolder
        "DosFileDirectory preferencesGeneralFolder"

        | directory path |
        path := self preferencesFolder fullName ,  '\general' .
        directory := self forFileName: path.
        ^ directory.




_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5255 in pharo: windows startup errors, in #14317

pharo
Updates:
        Cc: [hidden email]

Comment #3 on issue 5255 by [hidden email]: windows startup errors,  
in #14317
http://code.google.com/p/pharo/issues/detail?id=5255

(No comment was entered for this change.)


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5255 in pharo: windows startup errors, in #14317

pharo

Comment #4 on issue 5255 by [hidden email]: windows startup  
errors,  in #14317
http://code.google.com/p/pharo/issues/detail?id=5255

Whoops! HOLD preferencesGeneralFolder. I got the semantics wrong.
Its pharo\general not pharo\1.4\general.
Update shortly.


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5255 in pharo: windows startup errors, in #14317

pharo

Comment #5 on issue 5255 by [hidden email]: windows startup  
errors,  in #14317
http://code.google.com/p/pharo/issues/detail?id=5255

The attached fileout works for me.

Verified that the example1 script from four locations...
C:\ProgramData\Pharo\1.4\startup.st
C:\ProgramData\Pharo\general\startup.st
C:\Apps\_config\Pharo\1.4\startup.st
C:\Apps\_config\Pharo\general\startup.st


Attachments:
        DosFileDirectory class-#StartupPreferences.st  1.5 KB


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5255 in pharo: windows startup errors, in #14317

pharo

Comment #6 on issue 5255 by [hidden email]: windows startup  
errors,  in #14317
http://code.google.com/p/pharo/issues/detail?id=5255

I thought maybe a cs file was preferred over a st file, so here it is.
(Note - my first cs file so let me know if I;ve done anything wrong.


Attachments:
         
Issue-5255-DosFileDirectory-preference-folders.BenjaminTerrenceComan.1.1.cs  
1.8 KB


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5255 in pharo: windows startup errors, in #14317

pharo
Updates:
        Status: FixReviewNeeded
        Labels: Type-Bug

Comment #7 on issue 5255 by [hidden email]: windows startup errors,  
in #14317
http://code.google.com/p/pharo/issues/detail?id=5255

(No comment was entered for this change.)


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5255 in pharo: windows startup errors, in #14317

pharo

Comment #8 on issue 5255 by [hidden email]: windows startup errors,  
in #14317
http://code.google.com/p/pharo/issues/detail?id=5255

For me the code of Ben (Comment 6) seems correct.

It works on my virtual machine using Windows 7


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5255 in pharo: windows startup errors, in #14317

pharo
Updates:
        Status: FixToInclude

Comment #9 on issue 5255 by [hidden email]: windows startup errors,  
in #14317
http://code.google.com/p/pharo/issues/detail?id=5255

(No comment was entered for this change.)


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5255 in pharo: windows startup errors, in #14317

pharo
Updates:
        Status: Integrated

Comment #10 on issue 5255 by [hidden email]: windows startup  
errors,  in #14317
http://code.google.com/p/pharo/issues/detail?id=5255

in 14336


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5255 in pharo: windows startup errors, in #14317

pharo

Comment #11 on issue 5255 by [hidden email]: windows startup  
errors,  in #14317
http://code.google.com/p/pharo/issues/detail?id=5255

I have just found a good lsit of Windows version, so I'll record here for  
posterity.
source: http://www.msigeek.com/442/windows-os-version-numbers

The Windows version is actually composed of a bunch of different fields,  
all packed into an OSVERSIONINFO structure. The relevant parts of the  
OSVERSIONINFO are:

     Major Version (dwMajorVersion)
     Minor Version (dwMinorVersion)
     Build # (dwBuildNumber)

for which...

Operating System Version Number
Windows 1.0                     1.04
Windows 2.0                     2.11
Windows 3.0                3
Windows NT 3.1                  3.10.528
Windows for Workgroups 3.11     3.11
Windows NT Workstation 3.5      3.5.807
Windows NT Workstation 3.51     3.51.1057
Windows 95                      4.0.950
Windows NT Workstation 4.0      4.0.1381
Windows 98                      4.1.1998
Windows 98 Second Edition       4.1.2222
Windows Me                      4.90.3000
Windows 2000 Professional       5.0.2195
Windows XP                      5.1.2600
Windows Server 2003             5.2
Windows Server 2003 R2          5.2
Windows Vista                   6.0.6000
Windows Server 2008             6.0
Windows Server 2008 R2          6.1
Windows 7                       6.1.7600



_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5255 in pharo: windows startup errors, in #14317

pharo

Comment #12 on issue 5255 by [hidden email]: windows startup  
errors,  in #14317
http://code.google.com/p/pharo/issues/detail?id=5255

Took a while but finally found a good compilation of standard application  
folder locations for older versions of windows at  
http://www.tarma.com/support/im7/using/pages/typicalpaths.htm




_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5255 in pharo: windows startup errors, in #14317

pharo

Comment #13 on issue 5255 by [hidden email]: windows startup  
errors,  in #14317
http://code.google.com/p/pharo/issues/detail?id=5255

Some more coroborating links...

http://www.codeproject.com/Articles/10476/Easily-Get-and-Compare-OS-Version-Information

http://msdn.microsoft.com/en-us/library/ms724833

http://www.codeproject.com/Articles/10476/Easily-Get-and-Compare-OS-Version-Information

http://www.nirmaltv.com/2009/08/17/windows-os-version-numbers/

So I think the following is a pragmatic result...

        osMajorVer := Smalltalk os osVersion first.
         osMinorVer := Smalltalk os osVersion third.
         osMajorVer = $6 ifTrue: [ rootPath := 'C:\ProgramData\Pharo\'  
].   "Vista, 2008, 7"
         osMajorVer = $5 ifTrue: [ rootPath := 'C:\Documents and  
Settings\All Users\Pharo\' ]. "2000, XP, 2003"
         osMajorVer = $4 ifTrue:
         [   rootPath := 'C:\Windows\All Users\Application  
Data\Pharo\' . "98, 98SE, Me"
             osMinorVer = $0 ifTrue: [ rootPath := 'C:\WinNT\Profiles\All  
Users\Application Data\Pharo\' .    "NT 4"
         ]
         osMajorVer = $3 ifTrue: [ rootPath := C:\WinNT\Profiles\All  
Users\Application Data\Pharo\' ] . "NT 3.1 3.5 3.51"

         ( self forFileName: rootPath ) exists ifTrue: [ ^rootPath ].

"Known Windows versions and program data locations
"refer to tracker issue 5255 for list"
Operating System Version Number
TOO OLD - DON'T CARE - USE THE SAME AS NT.
Windows 1.0                     1.04
Windows 2.0                     2.11
Windows 3.0                3
Windows for Workgroups 3.11     3.11
Windows 95                      4.0.950

C:\WinNT\Profiles\All Users\Application Data\Pharo\
Windows NT 3.1                  3.10.528
Windows NT Workstation 3.5      3.5.807
Windows NT Workstation 3.51     3.51.1057
Windows NT Workstation 4.0      4.0.1381

C:\Windows\All Users\Application Data\Pharo\
Windows 98                      4.1.1998
Windows 98 Second Edition       4.1.2222
Windows Me                      4.90.3000

C:\Documents and Settings\All Users\ApplicationData\Pharo\
Windows 2000 Professional       5.0.2195
Windows XP                      5.1.2600
Windows Server 2003             5.2
Windows Server 2003 R2          5.2

C:\ProgramData\Pharo\
Windows Vista                   6.0.6000
Windows Server 2008             6.0
Windows Server 2008 R2          6.1
Windows 7                       6.1.7600



_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker