7
$\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$

2 Answers 2

5
$\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
5
$\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 bundled addons, it will also override any new presets, builtin Python scripts, system files, UI markup scripts and bundled Python versions along with your personal configuration, essentially rolling Blender back to the previous installed version.

Worst (and most likely) case, it will probably completely break your Blender installation, especially between major versions, since old scripts and presets are unlikely to be incompatible with newer APIs and other binary file changes.

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

Blender 4.2+

As of Blender 4.2 a new "portable" configuration folder has been established, allowing you to save all settings locally in a more manageable manner.

As stated in the manual create a Portable folder inside your installation root, next to Blender executable, in a way that you have

📁 Blender 4.##\
 ├ 📁 Portable\
 └ Blender.exe

For all Blender versions

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.

Modern versions of Blender also support setting up additional external script libraries, besides the local installation ones. You can find them at under Edit > Preferences > File paths > Script Directories .

While not exactly "portable" in the sense that file paths are absolute, and don't necessarily travel with the installation, it does allow sharing scripts between multiple installations on the same machine, as well as easily keep a central repository of scripts, independent of specific Blender installations, that will survive updates or deletion of the Blender root folders.

$\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$ Commented Sep 25, 2016 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$ Commented Sep 25, 2016 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$ Commented Apr 1, 2020 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$ Commented Apr 1, 2020 at 17:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .