mirror of
https://github.com/Nezumi-2711/winrar-keygen.git
synced 2026-09-22 13:48:33 +00:00
📘 Add support for GUI and Linux/macOS builds
This commit is contained in:
@@ -35,6 +35,8 @@ There are several ways to use it.
|
|||||||
- [Use Github Actions](#4-Use-Github-Actions)
|
- [Use Github Actions](#4-Use-Github-Actions)
|
||||||
- [Use Github Actions with secrets](#5-Use-Github-Actions-with-secrets)
|
- [Use Github Actions with secrets](#5-Use-Github-Actions-with-secrets)
|
||||||
- [Build in Visual Studio](#6-Build-in-Visual-Studio)
|
- [Build in Visual Studio](#6-Build-in-Visual-Studio)
|
||||||
|
- [Use GUI](#7-Use-GUI)
|
||||||
|
- [Build with CMake](#8-Build-with-CMake)
|
||||||
|
|
||||||
### 3.1 Encoding
|
### 3.1 Encoding
|
||||||
|
|
||||||
@@ -190,9 +192,6 @@ Extract `rarreg_file.zip` to get `rarreg.7z`, unzip it with the password to get
|
|||||||
|
|
||||||
<details>
|
<details>
|
||||||
<summary>Click to expand</summary>
|
<summary>Click to expand</summary>
|
||||||
|
|
||||||
I recommend using the Github Actions, but you can still do your own compilation.
|
|
||||||
|
|
||||||
If you don't want to compile it yourself, you can also go to the [release](https://github.com/bitcookies/winrar-keygen/releases/) page to get `winrar-keygen.exe`.
|
If you don't want to compile it yourself, you can also go to the [release](https://github.com/bitcookies/winrar-keygen/releases/) page to get `winrar-keygen.exe`.
|
||||||
|
|
||||||
### 6.1 Prerequisites
|
### 6.1 Prerequisites
|
||||||
@@ -203,7 +202,8 @@ If you don't want to compile it yourself, you can also go to the [release](https
|
|||||||
|
|
||||||
+ `mpir:x86-windows-static`
|
+ `mpir:x86-windows-static`
|
||||||
+ `mpir:x64-windows-static`
|
+ `mpir:x64-windows-static`
|
||||||
+ `mpir:gmp:x64-windows`
|
+ `gmp:x64-windows`
|
||||||
|
+ `gmp:arm64-windows-static`
|
||||||
|
|
||||||
is installed.
|
is installed.
|
||||||
|
|
||||||
@@ -213,6 +213,7 @@ If you don't want to compile it yourself, you can also go to the [release](https
|
|||||||
$ vcpkg install mpir:x86-windows-static
|
$ vcpkg install mpir:x86-windows-static
|
||||||
$ vcpkg install mpir:x64-windows-static
|
$ vcpkg install mpir:x64-windows-static
|
||||||
$ vcpkg install gmp:x64-windows
|
$ vcpkg install gmp:x64-windows
|
||||||
|
$ vcpkg install gmp:arm64-windows-static
|
||||||
```
|
```
|
||||||
|
|
||||||
3. Your `vcpkg` has been integrated into your **Visual Studio**, which means you have run successfully.
|
3. Your `vcpkg` has been integrated into your **Visual Studio**, which means you have run successfully.
|
||||||
@@ -247,6 +248,7 @@ Options:
|
|||||||
-o, --output <file> Output file (default: rarreg.key)
|
-o, --output <file> Output file (default: rarreg.key)
|
||||||
-a, --activate Write to %APPDATA%\WinRAR\rarreg.key
|
-a, --activate Write to %APPDATA%\WinRAR\rarreg.key
|
||||||
-t, --text Print to console only, don't write file
|
-t, --text Print to console only, don't write file
|
||||||
|
-u, --update Check for updates on GitHub
|
||||||
-v, --version Show version
|
-v, --version Show version
|
||||||
-h, --help Show this help
|
-h, --help Show this help
|
||||||
```
|
```
|
||||||
@@ -259,6 +261,7 @@ Options:
|
|||||||
| `-o, --output <file>` | Output file path (default: `rarreg.key`) |
|
| `-o, --output <file>` | Output file path (default: `rarreg.key`) |
|
||||||
| `-a, --activate` | Write to `%APPDATA%\WinRAR\rarreg.key` |
|
| `-a, --activate` | Write to `%APPDATA%\WinRAR\rarreg.key` |
|
||||||
| `-t, --text` | Print to console only, don't write file |
|
| `-t, --text` | Print to console only, don't write file |
|
||||||
|
| `-u, --update` | Check for updates on GitHub |
|
||||||
| `-v, --version` | Show version |
|
| `-v, --version` | Show version |
|
||||||
| `-h, --help` | Show help |
|
| `-h, --help` | Show help |
|
||||||
|
|
||||||
@@ -310,9 +313,56 @@ Generate an ASCII-encoded license and output it only to the console.
|
|||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
## 7. Common Errors
|
## 7. Use GUI
|
||||||
|
|
||||||
### 7.1 Keygen Errors
|
If you are using Windows 10 or 11, you can use the GUI application, which is built using .NET 8 WPF and Fluent Design (WPF UI) and supports both `x64` and `ARM 64` architectures.
|
||||||
|
|
||||||
|
You can obtain the project from the [gui](https://github.com/bitcookies/winrar-keygen/tree/gui) branch and build the GUI application yourself. For more detailed information, please refer to the [README](https://github.com/bitcookies/winrar-keygen/blob/gui/README.md) in that branch.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## 8. Build with CMake
|
||||||
|
|
||||||
|
For Linux or macOS users, you can use `build.yml` on the Actions page to build automatically, or you can compile it manually.
|
||||||
|
|
||||||
|
### 8.1 Linux (Ubuntu/Debian)
|
||||||
|
|
||||||
|
```shell
|
||||||
|
# Install dependencies
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y build-essential cmake libgmp-dev
|
||||||
|
|
||||||
|
# Compile
|
||||||
|
mkdir build && cd build
|
||||||
|
cmake .. -DCMAKE_BUILD_TYPE=Release
|
||||||
|
cmake --build . --config Release
|
||||||
|
|
||||||
|
# Build artifacts
|
||||||
|
./winrar-keygen --help
|
||||||
|
```
|
||||||
|
|
||||||
|
### 8.2 macOS (Homebrew)
|
||||||
|
|
||||||
|
```shell
|
||||||
|
# Install dependencies
|
||||||
|
brew install cmake gmp
|
||||||
|
|
||||||
|
# Compile
|
||||||
|
mkdir build && cd build
|
||||||
|
cmake .. -DCMAKE_BUILD_TYPE=Release
|
||||||
|
cmake --build . --config Release
|
||||||
|
|
||||||
|
# Build artifacts
|
||||||
|
./winrar-keygen --help
|
||||||
|
```
|
||||||
|
|
||||||
|
The output is always `build/winrar-keygen`, and the version number is controlled by `APP_VERSION` in `CMakeLists.txt`.
|
||||||
|
|
||||||
|
## 9. Common Errors
|
||||||
|
|
||||||
|
### 9.1 Keygen Errors
|
||||||
|
|
||||||
Starting with version `ver4`, Keygen has added some common error messages. Please make corrections based on the output.
|
Starting with version `ver4`, Keygen has added some common error messages. Please make corrections based on the output.
|
||||||
|
|
||||||
@@ -322,23 +372,23 @@ Starting with version `ver4`, Keygen has added some common error messages. Pleas
|
|||||||
./winrar-keygen.exe -h
|
./winrar-keygen.exe -h
|
||||||
```
|
```
|
||||||
|
|
||||||
### 7.2 Github Actions Errors
|
### 9.2 Github Actions Errors
|
||||||
|
|
||||||
If you encounter an error while using `ascii` encoding, it is because you are using non-ASCII characters.
|
If you encounter an error while using `ascii` encoding, it is because you are using non-ASCII characters.
|
||||||
|
|
||||||
If you encounter an error while using `ansi` encoding, it is because the character encoding is not supported by the current Windows system. The system platform for GitHub Actions is `windows-2022-english` (ANSI code page 1252), and any non-ASCII characters will cause the process to fail.
|
If you encounter an error while using `ansi` encoding, it is because the character encoding is not supported by the current Windows system. The system platform for GitHub Actions is `windows-2022-english` (ANSI code page 1252), and any non-ASCII characters will cause the process to fail.
|
||||||
|
|
||||||
|
|
||||||
## 8. Contributing
|
## 10. Contributing
|
||||||
|
|
||||||
### 8.1 Suggestion
|
### 10.1 Suggestion
|
||||||
|
|
||||||
If you encounter any issues or have suggestions, feel free to open an issue on the [Issues](https://github.com/bitcookies/winrar-keygen/issues) page or submit a pull request. We and the community will be happy to help.
|
If you encounter any issues or have suggestions, feel free to open an issue on the [Issues](https://github.com/bitcookies/winrar-keygen/issues) page or submit a pull request. We and the community will be happy to help.
|
||||||
|
|
||||||
### 8.2 Thanks
|
### 10.2 Thanks
|
||||||
|
|
||||||
Thanks to all contributors to this project, and to the community members who help answer questions in the [Issues](https://github.com/bitcookies/winrar-keygen/issues).
|
Thanks to all contributors to this project, and to the community members who help answer questions in the [Issues](https://github.com/bitcookies/winrar-keygen/issues).
|
||||||
|
|
||||||
## 9. License
|
## 11. License
|
||||||
|
|
||||||
The code is available under the [MIT license](https://github.com/bitcookies/winrar-keygen/blob/master/LICENSE)
|
The code is available under the [MIT license](https://github.com/bitcookies/winrar-keygen/blob/master/LICENSE)
|
||||||
|
|||||||
+61
-11
@@ -35,6 +35,8 @@ WinRAR 不是免费软件。如果你想使用它,你应当向 [**RARLAB**](ht
|
|||||||
+ [使用 Github Actions](#4-使用-Github-Actions)
|
+ [使用 Github Actions](#4-使用-Github-Actions)
|
||||||
+ [使用 Github Actions with secrets](#5-使用-Github-Actions-with-secrets)
|
+ [使用 Github Actions with secrets](#5-使用-Github-Actions-with-secrets)
|
||||||
+ [通过 Visual Studio 编译使用](#6-通过-Visual-Studio-编译使用)
|
+ [通过 Visual Studio 编译使用](#6-通过-Visual-Studio-编译使用)
|
||||||
|
+ [使用 GUI](#7-使用 GUI)
|
||||||
|
+ [通过 Cmake 编译使用](#8-通过-Cmake-编译使用)
|
||||||
|
|
||||||
### 3.1 编码说明
|
### 3.1 编码说明
|
||||||
|
|
||||||
@@ -190,9 +192,6 @@ WinRAR license 有 `rarreg.key` 和 `rarkey.rar` 两种类型,它们仅在导
|
|||||||
|
|
||||||
<details>
|
<details>
|
||||||
<summary>点击展开</summary>
|
<summary>点击展开</summary>
|
||||||
|
|
||||||
我建议通过 Github Actions 的方法来使用,但是你仍然可以选择自行编译。
|
|
||||||
|
|
||||||
如果你不想自行编译,也可以到 [Release](https://github.com/bitcookies/winrar-keygen/releases/) 页面获取对应版本的 `winrar-keygen.exe`。
|
如果你不想自行编译,也可以到 [Release](https://github.com/bitcookies/winrar-keygen/releases/) 页面获取对应版本的 `winrar-keygen.exe`。
|
||||||
|
|
||||||
### 6.1 前提条件
|
### 6.1 前提条件
|
||||||
@@ -204,6 +203,7 @@ WinRAR license 有 `rarreg.key` 和 `rarkey.rar` 两种类型,它们仅在导
|
|||||||
+ `mpir:x86-windows-static`
|
+ `mpir:x86-windows-static`
|
||||||
+ `mpir:x64-windows-static`
|
+ `mpir:x64-windows-static`
|
||||||
+ `mpir:gmp:x64-windows`
|
+ `mpir:gmp:x64-windows`
|
||||||
|
+ `gmp:arm64-windows-static`
|
||||||
|
|
||||||
你可以通过下的命令来安装:
|
你可以通过下的命令来安装:
|
||||||
|
|
||||||
@@ -211,6 +211,7 @@ WinRAR license 有 `rarreg.key` 和 `rarkey.rar` 两种类型,它们仅在导
|
|||||||
$ vcpkg install mpir:x86-windows-static
|
$ vcpkg install mpir:x86-windows-static
|
||||||
$ vcpkg install mpir:x64-windows-static
|
$ vcpkg install mpir:x64-windows-static
|
||||||
$ vcpkg install gmp:x64-windows
|
$ vcpkg install gmp:x64-windows
|
||||||
|
$ vcpkg install gmp:arm64-windows-static
|
||||||
```
|
```
|
||||||
|
|
||||||
3. 你的 `vcpkg` 与 **Visual Studio** 整合了,即你曾成功运行了下面这条命令:
|
3. 你的 `vcpkg` 与 **Visual Studio** 整合了,即你曾成功运行了下面这条命令:
|
||||||
@@ -242,6 +243,7 @@ Options:
|
|||||||
-o, --output <file> Output file (default: rarreg.key)
|
-o, --output <file> Output file (default: rarreg.key)
|
||||||
-a, --activate Write to %APPDATA%\WinRAR\rarreg.key
|
-a, --activate Write to %APPDATA%\WinRAR\rarreg.key
|
||||||
-t, --text Print to console only, don't write file
|
-t, --text Print to console only, don't write file
|
||||||
|
-u, --update Check for updates on GitHub
|
||||||
-v, --version Show version
|
-v, --version Show version
|
||||||
-h, --help Show this help
|
-h, --help Show this help
|
||||||
```
|
```
|
||||||
@@ -254,6 +256,7 @@ Options:
|
|||||||
| `-o, --output <file>` | Output file path (默认: `rarreg.key`) |
|
| `-o, --output <file>` | Output file path (默认: `rarreg.key`) |
|
||||||
| `-a, --activate` | Write to `%APPDATA%\WinRAR\rarreg.key` |
|
| `-a, --activate` | Write to `%APPDATA%\WinRAR\rarreg.key` |
|
||||||
| `-t, --text` | Print to console only, don't write file |
|
| `-t, --text` | Print to console only, don't write file |
|
||||||
|
| `-u, --update` | Check for updates on GitHub |
|
||||||
| `-v, --version` | Show version |
|
| `-v, --version` | Show version |
|
||||||
| `-h, --help` | Show help |
|
| `-h, --help` | Show help |
|
||||||
|
|
||||||
@@ -305,9 +308,56 @@ dd4ab952600ba16a99236d910bfa995d5f60651ec451f462511507
|
|||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
## 7. 常见错误
|
## 7. 使用 GUI
|
||||||
|
|
||||||
### 7.1 Keygen 错误
|
如果你正在使用 Windows 10 / 11,你可以使用 GUI 程序,它基于 .NET 8 WPF 和 Fluent Design (WPF UI) 构建,提供 `x64` 和 `ARM 64` 两种架构支持。
|
||||||
|
|
||||||
|
你可以在 [gui](https://github.com/bitcookies/winrar-keygen/tree/gui) 分支中获取项目,并自行构建 GUI 程序。更详细的信息请查看分支 [README](https://github.com/bitcookies/winrar-keygen/blob/gui/README.zh-CN.md)。
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## 8. 通过 Cmake 编译使用
|
||||||
|
|
||||||
|
对于 Linux 或 macOS 用户,你可以在 Actions 页面用 `build.yml` 自动构建,也可以自行编译。
|
||||||
|
|
||||||
|
### 8.1 Linux (Ubuntu/Debian)
|
||||||
|
|
||||||
|
```shell
|
||||||
|
# 安装依赖
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y build-essential cmake libgmp-dev
|
||||||
|
|
||||||
|
# 编译
|
||||||
|
mkdir build && cd build
|
||||||
|
cmake .. -DCMAKE_BUILD_TYPE=Release
|
||||||
|
cmake --build . --config Release
|
||||||
|
|
||||||
|
# 产物
|
||||||
|
./winrar-keygen --help
|
||||||
|
```
|
||||||
|
|
||||||
|
### 8.2 macOS (Homebrew)
|
||||||
|
|
||||||
|
```shell
|
||||||
|
# 安装依赖
|
||||||
|
brew install cmake gmp
|
||||||
|
|
||||||
|
# 编译
|
||||||
|
mkdir build && cd build
|
||||||
|
cmake .. -DCMAKE_BUILD_TYPE=Release
|
||||||
|
cmake --build . --config Release
|
||||||
|
|
||||||
|
# 产物
|
||||||
|
./winrar-keygen --help
|
||||||
|
```
|
||||||
|
|
||||||
|
产物都是 `build/winrar-keygen`,版本号由 `CMakeLists.txt` 中的 `APP_VERSION` 控制。
|
||||||
|
|
||||||
|
## 9. 常见错误
|
||||||
|
|
||||||
|
### 9.1 Keygen 错误
|
||||||
|
|
||||||
从 `ver4` 版本开始,Keygen 增加了一些常见的 Error 提示信息,请根据输出信息来进行修正。
|
从 `ver4` 版本开始,Keygen 增加了一些常见的 Error 提示信息,请根据输出信息来进行修正。
|
||||||
|
|
||||||
@@ -317,13 +367,13 @@ dd4ab952600ba16a99236d910bfa995d5f60651ec451f462511507
|
|||||||
./winrar-keygen.exe -h
|
./winrar-keygen.exe -h
|
||||||
```
|
```
|
||||||
|
|
||||||
### 7.2 Github Actions 错误
|
### 9.2 Github Actions 错误
|
||||||
|
|
||||||
如果你使用 `ascii` 编码时发生了错误,原因是你使用了非 ASCII 字符。
|
如果你使用 `ascii` 编码时发生了错误,原因是你使用了非 ASCII 字符。
|
||||||
|
|
||||||
如果你 `ansi` 编码时发生了错误,原因是因为字符编码不受当前 Windows 系统支持。GitHub Actions 的系统平台是 `windows-2022-english` (ANSI code page 1252),包含非 ASCII 字符都会失败。
|
如果你 `ansi` 编码时发生了错误,原因是因为字符编码不受当前 Windows 系统支持。GitHub Actions 的系统平台是 `windows-2022-english` (ANSI code page 1252),包含非 ASCII 字符都会失败。
|
||||||
|
|
||||||
### 7.3 关于简体中文版
|
### 9.3 关于简体中文版
|
||||||
|
|
||||||
在 [**RARLAB**](https://www.rarlab.com/) 下载的简体中文版 WinRAR 将会自带广告组件,即使使用了 `rarreg.key` 授权,广告组件依旧会出现。这是由于简体中文代理商的一些意见,RARLAB 已将简体中文安装包的公开链接更换成了带有广告的简体中文安装包。
|
在 [**RARLAB**](https://www.rarlab.com/) 下载的简体中文版 WinRAR 将会自带广告组件,即使使用了 `rarreg.key` 授权,广告组件依旧会出现。这是由于简体中文代理商的一些意见,RARLAB 已将简体中文安装包的公开链接更换成了带有广告的简体中文安装包。
|
||||||
|
|
||||||
@@ -370,16 +420,16 @@ https://www.rarlab.com/rar/winrar-x64-624sc.exe
|
|||||||
|
|
||||||
请注意区分上述连接地址,更多方法可以查看 [Issues #14](https://github.com/bitcookies/winrar-keygen/issues/14) 和 [Issues #19](https://github.com/bitcookies/winrar-keygen/issues/19)。
|
请注意区分上述连接地址,更多方法可以查看 [Issues #14](https://github.com/bitcookies/winrar-keygen/issues/14) 和 [Issues #19](https://github.com/bitcookies/winrar-keygen/issues/19)。
|
||||||
|
|
||||||
## 8. 贡献
|
## 10. 贡献
|
||||||
|
|
||||||
### 8.1 反馈和建议
|
### 10.1 反馈和建议
|
||||||
|
|
||||||
如果您在使用过程中遇到问题或有任何建议,欢迎在 [Issues](https://github.com/bitcookies/winrar-keygen/issues) 页面反馈,或提交 Pull Request。我们以及社区中的开发者将乐于为您提供帮助。
|
如果您在使用过程中遇到问题或有任何建议,欢迎在 [Issues](https://github.com/bitcookies/winrar-keygen/issues) 页面反馈,或提交 Pull Request。我们以及社区中的开发者将乐于为您提供帮助。
|
||||||
|
|
||||||
### 8.2 感谢
|
### 10.2 感谢
|
||||||
|
|
||||||
感谢所有为本项目做出贡献的开发者,以及在 [Issues](https://github.com/bitcookies/winrar-keygen/issues) 中热心解答问题的社区成员。
|
感谢所有为本项目做出贡献的开发者,以及在 [Issues](https://github.com/bitcookies/winrar-keygen/issues) 中热心解答问题的社区成员。
|
||||||
|
|
||||||
## 9. 许可
|
## 11. 许可
|
||||||
|
|
||||||
使用 [MIT License](https://github.com/bitcookies/winrar-keygen/blob/master/LICENSE)
|
使用 [MIT License](https://github.com/bitcookies/winrar-keygen/blob/master/LICENSE)
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 123 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 120 KiB |
Reference in New Issue
Block a user