Re: [Bf-committers] Installation/file paths

2010-05-14 Thread Matt Ebb
On 11/05/2010, at 18:16 , Matt Ebb wrote:

 http://wiki.blender.org/index.php/Dev:2.5/Source/Installation/Proposal

Ok, I've got a first version of this implemented as a patch here:
https://projects.blender.org/tracker/index.php?func=detailaid=22339group_id=9atid=127

It's working properly on OS X here, though it's not using the system APIs to 
construct the paths, just done manually at the moment. If anyone (i.e. platform 
maintainers etc) would like to take a look that would be great.

cheers,

Matt
___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] Installation/file paths

2010-05-12 Thread GSR
Hi,
ideasma...@gmail.com (2010-05-12 at 0933.27 +0200):
 By the way, last time I checked - gimp do this for their swap folder,
 I recall having to point this elsewhere when we used networked home
 dir's at the blender institute.

Did you know they also do not create back ups of files so a failed
save can mean lost work? And that they never save work in progress,
losing work again? Sorry but Foo throws trash in the street, so it is
right to throw it is not a valid reason.

Also, some systems default to faster defaults for placed used for temp
files which means you get better speed too, not just the automatic
cleanups.

GSR
 
___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] Installation/file paths

2010-05-12 Thread GSR
Hi,
d...@trollwerks.org (2010-05-12 at 1103.23 -0700):
 I believe they changed the /tmp directory because it is cleaned out on
 reboot which kind of breaks 'recover last session'. Or at least kind of
 recall reading that in the .deb changelog.

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=298167 security.

 Depends on a separate partition for /tmp I'd imagine.

Separate logical partition, yes, disk based, no (tmpfs uses swap when
memory is needed), some OSes do it by default.

GSR
 
___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


[Bf-committers] Installation/file paths

2010-05-11 Thread Matt Ebb
Hi,

My main task this week is to get the issue of installation and file paths under 
control, hopefully before the beta release, and definitely before the stable 
release.

Several differing proposals have been made for this in the past, with no clear 
consensus and agreement, and there are several messy competing systems in 
Blender's source right now which need to be cleaned. I've read over the various 
proposals, and tried to amalgamate something that unifies the ideas and meets 
all the requirements in each.

The focus here is on a short-term, achievable target of clearing up 
installation and finding resource file paths. Other things such as UNC paths, 
unicode/international file access, wrapping FILE pointers etc can be considered 
separate issues, and looked at after a stable release - this is specifically 
regarding retrieving system/user data paths.

Anyway, my proposal is here:

http://wiki.blender.org/index.php/Dev:2.5/Source/Installation/Proposal

I hope that this enough to quickly agree on and get moving.

cheers,

Matt
___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] Installation/file paths

2010-05-11 Thread Rob M
 -Original Message-
 From: bf-committers-boun...@blender.org [mailto:bf-committers-
 boun...@blender.org] On Behalf Of Matt Ebb
 Sent: Tuesday, May 11, 2010 9:17 AM
 To: Bf-committers@blender.org
 Subject: [Bf-committers] Installation/file paths
 
 Hi,
 
 My main task this week is to get the issue of installation and file
 paths under control, hopefully before the beta release, and definitely
 before the stable release.
 
 Several differing proposals have been made for this in the past, with
 no clear consensus and agreement, and there are several messy competing
 systems in Blender's source right now which need to be cleaned. I've
 read over the various proposals, and tried to amalgamate something that
 unifies the ideas and meets all the requirements in each.
 
 The focus here is on a short-term, achievable target of clearing up
 installation and finding resource file paths. Other things such as UNC
 paths, unicode/international file access, wrapping FILE pointers etc
 can be considered separate issues, and looked at after a stable release
 - this is specifically regarding retrieving system/user data paths.
 
 Anyway, my proposal is here:
 
 http://wiki.blender.org/index.php/Dev:2.5/Source/Installation/Proposal


I agree with most of this but why can't the default location for the system
data files be in the datafiles sub directory of the directory where the
blender executable resides? 

This is almost the same (but not quite) as your proposal for Windows and Mac
OS and it makes it a lot easier to run self contained versions and you don't
require a version number in this case as you shouldn't have different
versions on blender in the same directory on windows and the blender.app
folder on the Mac makes it a single version. 
Things are a lot different on unix where the norm seems to be for an
application to scatter itself among a number of directories rather than the
Mac where the ideal is a single .app folder and preferences located
separately or windows where it moving towards a single folder for the
application and specific separate locations for read / write data.


___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] Installation/file paths

2010-05-11 Thread Campbell Barton
Hey Matt, read through the proposal and most of this seems like common
sense to me, so +1

The choice of using env var's Im not fussed with, it could be solved
with / without IMHO, env vars have their own advantages of course.
But take care to avoid Env var lookups per redraw as we had in the
game engine IIRC.

Another issue is quit.blend's cluttering up the temp dir if they get
unique names.
this already happens with the session blend's so I guess doesn't need
to be solved initially but would be good to think of how it could be
managed.

On Tue, May 11, 2010 at 10:16 AM, Matt Ebb m...@mke3.net wrote:
 Hi,

 My main task this week is to get the issue of installation and file paths 
 under control, hopefully before the beta release, and definitely before the 
 stable release.

 Several differing proposals have been made for this in the past, with no 
 clear consensus and agreement, and there are several messy competing systems 
 in Blender's source right now which need to be cleaned. I've read over the 
 various proposals, and tried to amalgamate something that unifies the ideas 
 and meets all the requirements in each.

 The focus here is on a short-term, achievable target of clearing up 
 installation and finding resource file paths. Other things such as UNC paths, 
 unicode/international file access, wrapping FILE pointers etc can be 
 considered separate issues, and looked at after a stable release - this is 
 specifically regarding retrieving system/user data paths.

 Anyway, my proposal is here:

 http://wiki.blender.org/index.php/Dev:2.5/Source/Installation/Proposal

 I hope that this enough to quickly agree on and get moving.

 cheers,

 Matt
 ___
 Bf-committers mailing list
 Bf-committers@blender.org
 http://lists.blender.org/mailman/listinfo/bf-committers




-- 
- Campbell
___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] Installation/file paths

2010-05-11 Thread Brecht Van Lommel
Hi,

On Tue, May 11, 2010 at 10:40 AM, Rob M rob.nos...@4mation.co.uk wrote:
 I agree with most of this but why can't the default location for the system
 data files be in the datafiles sub directory of the directory where the
 blender executable resides?

Proposal looks fine to me, but I agree with this. We can avoid a
wrapper script, making it use the folder in the same directory doesn't
conflict, so it could just look for a datafiles in the same folder
first.

Brecht.
___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] Installation/file paths

2010-05-11 Thread Charles Wardlaw
Hi,

I like everything you've got there, Matt, and other folks have voiced the 
pertinent questions.
~ C 



On 2010-05-11, at 4:16 AM, Matt Ebb wrote:

 Hi,
 
 My main task this week is to get the issue of installation and file paths 
 under control, hopefully before the beta release, and definitely before the 
 stable release.
 
 Several differing proposals have been made for this in the past, with no 
 clear consensus and agreement, and there are several messy competing systems 
 in Blender's source right now which need to be cleaned. I've read over the 
 various proposals, and tried to amalgamate something that unifies the ideas 
 and meets all the requirements in each.
 
 The focus here is on a short-term, achievable target of clearing up 
 installation and finding resource file paths. Other things such as UNC paths, 
 unicode/international file access, wrapping FILE pointers etc can be 
 considered separate issues, and looked at after a stable release - this is 
 specifically regarding retrieving system/user data paths.
 
 Anyway, my proposal is here:
 
 http://wiki.blender.org/index.php/Dev:2.5/Source/Installation/Proposal
 
 I hope that this enough to quickly agree on and get moving.
 
 cheers,
 
 Matt
 ___
 Bf-committers mailing list
 Bf-committers@blender.org
 http://lists.blender.org/mailman/listinfo/bf-committers

___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] Installation/file paths

2010-05-11 Thread Diego B
Hi Matt,

+1 for me.

On Tue, May 11, 2010 at 6:37 AM, Brecht Van Lommel bre...@blender.orgwrote:

 Hi,

 On Tue, May 11, 2010 at 10:40 AM, Rob M rob.nos...@4mation.co.uk wrote:
  I agree with most of this but why can't the default location for the
 system
  data files be in the datafiles sub directory of the directory where the
  blender executable resides?

 Proposal looks fine to me, but I agree with this. We can avoid a
 wrapper script, making it use the folder in the same directory doesn't
 conflict, so it could just look for a datafiles in the same folder
 first.

 Brecht.
 ___
 Bf-committers mailing list
 Bf-committers@blender.org
 http://lists.blender.org/mailman/listinfo/bf-committers

___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] Installation/file paths

2010-05-11 Thread Bassam Kurdali
My only suggestion is that quit.blend and files currently saved in /tmp
should just be saved in the same folder as the blend file.
99% of the time you have to copy them there from commandline/external
file manager because saving to /tmp (or elsewhere) just breaks all
external references. (I guess there is a slight problem if the user
already has a file called quit.blend, but it can be solved I think by
picking in that case a different name like quit.blend1 or always using a
slightly different extension ( like quit.quitblend)
No big deal though, at least things don't get worse :)
cheers
Bassam

On Tue, 2010-05-11 at 18:16 +1000, Matt Ebb wrote:
 Hi,
 
 My main task this week is to get the issue of installation and file paths 
 under control, hopefully before the beta release, and definitely before the 
 stable release.
 
 Several differing proposals have been made for this in the past, with no 
 clear consensus and agreement, and there are several messy competing systems 
 in Blender's source right now which need to be cleaned. I've read over the 
 various proposals, and tried to amalgamate something that unifies the ideas 
 and meets all the requirements in each.
 
 The focus here is on a short-term, achievable target of clearing up 
 installation and finding resource file paths. Other things such as UNC paths, 
 unicode/international file access, wrapping FILE pointers etc can be 
 considered separate issues, and looked at after a stable release - this is 
 specifically regarding retrieving system/user data paths.
 
 Anyway, my proposal is here:
 
 http://wiki.blender.org/index.php/Dev:2.5/Source/Installation/Proposal
 
 I hope that this enough to quickly agree on and get moving.
 
 cheers,
 
 Matt
 ___
 Bf-committers mailing list
 Bf-committers@blender.org
 http://lists.blender.org/mailman/listinfo/bf-committers

-- 
PGP public key http://freefac.org/misc/public.key

___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] Installation/file paths

2010-05-11 Thread Ken Hughes
Before I comment, let me be sure I understand what's being proposed:

On Unix, the blender executable would most likely be /usr/bin/blender.  
So the proposal is to have a /usr/bin/datafiles folder for the system 
data files?  If so, I don't think that's a good idea, for Unix anyway.  
You don't expect to find any data in /usr/bin.

Ken

On 05/11/2010 02:37 AM, Brecht Van Lommel wrote:
 Hi,

 On Tue, May 11, 2010 at 10:40 AM, Rob Mrob.nos...@4mation.co.uk  wrote:

 I agree with most of this but why can't the default location for the system
 data files be in the datafiles sub directory of the directory where the
 blender executable resides?
  
 Proposal looks fine to me, but I agree with this. We can avoid a
 wrapper script, making it use the folder in the same directory doesn't
 conflict, so it could just look for a datafiles in the same folder
 first.

 Brecht.
 ___
 Bf-committers mailing list
 Bf-committers@blender.org
 http://lists.blender.org/mailman/listinfo/bf-committers



___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] Installation/file paths

2010-05-11 Thread Roger Wickes
i would hope the blender executable is in usr/bin/blender/2.52 
so that we can have multiple versions of blender installed (2.49, 2.52, svn)

 --Roger


Check out my website at www.rogerwickes.com for a good deal on my book and 
training course, as well as information about my latest activities. Use coupon
Papasmurf for $15 off!





From: Ken Hughes khug...@pacific.edu
To: bf-blender developers bf-committers@blender.org
Sent: Tue, May 11, 2010 11:07:02 AM
Subject: Re: [Bf-committers] Installation/file paths

Before I comment, let me be sure I understand what's being proposed:

On Unix, the blender executable would most likely be /usr/bin/blender.  
So the proposal is to have a /usr/bin/datafiles folder for the system 
data files?  If so, I don't think that's a good idea, for Unix anyway.  
You don't expect to find any data in /usr/bin.

Ken

On 05/11/2010 02:37 AM, Brecht Van Lommel wrote:
 Hi,

 On Tue, May 11, 2010 at 10:40 AM, Rob Mrob.nos...@4mation.co.uk  wrote:

 I agree with most of this but why can't the default location for the system
 data files be in the datafiles sub directory of the directory where the
 blender executable resides?
  
 Proposal looks fine to me, but I agree with this. We can avoid a
 wrapper script, making it use the folder in the same directory doesn't
 conflict, so it could just look for a datafiles in the same folder
 first.

 Brecht.
 ___
 Bf-committers mailing list
 Bf-committers@blender.org
 http://lists.blender.org/mailman/listinfo/bf-committers



___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers



  
___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] Installation/file paths

2010-05-11 Thread Diego B
Hi,

On Tue, May 11, 2010 at 12:07 PM, Ken Hughes khug...@pacific.edu wrote:

 Before I comment, let me be sure I understand what's being proposed:

 On Unix, the blender executable would most likely be /usr/bin/blender.
 So the proposal is to have a /usr/bin/datafiles folder for the system
 data files?  If so, I don't think that's a good idea, for Unix anyway.
 You don't expect to find any data in /usr/bin.

The proposal say:

 /usr/share/blender/2.52/datafiles

and

~/.blender/2.52/datafiles

The datafiles in the same folder that blender is only if you don't
want install Blender, download the file, unpack and run from the same
directory, so it's all the files there (or that is what I understand
from Brecht)

anyway... is this right ? Matt ?


 Ken

 On 05/11/2010 02:37 AM, Brecht Van Lommel wrote:
  Hi,
 
  On Tue, May 11, 2010 at 10:40 AM, Rob Mrob.nos...@4mation.co.uk  wrote:
 
  I agree with most of this but why can't the default location for the system
  data files be in the datafiles sub directory of the directory where the
  blender executable resides?
 
  Proposal looks fine to me, but I agree with this. We can avoid a
  wrapper script, making it use the folder in the same directory doesn't
  conflict, so it could just look for a datafiles in the same folder
  first.
 
  Brecht.
  ___
  Bf-committers mailing list
  Bf-committers@blender.org
  http://lists.blender.org/mailman/listinfo/bf-committers
 
 

 ___
 Bf-committers mailing list
 Bf-committers@blender.org
 http://lists.blender.org/mailman/listinfo/bf-committers
___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] Installation/file paths

2010-05-11 Thread Ken Hughes
Using gcc as an example (since it's possible to have multiple versions 
installed):

On Ubuntu at least, they are called /usr/bin/gcc-4.1, /usr/bin/gcc-4.2, 
etc., with a symbolic link /usr/bin/gcc to one of the versions.  I 
assume other Unix variants do something similar?

Ken

On 05/11/2010 08:10 AM, Roger Wickes wrote:
 i would hope the blender executable is in usr/bin/blender/2.52
 so that we can have multiple versions of blender installed (2.49, 2.52, svn)

   --Roger


 Check out my website at www.rogerwickes.com for a good deal on my book and
 training course, as well as information about my latest activities. Use coupon
 Papasmurf for $15 off!




 
 From: Ken Hugheskhug...@pacific.edu
 To: bf-blender developersbf-committers@blender.org
 Sent: Tue, May 11, 2010 11:07:02 AM
 Subject: Re: [Bf-committers] Installation/file paths

 Before I comment, let me be sure I understand what's being proposed:

 On Unix, the blender executable would most likely be /usr/bin/blender.
 So the proposal is to have a /usr/bin/datafiles folder for the system
 data files?  If so, I don't think that's a good idea, for Unix anyway.
 You don't expect to find any data in /usr/bin.

 Ken

 On 05/11/2010 02:37 AM, Brecht Van Lommel wrote:

 Hi,

 On Tue, May 11, 2010 at 10:40 AM, Rob Mrob.nos...@4mation.co.uk   wrote:

  
 I agree with most of this but why can't the default location for the system
 data files be in the datafiles sub directory of the directory where the
 blender executable resides?


 Proposal looks fine to me, but I agree with this. We can avoid a
 wrapper script, making it use the folder in the same directory doesn't
 conflict, so it could just look for a datafiles in the same folder
 first.

 Brecht.
 ___
 Bf-committers mailing list
 Bf-committers@blender.org
 http://lists.blender.org/mailman/listinfo/bf-committers


  
 ___
 Bf-committers mailing list
 Bf-committers@blender.org
 http://lists.blender.org/mailman/listinfo/bf-committers




 ___
 Bf-committers mailing list
 Bf-committers@blender.org
 http://lists.blender.org/mailman/listinfo/bf-committers



___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] Installation/file paths

2010-05-11 Thread Brecht Van Lommel
Hi,

I'm proposing to look for the folder in the same directory as the
executable first, and if that doesn't exist, in the system location
(/usr/share/blender). This means that /usr/bin/datafiles would be used
if it was there, but that's an unintentional side effect and the
folder should be installed in /usr/share/blender when blender is
installed in /usr/bin/blender. This just also covers the case of
running blender from an unpacked archive, without using a wrapper
script to find the right folder.

Brecht.

On Tue, May 11, 2010 at 5:07 PM, Ken Hughes khug...@pacific.edu wrote:
 Before I comment, let me be sure I understand what's being proposed:

 On Unix, the blender executable would most likely be /usr/bin/blender.
 So the proposal is to have a /usr/bin/datafiles folder for the system
 data files?  If so, I don't think that's a good idea, for Unix anyway.
 You don't expect to find any data in /usr/bin.

 Ken

 On 05/11/2010 02:37 AM, Brecht Van Lommel wrote:
 Hi,

 On Tue, May 11, 2010 at 10:40 AM, Rob Mrob.nos...@4mation.co.uk  wrote:

 I agree with most of this but why can't the default location for the system
 data files be in the datafiles sub directory of the directory where the
 blender executable resides?

 Proposal looks fine to me, but I agree with this. We can avoid a
 wrapper script, making it use the folder in the same directory doesn't
 conflict, so it could just look for a datafiles in the same folder
 first.

 Brecht.
 ___
 Bf-committers mailing list
 Bf-committers@blender.org
 http://lists.blender.org/mailman/listinfo/bf-committers



 ___
 Bf-committers mailing list
 Bf-committers@blender.org
 http://lists.blender.org/mailman/listinfo/bf-committers

___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] Installation/file paths

2010-05-11 Thread Ken Hughes
Ok, thanks for the clarification.

Ken

On 05/11/2010 09:08 AM, Brecht Van Lommel wrote:
 Hi,

 I'm proposing to look for the folder in the same directory as the
 executable first, and if that doesn't exist, in the system location
 (/usr/share/blender). This means that /usr/bin/datafiles would be used
 if it was there, but that's an unintentional side effect and the
 folder should be installed in /usr/share/blender when blender is
 installed in /usr/bin/blender. This just also covers the case of
 running blender from an unpacked archive, without using a wrapper
 script to find the right folder.

 Brecht.

 On Tue, May 11, 2010 at 5:07 PM, Ken Hugheskhug...@pacific.edu  wrote:

 Before I comment, let me be sure I understand what's being proposed:

 On Unix, the blender executable would most likely be /usr/bin/blender.
 So the proposal is to have a /usr/bin/datafiles folder for the system
 data files?  If so, I don't think that's a good idea, for Unix anyway.
 You don't expect to find any data in /usr/bin.

 Ken

 On 05/11/2010 02:37 AM, Brecht Van Lommel wrote:
  
 Hi,

 On Tue, May 11, 2010 at 10:40 AM, Rob Mrob.nos...@4mation.co.ukwrote:


 I agree with most of this but why can't the default location for the system
 data files be in the datafiles sub directory of the directory where the
 blender executable resides?

  
 Proposal looks fine to me, but I agree with this. We can avoid a
 wrapper script, making it use the folder in the same directory doesn't
 conflict, so it could just look for a datafiles in the same folder
 first.

 Brecht.
 ___
 Bf-committers mailing list
 Bf-committers@blender.org
 http://lists.blender.org/mailman/listinfo/bf-committers



 ___
 Bf-committers mailing list
 Bf-committers@blender.org
 http://lists.blender.org/mailman/listinfo/bf-committers

  
 ___
 Bf-committers mailing list
 Bf-committers@blender.org
 http://lists.blender.org/mailman/listinfo/bf-committers



___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] Installation/file paths

2010-05-11 Thread Harley Acheson
+1 for Matt's Installation/file paths proposal document as-is. For Windows at 
least. 


- Original Message - 
From: Matt Ebb m...@mke3.net 
http://wiki.blender.org/index.php/Dev:2.5/Source/Installation/Proposal 


-- 


Regards, Harley Acheson 

Virtual Dogsbody 
Info Tech Department 
Shawnigan Lake School 
___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] Installation/file paths

2010-05-11 Thread Andrea Weikert
Hi,

Matt Ebb schrieb:
 Anyway, my proposal is here:

 http://wiki.blender.org/index.php/Dev:2.5/Source/Installation/Proposal

 I hope that this enough to quickly agree on and get moving.

 cheers,

 Matt
   

+1 from me too, looks very good. I can help with the implementation for 
Windows and probably Linux too.


___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] Installation/file paths

2010-05-11 Thread GSR
Hi,
m...@mke3.net (2010-05-11 at 1816.59 +1000):
 http://wiki.blender.org/index.php/Dev:2.5/Source/Installation/Proposal

Saving temp to user locations is discouraged, it can cause serious
slow downs when the directory is network based. Some are suggesting
using same place than base blend for quit and temp blend, which would
make sense, if auto cleaning is not desired and what is more
important, it would avoid collisions in cases like editing
foo/items.blend and bar/items.blend (even having PID, you still have
to guess which items.blend it refers to).

GSR
 
___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] Installation/file paths

2010-05-11 Thread GSR
Hi,
m...@mke3.net (2010-05-11 at 1816.59 +1000):
 http://wiki.blender.org/index.php/Dev:2.5/Source/Installation/Proposal

Oops, I forgot other thing: the other proposal avoided dots in paths,
as it seems some tools get confused when they find dots and get stuck
into thinking that means a extensions. Does that still matter? Ie,
2.52 or 252?

GSR
 
___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] Installation/file paths

2010-05-11 Thread Harley Acheson

 Saving temp to user locations is discouraged, it can cause serious 
 slow downs when the directory is network based. 

Yes, that is a good point GSR. We have this folder redirected to a network 
location for all our users. This might also cause us problems running blender 
simultaneously as the same user on multiple stations, as is the case for our 
render farm. 

Harley 

___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] Installation/file paths

2010-05-11 Thread Kevin Roy
Hello,

When I was digging into the Debian package for blender 2.5, I found the 
following patch to move temporary files into the $HOME/.blender instead 
of /tmp :

*snip*
Index: blender-2.49a+dfsg/source/blender/blenlib/intern/util.c
===
--- blender-2.49a+dfsg.orig/source/blender/blenlib/intern/util.c 
2009-05-26 19:33:17.0 +0100
+++ blender-2.49a+dfsg/source/blender/blenlib/intern/util.c 2009-08-06 
22:44:41.0 +0100
@@ -1905,6 +1905,19 @@
 /* add a trailing slash if needed */
 BLI_add_slash(fullname);
 }
+
+   /* don't use /tmp since no special care is taken about
+* handling temporary files, rather use $HOME/.blender/
+* instead.
+*/
+   if (strcmp(fullname, /tmp/)==0) {
+   char *home = getenv(HOME);
+   if (home  BLI_exists(home)) {
+   strcpy(fullname, home);
+   strcat(fullname, /.blender/);
+   }
+   }
+
  }

  /*

*snip*

It has been applied in this package build since 2.46 but I did not try 
it in 2.5 ... maybe it still works.

This proposal looks great but I have just a question about where and how 
those paths are stored, in .blend or text file?

---
Kevin Roy
http://blog.knokorpo.fr
___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] Installation/file paths

2010-05-11 Thread GSR
Hi,
m...@mke3.net (2010-05-11 at 1816.59 +1000):
 http://wiki.blender.org/index.php/Dev:2.5/Source/Installation/Proposal

And a third thing, BLENDER_USER_CONFIG should have a
BLENDER_SYSTEM_CONFIG counterpart to store the system wide defaults.

GSR
 
___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] Installation/file paths

2010-05-11 Thread GSR
Hi,
kin...@gmail.com (2010-05-12 at 0122.41 +0200):
 When I was digging into the Debian package for blender 2.5, I found the 
 following patch to move temporary files into the $HOME/.blender instead 
 of /tmp :
[...]
 It has been applied in this package build since 2.46 but I did not try 
 it in 2.5 ... maybe it still works.

That is a distro workaround to fix a Blender vulnerability (classical
symlink attack).

GSR
 
___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] Installation/file paths

2010-05-11 Thread Matt Ebb
Hi,

Great to see a strong consensus! Small details can be worked out over time, but 
I think this is enough to get moving forward with.

Some replies to some of the details mentioned:

On 11/05/2010, at 19:37 , Brecht Van Lommel wrote:

 Proposal looks fine to me, but I agree with this. We can avoid a
 wrapper script, making it use the folder in the same directory doesn't
 conflict, so it could just look for a datafiles in the same folder
 first.

Yep, that can work. The reason I liked the environment variables was that it's 
explicit and clear, trying to avoid the current situation where it's hard to 
know exactly where the files are being sourced from. But if this is done 
clearly, behind the API (so people don't just assume to find things in the exe 
dir) it should be fine, yeah.

 Saving temp to user locations is discouraged, it can cause serious
 slow downs when the directory is network based. Some are suggesting
 using same place than base blend for quit and temp blend, which would
 make sense, if auto cleaning is not desired and what is more
 important, it would avoid collisions in cases like editing
 foo/items.blend and bar/items.blend (even having PID, you still have
 to guess which items.blend it refers to).

This doesn't really affect the API etc so I'm not too worried about it at this 
stage, more of a matter of implementation for each OS. As for slowdowns on 
network locations, I'd imagine that would be a matter of redirecting the path 
in those situations with environment variables (as this would be the exception 
rather than the rule for most users).

As for saving temp files alongside project .blend files, I guess this is made a 
bit more complicated by the fact that you can have 'useful temp files' such as 
.blend backups, vs 'temporary temp files' that are more like caches that can be 
recreated and aren't very important. Personally I wouldn't like lots of 
autosave files alongside my scene files (a subdir may be more acceptable), and 
I think if the main reason for doing so is to make relative paths work etc, 
then it would be better to fix that actual problem at its source (eg. something 
like storing the original file path in the temp .blend file - i thought this 
was implemented actually).

Anyway again, this doesn't really affect the api much, in the future it could 
conceivably be implemented as an option that overrides the BLENDER_TEMP with 
the current .blend file path, so that code using the api works the same. So I'm 
happy to go ahead get something working with the current design here.

On 12/05/2010, at 09:54 , GSR wrote:

 And a third thing, BLENDER_USER_CONFIG should have a
 BLENDER_SYSTEM_CONFIG counterpart to store the system wide defaults.

Hm, this complicates things a bit more, but perhaps is doable. At first I 
thought, no Blender should function properly without needing configuration 
files (the defaults are part of the blender executable itself and preferences 
are only created as needed). But I realise that this is probably useful for 
bigger installations (eg. at a school having a set of default 'my school 
preferences' saved for users of that specific environment).

In this case, SYSTEM_CONFIG should be read-only and not defined by default, 
taking a lower precedence to USER_CONFIG - and making sure that all newly saved 
preferences end up in USER_CONFIG. Initially (until this uses environment 
variables), this can just be hardcoded to an empty path. I've added a note 
about this to the proposal wiki page.

cheers,

Matt
___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] Installation/file paths

2010-05-11 Thread Benjamin Tolputt
Matt Ebb wrote:
 Anyway again, this doesn't really affect the api much, in the future it could 
 conceivably be implemented as an option that overrides the BLENDER_TEMP with 
 the current .blend file path, so that code using the api works the same. So 
 I'm happy to go ahead get something working with the current design here.
   

If this could be (as you suggest would be your preference) optionally a
sub-directory of the current .blend file path (say
$CURRENT_BLEND_PATH/tmpfiles/ or similar) - this would be perfect. I
too would prefer that there be a separate directory that keeps files I
can easily delete at my leisure separate from the blend files.

Everything else you suggest is great - so not debate other than the above.

___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers