From 73877a1f5e62aa2c5b75c6f852774680fb0d7d92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=97=8F=E6=9F=8F?= Date: Fri, 7 Jun 2024 11:46:13 +0800 Subject: [PATCH] =?UTF-8?q?docs=F0=9F=93=9D(=E4=BC=98=E5=8C=96=E8=A1=A5?= =?UTF-8?q?=E5=85=85=E8=AF=B4=E6=98=8E):?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes #5 --- README.md | 158 ++++++++++++++++++++---- build.sh => build-with-docker.sh | 0 docker-compose.yml | 9 ++ run-with-docker-compose.sh | 1 + run.sh => run-with-docker.sh | 1 - src/main/resources/templates/index.html | 2 +- 6 files changed, 145 insertions(+), 26 deletions(-) rename build.sh => build-with-docker.sh (100%) create mode 100644 docker-compose.yml create mode 100755 run-with-docker-compose.sh rename run.sh => run-with-docker.sh (69%) diff --git a/README.md b/README.md index 371810c..752cece 100644 --- a/README.md +++ b/README.md @@ -1,44 +1,57 @@ -

Jetbrains-Help

+# Jetbrains-Help -``` - ██╗███████╗████████╗██████╗ ██████╗ █████╗ ██╗███╗ ██╗███████╗ ██╗ ██╗███████╗██╗ ██████╗ - ██║██╔════╝╚══██╔══╝██╔══██╗██╔══██╗██╔══██╗██║████╗ ██║██╔════╝ ██║ ██║██╔════╝██║ ██╔══██╗ - ██║█████╗ ██║ ██████╔╝██████╔╝███████║██║██╔██╗ ██║███████╗█████╗███████║█████╗ ██║ ██████╔╝ -██ ██║██╔══╝ ██║ ██╔══██╗██╔══██╗██╔══██║██║██║╚██╗██║╚════██║╚════╝██╔══██║██╔══╝ ██║ ██╔═══╝ -╚█████╔╝███████╗ ██║ ██████╔╝██║ ██║██║ ██║██║██║ ╚████║███████║ ██║ ██║███████╗███████╗██║ -╚════╝ ╚══════╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝╚═╝ ╚═══╝╚══════╝ ╚═╝ ╚═╝╚══════╝╚══════╝╚═╝ -``` +## 目录 +- [项目说明](#项目说明) + - [仓库简要](#仓库简要) + - [仓库趋势](#仓库趋势) + - [支持版本](#支持版本) + - [项目版本](#项目版本) + - [功能列表](#功能列表) +- [运行教程](#运行教程) + - [拉取项目](#拉取项目) + - [配置环境](#配置环境) + - [本地运行](#本地运行) + - [容器运行](#容器运行) + - [运行服务](#运行服务) + - [本地运行](#本地运行) + - [有IDE](#有IDE) + - [无IDE](#无IDE) + - [容器运行](#容器运行) +- [使用教程](#使用教程) + - [下载依赖](#下载依赖) + - [依赖配置](#依赖配置) + - [可打开IDE](#可打开IDE) + - [不可打开IDE](#可打开IDE) -

+## 项目说明 +### 仓库简要 +

-

- -

- -

- -

+### 仓库趋势

+ +

+ + +### 支持版本 +

-

+### 项目版本 +

- +

-

- -

- -# 功能 +### 功能列表 | 功能 | DID | |:-------------------------|:---:| @@ -54,3 +67,100 @@ | 支持local/jar/dockerfile运行 | ✅ | | 单码全家桶激活支持 | ✅ | | …… | ☑️ | + +## 运行教程 + +> 以下是该项目详细运行教程, 尽量争取可以在各个环境下运作 + +### 拉取项目 + +`clone` 本项目至本地 + +### 配置环境 + +#### 本地运行 + +1. 需要 `Java` 环境,并且版本要求 **21** +2. 需要 `Maven` 环境,版本无要求,但建议采用最新版 + +#### 容器运行 +1. 需要 `Docker` 环境,版本无要求,但建议采用最新版 +2. 如有 `Docker-Compos` 环境,更佳,但此环境**非必须** + +### 运行服务 + +#### 本地运行 + +##### 有IDE + +1. 通过 `IDE` `Open` 项目 +2. 配置项目相关环境 +3. 运行 [JetbrainsHelpApplication.java](src%2Fmain%2Fjava%2Fcom%2Fjetbrains%2Fhelp%2FJetbrainsHelpApplication.java) + +##### 无IDE + +1. 系统终端 `Cd` 进入项目根目录 +2. 运行打包命令 `mvn clean package` +3. 运行启动命令 `java -jar target/Jetbrains-Help.jar` + +#### 容器运行 + +1. 系统终端 `Cd` 进入项目根目录 + +##### 使用Docker +2. 运行 `Docker` 命令 `docker build -t jetbrains-help .` +3. **或者** 执行 [build-with-docker.sh](build-with-docker.sh) +4. 运行 `Docker` 命令 `docker run -d -p 10768:10768 --name jetbrains-help jetbrains-help` +5. **或者** 执行 [run-with-docker.sh](run-with-docker.sh) + +##### 使用Docker-Compose + +2. 运行 `Docker-Compose` 命令 `docker compose build && docker compose up -d` +3. **或者** 执行 [run-with-docker-compose.sh](run-with-docker-compose.sh) + +### 使用教程 + +项目运行后, `Console` 会打印相关服务地址, 默认端口为 `10768`, 默认地址为 `127.0.0.1:10768` + +可以点此直接访问 [Jetbrains-Help](http://127.0.0.1:10768) + +#### 下载依赖 + +阅读 **页面头部**,根据头部指引下载 `ja-netfilter.zip` + +移动本地 `ja-netfilter.zip` 到自定义目录,**解压** + +#### 依赖配置 + +##### 可打开IDE + +- `进入IDE` +- **点击** 菜单栏 `帮助(help)` +- **点击** `编辑自定义虚拟机选型` +- **键入** 如下配置 +``` +-javaagent:you-path/ja-netfilter.jar +--add-opens=java.base/jdk.internal.org.objectweb.asm=ALL-UNNAMED +--add-opens=java.base/jdk.internal.org.objectweb.asm.tree=ALL-UNNAMED +``` +- 将`you-path`替换为 [下载依赖](#下载依赖) 步骤中自定义目录 +- **重启** `IDE` + +##### 不可打开IDE + +- **下载安装** [Toolbox](https://www.jetbrains.com/toolbox-app/) +- **启动** `Toolbox` +- **点击** `Toolbox` 找到对应 `IDE` +- **点击** `IDE` 右侧的 `⋮` +- **点击** `设置` +- 找到 `配置` 选项 +- **点击** `编辑JVM选项` +- **键入** 如下配置 +``` +-javaagent:you-path/ja-netfilter.jar +--add-opens=java.base/jdk.internal.org.objectweb.asm=ALL-UNNAMED +--add-opens=java.base/jdk.internal.org.objectweb.asm.tree=ALL-UNNAMED +``` +- 将`you-path`替换为 [下载依赖](#下载依赖) 步骤中自定义目录 +- **重启** `IDE` + diff --git a/build.sh b/build-with-docker.sh similarity index 100% rename from build.sh rename to build-with-docker.sh diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..d4c9a93 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,9 @@ +services: + jetbrains-help: + build: . + image: jetbrains-help:latest + container_name: Jetbrains-Help + ports: + - 10768:10768 + volumes: + - ./external:/external \ No newline at end of file diff --git a/run-with-docker-compose.sh b/run-with-docker-compose.sh new file mode 100755 index 0000000..359fd9b --- /dev/null +++ b/run-with-docker-compose.sh @@ -0,0 +1 @@ +docker compose build && docker compose up -d \ No newline at end of file diff --git a/run.sh b/run-with-docker.sh similarity index 69% rename from run.sh rename to run-with-docker.sh index d43e1bc..3b91307 100755 --- a/run.sh +++ b/run-with-docker.sh @@ -1,2 +1 @@ -docker remove jetbrains-help docker run -d -p 10768:10768 --name jetbrains-help jetbrains-help \ No newline at end of file diff --git a/src/main/resources/templates/index.html b/src/main/resources/templates/index.html index aeafa20..00961e4 100644 --- a/src/main/resources/templates/index.html +++ b/src/main/resources/templates/index.html @@ -12,7 +12,7 @@

🇨🇳 Download ja-netfilter.zip , and configure - your JetBrains's vmoptions!
+ your JetBrains's vmoptions!
🇨🇳 Also you can Refill license information to customizer your license!
🇨🇳 Please note that this page is only developed and used by