Addressing a user problem with the packaged version of RUR-PLE, I
modified rur_start.py to save rur files in their home directory (under
Linux, Windows and Mac). I haven't done the same yet for world files but
I need to do it as well. The problem is as follows:
- (prior to my fix) rur-ple opens and saves files from the installation
directory. In source code mode it's usually a user (writable) folder. In
packaged version it is either /usr/share/rur-ple/rur_programs or
/opt/rur-ple/rur_programs or C:\Programs Files\rur-ple\rur_programs. On
Linux those directories are read only to the user (so the writing
operation fails - without a warning) and on Windows (and Linux) personal
files should be written in the My Documents folder (/home/user on
Linux). On Mac I assume there is a similar logic.
Same goes for World files.
So right now with my fix, one opens new files from the installed
directory (unchanged) and can find all the sample files - great!, one
saves his personal files in his home folder - great too!
BUT then if he wants to retrieve his own files he finds himself ("open
file" case) in the samples directory and needs to know where he
initially saved his files to find them again. It's probably ok for an
advanced user, but for kids in a classroom (or an unprepared teacher) it
is quite complicated.
How do you think we should handle the case (for both rur and wld files)?
Thanks for the advices as I haven't found a pleasing solution yet.
Fred
So we've been discussing of one way to do that yesterday which is:
check HDD space
if ok
create a rurple user files folder
copy over the sample files
else error (what should we do here?)
read and write from that new created user folder(s)
-> problem is now that if you upgrade the software those sample files
don't get upgraded (or they get overwritten which could mean erasing the
user work should he have modified those without renaming them).
So then maybe when there is an upgrade (or new install - not sure how
windows/mac installers manage this) check if user folder exists and if
so backup and rename the sample files? (then we will automatically
backup even unmodified sample files).
Well any idea/suggestion is welcome.
Thanks.
Fred
:-)
Just a quick answer for me below. (I will be away most of the day today.)
>
> So we've been discussing of one way to do that yesterday which is:
> check HDD space
> if ok
> create a rurple user files folder
> copy over the sample files
> else error (what should we do here?)
It depends what kind of error...
> read and write from that new created user folder(s)
>
> -> problem is now that if you upgrade the software those sample files don't
> get upgraded (or they get overwritten which could mean erasing the user work
> should he have modified those without renaming them).
>
To my mind, this is a false problem. If the user has modified the
sample files, it means he/she is familiar with them. In this case,
there is no need to provide anything else anew.
Note that the sample files I was providing were actually mostly some
tests I was doing myself. Originally, I had planned to remove them
from the distribution and have users (teachers) contact me directly if
they needed help.
> So then maybe when there is an upgrade (or new install - not sure how
> windows/mac installers manage this) check if user folder exists and if so
> backup and rename the sample files? (then we will automatically backup even
> unmodified sample files).
>
I'd go even one step simpler: if user folder exists, do not do anything.
Cheers,
André