update pake-cli to 1.3.0
This commit is contained in:
17
bin/builders/common.ts
vendored
17
bin/builders/common.ts
vendored
@@ -64,6 +64,7 @@ export async function mergeTauriConfig(
|
|||||||
.then(() => true)
|
.then(() => true)
|
||||||
.catch(() => false);
|
.catch(() => false);
|
||||||
if (process.platform === "linux") {
|
if (process.platform === "linux") {
|
||||||
|
delete tauriConf.tauri.bundle.deb.files;
|
||||||
if (["all", "deb", "appimage"].includes(options.targets)) {
|
if (["all", "deb", "appimage"].includes(options.targets)) {
|
||||||
tauriConf.tauri.bundle.targets = [options.targets];
|
tauriConf.tauri.bundle.targets = [options.targets];
|
||||||
} else {
|
} else {
|
||||||
@@ -85,7 +86,6 @@ export async function mergeTauriConfig(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (process.platform === "linux") {
|
if (process.platform === "linux") {
|
||||||
delete tauriConf.tauri.bundle.deb.files;
|
|
||||||
if (customIconExt != ".png") {
|
if (customIconExt != ".png") {
|
||||||
updateIconPath = false;
|
updateIconPath = false;
|
||||||
logger.warn(`icon file in Linux must be 512 * 512 pix with .png type, but you give ${customIconExt}`);
|
logger.warn(`icon file in Linux must be 512 * 512 pix with .png type, but you give ${customIconExt}`);
|
||||||
@@ -103,6 +103,21 @@ export async function mergeTauriConfig(
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
logger.warn("the custom icon path may not exists. we will use default icon to replace it");
|
logger.warn("the custom icon path may not exists. we will use default icon to replace it");
|
||||||
|
switch (process.platform) {
|
||||||
|
case "win32": {
|
||||||
|
tauriConf.tauri.bundle.resources = ['png/icon_32.ico'];
|
||||||
|
tauriConf.tauri.bundle.icon = ['png/icon_32.ico', 'png/icon_256.ico']
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case "darwin": {
|
||||||
|
tauriConf.tauri.bundle.icon = ['icons/icon.icns']
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case "linux": {
|
||||||
|
tauriConf.tauri.bundle.icon = ['png/icon_512.png']
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
19
dist/cli.js
vendored
19
dist/cli.js
vendored
@@ -1659,6 +1659,7 @@ function mergeTauriConfig(url, options, tauriConf) {
|
|||||||
.then(() => true)
|
.then(() => true)
|
||||||
.catch(() => false);
|
.catch(() => false);
|
||||||
if (process.platform === "linux") {
|
if (process.platform === "linux") {
|
||||||
|
delete tauriConf.tauri.bundle.deb.files;
|
||||||
if (["all", "deb", "appimage"].includes(options.targets)) {
|
if (["all", "deb", "appimage"].includes(options.targets)) {
|
||||||
tauriConf.tauri.bundle.targets = [options.targets];
|
tauriConf.tauri.bundle.targets = [options.targets];
|
||||||
}
|
}
|
||||||
@@ -1681,7 +1682,6 @@ function mergeTauriConfig(url, options, tauriConf) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (process.platform === "linux") {
|
if (process.platform === "linux") {
|
||||||
delete tauriConf.tauri.bundle.deb.files;
|
|
||||||
if (customIconExt != ".png") {
|
if (customIconExt != ".png") {
|
||||||
updateIconPath = false;
|
updateIconPath = false;
|
||||||
logger.warn(`icon file in Linux must be 512 * 512 pix with .png type, but you give ${customIconExt}`);
|
logger.warn(`icon file in Linux must be 512 * 512 pix with .png type, but you give ${customIconExt}`);
|
||||||
@@ -1700,6 +1700,21 @@ function mergeTauriConfig(url, options, tauriConf) {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
logger.warn("the custom icon path may not exists. we will use default icon to replace it");
|
logger.warn("the custom icon path may not exists. we will use default icon to replace it");
|
||||||
|
switch (process.platform) {
|
||||||
|
case "win32": {
|
||||||
|
tauriConf.tauri.bundle.resources = ['png/icon_32.ico'];
|
||||||
|
tauriConf.tauri.bundle.icon = ['png/icon_32.ico', 'png/icon_256.ico'];
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case "darwin": {
|
||||||
|
tauriConf.tauri.bundle.icon = ['icons/icon.icns'];
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case "linux": {
|
||||||
|
tauriConf.tauri.bundle.icon = ['png/icon_512.png'];
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
let configPath = "";
|
let configPath = "";
|
||||||
switch (process.platform) {
|
switch (process.platform) {
|
||||||
@@ -2183,7 +2198,7 @@ class BuilderFactory {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var name = "pake-cli";
|
var name = "pake-cli";
|
||||||
var version = "1.2.9";
|
var version = "1.3.0";
|
||||||
var description = "🤱🏻 Turn any webpage into a desktop app with Rust. 🤱🏻 很简单的用 Rust 打包网页生成很小的桌面 App。";
|
var description = "🤱🏻 Turn any webpage into a desktop app with Rust. 🤱🏻 很简单的用 Rust 打包网页生成很小的桌面 App。";
|
||||||
var engines = {
|
var engines = {
|
||||||
node: ">=16.0.0"
|
node: ">=16.0.0"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "pake-cli",
|
"name": "pake-cli",
|
||||||
"version": "1.2.9",
|
"version": "1.3.0",
|
||||||
"description": "🤱🏻 Turn any webpage into a desktop app with Rust. 🤱🏻 很简单的用 Rust 打包网页生成很小的桌面 App。",
|
"description": "🤱🏻 Turn any webpage into a desktop app with Rust. 🤱🏻 很简单的用 Rust 打包网页生成很小的桌面 App。",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=16.0.0"
|
"node": ">=16.0.0"
|
||||||
|
|||||||
Reference in New Issue
Block a user