文件
ParlzPackageManger/src/pdm.h
T
JGZYES 114ef62dd9 ParlzPackageManger (PMM): cross-platform package manager + mirror
- C11, static MinGW build, single exe (pmm/pdm)
- apt-style multi-mirror install with sha256/sha1 verify
- .pdm package format (pdm pack/install/remove), deb-like
- github/gitlab/gitea/forgejo release install with --git/--github etc.
- python/pip-style version selection (==,>=,<=,>,< , comma)
- auto platform selection (windows/linux variants)
- Windows Installed Apps registration + PATH auto-add
- download progress bar (tqdm-style, ASCII-safe)
- mirror/ : zero-dep Node.js registry server (variants, multi-version)
- Licensed under GNU GPL v3
2026-08-30 18:11:21 +08:00

38 行
1.2 KiB
C

/* pdm.h - .pdm package format (deb-like)
*
* A .pdm file is a tar archive with three members:
* control.tar.gz -> contains "pdm-control" text file (Package/Version/...)
* data.tar.gz -> the package payload, extracted into the pm root
* sha256sums -> "<hex> control.tar.gz" lines for both members
*
* pdm-control fields (KEY: value lines):
* Package: name
* Version: 1.0.0
* Architecture: all | windows | linux | macos
* Description: text
* Maintainer: text
*
* The folder passed to `pdm pack ./dir` must contain a "pdm-control" file;
* everything else in the folder becomes data.tar.gz.
*/
#ifndef PMM_PDM_H
#define PMM_PDM_H
/* Pack directory (containing pdm-control) into out.pdm. out may be NULL
* (defaults to <Package>_<Version>.pdm next to the dir). */
int pdm_pack(const char *dir, const char *out);
/* Install a local .pdm into root dir (~/.pmm/root), record in db (~/.pmm/installed). */
int pdm_install_file(const char *pdmfile);
/* Remove installed package by name (dpkg -r style: delete data files). */
int pdm_remove(const char *name);
/* Print installed packages from the db. */
void pdm_list_installed(void);
/* Print control fields of a .pdm file. */
int pdm_info(const char *pdmfile);
#endif