Merge pull request #270 from zenuo/windows

错误修复以及文档修改
This commit is contained in:
Double Sine
2019-05-15 07:52:46 +08:00
committed by GitHub
3 changed files with 28 additions and 11 deletions
+10 -6
View File
@@ -4,9 +4,9 @@
## How to use?
> For easier offline activation, we are going to install Navicat to `home`; you can download [Screen recoding](image/Screen_recording.mp4) for references.
> You can download [Screen recoding](image/Screen_recording.mp4) for references.
1. Run Navicat, for initialization:
1. Switch to the path you extracted the installation package Run Navicat, for initialization:
```bash
cd ~/navicat121_premium_en_x64 && \
@@ -25,6 +25,8 @@
2. Download the latest release [from here](https://github.com/DoubleLabyrinth/navicat-keygen/releases), and extract
> The 64-bit executable file is downloaded here. If you use 32-bit, please download the corresponding version.
```bash
curl -O -L https://github.com/DoubleLabyrinth/navicat-keygen/releases/download/v3.1/navicat-keygen-for-x64.zip && \
unzip navicat-keygen-for-x64.zip
@@ -33,18 +35,20 @@
3. Download `navicat-pacther.sh` and `navicat-keygen.sh`:
```bash
curl -O -L https://raw.githubusercontent.com/zenuo/navicat-keygen/linux/bash/navicat-patcher.sh && \
curl -O -L https://raw.githubusercontent.com/DoubleLabyrinth/navicat-keygen/linux/bash/navicat-patcher.sh && \
chmod +x navicat-patcher.sh && \
curl -O -L https://raw.githubusercontent.com/zenuo/navicat-keygen/linux/bash/navicat-keygen.sh && \
curl -O -L https://raw.githubusercontent.com/DoubleLabyrinth/navicat-keygen/linux/bash/navicat-keygen.sh && \
chmod +x navicat-keygen.sh
```
4. Use `navicat-patcher.exe` to replace __Navicat Activation Public Key__ that is stored in `navicat.exe` or `libcc.dll`.
> Please turn off `Navicat` when performing this step.
```bash
./navicat-patcher.sh
```
It has been tested on __Navicat Premium 12.1.12 Simplified Chinese version__. The following is an example of output.
```
+8 -4
View File
@@ -2,9 +2,9 @@
## 如何使用这个注册机
> 为便于离线激活,将安装包解压在`家目录`;可下载[录屏文件](image/Screen_recording.mp4)参考
> 可下载[录屏文件](image/Screen_recording.mp4)参考
1. 运行Navicat,使其初始化环境:
1. 切换到解压安装包的路径,本示例解压到了`家目录`运行Navicat,使其初始化环境:
```bash
cd ~/navicat121_premium_en_x64 && \
@@ -23,6 +23,8 @@
2. [从这里](https://github.com/DoubleLabyrinth/navicat-keygen/releases)下载最新的release,并且解压:
> 此处下载的是64位的可执行文件,若您使用32位,请下载对应版本
```bash
curl -O -L https://github.com/DoubleLabyrinth/navicat-keygen/releases/download/v3.1/navicat-keygen-for-x64.zip && \
unzip navicat-keygen-for-x64.zip
@@ -31,14 +33,16 @@
3. 下载`navicat-pacther.sh`和`navicat-keygen.sh`
```bash
curl -O -L https://raw.githubusercontent.com/zenuo/navicat-keygen/linux/bash/navicat-patcher.sh && \
curl -O -L https://raw.githubusercontent.com/DoubleLabyrinth/navicat-keygen/linux/bash/navicat-patcher.sh && \
chmod +x navicat-patcher.sh && \
curl -O -L https://raw.githubusercontent.com/zenuo/navicat-keygen/linux/bash/navicat-keygen.sh && \
curl -O -L https://raw.githubusercontent.com/DoubleLabyrinth/navicat-keygen/linux/bash/navicat-keygen.sh && \
chmod +x navicat-keygen.sh
```
4. 使用`navicat-patcher.exe`替换掉`navicat.exe`和`libcc.dll`里的Navicat激活公钥。
> 执行此步骤时,请将`Navicat`关闭
```bash
./navicat-patcher.sh
```
+10 -1
View File
@@ -13,4 +13,13 @@ export WINELOADER="$navicat_root/$WINEDIR/bin/wine64"
export WINESERVER="$navicat_root/$WINEDIR/bin/wineserver"
export WINEPREFIX="$HOME/.navicat64"
exec "${WINELOADER:-wine}" "navicat-patcher.exe" "Y:\navicat121_premium_en_x64\Navicat"
# 获取家目录(例如"/home/tom/")之后的路径
path_after_first_slash=${navicat_root:1}
second_slash_index=`expr index $path_after_first_slash "/"`
path_after_sencod_slash=${path_after_first_slash:$second_slash_index}
third_slash_index=`expr index $path_after_sencod_slash "/"`
path_after_third_slash=${path_after_sencod_slash:$third_slash_index}
# 将斜线替换为反斜线
path_back_slash=${path_after_third_slash/\//\\}
exec "${WINELOADER:-wine}" "navicat-patcher.exe" 'Y:\'$path_back_slash'\Navicat'