pake-cli 3.6.3 โ 3.6.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +24 -18
- package/package.json +1 -1
- package/src-tauri/.pake/pake.json +1 -1
- package/src-tauri/.pake/tauri.conf.json +9 -5
- package/src-tauri/.pake/tauri.linux.conf.json +0 -1
- package/src-tauri/.pake/tauri.macos.conf.json +5 -2
- package/src-tauri/Cargo.lock +1 -1
- package/src-tauri/Cargo.toml +1 -1
- package/src-tauri/tauri.linux.conf.json +0 -1
- package/dist/dev.js +0 -1943
- package/dist/dev.js.map +0 -1
package/dist/cli.js
CHANGED
|
@@ -22,7 +22,7 @@ import * as psl from 'psl';
|
|
|
22
22
|
import { InvalidArgumentError, program as program$1, Option } from 'commander';
|
|
23
23
|
|
|
24
24
|
var name = "pake-cli";
|
|
25
|
-
var version = "3.6.
|
|
25
|
+
var version = "3.6.4";
|
|
26
26
|
var description = "๐คฑ๐ป Turn any webpage into a desktop app with one command. ๐คฑ๐ป ไธ้ฎๆๅ
็ฝ้กต็ๆ่ฝป้ๆก้ขๅบ็จใ";
|
|
27
27
|
var engines = {
|
|
28
28
|
node: ">=18.0.0"
|
|
@@ -504,9 +504,9 @@ async function mergeConfig(url, options, tauriConf) {
|
|
|
504
504
|
tauriConf.productName = name;
|
|
505
505
|
tauriConf.identifier = identifier;
|
|
506
506
|
tauriConf.version = appVersion;
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
}
|
|
507
|
+
// Always set mainBinaryName to ensure binary uniqueness
|
|
508
|
+
const linuxBinaryName = `pake-${generateLinuxPackageName(name)}`;
|
|
509
|
+
tauriConf.mainBinaryName = platform === 'linux' ? linuxBinaryName : `pake-${generateIdentifierSafeName(name)}`;
|
|
510
510
|
if (platform == 'win32') {
|
|
511
511
|
tauriConf.bundle.windows.wix.language[0] = installerLanguage;
|
|
512
512
|
}
|
|
@@ -551,9 +551,9 @@ async function mergeConfig(url, options, tauriConf) {
|
|
|
551
551
|
// Remove hardcoded desktop files and regenerate with correct app name
|
|
552
552
|
delete tauriConf.bundle.linux.deb.files;
|
|
553
553
|
// Generate correct desktop file configuration
|
|
554
|
-
const
|
|
555
|
-
const
|
|
556
|
-
const
|
|
554
|
+
const linuxName = generateLinuxPackageName(name);
|
|
555
|
+
const desktopFileName = `com.pake.${linuxName}.desktop`;
|
|
556
|
+
const iconName = `${linuxName}_512`;
|
|
557
557
|
// Create desktop file content
|
|
558
558
|
// Determine if title contains Chinese characters for Name[zh_CN]
|
|
559
559
|
const chineseName = title && /[\u4e00-\u9fa5]/.test(title) ? title : null;
|
|
@@ -563,11 +563,12 @@ Type=Application
|
|
|
563
563
|
Name=${name}
|
|
564
564
|
${chineseName ? `Name[zh_CN]=${chineseName}` : ''}
|
|
565
565
|
Comment=${name}
|
|
566
|
-
Exec
|
|
567
|
-
Icon=${
|
|
568
|
-
Categories=Network;WebBrowser;
|
|
566
|
+
Exec=${linuxBinaryName}
|
|
567
|
+
Icon=${iconName}
|
|
568
|
+
Categories=Network;WebBrowser;Utility;
|
|
569
569
|
MimeType=text/html;text/xml;application/xhtml_xml;
|
|
570
570
|
StartupNotify=true
|
|
571
|
+
Terminal=false
|
|
571
572
|
`;
|
|
572
573
|
// Write desktop file to src-tauri/assets directory where Tauri expects it
|
|
573
574
|
const srcAssetsDir = path.join(npmDirectory, 'src-tauri/assets');
|
|
@@ -576,8 +577,16 @@ StartupNotify=true
|
|
|
576
577
|
await fsExtra.writeFile(srcDesktopFilePath, desktopContent);
|
|
577
578
|
// Set up desktop file in bundle configuration
|
|
578
579
|
// Use absolute path from src-tauri directory to assets
|
|
580
|
+
const desktopInstallPath = `/usr/share/applications/${desktopFileName}`;
|
|
579
581
|
tauriConf.bundle.linux.deb.files = {
|
|
580
|
-
[
|
|
582
|
+
[desktopInstallPath]: `assets/${desktopFileName}`,
|
|
583
|
+
};
|
|
584
|
+
// Add desktop file support for RPM
|
|
585
|
+
if (!tauriConf.bundle.linux.rpm) {
|
|
586
|
+
tauriConf.bundle.linux.rpm = {};
|
|
587
|
+
}
|
|
588
|
+
tauriConf.bundle.linux.rpm.files = {
|
|
589
|
+
[desktopInstallPath]: `assets/${desktopFileName}`,
|
|
581
590
|
};
|
|
582
591
|
const validTargets = [
|
|
583
592
|
'deb',
|
|
@@ -615,7 +624,7 @@ StartupNotify=true
|
|
|
615
624
|
},
|
|
616
625
|
linux: {
|
|
617
626
|
fileExt: '.png',
|
|
618
|
-
path: `png/${
|
|
627
|
+
path: `png/${generateLinuxPackageName(name)}_512.png`,
|
|
619
628
|
defaultIcon: 'png/icon_512.png',
|
|
620
629
|
message: 'Linux icon must be .png and 512x512px.',
|
|
621
630
|
},
|
|
@@ -1083,12 +1092,9 @@ class BaseBuilder {
|
|
|
1083
1092
|
*/
|
|
1084
1093
|
getBinaryName(appName) {
|
|
1085
1094
|
const extension = process.platform === 'win32' ? '.exe' : '';
|
|
1086
|
-
//
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
}
|
|
1090
|
-
// Windows and macOS use 'pake' as binary name
|
|
1091
|
-
return `pake${extension}`;
|
|
1095
|
+
// Use unique binary name for all platforms to avoid conflicts
|
|
1096
|
+
const nameToUse = process.platform === 'linux' ? generateLinuxPackageName(appName) : generateIdentifierSafeName(appName);
|
|
1097
|
+
return `pake-${nameToUse}${extension}`;
|
|
1092
1098
|
}
|
|
1093
1099
|
/**
|
|
1094
1100
|
* Check if this build has architecture-specific target
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"productName": "
|
|
3
|
-
"identifier": "com.pake.
|
|
2
|
+
"productName": "Final App",
|
|
3
|
+
"identifier": "com.pake.c984d0",
|
|
4
4
|
"version": "1.0.0",
|
|
5
5
|
"app": {
|
|
6
6
|
"withGlobalTauri": true,
|
|
@@ -14,11 +14,15 @@
|
|
|
14
14
|
},
|
|
15
15
|
"bundle": {
|
|
16
16
|
"icon": [
|
|
17
|
-
"icons/
|
|
17
|
+
"icons/final_app.icns"
|
|
18
18
|
],
|
|
19
19
|
"active": true,
|
|
20
20
|
"targets": [
|
|
21
|
-
"
|
|
21
|
+
"dmg"
|
|
22
|
+
],
|
|
23
|
+
"resources": [
|
|
24
|
+
"icons/final_app.icns"
|
|
22
25
|
]
|
|
23
|
-
}
|
|
26
|
+
},
|
|
27
|
+
"mainBinaryName": "pake-finalapp"
|
|
24
28
|
}
|
package/src-tauri/Cargo.lock
CHANGED
package/src-tauri/Cargo.toml
CHANGED