4
$\begingroup$

The Windows portable installation has (or can have) the user settings folder (named '2.77' for instance, containing all the user preferences) next to all of it's files - which is perfect for me, since I can sync the whole installation via cloud drive.

But what is the proper update procedure in such a setup? A freshly downloaded portable installation already has a user settings folder, containing for instance the add-ons folder. So to keep my add-ons, I was simply renaming my user setting folder to match the downloaded one ('2.76' to '2.77' for instance), and then copied all downloaded files over existing ones, overwriting them. That works, but I'm not sure if that can introduce problems in the long run? And if there is a better way of doing the same thing (updating a portable install while keeping settings and add-ons)?

$\endgroup$
3
$\begingroup$

Running the new portable version (the zipped Blender file downloaded from blender.org) will fetch the user-pref from the common roaming location of Windows so previous preferences and add-ons will be automatically added/activated in the new version

But if a config folder is created in the portable blender 2.XX folder it will read write the bookmarks file, startup.blend and userpref.blend.from that location.

The location for config is shown for a moment in before the splash screen of Blender comes up when you launch it.

Please see the screenshot below.

Blender Portable file location

Hope it helps some Blender portable users.

$\endgroup$
1
3
$\begingroup$

You should not replace the whole 2.## folder version with a previous one.

In a best case scenario that will not only roll back any updated versions of the addons the new version may bring, but also override any new presets, builtin Python scripts, UI scripts and bundled Python versions along with your personal config, essentially rolling Blender back to the previous installed version.

Worst case it will likely completely break your Blender installation, especially between major versions, as old scripts and presets may be incompatible with new APIs and binary file changes.

You should only copy the Config folder inside the 2.## which should contain your bookmarks file, startup.blend and userpref.blend.

Alternatively you can use Blender command line launch parameters to achieve a fully functioning portable installation with a proper dedicated folder for user data and addons.

Blender supports several launch variables, a few of them are BLENDER_USER_CONFIG and BLENDER_USER_SCRIPTSwhich allow overriding the default folders for user configuration (where startup files are saved) and the folder for users scripts and addons, where third party installed addons, presets, keyconfigs and scripts are installed.

The trick is to launch Blender from a batch file that sets this to your custom desired location.

Here is an example, in a plain text editor like Notepad paste the below lines of code and save them to the same folder as Blender.exe, give it a any name like "Blender_Portable" but make sure you specify the file extension as .bat not .txt.

SET BLENDER_USER_CONFIG=%~dp0Portable_Data\Config
SET BLENDER_USER_SCRIPTS=%~dp0Portable_Data\Scripts
    
if not exist %BLENDER_USER_CONFIG% mkdir %BLENDER_USER_CONFIG%
if not exist %BLENDER_USER_SCRIPTS% mkdir %BLENDER_USER_SCRIPTS%
    
start Blender.exe

It should be setup in such manner that the file system would look like.

Blender Portable
 └Portable_Data
 │ └Config
 │ └Scripts
 └Blender.exe
 └BlenderPortable.bat

Adapt to your own needs, you may want Blender installation contained in an independent subfolder separate from the rest of the setup.

$\endgroup$
4
  • $\begingroup$ I don't replace 2.# with the previous one, I replace the previous one with the new one, before it has any user settings in it. You think that's still bad? $\endgroup$ Sep 25 '16 at 9:14
  • $\begingroup$ Ah yes I misunderstood what you meant, that sounds more clever and a good way to keep your custom addons. Only downside I can think of is that in the off chance that any files are removed, there will be some garbage leftovers, but that should not be a common thing . Other than that I can't think of anything. If you find any problems don't forget to test on a fresh portable install to make sure it's not a problem with your setup. $\endgroup$ Sep 25 '16 at 14:30
  • $\begingroup$ You can use the environment variables to load the user preferences, add-ons, keymap, etc. from a different location. However, this doesn't guarantee that it will work properly when the files are from a different version. $\endgroup$
    – Robert Gützkow
    Apr 1 '20 at 17:38
  • $\begingroup$ No, that will always be up to the user to make sure of it. Between most minor version upgrades there should be no significant incompatibilities so it should still be less work than copying addons and preferences manually every time $\endgroup$ Apr 1 '20 at 17:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.