Skip to content

Instantly share code, notes, and snippets.

@MaKaNu
Last active May 11, 2026 11:34
Show Gist options
  • Select an option

  • Save MaKaNu/20591f96c44650ee4f483131b83c239c to your computer and use it in GitHub Desktop.

Select an option

Save MaKaNu/20591f96c44650ee4f483131b83c239c to your computer and use it in GitHub Desktop.
Update TBsync and EAS max version

Information

This Gist describes how to update the max version number of TBSync and EAS Provider above ESR version.

Attention: This process does not ensure the Extension works after update, if breaking changes appear.

Before you are able to execute the script below you need to download the latest version of TBsync and any provider you like to patch from the list below:

Afterwards update the script matching the version numbers.

Dependencies

  • zip
  • unzip
  • jq >= 1.8.1 (maybe lower)
#!/usr/bin/env bash
pwd
# UPGRADE IF NECESSARY
LATEST_TBSYNC_VERSION=4.16
LATEST_EAS_VERSION=4.17
TARGET_TB_VERSION=149
## REGEXES
REPLACE_SET_ATTRIBUTE='s|(\w*)\.setAttribute\("([^"]+)", false\);|\1.removeAttribute("\2");|'
INSERT_MENUITEM='/^\.abMenuItem/a \ --menuitem-icon: url("chrome://tbsync/content/skin/error16.png");'
if [ -f tbsync-$LATEST_TBSYNC_VERSION-tb.xpi ]; then
# Create Target xpi
cp tbsync-$LATEST_TBSYNC_VERSION-tb.xpi tbsync-$LATEST_TBSYNC_VERSION.1-tb.xpi
unzip -qq tbsync-$LATEST_TBSYNC_VERSION-tb.xpi -d tbsync_src
jq ".applications.gecko.strict_max_version=\"$TARGET_TB_VERSION.*\" | .version=\"$LATEST_TBSYNC_VERSION.1\"" tbsync_src/manifest.json > manifest.json
if [ $? -ne 0 ]; then
echo "Error while updating TBsync manifest. Please update tbsync_src/manifest.json manually"
fi
# issue #772 implementations
## Create strucuture
mkdir -p content/manager
mkdir -p content/skin
cp tbsync_src/content/manager/accounts.js content/manager/accounts.js
cp tbsync_src/content/skin/ab.css content/skin/ab.css
## Replace content
sed -E -i "$REPLACE_SET_ATTRIBUTE" content/manager/accounts.js
sed -E -i "$INSERT_MENUITEM" content/skin/ab.css
zip -u tbsync-$LATEST_TBSYNC_VERSION.1-tb.xpi manifest.json
zip -u tbsync-$LATEST_TBSYNC_VERSION.1-tb.xpi content/manager/accounts.js
zip -u tbsync-$LATEST_TBSYNC_VERSION.1-tb.xpi content/skin/ab.css
else
echo "No TBSync Extension Provided. Skipping!"
fi
if [ -f provider_fur_exchange_activesync-$LATEST_EAS_VERSION-tb.xpi ]; then
# Create Target xpi
cp provider_fur_exchange_activesync-$LATEST_EAS_VERSION-tb.xpi provider_fur_exchange_activesync-$LATEST_EAS_VERSION.1-tb.xpi
unzip -qq provider_fur_exchange_activesync-$LATEST_EAS_VERSION-tb.xpi -d eas_src
jq ".applications.gecko.strict_max_version=\"$TARGET_TB_VERSION.*\" | .version=\"$LATEST_EAS_VERSION.1\"" eas_src/manifest.json > manifest.json 2>&1
if [ $? -ne 0 ]; then
echo "Error while updating EAS manifest. Please update eas_src/manifest.json manually"
fi
zip -u provider_fur_exchange_activesync-$LATEST_EAS_VERSION.1-tb.xpi manifest.json
else
echo "No EAS Extension Provided. Skipping!"
fi
echo "You are now able to install the xpi to Thunderbird <= $TARGET_TB_VERSION!"
echo
echo "If an Error appears, like corrupted xpi file, you might need to start over."
# Cleanup
echo "Executing Cleanup"
rm -rf tbsync_src
rm -rf eas_src
rm -rf manifest.json
rm -rf content
@VisruthSK
Copy link
Copy Markdown

Hi! Just a heads up that the script has a little typo--it references $VERSION instead of $TARGET_TB_VERSION.

@MaKaNu
Copy link
Copy Markdown
Author

MaKaNu commented Sep 12, 2025

Thanks, @VisruthSK, didn't catch that. Had probably still the VERSION variable active in my env while testing the script.

@VisruthSK
Copy link
Copy Markdown

You may want to consider adding set -euo pipefail below the shebang (see, e.g., http://redsymbol.net/articles/unofficial-bash-strict-mode/).

Thank you for the script by the way, its quite handy.

@MaKaNu
Copy link
Copy Markdown
Author

MaKaNu commented Nov 27, 2025

Just to let anybody know: I am unable to use the Release for 140.X ESR on TB145.X Seems they changed a lot more...

@VisruthSK
Copy link
Copy Markdown

VisruthSK commented Nov 28, 2025

https://www.thunderbird.net/en-US/thunderbird/145.0/releasenotes/

Enable support for Microsoft Exchange via Exchange Web Services

145 added native Exchange support, so that may be why. I think there are some limitations though: https://blog.thunderbird.net/2025/11/thunderbird-adds-native-microsoft-exchange-email-support/

@MaKaNu
Copy link
Copy Markdown
Author

MaKaNu commented Nov 28, 2025

Yes I already thought the same. This was original the case why I have updated. No Calendar for me at the moment.

@MaKaNu
Copy link
Copy Markdown
Author

MaKaNu commented Feb 9, 2026

Current Fix:

jobisoft/TbSync#772

I did not include the fix into the script yet.

@MaKaNu
Copy link
Copy Markdown
Author

MaKaNu commented Apr 16, 2026

I have added changes to apply the patches from #772

@MaKaNu
Copy link
Copy Markdown
Author

MaKaNu commented May 11, 2026

Currently, I switched to test versions of v5: https://github.com/jobisoft/EAS-4-TbSync/releases/tag/v5.0.10

The fix doesn't work any longer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment