mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
Add powershell equivalents to existing batch scripts (#2561)
* Add powershell equivalents to existing windows scripts Each .bat will try to invoke its .ps1 version if powershell is available, or else will fallback on the behavior previous to this commit. Should help fix bugs with accents and non-ASCII characters (issue #2327). * Add powershell equivalents to existing windows scripts Each .bat will try to invoke its .ps1 version if powershell is available, or else will fallback on the behavior previous to this commit. Should help fix bugs with accents and non-ASCII characters (issue #2327). Co-authored-by: zadam <zadam.apps@gmail.com>
This commit is contained in:
parent
3055ed86ec
commit
780b520506
@ -27,9 +27,7 @@ rm -r $BUILD_DIR/swiftshader
|
||||
|
||||
cp bin/tpl/anonymize-database.sql $BUILD_DIR/
|
||||
|
||||
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/
|
||||
cp bin/tpl/trilium-{portable,no-cert-check,safe-mode}.{bat,ps1} $BUILD_DIR/
|
||||
|
||||
echo "Zipping windows x64 electron distribution..."
|
||||
VERSION=`jq -r ".version" package.json`
|
||||
|
@ -1,4 +1,5 @@
|
||||
SET DIR=%~dp0
|
||||
set NODE_TLS_REJECT_UNAUTHORIZED=0
|
||||
cd %DIR%
|
||||
start trilium.exe
|
||||
WHERE powershell.exe
|
||||
IF %ERRORLEVEL% NEQ 0 (start trilium.exe) ELSE (powershell.exe ./trilium-no-cert-check.ps1)
|
2
bin/tpl/trilium-no-cert-check.ps1
Normal file
2
bin/tpl/trilium-no-cert-check.ps1
Normal file
@ -0,0 +1,2 @@
|
||||
Set-Item -Path Env:NODE_TLS_REJECT_UNAUTHORIZED -Value 0
|
||||
./trilium.exe
|
@ -1,4 +1,5 @@
|
||||
SET DIR=%~dp0
|
||||
SET TRILIUM_DATA_DIR=%DIR%\trilium-data
|
||||
cd %DIR%
|
||||
start trilium.exe
|
||||
WHERE powershell.exe
|
||||
IF %ERRORLEVEL% NEQ 0 (start trilium.exe) ELSE (powershell.exe ./trilium-portable.ps1)
|
2
bin/tpl/trilium-portable.ps1
Normal file
2
bin/tpl/trilium-portable.ps1
Normal file
@ -0,0 +1,2 @@
|
||||
Set-Item -Path Env:TRILIUM_DATA_DIR -Value './trilium-data'
|
||||
./trilium.exe
|
@ -1,4 +1,5 @@
|
||||
SET DIR=%~dp0
|
||||
SET TRILIUM_SAFE_MODE=1
|
||||
cd %DIR%
|
||||
start trilium.exe
|
||||
WHERE powershell.exe
|
||||
IF %ERRORLEVEL% NEQ 0 (start trilium.exe) ELSE (powershell.exe ./trilium-safe-mode.ps1)
|
2
bin/tpl/trilium-safe-mode.ps1
Normal file
2
bin/tpl/trilium-safe-mode.ps1
Normal file
@ -0,0 +1,2 @@
|
||||
Set-Item -Path Env:TRILIUM_SAFE_MODE -Value 1
|
||||
./trilium.exe
|
Loading…
x
Reference in New Issue
Block a user