Compiling on macos 12.2 - adding further information on blender wiki

Since Brecht don’t want to answer this in a privat message to not answer it over and over again, instead of posting it on the wiki page, I decided to post it here as Brecht told me to, to get an answer from anyone here instead of the source.!

Previous message to Brecht:

Hi Brecht,

just wondering if there is a good source that describes the steps to compile 3.1 and 3.2. on a Mac?
I used to compile successfully for a while with Building Blender/Mac - Blender Developer Wiki , but yesterday my compiled build went from 3.1 to 3.2.
Via git checkout only 3.01 is listed as latest.

So my problem is to get info on how to find back to blender 3.1 version (that’s not listed there via git checkout … and then beeing able to compile both (3.1 & 3.2) in two subdirs and shared libs folder.
I read your post about worktree but then I have no idea what to do to compile each seperately into the folders with the right version choosen.

So is there a chance to get help on this basics & get them on the Building Blender/Mac - Blender Developer Wiki page posted as well, for all the others too.

Big thanks in advance

PS: Pablos old video show not everything about compiling, and he don’t answered on his old videos.

When Blender goes into Bcon3 for a release, as it did just this week, then checking out master gives you the release that will come after the one that is about to be released. So this week, after moving to Bcon3, master will give you Blender 3.2, as you noticed.

To get the 3.1 that is about to be released, you have to check out another branch: in this case, blender-v3.1-release . So you can compile for 3.1 instead of 3.2 by doing “git checkout blender-v3.1-release” and then compiling and building, and when you want to go back to 3.2 you can “git checkout master” again and rebuild.

If you really want to not have to go back and forth this way, but have both builds available simultaneously, you need to set up a different build folder for each. I’m not going to explain how to do that here right now, beyond saying: “make a new build dir, run cmake-gui and choose that folder for building and the blender source director for source, then pick all the options you like”. Probably there should be something in the build wiki that says how to do it.

1 Like

Thank you very much. (Git is a bit confusing for me)
So one more question to understand the git checkout listing:

What’s the difference between: blender-v3.0-release and v3.0.0 for example.

The release branch might get later corrections that would update the version number. In your example, maybe the blender-v3.0-release branch could get a version number of v3.0.1 .

1 Like

Thank you, understood ! :slightly_smiling_face: :upside_down_face: