File/installation paths changes #22339

Closed
opened 2010-05-14 06:56:35 +02:00 by Matt Ebb · 21 comments
Member

%%%This patch is a first pass at implementing this proposal:
http://wiki.blender.org/index.php/Dev:2.5/Source/Installation/Proposal

Mentioned here:
http://lists.blender.org/pipermail/bf-committers/2010-May/027479.html

I'm posting this here for review, and hopefully for platform maintainers to help with the platform-specific parts that find the correct user folders etc. This is a WIP, duplicating some functions that Campbell made earlier for a similar task. The duplicates can be deleted when all of the old path code is converted over to this API.

So far implemented is:

  • BLI_get_folder() function to retrieve folders based on preset IDs

  • BLI_get_folder_create() which creates a (user) folder if it doesn't already exist, used for saving preferences etc.

  • Ability to override paths with environment variables

  • Replaced code for loading/saving:

  • startup.blend (was .B25.blend)
  • bookmarks.txt (was .Bfs)
  • recent-files.txt (was .Blog)
  • external icon files

%%%

%%%This patch is a first pass at implementing this proposal: http://wiki.blender.org/index.php/Dev:2.5/Source/Installation/Proposal Mentioned here: http://lists.blender.org/pipermail/bf-committers/2010-May/027479.html I'm posting this here for review, and hopefully for platform maintainers to help with the platform-specific parts that find the correct user folders etc. This is a WIP, duplicating some functions that Campbell made earlier for a similar task. The duplicates can be deleted when all of the old path code is converted over to this API. So far implemented is: * BLI_get_folder() function to retrieve folders based on preset IDs * BLI_get_folder_create() which creates a (user) folder if it doesn't already exist, used for saving preferences etc. * Ability to override paths with environment variables * Replaced code for loading/saving: - startup.blend (was .B25.blend) - bookmarks.txt (was .Bfs) - recent-files.txt (was .Blog) - external icon files %%%
Author
Member

Changed status to: 'Open'

Changed status to: 'Open'

%%%There are two ghost functions that are exactly designed to abstract from OS the user and system paths retrieval :
const GHOST_TUns8* GHOST_getSystemDir();
const GHOST_TUns8* GHOST_getUserDir();

These would be good candidates for your get_path_user and get_path_system functions.

Cheers,
Damien%%%

%%%There are two ghost functions that are exactly designed to abstract from OS the user and system paths retrieval : const GHOST_TUns8* GHOST_getSystemDir(); const GHOST_TUns8* GHOST_getUserDir(); These would be good candidates for your get_path_user and get_path_system functions. Cheers, Damien%%%
Author
Member

%%%Updated the patch.

This includes:

  • Added the BLENDER_SCRIPTS and BLENDER_PYTHON ids

  • Replaced python/script/module/etc path finding code with BLI_get_folder()

  • update the (currently unused) locale finding code to look for locale folder inside BLENDER_DATAFILES

  • Adjusted the Blender bundle on cmake for osx, to remove the .blender folder

Need to update other build systems too...
So we have:
blender.app/Contents/MacOS/blender (executable)
blender.app/Contents/MacOS/datafiles/
blender.app/Contents/MacOS/python/
blender.app/Contents/MacOS/scripts/
This is how 'local' installations should be laid out now

%%%

%%%Updated the patch. This includes: - Added the BLENDER_SCRIPTS and BLENDER_PYTHON ids - Replaced python/script/module/etc path finding code with BLI_get_folder() - update the (currently unused) locale finding code to look for locale folder inside BLENDER_DATAFILES - Adjusted the Blender bundle on cmake for osx, to remove the .blender folder ``` Need to update other build systems too... So we have: blender.app/Contents/MacOS/blender (executable) blender.app/Contents/MacOS/datafiles/ blender.app/Contents/MacOS/python/ blender.app/Contents/MacOS/scripts/ ``` ``` This is how 'local' installations should be laid out now ``` %%%
Author
Member

%%%Hi Damien,

Right, those look to be pretty much what is needed. However I checked back on the ML, and I think I agree with Brecht, it might be better to have this functionality just as its own file inside blenlib, rather than making blenlib dependent on GHOST? Is this possible to do?

I looked in the functions themselves, to work in this system, they could probably use some tweaks:

  • I'd remove the fallback to unix path, the BLI_get_folder() handles falling back to other paths in there, it should just return the path name so it can be checked in the blenlib code
  • Also the same for creating the path if non-existent, this should be removed too. There's a BLI_get_folder_create() that can be used to create non-existent paths, for use in blender only when saving out files. We don't want to create folders just upon checking for their existence.

If you don't have time, let me know, I can attempt to move this to an mm file inside blenlib and get that working. But I have no experience in this so far :)

thanks!

Matt%%%

%%%Hi Damien, Right, those look to be pretty much what is needed. However I checked back on the ML, and I think I agree with Brecht, it might be better to have this functionality just as its own file inside blenlib, rather than making blenlib dependent on GHOST? Is this possible to do? I looked in the functions themselves, to work in this system, they could probably use some tweaks: * I'd remove the fallback to unix path, the BLI_get_folder() handles falling back to other paths in there, it should just return the path name so it can be checked in the blenlib code * Also the same for creating the path if non-existent, this should be removed too. There's a BLI_get_folder_create() that can be used to create non-existent paths, for use in blender only when saving out files. We don't want to create folders just upon checking for their existence. If you don't have time, let me know, I can attempt to move this to an mm file inside blenlib and get that working. But I have no experience in this so far :) thanks! Matt%%%

%%%Hi Matt,

I've made the updates to the patch (file_paths_02damien78.txt):

  • removed ghost paths code (and code in BLI_bfile.c using it. This envvar code is replaced by yours, right ?)
  • added file_path_cocoa.m in blenlib to handle osx (including deprecated Carbon => for how long do we still support Carbon ?). You'll notice I've provided the retrieval of more standard paths than you're currently using. That may be useful (in the future ?) Keep or remove them as needed.
  • small bug fix in CMake script.

There is a bug I've left for you: BLI_get_folder_create is currently useless as BLI_get_folder returns NULL when the path does not exists...

Cheers,
Damien%%%

%%%Hi Matt, I've made the updates to the patch (file_paths_02damien78.txt): - removed ghost paths code (and code in BLI_bfile.c using it. This envvar code is replaced by yours, right ?) - added file_path_cocoa.m in blenlib to handle osx (including deprecated Carbon => for how long do we still support Carbon ?). You'll notice I've provided the retrieval of more standard paths than you're currently using. That may be useful (in the future ?) Keep or remove them as needed. - small bug fix in CMake script. There is a bug I've left for you: BLI_get_folder_create is currently useless as BLI_get_folder returns NULL when the path does not exists... Cheers, Damien%%%
Member

%%%Just a quick note on GHOST vs blenlib:

GHOST, as according its name (Generic Handy Operating System Toolkit), was supposed to have all this kind of OS level toolness, instead of blenlib. I don't think it is bad per se to have blenlib depend on GHOST, as we should regard GHOST as our abstraction level towards OS, under a clear API. When you don't do that you'll have to seperately implement different handling on different OS within blenlib, and I think that is not very nice design, nor nice implementation.%%%

%%%Just a quick note on GHOST vs blenlib: GHOST, as according its name (Generic Handy Operating System Toolkit), was supposed to have all this kind of OS level toolness, instead of blenlib. I don't think it is bad per se to have blenlib depend on GHOST, as we should regard GHOST as our abstraction level towards OS, under a clear API. When you don't do that you'll have to seperately implement different handling on different OS within blenlib, and I think that is not very nice design, nor nice implementation.%%%
Author
Member

%%%Hi guys, any updates? This is probably the main thing that beta release is waiting on - it doesn't have to be anything too complicated at this point, even if it just finds the default blender installation folder in program files for now?

As for ghost, there was a discussion on the ML about this some time ago, and Brecht was pretty strongly in favour of not having blenlib dependent on GHOST. So I'm just going by that.%%%

%%%Hi guys, any updates? This is probably the main thing that beta release is waiting on - it doesn't have to be anything too complicated at this point, even if it just finds the default blender installation folder in program files for now? As for ghost, there was a discussion on the ML about this some time ago, and Brecht was pretty strongly in favour of not having blenlib dependent on GHOST. So I'm just going by that.%%%
Member

%%%Sorry, I have it almost completed. I'm running tests now and will upload in about 30 minutes.%%%

%%%Sorry, I have it almost completed. I'm running tests now and will upload in about 30 minutes.%%%
Member

%%%Slowmotion 30 minutes:

I've now added win32 support to where it was necessary. I've changed SConstruct to accomodate for config/ and datafile/ - with this Blender at least starts.

One thing I'd like to put forward is the naming of .blender on Windows systems. It would be very nice if we could call it something like blendersys/ - without the beginning dot. Otherwise it will be very hard for users to manually create .blender directories where they want them, since without writing code it's not possible to do on cmd.exe or through explorer.

Anyway, attached new patch. Please be adviced that I used file_paths_02damien78.txt as my basis. Just before sending this in I noticed that some BLENDER_TEMP related code was removed, so please see if merging of that code back from the original file_paths_02.txt is necessary.

For Windows now the user path is %USERPROFILE%\.blender and the system path I set to %ALLUSERPROFILE%\Blender\System . I guess I could've already named the user path to %USERPROFILE%\Blender, but let's have a next review for this.

I opted to not choose CSIDL_PROGRAM_FILES* since we don't know where the user actually will install Blender (not everybody install just to that location, after which it'll be hard to figure out where that is :) So %ALLUSERPROFILE%Blender\System and maybe %ALLUSERPROFILE%Blender\Config for system wide configuration.%%%

%%%Slowmotion 30 minutes: I've now added win32 support to where it was necessary. I've changed SConstruct to accomodate for config/ and datafile/ - with this Blender at least starts. One thing I'd like to put forward is the naming of .blender on Windows systems. It would be *very* nice if we could call it something like blendersys/ - without the beginning dot. Otherwise it will be very hard for users to manually create .blender directories where they want them, since without writing code it's not possible to do on cmd.exe or through explorer. Anyway, attached new patch. Please be adviced that I used file_paths_02damien78.txt as my basis. Just before sending this in I noticed that some BLENDER_TEMP related code was removed, so please see if merging of that code back from the original file_paths_02.txt is necessary. For Windows now the user path is %USERPROFILE%\\.blender and the system path I set to %ALLUSERPROFILE%\\Blender\\System . I guess I could've already named the user path to %USERPROFILE%\\Blender, but let's have a next review for this. I opted to not choose CSIDL_PROGRAM_FILES* since we don't know where the user actually will install Blender (not everybody install just to that location, after which it'll be hard to figure out where that is :) So %ALLUSERPROFILE%Blender\System and maybe %ALLUSERPROFILE%Blender\Config for system wide configuration.%%%
Member

%%%Slowmotion 30 minutes:

I've now added win32 support to where it was necessary. I've changed SConstruct to accomodate for config/ and datafile/ - with this Blender at least starts.

One thing I'd like to put forward is the naming of .blender on Windows systems. It would be very nice if we could call it something like blendersys/ - without the beginning dot. Otherwise it will be very hard for users to manually create .blender directories where they want them, since without writing code it's not possible to do on cmd.exe or through explorer.

Anyway, attached new patch. Please be adviced that I used file_paths_02damien78.txt as my basis. Just before sending this in I noticed that some BLENDER_TEMP related code was removed, so please see if merging of that code back from the original file_paths_02.txt is necessary.

For Windows now the user path is %USERPROFILE%\.blender and the system path I set to %ALLUSERPROFILE%\Blender\System . I guess I could've already named the user path to %USERPROFILE%\Blender, but let's have a next review for this.

I opted to not choose CSIDL_PROGRAM_FILES* since we don't know where the user actually will install Blender (not everybody install just to that location, after which it'll be hard to figure out where that is :) So %ALLUSERPROFILE%Blender\System and maybe %ALLUSERPROFILE%Blender\Config for system wide configuration.%%%

%%%Slowmotion 30 minutes: I've now added win32 support to where it was necessary. I've changed SConstruct to accomodate for config/ and datafile/ - with this Blender at least starts. One thing I'd like to put forward is the naming of .blender on Windows systems. It would be *very* nice if we could call it something like blendersys/ - without the beginning dot. Otherwise it will be very hard for users to manually create .blender directories where they want them, since without writing code it's not possible to do on cmd.exe or through explorer. Anyway, attached new patch. Please be adviced that I used file_paths_02damien78.txt as my basis. Just before sending this in I noticed that some BLENDER_TEMP related code was removed, so please see if merging of that code back from the original file_paths_02.txt is necessary. For Windows now the user path is %USERPROFILE%\\.blender and the system path I set to %ALLUSERPROFILE%\\Blender\\System . I guess I could've already named the user path to %USERPROFILE%\\Blender, but let's have a next review for this. I opted to not choose CSIDL_PROGRAM_FILES* since we don't know where the user actually will install Blender (not everybody install just to that location, after which it'll be hard to figure out where that is :) So %ALLUSERPROFILE%Blender\System and maybe %ALLUSERPROFILE%Blender\Config for system wide configuration.%%%
Member

%%%Slowmotion 30 minutes:

I've now added win32 support to where it was necessary. I've changed SConstruct to accomodate for config/ and datafile/ - with this Blender at least starts.

One thing I'd like to put forward is the naming of .blender on Windows systems. It would be very nice if we could call it something like blendersys/ - without the beginning dot. Otherwise it will be very hard for users to manually create .blender directories where they want them, since without writing code it's not possible to do on cmd.exe or through explorer.

Anyway, attached new patch. Please be adviced that I used file_paths_02damien78.txt as my basis. Just before sending this in I noticed that some BLENDER_TEMP related code was removed, so please see if merging of that code back from the original file_paths_02.txt is necessary.

For Windows now the user path is %USERPROFILE%\.blender and the system path I set to %ALLUSERPROFILE%\Blender\System . I guess I could've already named the user path to %USERPROFILE%\Blender, but let's have a next review for this.

I opted to not choose CSIDL_PROGRAM_FILES* since we don't know where the user actually will install Blender (not everybody install just to that location, after which it'll be hard to figure out where that is :) So %ALLUSERPROFILE%Blender\System and maybe %ALLUSERPROFILE%Blender\Config for system wide configuration.%%%

%%%Slowmotion 30 minutes: I've now added win32 support to where it was necessary. I've changed SConstruct to accomodate for config/ and datafile/ - with this Blender at least starts. One thing I'd like to put forward is the naming of .blender on Windows systems. It would be *very* nice if we could call it something like blendersys/ - without the beginning dot. Otherwise it will be very hard for users to manually create .blender directories where they want them, since without writing code it's not possible to do on cmd.exe or through explorer. Anyway, attached new patch. Please be adviced that I used file_paths_02damien78.txt as my basis. Just before sending this in I noticed that some BLENDER_TEMP related code was removed, so please see if merging of that code back from the original file_paths_02.txt is necessary. For Windows now the user path is %USERPROFILE%\\.blender and the system path I set to %ALLUSERPROFILE%\\Blender\\System . I guess I could've already named the user path to %USERPROFILE%\\Blender, but let's have a next review for this. I opted to not choose CSIDL_PROGRAM_FILES* since we don't know where the user actually will install Blender (not everybody install just to that location, after which it'll be hard to figure out where that is :) So %ALLUSERPROFILE%Blender\System and maybe %ALLUSERPROFILE%Blender\Config for system wide configuration.%%%
Member

%%%Slowmotion 30 minutes:

I've now added win32 support to where it was necessary. I've changed SConstruct to accomodate for config/ and datafile/ - with this Blender at least starts.

One thing I'd like to put forward is the naming of .blender on Windows systems. It would be very nice if we could call it something like blendersys/ - without the beginning dot. Otherwise it will be very hard for users to manually create .blender directories where they want them, since without writing code it's not possible to do on cmd.exe or through explorer.

Anyway, attached new patch. Please be adviced that I used file_paths_02damien78.txt as my basis. Just before sending this in I noticed that some BLENDER_TEMP related code was removed, so please see if merging of that code back from the original file_paths_02.txt is necessary.

For Windows now the user path is %USERPROFILE%\.blender and the system path I set to %ALLUSERPROFILE%\Blender\System . I guess I could've already named the user path to %USERPROFILE%\Blender, but let's have a next review for this.

I opted to not choose CSIDL_PROGRAM_FILES* since we don't know where the user actually will install Blender (not everybody install just to that location, after which it'll be hard to figure out where that is :) So %ALLUSERPROFILE%Blender\System and maybe %ALLUSERPROFILE%Blender\Config for system wide configuration.%%%

%%%Slowmotion 30 minutes: I've now added win32 support to where it was necessary. I've changed SConstruct to accomodate for config/ and datafile/ - with this Blender at least starts. One thing I'd like to put forward is the naming of .blender on Windows systems. It would be *very* nice if we could call it something like blendersys/ - without the beginning dot. Otherwise it will be very hard for users to manually create .blender directories where they want them, since without writing code it's not possible to do on cmd.exe or through explorer. Anyway, attached new patch. Please be adviced that I used file_paths_02damien78.txt as my basis. Just before sending this in I noticed that some BLENDER_TEMP related code was removed, so please see if merging of that code back from the original file_paths_02.txt is necessary. For Windows now the user path is %USERPROFILE%\\.blender and the system path I set to %ALLUSERPROFILE%\\Blender\\System . I guess I could've already named the user path to %USERPROFILE%\\Blender, but let's have a next review for this. I opted to not choose CSIDL_PROGRAM_FILES* since we don't know where the user actually will install Blender (not everybody install just to that location, after which it'll be hard to figure out where that is :) So %ALLUSERPROFILE%Blender\System and maybe %ALLUSERPROFILE%Blender\Config for system wide configuration.%%%
Member

%%%:O

Weird, every time I tried to upload I got the messages ("501 Method not supported. Post on /tracker/index.php not implemented)%%%

%%%:O Weird, every time I tried to upload I got the messages ("501 Method not supported. Post on /tracker/index.php not implemented)%%%
Author
Member

%%%Hi Nathan, thanks very much for that! Out of curiosity, what do those definitions (eg. ALLUSERPROFILE ) on windows represent?

The reason being that if the system data files will be somewhere else on the file system (i.e. not in a subdir under the blender installation folder) the Windows installer probably needs to be updated to copy the necessary files there. Otherwise with the zip, it can find the files in the same folder when it searches with get_path_local().

As for .blender, yes, it should not be used at all now on windows (nor a 'blendersys' either). The file path layout should be like (for example)
C:\Users\Username\Application Data\Blender\2.52\config or
C:\Users\Username\Application Data\Blender\2.52\datafiles

For local (zip file installations) it should look like:
extracted_zip_folder\blender.exe
extracted_zip_folder\datafiles
extracted_zip_folder\config

So I'm not sure what "/* Get %USERPROFILE%, append .blender */" is meant to be doing here?

cheers and thanks,

Matt%%%

%%%Hi Nathan, thanks very much for that! Out of curiosity, what do those definitions (eg. ALLUSERPROFILE ) on windows represent? The reason being that if the system data files will be somewhere else on the file system (i.e. not in a subdir under the blender installation folder) the Windows installer probably needs to be updated to copy the necessary files there. Otherwise with the zip, it can find the files in the same folder when it searches with get_path_local(). As for .blender, yes, it should not be used at all now on windows (nor a 'blendersys' either). The file path layout should be like (for example) C:\Users\Username\Application Data\Blender\2.52\config or C:\Users\Username\Application Data\Blender\2.52\datafiles For local (zip file installations) it should look like: extracted_zip_folder\blender.exe extracted_zip_folder\datafiles extracted_zip_folder\config So I'm not sure what "/* Get %USERPROFILE%, append .blender */" is meant to be doing here? cheers and thanks, Matt%%%
Author
Member

%%%By the way Damien, I just checked the patch in more detail, did you perhaps leave out a file? I can see a prototype for BLI_osx_getBasePath, but no implementation.

cheers

Matt%%%

%%%By the way Damien, I just checked the patch in more detail, did you perhaps leave out a file? I can see a prototype for BLI_osx_getBasePath, but no implementation. cheers Matt%%%

%%%Here it is (included in JesterKing's patch updated with it).

BTW, I can't open .blend files. It may be an issue unrelated with the patch, but I don't have the time to look at it tonight.

I will give a look tomorrow.

Cheers

Damien%%%

%%%Here it is (included in JesterKing's patch updated with it). BTW, I can't open .blend files. It may be an issue unrelated with the patch, but I don't have the time to look at it tonight. I will give a look tomorrow. Cheers Damien%%%

%%%ok, so the issue does not seem to be osx related, but more in the fact that non existent paths are not handled correctly.

Trying to open a .blend file results in the file being overwritten by the Blog !

The function used to get the bookmarks file in the open .blend action reuses the same local variable (filepath) that contained the .blend file name, in int file_exec(bContext *C, wmOperator *exec_op) (file_ops.c)

BLI_make_file_string(G.sce, filepath, BLI_get_folder_create(BLENDER_USER_CONFIG, NULL),BLENDER_BOOKMARK_FILE);

can't find the bookmarks file path, and thus does not changes the value of filepath.

Errors logged:
get_path_user: /Users/damien/Library/Application Support/Blender/2.52/
path missing: /Users/damien/Library/Application Support/Blender/2.52/config

So should this path "Blender/2.52/config" be created at install, or better, be created when needed (on write) ?
We definitely want to avoid .blend files being overwritten...

Cheers,
Damien%%%

%%%ok, so the issue does not seem to be osx related, but more in the fact that non existent paths are not handled correctly. Trying to open a .blend file results in the file being overwritten by the Blog ! The function used to get the bookmarks file in the open .blend action reuses the same local variable (filepath) that contained the .blend file name, in int file_exec(bContext *C, wmOperator *exec_op) (file_ops.c) BLI_make_file_string(G.sce, filepath, BLI_get_folder_create(BLENDER_USER_CONFIG, NULL),BLENDER_BOOKMARK_FILE); can't find the bookmarks file path, and thus does not changes the value of filepath. Errors logged: get_path_user: /Users/damien/Library/Application Support/Blender/2.52/ path missing: /Users/damien/Library/Application Support/Blender/2.52/config So should this path "Blender/2.52/config" be created at install, or better, be created when needed (on write) ? We definitely want to avoid .blend files being overwritten... Cheers, Damien%%%
Member

%%%Reviewed and reworked the patch a bit.
Main changes I did, were:

  1. checking for return value of the BLI_get_folder
  2. On Windows, adjusted path to:
    system=CSIDL_APPDATA_COMMON\Blender Foundation\Blender<version>
    user=CSIDL_APPDATA\Blender Foundation\Blender<version>
    local=<version> ==> also looks in .blender and release subfolder
  3. moved the recent files menu in SPACE_INFO from python to C -> access to recent files is not RNA'ified yet, so Python was duplicating code and looked in wrong directory
  4. Cleaned up the code a bit
  5. Fixed a bug with creating the directories - NULL was returned from BLI_get_folder and directory wasn't created.
  6. Tested a few main usages, also removing the config dir to ensure it is created when writing the recent files or bookmarks
  7. Integrated BLI_osx_getBasePath implementation from file_paths_04damien78.patch

TODO:

  • I haven't looked at the installer yet
  • the SCons files need updating too for Windows, leaving this for jesterKing ;), I can probably do the CMake files tomorrow
  • There are still some usages of BLI_gethome that need clean-up
  • Python still uses BLI_gethome_folder in one place, this probably should be changed too
  • I couldn't reproduce the overwriting that Damien found - yes, filepath is static, but the cases I tested returned NULL correctly. Might also be solved by the fix I did for creating the directories, so Damien, if you can retest with this patch would be great!

NOTE:
For the future, to collaborate like this, a branch would be useful, also to see differences/changes between versions of the patch easily - maybe still worth to consider?

SUMMARY:
I think right now the patch is stable enough for initial commit, if the CMake and SCons files are updated.

%%%

%%%Reviewed and reworked the patch a bit. Main changes I did, were: 1. checking for return value of the BLI_get_folder 2. On Windows, adjusted path to: system=CSIDL_APPDATA_COMMON\Blender Foundation\Blender\<version> user=CSIDL_APPDATA\Blender Foundation\Blender\<version> local=<Directory where Blender is>\<version> ==> also looks in .blender and release subfolder 3. moved the recent files menu in SPACE_INFO from python to C -> access to recent files is not RNA'ified yet, so Python was duplicating code and looked in wrong directory 4. Cleaned up the code a bit 5. Fixed a bug with creating the directories - NULL was returned from BLI_get_folder and directory wasn't created. 5. Tested a few main usages, also removing the config dir to ensure it is created when writing the recent files or bookmarks 6. Integrated BLI_osx_getBasePath implementation from file_paths_04damien78.patch TODO: * I haven't looked at the installer yet * the SCons files need updating too for Windows, leaving this for jesterKing ;), I can probably do the CMake files tomorrow * There are still some usages of BLI_gethome that need clean-up * Python still uses BLI_gethome_folder in one place, this probably should be changed too * I couldn't reproduce the overwriting that Damien found - yes, filepath is static, but the cases I tested returned NULL correctly. Might also be solved by the fix I did for creating the directories, so Damien, if you can retest with this patch would be great! NOTE: For the future, to collaborate like this, a branch would be useful, also to see differences/changes between versions of the patch easily - maybe still worth to consider? SUMMARY: I think right now the patch is stable enough for initial commit, if the CMake and SCons files are updated. %%%

%%%Andrea, your last update has fixed the overwriting issue !
And it now works fine.

I've made a few updates (making file_paths_06.patch):

  • path_util.cocoa.m extension fix (was .mm in the previous version, making build fail)
  • osx path does not contain .blender in it, as the cocoa function returns directly a correct path for blender (ending with .../Blender)
  • replaced \ by / for unix and osx pathes%%%
%%%Andrea, your last update has fixed the overwriting issue ! And it now works fine. I've made a few updates (making file_paths_06.patch): - path_util.cocoa.m extension fix (was .mm in the previous version, making build fail) - osx path does not contain .blender in it, as the cocoa function returns directly a correct path for blender (ending with .../Blender) - replaced \\ by / for unix and osx pathes%%%
Member

%%%This is now committed to SVN, so I close this, and further works continues on SVN/IRC/Mailinglist/bugtracker.%%%

%%%This is now committed to SVN, so I close this, and further works continues on SVN/IRC/Mailinglist/bugtracker.%%%
Member

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#22339
No description provided.