Skip to content

Commit

Permalink
try first build
Browse files Browse the repository at this point in the history
  • Loading branch information
ok-oldking committed Jun 23, 2024
1 parent 81704f6 commit eb9fa29
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 79 deletions.
28 changes: 6 additions & 22 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,8 @@ jobs:
(Get-Content config.py) -replace 'version = "v\d+\.\d+\.\d+"', 'version = "${{ steps.tagName.outputs.tag }}"' | Set-Content config.py
pyinstaller main.spec
python -m ok.update.gen_md5 .\dist\bundle
mv dist/bundle ok-baijing
7z a -t7z -r "ok-baijing-release-${{ steps.tagName.outputs.tag }}.7z" "ok-baijing"
rm -r dist
rm -r ok-baijing
pyinstaller main_debug.spec
python -m ok.update.gen_md5 .\dist\bundle
mv dist/bundle ok-baijing
7z a -t7z -r "ok-baijing-debug-${{ steps.tagName.outputs.tag }}.7z" "ok-baijing"
mv dist/bundle ok-ww
7z a -t7z -r "ok-ww-release-${{ steps.tagName.outputs.tag }}.7z" "ok-ww"
shell: pwsh

Expand All @@ -65,9 +59,7 @@ jobs:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body: |
下载release.7z文件然后解压缩后运行, 如果需要查找问题,上传更多日志才需要下载debug版本
最好使用模拟器运行安卓版,可以挂后台,稳定。PC版游戏可能兼容性较差,无法挂后台。
更新内容:
Updates:
${{ steps.changes.outputs.changes }}
draft: false
prerelease: true
Expand All @@ -78,19 +70,11 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./ok-baijing-release-${{ steps.tagName.outputs.tag }}.7z
asset_name: ok-baijing-release-${{ steps.tagName.outputs.tag }}.7z
asset_path: ./ok-ww-release-${{ steps.tagName.outputs.tag }}.7z
asset_name: ok-ww-release-${{ steps.tagName.outputs.tag }}.7z
asset_content_type: application/zip

- name: upload-win-debug
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./ok-baijing-debug-${{ steps.tagName.outputs.tag }}.7z
asset_name: ok-baijing-debug-${{ steps.tagName.outputs.tag }}.7z
asset_content_type: application/zip




58 changes: 10 additions & 48 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,62 +1,24 @@
# ![icon](icon.ico) ok_baijing
# ![icon](icon.png)

白荆自动漫巡辅助脚本
视频演示 [https://www.bilibili.com/video/BV1K7421f7KT/](https://www.bilibili.com/video/BV1K7421f7KT/)
## ok-ww

[报告BUG](https://github.com/ok-oldking/ok-baijing/issues/new?assignees=ok-oldking&labels=bug&projects=&template=%E6%8A%A5%E5%91%8Abug-.md&title=%5BBUG%5D)
Automation for Wuthering waves

QQ群594495691 [OK白荆回廊自动漫巡辅助](https://qm.qq.com/q/aGO7eBJ2Uw)

![img.png](readme/img.png)

* 基于[ok-script](https://github.com/ok-oldking/ok-script)开发, 完全使用OCR文字识别开发
* 支持PC版, 以及安卓模拟器或使用adb连接的安卓物理机
* 可以指定角色凹指定技能个数, 循环n次, 直到刷到技能
* 如果没有刷到技能就, 自动投降新开

## 使用方法

### windows版本运行

1.[Github Release](https://github.com/ok-oldking/ok_baijing/releases)下载最新版, 双击运行.exe, 杀毒软件可能会报警,
添加安装目录到白名单
2. 进入游戏漫巡界面, 设置全部为简化
![img_3.png](readme/img_3.png)
3. 先选择窗口, 点击运行
![img.png](img.png)
4. 选择任务运行
![img2.png](img2.png)
* Farm Boss Echo
* Auto Combat
* Auto Skip Dialogs in Quests

### 注意事项

* PC版游戏窗口必须处于前台脚本才会运行, 不支持后台挂机
* PC版脚本程序必须右键管理员运行, 否则没有权限点击窗口
* 安卓版支持后台挂机, 最好不要使用管理员运行, 否则可能侦测不到模拟器
* 安卓版可以识别主流模拟器, 以及可以通过ADB查找到的设备
* Might not work in system < windows 10
* Run the exe as Admin, because we need permission to send key and mouse event

### Python源码运行和开发
### Development

```
pip install -r requirements.txt
python main.py
python main_debug.py
```

* main_debug.py 是开启debug日志的, 以及OverlayView, 并且每次点击都会截图保存在click_screenshot
* main_debug_console.py 是未开启gui界面的版本
* 默认使用CPU进行OCR, 识别耗时大约300-400ms, 如果要使用GPU, 请参见RapidOCR文档, 安装GPU版依赖

### 常见的问题

#### 1. 分辨率支持

由于都是按窗口百分比计算的, 只支持16:9,1080p,2k,4k都行

#### 2. 发现Bug怎么办

可以直接提ISSUE, 附上截图和日志, 日志在logs文件夹, 错误截图在screenshot里

#### 3. 是否免费

一直免费, 我还没退坑的话, 就会一直更新


13 changes: 6 additions & 7 deletions config.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def calculate_pc_exe_path(running_path):
'debug': False, # Optional, default: False
'use_gui': True,
'config_folder': 'configs',
'gui_icon': get_path_in_package(__file__, 'icon.ico'),
'gui_icon': get_path_in_package(__file__, 'icon.png'),
'ocr': {
'lib': 'RapidOCR',
'inference_num_threads': int(os.cpu_count() / 2)
Expand All @@ -39,19 +39,18 @@ def calculate_pc_exe_path(running_path):
'update': {
'releases_url': 'https://api.github.com/repos/ok-oldking/ok-wuthering-waves/releases?per_page=15',
'proxy_url': 'https://gh.ok-script.com/',
'exe_name': 'ok-baijing.exe',
'exe_name': 'ok-ww.exe',
'use_proxy': True
},
'about': """
<h3>OK-WW</h3>
<p>免费开源软件 <a href="https://github.com/ok-oldking/ok-baijing">https://github.com/ok-oldking/ok-baijing</></p>
<p>报告问题BUG <a href="https://github.com/ok-oldking/ok-baijing/issues/new?assignees=ok-oldking&labels=bug&projects=&template=%E6%8A%A5%E5%91%8Abug-.md&title=%5BBUG%5D">https://github.com/ok-oldking/ok-baijing/issues/new?assignees=ok-oldking&labels=bug&projects=&template=%E6%8A%A5%E5%91%8Abug-.md&title=%5BBUG%5D</></p>
<p>视频演示 <a href="https://www.bilibili.com/video/BV1K7421f7KT/">https://www.bilibili.com/video/BV1K7421f7KT/</a></p>
<h3>OK-Wuthering-Waves</h3>
<p>免费开源软件 <a href="https://github.com/ok-oldking/ok-wuthering-waves">https://github.com/ok-oldking/ok-wuthering-waves</></p>
<p>报告问题BUG <a href="https://github.com/ok-oldking/ok-wuthering-waves/issues/new?assignees=ok-oldking&labels=bug&projects=&template=%E6%8A%A5%E5%91%8Abug-.md&title=%5BBUG%5D">https://github.com/ok-oldking/ok-baijing/issues/new?assignees=ok-oldking&labels=bug&projects=&template=%E6%8A%A5%E5%91%8Abug-.md&title=%5BBUG%5D</></p>
<p>QQ群:<a href="https://qm.qq.com/q/aGO7eBJ2Uw">594495691</a></p>
""",
'supported_screen_ratio': '16:9',
'screenshots_folder': "screenshots",
'gui_title': 'OK-WW', # Optional
'gui_title': 'OK-Wuthering-Waves', # Optional
# 'coco_feature_folder': get_path(__file__, 'assets/coco_feature'), # required if using feature detection
'log_file': 'logs/ok-script.log', # Optional, auto rotating every day
'error_log_file': 'logs/ok-script_error.log',
Expand Down
Binary file removed icon.ico
Binary file not shown.
Binary file added icon.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 removed img.png
Binary file not shown.
4 changes: 2 additions & 2 deletions main.spec
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ exe = EXE(
a.scripts,
[],
exclude_binaries=True,
name='ok-baijing',
icon='icon.ico',
name='ok-ww',
icon='icon.png',
debug=False,
bootloader_ignore_signals=False,
strip=False,
Expand Down

0 comments on commit eb9fa29

Please sign in to comment.