🐛 Fix ico copy problem under Windows
This commit is contained in:
8
bin/helpers/merge.ts
vendored
8
bin/helpers/merge.ts
vendored
@@ -224,7 +224,13 @@ StartupNotify=true
|
|||||||
} else {
|
} else {
|
||||||
const iconPath = path.join(npmDirectory, 'src-tauri/', iconInfo.path);
|
const iconPath = path.join(npmDirectory, 'src-tauri/', iconInfo.path);
|
||||||
tauriConf.bundle.resources = [iconInfo.path];
|
tauriConf.bundle.resources = [iconInfo.path];
|
||||||
await fsExtra.copy(options.icon, iconPath);
|
|
||||||
|
// Avoid copying if source and destination are the same
|
||||||
|
const absoluteIconPath = path.resolve(options.icon);
|
||||||
|
const absoluteDestPath = path.resolve(iconPath);
|
||||||
|
if (absoluteIconPath !== absoluteDestPath) {
|
||||||
|
await fsExtra.copy(options.icon, iconPath);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (updateIconPath) {
|
if (updateIconPath) {
|
||||||
|
|||||||
9
dist/cli.js
vendored
9
dist/cli.js
vendored
@@ -22,7 +22,7 @@ import sharp from 'sharp';
|
|||||||
import * as psl from 'psl';
|
import * as psl from 'psl';
|
||||||
|
|
||||||
var name = "pake-cli";
|
var name = "pake-cli";
|
||||||
var version = "3.2.10";
|
var version = "3.2.11";
|
||||||
var description = "🤱🏻 Turn any webpage into a desktop app with Rust. 🤱🏻 利用 Rust 轻松构建轻量级多端桌面应用。";
|
var description = "🤱🏻 Turn any webpage into a desktop app with Rust. 🤱🏻 利用 Rust 轻松构建轻量级多端桌面应用。";
|
||||||
var engines = {
|
var engines = {
|
||||||
node: ">=16.0.0"
|
node: ">=16.0.0"
|
||||||
@@ -484,7 +484,12 @@ StartupNotify=true
|
|||||||
else {
|
else {
|
||||||
const iconPath = path.join(npmDirectory, 'src-tauri/', iconInfo.path);
|
const iconPath = path.join(npmDirectory, 'src-tauri/', iconInfo.path);
|
||||||
tauriConf.bundle.resources = [iconInfo.path];
|
tauriConf.bundle.resources = [iconInfo.path];
|
||||||
await fsExtra.copy(options.icon, iconPath);
|
// Avoid copying if source and destination are the same
|
||||||
|
const absoluteIconPath = path.resolve(options.icon);
|
||||||
|
const absoluteDestPath = path.resolve(iconPath);
|
||||||
|
if (absoluteIconPath !== absoluteDestPath) {
|
||||||
|
await fsExtra.copy(options.icon, iconPath);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (updateIconPath) {
|
if (updateIconPath) {
|
||||||
tauriConf.bundle.icon = [options.icon];
|
tauriConf.bundle.icon = [options.icon];
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "pake-cli",
|
"name": "pake-cli",
|
||||||
"version": "3.2.10",
|
"version": "3.2.11",
|
||||||
"description": "🤱🏻 Turn any webpage into a desktop app with Rust. 🤱🏻 利用 Rust 轻松构建轻量级多端桌面应用。",
|
"description": "🤱🏻 Turn any webpage into a desktop app with Rust. 🤱🏻 利用 Rust 轻松构建轻量级多端桌面应用。",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=16.0.0"
|
"node": ">=16.0.0"
|
||||||
|
|||||||
Reference in New Issue
Block a user