Skip to content

Commit

Permalink
🎨 Fix the packaging issue for Linux and Windows.
Browse files Browse the repository at this point in the history
  • Loading branch information
tw93 committed Jun 23, 2023
1 parent b3c087d commit 8865500
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions bin/builders/BaseBuilder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export default abstract class BaseBuilder {
}

protected getFileType(target: string): string {
return target.toLowerCase();
return target;
}

abstract getFileName(): string;
Expand All @@ -99,7 +99,7 @@ export default abstract class BaseBuilder {
return path.join(
npmDirectory,
this.getBasePath(),
fileType,
fileType.toLowerCase(),
`${fileName}.${fileType}`
);
}
Expand Down
2 changes: 1 addition & 1 deletion bin/helpers/merge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ export async function mergeConfig(
height,
fullscreen,
transparent,
resizable,
userAgent,
showMenu,
showSystemTray,
systemTrayIcon,
iterCopyFile,
identifier,
name,
resizable = true,
} = options;

const { platform } = process;
Expand Down
8 changes: 4 additions & 4 deletions dist/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import isUrl from 'is-url';
import fs from 'fs';

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 engines = {
node: ">=16.0.0"
Expand Down Expand Up @@ -464,7 +464,7 @@ function checkRustInstalled() {
}

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;
// Set Windows parameters.
const tauriConfWindowOptions = {
Expand Down Expand Up @@ -675,7 +675,7 @@ class BaseBuilder {
logger.success('✔ App installer located in', distPath);
}
getFileType(target) {
return target.toLowerCase();
return target;
}
getBuildCommand() {
return "npm run build";
Expand All @@ -684,7 +684,7 @@ class BaseBuilder {
return 'src-tauri/target/release/bundle/';
}
getBuildAppPath(npmDirectory, fileName, fileType) {
return path.join(npmDirectory, this.getBasePath(), fileType, `${fileName}.${fileType}`);
return path.join(npmDirectory, this.getBasePath(), fileType.toLowerCase(), `${fileName}.${fileType}`);
}
}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pake-cli",
"version": "2.1.3",
"version": "2.1.4",
"description": "🤱🏻 Turn any webpage into a desktop app with Rust. 🤱🏻 很简单的用 Rust 打包网页生成很小的桌面 App。",
"engines": {
"node": ">=16.0.0"
Expand Down

0 comments on commit 8865500

Please sign in to comment.