aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNick Chan <towinchenmi@gmail.com>2022-01-30 13:10:34 +0800
committerGitHub <noreply@github.com>2022-01-30 00:10:34 -0500
commitcb6f2edab33e734f64bf851b113116e55c0b8b10 (patch)
tree7906c78b7a7287966a9ccf3fd94967b457ba4f43
parent5267c3482b50540998e632cadc9d95b742351af7 (diff)
downloadldid-cb6f2edab33e734f64bf851b113116e55c0b8b10.tar.gz
ldid-cb6f2edab33e734f64bf851b113116e55c0b8b10.tar.zst
ldid-cb6f2edab33e734f64bf851b113116e55c0b8b10.zip
Update manpage translations (#8)
* update manpage translations * update README to reflect on manpage translations
-rw-r--r--Makefile6
-rw-r--r--README.md2
-rw-r--r--docs/ldid.12
-rw-r--r--docs/ldid.zh_CN.1176
-rw-r--r--docs/ldid.zh_TW.1 (renamed from docs/ldid.1.zh_TW)22
5 files changed, 198 insertions, 10 deletions
diff --git a/Makefile b/Makefile
index 12b22c9..437aaee 100644
--- a/Makefile
+++ b/Makefile
@@ -17,6 +17,8 @@ MANDIR ?= $(PREFIX)/share/man
SRC := $(wildcard *.c) $(wildcard *.cpp)
LIBS ?= -lcrypto -lplist-2.0
+MANPAGE_LANGS := zh_TW zh_CN
+
all: ldid
%.c.o: %.c
@@ -32,7 +34,9 @@ install: all
$(INSTALL) -D -m755 ldid $(DESTDIR)$(BINDIR)/ldid
$(LN) -sf ldid $(DESTDIR)$(BINDIR)/ldid2
$(INSTALL) -D -m644 docs/ldid.1 $(DESTDIR)$(MANDIR)/man1/ldid.1
- $(INSTALL) -D -m644 docs/ldid.1.zh_TW $(DESTDIR)$(MANDIR)/zh_TW/man1/ldid.1
+ for lang in $(MANPAGE_LANGS); do \
+ $(INSTALL) -D -m644 docs/ldid.$$lang.1 $(DESTDIR)$(MANDIR)/$$lang/man1/ldid.1; \
+ done
clean:
rm -rf ldid *.o
diff --git a/README.md b/README.md
index edd8e95..b4063f6 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
# ldid
Changes from https://git.saurik.com/ldid.git:
-- Add a manpage (`en` and `zh_TW`) (@CRKatri & @asdfugil)
+- Add manpages (`en`, `zh_TW` and `zh_CN`) (@CRKatri & @asdfugil)
- Support OpenSSL 3 (@sunflsks)
- Allow p12 keys to have a password (@sunflsks)
diff --git a/docs/ldid.1 b/docs/ldid.1
index c071a8d..86cae11 100644
--- a/docs/ldid.1
+++ b/docs/ldid.1
@@ -1,5 +1,5 @@
.\"-
-.\" Copyright (c) 2021 ProcursusTeam
+.\" Copyright (c) 2021-2022 ProcursusTeam
.\" SPDX-License-Identifier: AGPL-3.0-or-later
.\"
.Dd October 8, 2021
diff --git a/docs/ldid.zh_CN.1 b/docs/ldid.zh_CN.1
new file mode 100644
index 0000000..f72483f
--- /dev/null
+++ b/docs/ldid.zh_CN.1
@@ -0,0 +1,176 @@
+.\"-
+.\" Copyright (c) 2021-2022 ProcursusTeam
+.\" SPDX-License-Identifier: AGPL-3.0-or-later
+.\"
+.Dd October 8, 2021
+.Dt LDID 1
+.Os
+.Sh 名称
+.Nm ldid
+.Nd 链接身份编辑器
+.Sh 语法
+.Nm
+.Op Fl A Ns Ar cputype : Ns Ar subtype
+.Op Fl a
+.Op Fl C Ns Op Ar adhoc | Ar enforcement | Ar expires | Ar hard | Ar host | Ar kill | Ar library-validation | Ar restrict | Ar runtime
+.Op Fl D
+.Op Fl d
+.Op Fl E Ns Ar 数字 : Ns Ar 档案
+.Op Fl e
+.Op Fl h
+.Op Fl K Ns Ar key.p12 Op Fl U Ns Ar password
+.Op Fl M
+.Op Fl P
+.Op Fl q
+.Op Fl r | Fl S Ns Ar 档案.xml | Fl s
+.Op Fl T Ns Ar timestamp
+.Op Fl u
+.Ar
+.Sh 描述
+.Nm
+把SHA1和SHA256杂凑值加入到Mach-O档案中,让它们能在有验证但没有签署验证的系统上运行。
+.Bl -tag -width -indent
+.It Fl a
+以十六进制印出处理器类型和亚类型。
+.It Fl A Ns Ar cputype : Ns Ar subtype
+当和
+.Fl a , Fl D , Fl e , Fl h , Fl q ,
+或
+.Fl u ,
+一起被使用时,只作用在被
+.Ar cputype
+和
+.Ar subtype .
+.Ar cputype
+和
+.Ar subtype
+指定的部分。 它们都应该是整数。
+.It Fl C Ns Op Ar adhoc | Ar enforcement | Ar expires | Ar hard | Ar host | Ar kill | Ar library-validation | Ar restrict | Ar runtime
+设定要在档案中包含的程式码签署选项。
+请看
+.Xr codesign 1
+来获得关于这些选项的更多资讯。
+.It Fl D
+重设加密码 (cryptid)。
+.It Fl d
+输出在二进位档案中的加密码。
+由于兼容性原因,这也能作为
+.Fl h ,
+工作,但在将来这会被移除。
+.It Fl E Ns Ar 数字 : Ns Ar 档案
+将
+.Ar 档案
+的杂凑值嵌入到位于
+.Ar 数字
+的特殊代码签署位置中。
+.It Fl e
+把每一部分的权限印出, 或印出
+.Fl A ,
+所指定的部分的权限
+.Ar 到标准输出。
+.It Fl h
+印出关于签署的资讯,包括杂凑值的
+类型,选项,CDHash, 和 CodeDirectory 版本到
+.Ar 标准输出。
+.It Fl K Ns Ar key.p12
+用在
+.Ar key.p12 .
+的身份签署。 这会给二进位档案有一个有效的签署,令它能够在有签署验证的系统上运行。
+如果
+.Ar key.p12
+有密码的话,你会被询问。 你也可以用
+.Fl U .
+.Ar 选项来提供密码。 .
+.It Fl M
+当和
+.Fl S ,
+一起使用时,和现有的权限合并而不是取代它。 这在加入权限时有用。
+.It Fl P
+将这个Mach-O二进位档案标示为系统二进位档案。
+.It Fl Q Ns Ar 档案
+把需求嵌入到
+.Ar 档案 .
+中。
+.It Fl q
+印出被嵌入在二进位档案中的需求。
+.It Fl r
+从Mach-O档案中删除签署。
+.It Fl S Ns Op Ar 档案.xml
+伪签署Mach-O档案。
+如果提供了
+.Ar 档案.xml
+那么在
+.Ar 档案.xml
+中的权限会被嵌入到Mach-O中。
+.It Fl s
+重新签署Mach-O档案但保留现有权限。
+.It Fl T Ns Ar 时间印章
+当签署一个动态链结函式库时,把时间印章设定为
+.Ar 时间印章 .
+.Ar 时间印章
+应该是一个以秒作为单位的UNIX时间印章,如果
+.Ar
+是一个连字号的话
+.Pq Sq Fl ,
+时间印章会被设定为Mach-O头中的时间印章。
+.It Fl U Ns Ar 密码
+使用
+.Ar 密码
+作为p12证书的密码,而不是询问。
+.It Fl u
+如果Mach-O档案有和UIKit链结,印出被链结的UIKit版本。
+.El
+.Sh 例子
+指令:
+.Pp
+.Dl "ldid -S 档案"
+.Pp
+会伪签署
+.Ar 档案
+而且不嵌入任何权限。
+.Pp
+指令:
+.Pp
+.Dl "ldid -Cadhoc -K/path/to/key.p12 -Sent.xml 档案"
+.Pp
+会使用
+.Ar /path/to/key.p12
+中的私錀来签署
+.Ar 档案
+也会使用在
+.Ar ent.xml ,
+中的权限并把签署标示为特别用途 (adhoc) 签署。 .
+.Pp
+指令:
+.Pp
+.Dl "ldid -Sent.xml -M 档案"
+.Pp
+会把
+.Ar ent.xml
+中的权限加入到已经在
+.Ar 档案 .
+中的权限。
+.Pp
+指令:
+.Pp
+.Dl "ldid -e 档案 > ent.xml"
+.Pp
+会把在
+.Ar 档案
+中每一部分的权限储存到
+.Ar ent.xml .
+.Sh 另见
+.Xr codesign 1
+.Sh 历史
+这个
+.Nm
+工具程式是由
+.An Jay \*qSaurik\*q Freeman . 所编写的。
+对iPhoneOS 1.2.0 和 2.0 的支援在2008年4月6号被加入。
+.Fl S
+在2008年6月13日被加入。 .
+SHA256 支援在2016年8月25日被加入,修正iOS 11支援。
+iOS 14支援在2020年7月31日由
+.An Kabir Oberai .
+加入。
+iOS 15支援在2021年6月11日被加入。
diff --git a/docs/ldid.1.zh_TW b/docs/ldid.zh_TW.1
index 257b4b1..64289af 100644
--- a/docs/ldid.1.zh_TW
+++ b/docs/ldid.zh_TW.1
@@ -1,5 +1,5 @@
.\"-
-.\" Copyright (c) 2021 ProcursusTeam
+.\" Copyright (c) 2021-2022 ProcursusTeam
.\" SPDX-License-Identifier: AGPL-3.0-or-later
.\"
.Dd October 8, 2021
@@ -15,6 +15,7 @@
.Op Fl C Ns Op Ar adhoc | Ar enforcement | Ar expires | Ar hard | Ar host | Ar kill | Ar library-validation | Ar restrict | Ar runtime
.Op Fl D
.Op Fl d
+.Op Fl E Ns Ar 數字 : Ns Ar 檔案
.Op Fl e
.Op Fl h
.Op Fl K Ns Ar key.p12 Op Fl U Ns Ar password
@@ -53,17 +54,24 @@
重設加密碼 (cryptid)。
.It Fl d
輸出在二進位檔案中的加密碼。
-由於兼容性原因,這像
+由於兼容性原因,這也能作為
.Fl h ,
-但在將來這會被移除。
+工作,但在將來這會被移除。
+.It Fl E Ns Ar 數字 : Ns Ar 檔案
+將
+.Ar 檔案
+的雜湊值嵌入到位於
+.Ar 數字
+的特殊代碼簽署位置中。
.It Fl e
把每一部分的權限印出, 或印出
.Fl A ,
所指定的部分的權限
.Ar 到標準輸出。
.It Fl h
-印出關於簽署的資訊,包括雜湊值的類型,選項,CDHash, 和 CodeDirectory 版本到
-.Ar 標準輸出。 .
+印出關於簽署的資訊,包括雜湊值的
+類型,選項,CDHash, 和 CodeDirectory 版本到
+.Ar 標準輸出。
.It Fl K Ns Ar key.p12
用在
.Ar key.p12 .
@@ -101,7 +109,7 @@
.Ar 時間印章 .
.Ar 時間印章
應該是一個以秒作為單位的UNIX時間印章,如果
-.Ar
+.Ar
是一個連字號的話
.Pq Sq Fl ,
時間印章會被設定為Mach-O頭中的時間印章。
@@ -165,4 +173,4 @@ SHA256 支援在2016年8月25日被加入,修正iOS 11支援。
iOS 14支援在2020年7月31日由
.An Kabir Oberai .
加入。
-iOS 15支援在2021年6月11日加入。
+iOS 15支援在2021年6月11日被加入。