-
-
Notifications
You must be signed in to change notification settings - Fork 118
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
enh(msix): force run as an appx package
- Loading branch information
Showing
9 changed files
with
57 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
import { path } from '@tauri-apps/api'; | ||
import { getRootElement, invoke, SeelenCommand } from 'seelen-core'; | ||
import { invoke } from '@tauri-apps/api/core'; | ||
import { getRootElement, SeelenCommand } from 'seelen-core'; | ||
|
||
export const getRootContainer = getRootElement; | ||
|
||
export function toPhysicalPixels(size: number): number { | ||
return Math.round(size * window.devicePixelRatio); | ||
} | ||
|
||
export async function wasInstalledUsingMSIX() { | ||
let installPath = await path.resourceDir(); | ||
return installPath.startsWith('C:\\Program Files\\WindowsApps'); | ||
export async function wasInstalledUsingMSIX(): Promise<boolean> { | ||
// Todo replace this when added to SeelenCommand | ||
return invoke('is_appx_package'); | ||
} | ||
|
||
export async function isDev() { | ||
export async function isDev(): Promise<boolean> { | ||
return invoke(SeelenCommand.IsDevMode); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters