🐛 cli support tauri2

This commit is contained in:
Tw93
2024-12-16 15:09:57 +08:00
parent a566bb2849
commit d3e4217bed
4 changed files with 8 additions and 9 deletions

2
bin/README.md vendored
View File

@@ -221,7 +221,7 @@ Specify the system tray icon. This is only effective when the system tray is ena
#### [installer-language] #### [installer-language]
Set the Windows Installer language. Options include `zh-CN`, `ja-JP`, More at [Tauri Document](https://tauri.app/zh-cn/v1/guides/building/windows/#internationalization). Default is `en-US`. Set the Windows Installer language. Options include `zh-CN`, `ja-JP`, More at [Tauri Document](https://tauri.app/distribute/windows-installer/#internationalization). Default is `en-US`.
```shell ```shell
--installer-language <language> --installer-language <language>

2
bin/README_CN.md vendored
View File

@@ -222,7 +222,7 @@ Linux默认为 `all`。
#### [installer-language] #### [installer-language]
设置 Windows 安装包语言。支持 `zh-CN`、`ja-JP`,更多在 [Tauri 文档](https://tauri.app/zh-cn/v1/guides/building/windows/#internationalization)。默认为 `en-US`。 设置 Windows 安装包语言。支持 `zh-CN`、`ja-JP`,更多在 [Tauri 文档](https://tauri.app/distribute/windows-installer/#internationalization)。默认为 `en-US`。
```shell ```shell
--installer-language <language> --installer-language <language>

View File

@@ -45,10 +45,10 @@ export async function mergeConfig(url: string, options: PakeAppOptions, tauriCon
}; };
Object.assign(tauriConf.pake.windows[0], { url, ...tauriConfWindowOptions }); Object.assign(tauriConf.pake.windows[0], { url, ...tauriConfWindowOptions });
tauriConf.package.productName = name; tauriConf.productName = name;
tauriConf.tauri.bundle.identifier = identifier; tauriConf.identifier = identifier;
if (platform == "win32") { if (platform == "win32") {
tauriConf.tauri.bundle.windows.wix.language[0] = installerLanguage; tauriConf.bundle.windows.wix.language[0] = installerLanguage;
} }
//Judge the type of URL, whether it is a file or a website. //Judge the type of URL, whether it is a file or a website.

7
bin/types.ts vendored
View File

@@ -27,7 +27,6 @@ export interface PakeCliOptions {
// Enable windows always on top, default false // Enable windows always on top, default false
alwaysOnTop: boolean; alwaysOnTop: boolean;
// Force Mac to use dark mode, default false // Force Mac to use dark mode, default false
darkMode: boolean; darkMode: boolean;
@@ -58,11 +57,11 @@ export interface PakeCliOptions {
// Debug mode, outputs more logs // Debug mode, outputs more logs
debug: boolean; debug: boolean;
/** 需要注入页面的外部脚本 */ /** External scripts that need to be injected into the page. */
inject: string[]; inject: string[];
// Proxy // Set Api Proxy
proxyUrl: string; proxyUrl: string;
// Installer language, valid for Windows users, default is en-US // Installer language, valid for Windows users, default is en-US
installerLanguage: string; installerLanguage: string;