🎨 Fix the packaging issue for Linux and Windows.
This commit is contained in:
4
bin/builders/BaseBuilder.ts
vendored
4
bin/builders/BaseBuilder.ts
vendored
@@ -82,7 +82,7 @@ export default abstract class BaseBuilder {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected getFileType(target: string): string {
|
protected getFileType(target: string): string {
|
||||||
return target.toLowerCase();
|
return target;
|
||||||
}
|
}
|
||||||
|
|
||||||
abstract getFileName(): string;
|
abstract getFileName(): string;
|
||||||
@@ -99,7 +99,7 @@ export default abstract class BaseBuilder {
|
|||||||
return path.join(
|
return path.join(
|
||||||
npmDirectory,
|
npmDirectory,
|
||||||
this.getBasePath(),
|
this.getBasePath(),
|
||||||
fileType,
|
fileType.toLowerCase(),
|
||||||
`${fileName}.${fileType}`
|
`${fileName}.${fileType}`
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
2
bin/helpers/merge.ts
vendored
2
bin/helpers/merge.ts
vendored
@@ -15,7 +15,6 @@ export async function mergeConfig(
|
|||||||
height,
|
height,
|
||||||
fullscreen,
|
fullscreen,
|
||||||
transparent,
|
transparent,
|
||||||
resizable,
|
|
||||||
userAgent,
|
userAgent,
|
||||||
showMenu,
|
showMenu,
|
||||||
showSystemTray,
|
showSystemTray,
|
||||||
@@ -23,6 +22,7 @@ export async function mergeConfig(
|
|||||||
iterCopyFile,
|
iterCopyFile,
|
||||||
identifier,
|
identifier,
|
||||||
name,
|
name,
|
||||||
|
resizable = true,
|
||||||
} = options;
|
} = options;
|
||||||
|
|
||||||
const { platform } = process;
|
const { platform } = process;
|
||||||
|
|||||||
8
dist/cli.js
vendored
8
dist/cli.js
vendored
@@ -20,7 +20,7 @@ import isUrl from 'is-url';
|
|||||||
import fs from 'fs';
|
import fs from 'fs';
|
||||||
|
|
||||||
var name = "pake-cli";
|
var name = "pake-cli";
|
||||||
var version = "2.1.3";
|
var version = "2.1.4";
|
||||||
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"
|
||||||
@@ -464,7 +464,7 @@ function checkRustInstalled() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function mergeConfig(url, options, tauriConf) {
|
async function mergeConfig(url, options, tauriConf) {
|
||||||
const { width, height, fullscreen, transparent, resizable, userAgent, showMenu, showSystemTray, systemTrayIcon, iterCopyFile, identifier, name, } = options;
|
const { width, height, fullscreen, transparent, userAgent, showMenu, showSystemTray, systemTrayIcon, iterCopyFile, identifier, name, resizable = true, } = options;
|
||||||
const { platform } = process;
|
const { platform } = process;
|
||||||
// Set Windows parameters.
|
// Set Windows parameters.
|
||||||
const tauriConfWindowOptions = {
|
const tauriConfWindowOptions = {
|
||||||
@@ -675,7 +675,7 @@ class BaseBuilder {
|
|||||||
logger.success('✔ App installer located in', distPath);
|
logger.success('✔ App installer located in', distPath);
|
||||||
}
|
}
|
||||||
getFileType(target) {
|
getFileType(target) {
|
||||||
return target.toLowerCase();
|
return target;
|
||||||
}
|
}
|
||||||
getBuildCommand() {
|
getBuildCommand() {
|
||||||
return "npm run build";
|
return "npm run build";
|
||||||
@@ -684,7 +684,7 @@ class BaseBuilder {
|
|||||||
return 'src-tauri/target/release/bundle/';
|
return 'src-tauri/target/release/bundle/';
|
||||||
}
|
}
|
||||||
getBuildAppPath(npmDirectory, fileName, fileType) {
|
getBuildAppPath(npmDirectory, fileName, fileType) {
|
||||||
return path.join(npmDirectory, this.getBasePath(), fileType, `${fileName}.${fileType}`);
|
return path.join(npmDirectory, this.getBasePath(), fileType.toLowerCase(), `${fileName}.${fileType}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "pake-cli",
|
"name": "pake-cli",
|
||||||
"version": "2.1.3",
|
"version": "2.1.4",
|
||||||
"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