dsh-ipa-build 1.4.1 → 1.4.2
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/README.md +1 -1
- package/SKILL.md +1 -1
- package/index.js +5 -1
- package/package.json +1 -2
- package/scripts/ipa +1 -1
- package/scripts/ipa.ps1 +1 -1
- package/plugin.json +0 -42
package/README.md
CHANGED
package/SKILL.md
CHANGED
package/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { readFile } from "node:fs/promises";
|
|
2
2
|
import { fileURLToPath } from "node:url";
|
|
3
3
|
|
|
4
|
-
const MANIFEST_URL = new URL("./
|
|
4
|
+
const MANIFEST_URL = new URL("./package.json", import.meta.url);
|
|
5
5
|
let versionPromise;
|
|
6
6
|
|
|
7
7
|
// 不能在这里 top-level await:宿主有可能是 require 进来的,同步加载才稳
|
|
@@ -70,3 +70,7 @@ function apply(ctx) {
|
|
|
70
70
|
ctx.skills.registerProvider(() => provider);
|
|
71
71
|
}
|
|
72
72
|
export { apply, inject, name };
|
|
73
|
+
|
|
74
|
+
// 有的加载器只认默认导出,带上更稳;根目录不能再放 plugin.json,
|
|
75
|
+
// DSH 会先读那个文件当插件本体,它不是对象也不是函数,直接报 expect apply
|
|
76
|
+
export default { name, apply, inject };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-ipa-build",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.2",
|
|
4
4
|
"description": "把 iOS 源码打成 .ipa 的 DSH 插件,自带 iPhoneOS 16.5 SDK 和 zsign,Windows、Linux、macOS 都能编能签。",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -20,7 +20,6 @@
|
|
|
20
20
|
"cordis.patch.yml",
|
|
21
21
|
"SKILL.md",
|
|
22
22
|
"POLICY.md",
|
|
23
|
-
"plugin.json",
|
|
24
23
|
"README.md",
|
|
25
24
|
"LICENSE",
|
|
26
25
|
"NOTICE",
|
package/scripts/ipa
CHANGED
|
@@ -10,7 +10,7 @@ sdk="${IPA_SDK:-$tc/sdk/iPhoneOS16.5.sdk}"
|
|
|
10
10
|
ldid="${IPA_LDID:-$tc/bin/ldid}"
|
|
11
11
|
|
|
12
12
|
app_version() {
|
|
13
|
-
sed -n 's/.*"version": *"\([^"]*\)".*/\1/p' "$root/
|
|
13
|
+
sed -n 's/.*"version": *"\([^"]*\)".*/\1/p' "$root/package.json" 2>/dev/null | head -1
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
# 只判断 a 是否比 b 旧,输出 1/0。不用 sort -V:macOS 的 sort 没有这个开关。
|
package/scripts/ipa.ps1
CHANGED
|
@@ -22,7 +22,7 @@ $envFile = Join-Path $tc 'env.ps1'
|
|
|
22
22
|
if ((Test-Path $envFile) -and -not $env:IPA_NO_ENV) { . $envFile }
|
|
23
23
|
|
|
24
24
|
function Get-AppVersion {
|
|
25
|
-
$raw = Get-Content (Join-Path $root '
|
|
25
|
+
$raw = Get-Content (Join-Path $root 'package.json') -Raw -Encoding UTF8
|
|
26
26
|
$m = [regex]::Match($raw, '"version"\s*:\s*"([^"]+)"')
|
|
27
27
|
if ($m.Success) { $m.Groups[1].Value } else { '0.0.0' }
|
|
28
28
|
}
|
package/plugin.json
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "产出 IPA",
|
|
3
|
-
"id": "dsh-ipa-build",
|
|
4
|
-
"version": "1.4.1",
|
|
5
|
-
"type": "skill",
|
|
6
|
-
"skill": "SKILL.md",
|
|
7
|
-
"setup": {
|
|
8
|
-
"linux": "bash scripts/bootstrap.sh",
|
|
9
|
-
"darwin": "bash scripts/bootstrap.sh",
|
|
10
|
-
"win32": "powershell -ExecutionPolicy Bypass -File scripts\\bootstrap.ps1"
|
|
11
|
-
},
|
|
12
|
-
"entry": {
|
|
13
|
-
"linux": "scripts/ipa",
|
|
14
|
-
"darwin": "scripts/ipa",
|
|
15
|
-
"win32": "scripts/ipa.ps1"
|
|
16
|
-
},
|
|
17
|
-
"home": "~/.ipa-toolchain",
|
|
18
|
-
"capabilities": [
|
|
19
|
-
"arm64-apple-ios 交叉编译(clang + ld64.lld),Linux / macOS / Windows 都能编,编译器由插件自己装",
|
|
20
|
-
"iPhoneOS16.5 SDK 框架链接,走 SDK 里的 .tbd stub(包内已展开,Windows 解包不会缺符号)",
|
|
21
|
-
"Swift / SwiftUI / storyboard 源码转成等价的 Objective-C、UIKit 实现再编,不是拒绝,是把活干完",
|
|
22
|
-
"伪签名:Linux/macOS 用 ldid,Windows 用 zsign",
|
|
23
|
-
"带证书签名:--p12 证书 --prov 描述文件 --password 密码,Windows 由 zsign 完成",
|
|
24
|
-
"Payload/*.app -> .ipa 打包,可改 bundle id / 显示名 / 版本 / 图标",
|
|
25
|
-
"已有 ipa 或 app 重签",
|
|
26
|
-
"工具链装在 ~/.ipa-toolchain,第一次用自动铺;ipa update 从 npm 热更新,不用重装插件"
|
|
27
|
-
],
|
|
28
|
-
"commands": {
|
|
29
|
-
"doctor": "ipa doctor",
|
|
30
|
-
"info": "ipa info <x.ipa|x.app>",
|
|
31
|
-
"build": "ipa build <源码目录> --name X --bundle-id com.x.y [--min-ios 14.0] [--framework UIKit] [--entitlements p.plist] [--icon i.png] [--p12 c.p12 --prov p.mobileprovision --password pw] [-o out.ipa]",
|
|
32
|
-
"pack": "ipa pack <Xxx.app> [-o out.ipa] [--bundle-id com.x.y] [--name 显示名] [--version 1.2] [--icon i.png] [--p12 c.p12 --prov p.mobileprovision --password pw]",
|
|
33
|
-
"resign": "ipa resign <x.ipa|x.app> [-o out.ipa] [--bundle-id com.x.y] [--p12 c.p12 --prov p.mobileprovision --password pw]"
|
|
34
|
-
},
|
|
35
|
-
"limits": [
|
|
36
|
-
"Swift 源码没有 swiftc 编,转成等价的 Objective-C 之后再编;几百行能还原得很接近,几千行又带动画、自定义绘制的工程会有偏差,交付时逐项说明哪块没对上",
|
|
37
|
-
"ad-hoc 签名只装得进越狱设备 / TrollStore,普通设备要开发者证书重签",
|
|
38
|
-
"Linux / macOS 上的证书签名需要自备 zsign 可执行文件(官方只发 Windows 版)",
|
|
39
|
-
"Windows 打包会把 .framework 里的符号链接展开成文件副本,包能装但体积和文件列表跟 Linux/macOS 打出来的不完全一样",
|
|
40
|
-
"不做 App Store 上架,不碰 FairPlay 解密"
|
|
41
|
-
]
|
|
42
|
-
}
|