镜像自地址
https://github.com/JGZYES/ParlzPackageManger.git
已同步 2026-09-11 05:42:44 +08:00
- docs/STANDARD.md: unified banner (PMM <ver> (<arch>)), command wording,
help layout, CHANGELOG and .pjson key-naming conventions.
- src/i18n.c/.h: pmm_tr / pmm_tr_fmt / pmm_lang_load(_active) / set_locale with
LANG|LC_ALL auto-detect, loading a flattened key->value .pjson from
~/.pmm/lang/<locale>.pjson.
- pmm setting lang -l | <locale>: list installed packs; download <locale>.pjson
from the registry mirror into ~/.pmm/lang/, persist language=<locale> in
pmm.conf and reload. PmmConfig gains a language field (read from json/ini/conf).
- Banner + version now standardised: PMM 0.3.5 (amd64) (no OS name / brackets).
- web/mirror/lang/{zh-CN,en-US}.pjson built-in packs; web/translate.php lists
packs (keys + download) and explains community contribution; nav now has a
翻译 item.
- Makefile/build.bat/release.yml include src/i18n.c.
Verified on WSL: compiles; version/help banner -> 'PMM 0.3.5 (amd64)';
pmm setting lang -l lists the packs dir.
23 行
471 B
Makefile
23 行
471 B
Makefile
CC ?= gcc
|
|
CFLAGS ?= -O2 -Wall -static -Wextra -std=c11
|
|
PREFIX ?= /usr/local
|
|
|
|
SRC = src/main.c src/json.c src/ini.c src/pmm.c src/http.c src/repo.c \
|
|
src/install.c src/sha256.c src/sha1.c src/mirrors.c src/pdm.c src/out.c src/i18n.c
|
|
|
|
all: pmm
|
|
|
|
pmm: $(SRC) $(wildcard src/*.h)
|
|
$(CC) $(CFLAGS) -o $@ $(SRC)
|
|
|
|
install: pmm
|
|
install -m 755 pmm $(PREFIX)/bin/pmm
|
|
|
|
uninstall:
|
|
rm -f $(PREFIX)/bin/pmm
|
|
|
|
clean:
|
|
rm -f pmm pmm.exe
|
|
|
|
.PHONY: all install uninstall clean
|