diff --git a/bin/build-linux-x64.sh b/bin/build-linux-x64.sh index 39baae922..cad8fb3e0 100755 --- a/bin/build-linux-x64.sh +++ b/bin/build-linux-x64.sh @@ -30,6 +30,9 @@ rm -r $BUILD_DIR/swiftshader cp bin/tpl/trilium-portable.sh $BUILD_DIR/ chmod 755 $BUILD_DIR/trilium-portable.sh +cp bin/tpl/trilium-safe-mode.sh $BUILD_DIR/ +chmod 755 $BUILD_DIR/trilium-safe-mode.sh + cp bin/tpl/trilium-no-cert-check.sh $BUILD_DIR/ chmod 755 $BUILD_DIR/trilium-no-cert-check.sh diff --git a/bin/build-win-x64.sh b/bin/build-win-x64.sh index bff3795ef..4528bc155 100755 --- a/bin/build-win-x64.sh +++ b/bin/build-win-x64.sh @@ -27,6 +27,7 @@ rm -r $BUILD_DIR/swiftshader cp bin/tpl/trilium-portable.bat $BUILD_DIR/ cp bin/tpl/trilium-no-cert-check.bat $BUILD_DIR/ +cp bin/tpl/trilium-safe-mode.bat $BUILD_DIR/ echo "Zipping windows x64 electron distribution..." VERSION=`jq -r ".version" package.json` diff --git a/bin/tpl/trilium-safe-mode.bat b/bin/tpl/trilium-safe-mode.bat new file mode 100644 index 000000000..a40f03bd8 --- /dev/null +++ b/bin/tpl/trilium-safe-mode.bat @@ -0,0 +1,4 @@ +SET DIR=%~dp0 +SET TRILIUM_SAFE_MODE=1 +cd %DIR% +start trilium.exe diff --git a/bin/tpl/trilium-safe-mode.sh b/bin/tpl/trilium-safe-mode.sh new file mode 100644 index 000000000..a5513f1db --- /dev/null +++ b/bin/tpl/trilium-safe-mode.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env sh + +DIR=`dirname "$0"` +export TRILIUM_SAFE_MODE=1 + +"$DIR/trilium" +