Merge remote-tracking branch 'origin/master' into dev
This commit is contained in:
3
bin/README_CN.md
vendored
3
bin/README_CN.md
vendored
@@ -11,8 +11,7 @@ npm install pake-cli -g
|
||||
## Windows/Linux 注意事项
|
||||
|
||||
- **非常重要**:请参阅 Tauri 的 [依赖项指南](https://tauri.app/v1/guides/getting-started/prerequisites)。
|
||||
- 对于 Windows 用户,请确保至少安装了 `Win10 SDK(10.0.19041.0)` 和 `Visual Studio Build Tools 2022(版本 17.2 或更高)`
|
||||
。此外,还需要安装以下组件:
|
||||
- 对于 Windows 用户,请确保至少安装了 `Win10 SDK(10.0.19041.0)` 和 `Visual Studio Build Tools 2022(版本 17.2 或更高)`,此外还需要安装以下组件:
|
||||
|
||||
1. Microsoft Visual C++ 2015-2022 Redistributable (x64)
|
||||
2. Microsoft Visual C++ 2015-2022 Redistributable (x86)
|
||||
|
||||
6
bin/builders/BaseBuilder.ts
vendored
6
bin/builders/BaseBuilder.ts
vendored
@@ -27,8 +27,8 @@ export default abstract class BaseBuilder {
|
||||
const tauriTargetPathExists = await fsExtra.pathExists(tauriTargetPath);
|
||||
|
||||
if (!IS_MAC && !tauriTargetPathExists) {
|
||||
logger.info('✺ The first use requires installing system dependencies.');
|
||||
logger.info('✺ See more in https://tauri.app/v1/guides/getting-started/prerequisites.');
|
||||
logger.warn('✼ The first use requires installing system dependencies.');
|
||||
logger.warn('✼ See more in https://tauri.app/v1/guides/getting-started/prerequisites.');
|
||||
}
|
||||
|
||||
if (!checkRustInstalled()) {
|
||||
@@ -78,7 +78,7 @@ export default abstract class BaseBuilder {
|
||||
// Build app
|
||||
const spinner = getSpinner('Building app...');
|
||||
setTimeout(() => spinner.stop(), 3000);
|
||||
await shellExec(`cd ${npmDirectory} && ${this.getBuildCommand()}`);
|
||||
await shellExec(`cd "${npmDirectory}" && ${this.getBuildCommand()}`);
|
||||
|
||||
// Copy app
|
||||
const fileName = this.getFileName();
|
||||
|
||||
12
bin/cli.ts
vendored
12
bin/cli.ts
vendored
@@ -10,9 +10,17 @@ import handleInputOptions from './options/index';
|
||||
import { PakeCliOptions } from './types';
|
||||
import { validateNumberInput, validateUrlInput } from './utils/validate';
|
||||
|
||||
const { green, yellow }= chalk;
|
||||
const logo = `${chalk.green(' ____ _')}
|
||||
${green('| _ \\ __ _| | _____')}
|
||||
${green('| |_) / _` | |/ / _ \\')}
|
||||
${green('| __/ (_| | < __/')} ${yellow('https://github.com/tw93/pake')}
|
||||
${green('|_| \\__,_|_|\\_\\___| can turn any webpage into a desktop app with Rust.')}
|
||||
`;
|
||||
|
||||
program
|
||||
.description(chalk.green('Pake can turn any webpage into a desktop app with Rust.'))
|
||||
.usage('[url] [options]')
|
||||
.addHelpText('beforeAll', logo)
|
||||
.usage(`[url] [options]`)
|
||||
.showHelpAfterError();
|
||||
|
||||
program
|
||||
|
||||
2
bin/helpers/updater.ts
vendored
2
bin/helpers/updater.ts
vendored
@@ -2,5 +2,5 @@ import updateNotifier from 'update-notifier';
|
||||
import packageJson from '../../package.json';
|
||||
|
||||
export async function checkUpdateTips() {
|
||||
updateNotifier({ pkg: packageJson, updateCheckInterval: 1000 * 60 }).notify();
|
||||
updateNotifier({ pkg: packageJson, updateCheckInterval: 1000 * 60 }).notify({ isGlobal: true });
|
||||
}
|
||||
|
||||
2
bin/utils/info.ts
vendored
2
bin/utils/info.ts
vendored
@@ -6,7 +6,7 @@ import chalk from 'chalk';
|
||||
// Generates an identifier based on the given URL.
|
||||
export function getIdentifier(url: string) {
|
||||
const postFixHash = crypto.createHash('md5').update(url).digest('hex').substring(0, 6);
|
||||
return `pake-${postFixHash}`;
|
||||
return `com.pake.${postFixHash}`;
|
||||
}
|
||||
|
||||
export async function promptText(message: string, initial?: string): Promise<string> {
|
||||
|
||||
Reference in New Issue
Block a user