pake-cli 1.2.8 โ 1.3.0
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 +29 -12
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -1658,6 +1658,15 @@ function mergeTauriConfig(url, options, tauriConf) {
|
|
|
1658
1658
|
const exists = yield fs.stat(options.icon)
|
|
1659
1659
|
.then(() => true)
|
|
1660
1660
|
.catch(() => false);
|
|
1661
|
+
if (process.platform === "linux") {
|
|
1662
|
+
delete tauriConf.tauri.bundle.deb.files;
|
|
1663
|
+
if (["all", "deb", "appimage"].includes(options.targets)) {
|
|
1664
|
+
tauriConf.tauri.bundle.targets = [options.targets];
|
|
1665
|
+
}
|
|
1666
|
+
else {
|
|
1667
|
+
logger.warn("targets must be 'all', 'deb', 'appimage', we will use default 'all'");
|
|
1668
|
+
}
|
|
1669
|
+
}
|
|
1661
1670
|
if (exists) {
|
|
1662
1671
|
let updateIconPath = true;
|
|
1663
1672
|
let customIconExt = path.extname(options.icon).toLowerCase();
|
|
@@ -1673,17 +1682,10 @@ function mergeTauriConfig(url, options, tauriConf) {
|
|
|
1673
1682
|
}
|
|
1674
1683
|
}
|
|
1675
1684
|
if (process.platform === "linux") {
|
|
1676
|
-
delete tauriConf.tauri.bundle.deb.files;
|
|
1677
1685
|
if (customIconExt != ".png") {
|
|
1678
1686
|
updateIconPath = false;
|
|
1679
1687
|
logger.warn(`icon file in Linux must be 512 * 512 pix with .png type, but you give ${customIconExt}`);
|
|
1680
1688
|
}
|
|
1681
|
-
if (["all", "deb", "appimage"].includes(options.targets)) {
|
|
1682
|
-
tauriConf.tauri.bundle.targets = [options.targets];
|
|
1683
|
-
}
|
|
1684
|
-
else {
|
|
1685
|
-
logger.warn("targets must be 'all', 'deb', 'appimage', we will use default 'all'");
|
|
1686
|
-
}
|
|
1687
1689
|
}
|
|
1688
1690
|
if (process.platform === "darwin" && customIconExt !== ".icns") {
|
|
1689
1691
|
updateIconPath = false;
|
|
@@ -1698,6 +1700,21 @@ function mergeTauriConfig(url, options, tauriConf) {
|
|
|
1698
1700
|
}
|
|
1699
1701
|
else {
|
|
1700
1702
|
logger.warn("the custom icon path may not exists. we will use default icon to replace it");
|
|
1703
|
+
switch (process.platform) {
|
|
1704
|
+
case "win32": {
|
|
1705
|
+
tauriConf.tauri.bundle.resources = ['png/icon_32.ico'];
|
|
1706
|
+
tauriConf.tauri.bundle.icon = ['png/icon_32.ico', 'png/icon_256.ico'];
|
|
1707
|
+
break;
|
|
1708
|
+
}
|
|
1709
|
+
case "darwin": {
|
|
1710
|
+
tauriConf.tauri.bundle.icon = ['icons/icon.icns'];
|
|
1711
|
+
break;
|
|
1712
|
+
}
|
|
1713
|
+
case "linux": {
|
|
1714
|
+
tauriConf.tauri.bundle.icon = ['png/icon_512.png'];
|
|
1715
|
+
break;
|
|
1716
|
+
}
|
|
1717
|
+
}
|
|
1701
1718
|
}
|
|
1702
1719
|
let configPath = "";
|
|
1703
1720
|
switch (process.platform) {
|
|
@@ -2025,11 +2042,11 @@ class MacBuilder {
|
|
|
2025
2042
|
yield mergeTauriConfig(url, options, tauriConf);
|
|
2026
2043
|
let dmgName;
|
|
2027
2044
|
if (options.multiArch) {
|
|
2028
|
-
yield shellExec(`cd "${npmDirectory}" && npm install && npm run build:mac`);
|
|
2045
|
+
yield shellExec(`cd "${npmDirectory}" && npm install --verbose && npm run build:mac`);
|
|
2029
2046
|
dmgName = `${name}_${tauriConf.package.version}_universal.dmg`;
|
|
2030
2047
|
}
|
|
2031
2048
|
else {
|
|
2032
|
-
yield shellExec(`cd "${npmDirectory}" && npm install && npm run build`);
|
|
2049
|
+
yield shellExec(`cd "${npmDirectory}" && npm install --verbose && npm run build`);
|
|
2033
2050
|
let arch = "x64";
|
|
2034
2051
|
if (process.arch === "arm64") {
|
|
2035
2052
|
arch = "aarch64";
|
|
@@ -2087,7 +2104,7 @@ class WinBuilder {
|
|
|
2087
2104
|
logger.debug('PakeAppOptions', options);
|
|
2088
2105
|
const { name } = options;
|
|
2089
2106
|
yield mergeTauriConfig(url, options, tauriConf);
|
|
2090
|
-
yield shellExec(`cd "${npmDirectory}" && npm install && npm run build`);
|
|
2107
|
+
yield shellExec(`cd "${npmDirectory}" && npm install --verbose && npm run build`);
|
|
2091
2108
|
const language = tauriConf.tauri.bundle.windows.wix.language[0];
|
|
2092
2109
|
const arch = process.arch;
|
|
2093
2110
|
const msiName = `${name}_${tauriConf.package.version}_${arch}_${language}.msi`;
|
|
@@ -2132,7 +2149,7 @@ class LinuxBuilder {
|
|
|
2132
2149
|
logger.debug('PakeAppOptions', options);
|
|
2133
2150
|
const { name } = options;
|
|
2134
2151
|
yield mergeTauriConfig(url, options, tauriConf);
|
|
2135
|
-
yield shellExec(`cd "${npmDirectory}" && npm install && npm run build`);
|
|
2152
|
+
yield shellExec(`cd "${npmDirectory}" && npm install --verbose && npm run build`);
|
|
2136
2153
|
let arch;
|
|
2137
2154
|
if (process.arch === "x64") {
|
|
2138
2155
|
arch = "amd64";
|
|
@@ -2181,7 +2198,7 @@ class BuilderFactory {
|
|
|
2181
2198
|
}
|
|
2182
2199
|
|
|
2183
2200
|
var name = "pake-cli";
|
|
2184
|
-
var version = "1.
|
|
2201
|
+
var version = "1.3.0";
|
|
2185
2202
|
var description = "๐คฑ๐ป Turn any webpage into a desktop app with Rust. ๐คฑ๐ป ๅพ็ฎๅ็็จ Rust ๆๅ
็ฝ้กต็ๆๅพๅฐ็ๆก้ข Appใ";
|
|
2186
2203
|
var engines = {
|
|
2187
2204
|
node: ">=16.0.0"
|
package/package.json
CHANGED