mirror of
https://github.com/tiddly-gittly/TidGi-Desktop.git
synced 2026-01-21 03:51:15 -08:00
fix: different out path on macos
This commit is contained in:
parent
8a84d9b468
commit
126e7ec8d0
1 changed files with 5 additions and 2 deletions
|
|
@ -81,9 +81,12 @@ export const LOCALIZATION_FOLDER = isPackaged
|
|||
|
||||
// Default wiki locations
|
||||
// For E2E tests, always use project root's wiki-test (outside asar)
|
||||
// process.resourcesPath: out/TidGi-.../resources -> need ../../.. to get to project root
|
||||
// Windows/Linux: process.resourcesPath = out/TidGi-.../resources -> need ../../.. (3 levels) to get to project root
|
||||
// macOS: process.resourcesPath = out/TidGi-darwin-x64/TidGi.app/Contents/Resources -> need ../../../../../ (5 levels) to get to project root
|
||||
export const DEFAULT_FIRST_WIKI_FOLDER_PATH = isTest && isPackaged
|
||||
? path.resolve(process.resourcesPath, '..', '..', '..', testWikiFolderName) // E2E packaged: project root
|
||||
? (isMac
|
||||
? path.resolve(process.resourcesPath, '..', '..', '..', '..', '..', testWikiFolderName) // macOS E2E: 5 levels up
|
||||
: path.resolve(process.resourcesPath, '..', '..', '..', testWikiFolderName)) // Windows/Linux E2E: 3 levels up
|
||||
: isTest
|
||||
? path.resolve(__dirname, '..', '..', testWikiFolderName) // E2E dev: project root
|
||||
: isDevelopmentOrTest
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue