feat(cli): 升级0.1版本 支持Windows
This commit is contained in:
2
bin/README.md
vendored
2
bin/README.md
vendored
@@ -16,7 +16,7 @@ pake url [options]
|
||||
|
||||
Note: 打包需要用 `Rust` 环境,如果没有 `Rust`,会提示确认安装。如遇安装失败或超时,可[自行安装](https://www.rust-lang.org/tools/install)。
|
||||
|
||||
Note: 目前仅支持 MacOs,后续会支持其他平台。
|
||||
Note: 目前支持 MacOS 和 WIndows,后续会支持 Linux。
|
||||
|
||||
### url
|
||||
|
||||
|
||||
71
dist/cli.js
vendored
71
dist/cli.js
vendored
@@ -1812,11 +1812,11 @@ function checkRustInstalled() {
|
||||
var tauri$3 = {
|
||||
windows: [
|
||||
{
|
||||
url: "https://www.baidu.com",
|
||||
transparent: false,
|
||||
url: "https://weread.qq.com/",
|
||||
transparent: true,
|
||||
fullscreen: false,
|
||||
width: 1280,
|
||||
height: 800,
|
||||
width: 1200,
|
||||
height: 728,
|
||||
resizable: true
|
||||
}
|
||||
],
|
||||
@@ -1825,47 +1825,21 @@ var tauri$3 = {
|
||||
},
|
||||
updater: {
|
||||
active: false
|
||||
},
|
||||
bundle: {
|
||||
icon: [
|
||||
"/home/tlntin/文档/Program/Pake/src-tauri/png/code_512.png"
|
||||
],
|
||||
identifier: "pake-f9751d",
|
||||
active: true,
|
||||
category: "DeveloperTool",
|
||||
copyright: "",
|
||||
deb: {
|
||||
depends: [
|
||||
"libwebkit2gtk-4.0-dev",
|
||||
"build-essential",
|
||||
"curl",
|
||||
"wget",
|
||||
"libssl-dev",
|
||||
"libgtk-3-dev",
|
||||
"libayatana-appindicator3-dev",
|
||||
"librsvg2-dev"
|
||||
],
|
||||
files: {
|
||||
"/usr/share/applications/pake-f9751d-baidu.desktop": "/home/tlntin/文档/Program/Pake/src-tauri/assets/pake-f9751d-baidu.desktop"
|
||||
}
|
||||
},
|
||||
externalBin: [
|
||||
],
|
||||
longDescription: "",
|
||||
resources: [
|
||||
],
|
||||
shortDescription: "",
|
||||
targets: [
|
||||
"deb"
|
||||
]
|
||||
}
|
||||
};
|
||||
var build = {
|
||||
devPath: "../dist",
|
||||
distDir: "../dist",
|
||||
beforeBuildCommand: "",
|
||||
beforeDevCommand: ""
|
||||
};
|
||||
var CommonConf = {
|
||||
"package": {
|
||||
productName: "baidu",
|
||||
productName: "WeRead",
|
||||
version: "1.0.0"
|
||||
},
|
||||
tauri: tauri$3
|
||||
tauri: tauri$3,
|
||||
build: build
|
||||
};
|
||||
|
||||
var tauri$2 = {
|
||||
@@ -1939,9 +1913,10 @@ var MacConf = {
|
||||
var tauri = {
|
||||
bundle: {
|
||||
icon: [
|
||||
"/home/tlntin/文档/Program/Pake/src-tauri/png/code_512.png"
|
||||
"png/weread_256.ico",
|
||||
"png/weread_512.png"
|
||||
],
|
||||
identifier: "pake-f9751d",
|
||||
identifier: "com.tw93.weread",
|
||||
active: true,
|
||||
category: "DeveloperTool",
|
||||
copyright: "",
|
||||
@@ -1957,7 +1932,7 @@ var tauri = {
|
||||
"librsvg2-dev"
|
||||
],
|
||||
files: {
|
||||
"/usr/share/applications/pake-f9751d-baidu.desktop": "/home/tlntin/文档/Program/Pake/src-tauri/assets/pake-f9751d-baidu.desktop"
|
||||
"/usr/share/applications/com-tw93-weread.desktop": "assets/com-tw93-weread.desktop"
|
||||
}
|
||||
},
|
||||
externalBin: [
|
||||
@@ -2021,7 +1996,13 @@ class MacBuilder {
|
||||
const { name } = options;
|
||||
yield mergeTauriConfig(url, options, tauriConf);
|
||||
yield shellExec(`cd ${npmDirectory} && npm install && npm run build:release`);
|
||||
const arch = process.arch;
|
||||
let arch = "x64";
|
||||
if (process.arch === "arm64") {
|
||||
arch = "aarch64";
|
||||
}
|
||||
else {
|
||||
arch = process.arch;
|
||||
}
|
||||
const dmgName = `${name}_${tauriConf.package.version}_${arch}.dmg`;
|
||||
const appPath = this.getBuildedAppPath(npmDirectory, dmgName);
|
||||
const distPath = path.resolve(`${name}.dmg`);
|
||||
@@ -2084,7 +2065,7 @@ class WinBuilder {
|
||||
class LinuxBuilder {
|
||||
prepare() {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
logger.info('To build the Windows app, you need to install Rust and VS Build Tools.');
|
||||
logger.info('To build the Linux app, you need to install Rust and Linux package');
|
||||
logger.info('See more in https://tauri.app/v1/guides/getting-started/prerequisites#installing\n');
|
||||
if (checkRustInstalled()) {
|
||||
return;
|
||||
@@ -2163,7 +2144,7 @@ class BuilderFactory {
|
||||
}
|
||||
|
||||
var name = "pake-cli";
|
||||
var version = "0.0.6";
|
||||
var version = "1.0.0-beta.1";
|
||||
var description = "🤱🏻 很简单的用 Rust 打包网页生成很小的桌面 App 🤱🏻 A simple way to make any web page a desktop application using Rust.";
|
||||
var bin = {
|
||||
pake: "./cli.js"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "pake-cli",
|
||||
"version": "0.0.6",
|
||||
"version": "0.1.0",
|
||||
"description": "🤱🏻 很简单的用 Rust 打包网页生成很小的桌面 App 🤱🏻 A simple way to make any web page a desktop application using Rust.",
|
||||
"bin": {
|
||||
"pake": "./cli.js"
|
||||
|
||||
Reference in New Issue
Block a user