ok-script 2.0.0b7__tar.gz → 2.0.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- ok_script-2.0.2/LICENSE.txt +73 -0
- {ok_script-2.0.0b7/ok_script.egg-info → ok_script-2.0.2}/PKG-INFO +107 -3
- {ok_script-2.0.0b7 → ok_script-2.0.2}/README.md +31 -1
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/__init__.py +8 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/device/DeviceManager.py +10 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/device/capture_methods/bitblt.py +14 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/device/capture_methods/windows_graphics.py +41 -27
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/MainWindow.py +11 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/about/AboutTab.py +14 -10
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/about/LinksBar.py +6 -0
- ok_script-2.0.2/ok/ui/qt/about/ProjectCard.py +42 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/about/UpdateCard.py +19 -4
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/about/VersionCard.py +4 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/i18n/en_US.ts +15 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/i18n/es_ES.ts +15 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/i18n/ja_JP.ts +15 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/i18n/ko_KR.ts +15 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/i18n/zh_CN.ts +15 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/i18n/zh_TW.ts +15 -0
- ok_script-2.0.2/ok/ui/qt/tasks/LabelAndMultiSelection.py +133 -0
- ok_script-2.0.2/ok/ui/qt/widget/FlowLayout.py +66 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/web/app.py +1 -1
- ok_script-2.0.2/ok/ui/web/static/app.js +11 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/web/static/chunk-fluent.js +2 -2
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/web/static/index.css +1 -1
- {ok_script-2.0.0b7 → ok_script-2.0.2/ok_script.egg-info}/PKG-INFO +107 -3
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok_script.egg-info/requires.txt +1 -1
- {ok_script-2.0.0b7 → ok_script-2.0.2}/pyproject.toml +2 -1
- {ok_script-2.0.0b7 → ok_script-2.0.2}/tests/test_pyappify_startup_update.py +53 -0
- ok_script-2.0.0b7/LICENSE.txt +0 -661
- ok_script-2.0.0b7/ok/ui/qt/about/ProjectCard.py +0 -19
- ok_script-2.0.0b7/ok/ui/qt/tasks/LabelAndMultiSelection.py +0 -59
- ok_script-2.0.0b7/ok/ui/qt/widget/FlowLayout.py +0 -35
- ok_script-2.0.0b7/ok/ui/web/static/app.js +0 -11
- {ok_script-2.0.0b7 → ok_script-2.0.2}/MANIFEST.in +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/diagnostics/qq_trace.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/__main__.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/alas/__init__.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/alas/emulator_base.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/alas/emulator_windows.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/alas/platform_windows.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/alas/utils.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/capture/__init__.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/capture/adb/__init__.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/capture/adb/deep.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/capture/adb/minitouch.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/capture/adb/nemu_ipc.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/capture/adb/nemu_utils.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/capture/adb/pool.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/capture/adb/timer.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/capture/adb/util.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/capture/windows/__init__.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/capture/windows/d3d11.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/capture/windows/dump.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/cli.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/core/__init__.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/core/config_schema.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/core/downloads.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/core/events.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/core/icons.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/core/notifications.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/core/screenshot.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/core/script_editing.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/core/script_packager.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/core/script_templates.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/core/start_controller.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/core/task_manager.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/core/template_store.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/core/translation.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/core/ui_config.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/device/__init__.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/device/capture.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/device/capture_methods/__init__.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/device/capture_methods/adb.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/device/capture_methods/base.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/device/capture_methods/bitblt_utils.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/device/capture_methods/browser.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/device/capture_methods/desktop_duplication.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/device/capture_methods/hwnd_window.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/device/capture_methods/image.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/device/capture_methods/nemu_ipc.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/device/capture_methods/types.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/device/capture_methods/update.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/device/interaction.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/device/interaction_methods/__init__.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/device/interaction_methods/adb.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/device/interaction_methods/base.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/device/interaction_methods/browser.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/device/interaction_methods/do_nothing.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/device/interaction_methods/foreground_post_message.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/device/interaction_methods/genshin.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/device/interaction_methods/keys.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/device/interaction_methods/post_message.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/device/interaction_methods/pydirect.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/device/interaction_methods/pynput.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/device/interaction_methods/swipe.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/device/intercation.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/feature/Box.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/feature/Feature.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/feature/FeatureSet.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/feature/__init__.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/gui/__init__.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/gui/util/pyappify_startup.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/notification/__init__.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/notification/manager.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/notification/messenger_images.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/notification/pipeline.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/notification/ppocr.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/notification/providers.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/notification/system.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/notification/windows_messenger.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ocr/__init__.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ocr/download_paddle_model.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/rotypes/Windows/Foundation/Collections.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/rotypes/Windows/Foundation/__init__.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/rotypes/Windows/Globalization/__init__.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/rotypes/Windows/Graphics/Capture/__init__.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/rotypes/Windows/Graphics/DirectX/Direct3D11/__init__.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/rotypes/Windows/Graphics/DirectX/__init__.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/rotypes/Windows/Graphics/Imaging/__init__.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/rotypes/Windows/Graphics/__init__.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/rotypes/Windows/Media/Ocr/__init__.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/rotypes/Windows/Media/__init__.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/rotypes/Windows/Security/Cryptography/__init__.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/rotypes/Windows/Security/__init__.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/rotypes/Windows/Storage/Streams/__init__.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/rotypes/Windows/Storage/__init__.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/rotypes/Windows/UI/ViewManagement/__init__.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/rotypes/Windows/UI/__init__.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/rotypes/Windows/__init__.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/rotypes/__init__.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/rotypes/delegate.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/rotypes/export.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/rotypes/idldsl.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/rotypes/inspectable.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/rotypes/roapi.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/rotypes/types.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/rotypes/winstring.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/task/DiagnosisTask.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/task/TaskExecutor.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/task/__init__.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/task/exceptions.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/task/task.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/task/web.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/test/OKTestRunner.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/test/RunTests.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/test/TaskTestCase.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/test/__init__.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/third_party/__init__.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/third_party/paperclip.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/__init__.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/overlay/__init__.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/overlay/win32_gdi.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/Communicate.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/MessageWindow.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/StartController.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/TabTitles.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/__init__.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/about/HttpTextEdit.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/about/__init__.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/common/OKIcon.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/common/__init__.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/common/accent_color.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/common/config.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/common/design_system.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/common/icons.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/common/style_sheet.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/debug/DebugTab.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/debug/OverlayWidget.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/debug/RunCodeTab.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/debug/Screenshot.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/debug/__init__.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/events.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/i18n/GettextTranslator.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/i18n/__init__.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/i18n/en_US.qm +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/i18n/es_ES.qm +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/i18n/ja_JP.qm +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/i18n/ko_KR.qm +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/i18n/path.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/i18n/update.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/i18n/zh_CN.qm +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/i18n/zh_TW.qm +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/overlay/OverlayWindow.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/overlay/__init__.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/qss/__init__.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/qss/dark/card.qss +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/qss/dark/discord.svg +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/qss/dark/heart.svg +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/qss/dark/message_window.qss +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/qss/dark/setting_interface.qss +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/qss/dark/status_bar.qss +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/qss/dark/stop.svg +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/qss/dark/tab.qss +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/qss/light/card.qss +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/qss/light/discord.svg +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/qss/light/heart.svg +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/qss/light/message_window.qss +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/qss/light/setting_interface.qss +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/qss/light/status_bar.qss +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/qss/light/stop.svg +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/qss/light/tab.qss +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/qt.qrc +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/resources.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/settings/GlobalConfigCard.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/settings/GlobalConfigTab.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/settings/SettingTab.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/settings/__init__.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/start/LogWindow.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/start/SelectCaptureListView.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/start/SelectInteractionListView.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/start/StartCard.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/start/StartTab.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/start/__init__.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/tasks/ConfigCard.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/tasks/ConfigItemFactory.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/tasks/ConfigLabelAndWidget.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/tasks/EditTaskTab.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/tasks/LabelAndButtons.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/tasks/LabelAndDoubleSpinBox.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/tasks/LabelAndDropDown.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/tasks/LabelAndFileSelector.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/tasks/LabelAndGlobal.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/tasks/LabelAndLineEdit.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/tasks/LabelAndList.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/tasks/LabelAndSpinBox.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/tasks/LabelAndSwitchButton.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/tasks/LabelAndTextEdit.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/tasks/LabelAndWidget.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/tasks/MarkUpWindow.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/tasks/ModifyListDialog.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/tasks/ModifyListItem.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/tasks/OneTimeTaskTab.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/tasks/PythonHighlighter.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/tasks/RecordScript.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/tasks/ScheduleTaskTab.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/tasks/ScriptPackager.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/tasks/StartButton.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/tasks/TaskCard.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/tasks/TaskManger.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/tasks/TaskOpButton.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/tasks/TaskTab.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/tasks/TemplateFactory.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/tasks/TemplateTab.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/tasks/TooltipTableWidget.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/tasks/TriggerTaskTab.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/tasks/__init__.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/util/Alert.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/util/InitWorker.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/util/__init__.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/util/app.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/util/download.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/util/pip_util.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/util/pyappify_startup.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/util/touch_scroll.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/util/windows_thumbnail.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/widget/BaseLoading.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/widget/BaseWindow.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/widget/Card.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/widget/CustomTab.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/widget/EmptyCard.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/widget/ExpandCardLayout.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/widget/FramelessDialog.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/widget/ImageWidget.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/widget/ListTableWidgetItem.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/widget/NumericTableWidgetItem.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/widget/OkCompactSpinBox.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/widget/SortingTableWidgetItem.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/widget/StartLoadingDialog.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/widget/StatusBar.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/widget/Tab.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/widget/TabWidget.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/widget/UpdateConfigWidgetItem.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/widget/WidgetWithVLabel.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/widget/YesNonWidgetItem.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/qt/widget/__init__.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/web/__init__.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/web/requirements.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/web/server.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/web/static/chunk-react.js +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/ui/web/static/index.html +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/update/__init__.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/update/copy_ok_folder.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/update/inline_ok_requirements.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/util/Analytics.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/util/GlobalConfig.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/util/__init__.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/util/blur.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/util/clazz.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/util/collection.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/util/color.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/util/config.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/util/explorer.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/util/file.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/util/gpu_driver_settings.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/util/handler.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/util/i18n.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/util/logger.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/util/partial_sync_repo.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/util/print_hwnd.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/util/process.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/util/window.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok/util/windows_schedule.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok_script.egg-info/SOURCES.txt +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok_script.egg-info/dependency_links.txt +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok_script.egg-info/entry_points.txt +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok_script.egg-info/not-zip-safe +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/ok_script.egg-info/top_level.txt +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/scripts/generate_web_i18n.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/setup.cfg +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/setup.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/tests/test_accent_color.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/tests/test_app.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/tests/test_base_interaction.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/tests/test_blur.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/tests/test_box.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/tests/test_capture_update.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/tests/test_cli.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/tests/test_config_card.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/tests/test_core_events.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/tests/test_core_ui_services.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/tests/test_device_manager.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/tests/test_expand_card_layout.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/tests/test_explorer.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/tests/test_global_config.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/tests/test_gpu_driver_settings.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/tests/test_headless_imports.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/tests/test_inline_ok_requirements.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/tests/test_logger.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/tests/test_main_window_notifications.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/tests/test_main_window_startup_tab.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/tests/test_main_window_system_theme.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/tests/test_missing_frame.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/tests/test_navigation_state.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/tests/test_nemu_ipc_capture.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/tests/test_notifications.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/tests/test_ok_mutex.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/tests/test_overlay_custom_draw.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/tests/test_package_metadata.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/tests/test_process.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/tests/test_qt_events.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/tests/test_qt_legacy_imports.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/tests/test_qt_page_layout.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/tests/test_runtime_startup.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/tests/test_start_controller.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/tests/test_task_executor_queue.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/tests/test_task_ui.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/tests/test_template_tab.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/tests/test_touch_scroll.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/tests/test_translation_fallback.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/tests/test_ui_config.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/tests/test_web_app.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/tests/test_web_i18n.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/tests/test_web_server.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/tests/test_web_task_tabs.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/tests/test_web_ui_pages.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/tests/test_web_ui_tasks.py +0 -0
- {ok_script-2.0.0b7 → ok_script-2.0.2}/tests/test_windows_graphics_capture.py +0 -0
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
ok-script License
|
|
2
|
+
================
|
|
3
|
+
|
|
4
|
+
Copyright (c) 2026 ok-oldking
|
|
5
|
+
|
|
6
|
+
This project is licensed under the Apache License, Version 2.0, as modified
|
|
7
|
+
by the Commons Clause License Condition v1.0 and the additional terms below.
|
|
8
|
+
The Apache License, Version 2.0, is available at:
|
|
9
|
+
|
|
10
|
+
https://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
|
|
12
|
+
The Commons Clause License Condition v1.0 is available at:
|
|
13
|
+
|
|
14
|
+
https://commonsclause.com/
|
|
15
|
+
|
|
16
|
+
If there is a conflict between the Apache License 2.0 and the Commons Clause
|
|
17
|
+
or additional terms below, the Commons Clause and additional terms control.
|
|
18
|
+
|
|
19
|
+
Commons Clause
|
|
20
|
+
-------------
|
|
21
|
+
|
|
22
|
+
Without limiting the conditions of the Apache License 2.0, the grant of
|
|
23
|
+
rights under that license does not include the right to Sell this Software.
|
|
24
|
+
|
|
25
|
+
For this license, “Sell” means selling, lending, leasing, licensing, offering
|
|
26
|
+
for sale, lease, or license, or otherwise transferring this Software to a
|
|
27
|
+
third party for a fee or other consideration. “Sell” does not include:
|
|
28
|
+
|
|
29
|
+
* Using the Software internally, including by an organization or its
|
|
30
|
+
employees, without transferring it to a third party for a fee or other
|
|
31
|
+
consideration; or
|
|
32
|
+
* Distributing the Software as part of a larger application or product,
|
|
33
|
+
provided that the larger application or product is not primarily the
|
|
34
|
+
Software or a competing product.
|
|
35
|
+
|
|
36
|
+
Additional Terms
|
|
37
|
+
----------------
|
|
38
|
+
|
|
39
|
+
1. You may use this Software in closed-source and commercial projects. You
|
|
40
|
+
may charge for your own application, service, support, or other material
|
|
41
|
+
that incorporates the Software, provided that you do not sell or offer the
|
|
42
|
+
Software itself, or a competing product based primarily on it, as a product.
|
|
43
|
+
|
|
44
|
+
2. You may fork the Software, make improvements, and keep the fork open
|
|
45
|
+
source and freely available. You may not take this project, rename it or
|
|
46
|
+
make only minor changes, and sell or market it as a competing product.
|
|
47
|
+
|
|
48
|
+
3. You may not use this Software for hacking, unauthorized access, malware,
|
|
49
|
+
fraud, or any other illegal activity. You are responsible for complying
|
|
50
|
+
with all applicable laws and obtaining authorization for any security or
|
|
51
|
+
automation activity.
|
|
52
|
+
|
|
53
|
+
4. Any project that uses, incorporates, or is derived from this Software
|
|
54
|
+
must mention ok-script and link to at least one of the following in at
|
|
55
|
+
least one of the project's website, GitHub repository, or the software
|
|
56
|
+
itself:
|
|
57
|
+
|
|
58
|
+
* Website: https://ok-script.com/
|
|
59
|
+
* GitHub: https://github.com/ok-oldking/ok-script
|
|
60
|
+
|
|
61
|
+
The notice must be reasonably visible and retained in modified or
|
|
62
|
+
redistributed versions.
|
|
63
|
+
|
|
64
|
+
5. Use of the Qt UI, including components based on PyQt-Fluent-Widgets or
|
|
65
|
+
its related packages, is separately subject to the license and terms of
|
|
66
|
+
the upstream project:
|
|
67
|
+
|
|
68
|
+
https://github.com/zhiyiYo/PyQt-Fluent-Widgets
|
|
69
|
+
|
|
70
|
+
6. Except for these additional terms, the Apache License 2.0 applies,
|
|
71
|
+
including its copyright, notice, patent, warranty, and liability
|
|
72
|
+
provisions. The Software is provided “AS IS”, without warranties or
|
|
73
|
+
conditions of any kind.
|
|
@@ -1,8 +1,82 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ok-script
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.2
|
|
4
4
|
Summary: Automation with Computer Vision for Python
|
|
5
5
|
Author-email: ok-oldking <firedcto@gmail.com>
|
|
6
|
+
License: ok-script License
|
|
7
|
+
================
|
|
8
|
+
|
|
9
|
+
Copyright (c) 2026 ok-oldking
|
|
10
|
+
|
|
11
|
+
This project is licensed under the Apache License, Version 2.0, as modified
|
|
12
|
+
by the Commons Clause License Condition v1.0 and the additional terms below.
|
|
13
|
+
The Apache License, Version 2.0, is available at:
|
|
14
|
+
|
|
15
|
+
https://www.apache.org/licenses/LICENSE-2.0
|
|
16
|
+
|
|
17
|
+
The Commons Clause License Condition v1.0 is available at:
|
|
18
|
+
|
|
19
|
+
https://commonsclause.com/
|
|
20
|
+
|
|
21
|
+
If there is a conflict between the Apache License 2.0 and the Commons Clause
|
|
22
|
+
or additional terms below, the Commons Clause and additional terms control.
|
|
23
|
+
|
|
24
|
+
Commons Clause
|
|
25
|
+
-------------
|
|
26
|
+
|
|
27
|
+
Without limiting the conditions of the Apache License 2.0, the grant of
|
|
28
|
+
rights under that license does not include the right to Sell this Software.
|
|
29
|
+
|
|
30
|
+
For this license, “Sell” means selling, lending, leasing, licensing, offering
|
|
31
|
+
for sale, lease, or license, or otherwise transferring this Software to a
|
|
32
|
+
third party for a fee or other consideration. “Sell” does not include:
|
|
33
|
+
|
|
34
|
+
* Using the Software internally, including by an organization or its
|
|
35
|
+
employees, without transferring it to a third party for a fee or other
|
|
36
|
+
consideration; or
|
|
37
|
+
* Distributing the Software as part of a larger application or product,
|
|
38
|
+
provided that the larger application or product is not primarily the
|
|
39
|
+
Software or a competing product.
|
|
40
|
+
|
|
41
|
+
Additional Terms
|
|
42
|
+
----------------
|
|
43
|
+
|
|
44
|
+
1. You may use this Software in closed-source and commercial projects. You
|
|
45
|
+
may charge for your own application, service, support, or other material
|
|
46
|
+
that incorporates the Software, provided that you do not sell or offer the
|
|
47
|
+
Software itself, or a competing product based primarily on it, as a product.
|
|
48
|
+
|
|
49
|
+
2. You may fork the Software, make improvements, and keep the fork open
|
|
50
|
+
source and freely available. You may not take this project, rename it or
|
|
51
|
+
make only minor changes, and sell or market it as a competing product.
|
|
52
|
+
|
|
53
|
+
3. You may not use this Software for hacking, unauthorized access, malware,
|
|
54
|
+
fraud, or any other illegal activity. You are responsible for complying
|
|
55
|
+
with all applicable laws and obtaining authorization for any security or
|
|
56
|
+
automation activity.
|
|
57
|
+
|
|
58
|
+
4. Any project that uses, incorporates, or is derived from this Software
|
|
59
|
+
must mention ok-script and link to at least one of the following in at
|
|
60
|
+
least one of the project's website, GitHub repository, or the software
|
|
61
|
+
itself:
|
|
62
|
+
|
|
63
|
+
* Website: https://ok-script.com/
|
|
64
|
+
* GitHub: https://github.com/ok-oldking/ok-script
|
|
65
|
+
|
|
66
|
+
The notice must be reasonably visible and retained in modified or
|
|
67
|
+
redistributed versions.
|
|
68
|
+
|
|
69
|
+
5. Use of the Qt UI, including components based on PyQt-Fluent-Widgets or
|
|
70
|
+
its related packages, is separately subject to the license and terms of
|
|
71
|
+
the upstream project:
|
|
72
|
+
|
|
73
|
+
https://github.com/zhiyiYo/PyQt-Fluent-Widgets
|
|
74
|
+
|
|
75
|
+
6. Except for these additional terms, the Apache License 2.0 applies,
|
|
76
|
+
including its copyright, notice, patent, warranty, and liability
|
|
77
|
+
provisions. The Software is provided “AS IS”, without warranties or
|
|
78
|
+
conditions of any kind.
|
|
79
|
+
|
|
6
80
|
Project-URL: Homepage, https://github.com/ok-oldking/ok-script
|
|
7
81
|
Project-URL: Repository, https://github.com/ok-oldking/ok-script
|
|
8
82
|
Classifier: Programming Language :: Python :: 3
|
|
@@ -15,7 +89,7 @@ Classifier: Operating System :: Microsoft :: Windows
|
|
|
15
89
|
Requires-Python: >=3.11
|
|
16
90
|
Description-Content-Type: text/markdown
|
|
17
91
|
License-File: LICENSE.txt
|
|
18
|
-
Requires-Dist: pywin32
|
|
92
|
+
Requires-Dist: pywin32!=312,>=306
|
|
19
93
|
Requires-Dist: pyappify>=1.0.9
|
|
20
94
|
Requires-Dist: typing-extensions>=4.11.0
|
|
21
95
|
Requires-Dist: requests>=2.32.3
|
|
@@ -157,6 +231,36 @@ python -m pip install --editable . --group default --group dev
|
|
|
157
231
|
- [PyPI](https://pypi.org/project/ok-script/)
|
|
158
232
|
- [GitHub](https://github.com/ok-oldking/ok-script)
|
|
159
233
|
|
|
234
|
+
## 致谢
|
|
235
|
+
|
|
236
|
+
ok-script 的开发离不开以下开源项目:
|
|
237
|
+
|
|
238
|
+
- [PyAppify](https://github.com/ok-oldking/pyappify):用于应用更新和打包。
|
|
239
|
+
- [OnnxOCR](https://github.com/ok-oldking/OnnxOCR):提供支持 Intel NPU 的 OCR,
|
|
240
|
+
支持通过 OpenVINO 或 ONNX Runtime 推理,并使用 PaddleOCR v5 模型。
|
|
241
|
+
- [PySide6](https://wiki.qt.io/Qt_for_Python):提供基于 Qt 的桌面界面绑定。
|
|
242
|
+
- [PyQt-Fluent-Widgets](https://github.com/zhiyiYo/PyQt-Fluent-Widgets):Qt
|
|
243
|
+
界面使用的 Fluent UI 组件。
|
|
244
|
+
- [OpenCV](https://opencv.org/)、[NumPy](https://numpy.org/) 和
|
|
245
|
+
[Pillow](https://python-pillow.org/):用于图像处理和计算机视觉。
|
|
246
|
+
- [FastAPI](https://fastapi.tiangolo.com/)、[Uvicorn](https://www.uvicorn.org/)
|
|
247
|
+
和 [pywebview](https://pywebview.flowrl.com/):用于 Web 界面支持。
|
|
248
|
+
- [adbutils](https://github.com/openatx/adbutils):用于 Android 设备连接。
|
|
249
|
+
|
|
250
|
+
上述依赖均受其各自许可证约束,详情请参阅对应项目页面。
|
|
251
|
+
|
|
160
252
|
## 许可证
|
|
161
253
|
|
|
162
|
-
本项目采用 [
|
|
254
|
+
本项目采用 [Apache License 2.0 + Commons Clause 及附加条款](LICENSE.txt)。
|
|
255
|
+
|
|
256
|
+
允许的使用方式:
|
|
257
|
+
|
|
258
|
+
- 可用于闭源项目或商业项目。
|
|
259
|
+
- 可以 fork、本项目改进,并保持 fork 开源且免费。
|
|
260
|
+
|
|
261
|
+
限制:
|
|
262
|
+
|
|
263
|
+
- 禁止直接出售本项目,或仅改名、稍作修改后将其作为竞争产品出售或推广。
|
|
264
|
+
- 禁止将本项目用于黑客攻击、未授权访问、恶意软件、欺诈或其他违法活动。
|
|
265
|
+
- 任何使用 ok-script 的项目,都必须在项目网站、GitHub 或软件本身至少一处提及并链接 [ok-script.com](https://ok-script.com/) 或 [ok-script GitHub](https://github.com/ok-oldking/ok-script)。
|
|
266
|
+
- Qt UI 的使用还必须遵守 [PyQt-Fluent-Widgets](https://github.com/zhiyiYo/PyQt-Fluent-Widgets) 的许可证。
|
|
@@ -102,6 +102,36 @@ python -m pip install --editable . --group default --group dev
|
|
|
102
102
|
- [PyPI](https://pypi.org/project/ok-script/)
|
|
103
103
|
- [GitHub](https://github.com/ok-oldking/ok-script)
|
|
104
104
|
|
|
105
|
+
## 致谢
|
|
106
|
+
|
|
107
|
+
ok-script 的开发离不开以下开源项目:
|
|
108
|
+
|
|
109
|
+
- [PyAppify](https://github.com/ok-oldking/pyappify):用于应用更新和打包。
|
|
110
|
+
- [OnnxOCR](https://github.com/ok-oldking/OnnxOCR):提供支持 Intel NPU 的 OCR,
|
|
111
|
+
支持通过 OpenVINO 或 ONNX Runtime 推理,并使用 PaddleOCR v5 模型。
|
|
112
|
+
- [PySide6](https://wiki.qt.io/Qt_for_Python):提供基于 Qt 的桌面界面绑定。
|
|
113
|
+
- [PyQt-Fluent-Widgets](https://github.com/zhiyiYo/PyQt-Fluent-Widgets):Qt
|
|
114
|
+
界面使用的 Fluent UI 组件。
|
|
115
|
+
- [OpenCV](https://opencv.org/)、[NumPy](https://numpy.org/) 和
|
|
116
|
+
[Pillow](https://python-pillow.org/):用于图像处理和计算机视觉。
|
|
117
|
+
- [FastAPI](https://fastapi.tiangolo.com/)、[Uvicorn](https://www.uvicorn.org/)
|
|
118
|
+
和 [pywebview](https://pywebview.flowrl.com/):用于 Web 界面支持。
|
|
119
|
+
- [adbutils](https://github.com/openatx/adbutils):用于 Android 设备连接。
|
|
120
|
+
|
|
121
|
+
上述依赖均受其各自许可证约束,详情请参阅对应项目页面。
|
|
122
|
+
|
|
105
123
|
## 许可证
|
|
106
124
|
|
|
107
|
-
本项目采用 [
|
|
125
|
+
本项目采用 [Apache License 2.0 + Commons Clause 及附加条款](LICENSE.txt)。
|
|
126
|
+
|
|
127
|
+
允许的使用方式:
|
|
128
|
+
|
|
129
|
+
- 可用于闭源项目或商业项目。
|
|
130
|
+
- 可以 fork、本项目改进,并保持 fork 开源且免费。
|
|
131
|
+
|
|
132
|
+
限制:
|
|
133
|
+
|
|
134
|
+
- 禁止直接出售本项目,或仅改名、稍作修改后将其作为竞争产品出售或推广。
|
|
135
|
+
- 禁止将本项目用于黑客攻击、未授权访问、恶意软件、欺诈或其他违法活动。
|
|
136
|
+
- 任何使用 ok-script 的项目,都必须在项目网站、GitHub 或软件本身至少一处提及并链接 [ok-script.com](https://ok-script.com/) 或 [ok-script GitHub](https://github.com/ok-oldking/ok-script)。
|
|
137
|
+
- Qt UI 的使用还必须遵守 [PyQt-Fluent-Widgets](https://github.com/zhiyiYo/PyQt-Fluent-Widgets) 的许可证。
|
|
@@ -287,6 +287,7 @@ class App(_OverlayConfigMixin):
|
|
|
287
287
|
from ok.ui.qt.util.app import init_app_config
|
|
288
288
|
self.app, self.locale = init_app_config()
|
|
289
289
|
install_qt_event_dispatcher()
|
|
290
|
+
self.app.aboutToQuit.connect(self._close_device_manager)
|
|
290
291
|
if task_executor is not None:
|
|
291
292
|
task_executor.locale = self.locale
|
|
292
293
|
task_executor.load_tr()
|
|
@@ -335,9 +336,16 @@ class App(_OverlayConfigMixin):
|
|
|
335
336
|
if self.overlay_window is not None:
|
|
336
337
|
self.overlay_window.close()
|
|
337
338
|
self.exit_event.set()
|
|
339
|
+
self._close_device_manager()
|
|
338
340
|
from PySide6.QtCore import QMetaObject, Qt
|
|
339
341
|
QMetaObject.invokeMethod(self.app, "quit", Qt.QueuedConnection)
|
|
340
342
|
|
|
343
|
+
@staticmethod
|
|
344
|
+
def _close_device_manager():
|
|
345
|
+
device_manager = getattr(og, 'device_manager', None)
|
|
346
|
+
if device_manager is not None:
|
|
347
|
+
device_manager.close()
|
|
348
|
+
|
|
341
349
|
def tr(self, key):
|
|
342
350
|
from PySide6.QtCore import QCoreApplication
|
|
343
351
|
|
|
@@ -129,6 +129,16 @@ class DeviceManager:
|
|
|
129
129
|
if self.hwnd_window.exe_full_path:
|
|
130
130
|
kill_exe(abs_path=self.hwnd_window.exe_full_path)
|
|
131
131
|
|
|
132
|
+
def close(self):
|
|
133
|
+
"""Stop capture resources before Qt/Python teardown begins."""
|
|
134
|
+
capture_method = self.capture_method
|
|
135
|
+
self.capture_method = None
|
|
136
|
+
if capture_method is not None:
|
|
137
|
+
try:
|
|
138
|
+
capture_method.close()
|
|
139
|
+
except Exception as e:
|
|
140
|
+
logger.error(f'capture method close failed: {e}')
|
|
141
|
+
|
|
132
142
|
def select_hwnd(self, exe, hwnd):
|
|
133
143
|
self.config['selected_exe'] = exe
|
|
134
144
|
self.config['selected_hwnd'] = hwnd
|
|
@@ -8,6 +8,7 @@ from ok.device.capture_methods.bitblt_utils import (
|
|
|
8
8
|
capture_by_bitblt,
|
|
9
9
|
capture_desktop_by_bitblt,
|
|
10
10
|
clean_up_desktop_bitblt,
|
|
11
|
+
clean_up_bitblt,
|
|
11
12
|
composite_hwnds,
|
|
12
13
|
get_crop_point,
|
|
13
14
|
)
|
|
@@ -58,6 +59,19 @@ class BitBltCaptureMethod(BaseWindowsCaptureMethod):
|
|
|
58
59
|
def get_name(self):
|
|
59
60
|
return f'BitBlt_{render_full}'
|
|
60
61
|
|
|
62
|
+
def close(self):
|
|
63
|
+
"""Release all GDI objects before the interpreter starts shutting down.
|
|
64
|
+
|
|
65
|
+
BitBlt contexts are used by the main capture and by any child windows
|
|
66
|
+
composited on top of it. Leaving them for Python/pywin32 finalization
|
|
67
|
+
can race with the capture thread and cause a native access violation.
|
|
68
|
+
"""
|
|
69
|
+
with self.lock:
|
|
70
|
+
clean_up_bitblt(self)
|
|
71
|
+
for context in self.contexts.values():
|
|
72
|
+
clean_up_bitblt(context)
|
|
73
|
+
self.contexts.clear()
|
|
74
|
+
|
|
61
75
|
def test_exclusive_full_screen(self):
|
|
62
76
|
frame = self.do_get_frame()
|
|
63
77
|
if frame is None:
|
|
@@ -10,7 +10,12 @@ from ok.util.window import WINDOWS_BUILD_NUMBER, WGC_NO_BORDER_MIN_BUILD
|
|
|
10
10
|
|
|
11
11
|
from ok.device.capture_methods import bitblt
|
|
12
12
|
from ok.device.capture_methods.base import BaseWindowsCaptureMethod
|
|
13
|
-
from ok.device.capture_methods.bitblt_utils import
|
|
13
|
+
from ok.device.capture_methods.bitblt_utils import (
|
|
14
|
+
PBYTE,
|
|
15
|
+
clean_up_bitblt,
|
|
16
|
+
composite_hwnds,
|
|
17
|
+
get_crop_point,
|
|
18
|
+
)
|
|
14
19
|
|
|
15
20
|
logger = Logger.get_logger(__name__)
|
|
16
21
|
|
|
@@ -24,7 +29,9 @@ class WindowsGraphicsCaptureMethod(BaseWindowsCaptureMethod):
|
|
|
24
29
|
def __init__(self, hwnd_window):
|
|
25
30
|
super().__init__(hwnd_window)
|
|
26
31
|
self.lock = threading.RLock()
|
|
27
|
-
|
|
32
|
+
# close() may be requested by start_or_stop() while _do_get_frame()
|
|
33
|
+
# already owns this lock (for example after a target-window change).
|
|
34
|
+
self.get_frame_lock = threading.RLock()
|
|
28
35
|
self.frame_event = threading.Event()
|
|
29
36
|
self.frame_requested = threading.Event()
|
|
30
37
|
self.last_frame_time = time.time()
|
|
@@ -247,31 +254,38 @@ class WindowsGraphicsCaptureMethod(BaseWindowsCaptureMethod):
|
|
|
247
254
|
self.evtoken = None
|
|
248
255
|
|
|
249
256
|
def close(self):
|
|
250
|
-
with
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
self.
|
|
257
|
-
|
|
258
|
-
self.
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
self.
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
self.
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
self.
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
257
|
+
# _do_get_frame() composites child windows with BitBlt after receiving
|
|
258
|
+
# the WGC frame. Serialize close with that whole request so its GDI
|
|
259
|
+
# contexts cannot be released while composite_hwnds() is using them.
|
|
260
|
+
with self.get_frame_lock:
|
|
261
|
+
with self.lock:
|
|
262
|
+
logger.info('destroy windows capture')
|
|
263
|
+
self.frame_requested.clear()
|
|
264
|
+
self.frame_event.set()
|
|
265
|
+
if self.frame_pool is not None:
|
|
266
|
+
self.frame_pool.Close()
|
|
267
|
+
self.frame_pool = None
|
|
268
|
+
if self.session is not None:
|
|
269
|
+
self.session.Close()
|
|
270
|
+
self.session = None
|
|
271
|
+
self.item = None
|
|
272
|
+
if self.rtdevice:
|
|
273
|
+
self.rtdevice.Release()
|
|
274
|
+
self.rtdevice = None
|
|
275
|
+
if self.dxdevice:
|
|
276
|
+
self.dxdevice.Release()
|
|
277
|
+
self.dxdevice = None
|
|
278
|
+
if self.immediatedc:
|
|
279
|
+
self.immediatedc.Release()
|
|
280
|
+
self.immediatedc = None
|
|
281
|
+
if self.cputex:
|
|
282
|
+
self.cputex.Release()
|
|
283
|
+
self.cputex = None
|
|
284
|
+
for context in self.contexts.values():
|
|
285
|
+
clean_up_bitblt(context)
|
|
286
|
+
self.contexts.clear()
|
|
287
|
+
self.capture_hwnd = 0
|
|
288
|
+
self.capture_target_signature = None
|
|
275
289
|
|
|
276
290
|
def do_get_frame(self):
|
|
277
291
|
# frame_requested and last_frame represent one in-flight request. Keep
|
|
@@ -46,6 +46,7 @@ logger = Logger.get_logger(__name__)
|
|
|
46
46
|
|
|
47
47
|
NAVIGATION_EXPAND_MAX_WIDTH = 240
|
|
48
48
|
NAVIGATION_EXPAND_FIT_PADDING = 23
|
|
49
|
+
DEFAULT_THEME_COLOR = qconfig.themeColor.defaultValue
|
|
49
50
|
|
|
50
51
|
|
|
51
52
|
def update_check_delay_ms():
|
|
@@ -62,6 +63,7 @@ class MainWindow(FluentWindow):
|
|
|
62
63
|
self.stackedWidget.setAnimationEnabled(False)
|
|
63
64
|
self._theme_cooldowns = set()
|
|
64
65
|
logger.info('main window __init__')
|
|
66
|
+
self._configured_theme_color = DEFAULT_THEME_COLOR
|
|
65
67
|
self._sync_system_accent_color(refresh=True)
|
|
66
68
|
qconfig.themeChanged.connect(self._on_theme_changed)
|
|
67
69
|
navigation_scroll_area = self.navigationInterface.panel.scrollArea
|
|
@@ -323,6 +325,15 @@ class MainWindow(FluentWindow):
|
|
|
323
325
|
return QColor(red, green, blue)
|
|
324
326
|
|
|
325
327
|
def _sync_system_accent_color(self, refresh=False):
|
|
328
|
+
if qconfig.themeMode.value != Theme.AUTO:
|
|
329
|
+
configured_color = getattr(self, '_configured_theme_color', None)
|
|
330
|
+
if configured_color is None or qconfig.get(qconfig.themeColor) == configured_color:
|
|
331
|
+
return False
|
|
332
|
+
qconfig.set(qconfig.themeColor, configured_color, save=False)
|
|
333
|
+
if refresh:
|
|
334
|
+
updateStyleSheet()
|
|
335
|
+
return True
|
|
336
|
+
|
|
326
337
|
color = self.get_system_primary_theme_color()
|
|
327
338
|
if color is None or color == qconfig.get(qconfig.themeColor):
|
|
328
339
|
return False
|
|
@@ -28,8 +28,10 @@ class AboutTab(Tab):
|
|
|
28
28
|
|
|
29
29
|
self.update_card = None
|
|
30
30
|
if callable(getattr(pyappify_module, 'get_version_list', None)):
|
|
31
|
+
links = config.get('links') or {}
|
|
31
32
|
self.update_card = UpdateCard(
|
|
32
|
-
config.get('version'), pyappify_module, self, exit_event=exit_event
|
|
33
|
+
config.get('version'), pyappify_module, self, exit_event=exit_event,
|
|
34
|
+
download_url=get_localized_app_config(links, 'download'),
|
|
33
35
|
)
|
|
34
36
|
self.add_card(self.tr("App update"), self.update_card)
|
|
35
37
|
else:
|
|
@@ -54,16 +56,16 @@ class AboutTab(Tab):
|
|
|
54
56
|
self.add_card(self.tr("Disclaimer"), about_label)
|
|
55
57
|
|
|
56
58
|
projects = [
|
|
57
|
-
{"name":
|
|
58
|
-
{"name": self.tr("ok-script App Template"), "url": "https://github.com/ok-oldking/ok-script-app"},
|
|
59
|
-
{"name": self.tr("Wuthering Waves"), "url": "https://github.com/ok-oldking/ok-wuthering-waves"},
|
|
59
|
+
{"name": "ok-script", "url": "https://github.com/ok-oldking/ok-script", "website": "https://ok-script.com/"},
|
|
60
|
+
{"name": self.tr("ok-script App Template"), "url": "https://github.com/ok-oldking/ok-script-app", "website": "https://app.ok-script.com/"},
|
|
61
|
+
{"name": self.tr("Wuthering Waves"), "url": "https://github.com/ok-oldking/ok-wuthering-waves", "website": "https://ok-ww.ok-script.com/"},
|
|
60
62
|
{"name": self.tr("Girls' Frontline 2"), "url": "https://github.com/ok-oldking/ok-gf2"},
|
|
61
|
-
{"name": self.tr("Star Resonance"), "url": "https://github.com/Sanheiii/ok-star-resonance"},
|
|
63
|
+
{"name": self.tr("Star Resonance"), "url": "https://github.com/Sanheiii/ok-star-resonance", "website": "https://ok-script.com/ok-star-resonance/"},
|
|
62
64
|
{"name": self.tr("Duet Night Abyss"), "url": "https://github.com/BnanZ0/ok-duet-night-abyss"},
|
|
63
|
-
{"name": self.tr("Chaos Zero Nightmare"), "url": "https://github.com/baoxin1100/ok-kes"},
|
|
64
|
-
{"name": self.tr("Onmyoji"), "url": "https://github.com/YunLiuZ/ok-Onmyoji"},
|
|
65
|
-
{"name": self.tr("Arknights: Endfield"), "url": "https://github.com/AliceJump/ok-end-field"},
|
|
66
|
-
{"name": self.tr("Neverness to Everness"), "url": "https://github.com/BnanZ0/ok-neverness-to-everness"},
|
|
65
|
+
{"name": self.tr("Chaos Zero Nightmare"), "url": "https://github.com/baoxin1100/ok-kes", "website": "https://ok-script.com/ok-kes/"},
|
|
66
|
+
{"name": self.tr("Onmyoji"), "url": "https://github.com/YunLiuZ/ok-Onmyoji", "website": "https://ok-script.com/ok-onmyoji/"},
|
|
67
|
+
{"name": self.tr("Arknights: Endfield"), "url": "https://github.com/AliceJump/ok-end-field", "website": "https://ok-script.com/ok-end-field/"},
|
|
68
|
+
{"name": self.tr("Neverness to Everness"), "url": "https://github.com/BnanZ0/ok-neverness-to-everness", "website": "https://ok-script.com/ok-nte/"},
|
|
67
69
|
]
|
|
68
70
|
|
|
69
71
|
def normalize_url(url):
|
|
@@ -82,10 +84,12 @@ class AboutTab(Tab):
|
|
|
82
84
|
grid_layout.setContentsMargins(0, 0, 0, 0)
|
|
83
85
|
grid_layout.setHorizontalSpacing(12)
|
|
84
86
|
grid_layout.setVerticalSpacing(12)
|
|
87
|
+
grid_layout.setColumnStretch(0, 1)
|
|
88
|
+
grid_layout.setColumnStretch(1, 1)
|
|
85
89
|
grid_layout.setAlignment(Qt.AlignTop)
|
|
86
90
|
|
|
87
91
|
for i, project in enumerate(filtered_projects):
|
|
88
|
-
card = ProjectCard(project['name'], project['url'], grid_widget)
|
|
92
|
+
card = ProjectCard(project['name'], project['url'], project.get('website'), grid_widget)
|
|
89
93
|
grid_layout.addWidget(card, i // 2, i % 2)
|
|
90
94
|
|
|
91
95
|
self.group = self.add_card(self.tr("Other Projects"), grid_widget)
|
|
@@ -25,6 +25,12 @@ class LinksBar(QWidget):
|
|
|
25
25
|
self.github_button.clicked.connect(lambda: QDesktopServices.openUrl(QUrl(github_url)))
|
|
26
26
|
self.layout.addWidget(self.github_button, alignment=Qt.AlignRight, stretch=0)
|
|
27
27
|
|
|
28
|
+
download_url = self.get_url('download')
|
|
29
|
+
if download_url:
|
|
30
|
+
self.download_button = PushButton(self.tr("Download"), icon=FluentIcon.DOWNLOAD)
|
|
31
|
+
self.download_button.clicked.connect(lambda: self.open_url('download'))
|
|
32
|
+
self.layout.addWidget(self.download_button, alignment=Qt.AlignRight, stretch=0)
|
|
33
|
+
|
|
28
34
|
if self.get_url('discord'):
|
|
29
35
|
self.discord_button = PushButton(self.tr("Discord"), icon=OKIcon.DISCORD)
|
|
30
36
|
self.discord_button.clicked.connect(lambda: self.open_url('discord'))
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
from PySide6.QtCore import QUrl, Qt
|
|
2
|
+
from PySide6.QtGui import QDesktopServices, QFontMetrics
|
|
3
|
+
from PySide6.QtWidgets import QSizePolicy
|
|
4
|
+
from qfluentwidgets import SettingCard, FluentIcon, PushButton
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class ProjectCard(SettingCard):
|
|
8
|
+
def __init__(self, name, url, website=None, parent=None):
|
|
9
|
+
super().__init__(FluentIcon.GITHUB, name, url)
|
|
10
|
+
self.setParent(parent)
|
|
11
|
+
self.url = url
|
|
12
|
+
self.iconLabel.hide() # Remove icon as per user request
|
|
13
|
+
self.contentLabel.setMinimumWidth(0)
|
|
14
|
+
self.contentLabel.setMaximumWidth(150)
|
|
15
|
+
self.contentLabel.setSizePolicy(QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Preferred)
|
|
16
|
+
self.contentLabel.setText(QFontMetrics(self.contentLabel.font()).elidedText(
|
|
17
|
+
url, Qt.TextElideMode.ElideMiddle, 320
|
|
18
|
+
))
|
|
19
|
+
self.contentLabel.setToolTip(url)
|
|
20
|
+
self.setMinimumWidth(0)
|
|
21
|
+
self.setSizePolicy(QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Fixed)
|
|
22
|
+
for label in (self.titleLabel, self.contentLabel):
|
|
23
|
+
font = label.font()
|
|
24
|
+
font.setPointSize(7)
|
|
25
|
+
label.setFont(font)
|
|
26
|
+
self.hBoxLayout.setSpacing(6)
|
|
27
|
+
self.github_button = PushButton(self.tr("GitHub"), self, icon=FluentIcon.GITHUB)
|
|
28
|
+
self.github_button.clicked.connect(self.open_url)
|
|
29
|
+
self.hBoxLayout.addWidget(self.github_button)
|
|
30
|
+
self.website = website
|
|
31
|
+
if website:
|
|
32
|
+
self.download_button = PushButton(self.tr("Download"), self, icon=FluentIcon.DOWNLOAD)
|
|
33
|
+
self.download_button.clicked.connect(self.open_website)
|
|
34
|
+
self.hBoxLayout.addWidget(self.download_button)
|
|
35
|
+
self.hBoxLayout.addSpacing(11)
|
|
36
|
+
self.setFixedHeight(72)
|
|
37
|
+
|
|
38
|
+
def open_url(self):
|
|
39
|
+
QDesktopServices.openUrl(QUrl(self.url))
|
|
40
|
+
|
|
41
|
+
def open_website(self):
|
|
42
|
+
QDesktopServices.openUrl(QUrl(self.website))
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import os
|
|
2
2
|
import threading
|
|
3
3
|
|
|
4
|
-
from PySide6.QtCore import QEvent, Signal, Qt
|
|
5
|
-
from PySide6.QtGui import QFontMetrics, QIcon, QPixmap
|
|
4
|
+
from PySide6.QtCore import QEvent, QUrl, Signal, Qt
|
|
5
|
+
from PySide6.QtGui import QDesktopServices, QFontMetrics, QIcon, QPixmap
|
|
6
6
|
from PySide6.QtWidgets import QHBoxLayout, QSizePolicy, QVBoxLayout, QWidget
|
|
7
7
|
from qfluentwidgets import BodyLabel, CheckBox, ComboBox, FluentIcon, IndeterminateProgressRing, \
|
|
8
8
|
PrimaryPushButton, PushButton
|
|
@@ -51,7 +51,7 @@ class UpdateCard(QWidget):
|
|
|
51
51
|
VERSION_COMBO_MIN_WIDTH = 100
|
|
52
52
|
VERSION_COMBO_MAX_WIDTH = 240
|
|
53
53
|
|
|
54
|
-
def __init__(self, current_version, pyappify_module, parent=None, exit_event=None):
|
|
54
|
+
def __init__(self, current_version, pyappify_module, parent=None, exit_event=None, download_url=None):
|
|
55
55
|
super().__init__(parent)
|
|
56
56
|
self.current_version = current_version or getattr(pyappify_module, "app_version", None) or ""
|
|
57
57
|
if "PYAPPIFY_PYTHON_TEST" in os.environ and not _is_numeric_version(self.current_version):
|
|
@@ -59,6 +59,7 @@ class UpdateCard(QWidget):
|
|
|
59
59
|
self.current_version = "v0.0.0"
|
|
60
60
|
self.pyappify_module = pyappify_module
|
|
61
61
|
self.exit_event = exit_event
|
|
62
|
+
self.download_url = download_url
|
|
62
63
|
self.versions = []
|
|
63
64
|
self._busy = False
|
|
64
65
|
logger.info(
|
|
@@ -88,15 +89,27 @@ class UpdateCard(QWidget):
|
|
|
88
89
|
self.update_button = PrimaryPushButton(FluentIcon.UPDATE, self.tr("Update"), self)
|
|
89
90
|
self.update_button.clicked.connect(self.update_to_selected_version)
|
|
90
91
|
self.update_button.setEnabled(False)
|
|
92
|
+
self.download_button = PrimaryPushButton(self.tr("Download"), self, icon=FluentIcon.DOWNLOAD)
|
|
93
|
+
self.download_button.clicked.connect(lambda: QDesktopServices.openUrl(QUrl(self.download_url)))
|
|
94
|
+
self.download_button.hide()
|
|
91
95
|
|
|
92
96
|
self.controls_layout = QHBoxLayout()
|
|
93
|
-
self.controls_layout.setContentsMargins(0, 0,
|
|
97
|
+
self.controls_layout.setContentsMargins(0, 0, 11, 0)
|
|
98
|
+
self.controls_layout.setSpacing(6)
|
|
94
99
|
self.version_label = BodyLabel(self.tr("Version"), self)
|
|
95
100
|
self.status_label = BodyLabel(self.tr("Click to check for updates"), self)
|
|
101
|
+
self.status_label.setWordWrap(True)
|
|
102
|
+
self.status_label.setTextFormat(Qt.TextFormat.PlainText)
|
|
103
|
+
self.status_label.setMinimumWidth(0)
|
|
104
|
+
self.status_label.setMaximumWidth(300)
|
|
105
|
+
status_size_policy = QSizePolicy(QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Preferred)
|
|
106
|
+
status_size_policy.setHeightForWidth(True)
|
|
107
|
+
self.status_label.setSizePolicy(status_size_policy)
|
|
96
108
|
self.controls_layout.addWidget(self.version_label)
|
|
97
109
|
self.controls_layout.addWidget(self.version_combo)
|
|
98
110
|
self.controls_layout.addWidget(self.status_label)
|
|
99
111
|
self.controls_layout.addStretch(1)
|
|
112
|
+
self.controls_layout.addWidget(self.download_button)
|
|
100
113
|
self.controls_layout.addWidget(self.test_version_checkbox)
|
|
101
114
|
self.controls_layout.addWidget(self.check_button)
|
|
102
115
|
self.controls_layout.addWidget(self.update_button)
|
|
@@ -300,7 +313,9 @@ class UpdateCard(QWidget):
|
|
|
300
313
|
|
|
301
314
|
def _set_status(self, message, error=False):
|
|
302
315
|
self.status_label.setText(message)
|
|
316
|
+
self.status_label.setToolTip(message if error else "")
|
|
303
317
|
self.status_label.setStyleSheet("color: #d13438;" if error else "")
|
|
318
|
+
self.download_button.setVisible(error and bool(self.download_url))
|
|
304
319
|
|
|
305
320
|
def _compare_versions(self, left, right):
|
|
306
321
|
if left == right:
|
|
@@ -10,6 +10,10 @@ class VersionCard(SettingCard):
|
|
|
10
10
|
super().__init__(icon, title, f'{version} {self.get_type(debug)}')
|
|
11
11
|
links_bar = LinksBar(config)
|
|
12
12
|
self.iconLabel.setFixedSize(36, 36)
|
|
13
|
+
for label in (self.titleLabel, self.contentLabel):
|
|
14
|
+
font = label.font()
|
|
15
|
+
font.setPointSize(7)
|
|
16
|
+
label.setFont(font)
|
|
13
17
|
self.hBoxLayout.addWidget(links_bar)
|
|
14
18
|
|
|
15
19
|
def get_type(self, debug=None):
|
|
@@ -314,6 +314,10 @@
|
|
|
314
314
|
<source>Share Link copied to clipboard</source>
|
|
315
315
|
<translation>Share Link copied to clipboard</translation>
|
|
316
316
|
</message>
|
|
317
|
+
<message>
|
|
318
|
+
<source>Download</source>
|
|
319
|
+
<translation>Download</translation>
|
|
320
|
+
</message>
|
|
317
321
|
</context>
|
|
318
322
|
<context>
|
|
319
323
|
<name>LogWindow</name>
|
|
@@ -3727,5 +3731,16 @@
|
|
|
3727
3731
|
<source>Failed to calculate update notes: {error}</source>
|
|
3728
3732
|
<translation>Failed to calculate update notes: {error}</translation>
|
|
3729
3733
|
</message>
|
|
3734
|
+
<message>
|
|
3735
|
+
<source>Download</source>
|
|
3736
|
+
<translation>Download</translation>
|
|
3737
|
+
</message>
|
|
3738
|
+
</context>
|
|
3739
|
+
<context>
|
|
3740
|
+
<name>ProjectCard</name>
|
|
3741
|
+
<message>
|
|
3742
|
+
<source>Download</source>
|
|
3743
|
+
<translation>Download</translation>
|
|
3744
|
+
</message>
|
|
3730
3745
|
</context>
|
|
3731
3746
|
</TS>
|