fixup some bug for MacOS pake-cli
This commit is contained in:
5
bin/builders/common.ts
vendored
5
bin/builders/common.ts
vendored
@@ -103,7 +103,6 @@ export async function mergeTauriConfig(
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 处理user-agent
|
// 处理user-agent
|
||||||
logger.warn(userAgent);
|
|
||||||
if (userAgent.length > 0) {
|
if (userAgent.length > 0) {
|
||||||
if (process.platform === "win32") {
|
if (process.platform === "win32") {
|
||||||
tauriConf.pake.user_agent.windows = userAgent;
|
tauriConf.pake.user_agent.windows = userAgent;
|
||||||
@@ -129,7 +128,7 @@ export async function mergeTauriConfig(
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (process.platform === "darwin") {
|
if (process.platform === "darwin") {
|
||||||
tauriConf.pake.user_agent.macos = true;
|
tauriConf.pake.menu.macos = true;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (process.platform === "win32") {
|
if (process.platform === "win32") {
|
||||||
@@ -141,7 +140,7 @@ export async function mergeTauriConfig(
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (process.platform === "darwin") {
|
if (process.platform === "darwin") {
|
||||||
tauriConf.pake.user_agent.macos = false;
|
tauriConf.pake.menu.macos = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
19
dist/cli.js
vendored
19
dist/cli.js
vendored
@@ -1706,7 +1706,6 @@ function mergeTauriConfig(url, options, tauriConf) {
|
|||||||
tauriConf.pake.windows[0].url_type = "web";
|
tauriConf.pake.windows[0].url_type = "web";
|
||||||
}
|
}
|
||||||
// 处理user-agent
|
// 处理user-agent
|
||||||
logger.warn(userAgent);
|
|
||||||
if (userAgent.length > 0) {
|
if (userAgent.length > 0) {
|
||||||
if (process.platform === "win32") {
|
if (process.platform === "win32") {
|
||||||
tauriConf.pake.user_agent.windows = userAgent;
|
tauriConf.pake.user_agent.windows = userAgent;
|
||||||
@@ -1727,7 +1726,7 @@ function mergeTauriConfig(url, options, tauriConf) {
|
|||||||
tauriConf.pake.menu.linux = true;
|
tauriConf.pake.menu.linux = true;
|
||||||
}
|
}
|
||||||
if (process.platform === "darwin") {
|
if (process.platform === "darwin") {
|
||||||
tauriConf.pake.user_agent.macos = true;
|
tauriConf.pake.menu.macos = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -1738,7 +1737,7 @@ function mergeTauriConfig(url, options, tauriConf) {
|
|||||||
tauriConf.pake.menu.linux = false;
|
tauriConf.pake.menu.linux = false;
|
||||||
}
|
}
|
||||||
if (process.platform === "darwin") {
|
if (process.platform === "darwin") {
|
||||||
tauriConf.pake.user_agent.macos = false;
|
tauriConf.pake.menu.macos = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 处理托盘
|
// 处理托盘
|
||||||
@@ -2091,7 +2090,7 @@ var tauri$3 = {
|
|||||||
active: false
|
active: false
|
||||||
},
|
},
|
||||||
systemTray: {
|
systemTray: {
|
||||||
iconPath: "png/weread_512.png",
|
iconPath: "png/icon_512.png",
|
||||||
iconAsTemplate: true
|
iconAsTemplate: true
|
||||||
},
|
},
|
||||||
allowlist: {
|
allowlist: {
|
||||||
@@ -2107,7 +2106,7 @@ var build = {
|
|||||||
};
|
};
|
||||||
var CommonConf = {
|
var CommonConf = {
|
||||||
"package": {
|
"package": {
|
||||||
productName: "WeRead",
|
productName: "baidu",
|
||||||
version: "1.0.0"
|
version: "1.0.0"
|
||||||
},
|
},
|
||||||
tauri: tauri$3,
|
tauri: tauri$3,
|
||||||
@@ -2116,8 +2115,8 @@ var CommonConf = {
|
|||||||
|
|
||||||
var windows = [
|
var windows = [
|
||||||
{
|
{
|
||||||
url: "https://weread.qq.com/",
|
url: "https://www.baidu.com",
|
||||||
transparent: true,
|
transparent: false,
|
||||||
fullscreen: false,
|
fullscreen: false,
|
||||||
width: 1200,
|
width: 1200,
|
||||||
height: 780,
|
height: 780,
|
||||||
@@ -2131,7 +2130,7 @@ var user_agent = {
|
|||||||
windows: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36"
|
windows: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36"
|
||||||
};
|
};
|
||||||
var menu = {
|
var menu = {
|
||||||
macos: true,
|
macos: false,
|
||||||
linux: false,
|
linux: false,
|
||||||
windows: false
|
windows: false
|
||||||
};
|
};
|
||||||
@@ -2187,9 +2186,9 @@ var WinConf = {
|
|||||||
var tauri$1 = {
|
var tauri$1 = {
|
||||||
bundle: {
|
bundle: {
|
||||||
icon: [
|
icon: [
|
||||||
"icons/weread.icns"
|
"/Users/hfy/Documents/electron_s/Pake/src-tauri/icons/icon.icns"
|
||||||
],
|
],
|
||||||
identifier: "com.tw93.weread",
|
identifier: "pake-f9751d",
|
||||||
active: true,
|
active: true,
|
||||||
category: "DeveloperTool",
|
category: "DeveloperTool",
|
||||||
copyright: "",
|
copyright: "",
|
||||||
|
|||||||
Reference in New Issue
Block a user