镜像自地址
https://github.com/JGZYES/ParlzPackageManger.git
已同步 2026-09-11 08:52:45 +08:00
install: -dpkg/-msi with a URL force install type (download.deb/download.msi)
这个提交包含在:
+4
-1
@@ -578,10 +578,13 @@ int main(int argc, char **argv) {
|
|||||||
if (pdm_install_file(pkg) == 0) ok++; else fprintf(stderr, "pmm: failed to install %s\n", pkg);
|
if (pdm_install_file(pkg) == 0) ok++; else fprintf(stderr, "pmm: failed to install %s\n", pkg);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
/* direct URL install: pmm install https://.../foo.zip */
|
/* direct URL install: pmm install https://.../foo.zip
|
||||||
|
* (with -dpkg/-msi the type is forced regardless of URL extension) */
|
||||||
if (strncmp(pkg, "http://", 7) == 0 || strncmp(pkg, "https://", 8) == 0) {
|
if (strncmp(pkg, "http://", 7) == 0 || strncmp(pkg, "https://", 8) == 0) {
|
||||||
const char *bn = strrchr(pkg, '/');
|
const char *bn = strrchr(pkg, '/');
|
||||||
bn = bn ? bn + 1 : pkg;
|
bn = bn ? bn + 1 : pkg;
|
||||||
|
if (forced == 1) bn = "download.deb";
|
||||||
|
else if (forced == 2) bn = "download.msi";
|
||||||
if (install_file(pkg, bn) == 0) ok++;
|
if (install_file(pkg, bn) == 0) ok++;
|
||||||
else fprintf(stderr, "pmm: failed to install %s\n", pkg);
|
else fprintf(stderr, "pmm: failed to install %s\n", pkg);
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
在新工单中引用
屏蔽一个用户