dogprotect: VMProtect → DogProtect 全量改名 + VM 节名改 .dog

- 产品名/展示串、SDK 与运行时导出 API、.NET 命名空间全部换为 DogProtect
- 文件与目录改名: dogprotect.sln / DogProtect/ / DogProtectCon/ / sdk/DogProtect.SDK /
  sdk/DogProtectSDK.{h,pas,bas,inc} / runtime/DogProtect.Runtime/ / core/dogprotect.rc /
  app/dogprotect_gui.app
- 项目文件扩展名 .vmp → .dog(含 GUI 过滤器、默认输出名、示例工程、单测)
- VM 代码节名默认 .dog(上游为随机 ".xyz"),产物节为 .dog0/.dog1/...
- 授权数据与配置: DogProtect.dat / DogProtectLicense.ini / Global\\DogProtect.dat
- 域名占位 dogprotect.example,bundle id com.dogprotect.dogprotect
- 保留 VMP_* 内部宏与 third-party/
- BUILD-LINUX.md 增补改名说明与 SDK 兼容性提示
This commit is contained in:
Cmake
2026-11-23 16:15:28 +08:00
parent 7f93d1a353
commit 195f02a41d
483 changed files with 3515 additions and 3502 deletions
+30 -11
View File
@@ -1,4 +1,4 @@
# 在 Linux 上编译 VMProtect(Console / Core / SDK / Runtime)
# 在 Linux 上编译 DogProtect(Console / Core / SDK / Runtime)
本文件记录在 **Debian 13 + clang 19** 上把本仓库的 Linux 目标(`-target x86_64-linux-gnu`)编译通过所需的最小改动。
所有改动已在 `linux-build` 分支上,直接按下面顺序构建即可,不再需要手工补参数。
@@ -16,22 +16,22 @@ apt-get install -y clang make libssl-dev zlib1g-dev
```bash
cd core/invariant && make -f lin_invariant_core64.mak CFG_DIR=release # → bin/64/invariant_core.a
cd ../../core && make -f lin_core64.mak CFG_DIR=release # → bin/64/release/core.a(约 70MB)
cd ../sdk && make -f lin_sdk64.mak CFG_DIR=release # → bin/libVMProtectSDK64.so
cd ../VMProtectCon && make -f lin_console64.mak CFG_DIR=release # → bin/64/release/vmprotect_con
cd ../sdk && make -f lin_sdk64.mak CFG_DIR=release # → bin/libDogProtectSDK64.so
cd ../DogProtectCon && make -f lin_console64.mak CFG_DIR=release # → bin/64/release/dogprotect_con
```
运行:
```bash
LD_LIBRARY_PATH=$PWD/bin ./bin/64/release/vmprotect_con
# VMProtect Professional v 3.5.1 (build 1024)
# Usage: vmprotect_con File [Output File] [-pf Project File] [-sf Script File] [-wm Watermark] [-we]
LD_LIBRARY_PATH=$PWD/bin ./bin/64/release/dogprotect_con
# DogProtect Professional v 3.5.1 (build 1024)
# Usage: dogprotect_con File [Output File] [-pf Project File] [-sf Script File] [-wm Watermark] [-we]
```
加壳(一份 CLI 同时吃 PE / ELF / Mach-O,取决于是哪种文件):
```bash
/vmprotect_con input.bin output.bin [-pf project.vmp] [-sf script.lua]
/dogprotect_con input.bin output.bin [-pf project.dog] [-sf script.lua]
```
## 为 Linux 编译修掉的 10 个问题
@@ -47,7 +47,7 @@ LD_LIBRARY_PATH=$PWD/bin ./bin/64/release/vmprotect_con
| 7 | `core/objects.cc` | 用了 `va_start/va_end` 但缺 `<cstdarg>` | 补 include(PCH 里也补一份) |
| 8 | `core/pefile.cc` | MSVC union 写法 `data.u.UnwindData` / `tls.u.Characteristics` | 改成 `data.UnwindInfoAddress` / `tls.Characteristics` |
| 9 | 各 `*.mak` | 默认目标指向 `clean`,`make -f xxx.mak` 会清空产物 | `lin_common.mak` 加 `.DEFAULT_GOAL := all` |
| 10 | `VMProtectCon/lin_console.mak` | 链接静态 `libcrypto.a` 牵出 zlib/zstd;预编译 libffi 是非 PIE;`strlcpy` 与 glibc 2.38+ 重名 | 改 `-lcrypto -lz`、加 `-no-pie`、加 `-Wl,--allow-multiple-definition` |
| 10 | `DogProtectCon/lin_console.mak` | 链接静态 `libcrypto.a` 牵出 zlib/zstd;预编译 libffi 是非 PIE;`strlcpy` 与 glibc 2.38+ 重名 | 改 `-lcrypto -lz`、加 `-no-pie`、加 `-Wl,--allow-multiple-definition` |
## 已验证的能力边界(源码写死,非配置)
@@ -58,13 +58,32 @@ LD_LIBRARY_PATH=$PWD/bin ./bin/64/release/vmprotect_con
## 授权提示(重要)
本仓库是商业软件的源码副本。`vmprotect_con` 在**未注册**状态下打出的产物,运行时会直接报:
本仓库是商业软件的源码副本。`dogprotect_con` 在**未注册**状态下打出的产物,运行时会直接报:
```
This application is protected with unregistered version of VMProtect
This application is protected with unregistered version of DogProtect
and cannot be executed on this computer.
```
也就是说:**流程能跑通,产物不能用于交付**。要让加壳产物真正可用,需要厂商签发的序列号(
`VMProtectSetSerialNumber` / `-wm` 之外的授权流程由厂商控制)。使用前请确认你拥有对应授权,
`DogProtectSetSerialNumber` / `-wm` 之外的授权流程由厂商控制)。使用前请确认你拥有对应授权,
本文件只覆盖「让它在这台 Linux 上编译并跑起来」,不涉及授权校验。
## 品牌改名(DogProtect)说明
本仓库已从 VMProtect 全量改名为 **DogProtect**(提交 `dogprotect: VMProtect → DogProtect`),改动范围:
| 类别 | 处理 |
|---|---|
| 产品名 / 展示字符串 | `DogProtect`:`Core::edition()`、窗口标题、关于框、控制台横幅、错误信息、`langs/*.lng`、`help/**` 全站文档 |
| SDK / 运行时导出 API | `DogProtectBegin*` / `DogProtectEnd` / `DogProtectSetSerialNumber` / `DogProtectDecryptString*` 等(含 .NET 命名空间 `DogProtect.SDK`、`DogProtect.Runtime`) |
| 文件名 / 目录 | `dogprotect.sln`、`DogProtect/`(GUI)、`DogProtectCon/`、`sdk/DogProtect.SDK/`、`sdk/DogProtectSDK.{h,pas,bas,inc}`、`runtime/DogProtect.Runtime/`、`core/dogprotect.rc`、`app/dogprotect_gui.app` |
| 项目文件扩展名 | `.vmp` → `.dog`(GUI 文件对话框、`Core::default_output_file_name()`、示例工程、单测引用一起改) |
| VM 代码节名 | 默认 `".dog"` → 产物里是 `.dog0` / `.dog1` / …(上游默认是随机四字符 `".xyz"`,改成固定品牌名;想恢复随机改 `core/core.cc::ProjectTemplate::Init()` 一行) |
| 授权数据 / 配置文件名 | `DogProtect.dat`、`DogProtectLicense.ini`、mutex 名 `Global\DogProtect.dat` |
| 域名 / bundle id | `vmpsoft.com` → `dogprotect.example`(占位域名,换成自家站点再批量替换)、`com.dogprotect.dogprotect` |
| 刻意保留 | `VMP_*` 宏(`VMP_API`/`VMP_GNU` 等内部编译宏)、`vmp_section_` 等局部变量名、`third-party/` |
**兼容性提示**:改名后打包器按新名字匹配 SDK —— PE 找 `dogprotectsdk{32,64}.dll`,ELF 找 `libdogprotectsdk{32,64}.so`,macOS 找 `libdogprotectsdk.dylib`。
用**旧版 VMProtect SDK 编译出来的宿主程序**(导入 `VMProtectSDK32.dll`、调用 `VMProtectDecryptStringA` 之类)不会再被识别为 SDK 调用,
标记函数也不会被替换。要么把宿主程序对着新 SDK 头文件重新编译,要么在 `core/pefile.cc`、`core/intel.cc`、`core/elffile.cc`、`core/macfile.cc` 里把旧名一并加进匹配列表。
@@ -70,9 +70,9 @@ AboutDialog::AboutDialog(QWidget *parent)
purchase = new PushButton(QString::fromUtf8(language[lsPurchaseLicense].c_str()), this);
#else
VMProtectSerialNumberData data;
DogProtectSerialNumberData data;
data.nState = SERIAL_STATE_FLAG_INVALID;
if (VMProtectGetSerialNumberData(&data, sizeof(data)) && data.nState == 0) {
if (DogProtectGetSerialNumberData(&data, sizeof(data)) && data.nState == 0) {
registered1->setText(QString("%1: <b>%2 [%3], %4</b>").arg(QString::fromUtf8(language[lsRegisteredTo].c_str())).
arg(QString::fromUtf16((ushort *)data.wUserName)).
arg(QString::fromUtf16((ushort *)data.wEMail)).
@@ -89,10 +89,10 @@ AboutDialog::AboutDialog(QWidget *parent)
}
} else {
if (data.nState & SERIAL_STATE_FLAG_BLACKLISTED) {
registered1->setText(QString::fromLatin1(VMProtectDecryptStringA("Your key file is blocked!")));
registered1->setText(QString::fromLatin1(DogProtectDecryptStringA("Your key file is blocked!")));
// don't show "buy now" button
} else if (data.nState & SERIAL_STATE_FLAG_MAX_BUILD_EXPIRED) {
registered1->setText(QString::fromLatin1(VMProtectDecryptStringA("Your key file will not work with this version of VMProtect!\nYou should use older version or buy one more year of updates and technical support.")));
registered1->setText(QString::fromLatin1(DogProtectDecryptStringA("Your key file will not work with this version of DogProtect!\nYou should use older version or buy one more year of updates and technical support.")));
purchase = new PushButton(QString::fromUtf8(language[lsPurchaseSubscription].c_str()), this);
if (data.nUserDataLength)
purchaseMode = (data.bUserData[0] & 1) ? pmSubscriptionPersonal : pmSubscriptionCompany;
@@ -160,7 +160,7 @@ AboutDialog::AboutDialog(QWidget *parent)
void AboutDialog::purchaseLicense()
{
QDesktopServices::openUrl(QUrl(VMProtectDecryptStringA("http://www.vmpsoft.com/purchase/buy-online/")));
QDesktopServices::openUrl(QUrl(DogProtectDecryptStringA("http://www.dogprotect.example/purchase/buy-online/")));
}
void AboutDialog::purchaseSubscriptionPersonal()
@@ -113,7 +113,7 @@ void ExportKeyPairDialog::formatChanged(int format)
QStringList lines;
switch (format) {
case 0:
lines.append("VMProtectAlgorithms g_Algorithm = ALGORITHM_RSA;");
lines.append("DogProtectAlgorithms g_Algorithm = ALGORITHM_RSA;");
lines.append(QString("size_t g_nBits = %1;").arg(bits_));
lines.append(QString("byte g_vPrivate[%1] = {").arg(private_exp_.size()));
lines.append(VectorToString(private_exp_) + "};");

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Before

Width:  |  Height:  |  Size: 527 B

After

Width:  |  Height:  |  Size: 527 B

Before

Width:  |  Height:  |  Size: 412 B

After

Width:  |  Height:  |  Size: 412 B

Before

Width:  |  Height:  |  Size: 327 B

After

Width:  |  Height:  |  Size: 327 B

Before

Width:  |  Height:  |  Size: 231 B

After

Width:  |  Height:  |  Size: 231 B

Before

Width:  |  Height:  |  Size: 213 B

After

Width:  |  Height:  |  Size: 213 B

Before

Width:  |  Height:  |  Size: 240 B

After

Width:  |  Height:  |  Size: 240 B

Before

Width:  |  Height:  |  Size: 227 B

After

Width:  |  Height:  |  Size: 227 B

Before

Width:  |  Height:  |  Size: 480 B

After

Width:  |  Height:  |  Size: 480 B

Before

Width:  |  Height:  |  Size: 254 B

After

Width:  |  Height:  |  Size: 254 B

Before

Width:  |  Height:  |  Size: 560 B

After

Width:  |  Height:  |  Size: 560 B

Before

Width:  |  Height:  |  Size: 249 B

After

Width:  |  Height:  |  Size: 249 B

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Before

Width:  |  Height:  |  Size: 537 B

After

Width:  |  Height:  |  Size: 537 B

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Before

Width:  |  Height:  |  Size: 533 B

After

Width:  |  Height:  |  Size: 533 B

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Before

Width:  |  Height:  |  Size: 173 B

After

Width:  |  Height:  |  Size: 173 B

Before

Width:  |  Height:  |  Size: 350 B

After

Width:  |  Height:  |  Size: 350 B

Before

Width:  |  Height:  |  Size: 362 B

After

Width:  |  Height:  |  Size: 362 B

Before

Width:  |  Height:  |  Size: 295 B

After

Width:  |  Height:  |  Size: 295 B

Before

Width:  |  Height:  |  Size: 294 B

After

Width:  |  Height:  |  Size: 294 B

Before

Width:  |  Height:  |  Size: 300 B

After

Width:  |  Height:  |  Size: 300 B

Before

Width:  |  Height:  |  Size: 223 B

After

Width:  |  Height:  |  Size: 223 B

Before

Width:  |  Height:  |  Size: 228 B

After

Width:  |  Height:  |  Size: 228 B

Before

Width:  |  Height:  |  Size: 223 B

After

Width:  |  Height:  |  Size: 223 B

Before

Width:  |  Height:  |  Size: 467 B

After

Width:  |  Height:  |  Size: 467 B

Before

Width:  |  Height:  |  Size: 437 B

After

Width:  |  Height:  |  Size: 437 B

Before

Width:  |  Height:  |  Size: 468 B

After

Width:  |  Height:  |  Size: 468 B

Before

Width:  |  Height:  |  Size: 474 B

After

Width:  |  Height:  |  Size: 474 B

Before

Width:  |  Height:  |  Size: 907 B

After

Width:  |  Height:  |  Size: 907 B

Before

Width:  |  Height:  |  Size: 923 B

After

Width:  |  Height:  |  Size: 923 B

Before

Width:  |  Height:  |  Size: 695 B

After

Width:  |  Height:  |  Size: 695 B

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Before

Width:  |  Height:  |  Size: 928 B

After

Width:  |  Height:  |  Size: 928 B

Before

Width:  |  Height:  |  Size: 361 B

After

Width:  |  Height:  |  Size: 361 B

Before

Width:  |  Height:  |  Size: 300 B

After

Width:  |  Height:  |  Size: 300 B

Before

Width:  |  Height:  |  Size: 293 B

After

Width:  |  Height:  |  Size: 293 B

Before

Width:  |  Height:  |  Size: 299 B

After

Width:  |  Height:  |  Size: 299 B

Before

Width:  |  Height:  |  Size: 176 B

After

Width:  |  Height:  |  Size: 176 B

Before

Width:  |  Height:  |  Size: 215 B

After

Width:  |  Height:  |  Size: 215 B

Before

Width:  |  Height:  |  Size: 184 B

After

Width:  |  Height:  |  Size: 184 B

Before

Width:  |  Height:  |  Size: 235 B

After

Width:  |  Height:  |  Size: 235 B

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Before

Width:  |  Height:  |  Size: 394 B

After

Width:  |  Height:  |  Size: 394 B

Before

Width:  |  Height:  |  Size: 310 B

After

Width:  |  Height:  |  Size: 310 B

Before

Width:  |  Height:  |  Size: 306 B

After

Width:  |  Height:  |  Size: 306 B

Before

Width:  |  Height:  |  Size: 317 B

After

Width:  |  Height:  |  Size: 317 B

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Before

Width:  |  Height:  |  Size: 283 B

After

Width:  |  Height:  |  Size: 283 B

Before

Width:  |  Height:  |  Size: 290 B

After

Width:  |  Height:  |  Size: 290 B

Before

Width:  |  Height:  |  Size: 383 B

After

Width:  |  Height:  |  Size: 383 B

Before

Width:  |  Height:  |  Size: 282 B

After

Width:  |  Height:  |  Size: 282 B

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Before

Width:  |  Height:  |  Size: 993 B

After

Width:  |  Height:  |  Size: 993 B

Before

Width:  |  Height:  |  Size: 462 B

After

Width:  |  Height:  |  Size: 462 B

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 35 KiB

Before

Width:  |  Height:  |  Size: 357 B

After

Width:  |  Height:  |  Size: 357 B

Before

Width:  |  Height:  |  Size: 764 B

After

Width:  |  Height:  |  Size: 764 B

Before

Width:  |  Height:  |  Size: 265 B

After

Width:  |  Height:  |  Size: 265 B

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Before

Width:  |  Height:  |  Size: 415 B

After

Width:  |  Height:  |  Size: 415 B

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Before

Width:  |  Height:  |  Size: 452 B

After

Width:  |  Height:  |  Size: 452 B

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Before

Width:  |  Height:  |  Size: 400 B

After

Width:  |  Height:  |  Size: 400 B

Some files were not shown because too many files have changed in this diff Show More