Skip to content

Commit

Permalink
v2.0.0
Browse files Browse the repository at this point in the history
v2.0.0 release
  • Loading branch information
bitcookies committed Dec 8, 2021
1 parent c1b21fc commit 923c175
Show file tree
Hide file tree
Showing 22 changed files with 183 additions and 79 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: WinRAR Keygen

on:
push:
branches: [ master ]
paths:
- 'keygen/*.json'

jobs:
build:

runs-on: windows-latest

steps:
- uses: actions/checkout@v2

- name: Get key text1
id: text1
uses: notiz-dev/github-action-json-property@release
with:
path: 'keygen/info.json'
prop_path: 'text1'

- name: Get key text2
id: text2
uses: notiz-dev/github-action-json-property@release
with:
path: 'keygen/info.json'
prop_path: 'text2'

- name: Generate key
shell: powershell
run: |
bin/x64-Release/winrar-keygen.exe ${{steps.text1.outputs.prop}} ${{steps.text2.outputs.prop}} > rarreg.key
- name: Upload key
uses: actions/upload-artifact@v2
with:
name: rarreg_file
path: rarreg.key
retention-days: 90
Binary file modified .vs/winrar-keygen/v17/.suo
Binary file not shown.
Binary file modified .vs/winrar-keygen/v17/Browse.VC.db
Binary file not shown.
Binary file not shown.
77 changes: 68 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<p align="center">
<img width="100px" src="icon.svg" align="center" alt="WinRAR Keygen" />
<img width="100px" src="icon.png" align="center" alt="WinRAR Keygen" />
<h2 align="center">WinRAR Keygen</h2>
<p align="center">Principle of WinRAR key generation</p>
</p>
Expand All @@ -9,6 +9,9 @@
<img alt="Issues" src="https://img.shields.io/github/issues/bitcookies/winrar-keygen?color=F48D73" />
</a>
<img src="https://img.shields.io/badge/Visual%20Studio-2022-5D4298" />
<a href="https://github.com/bitcookies/winrar-keygen/actions">
<img src="https://img.shields.io/badge/Github-Actions-4184F4" />
</a>
<a href="https://github.com/bitcookies/winrar-keygen/blob/master/LICENSE">
<img alt="License" src="https://img.shields.io/github/license/bitcookies/winrar-keygen.svg" />
</a>
Expand All @@ -33,13 +36,69 @@ This repository will tell you how WinRAR license file `"rarreg.key"` is generate

See [here](README.HOW_DOES_IT_WORK.md).

## 3. How to build?
## 3. Use Github Actions

Github Action is a CI/CD tool introduced after Microsoft acquired Github, and you can run programs on GitHub Action by following these steps.

### 3.1 Fork

**Fork** this repo.

![step-1](assets/actions-step-1.png)

If you've forked before and I've committed new code, but you don't know how to merge the new content into your repository, then you can delete the current fork and fork again.

### 3.2 Modify info.json

Go to `keygen/info.json` and click on the edit button to edit the file.

![step-2](assets/actions-step-2.png)

You can see:

```json
{
"text1": "Github",
"text2": "Github.com"
}
```

You can modify the values corresponding to `text1` and `text2`

```json
{
"text1": "yourname",
"text2": "yourteam"
}
```

It is important to note that `test1` and `test2` are **ANSI-encoded string, without null-terminator.**

Once you have finished making changes, click the **Commit changes** button and Github Actions will start automatically.

### 3.3 Download key

Go to the Actions page to see the status of the program.

![step-3](assets/actions-step-3.png)

Green means it ran successfully, yellow means it is running, red means it failed. After running successfully, open the corresponding task and select **rarreg_file** to download.

![step-4](assets/actions-step-4.png)

After decompression, you will get `rarreg.key `, just drag and drop it into WinRAR.

If you get an invalid key, check that the `test1` and `test2 ` parameters are **ANSI encoded without spaces.**

## 4. Build in Visual Studio

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 page](https://github.com/bitcookies/winrar-keygen/releases/) 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`.

### 3.1 Prerequisites
### 4.1 Prerequisites

1. Please make sure that you have **Visual Studio 2022**. Because this is a VS2022 project. If you are still using Visual Studio 2019, you can find projects for VS2019 in the [vs2019](https://github.com/bitcookies/winrar-keygen/tree/vs2019) branch.
1. Please make sure that you have **Visual Studio 2022**. Because this is a VS2022 project. If you are still using Visual Studio 2019, you can find projects for VS2019 in the [vs2019](https://github.com/bitcookies/winrar-keygen/tree/vs2019) branch, but this branch will no longer be maintained.

2. Please make sure you have installed `vcpkg` and the following libraries:

Expand All @@ -62,7 +121,7 @@ If you don't want to compile it yourself, you can also go to the [release page](
```

### 3.2 Build
### 4.2 Build

1. Open this project in __Visual Studio__.

Expand All @@ -72,7 +131,7 @@ If you don't want to compile it yourself, you can also go to the [release page](

You will see executable files in `bin/` directory.

## 4. How to Use?
### 4.3 How to Use?

Execute the following code in the terminal and configure two parameters to generate `rarreg.key`.

Expand All @@ -89,7 +148,7 @@ Example:
winrar-keygen.exe "Github" "Github.com" > rarreg.key
```
![Terminal](terminal.png)
![Terminal](assets/terminal.png)
Now you can see the newly generated file.
Expand All @@ -115,7 +174,7 @@ Why is my `rarreg.key` invalid?

### 5.1 ANSI Encoded

Username and License type are **ANSI-encoded string, without null-terminator.**
`test1` and `test2` are **ANSI-encoded string, without null-terminator.**

```console
winrar-keygen.exe <text1> <text2>
Expand Down
75 changes: 67 additions & 8 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<p align="center">
<img width="100px" src="icon.svg" align="center" alt="WinRAR Keygen" />
<img width="100px" src="icon.png" align="center" alt="WinRAR Keygen" />
<h2 align="center">WinRAR Keygen</h2>
<p align="center">Principle of WinRAR key generation</p>
</p>
Expand All @@ -9,6 +9,9 @@
<img alt="Issues" src="https://img.shields.io/github/issues/bitcookies/winrar-keygen?color=F48D73" />
</a>
<img src="https://img.shields.io/badge/Visual%20Studio-2022-5D4298" />
<a href="https://github.com/bitcookies/winrar-keygen/actions">
<img src="https://img.shields.io/badge/Github-Actions-4184F4" />
</a>
<a href="https://github.com/bitcookies/winrar-keygen/blob/master/LICENSE">
<img alt="License" src="https://img.shields.io/github/license/bitcookies/winrar-keygen.svg" />
</a>
Expand All @@ -33,13 +36,69 @@ WinRAR不是免费软件。如果你想使用它,你应当向 [__RARLAB__](htt

[这里](README.HOW_DOES_IT_WORK.zh-CN.md)

## 3. 如何编译?
## 3. 通过 Github Actions 使用

Github Action 是微软收购 Github 之后推出的 CI/CD 工具,通过以下步骤即可在 GitHub Action 上运行程序:

### 3.1 Fork

点击该项目右上角的 **Fork** 按钮,fork 一份代码到你的 Github:

![step-1](assets/actions-step-1.png)

如果你之前 fork 过,然后我提交了新的代码,但是你不懂得如何合并新内容到你的仓库,那你也可以删掉当前 fork 的仓库,然后重新 fork 一次。

### 3.2 修改 info.json

进入 `keygen/info.json`,点击编辑按钮,对该文件进行编辑:

![step-2](assets/actions-step-2.png)

打开该文件,你会发现有以下内容:

```json
{
"text1": "Github",
"text2": "Github.com"
}
```

你可以自己修改 `text1``text2` 相对应的值,例如:

```json
{
"text1": "yourname",
"text2": "yourteam"
}
```

需要注意的是,`test1``test2 ` 参数均是**不含空格的 ANSI 编码。**

修改完成之后,点击 **Commit changes** 按钮,Github Actions 会自动开始。

### 3.3 下载文件

进入 Actions 页面查看程序运行状况:

![step-3](assets/actions-step-3.png)

绿色说明运行成功,黄色说明正在运行,红色说明运行失败。运行成功之后,打开对应的任务,选择 **rarreg_file** 下载:

![step-4](assets/actions-step-4.png)

解压缩后会得到 `rarreg.key ` ,拖动导入 WinRAR 即可。

如果你得到的是无效的 key,请检查 `test1``test2 ` 参数是否是**不含空格的 ANSI 编码。**

## 4. 通过 Visual Studio 编译使用

我建议通过 Github Actions 的方法来使用,但是你仍然可以自己进行编译。

如果你不想自己编译,也可以到 [Release](https://github.com/bitcookies/winrar-keygen/releases/) 页面获取对应版本的 `winrar-keygen.exe`

### 3.1 前提条件
### 4.1 前提条件

1. 请确保你有 **Visual Studio 2022**,因为这是一个 VS2022 项目。如果你仍在使用 Visual Studio 2019,可以在 [vs2019](https://github.com/bitcookies/winrar-keygen/tree/vs2019) 分支中找到适合 VS2019 的项目。
1. 请确保你有 **Visual Studio 2022**,因为这是一个 VS2022 项目。如果你仍在使用 Visual Studio 2019,可以在 [vs2019](https://github.com/bitcookies/winrar-keygen/tree/vs2019) 分支中找到适合 VS2019 的项目,但是此分支将不再维护

2. 请确保你安装了 `vcpkg` 以及下面几个库:

Expand All @@ -60,15 +119,15 @@ WinRAR不是免费软件。如果你想使用它,你应当向 [__RARLAB__](htt
$ vcpkg integrate install
```

### 3.2 编译
### 4.2 编译

1. 在 __Visual Studio__ 中打开这个项目。
2. 选择 `Release` 配置。
3. 选择 __生成 > 生成解决方案__。

你将在 `bin/` 目录下看到生成的文件。

## 4. 如何使用?
### 4.3 如何使用?

直接在终端执行以下代码,配置两个参数即可生成 `rarreg.key`。

Expand All @@ -85,7 +144,7 @@ Example:
winrar-keygen.exe "Github" "Github.com" > rarreg.key
```

![Terminal](terminal.png)
![Terminal](assets/terminal.png)

现在你可以看到新生成的文件:

Expand All @@ -111,7 +170,7 @@ de3cdc56b311475b484e80b48157a0c3af60ca4f7f9c75d49bc50d

### 5.1 ANSI编码

用户名参数以及生成的许可文本,均是 **不含空格的 ANSI 编码。**
`test1` 以及 `test2` 生成的许可文本,均是 **不含空格的 ANSI 编码。**

```console
winrar-keygen.exe <text1> <text2>
Expand Down
Binary file added assets/actions-step-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/actions-step-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/actions-step-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/actions-step-4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/keygen-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
Binary file modified bin/Win32-Release/winrar-keygen.exe
Binary file not shown.
Binary file modified bin/Win32-Release/winrar-keygen.pdb
Binary file not shown.
Binary file modified bin/x64-Release/winrar-keygen.exe
Binary file not shown.
Binary file modified bin/x64-Release/winrar-keygen.pdb
Binary file not shown.
Binary file modified icon.ico
Binary file not shown.
Binary file modified icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
58 changes: 0 additions & 58 deletions icon.svg

This file was deleted.

4 changes: 4 additions & 0 deletions keygen/info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"text1": "Github",
"text2": "Github.com"
}
Binary file modified winrar-keygen.aps
Binary file not shown.
8 changes: 4 additions & 4 deletions winrar-keygen.rc
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ IDI_ICON1 ICON "icon.ico"
//

VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,4,0
PRODUCTVERSION 1,0,4,0
FILEVERSION 2,0,0,0
PRODUCTVERSION 2,0,0,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
Expand All @@ -79,12 +79,12 @@ BEGIN
BEGIN
VALUE "CompanyName", "WinRAR Keygen"
VALUE "FileDescription", "WinRAR Key Generation Tool"
VALUE "FileVersion", "1.0.4.0"
VALUE "FileVersion", "2.0.0.0"
VALUE "InternalName", "winrar-keygen.exe"
VALUE "LegalCopyright", "Copyright (C) 2021"
VALUE "OriginalFilename", "winrar-keygen.exe"
VALUE "ProductName", "WinRAR Keygen"
VALUE "ProductVersion", "1.0.4.0"
VALUE "ProductVersion", "2.0.0.0"
END
END
BLOCK "VarFileInfo"
Expand Down

0 comments on commit 923c175

Please sign in to comment.