Issue 5835 in pharo: Improved version of StartupPreferences

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

Issue 5835 in pharo: Improved version of StartupPreferences

pharo
Status: Accepted
Owner: marianopeck
Labels: Type-Enh Milestone-2.0

New issue 5835 by marianopeck: Improved version of StartupPreferences
http://code.google.com/p/pharo/issues/detail?id=5835

Hi guys. After playing a little bit with StartupPreferences, and continuing  
the effort of Ben, I generate a improved (from my point of view) version of  
the tool.

The main changes are:

a) Previously the tool searched files 1) first in image directory, 2) then  
in the preference folder and 3) finally in the general preference folder.  
As soon as it found at least one file, I didn't continue with the rest of  
the places. Now, it starts the other way around, from the most general to  
the most spceific. Starts in 3), then 2) and finally 3). Moreover, it does  
not stop when it finds files in any of them. So all are searched and  
executed. It works or or less the same way as variables in UNIX  
with .bashrc /etc/envirorment, etc...

b) I have created several class side methods (addAtStartup*) to create  
given actions into the current directory. Previously, files were created in  
2 folders at the same time and there were only the possibility to create  
only in one place. Now you can add startup actions in any of the 3 places  
mentioned in a)

c) Added a whole protocol (remove* and clean*) to remove script files from  
all folders of a) and also to clean the internal stored actions.

d) Lots of internal refactors to reuse code and less hardcoding.

Does someone want to take a look to the slice ?


_______________________________________________
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 5835 in pharo: Improved version of StartupPreferences

pharo
Updates:
        Status: FixReviewNeeded
        Cc: [hidden email] [hidden email]

Comment #1 on issue 5835 by marianopeck: Improved version of  
StartupPreferences
http://code.google.com/p/pharo/issues/detail?id=5835

Fix in inbox.

Name:  
SLICE-Issue-5835-Improved-version-of-StartupPreferences-MarianoMartinezPeck.1
Author: MarianoMartinezPeck
Time: 7 May 2012, 10:20:15.046 pm
UUID: 59941974-d01c-49c5-a6e4-f8d477c051b2
Ancestors:
Dependencies: StartupPreferences-MarianoMartinezPeck.38

Fix to issue 5835


_______________________________________________
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 5835 in pharo: Improved version of StartupPreferences

pharo

Comment #2 on issue 5835 by [hidden email]: Improved version  
of StartupPreferences
http://code.google.com/p/pharo/issues/detail?id=5835

I haven't gone through the new methods in detail, but I've expanded the fix  
to resolve the issue with Windows.  Part of this is allowing some  
flexibility where in the parent path from the image folder up to the root  
the preferences folders sits - rather than having it hardcoded at two  
levels from root.


Name: SLICE-Issue-5835-Improved-version-of-StartupPreferences-BenComan.2
Author: BenComan
Time: 9 May 2012, 12:52:56.721 am
UUID: b61f55a3-0564-1b4d-933e-2e9f5f7fdde6
Ancestors:  
SLICE-Issue-5835-Improved-version-of-StartupPreferences-MarianoMartinezPeck.1
Dependencies: StartupPreferences-BenComan.39

Ammend fix for 5835 to also fix for 5618.

No longer hardcode config folder at two levels from root.
Instead search for config folder in each parent folder ascending from image  
towards root.

Throw away trying to fit into standard Microsoft structure for installed  
programs across multiple OS and Internationalised versions.


_______________________________________________
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 5835 in pharo: Improved version of StartupPreferences

pharo

Comment #3 on issue 5835 by [hidden email]: Improved version  
of StartupPreferences
http://code.google.com/p/pharo/issues/detail?id=5835

Link to issue 5618


_______________________________________________
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 5835 in pharo: Improved version of StartupPreferences

pharo

Comment #4 on issue 5835 by marianopeck: Improved version of  
StartupPreferences
http://code.google.com/p/pharo/issues/detail?id=5835

Hi Ben. The slice looks broken since the StartupPreferences-BenComan.39 is  
not in inbox :(


_______________________________________________
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 5835 in pharo: Improved version of StartupPreferences

pharo

Comment #5 on issue 5835 by marianopeck: Improved version of  
StartupPreferences
http://code.google.com/p/pharo/issues/detail?id=5835

Anyway, if the changes are the same of issue 5618, I can try to recreate  
another working slice. One question.... can you try something?

1) Download the first slice I have publish in this issue.
2) Save that image.
3) Evaluate the method #example4 of StartupLoader.
4) Open again the saved image from command line.

Can you see the correct output in the console?




_______________________________________________
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 5835 in pharo: Improved version of StartupPreferences

pharo

Comment #6 on issue 5835 by [hidden email]: Improved version  
of StartupPreferences
http://code.google.com/p/pharo/issues/detail?id=5835

Sorry about the missing StartupPreferences-BenComan.39.  Still new at this.
But no... the changes are not the same as issue 5618.  I have backed away  
from that approach.  I have uploaded StartupPreferences-BenComan.39.  I  
hope you like it.

The issue this addresses is that that the location of the preference folder  
is HARD CODED at two levels down from root.
For instance, '/Users/mariano/.config/pharo/2.0/basicSettings.st' works
where .config is located two levels down from root.
but I  
believe '/Users/Department/mariano/.config/pharo/2.0/basicSettings.st'  
would be broken.
Or equally broken would be having Pharo on a pen drive in  
windows 'F:\.config\pharo/2.0/basicSettings.st'


_______________________________________________
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 5835 in pharo: Improved version of StartupPreferences

pharo

Comment #7 on issue 5835 by [hidden email]: Improved version  
of StartupPreferences
http://code.google.com/p/pharo/issues/detail?id=5835

FileStream stdout lf; nextPutAll: 'Setting general preferences for Pharo  
2.0'; lf.
does not work from Workspace for me on Windows 7.  It errors  
with "FileWriteError: File stdout write failed"

See perhaps the end of
http://forum.world.st/Using-stdout-in-Windows-gt-File-stdout-is-closed-td4541758.html


_______________________________________________
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 5835 in pharo: Improved version of StartupPreferences

pharo

Comment #8 on issue 5835 by [hidden email]: Improved version  
of StartupPreferences
http://code.google.com/p/pharo/issues/detail?id=5835

Does StartupPreferences use of FileDirectory need to be converted to use  
FileSystem?


_______________________________________________
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 5835 in pharo: Improved version of StartupPreferences

pharo
Updates:
        Status: FixToInclude

Comment #9 on issue 5835 by marianopeck: Improved version of  
StartupPreferences
http://code.google.com/p/pharo/issues/detail?id=5835

Please, integrate this final version.
IMPORTANT: pay attention to the version of the slice. It HAS to be this one:

Name:  
SLICE-Issue-5835-Improved-version-of-StartupPreferences-MarianoMartinezPeck.3
Author: MarianoMartinezPeck
Time: 12 May 2012, 11:13:38.965 am
UUID: cf2b23b9-b3d9-4fad-8067-866bbab6a5a2
Ancestors:
Dependencies: StartupPreferences-MarianoMartinezPeck.41

THIS IS THE FINAL COMMIT.


_______________________________________________
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 5835 in pharo: Improved version of StartupPreferences

pharo
Updates:
        Status: Integrated

Comment #10 on issue 5835 by [hidden email]: Improved version of  
StartupPreferences
http://code.google.com/p/pharo/issues/detail?id=5835

in 20071


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