mirror of
https://github.com/TriliumNext/Notes.git
synced 2026-01-06 04:50:03 -06:00
chore(nx/forge): templates not working
This commit is contained in:
23
apps/desktop/electron-forge/trilium-no-cert-check.bat
Normal file
23
apps/desktop/electron-forge/trilium-no-cert-check.bat
Normal file
@@ -0,0 +1,23 @@
|
||||
@echo off
|
||||
:: Try to get powershell to launch Trilium since it deals with UTF-8 characters in current path
|
||||
:: If there's no powershell available, fallback to unicode enabled command interpreter
|
||||
|
||||
WHERE powershell.exe > NUL 2>&1
|
||||
IF %ERRORLEVEL% NEQ 0 GOTO BATCH ELSE GOTO POWERSHELL
|
||||
|
||||
:POWERSHELL
|
||||
powershell -ExecutionPolicy Bypass -NonInteractive -NoLogo "Set-Item -Path Env:NODE_TLS_REJECT_UNAUTHORIZED -Value 0; ./trilium.exe"
|
||||
GOTO END
|
||||
|
||||
:BATCH
|
||||
:: Make sure we support UTF-8 characters
|
||||
chcp 65001
|
||||
|
||||
:: Get Current Trilium executable directory and compute data directory
|
||||
SET DIR=%~dp0
|
||||
set NODE_TLS_REJECT_UNAUTHORIZED=0
|
||||
cd "%DIR%"
|
||||
start trilium.exe
|
||||
GOTO END
|
||||
|
||||
:END
|
||||
7
apps/desktop/electron-forge/trilium-no-cert-check.sh
Normal file
7
apps/desktop/electron-forge/trilium-no-cert-check.sh
Normal file
@@ -0,0 +1,7 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
DIR=`dirname "$0"`
|
||||
export NODE_TLS_REJECT_UNAUTHORIZED=0
|
||||
|
||||
"$DIR/trilium"
|
||||
|
||||
24
apps/desktop/electron-forge/trilium-portable.bat
Normal file
24
apps/desktop/electron-forge/trilium-portable.bat
Normal file
@@ -0,0 +1,24 @@
|
||||
@echo off
|
||||
:: Try to get powershell to launch Trilium since it deals with UTF-8 characters in current path
|
||||
:: If there's no powershell available, fallback to unicode enabled command interpreter
|
||||
|
||||
WHERE powershell.exe > NUL 2>&1
|
||||
IF %ERRORLEVEL% NEQ 0 GOTO BATCH ELSE GOTO POWERSHELL
|
||||
|
||||
:POWERSHELL
|
||||
powershell -ExecutionPolicy Bypass -NonInteractive -NoLogo "Set-Item -Path Env:TRILIUM_DATA_DIR -Value './trilium-data'; ./trilium.exe"
|
||||
GOTO END
|
||||
|
||||
:BATCH
|
||||
:: Make sure we support UTF-8 characters
|
||||
chcp 65001
|
||||
|
||||
:: Get Current Trilium executable directory and compute data directory
|
||||
SET DIR=%~dp0
|
||||
SET DIR=%DIR:~0,-1%
|
||||
SET TRILIUM_DATA_DIR=%DIR%\trilium-data
|
||||
cd "%DIR%"
|
||||
start trilium.exe
|
||||
GOTO END
|
||||
|
||||
:END
|
||||
7
apps/desktop/electron-forge/trilium-portable.sh
Normal file
7
apps/desktop/electron-forge/trilium-portable.sh
Normal file
@@ -0,0 +1,7 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
DIR=`dirname "$0"`
|
||||
export TRILIUM_DATA_DIR="$DIR/trilium-data"
|
||||
|
||||
"$DIR/trilium"
|
||||
|
||||
23
apps/desktop/electron-forge/trilium-safe-mode.bat
Normal file
23
apps/desktop/electron-forge/trilium-safe-mode.bat
Normal file
@@ -0,0 +1,23 @@
|
||||
@echo off
|
||||
:: Try to get powershell to launch Trilium since it deals with UTF-8 characters in current path
|
||||
:: If there's no powershell available, fallback to unicode enabled command interpreter
|
||||
|
||||
WHERE powershell.exe > NUL 2>&1
|
||||
IF %ERRORLEVEL% NEQ 0 GOTO BATCH ELSE GOTO POWERSHELL
|
||||
|
||||
:POWERSHELL
|
||||
powershell -ExecutionPolicy Bypass -NonInteractive -NoLogo "Set-Item -Path Env:TRILIUM_SAFE_MODE -Value 1; ./trilium.exe --disable-gpu"
|
||||
GOTO END
|
||||
|
||||
:BATCH
|
||||
:: Make sure we support UTF-8 characters
|
||||
chcp 65001
|
||||
|
||||
:: Get Current Trilium executable directory and compute data directory
|
||||
SET DIR=%~dp0
|
||||
SET TRILIUM_SAFE_MODE=1
|
||||
cd "%DIR%"
|
||||
start trilium.exe --disable-gpu
|
||||
GOTO END
|
||||
|
||||
:END
|
||||
7
apps/desktop/electron-forge/trilium-safe-mode.sh
Normal file
7
apps/desktop/electron-forge/trilium-safe-mode.sh
Normal file
@@ -0,0 +1,7 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
DIR=`dirname "$0"`
|
||||
export TRILIUM_SAFE_MODE=1
|
||||
|
||||
"$DIR/trilium" --disable-gpu
|
||||
|
||||
@@ -190,7 +190,7 @@ function getExtraResourcesForPlatform() {
|
||||
const getScriptRessources = () => {
|
||||
const scripts = ["trilium-portable", "trilium-safe-mode", "trilium-no-cert-check"];
|
||||
const scriptExt = (process.platform === "win32") ? "bat" : "sh";
|
||||
return scripts.map(script => `../server/tpl/${script}.${scriptExt}`);
|
||||
return scripts.map(script => `apps/desktop/electron-forge/${script}.${scriptExt}`);
|
||||
}
|
||||
|
||||
switch (process.platform) {
|
||||
|
||||
Reference in New Issue
Block a user