How is the built time option for disabling auto-updates activated?

For installs that have been made through package manages, auto-updates are a big no-no. Among many other issues, it throws system integrity checks all off if an app is trying to mess with itself. In many cases it is simply not possible due to permission structures. For example the Homebrew package is going to need this.

The release notes for 0.9.x state that:

Upgrades to new versions can be performed directly in the GUI (unless disabled at build time, not yet supported on Windows).

This is great, but I can’t figure out how it’s done at build time. I can’t find any relevant documentation and the script offers no clues on brief review.

How can this build option be triggered or where is the relevant build documentation?

See [v0.9.0] Upgrade from within GUI

Thanks. I added this to the list of build commands in [archived] Building Syncthing as well. Should probably write ./ noupgrade and ./ all-noupgrade subcommands as well for completeness.

Note that you might need to do a git clean -fxd if you’ve already built, to enforce everything being rebuilt in noupgrade-mode.

These now do the right thing:

So to build a non-upgrading binary, first clean with ./ clean then ./ noupgrade.