From 921b59e8b2d0dd711600826f7417c63a8d81ec79 Mon Sep 17 00:00:00 2001 From: zenuo Date: Tue, 14 May 2019 21:44:57 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=B7=AF=E5=BE=84?= =?UTF-8?q?=E7=A1=AC=E7=BC=96=E7=A0=81=E7=9A=84=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bash/navicat-patcher.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/bash/navicat-patcher.sh b/bash/navicat-patcher.sh index 1c9e7d0..bf1d00c 100755 --- a/bash/navicat-patcher.sh +++ b/bash/navicat-patcher.sh @@ -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' From 3a7e720bec3d0aa9db6195d7cb3677a63272972d Mon Sep 17 00:00:00 2001 From: zenuo Date: Tue, 14 May 2019 21:45:15 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=B3=A8=E6=84=8F?= =?UTF-8?q?=E4=BA=8B=E9=A1=B9=EF=BC=9B=E4=BF=AE=E6=94=B9=E8=84=9A=E6=9C=AC?= =?UTF-8?q?=E4=B8=8B=E8=BD=BD=E5=9C=B0=E5=9D=80=E5=88=B0=E5=8E=9F=E4=BB=93?= =?UTF-8?q?=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README_FOR_LINUX.md | 20 ++++++++++++-------- README_FOR_LINUX.zh-CN.md | 12 ++++++++---- 2 files changed, 20 insertions(+), 12 deletions(-) diff --git a/README_FOR_LINUX.md b/README_FOR_LINUX.md index 149183b..9afc5e0 100644 --- a/README_FOR_LINUX.md +++ b/README_FOR_LINUX.md @@ -1,12 +1,12 @@ -# Navicat Keygen - for Linux +# Navicat Keygen -[中文版README](README_FOR_LINUX.zh-CN.md) +[中文版README](README.zh-CN.md) ## 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. ``` diff --git a/README_FOR_LINUX.zh-CN.md b/README_FOR_LINUX.zh-CN.md index 0b5f180..c7c1162 100644 --- a/README_FOR_LINUX.zh-CN.md +++ b/README_FOR_LINUX.zh-CN.md @@ -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 ``` From b358e76f56c0afe768fb66778f2778fdb28563a1 Mon Sep 17 00:00:00 2001 From: zenuo Date: Tue, 14 May 2019 21:49:53 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E6=B7=BB=E5=8A=A0"for=20Linux"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README_FOR_LINUX.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README_FOR_LINUX.md b/README_FOR_LINUX.md index 9afc5e0..1b25c12 100644 --- a/README_FOR_LINUX.md +++ b/README_FOR_LINUX.md @@ -1,4 +1,4 @@ -# Navicat Keygen +# Navicat Keygen - for Linux [中文版README](README.zh-CN.md) From 27e97b34f00e9cafb3789c01b6f1751cfa35c68f Mon Sep 17 00:00:00 2001 From: zenuo Date: Tue, 14 May 2019 21:51:08 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E6=B7=BB=E5=8A=A0"README=5FFOR=5FLINUX"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README_FOR_LINUX.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README_FOR_LINUX.md b/README_FOR_LINUX.md index 1b25c12..b56a768 100644 --- a/README_FOR_LINUX.md +++ b/README_FOR_LINUX.md @@ -1,6 +1,6 @@ # Navicat Keygen - for Linux -[中文版README](README.zh-CN.md) +[中文版README](README_FOR_LINUX.zh-CN.md) ## How to use?