Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0edcbacbd5 | ||
|
|
a1570a9ec2
|
||
|
|
92ee2f82c8
|
||
|
|
adc7febca3
|
||
|
|
2bcd61484d | ||
|
|
7ba2d69214 | ||
|
|
e8671d8f0a
|
||
|
|
8065b091df
|
||
|
|
238a68763e
|
||
|
|
1a6ed965a5
|
||
|
|
c227fcf673 | ||
|
|
e39e613cf7
|
||
|
|
ac378452a8 | ||
|
|
280253c3ba | ||
|
|
abb6b4ae20 | ||
|
|
6db1b4c2a1 | ||
|
|
1908464811
|
||
|
|
67484ec2ce
|
||
|
|
2dd57b90e5 | ||
|
|
18453dd2d3
|
||
|
|
179e94e128
|
||
|
|
f243521e20
|
||
|
|
2a3ec3976f | ||
|
|
93540054ab
|
||
|
|
ef8377e4fc
|
||
|
|
ddd2aae297 | ||
|
|
9908ab2acd
|
||
|
|
fbc143ece4 | ||
|
|
36b0d30694
|
||
|
|
2068bce02d
|
||
|
|
14f8826820
|
||
|
|
388f11853a
|
||
|
|
7e0551d7e0
|
||
|
|
f330c5545c
|
||
|
|
a9b0c40e38
|
||
|
|
5093581a6f
|
||
|
|
7f6158e7b7
|
||
|
|
4bef2b16c5 | ||
|
|
c7fedf3e14
|
||
|
|
1951e8a377
|
||
|
|
9b8e00e677
|
||
|
|
e2b7dd7368
|
||
|
|
b49e6ed328 | ||
|
|
63287b731b | ||
|
|
cc81a9935d | ||
|
|
f2d5f7f041 | ||
|
|
10690a0a84 | ||
|
|
d3d0a81166 | ||
|
|
ca1f006e03 | ||
|
|
7a99bbf76a | ||
|
|
c5305f4dcd | ||
|
|
7f28367373 | ||
|
|
e42d69da89 | ||
|
|
edb41928da | ||
|
|
4e6ddbc5db | ||
|
|
1c14204f89 | ||
|
|
393f2cecbb | ||
|
|
cef383131c | ||
|
|
6aa52c6afc | ||
|
|
c03693e4af |
No files matched your search
@@ -0,0 +1,48 @@
|
||||
{
|
||||
"version": 1,
|
||||
"isRoot": true,
|
||||
"tools": {
|
||||
"vpk": {
|
||||
"version": "1.2.161",
|
||||
"commands": [
|
||||
"vpk"
|
||||
],
|
||||
"rollForward": false
|
||||
},
|
||||
"jetbrains.resharper.globaltools": {
|
||||
"version": "2026.2.4",
|
||||
"commands": [
|
||||
"jb"
|
||||
],
|
||||
"rollForward": false
|
||||
},
|
||||
"nuget-license": {
|
||||
"version": "4.0.18",
|
||||
"commands": [
|
||||
"nuget-license"
|
||||
],
|
||||
"rollForward": false
|
||||
},
|
||||
"microsoft.sbom.dotnettool": {
|
||||
"version": "4.1.13",
|
||||
"commands": [
|
||||
"sbom-tool"
|
||||
],
|
||||
"rollForward": false
|
||||
},
|
||||
"dotnet-reportgenerator-globaltool": {
|
||||
"version": "5.5.12",
|
||||
"commands": [
|
||||
"reportgenerator"
|
||||
],
|
||||
"rollForward": false
|
||||
},
|
||||
"dotnet-sonarscanner": {
|
||||
"version": "12.0.0",
|
||||
"commands": [
|
||||
"dotnet-sonarscanner"
|
||||
],
|
||||
"rollForward": false
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[*.{csproj,props,targets,slnx,resx,json,yml,yaml,config,wsb}]
|
||||
indent_size = 2
|
||||
|
||||
[*.md]
|
||||
trim_trailing_whitespace = false
|
||||
|
||||
[*.cs]
|
||||
# Layout
|
||||
csharp_style_namespace_declarations = file_scoped:warning
|
||||
csharp_new_line_before_open_brace = all
|
||||
csharp_indent_case_contents = true
|
||||
csharp_indent_switch_labels = true
|
||||
csharp_preserve_single_line_statements = false
|
||||
csharp_preserve_single_line_blocks = true
|
||||
csharp_using_directive_placement = outside_namespace:warning
|
||||
dotnet_sort_system_directives_first = true
|
||||
dotnet_separate_import_directive_groups = false
|
||||
|
||||
# Style preferences (informational)
|
||||
csharp_style_var_for_built_in_types = true:silent
|
||||
csharp_style_var_when_type_is_apparent = true:silent
|
||||
csharp_style_var_elsewhere = true:silent
|
||||
csharp_prefer_braces = when_multiline:silent
|
||||
csharp_style_expression_bodied_methods = when_on_single_line:silent
|
||||
csharp_style_expression_bodied_properties = true:silent
|
||||
csharp_style_prefer_primary_constructors = true:silent
|
||||
dotnet_style_qualification_for_field = false:silent
|
||||
dotnet_style_qualification_for_property = false:silent
|
||||
dotnet_style_qualification_for_method = false:silent
|
||||
dotnet_style_qualification_for_event = false:silent
|
||||
|
||||
# Naming: private instance fields are _camelCase
|
||||
dotnet_naming_rule.private_fields_underscore.severity = suggestion
|
||||
dotnet_naming_rule.private_fields_underscore.symbols = private_instance_fields
|
||||
dotnet_naming_rule.private_fields_underscore.style = underscore_camel_case
|
||||
dotnet_naming_symbols.private_instance_fields.applicable_kinds = field
|
||||
dotnet_naming_symbols.private_instance_fields.applicable_accessibilities = private
|
||||
dotnet_naming_style.underscore_camel_case.required_prefix = _
|
||||
dotnet_naming_style.underscore_camel_case.capitalization = camel_case
|
||||
|
||||
# Dead code and unused declarations: enforced (CI builds treat warnings as errors)
|
||||
dotnet_diagnostic.IDE0005.severity = warning # unnecessary using directive
|
||||
dotnet_diagnostic.IDE0035.severity = warning # unreachable code
|
||||
dotnet_diagnostic.IDE0051.severity = warning # unused private member
|
||||
dotnet_diagnostic.IDE0052.severity = warning # unread private member
|
||||
dotnet_diagnostic.IDE0059.severity = warning # unnecessary value assignment
|
||||
dotnet_diagnostic.IDE0060.severity = warning # unused parameter
|
||||
dotnet_diagnostic.IDE0161.severity = warning # file-scoped namespace
|
||||
dotnet_diagnostic.CA1823.severity = warning # unused private field
|
||||
|
||||
# DI- and XAML-created types look "never instantiated" to CA1812.
|
||||
dotnet_diagnostic.CA1812.severity = none
|
||||
# Logging: plain ILogger calls are fine for this app's log volume.
|
||||
dotnet_diagnostic.CA1848.severity = none
|
||||
dotnet_diagnostic.CA1873.severity = none
|
||||
@@ -0,0 +1,22 @@
|
||||
# Normalize line endings in the repository; check out with the platform default.
|
||||
* text=auto
|
||||
|
||||
*.sh text eol=lf
|
||||
*.cs text diff=csharp
|
||||
*.md text diff=markdown
|
||||
*.xaml text
|
||||
*.resx text
|
||||
*.props text
|
||||
*.csproj text
|
||||
*.slnx text
|
||||
*.json text
|
||||
*.yml text
|
||||
*.ps1 text
|
||||
|
||||
*.ico binary
|
||||
*.png binary
|
||||
*.jpg binary
|
||||
*.exe binary
|
||||
*.dll binary
|
||||
*.nupkg binary
|
||||
*.zip binary
|
||||
@@ -0,0 +1,115 @@
|
||||
name: Accessibility Barrier
|
||||
description: Something in AutoClick or its documentation is hard or impossible to use with a keyboard, a screen reader, a contrast theme, scaling or other assistive technology.
|
||||
title: "[Accessibility]: "
|
||||
labels: ["accessibility"]
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Thank you for telling us. Accessibility barriers are triaged before other bugs; see the [Accessibility statement](https://github.com/poli0981/autoclick/blob/master/docs/ACCESSIBILITY.md) for what is already known and how we respond.
|
||||
|
||||
You never need to explain a disability or share personal information. Only the first three fields are required; fill in what you can. You may also write in your own words instead of using the fields.
|
||||
|
||||
- type: textarea
|
||||
id: barrier
|
||||
attributes:
|
||||
label: What were you trying to do, and what went wrong?
|
||||
description: The task, and where it failed or became hard.
|
||||
placeholder: |
|
||||
I tried to add a step with the keyboard only.
|
||||
After pressing Add step, ... happened.
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: steps
|
||||
attributes:
|
||||
label: Steps to reproduce
|
||||
placeholder: |
|
||||
1. Open the Queue page
|
||||
2. Press Tab until ...
|
||||
3. ...
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: expected
|
||||
attributes:
|
||||
label: What did you expect instead?
|
||||
placeholder: "Narrator reads the name of the button / the focus moves to ..."
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: dropdown
|
||||
id: severity
|
||||
attributes:
|
||||
label: How much does it affect you?
|
||||
description: The levels are explained in the Accessibility statement.
|
||||
options:
|
||||
- "Critical: I cannot do the task at all"
|
||||
- "Serious: very hard, but I found a workaround"
|
||||
- "Moderate: annoying or inconsistent"
|
||||
- "Minor: little effect"
|
||||
- "Not sure"
|
||||
validations:
|
||||
required: false
|
||||
|
||||
- type: input
|
||||
id: assistive-technology
|
||||
attributes:
|
||||
label: Assistive technology and version
|
||||
description: For example Narrator, NVDA 2026.2, JAWS 2026, Magnifier, Voice Access, a switch device, or "none".
|
||||
placeholder: "Narrator (Windows 11 24H2)"
|
||||
validations:
|
||||
required: false
|
||||
|
||||
- type: checkboxes
|
||||
id: input
|
||||
attributes:
|
||||
label: How do you use the computer?
|
||||
description: Select all that apply.
|
||||
options:
|
||||
- label: Keyboard only
|
||||
- label: Screen reader
|
||||
- label: Screen magnifier or large display scaling
|
||||
- label: Contrast theme or the High contrast theme
|
||||
- label: Speech or voice control
|
||||
- label: Switch or other alternative input
|
||||
validations:
|
||||
required: false
|
||||
|
||||
- type: input
|
||||
id: version
|
||||
attributes:
|
||||
label: AutoClick version
|
||||
description: Shown on the About page.
|
||||
placeholder: "2.1.0"
|
||||
validations:
|
||||
required: false
|
||||
|
||||
- type: input
|
||||
id: os-version
|
||||
attributes:
|
||||
label: Windows version
|
||||
description: Settings > System > About.
|
||||
placeholder: "Windows 11 Pro 24H2 (Build 26100.1234)"
|
||||
validations:
|
||||
required: false
|
||||
|
||||
- type: input
|
||||
id: display
|
||||
attributes:
|
||||
label: Theme and display
|
||||
description: AutoClick theme, Windows contrast theme, display scale, text size, animation effects (whatever seems related).
|
||||
placeholder: "AutoClick theme: Use Windows setting; Windows: Night sky contrast theme, 150% scale"
|
||||
validations:
|
||||
required: false
|
||||
|
||||
- type: textarea
|
||||
id: recording
|
||||
attributes:
|
||||
label: Recording or screenshot
|
||||
description: Optional. A screen recording with the screen reader's speech helps a lot. Window titles in recordings and logs can contain personal text; remove it before posting.
|
||||
placeholder: "Drag and drop files here"
|
||||
validations:
|
||||
required: false
|
||||
@@ -14,6 +14,8 @@ body:
|
||||
|
||||
You may use this template or write your own, as long as required fields (Description, OS Version, Reason, Game) are included.
|
||||
|
||||
Hard or impossible to use with a keyboard, a screen reader, a contrast theme or other assistive technology? Use the [Accessibility Barrier](https://github.com/poli0981/autoclick/issues/new?template=accessibility.yml) form instead: it needs no game link.
|
||||
|
||||
- type: textarea
|
||||
id: description
|
||||
attributes:
|
||||
@@ -31,6 +33,38 @@ body:
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: input
|
||||
id: version
|
||||
attributes:
|
||||
label: AutoClick Version
|
||||
description: Shown on the About page (for example 2.0.0).
|
||||
placeholder: "2.0.0"
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: dropdown
|
||||
id: install-source
|
||||
attributes:
|
||||
label: Installed From
|
||||
options:
|
||||
- Installer (AutoClick-win-Setup.exe)
|
||||
- Portable zip (AutoClick-win-Portable.zip)
|
||||
- Built from source
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: dropdown
|
||||
id: elevation
|
||||
attributes:
|
||||
label: Does the game run as administrator?
|
||||
description: Windows blocks clicks into games that run as administrator unless AutoClick does too.
|
||||
options:
|
||||
- "No"
|
||||
- "Yes"
|
||||
- "Don't know"
|
||||
validations:
|
||||
required: false
|
||||
|
||||
- type: input
|
||||
id: os-version
|
||||
attributes:
|
||||
@@ -50,7 +84,9 @@ body:
|
||||
- label: Click not working on game window
|
||||
- label: Hotkeys not registering
|
||||
- label: Coordinate picker not accurate
|
||||
- label: Settings not saving or loading
|
||||
- label: Heatmap overlay misplaced or missing
|
||||
- label: Pixel color guard or scheduler
|
||||
- label: Settings, profiles or sessions not saving or loading
|
||||
- label: Auto-update error
|
||||
- label: UI display or theme issue
|
||||
- label: Language / translation issue
|
||||
@@ -89,7 +125,7 @@ body:
|
||||
id: log
|
||||
attributes:
|
||||
label: Log Output
|
||||
description: Paste relevant log entries from the app's log panel or exported log file (optional).
|
||||
description: Paste relevant lines from the log panel, an exported log, or %LocalAppData%\AutoClick\logs (optional). Window titles in the log can contain personal text; remove it before posting.
|
||||
render: shell
|
||||
placeholder: |
|
||||
2026-04-03 12:00:00 [ERR] ...
|
||||
@@ -101,6 +137,6 @@ body:
|
||||
attributes:
|
||||
label: IDE / Build Environment
|
||||
description: If you built from source, which IDE and .NET SDK version? (optional)
|
||||
placeholder: "JetBrains Rider 2026.1 / .NET SDK 8.0.400"
|
||||
placeholder: "JetBrains Rider 2026.2 / .NET SDK 10.0.403"
|
||||
validations:
|
||||
required: false
|
||||
@@ -0,0 +1,11 @@
|
||||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: Discussions
|
||||
url: https://github.com/poli0981/autoclick/discussions
|
||||
about: Questions, ideas, and general conversation belong here.
|
||||
- name: Discord
|
||||
url: https://discord.gg/kDM9GMu5vm
|
||||
about: Live chat with the developer and other users.
|
||||
- name: Security disclosure
|
||||
url: https://github.com/poli0981/autoclick/blob/master/docs/SECURITY.md
|
||||
about: Report security vulnerabilities privately. Do not open a public issue.
|
||||
@@ -57,7 +57,7 @@ body:
|
||||
attributes:
|
||||
label: Other Category
|
||||
description: If your request doesn't fit the categories above, describe it briefly.
|
||||
placeholder: "e.g., Support for multi-monitor setups"
|
||||
placeholder: "e.g., Stop after a number of clicks"
|
||||
validations:
|
||||
required: false
|
||||
|
||||
@@ -107,6 +107,6 @@ body:
|
||||
attributes:
|
||||
label: IDE / Build Environment
|
||||
description: If relevant, your IDE and .NET SDK version (optional).
|
||||
placeholder: "Visual Studio 2022 / .NET SDK 8.0.400"
|
||||
placeholder: "JetBrains Rider 2026.2 / .NET SDK 10.0.403"
|
||||
validations:
|
||||
required: false
|
||||
@@ -2,8 +2,6 @@
|
||||
|
||||
<!-- Required: Clearly describe what this PR does and why. -->
|
||||
|
||||
|
||||
|
||||
## Reason
|
||||
|
||||
<!-- Required: Check all that apply. -->
|
||||
@@ -21,45 +19,39 @@
|
||||
|
||||
<!-- Required: Your Windows version and build. -->
|
||||
|
||||
|
||||
|
||||
## Game Tested
|
||||
|
||||
<!-- Required: Steam/store link of the game you tested against. -->
|
||||
<!-- Required: Steam/store link of the game you tested against, or "ClickTarget" if you used tools/AutoClick.ClickTarget. -->
|
||||
<!-- Use a legitimate link. Suspicious links will cause this PR to be auto-ignored. -->
|
||||
|
||||
|
||||
|
||||
## Screenshots
|
||||
|
||||
<!-- Optional: Before/after screenshots or GIFs. -->
|
||||
|
||||
|
||||
|
||||
## Log Output
|
||||
|
||||
<!-- Optional: Relevant log entries from the app. -->
|
||||
|
||||
```
|
||||
```text
|
||||
```
|
||||
|
||||
## IDE / Build Environment
|
||||
|
||||
<!-- Optional: IDE and .NET SDK version used. -->
|
||||
|
||||
|
||||
|
||||
## Checklist
|
||||
|
||||
- [ ] Code compiles with `dotnet build` (0 errors)
|
||||
- [ ] Tested manually on at least one game
|
||||
- [ ] No hardcoded English strings (use `Strings.cs` / `.resx`)
|
||||
- [ ] New strings added to both `Strings.resx` (EN) and `Strings.vi.resx` (VI)
|
||||
- [ ] `dotnet build AutoClick.slnx` and `dotnet test --solution AutoClick.slnx` pass (see [CONTRIBUTING](../CONTRIBUTING.md) for the other CI checks)
|
||||
- [ ] Tested manually on a game or with `tools/AutoClick.ClickTarget`
|
||||
- [ ] New UI text is in `Strings.resx` and in all four translations (`vi`, `ja`, `ko`, `zh`); no hard-coded text in XAML
|
||||
- [ ] UI changes work with the keyboard alone and with Narrator: icon-only controls have a name, the focus is visible and in order, and color is not the only signal (see [ACCESSIBILITY](../docs/ACCESSIBILITY.md))
|
||||
- [ ] User-visible changes are listed under `[Unreleased]` in `CHANGELOG.md`
|
||||
- [ ] No secrets, credentials, or suspicious code
|
||||
|
||||
---
|
||||
|
||||
> **Auto-Ignore Policy:** PRs will be automatically ignored if they:
|
||||
>
|
||||
> - Contain suspicious code or embedded malware (will be reviewed in a sandboxed VM)
|
||||
> - Include links suspected of data theft or phishing
|
||||
> - Discuss topics unrelated to this project
|
||||
|
||||
@@ -0,0 +1,105 @@
|
||||
version: 2
|
||||
|
||||
# NuGet covers Directory.Packages.props and the tools in .config/dotnet-tools.json. Patch and
|
||||
# minor updates merge automatically once CI passes (dependabot-auto-merge.yml); majors get the
|
||||
# needs-review label.
|
||||
|
||||
updates:
|
||||
- package-ecosystem: "nuget"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
day: "monday"
|
||||
time: "06:00"
|
||||
timezone: "Asia/Ho_Chi_Minh"
|
||||
# Let new releases age a week before they are proposed (time for yanks and advisories).
|
||||
cooldown:
|
||||
default-days: 7
|
||||
semver-major-days: 14
|
||||
open-pull-requests-limit: 10
|
||||
commit-message:
|
||||
prefix: "chore(deps)"
|
||||
labels:
|
||||
- "dependencies"
|
||||
- "nuget"
|
||||
ignore:
|
||||
# LiveCharts2 is built against SkiaSharp 3; a SkiaSharp major needs a LiveCharts release.
|
||||
- dependency-name: "SkiaSharp*"
|
||||
update-types: ["version-update:semver-major"]
|
||||
- dependency-name: "HarfBuzzSharp*"
|
||||
update-types: ["version-update:semver-major"]
|
||||
groups:
|
||||
runtime:
|
||||
patterns:
|
||||
- "Microsoft.Extensions.*"
|
||||
exclude-patterns:
|
||||
- "Microsoft.Extensions.TimeProvider.Testing"
|
||||
ui:
|
||||
patterns:
|
||||
- "WPF-UI*"
|
||||
- "CommunityToolkit.*"
|
||||
- "H.NotifyIcon*"
|
||||
- "LiveChartsCore*"
|
||||
- "SkiaSharp*"
|
||||
- "HarfBuzzSharp*"
|
||||
logging:
|
||||
patterns:
|
||||
- "Serilog*"
|
||||
# The vpk CLI must match the Velopack library (eng/Get-BuildInfo.ps1 checks it).
|
||||
velopack:
|
||||
patterns:
|
||||
- "Velopack"
|
||||
- "vpk"
|
||||
testing:
|
||||
patterns:
|
||||
- "xunit*"
|
||||
- "Microsoft.Testing.*"
|
||||
- "Microsoft.Extensions.TimeProvider.Testing"
|
||||
- "TngTech.ArchUnitNET*"
|
||||
tools:
|
||||
patterns:
|
||||
- "jetbrains.resharper.globaltools"
|
||||
- "nuget-license"
|
||||
- "microsoft.sbom.dotnettool"
|
||||
- "dotnet-reportgenerator-globaltool"
|
||||
- "dotnet-sonarscanner"
|
||||
- "Microsoft.Windows.CsWin32"
|
||||
|
||||
- package-ecosystem: "dotnet-sdk"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
day: "monday"
|
||||
time: "06:00"
|
||||
timezone: "Asia/Ho_Chi_Minh"
|
||||
cooldown:
|
||||
default-days: 7
|
||||
commit-message:
|
||||
prefix: "chore(sdk)"
|
||||
labels:
|
||||
- "dependencies"
|
||||
- "dotnet-sdk"
|
||||
ignore:
|
||||
# Stay on the .NET 10 LTS line; moving to a new major is a planned change.
|
||||
- dependency-name: "*"
|
||||
update-types: ["version-update:semver-major"]
|
||||
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
day: "monday"
|
||||
time: "06:00"
|
||||
timezone: "Asia/Ho_Chi_Minh"
|
||||
cooldown:
|
||||
default-days: 7
|
||||
open-pull-requests-limit: 5
|
||||
commit-message:
|
||||
prefix: "chore(actions)"
|
||||
labels:
|
||||
- "dependencies"
|
||||
- "github-actions"
|
||||
groups:
|
||||
actions:
|
||||
patterns:
|
||||
- "*"
|
||||
@@ -0,0 +1,25 @@
|
||||
name: Announce Release to Discord
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
tag:
|
||||
description: "Existing release tag to re-announce"
|
||||
required: true
|
||||
type: string
|
||||
|
||||
# The shared workflow only reads the release metadata with the gh CLI.
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
announce:
|
||||
uses: poli0981/.github/.github/workflows/announce-release.yml@main
|
||||
with:
|
||||
tag_override: ${{ inputs.tag || '' }}
|
||||
secrets:
|
||||
DISCORD_RELEASES_WEBHOOK: ${{ secrets.DISCORD_RELEASES_WEBHOOK }}
|
||||
DISCORD_REPO_WEBHOOK: ${{ secrets.DISCORD_REPO_WEBHOOK }}
|
||||
DISCORD_PING_ROLE_ID: ${{ secrets.DISCORD_PING_ROLE_ID }}
|
||||
@@ -0,0 +1,192 @@
|
||||
name: CI
|
||||
|
||||
# Required checks for master: build-test, dead-code, licenses, vuln-audit.
|
||||
# No path filters: a required check that does not run would block every pull request.
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
pull_request:
|
||||
branches: [master]
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: ci-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
||||
|
||||
env:
|
||||
DOTNET_NOLOGO: true
|
||||
DOTNET_CLI_TELEMETRY_OPTOUT: true
|
||||
|
||||
jobs:
|
||||
build-test:
|
||||
name: build-test
|
||||
runs-on: windows-latest
|
||||
timeout-minutes: 45
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
|
||||
with:
|
||||
global-json-file: global.json
|
||||
|
||||
- name: Restore
|
||||
run: |
|
||||
dotnet tool restore
|
||||
dotnet restore AutoClick.slnx
|
||||
|
||||
- name: Check formatting
|
||||
run: |
|
||||
dotnet format whitespace AutoClick.slnx --verify-no-changes --no-restore
|
||||
dotnet format style AutoClick.slnx --verify-no-changes --no-restore
|
||||
|
||||
- name: Build (warnings as errors)
|
||||
run: dotnet build AutoClick.slnx -c Release --no-restore -p:ContinuousIntegrationBuild=true
|
||||
|
||||
- name: Test
|
||||
run: >-
|
||||
dotnet test --solution AutoClick.slnx -c Release --no-build
|
||||
--results-directory artifacts/test-results --minimum-expected-tests 10
|
||||
--coverage --coverage-output-format cobertura
|
||||
|
||||
- name: Coverage
|
||||
shell: pwsh
|
||||
run: |
|
||||
dotnet reportgenerator "-reports:artifacts/test-results/**/*.cobertura.xml" -targetdir:artifacts/coverage `
|
||||
"-reporttypes:Cobertura;MarkdownSummaryGithub" "-assemblyfilters:+AutoClick.*;-AutoClick.*.Tests;-AutoClick.ClickTarget"
|
||||
Get-Content artifacts/coverage/SummaryGithub.md | Add-Content -LiteralPath $env:GITHUB_STEP_SUMMARY
|
||||
./eng/Test-Coverage.ps1 -Cobertura artifacts/coverage/Cobertura.xml
|
||||
|
||||
- name: Upload test results
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
|
||||
with:
|
||||
name: test-results
|
||||
path: artifacts/test-results/
|
||||
retention-days: 7
|
||||
|
||||
- name: Build info
|
||||
id: info
|
||||
shell: pwsh
|
||||
run: ./eng/Get-BuildInfo.ps1
|
||||
|
||||
- name: Publish (win-x64, self-contained)
|
||||
run: dotnet publish src/AutoClick.UI/AutoClick.UI.csproj -c Release -r win-x64 --self-contained true -p:PublishSingleFile=false -p:ContinuousIntegrationBuild=true -o artifacts/publish
|
||||
|
||||
- name: Third-party notices
|
||||
shell: pwsh
|
||||
run: ./eng/New-ThirdPartyNotices.ps1 -OutFile artifacts/publish/THIRD-PARTY-NOTICES.txt
|
||||
|
||||
- name: Smoke test
|
||||
shell: pwsh
|
||||
run: ./eng/Invoke-SmokeTest.ps1 -Exe artifacts/publish/AutoClick.UI.exe
|
||||
|
||||
- name: Velopack pack (dry run with the real release notes)
|
||||
shell: pwsh
|
||||
env:
|
||||
VERSION: ${{ steps.info.outputs.version }}
|
||||
run: |
|
||||
./eng/Get-ReleaseNotes.ps1 -Version $env:VERSION -OutFile artifacts/release_notes.md
|
||||
dotnet vpk pack --packId AutoClick --packVersion $env:VERSION --packDir artifacts/publish `
|
||||
--mainExe AutoClick.UI.exe --packTitle AutoClick --packAuthors poli0981 `
|
||||
--icon src/AutoClick.UI/Assets/app.ico --channel win --delta None `
|
||||
--releaseNotes artifacts/release_notes.md --outputDir artifacts/releases
|
||||
Get-ChildItem artifacts/releases | Format-Table Name, Length
|
||||
|
||||
dead-code:
|
||||
name: dead-code
|
||||
runs-on: windows-latest
|
||||
timeout-minutes: 30
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
|
||||
with:
|
||||
global-json-file: global.json
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
dotnet tool restore
|
||||
dotnet build AutoClick.slnx -c Release -p:ContinuousIntegrationBuild=true
|
||||
|
||||
- name: InspectCode (solution-wide analysis)
|
||||
run: >-
|
||||
dotnet jb inspectcode AutoClick.slnx --no-build --properties:Configuration=Release --swea
|
||||
--format=Sarif --output=artifacts/inspectcode.sarif --no-updates --verbosity=WARN
|
||||
|
||||
- name: Unused-code gate
|
||||
shell: pwsh
|
||||
run: ./eng/Test-InspectCode.ps1 -Sarif artifacts/inspectcode.sarif
|
||||
|
||||
- name: Upload report
|
||||
if: always()
|
||||
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
|
||||
with:
|
||||
name: inspectcode
|
||||
path: artifacts/inspectcode.sarif
|
||||
if-no-files-found: ignore
|
||||
retention-days: 14
|
||||
|
||||
licenses:
|
||||
name: licenses
|
||||
runs-on: windows-latest
|
||||
timeout-minutes: 20
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
|
||||
with:
|
||||
global-json-file: global.json
|
||||
|
||||
- name: Restore
|
||||
run: |
|
||||
dotnet tool restore
|
||||
dotnet restore src/AutoClick.UI/AutoClick.UI.csproj
|
||||
|
||||
- name: License policy and notices
|
||||
shell: pwsh
|
||||
run: ./eng/New-ThirdPartyNotices.ps1 -OutFile artifacts/THIRD-PARTY-NOTICES.txt
|
||||
|
||||
- name: Upload notices
|
||||
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
|
||||
with:
|
||||
name: third-party-notices
|
||||
path: artifacts/THIRD-PARTY-NOTICES.txt
|
||||
retention-days: 14
|
||||
|
||||
vuln-audit:
|
||||
name: vuln-audit
|
||||
runs-on: windows-latest
|
||||
timeout-minutes: 15
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
|
||||
with:
|
||||
global-json-file: global.json
|
||||
|
||||
- name: Restore
|
||||
run: dotnet restore AutoClick.slnx
|
||||
|
||||
- name: Known vulnerabilities (direct and transitive)
|
||||
shell: pwsh
|
||||
run: ./eng/Test-VulnerablePackages.ps1
|
||||
@@ -0,0 +1,72 @@
|
||||
name: CodeQL
|
||||
|
||||
# Advanced setup (the repository's default setup is disabled): C# needs a manual build of the
|
||||
# Windows-only projects, and the workflows themselves are scanned as the "actions" language.
|
||||
# Required check for master: analyze (csharp).
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
pull_request:
|
||||
branches: [master]
|
||||
schedule:
|
||||
- cron: '27 3 * * 1'
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: codeql-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
||||
|
||||
env:
|
||||
DOTNET_NOLOGO: true
|
||||
DOTNET_CLI_TELEMETRY_OPTOUT: true
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
name: analyze (${{ matrix.language }})
|
||||
runs-on: ${{ matrix.os }}
|
||||
timeout-minutes: 45
|
||||
permissions:
|
||||
contents: read
|
||||
actions: read
|
||||
security-events: write
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- language: csharp
|
||||
os: windows-latest
|
||||
build-mode: manual
|
||||
- language: actions
|
||||
os: ubuntu-latest
|
||||
build-mode: none
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Setup .NET
|
||||
if: matrix.language == 'csharp'
|
||||
uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
|
||||
with:
|
||||
global-json-file: global.json
|
||||
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4.39.1
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
build-mode: ${{ matrix.build-mode }}
|
||||
queries: security-extended
|
||||
|
||||
- name: Build
|
||||
if: matrix.language == 'csharp'
|
||||
run: dotnet build AutoClick.slnx -c Release -p:UseSharedCompilation=false
|
||||
|
||||
- name: Analyze
|
||||
uses: github/codeql-action/analyze@9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4.39.1
|
||||
with:
|
||||
category: /language:${{ matrix.language }}
|
||||
@@ -0,0 +1,154 @@
|
||||
name: Create Release Discussion
|
||||
|
||||
# When a release is published, mirror it as a GitHub Discussion in the "Announcements"
|
||||
# (or "Releases") category so the community has a thread to comment on.
|
||||
# - Skips gracefully if Discussions is disabled or the category is missing.
|
||||
# - Idempotent: re-publishing the same tag does not create a duplicate.
|
||||
# - Event data reaches the scripts only through environment variables (no template expansion
|
||||
# inside `run:`), and the multi-line release body uses a random output delimiter.
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
tag:
|
||||
description: "Existing release tag to mirror (e.g. v2.0.0)"
|
||||
required: true
|
||||
type: string
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
create:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 5
|
||||
permissions:
|
||||
contents: read
|
||||
discussions: write
|
||||
steps:
|
||||
- name: Resolve tag and release metadata
|
||||
id: rel
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
EVENT_NAME: ${{ github.event_name }}
|
||||
INPUT_TAG: ${{ inputs.tag }}
|
||||
RELEASE_ID: ${{ github.event.release.id }}
|
||||
RELEASE_TAG: ${{ github.event.release.tag_name }}
|
||||
REPO: ${{ github.repository }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
if [ "$EVENT_NAME" = "workflow_dispatch" ]; then
|
||||
if ! [[ "$INPUT_TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
|
||||
echo "::error::Tag '$INPUT_TAG' is not of the form vX.Y.Z."
|
||||
exit 1
|
||||
fi
|
||||
TAG="$INPUT_TAG"
|
||||
REL_JSON=$(gh api "repos/$REPO/releases/tags/$TAG")
|
||||
else
|
||||
TAG="$RELEASE_TAG"
|
||||
REL_JSON=$(gh api "repos/$REPO/releases/$RELEASE_ID")
|
||||
fi
|
||||
REL_URL=$(jq -r '.html_url' <<< "$REL_JSON")
|
||||
REL_BODY=$(jq -r '.body // ""' <<< "$REL_JSON")
|
||||
{
|
||||
echo "tag=$TAG"
|
||||
echo "url=$REL_URL"
|
||||
echo "title=Release $TAG"
|
||||
} >> "$GITHUB_OUTPUT"
|
||||
DELIMITER="BODY_$(openssl rand -hex 16)"
|
||||
{
|
||||
echo "body<<$DELIMITER"
|
||||
echo "$REL_BODY"
|
||||
echo ''
|
||||
echo '---'
|
||||
echo "See the full release: $REL_URL"
|
||||
echo "$DELIMITER"
|
||||
} >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Resolve repository and category IDs
|
||||
id: ids
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
OWNER: ${{ github.repository_owner }}
|
||||
NAME: ${{ github.event.repository.name }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
# shellcheck disable=SC2016 # $owner and $name are GraphQL variables, not shell expansions
|
||||
gh api graphql -f query='
|
||||
query($owner:String!,$name:String!){
|
||||
repository(owner:$owner,name:$name){
|
||||
id
|
||||
hasDiscussionsEnabled
|
||||
discussionCategories(first:50){ nodes{ id name } }
|
||||
}
|
||||
}' -f owner="$OWNER" -f name="$NAME" > ids.json
|
||||
ENABLED=$(jq -r '.data.repository.hasDiscussionsEnabled' ids.json)
|
||||
if [ "$ENABLED" != "true" ]; then
|
||||
echo "::notice::Discussions are not enabled on this repository; skipping."
|
||||
echo "skip=1" >> "$GITHUB_OUTPUT"
|
||||
exit 0
|
||||
fi
|
||||
REPO_ID=$(jq -r '.data.repository.id' ids.json)
|
||||
CAT_ID=$(jq -r '.data.repository.discussionCategories.nodes[] | select(.name=="Announcements") | .id' ids.json)
|
||||
if [ -z "$CAT_ID" ]; then
|
||||
CAT_ID=$(jq -r '.data.repository.discussionCategories.nodes[] | select(.name=="Releases") | .id' ids.json)
|
||||
fi
|
||||
if [ -z "$CAT_ID" ]; then
|
||||
echo "::notice::Neither 'Announcements' nor 'Releases' discussion category exists; skipping."
|
||||
echo "skip=1" >> "$GITHUB_OUTPUT"
|
||||
exit 0
|
||||
fi
|
||||
{
|
||||
echo "repo_id=$REPO_ID"
|
||||
echo "cat_id=$CAT_ID"
|
||||
echo "skip=0"
|
||||
} >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Check for an existing discussion
|
||||
id: dup
|
||||
if: steps.ids.outputs.skip == '0'
|
||||
continue-on-error: true
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
DISC_TITLE: ${{ steps.rel.outputs.title }}
|
||||
REPO: ${{ github.repository }}
|
||||
run: |
|
||||
# GraphQL search (there is no REST endpoint for discussion search); the quoted title
|
||||
# makes it a phrase match, then the exact title is compared.
|
||||
QUERY="\"$DISC_TITLE\" in:title repo:$REPO"
|
||||
# shellcheck disable=SC2016 # $q is a GraphQL variable, not a shell expansion
|
||||
MATCHES=$(gh api graphql \
|
||||
-f query='query($q:String!){search(query:$q,type:DISCUSSION,first:25){nodes{... on Discussion {title}}}}' \
|
||||
-f q="$QUERY" \
|
||||
--jq "[.data.search.nodes[] | select(.title==\"$DISC_TITLE\")] | length")
|
||||
if [ "${MATCHES:-0}" -gt 0 ]; then
|
||||
echo "::notice::Discussion '$DISC_TITLE' already exists; skipping."
|
||||
echo "exists=1" >> "$GITHUB_OUTPUT"
|
||||
else
|
||||
echo "exists=0" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
|
||||
- name: Create discussion
|
||||
# "!= '1'" rather than "== '0'": if the duplicate check fails and writes nothing, still
|
||||
# create. A duplicate is recoverable; a missing release discussion is the actual bug.
|
||||
if: steps.ids.outputs.skip == '0' && steps.dup.outputs.exists != '1'
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
REPO_ID: ${{ steps.ids.outputs.repo_id }}
|
||||
CAT_ID: ${{ steps.ids.outputs.cat_id }}
|
||||
DISC_TITLE: ${{ steps.rel.outputs.title }}
|
||||
DISC_BODY: ${{ steps.rel.outputs.body }}
|
||||
run: |
|
||||
# shellcheck disable=SC2016 # $repo, $cat, $title and $body are GraphQL variables
|
||||
URL=$(gh api graphql \
|
||||
-f query='mutation($repo:ID!,$cat:ID!,$title:String!,$body:String!){
|
||||
createDiscussion(input:{repositoryId:$repo,categoryId:$cat,title:$title,body:$body}){
|
||||
discussion{ url }
|
||||
}
|
||||
}' \
|
||||
-f repo="$REPO_ID" -f cat="$CAT_ID" \
|
||||
-f title="$DISC_TITLE" -f body="$DISC_BODY" \
|
||||
--jq '.data.createDiscussion.discussion.url')
|
||||
echo "::notice::Created discussion: $URL"
|
||||
@@ -0,0 +1,36 @@
|
||||
name: Dependabot auto-merge
|
||||
|
||||
# Patch and minor dependency updates merge on their own once every required check passes
|
||||
# (the master ruleset enforces the checks). Major updates are labelled for a manual review.
|
||||
|
||||
on: pull_request
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
dependabot:
|
||||
if: github.event.pull_request.user.login == 'dependabot[bot]' && github.repository == 'poli0981/autoclick'
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 5
|
||||
permissions:
|
||||
contents: write
|
||||
pull-requests: write
|
||||
steps:
|
||||
- name: Dependabot metadata
|
||||
id: meta
|
||||
uses: dependabot/fetch-metadata@25dd0e34f4fe68f24cc83900b1fe3fe149efef98 # v3.1.0
|
||||
|
||||
- name: Enable auto-merge for patch and minor updates
|
||||
if: steps.meta.outputs.update-type == 'version-update:semver-patch' || steps.meta.outputs.update-type == 'version-update:semver-minor'
|
||||
env:
|
||||
PR_URL: ${{ github.event.pull_request.html_url }}
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: gh pr merge --auto --squash "$PR_URL"
|
||||
|
||||
- name: Label major updates
|
||||
if: steps.meta.outputs.update-type == 'version-update:semver-major'
|
||||
env:
|
||||
PR_URL: ${{ github.event.pull_request.html_url }}
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: gh pr edit "$PR_URL" --add-label needs-review
|
||||
@@ -0,0 +1,80 @@
|
||||
name: Dependency Review
|
||||
|
||||
# Blocks pull requests that add a vulnerable package (moderate or worse) or a license outside
|
||||
# eng/licenses/allowed-licenses.json (the list the licenses CI job enforces too).
|
||||
# Required check for master: dependency-review.
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [master]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: dependency-review-${{ github.event.pull_request.number }}
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
DOTNET_NOLOGO: true
|
||||
DOTNET_CLI_TELEMETRY_OPTOUT: true
|
||||
|
||||
jobs:
|
||||
dependency-review:
|
||||
name: dependency-review
|
||||
runs-on: windows-latest
|
||||
timeout-minutes: 20
|
||||
permissions:
|
||||
contents: write # dependency snapshot submission
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
|
||||
with:
|
||||
global-json-file: global.json
|
||||
|
||||
- name: Restore
|
||||
run: dotnet restore AutoClick.slnx
|
||||
|
||||
# GitHub's static dependency graph cannot read central package management or transitive
|
||||
# packages; Component Detection reads the restored project.assets.json files.
|
||||
- name: Submit dependency snapshot
|
||||
uses: advanced-security/component-detection-dependency-submission-action@a02aeda7a175ad4dd38a13c4d3ff2df9da8f2cf0 # v0.2.0
|
||||
continue-on-error: true # pull requests from forks cannot write snapshots
|
||||
with:
|
||||
detectorsCategories: NuGet
|
||||
snapshot-sha: ${{ github.event.pull_request.head.sha }}
|
||||
snapshot-ref: refs/heads/${{ github.head_ref }}
|
||||
|
||||
- name: Allowed licenses
|
||||
id: licenses
|
||||
shell: pwsh
|
||||
run: |
|
||||
$list = (Get-Content -LiteralPath eng/licenses/allowed-licenses.json -Raw | ConvertFrom-Json) -join ','
|
||||
"list=$list" | Out-File -FilePath $env:GITHUB_OUTPUT -Append -Encoding utf8
|
||||
|
||||
- name: Dependency review
|
||||
uses: actions/dependency-review-action@a1d282b36b6f3519aa1f3fc636f609c47dddb294 # v5.0.0
|
||||
with:
|
||||
fail-on-severity: moderate
|
||||
allow-licenses: ${{ steps.licenses.outputs.list }}
|
||||
# Skipped by the license check:
|
||||
# - OpenTK (pulled in by SkiaSharp.Views.WPF) publishes no license metadata; it is MIT
|
||||
# (see eng/licenses/overrides.json).
|
||||
# - Build and test tools that are never shipped (the licenses job checks what ships):
|
||||
# the Windows metadata CsWin32 generates P/Invoke code from (Windows SDK license) and
|
||||
# the test coverage extension (Microsoft .NET Library license).
|
||||
allow-dependencies-licenses: >-
|
||||
pkg:nuget/OpenTK.Compute, pkg:nuget/OpenTK.Core, pkg:nuget/OpenTK.Graphics,
|
||||
pkg:nuget/OpenTK.Input, pkg:nuget/OpenTK.Mathematics, pkg:nuget/OpenTK.OpenAL,
|
||||
pkg:nuget/OpenTK.Windowing.Common, pkg:nuget/OpenTK.Windowing.Desktop,
|
||||
pkg:nuget/OpenTK.Windowing.GraphicsLibraryFramework, pkg:nuget/OpenTK.GLWpfControl,
|
||||
pkg:nuget/Microsoft.Windows.SDK.Win32Docs, pkg:nuget/Microsoft.Windows.SDK.Win32Metadata,
|
||||
pkg:nuget/Microsoft.Windows.WDK.Win32Metadata,
|
||||
pkg:nuget/Microsoft.Testing.Extensions.CodeCoverage
|
||||
retry-on-snapshot-warnings: true
|
||||
retry-on-snapshot-warnings-timeout: 180
|
||||
@@ -0,0 +1,58 @@
|
||||
name: Docs
|
||||
|
||||
# Markdown style and broken links. Informational: not a required check.
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- '**/*.md'
|
||||
- '.markdownlint-cli2.jsonc'
|
||||
- 'lychee.toml'
|
||||
push:
|
||||
branches: [master]
|
||||
paths:
|
||||
- '**/*.md'
|
||||
schedule:
|
||||
- cron: '5 6 * * 0' # links rot even when the docs do not change
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: docs-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
markdownlint:
|
||||
name: markdownlint
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: markdownlint
|
||||
uses: DavidAnson/markdownlint-cli2-action@696eb3f2509270d7b882d2aa68347bc676e7af34 # v25.0.0
|
||||
with:
|
||||
globs: '**/*.md'
|
||||
|
||||
links:
|
||||
name: links
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 15
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: lychee
|
||||
uses: lycheeverse/lychee-action@e7477775783ea5526144ba13e8db5eec57747ce8 # v2.9.0
|
||||
with:
|
||||
args: --config lychee.toml --no-progress './**/*.md'
|
||||
fail: true
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ github.token }}
|
||||
@@ -0,0 +1,27 @@
|
||||
name: Notify CI Failures
|
||||
|
||||
# Posts failures of CI and Security Audit on master to Discord. The shared workflow ignores
|
||||
# workflows whose name contains "Release" (the release pipeline has its own notifier) and runs
|
||||
# only for the default branch, so pull request failures stay quiet.
|
||||
|
||||
# workflow_run runs with secrets: only runs of this repository's own pushes and schedules are
|
||||
# reported (never pull requests, whose branch names and commits are not trusted), and no code is
|
||||
# checked out here.
|
||||
on:
|
||||
workflow_run: # zizmor: ignore[dangerous-triggers]
|
||||
workflows: ["CI", "Security Audit"]
|
||||
types: [completed]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
actions: read
|
||||
|
||||
jobs:
|
||||
notify:
|
||||
if: >-
|
||||
github.event.workflow_run.conclusion == 'failure' &&
|
||||
github.event.workflow_run.event != 'pull_request' &&
|
||||
github.event.workflow_run.head_repository.full_name == github.repository
|
||||
uses: poli0981/.github/.github/workflows/notify-ci-failure.yml@main
|
||||
secrets:
|
||||
DISCORD_CI_WEBHOOK: ${{ secrets.DISCORD_CI_WEBHOOK }}
|
||||
@@ -0,0 +1,25 @@
|
||||
name: Notify Release Pipeline
|
||||
|
||||
# Reports every finished Release run (success, failure or cancelled) for tag pushes and manual
|
||||
# rebuilds to Discord.
|
||||
|
||||
# workflow_run runs with secrets: only Release runs of this repository are reported (tag pushes
|
||||
# and manual rebuilds by maintainers), and no code is checked out here.
|
||||
on:
|
||||
workflow_run: # zizmor: ignore[dangerous-triggers]
|
||||
workflows: ["Release"]
|
||||
types: [completed]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
actions: read
|
||||
|
||||
jobs:
|
||||
notify:
|
||||
if: >-
|
||||
contains(fromJSON('["success", "failure", "cancelled"]'), github.event.workflow_run.conclusion) &&
|
||||
contains(fromJSON('["push", "workflow_dispatch"]'), github.event.workflow_run.event) &&
|
||||
github.event.workflow_run.head_repository.full_name == github.repository
|
||||
uses: poli0981/.github/.github/workflows/notify-release-pipeline.yml@main
|
||||
secrets:
|
||||
DISCORD_RELEASE_PIPELINE_WEBHOOK: ${{ secrets.DISCORD_RELEASE_PIPELINE_WEBHOOK }}
|
||||
+160
-99
@@ -1,130 +1,191 @@
|
||||
name: Release
|
||||
|
||||
# Builds the tagged commit and uploads a DRAFT GitHub release. Verify the draft (see
|
||||
# docs/RELEASING.md), then publish it from your own account: publishing with a user token
|
||||
# raises `release: published`, which runs the announcement and discussion workflows.
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
tags: ['v*.*.*']
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
description: 'Version (e.g. 1.2.1)'
|
||||
tag:
|
||||
description: 'Existing tag to rebuild and upload as a draft (e.g. v2.0.0)'
|
||||
required: true
|
||||
type: string
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: release-${{ inputs.tag || github.ref_name }}
|
||||
cancel-in-progress: false
|
||||
|
||||
env:
|
||||
DOTNET_NOLOGO: true
|
||||
DOTNET_CLI_TELEMETRY_OPTOUT: true
|
||||
|
||||
jobs:
|
||||
release:
|
||||
build:
|
||||
name: build
|
||||
runs-on: windows-latest
|
||||
|
||||
timeout-minutes: 45
|
||||
permissions:
|
||||
contents: read
|
||||
id-token: write # build provenance and SBOM attestations
|
||||
attestations: write
|
||||
outputs:
|
||||
tag: ${{ steps.tag.outputs.tag }}
|
||||
version: ${{ steps.tag.outputs.version }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup .NET 8
|
||||
uses: actions/setup-dotnet@v4
|
||||
with:
|
||||
dotnet-version: '8.0.x'
|
||||
|
||||
- name: Resolve version
|
||||
id: ver
|
||||
- name: Resolve and validate tag
|
||||
id: tag
|
||||
shell: pwsh
|
||||
env:
|
||||
EVENT_NAME: ${{ github.event_name }}
|
||||
INPUT_TAG: ${{ inputs.tag }}
|
||||
REF_NAME: ${{ github.ref_name }}
|
||||
run: |
|
||||
if ('${{ github.event_name }}' -eq 'workflow_dispatch') {
|
||||
$v = '${{ inputs.version }}'
|
||||
} else {
|
||||
$v = '${{ github.ref_name }}' -replace '^v',''
|
||||
}
|
||||
if (-not $v) { throw "Could not resolve version" }
|
||||
"version=$v" | Out-File -FilePath $env:GITHUB_OUTPUT -Append
|
||||
Write-Host "Releasing version: $v"
|
||||
$tag = if ($env:EVENT_NAME -eq 'workflow_dispatch') { $env:INPUT_TAG } else { $env:REF_NAME }
|
||||
if ($tag -notmatch '^v\d+\.\d+\.\d+$') { throw "Tag '$tag' is not of the form vX.Y.Z." }
|
||||
"tag=$tag" | Out-File -FilePath $env:GITHUB_OUTPUT -Append -Encoding utf8
|
||||
"version=$($tag.Substring(1))" | Out-File -FilePath $env:GITHUB_OUTPUT -Append -Encoding utf8
|
||||
|
||||
- name: Extract release notes from CHANGELOG
|
||||
- name: Checkout tag
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
ref: refs/tags/${{ steps.tag.outputs.tag }}
|
||||
persist-credentials: false
|
||||
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
|
||||
with:
|
||||
global-json-file: global.json
|
||||
|
||||
- name: Restore tools
|
||||
run: dotnet tool restore
|
||||
|
||||
- name: Check version and vpk
|
||||
shell: pwsh
|
||||
run: |
|
||||
$v = '${{ steps.ver.outputs.version }}'
|
||||
$cl = Get-Content CHANGELOG.md -Raw
|
||||
$escaped = [regex]::Escape($v)
|
||||
$pattern = "(?ms)^## \[$escaped\][^\n]*\r?\n(.*?)(?=^## \[|\z)"
|
||||
$m = [regex]::Match($cl, $pattern)
|
||||
if ($m.Success) {
|
||||
$notes = $m.Groups[1].Value.Trim()
|
||||
} else {
|
||||
$notes = "Release v$v"
|
||||
}
|
||||
$notes | Out-File -FilePath release_notes.md -Encoding utf8 -NoNewline
|
||||
Write-Host "--- release_notes.md ---"
|
||||
Get-Content release_notes.md
|
||||
env:
|
||||
VERSION: ${{ steps.tag.outputs.version }}
|
||||
run: ./eng/Get-BuildInfo.ps1 -ExpectedVersion $env:VERSION
|
||||
|
||||
- name: Restore
|
||||
run: dotnet restore src/AutoClick.UI/AutoClick.UI.csproj
|
||||
- name: Release notes from CHANGELOG
|
||||
shell: pwsh
|
||||
env:
|
||||
VERSION: ${{ steps.tag.outputs.version }}
|
||||
run: |
|
||||
New-Item -ItemType Directory -Force artifacts | Out-Null
|
||||
./eng/Get-ReleaseNotes.ps1 -Version $env:VERSION -OutFile artifacts/release_notes.md
|
||||
|
||||
- name: Publish (win-x64, self-contained)
|
||||
shell: pwsh
|
||||
run: |
|
||||
dotnet publish src/AutoClick.UI/AutoClick.UI.csproj `
|
||||
-c Release `
|
||||
-r win-x64 `
|
||||
--self-contained true `
|
||||
/p:Version=${{ steps.ver.outputs.version }} `
|
||||
/p:AssemblyVersion=${{ steps.ver.outputs.version }}.0 `
|
||||
/p:FileVersion=${{ steps.ver.outputs.version }}.0 `
|
||||
/p:InformationalVersion=${{ steps.ver.outputs.version }} `
|
||||
/p:PublishSingleFile=false `
|
||||
-o publish
|
||||
run: dotnet publish src/AutoClick.UI/AutoClick.UI.csproj -c Release -r win-x64 --self-contained true -p:PublishSingleFile=false -p:ContinuousIntegrationBuild=true -o artifacts/publish
|
||||
|
||||
- name: Install Velopack CLI (vpk)
|
||||
run: dotnet tool install -g vpk
|
||||
|
||||
- name: Download previous releases (for delta)
|
||||
- name: Third-party notices
|
||||
shell: pwsh
|
||||
continue-on-error: true
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
vpk download github `
|
||||
--repoUrl https://github.com/poli0981/autoclick `
|
||||
--token $env:GITHUB_TOKEN `
|
||||
--channel win
|
||||
run: ./eng/New-ThirdPartyNotices.ps1 -OutFile artifacts/publish/THIRD-PARTY-NOTICES.txt
|
||||
|
||||
- name: Smoke test
|
||||
shell: pwsh
|
||||
run: ./eng/Invoke-SmokeTest.ps1 -Exe artifacts/publish/AutoClick.UI.exe
|
||||
|
||||
- name: Velopack pack
|
||||
shell: pwsh
|
||||
env:
|
||||
VERSION: ${{ steps.tag.outputs.version }}
|
||||
# Full packages only: a delta needs the previous release and would save little for an
|
||||
# app whose size is mostly the self-contained runtime.
|
||||
run: |
|
||||
vpk pack `
|
||||
-u AutoClick `
|
||||
-v ${{ steps.ver.outputs.version }} `
|
||||
-p publish `
|
||||
-e AutoClick.UI.exe `
|
||||
--packTitle AutoClick `
|
||||
--packAuthors poli0981 `
|
||||
--icon src/AutoClick.UI/Assets/app.ico `
|
||||
--channel win `
|
||||
--releaseNotes release_notes.md
|
||||
dotnet vpk pack --packId AutoClick --packVersion $env:VERSION --packDir artifacts/publish `
|
||||
--mainExe AutoClick.UI.exe --packTitle AutoClick --packAuthors poli0981 `
|
||||
--icon src/AutoClick.UI/Assets/app.ico --channel win --delta None `
|
||||
--releaseNotes artifacts/release_notes.md --outputDir artifacts/releases
|
||||
Get-ChildItem artifacts/releases | Format-Table Name, Length
|
||||
|
||||
- name: List release artifacts
|
||||
shell: pwsh
|
||||
run: |
|
||||
Write-Host "--- Releases/ ---"
|
||||
Get-ChildItem Releases | Format-Table Name, Length
|
||||
|
||||
- name: Upload artifacts to workflow run
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: velopack-release-${{ steps.ver.outputs.version }}
|
||||
path: Releases/
|
||||
|
||||
- name: Upload to GitHub Releases
|
||||
- name: SBOM (SPDX)
|
||||
shell: pwsh
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
VERSION: ${{ steps.tag.outputs.version }}
|
||||
run: |
|
||||
vpk upload github `
|
||||
--repoUrl https://github.com/poli0981/autoclick `
|
||||
--token $env:GITHUB_TOKEN `
|
||||
--tag v${{ steps.ver.outputs.version }} `
|
||||
--releaseName "AutoClick v${{ steps.ver.outputs.version }}" `
|
||||
--merge `
|
||||
--channel win
|
||||
New-Item -ItemType Directory -Force artifacts/sbom-work, artifacts/sbom | Out-Null
|
||||
dotnet sbom-tool generate -b artifacts/publish -bc src/AutoClick.UI -pn AutoClick -pv $env:VERSION `
|
||||
-ps poli0981 -nsb "https://github.com/$env:GITHUB_REPOSITORY" -m artifacts/sbom-work -V Warning
|
||||
Copy-Item artifacts/sbom-work/_manifest/spdx_2.2/manifest.spdx.json "artifacts/sbom/AutoClick-$env:VERSION.spdx.json"
|
||||
|
||||
- name: Attest build provenance
|
||||
uses: actions/attest-build-provenance@4d101475d8b20a2381f78447822ac1eab6504dd8 # v4.2.2
|
||||
with:
|
||||
subject-path: |
|
||||
artifacts/releases/AutoClick-win-Setup.exe
|
||||
artifacts/releases/AutoClick-win-Portable.zip
|
||||
artifacts/releases/*.nupkg
|
||||
|
||||
- name: Attest SBOM
|
||||
uses: actions/attest-sbom@c604332985a26aa8cf1bdc465b92731239ec6b9e # v4.1.0
|
||||
with:
|
||||
subject-path: artifacts/releases/AutoClick-win-Setup.exe
|
||||
sbom-path: artifacts/sbom/AutoClick-${{ steps.tag.outputs.version }}.spdx.json
|
||||
|
||||
- name: Upload release artifacts
|
||||
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
|
||||
with:
|
||||
name: velopack-release
|
||||
path: artifacts/releases/
|
||||
if-no-files-found: error
|
||||
retention-days: 30
|
||||
|
||||
- name: Upload SBOM
|
||||
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
|
||||
with:
|
||||
name: sbom
|
||||
path: artifacts/sbom/
|
||||
if-no-files-found: error
|
||||
retention-days: 30
|
||||
|
||||
publish:
|
||||
name: upload draft release
|
||||
needs: build
|
||||
runs-on: windows-latest
|
||||
timeout-minutes: 20
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
- name: Checkout tag
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
ref: refs/tags/${{ needs.build.outputs.tag }}
|
||||
persist-credentials: false
|
||||
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
|
||||
with:
|
||||
global-json-file: global.json
|
||||
|
||||
- name: Restore tools
|
||||
run: dotnet tool restore
|
||||
|
||||
- name: Download release artifacts
|
||||
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
|
||||
with:
|
||||
name: velopack-release
|
||||
path: artifacts/releases
|
||||
|
||||
- name: Download SBOM
|
||||
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
|
||||
with:
|
||||
name: sbom
|
||||
path: artifacts/sbom
|
||||
|
||||
- name: Upload draft to GitHub Releases
|
||||
shell: pwsh
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
TAG: ${{ needs.build.outputs.tag }}
|
||||
VERSION: ${{ needs.build.outputs.version }}
|
||||
run: |
|
||||
$commit = git rev-parse HEAD
|
||||
dotnet vpk upload github --repoUrl "https://github.com/$env:GITHUB_REPOSITORY" --token $env:GH_TOKEN `
|
||||
--tag $env:TAG --targetCommitish $commit --releaseName "AutoClick v$env:VERSION" `
|
||||
--merge --channel win --outputDir artifacts/releases
|
||||
gh release upload $env:TAG "artifacts/sbom/AutoClick-$env:VERSION.spdx.json" --clobber --repo $env:GITHUB_REPOSITORY
|
||||
@@ -0,0 +1,42 @@
|
||||
name: Scorecard
|
||||
|
||||
# OpenSSF Scorecard: supply-chain checks (branch protection, pinned dependencies, token
|
||||
# permissions, ...). Results appear in the Security tab and on the public Scorecard API.
|
||||
|
||||
on:
|
||||
branch_protection_rule:
|
||||
schedule:
|
||||
- cron: '41 4 * * 2'
|
||||
push:
|
||||
branches: [master]
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
analysis:
|
||||
name: analysis
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 15
|
||||
permissions:
|
||||
security-events: write
|
||||
id-token: write
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Run Scorecard
|
||||
uses: ossf/scorecard-action@fa7117db83c52d787ae5a89f350999701505d78e # v2.5.0
|
||||
with:
|
||||
results_file: results.sarif
|
||||
results_format: sarif
|
||||
publish_results: true
|
||||
|
||||
- name: Upload to code scanning
|
||||
uses: github/codeql-action/upload-sarif@9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4.39.1
|
||||
with:
|
||||
sarif_file: results.sarif
|
||||
category: scorecard
|
||||
@@ -0,0 +1,54 @@
|
||||
name: Security Audit
|
||||
|
||||
# Daily: new advisories can affect packages that have not changed. Also submits the full
|
||||
# dependency graph (including transitive packages) for master, which Dependabot alerts and
|
||||
# dependency review compare against. Failures are reported to Discord (notify-ci-failure.yml).
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '17 2 * * *'
|
||||
push:
|
||||
branches: [master]
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: security-audit
|
||||
cancel-in-progress: false
|
||||
|
||||
env:
|
||||
DOTNET_NOLOGO: true
|
||||
DOTNET_CLI_TELEMETRY_OPTOUT: true
|
||||
|
||||
jobs:
|
||||
audit:
|
||||
name: audit
|
||||
runs-on: windows-latest
|
||||
timeout-minutes: 20
|
||||
permissions:
|
||||
contents: write # dependency snapshot submission
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
|
||||
with:
|
||||
global-json-file: global.json
|
||||
|
||||
- name: Restore
|
||||
run: dotnet restore AutoClick.slnx
|
||||
|
||||
- name: Submit dependency snapshot
|
||||
if: github.ref == 'refs/heads/master'
|
||||
uses: advanced-security/component-detection-dependency-submission-action@a02aeda7a175ad4dd38a13c4d3ff2df9da8f2cf0 # v0.2.0
|
||||
with:
|
||||
detectorsCategories: NuGet
|
||||
|
||||
- name: Known vulnerabilities (direct and transitive)
|
||||
shell: pwsh
|
||||
run: ./eng/Test-VulnerablePackages.ps1
|
||||
@@ -0,0 +1,82 @@
|
||||
name: SonarCloud
|
||||
|
||||
# SonarQube Cloud analysis with SonarScanner for .NET: issues, security hotspots and test coverage
|
||||
# for the C# code (test projects are recognized as tests), plus the workflows, YAML and PowerShell
|
||||
# files. Informational: not a required check. It replaces SonarQube Cloud's Automatic Analysis,
|
||||
# which must stay turned off for the project (the scan fails otherwise). Dependabot and fork pull
|
||||
# requests cannot read the SONAR_TOKEN secret and skip the job.
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
pull_request:
|
||||
branches: [master]
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: sonarcloud-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
||||
|
||||
env:
|
||||
DOTNET_NOLOGO: true
|
||||
DOTNET_CLI_TELEMETRY_OPTOUT: true
|
||||
|
||||
jobs:
|
||||
sonarcloud:
|
||||
name: sonarcloud
|
||||
if: >-
|
||||
github.actor != 'dependabot[bot]' &&
|
||||
(github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository)
|
||||
runs-on: windows-latest
|
||||
timeout-minutes: 45
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
fetch-depth: 0 # full history: SonarQube Cloud uses blame to find new code
|
||||
persist-credentials: false
|
||||
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
|
||||
with:
|
||||
global-json-file: global.json
|
||||
|
||||
- name: Restore
|
||||
run: |
|
||||
dotnet tool restore
|
||||
dotnet restore AutoClick.slnx
|
||||
|
||||
- name: Build info
|
||||
id: info
|
||||
shell: pwsh
|
||||
run: ./eng/Get-BuildInfo.ps1
|
||||
|
||||
# The product version lets the "previous version" new-code period start at the last version
|
||||
# change; without it, new code would count from the project's first analysis.
|
||||
# The scanner provisions its own Java runtime. Build output and restore files are not sources.
|
||||
- name: Begin analysis
|
||||
env:
|
||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||
VERSION: ${{ steps.info.outputs.version }}
|
||||
run: >-
|
||||
dotnet sonarscanner begin /k:poli0981_autoclick /o:poli0981 /v:"$env:VERSION"
|
||||
/d:sonar.host.url=https://sonarcloud.io /d:sonar.token="$env:SONAR_TOKEN"
|
||||
"/d:sonar.cs.cobertura.reportsPaths=artifacts/test-results/**/*.cobertura.xml"
|
||||
"/d:sonar.exclusions=**/bin/**,**/obj/**,artifacts/**"
|
||||
|
||||
# A plain build: the regular CI job already builds with warnings as errors.
|
||||
- name: Build
|
||||
run: dotnet build AutoClick.slnx -c Release --no-restore --no-incremental --disable-build-servers
|
||||
|
||||
- name: Test with coverage
|
||||
run: >-
|
||||
dotnet test --solution AutoClick.slnx -c Release --no-build
|
||||
--results-directory artifacts/test-results --coverage --coverage-output-format cobertura
|
||||
|
||||
- name: End analysis
|
||||
env:
|
||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||
run: dotnet sonarscanner end /d:sonar.token="$env:SONAR_TOKEN"
|
||||
@@ -0,0 +1,67 @@
|
||||
name: Workflow Lint
|
||||
|
||||
# actionlint (syntax, expressions, shellcheck) and zizmor (security: injection, permissions,
|
||||
# unpinned actions, credential persistence) for the workflows and the Dependabot config.
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- '.github/workflows/**'
|
||||
- '.github/dependabot.yml'
|
||||
- '.github/zizmor.yml'
|
||||
push:
|
||||
branches: [master]
|
||||
paths:
|
||||
- '.github/workflows/**'
|
||||
- '.github/dependabot.yml'
|
||||
- '.github/zizmor.yml'
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: workflow-lint-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
actionlint:
|
||||
name: actionlint
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Install actionlint 1.7.12 (checksum verified)
|
||||
env:
|
||||
VERSION: 1.7.12
|
||||
SHA256: 8aca8db96f1b94770f1b0d72b6dddcb1ebb8123cb3712530b08cc387b349a3d8
|
||||
run: |
|
||||
archive="actionlint_${VERSION}_linux_amd64.tar.gz"
|
||||
curl --proto '=https' --tlsv1.2 -fsSLo "$archive" "https://github.com/rhysd/actionlint/releases/download/v${VERSION}/${archive}"
|
||||
echo "${SHA256} ${archive}" | sha256sum --check --strict
|
||||
tar -xzf "$archive" actionlint
|
||||
|
||||
- name: Run actionlint
|
||||
run: ./actionlint -color
|
||||
|
||||
zizmor:
|
||||
name: zizmor
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Run zizmor
|
||||
uses: zizmorcore/zizmor-action@53290badfa369cb0bf7ad16342cb62c2fa47ac7b # v0.8.0
|
||||
with:
|
||||
version: 1.31.1
|
||||
# Fail the job on findings instead of uploading them to code scanning.
|
||||
advanced-security: false
|
||||
persona: regular
|
||||
@@ -0,0 +1,8 @@
|
||||
# zizmor configuration (https://docs.zizmor.sh/configuration/).
|
||||
rules:
|
||||
unpinned-uses:
|
||||
config:
|
||||
policies:
|
||||
# Shared notification workflows maintained by the repository owner.
|
||||
"poli0981/*": ref-pin
|
||||
"*": hash-pin
|
||||
+11
-2
@@ -1,10 +1,18 @@
|
||||
# Build output
|
||||
bin/
|
||||
obj/
|
||||
artifacts/
|
||||
publish/
|
||||
Releases/
|
||||
TestResults/
|
||||
*.binlog
|
||||
*.nupkg
|
||||
release_notes.md
|
||||
|
||||
# IDE
|
||||
.idea/
|
||||
.vs/
|
||||
.vscode/
|
||||
*.user
|
||||
*.suo
|
||||
*.DotSettings.user
|
||||
@@ -14,5 +22,6 @@ Thumbs.db
|
||||
Desktop.ini
|
||||
.DS_Store
|
||||
|
||||
# Claude
|
||||
.claude/
|
||||
# Claude Code: local worktrees and personal settings stay out of the repo
|
||||
.claude/worktrees/
|
||||
.claude/settings.local.json
|
||||
@@ -0,0 +1,26 @@
|
||||
{
|
||||
// Markdown style for README, CHANGELOG and docs/ (checked by .github/workflows/docs.yml).
|
||||
"config": {
|
||||
"default": true,
|
||||
// Long lines are fine in prose and tables.
|
||||
"MD013": false,
|
||||
// Inline HTML is used for badges, <details> and centered headers.
|
||||
"MD033": false,
|
||||
// Several documents start with a badge row or front matter instead of a heading.
|
||||
"MD041": false,
|
||||
// Repeated headings such as "Added"/"Fixed" per CHANGELOG version.
|
||||
"MD024": { "siblings_only": true },
|
||||
// Emphasis used as a caption is acceptable.
|
||||
"MD036": false,
|
||||
// Table pipes do not need to line up.
|
||||
"MD060": false
|
||||
},
|
||||
"ignores": [
|
||||
"**/node_modules/**",
|
||||
"**/bin/**",
|
||||
"**/obj/**",
|
||||
"artifacts/**",
|
||||
".claude/**",
|
||||
"**/TestResults/**"
|
||||
]
|
||||
}
|
||||
+15
-4
@@ -1,6 +1,17 @@
|
||||
<Solution>
|
||||
<Project Path="src/AutoClick.Core/AutoClick.Core.csproj" />
|
||||
<Project Path="src/AutoClick.Win32/AutoClick.Win32.csproj" />
|
||||
<Project Path="src/AutoClick.Services/AutoClick.Services.csproj" />
|
||||
<Project Path="src/AutoClick.UI/AutoClick.UI.csproj" />
|
||||
<Folder Name="/src/">
|
||||
<Project Path="src/AutoClick.Core/AutoClick.Core.csproj" />
|
||||
<Project Path="src/AutoClick.Win32/AutoClick.Win32.csproj" />
|
||||
<Project Path="src/AutoClick.Services/AutoClick.Services.csproj" />
|
||||
<Project Path="src/AutoClick.UI/AutoClick.UI.csproj" />
|
||||
</Folder>
|
||||
<Folder Name="/tests/">
|
||||
<Project Path="tests/AutoClick.Core.Tests/AutoClick.Core.Tests.csproj" />
|
||||
<Project Path="tests/AutoClick.Win32.Tests/AutoClick.Win32.Tests.csproj" />
|
||||
<Project Path="tests/AutoClick.Services.Tests/AutoClick.Services.Tests.csproj" />
|
||||
<Project Path="tests/AutoClick.Architecture.Tests/AutoClick.Architecture.Tests.csproj" />
|
||||
</Folder>
|
||||
<Folder Name="/tools/">
|
||||
<Project Path="tools/AutoClick.ClickTarget/AutoClick.ClickTarget.csproj" />
|
||||
</Folder>
|
||||
</Solution>
|
||||
+202
@@ -6,13 +6,173 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
||||
|
||||
---
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
## [2.1.0] - 2026-11-09
|
||||
|
||||
Accessibility: AutoClick can now be used completely with the keyboard and with a screen reader. Settings, profiles and sessions are unchanged.
|
||||
|
||||
### Added
|
||||
|
||||
- Coordinate picker: the arrow keys move the pointer (10 pixels, 1 with Shift) and Enter or Space picks the point, so click steps can be added without a mouse. In key press mode (4) these keys are recorded as before.
|
||||
- Screen readers announce status changes without moving the focus: the state of a game and why it stopped, the status bar, the update status, schedule errors, the keys while recording a hotkey, the picker's instructions, the messages that appear for a few seconds, and each step you add.
|
||||
- Page and section titles are headings for screen readers.
|
||||
- An [Accessibility statement](https://github.com/poli0981/autoclick/blob/master/docs/ACCESSIBILITY.md), linked from the About page: what works, known limitations, and a new issue form for accessibility barriers.
|
||||
|
||||
### Fixed
|
||||
|
||||
- Screen readers read a step as "ClickPoint { X = 40, Y = 60, ... }" and a game card as "AutoClick.UI.ViewModels.GameSessionViewModel". They now read the step ("Click at (40, 60)", with its reference color) and the game.
|
||||
- Controls without a name for screen readers: the search box and the window list of Add game, the text box of name prompts, the steps and log lists, the hotkey recorder, the release notes and the close buttons of notices. The three Change buttons of the hotkeys now say which hotkey they change.
|
||||
- Settings: every settings card was an extra Tab stop without a name before its own control; so was the list of games on the Queue page.
|
||||
- Pages slid in and the dashboard charts animated even with Animation effects turned off in Windows.
|
||||
- The picker's window title was always in English.
|
||||
|
||||
### Changed
|
||||
|
||||
- After you pick a point or press Esc, AutoClick comes back to the front with the focus on Add step; before, the game stayed in front. Switching to another window still cancels the picker and leaves the focus there.
|
||||
|
||||
## [2.0.3] - 2026-10-26
|
||||
|
||||
Security update of the bundled .NET runtime. Settings, profiles and sessions are unchanged.
|
||||
|
||||
### Security
|
||||
|
||||
- AutoClick now ships with the .NET 10.0.14 runtime, an out-of-band security update from Microsoft. It fixes an out-of-bounds write in the Brotli decoder (CVE-2026-111497) and completes the October fix for a memory corruption in socket operations (CVE-2026-70197).
|
||||
|
||||
### Changed
|
||||
|
||||
- Dependencies: Microsoft.Extensions.Hosting 10.0.14 and Microsoft.Windows.CsWin32 0.3.367 (the Win32 interop code generator).
|
||||
|
||||
## [2.0.2] - 2026-10-22
|
||||
|
||||
Security hardening from a static analysis review (SonarQube Cloud). Settings, profiles and sessions are unchanged.
|
||||
|
||||
### Security
|
||||
|
||||
- When AutoClick runs as administrator, links, files and folders are now opened with the Explorer of the Windows folder. Before, Explorer was looked up by name, so a program called `explorer.exe` placed in the AutoClick folder could have been started with administrator rights.
|
||||
|
||||
## [2.0.1] - 2026-10-16
|
||||
|
||||
Fixes for the Dark theme. Settings, profiles and sessions are unchanged.
|
||||
|
||||
### Fixed
|
||||
|
||||
- Dark theme: page titles, labels, values and icons were drawn in black on the dark background and could hardly be read. They only became readable after switching to the Light theme and back.
|
||||
- Dashboard: in the Dark theme the charts had a white background that hid their axis labels and legends.
|
||||
- With the theme set to *Use Windows setting*, the dashboard charts now also follow Windows when it switches between light and dark.
|
||||
|
||||
## [2.0.0] - 2026-10-15
|
||||
|
||||
AutoClick rebuilt: a new Fluent interface, no administrator rights needed for most games, and fixes for every known 1.x bug. Settings, profiles and hotkeys from 1.x carry over automatically.
|
||||
|
||||
### Highlights
|
||||
|
||||
- **New interface** (WPF-UI Fluent): Queue, Dashboard, Settings and About pages; Light, Dark, High contrast or follow Windows. Settings apply as you change them, and switching the language no longer restarts the app.
|
||||
- **Administrator rights only when a game needs them.** Windows blocks clicks into games that run as administrator; AutoClick now detects this, says so, and offers *Restart as administrator* (or *Always run as administrator* in Settings). If you are upgrading from 1.x, AutoClick keeps starting as administrator until you turn it off; a one-time notice explains how.
|
||||
- **Keystroke steps keep their key** when profiles are saved or loaded and when sessions are exported or imported (1.x lost it).
|
||||
- **The coordinate picker works on every monitor and at any display scaling.** Points are read in the game's own DPI context, so games that are not DPI aware are clicked at the right spot on scaled monitors.
|
||||
- **Minimizing a game no longer stops its session**: it waits and continues when the game is restored.
|
||||
- **Stop is available while a game is paused.** Steps can be removed one by one and reordered with the arrow buttons or by dragging.
|
||||
- **The heatmap follows the game window**, appears only while the game (or one of its dialogs) is in front, and redraws only when something changed.
|
||||
- **Pixel color guard** can also wait until the pixel matches (with a timeout), besides skipping the step or stopping.
|
||||
- **Global hotkeys** take effect as soon as they are changed and report combinations already used by another app. Pause/Resume now pauses or resumes all games together.
|
||||
- **Updates** are checked at startup and every 6 hours and downloaded in the background. Install with *Restart and update*, or let AutoClick install the update when you exit.
|
||||
|
||||
### Fixed
|
||||
|
||||
- Importing a session file could write files outside the profiles folder through a crafted profile id. Profile ids are now validated.
|
||||
- Settings and profiles are written atomically. An unreadable settings file is kept as a backup and reported, instead of being silently reset.
|
||||
- Importing settings copied only 9 of 19 values and accepted invalid ones (a negative interval or missing hotkeys crashed 1.x).
|
||||
- Starting a game twice quickly could cancel the new session. New points used no delay although 200 ms was shown.
|
||||
- The interval field stayed locked after a session stopped by itself.
|
||||
- Hotkeys typed as digits registered the wrong key, changing a hotkey needed a restart, and a hotkey used by another app was ignored without a message.
|
||||
- Two copies could run at once when one of them ran as administrator.
|
||||
- Applying an update restarted AutoClick without stopping sessions or saving settings.
|
||||
- A crash left nothing in the log. Unhandled errors are now logged, and the log is written asynchronously, flushed on exit and rotated daily (the 14 most recent files are kept).
|
||||
- Heatmap: wrong position on monitors with another scale, all markers redrawn every 200 ms, hidden when the game opened a dialog, left open after the game was removed.
|
||||
- Input: clicks blocked by Windows were counted as successful; keystrokes now include the scan code; the random jitter could leave the window; handles to game processes leaked every 2 seconds.
|
||||
- Interface: the log did not scroll to new lines, scrollbars were hidden, maximizing was limited, keystroke steps showed "(0, 0)", the game picker's Select button was always enabled, and about 25 texts were untranslated.
|
||||
|
||||
### Changed
|
||||
|
||||
- Requires Windows 10 version 2004 (build 19041) or later, or Windows 11, 64-bit. The .NET 10 runtime is included.
|
||||
- Settings are stored in `settings.v2.json`. The 1.x `settings.json` is left untouched (and backed up), so 1.x still works if you go back. Profiles keep the 1.x format.
|
||||
- Session files use format 2; 1.x session files can still be imported.
|
||||
- The periodic memory "cleanup" that froze the interface was removed, and the dashboard only draws while it is visible.
|
||||
- Tray icon based on H.NotifyIcon: notifications as balloons, and the icon comes back after Explorer restarts.
|
||||
|
||||
### Security and project
|
||||
|
||||
- Every pull request runs a warnings-as-errors build, 200+ tests with coverage minimums, a format check, a smoke test of the published app in every theme and language, unused-code analysis (ReSharper InspectCode), a license policy check (GPL-3.0 compatible licenses only) and a known-vulnerability audit, plus CodeQL, dependency review, OpenSSF Scorecard and workflow linting.
|
||||
- Releases ship with THIRD-PARTY-NOTICES.txt, an SPDX software bill of materials and GitHub build attestations. To check a download: `gh attestation verify AutoClick-win-Setup.exe -R poli0981/autoclick`.
|
||||
- Dependencies: WPF-UI 4.3.0, CommunityToolkit.Mvvm 8.4.2, H.NotifyIcon.Wpf 2.4.1, Microsoft.Extensions.Hosting 10.0.13, Serilog 4.4.0 with Sinks.File 7.0.0, Sinks.Async 2.1.0 and Extensions.Hosting 10.0.0, Velopack 1.2.161, LiveCharts2 2.0.5, SkiaSharp 3.119.4.
|
||||
|
||||
### Upgrading from 1.x
|
||||
|
||||
- Update from inside AutoClick or run the new installer; settings, profiles and hotkeys are migrated.
|
||||
- Uninstalling AutoClick deletes its data folder (`%LocalAppData%\AutoClick`), profiles included. Export the profiles you want to keep first.
|
||||
|
||||
---
|
||||
|
||||
## [1.3.4] - 2026-10-15
|
||||
|
||||
Platform bridge release: no feature or data-format changes, so it is safe to update from 1.3.3 and keeps working after .NET 8 reaches end of support (2026-11-10).
|
||||
|
||||
### Changed
|
||||
|
||||
- **Runtime: .NET 8 → .NET 10 (LTS, supported until 2028-11)**. AutoClick ships its own runtime (self-contained), so nothing extra needs to be installed. Requires Windows 10 or Windows 11 (x64).
|
||||
- **Updater: Velopack 1.2.0 → 1.2.161.** The release tool `vpk` is now pinned to the same version through `.config/dotnet-tools.json` (it was previously installed unpinned).
|
||||
- **Dependencies**: LiveCharts2 2.0.5 (all three packages aligned; the WPF package was stuck at 2.0.0), SkiaSharp 3.119.4 (bundled libpng/libexpat security fixes), Serilog 4.4.0, Microsoft.Extensions.DependencyInjection 10.0.13.
|
||||
- Removed unused package references from `AutoClick.Core`, `AutoClick.Win32` and `AutoClick.Services` (LiveCharts and `Microsoft.Windows.SDK.BuildTools`). They dragged .NET Framework-only OpenTK/SkiaSharp assemblies into the libraries and produced 29 NU1701 build warnings; the build is now warning-free.
|
||||
|
||||
### Fixed
|
||||
|
||||
- **The status bar always said "AutoClick v1.3.1"** (hard-coded since 1.3.1). It now shows the real version.
|
||||
- The About page version no longer carries git commit metadata (`1.3.4` instead of `1.3.4+<hash>`).
|
||||
|
||||
### CI / Release
|
||||
|
||||
- New **CI** workflow on every push and pull request to `master`: Release build with warnings as errors, a headless smoke test of the published app (`AutoClick.UI.exe --smoke-test` builds the DI graph and every window, then exits), and a dry run of the Velopack packaging step with the real release notes.
|
||||
- **Release workflow hardened**: validates the tag (`vX.Y.Z`) and checks it matches the project version, always builds the tagged commit (also on manual runs), splits a read-only build job from the publishing job, keeps workflow inputs out of inline scripts, and uploads the release as a **draft** so it can be verified before it is published.
|
||||
- The 1.3.3 packaging failure was caused by a bare ampersand in the release notes (fixed in `vpk` since 0.0.1440), not by the previous package. This release ships a full package only (about 80 MB) because the runtime changed; small delta updates will be re-enabled in a later release.
|
||||
|
||||
---
|
||||
|
||||
## [1.3.3] - 2026-05-12
|
||||
|
||||
### Fixed
|
||||
|
||||
- **CI: workflow_run notifiers spammed "Skipped" jobs on every workflow completion**: `notify-ci-failure.yml` and `notify-release-pipeline.yml` listened to `workflows: ["*"]` and let the reusable workflows decide via job-level `if:` — meaning every push, schedule, and even the notifiers themselves spawned a notify job that then skipped, cluttering the Actions tab with "Skipped" entries. Both callers now narrow the trigger to `workflows: ["Release"]` and gate entry into the reusable workflow with a top-level `if:` (failure-only for CI failures, success-on-tag-push for the release pipeline), so notify jobs only spawn when there's actually something to notify about.
|
||||
- **Version drift across project files**: `AutoClick.Core`, `AutoClick.Services`, and `AutoClick.Win32` were still pinned to `1.3.1` while `AutoClick.UI` shipped as `1.3.2`. All four `.csproj` files now share `1.3.3` / `1.3.3.0` so assembly metadata, file properties, and `InformationalVersion` agree across the build.
|
||||
|
||||
### Added
|
||||
|
||||
- **About → Connect and Support card**: new section between Developer Info and Acknowledgements with links to X, YouTube, Discord, Patreon, Ko-fi, Bluesky, Mastodon, Steam, and Email; plus prominent **Donate** (GitHub Sponsors) and **Report a Bug** buttons. All labels localized across EN / VI / JA / KO / ZH (JA/KO/ZH machine-translated — native review welcome).
|
||||
- **`.github/ISSUE_TEMPLATE/`**: structured GitHub issue forms for `bug_report.yml` (version, install source, OS, repro, expected/actual, logs) and `feature_request.yml` (problem, solution, alternatives, scope), plus `config.yml` that disables blank issues and routes general questions to Discussions / Discord / SECURITY.md.
|
||||
- **`.github/dependabot.yml`**: weekly NuGet and GitHub Actions update PRs, grouped by family (dotnet-runtime, observability, charts, packaging, actions) to keep PR noise low. Currently zero open security alerts on the repository.
|
||||
- **`.github/workflows/create-release-discussion.yml`**: when a release is published, automatically mirrors the release notes into a GitHub Discussion under the **Announcements** category (falls back to **Releases**, no-ops if Discussions is disabled). Idempotent — re-publishing the same tag does not create a duplicate thread.
|
||||
- **Docs**: `docs/pc_spec.md` (developer hardware snapshot) and `docs/social.md` (public profiles, communities, funding links), each with a Vietnamese mirror under `docs/i18n/vi/`. Existing `docs/DEV_ENVIRONMENT.md` also gets a Vietnamese mirror.
|
||||
|
||||
### Changed
|
||||
|
||||
- **README.md**: new **Connect and Support** section linking to `docs/social.md`, Donate, and Report Bug.
|
||||
|
||||
### Notes
|
||||
|
||||
- `.github/FUNDING.yml` already matched the intended Donate configuration (GitHub Sponsors + Ko-fi + Buy Me a Coffee + Patreon + PayPal) — no edits required for this release.
|
||||
- The Discussion auto-creation workflow expects an **Announcements** discussion category to exist on the repo. If absent, the workflow logs a notice and exits 0 (release shipping is unaffected).
|
||||
|
||||
---
|
||||
|
||||
## [1.3.2] - 2026-05-08
|
||||
|
||||
### Fixed
|
||||
|
||||
- **Multiple AutoClick processes spawned on each launch**: Every time the app was opened (Start menu, desktop shortcut, or installer-launched), a brand-new `AutoClick.UI.exe` process was created — adding another tray icon, another set of registered global hotkeys, and another click engine in parallel. After a few launches the user could end up with 4–5 phantom processes still running (and still firing hotkeys) without realizing it. Root cause: there was no single-instance gate in `App.OnStartup` — the DI container, tray icon, and click engine were built unconditionally on every launch. Fixed by adding a session-scoped named Mutex (`Local\AutoClick.SingleInstance.{user-hash}`) acquired right after the Velopack hook check; if the Mutex is already held, the new process forwards a "show window" command to the running instance over a named pipe (`AutoClick.IPC.{user-hash}`) and exits cleanly. The running instance handles the IPC message by `Show()` + `Activate()` + `SetForegroundWindow` on the main window — so launching AutoClick a second time now restores the existing window (even from the tray) instead of stacking processes.
|
||||
- **Language-change restart could lose the single-instance lock momentarily**: `RestartApplication()` calls `Process.Start` on the new exe and then `Application.Current.Shutdown()` — without coordination, the new instance would fail the Mutex check (the old one hadn't released yet) and exit, breaking the restart flow. Fixed by having the old process release the Mutex synchronously *before* spawning the new one, and passing a `--restarting` flag so the new process waits up to 3 s on Mutex acquisition (covering the brief window between the old process exiting and the OS releasing kernel handles).
|
||||
|
||||
### Notes
|
||||
|
||||
- Velopack lifecycle hooks (`--veloapp-install`, `--veloapp-uninstall`, `--veloapp-firstrun`, `--veloapp-obsolete`, `--veloapp-updated`) bypass the single-instance gate so that auto-update and install/uninstall flows continue to work even while a normal AutoClick instance is running.
|
||||
- If the running instance is killed via Task Manager (no graceful exit), the OS automatically releases the abandoned Mutex on the next launch — no manual cleanup required.
|
||||
|
||||
@@ -21,6 +181,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
||||
## [1.3.1] - 2026-04-25
|
||||
|
||||
### Fixed
|
||||
|
||||
- **Heatmap overlay was not click-through and was anchored to the main window**: The overlay set only WPF-level `IsHitTestVisible="False"`, which suppresses hit-testing inside the WPF tree but does not stop the OS from routing mouse input to the overlay HWND — the underlying game window therefore never received clicks while the heatmap was visible. The overlay was also created with `Owner = MainWindow`, so its z-order was tied to the main window (minimizing AutoClick dragged the overlay down with it). Fixed by setting `WS_EX_TRANSPARENT | WS_EX_TOOLWINDOW | WS_EX_NOACTIVATE` extended styles via `SetWindowLong` in `OnSourceInitialized`, re-asserting `HWND_TOPMOST` via `SetWindowPos` on every refresh tick, and removing `Owner` so the overlay is a top-level window with independent z-order.
|
||||
- **Heatmap overlay did not show on top of the foreground game in windowed mode**: Even with TOPMOST set, the 200ms refresh tick was too coarse — when the user Alt-Tabbed back into a game with its own `WS_EX_TOPMOST`, several frames could elapse before the overlay was re-promoted, leaving it stuck behind. Now hooked into `EVENT_SYSTEM_FOREGROUND` via `SetWinEventHook` so the overlay re-asserts TOPMOST at the *exact* moment the foreground swap happens — no polling lag. **Note:** true exclusive-fullscreen games (legacy DirectX) bypass the desktop compositor entirely; no overlay technology can render above them. Borderless-fullscreen and windowed are now reliably supported.
|
||||
- **Resetting per-game stats while the game was idle left the per-game card showing the pre-reset `TotalClicks`**: `GameSessionViewModel.TotalClicks` is a computed `_clickCount + _skippedClicks`; setting the backing fields to zero only fires `PropertyChanged` for the individual fields. The 500ms `_uiTimer` would normally fire `PropertyChanged(TotalClicks)` on the next tick — but the timer is stopped while idle, so the binding stayed stale until the next run. Fixed by firing `PropertyChanged(TotalClicks)` explicitly inside `ResetStats`.
|
||||
@@ -29,12 +190,14 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
||||
- **Status bar showed `AutoClick v1.2.0` after the v1.3.0 release**: Updated to `v1.3.1`.
|
||||
|
||||
### Changed
|
||||
|
||||
- **Heatmap overlays are now foreground-aware**: when multiple games are queued and have heatmap toggled on, only the overlay for the game currently in the system foreground is visible — switching between games via Alt-Tab automatically swaps which heatmap is on screen, and switching to any non-game window (e.g. AutoClick itself, a browser) hides them all. Implemented via a process-wide `ForegroundWatcher` that hooks `EVENT_SYSTEM_FOREGROUND` and is installed/torn down lazily based on subscriber count, so when no overlays are open there is zero syscall cost.
|
||||
- **Heatmap tooltip and README now disclose the Windowed/Borderless/Fullscreen compatibility nuance**: the heatmap button's tooltip points users at [docs/HEATMAP_COMPATIBILITY.md](docs/HEATMAP_COMPATIBILITY.md) (new) listing tested games per engine. Tooltip updated in all five locales (EN / VI / JA / KO / ZH).
|
||||
- **Default window size increased**: 960×680 → 1100×760, with new bounds `MaxWidth=1600, MaxHeight=1100` to prevent over-stretching on large displays. `MinWidth=750, MinHeight=500` unchanged.
|
||||
- **All scrollbars hidden** (`VerticalScrollBarVisibility="Hidden"`, `HorizontalScrollBarVisibility="Hidden"`) across the Main game list, Settings/About/Dashboard tabs, About inner ScrollViewer, and the log panel ListBox. Mouse-wheel and keyboard scrolling continue to work — only the visible track is suppressed for a cleaner UI.
|
||||
|
||||
### Added (Accessibility)
|
||||
|
||||
- **`StandardFocusVisualStyle`** in `App.xaml`: a dashed rectangle outline using the new theme-aware `FocusBrush`. Wired onto `PrimaryButton`, `DefaultButton`, `DangerButton`, `TabRadioButton` named styles plus implicit `Button`/`ComboBox`/`TextBox`/`CheckBox`/`ListBox` styles so every interactive control gets a consistent keyboard-focus indicator.
|
||||
- **State-specific brushes** in all three themes (`DarkTheme`, `LightTheme`, `HighContrastTheme`): `FocusBrush`, `DisabledBrush`, `DisabledTextBrush`, `ErrorBrush`. HighContrast uses bright cyan focus + saturated red error for maximum tonal separation against the yellow primary.
|
||||
- **`AutomationProperties.Name` + `TabIndex`** on the Settings view: every input (ComboBox + TextBox) in the Basic section now has an explicit accessible name + logical tab order matching its visual label, plus names on the Advanced color-guard inputs and the wait-timeout TextBox.
|
||||
@@ -47,6 +210,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
||||
## [1.3.0] - 2026-04-25
|
||||
|
||||
### Added
|
||||
|
||||
- **Minimize on Start All**: New Settings > Advanced toggle. When enabled, the main window auto-minimizes (to tray if Exit Behavior is set to Tray) on Start All — only when at least one game actually started. AFK convenience.
|
||||
- **Import/Export full session**: New `*.autoclick-session` snapshot of the entire app state — settings, all saved profiles, and the current per-game queue (process name, window title, click points, intervals, sequence delay, pixel-guard config). On import, settings are restored and queued games are re-attached to currently running windows by exact ProcessName + WindowTitle match (mismatches log a warning and are skipped). Schema version 1; refuses to import while a session is running.
|
||||
- **Drag-drop reorder points**: Per-game card now shows each click point as a draggable chip (visible when 2+ points exist). Drag any chip onto another to swap positions. Drag is confined to a single game (cross-game drops are ignored) and disabled while the session is running. `GameSession.ClickPoints` migrated from `List` to `ObservableCollection` so the UI updates live; `ClickEngineService` snapshots the points list at the start of each cycle to keep mid-edit reorders safe.
|
||||
@@ -58,6 +222,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
||||
- **JA/KO/ZH translations** for every new v1.3.0 string (Minimize on Start All, Export/Import Session, Drag to reorder, Wait until pixel matches, Wait timeout, Picker keystroke instructions, Click type Keystroke, Heatmap toggle/tooltip/title, Theme Dark/Light/High Contrast). Existing `PickerInstruction` updated to include the new `4=Keystroke` mode in all five locales. AI-generated, mirroring the v1.1.0 disclosure pattern.
|
||||
|
||||
### Changed
|
||||
|
||||
- **Settings schema migration**: `DarkMode: bool` → `Theme: enum { Dark, Light, HighContrast }`. `SettingsService.Load` reads legacy `darkMode` JSON values and seeds `Theme = darkMode ? Dark : Light` automatically — no user action required when upgrading from v1.2.x. New settings are emitted as `"theme": "Dark|Light|HighContrast"` (string enum).
|
||||
|
||||
---
|
||||
@@ -65,10 +230,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
||||
## [1.2.1] - 2026-04-25
|
||||
|
||||
### Added
|
||||
|
||||
- **GitHub Actions release workflow** (`.github/workflows/release.yml`): builds, packs Velopack, and uploads artifacts to GitHub Releases automatically when a `v*` tag is pushed or the workflow is triggered manually. Produces `releases.win.json`, full and delta `.nupkg`, `AutoClick-win-Portable.zip`, and `AutoClick-win-Setup.exe`.
|
||||
- **`docs/RELEASING.md`**: short release-process guide (bump version → CHANGELOG entry → tag push).
|
||||
|
||||
### Notes
|
||||
|
||||
- Infrastructure-only release. App behavior is unchanged from 1.2.0. Updating from 1.2.0 → 1.2.1 also serves as the first end-to-end test of the automated Velopack flow.
|
||||
|
||||
---
|
||||
@@ -76,6 +243,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
||||
## [1.2.0] - 2026-04-05
|
||||
|
||||
### Added
|
||||
|
||||
- **Click type per point**: Each coordinate in a sequence can independently be Left Click, Double Click, or Right Click. Press `1`/`2`/`3` in the coordinate picker to switch type. Coordinate text shows `[D]` or `[R]` suffix for non-default types.
|
||||
- **Game profile save/load**: Save coordinates + intervals + click types + delay as named presets. Load, export (`.autoclick`), import, and delete profiles per game. Profiles persist across sessions.
|
||||
- **Pixel color guard**: Before each click, optionally verify the pixel color at the coordinate matches a reference color (captured at pick time). On mismatch: skip point or stop session. Configurable tolerance (0–50).
|
||||
@@ -97,6 +265,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
||||
- **Per-game click stats**: Each game card shows Success, Skipped, and Total click counts separately
|
||||
|
||||
### Fixed
|
||||
|
||||
- **Pixel color guard not syncing on settings change**: Toggling the guard in Settings and saving now correctly propagates `EnablePixelColorGuard`, `ColorTolerance`, and `ColorMismatchBehavior` to all existing sessions (previously only applied to newly created sessions)
|
||||
- **Color swatches shown when guard disabled**: Coordinate picker no longer captures reference colors when pixel color guard is off
|
||||
- **Per-game chart showing only one process name**: Added `MinStep`/`ForceStepToMin` to Y-axis and increased per-game row height to ensure all labels render
|
||||
@@ -107,6 +276,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
||||
## [1.1.0] - 2026-04-04
|
||||
|
||||
### Added
|
||||
|
||||
- **Multi-point click sequence**: Add multiple coordinates per game, executed in order each cycle (`#1 → #2 → #3 → [interval] → repeat`). "Add Point" button replaces old "Select Coordinate"; "Clear Points" to reset. Click count now tracks individual clicks, not cycles.
|
||||
- **Configurable sequence delay**: User-editable "Delay between points" (0-10000ms) input on each game card, visible when >1 point exists.
|
||||
- **WM_MOUSEMOVE for game dialog compatibility**: InputSimulator now sends mouse-move + delay before clicks, fixing issues where game choice/dialog buttons ignored PostMessage clicks.
|
||||
@@ -115,6 +285,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
||||
- **Sound notifications**: System sounds for Start (Asterisk), Stop (Hand), Pause/Resume (Question), coordinate pick success (Beep), errors (Exclamation). Toggle in Settings > Advanced > "Sound Notifications". Uses `System.Media.SystemSounds` — no external files.
|
||||
|
||||
### Fixed
|
||||
|
||||
- Peak clicks/min no longer shows absurd values on first tick (was dividing by near-zero elapsed time)
|
||||
|
||||
---
|
||||
@@ -122,6 +293,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
||||
## [1.0.3] - 2026-04-03
|
||||
|
||||
### Fixed
|
||||
|
||||
- **Critical:** Update manager still pointed to wrong repository (`autoclick/autoclick`) on installed builds. Root cause: the repo URL was stored in `AppSettings.GitHubRepo` and read from `settings.json` at runtime — stale values from older installs persisted even after reinstall. Additionally, builds prior to v1.0.3 may have shipped with old cached binaries due to file-lock issues during compilation.
|
||||
- Repo URL is now a **compile-time constant** in `UpdateService` (`https://github.com/poli0981/autoclick`). The `GitHubRepo` property has been completely removed from `AppSettings` and `settings.json`. No runtime value can override it.
|
||||
- Removed the v1.0.2 migration code (no longer necessary since the URL is hardcoded).
|
||||
@@ -135,9 +307,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
||||
## [1.0.2] - 2026-04-03
|
||||
|
||||
### Fixed
|
||||
|
||||
- **Critical:** Update manager pointed to wrong GitHub repository for users who installed v1.0.0 or v1.0.1. Existing `settings.json` files retained the old `autoclick/autoclick` URL even after the code default was corrected. Added automatic migration in `SettingsService.Load()` to detect and fix stale values on startup.
|
||||
|
||||
### Important
|
||||
>
|
||||
> **Users on v1.0.0 or v1.0.1 should upgrade to v1.0.2 or later.** Earlier versions may fail to check for updates due to the incorrect repository URL stored in local settings. v1.0.2 includes an auto-migration that fixes this permanently on first launch.
|
||||
|
||||
---
|
||||
@@ -145,6 +319,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
||||
## [1.0.1] - 2026-04-03
|
||||
|
||||
### Fixed
|
||||
|
||||
- Vietnamese translations now use proper Unicode diacritics across all `.resx` entries
|
||||
- GitHub repository URL in `AppSettings.GitHubRepo` default corrected (`autoclick/autoclick` -> `poli0981/autoclick`)
|
||||
- Document links in About view updated from `blob/main` to `blob/master` to match actual branch
|
||||
@@ -152,6 +327,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
||||
- Removed unused string resources `MaxRAM` and `FreeRAM` from all locale files
|
||||
|
||||
### Changed
|
||||
|
||||
- Hardcoded English strings in XAML replaced with localized bindings:
|
||||
- "Remove All" -> `Strings.RemoveAll`
|
||||
- "Random" button -> `Strings.Random`
|
||||
@@ -160,6 +336,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
||||
- "Random Max (s)" -> `Strings.RandomMax`
|
||||
|
||||
### Added
|
||||
|
||||
- New string resources: `RemoveAll`, `RandomMin`, `RandomMax`, `ResetStats` (EN + VI)
|
||||
- README, CHANGELOG, Code of Conduct, Developer Environment documentation
|
||||
- GitHub Issue templates (Bug Report, Feature Request) and PR template
|
||||
@@ -172,6 +349,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
||||
### Added
|
||||
|
||||
#### Core
|
||||
|
||||
- Multi-game queue with per-game click profiles (Random / Fixed interval modes)
|
||||
- Background clicking via Win32 `PostMessage` API with anti-detection jitter (+/-2px)
|
||||
- Coordinate picking: manual crosshair overlay and random generation within game window bounds
|
||||
@@ -180,6 +358,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
||||
- Duplicate game detection (prevents adding the same PID twice)
|
||||
|
||||
#### UI
|
||||
|
||||
- WPF application with MVVM architecture on .NET 8
|
||||
- Dark / Light theme toggle (defaults to system preference)
|
||||
- Multi-language support: English and Vietnamese via `.resx` resource files
|
||||
@@ -188,6 +367,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
||||
- System tray integration with double-click restore and context menu
|
||||
|
||||
#### Settings
|
||||
|
||||
- Configurable click mode, intervals, max games in queue
|
||||
- Global hotkeys: Start All (F8), Stop All (F7), Pause/Resume (F6) with live capture
|
||||
- Exit behavior setting: Minimize to Tray / Stop All & Exit / Force Exit
|
||||
@@ -199,21 +379,43 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
||||
- Reset App to factory defaults
|
||||
|
||||
#### Update
|
||||
|
||||
- Velopack auto-update via GitHub Releases API
|
||||
- Manual check / download / apply workflow in About tab
|
||||
- Auto-update on startup (optional, configurable)
|
||||
- Comprehensive GitHub API error handling: 200, 304, 403 (rate limit), 404 (no release), 429, 5xx, network errors, checksum failures
|
||||
|
||||
#### Legal & Documentation
|
||||
|
||||
- GPL-3.0 License
|
||||
- Privacy Policy, Disclaimer, Terms of Service, EULA, Acknowledgements, Security Policy
|
||||
- Anti-cheat warning banners in About view
|
||||
- AI-assisted development disclosure
|
||||
|
||||
#### Architecture
|
||||
|
||||
- 4-project solution: `AutoClick.Core`, `AutoClick.Win32`, `AutoClick.Services`, `AutoClick.UI`
|
||||
- Dependency Injection via `Microsoft.Extensions.DependencyInjection`
|
||||
- Serilog structured logging with file sink
|
||||
- Win32 P/Invoke: `PostMessage`, `EnumWindows`, `RegisterHotKey`, `GetClientRect`, `SetForegroundWindow`
|
||||
- `ManualResetEventSlim` for pause/resume, `CancellationToken` for stop
|
||||
- `DispatcherTimer` for UI refresh and process monitoring
|
||||
|
||||
[Unreleased]: https://github.com/poli0981/autoclick/compare/v2.1.0...HEAD
|
||||
[2.1.0]: https://github.com/poli0981/autoclick/compare/v2.0.3...v2.1.0
|
||||
[2.0.3]: https://github.com/poli0981/autoclick/compare/v2.0.2...v2.0.3
|
||||
[2.0.2]: https://github.com/poli0981/autoclick/compare/v2.0.1...v2.0.2
|
||||
[2.0.1]: https://github.com/poli0981/autoclick/compare/v2.0.0...v2.0.1
|
||||
[2.0.0]: https://github.com/poli0981/autoclick/compare/v1.3.4...v2.0.0
|
||||
[1.3.4]: https://github.com/poli0981/autoclick/compare/v1.3.3...v1.3.4
|
||||
[1.3.3]: https://github.com/poli0981/autoclick/compare/v1.3.2...v1.3.3
|
||||
[1.3.2]: https://github.com/poli0981/autoclick/compare/v1.3.1...v1.3.2
|
||||
[1.3.1]: https://github.com/poli0981/autoclick/compare/v1.3.0...v1.3.1
|
||||
[1.3.0]: https://github.com/poli0981/autoclick/compare/v1.2.1...v1.3.0
|
||||
[1.2.1]: https://github.com/poli0981/autoclick/compare/v1.2.0...v1.2.1
|
||||
[1.2.0]: https://github.com/poli0981/autoclick/compare/v1.1.0...v1.2.0
|
||||
[1.1.0]: https://github.com/poli0981/autoclick/compare/v1.0.3...v1.1.0
|
||||
[1.0.3]: https://github.com/poli0981/autoclick/compare/v1.0.2...v1.0.3
|
||||
[1.0.2]: https://github.com/poli0981/autoclick/compare/v1.0.1...v1.0.2
|
||||
[1.0.1]: https://github.com/poli0981/autoclick/compare/v1.0.0...v1.0.1
|
||||
[1.0.0]: https://github.com/poli0981/autoclick/releases/tag/v1.0.0
|
||||
@@ -0,0 +1,47 @@
|
||||
# AutoClick: notes for AI coding agents
|
||||
|
||||
Background auto-clicker for Windows games (WPF, .NET 10). Read [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md) for the design and [CONTRIBUTING.md](CONTRIBUTING.md) for the checks.
|
||||
|
||||
## Commands
|
||||
|
||||
```powershell
|
||||
dotnet tool restore
|
||||
dotnet build AutoClick.slnx -c Release -p:ContinuousIntegrationBuild=true # warnings are errors, like CI
|
||||
dotnet test --solution AutoClick.slnx -c Release --no-build # xUnit v3 on Microsoft.Testing.Platform
|
||||
dotnet format whitespace AutoClick.slnx --verify-no-changes
|
||||
dotnet format style AutoClick.slnx --verify-no-changes
|
||||
dotnet publish src/AutoClick.UI/AutoClick.UI.csproj -c Release -r win-x64 --self-contained true -o artifacts/publish
|
||||
./eng/Invoke-SmokeTest.ps1 -Exe artifacts/publish/AutoClick.UI.exe # every page x theme x language
|
||||
dotnet jb inspectcode AutoClick.slnx --no-build --properties:Configuration=Release --swea --format=Sarif --output=artifacts/inspectcode.sarif
|
||||
./eng/Test-InspectCode.ps1 -Sarif artifacts/inspectcode.sarif # unused-code gate
|
||||
```
|
||||
|
||||
## Rules that are easy to break
|
||||
|
||||
- **Never change** the Velopack package id `AutoClick`, the exe name `AutoClick.UI.exe`, the channel `win`, or the data folder `%LocalAppData%\AutoClick`: existing installs depend on them. The paths of the legal documents under `docs/` are linked from older releases: do not move them.
|
||||
- **Version** lives only in `Directory.Build.props`. CI packs a dry-run release with the notes from `CHANGELOG.md`, so a version bump needs a `## [X.Y.Z]` section there.
|
||||
- **File formats:** profiles keep the 1.x JSON layout (property names, enums as numbers); settings and sessions are versioned and old versions must keep loading. JSON uses reflection-based `System.Text.Json` (source generation overwrote `init` defaults).
|
||||
- **Layers:** Core has no Windows dependencies; Services and Win32 reference only Core; view models never reference `Views` or `Overlays` (architecture tests).
|
||||
- **UI text:** only through `Strings*.resx` (`{l:Loc Key}` in XAML, `L.Get`/`L.Format` in code), present in all five languages with identical placeholders; unused keys and hard-coded XAML text fail the architecture tests.
|
||||
- **No unused code:** InspectCode with solution-wide analysis fails CI on unused members, types, parameters and usings.
|
||||
- **Win32:** new APIs go in `src/AutoClick.Win32/NativeMethods.txt` (CsWin32). Coordinate work happens inside `DpiScope.ForWindow(game)`.
|
||||
- **Overlays** are positioned with `WindowGeometry.SetBounds` in physical pixels, never with WPF `Left/Top`.
|
||||
- **Accessibility** ([docs/ACCESSIBILITY.md](docs/ACCESSIBILITY.md), rules in CONTRIBUTING): icon-only controls, inputs and lists get `AutomationProperties.Name="{l:Loc …}"`, list items a readable name; changing text uses `controls:LiveTextBlock` (a `TextBlock` with `LiveSetting` is never announced), never for per-second values; the smoke test fails on unnamed focusable controls. The path `docs/ACCESSIBILITY.md` is linked from the app: do not move it.
|
||||
|
||||
## Pitfalls seen before
|
||||
|
||||
- WPF projects do not get `System.IO` as an implicit using (it is added in the csproj).
|
||||
- Adding a `<Resource>` item is not picked up by an incremental build: rebuild with `--no-incremental`.
|
||||
- CommunityToolkit.Mvvm requires the Windows SDK projection at build time; the UI project removes the projection DLL from the output afterwards (`DropWindowsSdkProjection`). Do not set `IncludeWindowsSDKRefFrameworkReferences=false`.
|
||||
- WPF-UI's `NavigationView` with a `LeftFluent` pane must not have the title bar overlaid on it (the first item would sit under the title bar); the title bar has its own grid row.
|
||||
- Every page sets `Foreground="{DynamicResource TextFillColorPrimaryBrush}"` on its `<Page>`. WPF-UI's implicit `Page` style never reaches page subclasses, and the navigation frame passes the window's text color on only after a theme change, so in 2.0.0 text and icons without a color of their own were black in Dark until the theme was switched. The smoke test checks it and, like `AppCoordinator`, applies the theme before showing the window (applied afterwards, it hides the bug).
|
||||
- Theme colors come from `{DynamicResource …Brush}`. `ui:TextBlock Appearance` looks its brush up once and does not follow theme changes.
|
||||
- LiveCharts' WPF charts always use the light LiveCharts theme and clear their canvas white unless `Background` is a solid brush: keep `Background="Transparent"` and paint the text from the WPF-UI theme (`DashboardViewModel.ApplyThemeAndTexts`).
|
||||
- `ThemeService.ThemeChanged` relays WPF-UI's `ApplicationThemeManager.Changed`, so it also fires when Windows switches the theme; it is raised asynchronously, once per burst.
|
||||
- The smoke test uses `%TEMP%\AutoClick-smoke`. A normal run uses `%LocalAppData%\AutoClick`, which is also the folder of an installed AutoClick (and a running installed copy takes over through the single-instance pipe): delete it after local manual tests only if it did not exist before.
|
||||
- SonarQube Cloud runs in CI (`.github/workflows/sonarcloud.yml`, secret `SONAR_TOKEN`). Its Automatic Analysis must stay off, or the scan fails; it also counted `tests/` as product code and could not see CsWin32's generated code. Suppress a finding only with `[SuppressMessage]` and a `Justification`.
|
||||
- Commits in this repository are GPG-signed; never bypass signing.
|
||||
|
||||
## Releasing
|
||||
|
||||
Tag `vX.Y.Z` → the release workflow uploads a **draft** (full package, SBOM, attestations) → test the update from the previous releases in Windows Sandbox (`eng/Invoke-UpgradeTest.ps1`) → publish from the maintainer's account (`gh release edit vX.Y.Z --draft=false`). Tags are protected: fix mistakes with a new patch version. Details: [docs/RELEASING.md](docs/RELEASING.md).
|
||||
@@ -0,0 +1,90 @@
|
||||
# Contributing to AutoClick
|
||||
|
||||
Thanks for helping! Bug reports, translations and code are all welcome. Please follow the [Code of Conduct](docs/CODE_OF_CONDUCT.md); report security problems privately as described in the [Security Policy](docs/SECURITY.md).
|
||||
|
||||
## Setting up
|
||||
|
||||
- Windows 10 version 2004 or later, or Windows 11 (x64)
|
||||
- The .NET SDK version in [`global.json`](global.json) (10.0.4xx)
|
||||
- Then:
|
||||
|
||||
```bash
|
||||
dotnet tool restore
|
||||
dotnet build AutoClick.slnx
|
||||
dotnet test --solution AutoClick.slnx
|
||||
```
|
||||
|
||||
The design is described in [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md); the test tools (click target window, smoke test, Windows Sandbox) in [docs/DEV_ENVIRONMENT.md](docs/DEV_ENVIRONMENT.md).
|
||||
|
||||
## Pull requests
|
||||
|
||||
`master` is protected: changes arrive through pull requests, and these checks must pass before merging.
|
||||
|
||||
| Check | What it verifies | Run it locally |
|
||||
|-------|------------------|----------------|
|
||||
| **build-test** | Formatting, a build with warnings as errors, all tests with coverage minimums (Core 90%, Services 70%), the published app's smoke test in every theme and language (text colors, binding errors, accessible names), and a Velopack packaging dry run | see below |
|
||||
| **dead-code** | No unused code (ReSharper InspectCode with solution-wide analysis) and no XAML bindings to missing properties | see below |
|
||||
| **licenses** | Every shipped package has a GPL-3.0-compatible license ([`eng/licenses`](eng/licenses)) | `./eng/New-ThirdPartyNotices.ps1 -OutFile artifacts/THIRD-PARTY-NOTICES.txt` |
|
||||
| **vuln-audit** | No known vulnerability in direct or transitive packages | `./eng/Test-VulnerablePackages.ps1` |
|
||||
| **dependency-review** | The pull request adds no vulnerable package and no disallowed license (build and test tools that are never shipped are exempt; the list is in the workflow) | GitHub only |
|
||||
| **analyze (csharp)** | CodeQL security analysis | GitHub only |
|
||||
|
||||
SonarQube Cloud also analyzes every pull request from this repository (the **sonarcloud** check, not required): issues, security hotspots and test coverage of the changed code. Pull requests from forks and Dependabot skip it because they cannot read the `SONAR_TOKEN` secret.
|
||||
|
||||
Local equivalents of build-test and dead-code (PowerShell):
|
||||
|
||||
```powershell
|
||||
dotnet format whitespace AutoClick.slnx --verify-no-changes
|
||||
dotnet format style AutoClick.slnx --verify-no-changes
|
||||
dotnet build AutoClick.slnx -c Release -p:ContinuousIntegrationBuild=true
|
||||
dotnet test --solution AutoClick.slnx -c Release --no-build
|
||||
|
||||
dotnet publish src/AutoClick.UI/AutoClick.UI.csproj -c Release -r win-x64 --self-contained true -o artifacts/publish
|
||||
./eng/Invoke-SmokeTest.ps1 -Exe artifacts/publish/AutoClick.UI.exe
|
||||
|
||||
dotnet jb inspectcode AutoClick.slnx --no-build --properties:Configuration=Release --swea --format=Sarif --output=artifacts/inspectcode.sarif
|
||||
./eng/Test-InspectCode.ps1 -Sarif artifacts/inspectcode.sarif
|
||||
```
|
||||
|
||||
Please also:
|
||||
|
||||
- Describe what changed and why, and how you tested it (a game, or `tools/AutoClick.ClickTarget`).
|
||||
- Add user-visible changes under `[Unreleased]` in [`CHANGELOG.md`](CHANGELOG.md).
|
||||
- Use [Conventional Commits](https://www.conventionalcommits.org/) style messages (`fix:`, `feat:`, `docs:`, `ci:`, `chore:`).
|
||||
|
||||
## Code guidelines
|
||||
|
||||
- **Layers:** `AutoClick.Core` has no Windows dependencies; `AutoClick.Win32` and `AutoClick.Services` depend only on Core; the UI uses all three. View models never reference views or overlays. Architecture tests enforce this.
|
||||
- **Style:** `.editorconfig` and the .NET analyzers (`latest-recommended`) are enforced; CI treats warnings as errors.
|
||||
- **Models** are immutable records with a `Normalize()` that clamps every value read from disk or from the user.
|
||||
- **File formats are a contract:** profiles keep the 1.x JSON layout (property names, enums as numbers) so 1.x can still read them; settings and sessions are versioned (`schemaVersion`) and older versions must keep loading. Add tests with fixture files under `tests/Fixtures` for any change.
|
||||
- **Win32:** add new APIs to `src/AutoClick.Win32/NativeMethods.txt` (CsWin32). Anything that converts game coordinates runs inside a `DpiScope` for the game window.
|
||||
- **No unused code:** the dead-code check fails on it. For a deliberate exception, write `// ReSharper disable once <rule>` with a reason.
|
||||
- **SonarQube Cloud findings** are fixed, or, when the code is right as it is, suppressed with `[SuppressMessage("Category", "Sxxxx:Title", Justification = "why")]`.
|
||||
|
||||
## Accessibility
|
||||
|
||||
AutoClick must stay usable with the keyboard alone and with a screen reader; see [docs/ACCESSIBILITY.md](docs/ACCESSIBILITY.md). For every change to the interface:
|
||||
|
||||
- **Names:** a control that shows only an icon, an input and a list get `AutomationProperties.Name="{l:Loc Key}"`. List items need a readable name: a `ToString()` that returns the visible text, or an `AutomationProperties.Name` in the `ItemContainerStyle`. The smoke test fails on a control that can be reached with the keyboard and has no name, and on a list item that would be read as a type name or a record dump.
|
||||
- **Keyboard:** everything can be done without a mouse, in a sensible Tab order, and `Esc` leaves dialogs and overlays. Drag and drop always has a button alternative. A container that does nothing itself (a card, a list of cards) is not a Tab stop.
|
||||
- **Announcements:** text that changes on its own (a state, a status, an error) uses `controls:LiveTextBlock` with `AutomationProperties.LiveSetting`, which raises the event screen readers listen to; a plain `TextBlock` with `LiveSetting` is never read. Do not make a countdown or a value that changes every second a live region. A message that is not on screen goes through `DialogService.Announce`; toasts already do.
|
||||
- **Headings:** page titles are `AutomationProperties.HeadingLevel="Level1"`, section titles `Level2` (or `Level3` inside a card).
|
||||
- **Color and motion:** color is never the only signal (add text or a name), colors come from theme resources, and animations respect `Motion.IsEnabled` (the Windows *Animation effects* setting).
|
||||
- **Check it:** press `Tab` through the changed screen with the mouse unplugged, and listen to it once with Narrator (`Ctrl+Win+Enter`). Mention both in the pull request.
|
||||
|
||||
## Translations
|
||||
|
||||
All UI text lives in `src/AutoClick.UI/Resources/Strings.resx` (English) and `Strings.vi/ja/ko/zh.resx`. Keys are `Group_Name` (for example `Queue_AddGame`).
|
||||
|
||||
- Use text in XAML with `{l:Loc Key}` and in code with `L.Get("Key")` or `L.Format("Key", args)`.
|
||||
- Every key must exist in all five files with the same `{0}` placeholders, and every key must be used: architecture tests check both, and also reject hard-coded text in XAML.
|
||||
- The current translations are AI-generated; corrections by native speakers are very welcome.
|
||||
|
||||
## Dependencies
|
||||
|
||||
Package versions are central in [`Directory.Packages.props`](Directory.Packages.props) and build tools in [`.config/dotnet-tools.json`](.config/dotnet-tools.json). Dependabot proposes updates weekly; patch and minor updates merge automatically once CI is green. A new license must be compatible with the GPL-3.0 and added to `eng/licenses/allowed-licenses.json` (used by both license checks).
|
||||
|
||||
## Releasing
|
||||
|
||||
Maintainers follow [docs/RELEASING.md](docs/RELEASING.md).
|
||||
@@ -0,0 +1,50 @@
|
||||
<Project>
|
||||
|
||||
<!-- Single source of truth for the product version (release tags must match it). -->
|
||||
<PropertyGroup>
|
||||
<Version>2.1.0</Version>
|
||||
<AssemblyVersion>$(Version).0</AssemblyVersion>
|
||||
<FileVersion>$(Version).0</FileVersion>
|
||||
<InformationalVersion>$(Version)</InformationalVersion>
|
||||
<!-- Keep InformationalVersion as "X.Y.Z" (no "+<commit>" suffix) so the UI shows a clean version. -->
|
||||
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<Product>AutoClick</Product>
|
||||
<Company>poli0981</Company>
|
||||
<Authors>poli0981</Authors>
|
||||
<Copyright>Copyright (c) 2026 poli0981. Licensed under GPL-3.0.</Copyright>
|
||||
<NeutralLanguage>en</NeutralLanguage>
|
||||
<RepositoryUrl>https://github.com/poli0981/autoclick</RepositoryUrl>
|
||||
<RepositoryType>git</RepositoryType>
|
||||
<PackageLicenseExpression>GPL-3.0-only</PackageLicenseExpression>
|
||||
<IsPackable>false</IsPackable>
|
||||
|
||||
<LangVersion>latest</LangVersion>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Deterministic>true</Deterministic>
|
||||
|
||||
<!-- Analyzers: SDK rules at the recommended level, code style enforced at build time.
|
||||
GenerateDocumentationFile is required for IDE0005 (unnecessary usings) to run in builds. -->
|
||||
<AnalysisLevel>latest-recommended</AnalysisLevel>
|
||||
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
<NoWarn>$(NoWarn);CS1591</NoWarn>
|
||||
|
||||
<!-- Only ship satellite resources for the languages the app supports. -->
|
||||
<SatelliteResourceLanguages>en;vi;ja;ko;zh;zh-Hans</SatelliteResourceLanguages>
|
||||
</PropertyGroup>
|
||||
|
||||
<!--
|
||||
CI builds pass -p:ContinuousIntegrationBuild=true. They treat every warning as an error,
|
||||
except NuGet audit advisories (NU1900-NU1905): a newly published advisory must not break
|
||||
unrelated builds, it is reported by the dedicated vulnerability scan instead.
|
||||
-->
|
||||
<PropertyGroup Condition="'$(ContinuousIntegrationBuild)' == 'true'">
|
||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||
<WarningsNotAsErrors>$(WarningsNotAsErrors);NU1900;NU1901;NU1902;NU1903;NU1904;NU1905</WarningsNotAsErrors>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
@@ -0,0 +1,43 @@
|
||||
<Project>
|
||||
|
||||
<PropertyGroup>
|
||||
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
|
||||
<!-- PackageVersion entries below also pin transitive dependencies. -->
|
||||
<CentralPackageTransitivePinningEnabled>true</CentralPackageTransitivePinningEnabled>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup Label="Application">
|
||||
<PackageVersion Include="CommunityToolkit.Mvvm" Version="8.4.2" />
|
||||
<PackageVersion Include="H.NotifyIcon.Wpf" Version="2.4.1" />
|
||||
<PackageVersion Include="LiveChartsCore" Version="2.0.5" />
|
||||
<PackageVersion Include="LiveChartsCore.SkiaSharpView" Version="2.0.5" />
|
||||
<PackageVersion Include="LiveChartsCore.SkiaSharpView.WPF" Version="2.0.5" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Hosting" Version="10.0.14" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="10.0.14" />
|
||||
<PackageVersion Include="Microsoft.Windows.CsWin32" Version="0.3.367" />
|
||||
<PackageVersion Include="Serilog" Version="4.4.0" />
|
||||
<PackageVersion Include="Serilog.Extensions.Hosting" Version="10.0.0" />
|
||||
<PackageVersion Include="Serilog.Sinks.Async" Version="2.1.0" />
|
||||
<PackageVersion Include="Serilog.Sinks.File" Version="7.0.0" />
|
||||
<PackageVersion Include="Velopack" Version="1.2.161" />
|
||||
<PackageVersion Include="WPF-UI" Version="4.3.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<!-- Transitive pins: LiveCharts2 does not support SkiaSharp 4 yet (Live-Charts/LiveCharts2#2366);
|
||||
3.119.4 carries the bundled libpng/libexpat security fixes. -->
|
||||
<ItemGroup Label="Transitive pins">
|
||||
<PackageVersion Include="SkiaSharp" Version="3.119.4" />
|
||||
<PackageVersion Include="SkiaSharp.HarfBuzz" Version="3.119.4" />
|
||||
<PackageVersion Include="SkiaSharp.NativeAssets.Win32" Version="3.119.4" />
|
||||
<PackageVersion Include="SkiaSharp.Views.Desktop.Common" Version="3.119.4" />
|
||||
<PackageVersion Include="SkiaSharp.Views.WPF" Version="3.119.4" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Label="Tests">
|
||||
<PackageVersion Include="Microsoft.Extensions.TimeProvider.Testing" Version="10.11.0" />
|
||||
<PackageVersion Include="Microsoft.Testing.Extensions.CodeCoverage" Version="18.12.0" />
|
||||
<PackageVersion Include="TngTech.ArchUnitNET.xUnitV3" Version="0.13.4" />
|
||||
<PackageVersion Include="xunit.v3" Version="4.0.2" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -1,163 +1,159 @@
|
||||
# AutoClick
|
||||
|
||||
<p align="center">
|
||||
<strong>Auto-click utility for games on Windows</strong><br/>
|
||||
Background clicking via Win32 API • Multi-point sequences • Per-point click types • Real-time dashboard • 5 languages
|
||||
<strong>Background auto-clicker for Windows games</strong><br/>
|
||||
Clicks and key presses sent to game windows without moving your mouse • multi-step sequences • several games at once • 5 languages
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://github.com/poli0981/autoclick/releases/latest"><img alt="Latest release" src="https://img.shields.io/github/v/release/poli0981/autoclick?sort=semver"></a>
|
||||
<a href="https://github.com/poli0981/autoclick/actions/workflows/ci.yml"><img alt="CI" src="https://github.com/poli0981/autoclick/actions/workflows/ci.yml/badge.svg?branch=master"></a>
|
||||
<a href="https://github.com/poli0981/autoclick/actions/workflows/codeql.yml"><img alt="CodeQL" src="https://github.com/poli0981/autoclick/actions/workflows/codeql.yml/badge.svg?branch=master"></a>
|
||||
<a href="https://scorecard.dev/viewer/?uri=github.com/poli0981/autoclick"><img alt="OpenSSF Scorecard" src="https://api.scorecard.dev/projects/github.com/poli0981/autoclick/badge"></a>
|
||||
<a href="LICENSE"><img alt="License: GPL-3.0" src="https://img.shields.io/github/license/poli0981/autoclick"></a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://github.com/poli0981/autoclick/releases">Releases</a> •
|
||||
<a href="#features">Features</a> •
|
||||
<a href="#installation">Installation</a> •
|
||||
<a href="#usage">Usage</a> •
|
||||
<a href="#building-from-source">Building</a> •
|
||||
<a href="#connect--support">Connect & Support</a> •
|
||||
<a href="#legal">Legal</a>
|
||||
</p>
|
||||
|
||||
---
|
||||
|
||||
> **Recommended: v1.2.0+** — Older versions (v1.0.0~v1.0.2) have a broken update URL. Download the latest from the [Releases page](https://github.com/poli0981/autoclick/releases).
|
||||
AutoClick sends mouse clicks and key presses to game windows with the Win32 `PostMessage` API. It runs as a separate program, does not modify or inject into games, and leaves your own mouse and keyboard free while it works.
|
||||
|
||||
## About
|
||||
> **Anti-cheat warning:** games with kernel-level anti-cheat (EasyAntiCheat, BattlEye, Vanguard, ...) may detect automation. **Use at your own risk**; the developer is not responsible for account bans. See the [Disclaimer](docs/DISCLAIMER.md) and [EULA](docs/EULA.md).
|
||||
>
|
||||
> **Hardware warning:** running several games at once raises CPU, memory and GPU load. Make sure your PC meets each game's requirements. See the [Disclaimer](docs/DISCLAIMER.md).
|
||||
>
|
||||
> **AI disclosure:** AutoClick is built with AI assistance (Claude by Anthropic). The in-app translations are AI-generated and may contain mistakes. See [Acknowledgements](docs/ACKNOWLEDGEMENTS.md).
|
||||
|
||||
AutoClick is a Windows desktop application that automates repetitive mouse clicking in games using Win32 `PostMessage` API. It runs as a separate process and sends click events to game windows in the background -- no game modification required.
|
||||
## What's new in 2.1
|
||||
|
||||
> **Anti-Cheat Warning:** Games with kernel-level anti-cheat (EasyAntiCheat, BattlEye, Vanguard, etc.) may detect this tool. **Use at your own risk.** The developer is not responsible for any account bans. See [DISCLAIMER](docs/DISCLAIMER.md) and [EULA](docs/EULA.md).
|
||||
Accessibility: points can be picked with the keyboard, screen readers now announce status changes and messages and read every control and step, and animations follow Windows. See the [Accessibility statement](docs/ACCESSIBILITY.md) and the [CHANGELOG](CHANGELOG.md#210---2026-11-09).
|
||||
|
||||
> **System Requirements Warning:** Running multiple games simultaneously increases CPU, RAM, and GPU usage significantly. **Ensure your system meets the minimum requirements specified by each game's developer.** The developer is not responsible for hardware damage, overheating, system instability, or data loss caused by running multiple games beyond your system's capacity. See [DISCLAIMER](docs/DISCLAIMER.md).
|
||||
## What's new in 2.0
|
||||
|
||||
> **AI Disclosure:** This software was built with AI assistance (Claude by Anthropic). In-app translations are AI-generated and may not be fully accurate. See [ACKNOWLEDGEMENTS](docs/ACKNOWLEDGEMENTS.md).
|
||||
A new Fluent interface, administrator rights only when a game needs them, keystroke steps that survive saving, a picker that works on every monitor and display scaling, sessions that wait while a game is minimized, and fixes for every known 1.x bug. Settings, profiles and hotkeys from 1.x carry over. Full list: [CHANGELOG](CHANGELOG.md#200---2026-10-15).
|
||||
|
||||
## Features
|
||||
|
||||
- **Multi-game queue** -- add multiple games, each with independent click profiles
|
||||
- **Multi-point click sequences** -- add multiple coordinates per game, executed in order with configurable delay between points (`#1 → #2 → #3 → [interval] → repeat`)
|
||||
- **Click type per point** -- each point can be Left Click, Double Click, or Right Click independently (press `1`/`2`/`3` in picker)
|
||||
- **Click modes** -- Fixed interval or Random interval (configurable min/max), Global or Custom (per-game) settings
|
||||
- **Coordinate picking** -- Manual crosshair picker or random generation within game window
|
||||
- **Background clicking** -- Uses `PostMessage` with `WM_MOUSEMOVE` + anti-detection jitter, works on game dialogs and choice screens
|
||||
- **Pixel color guard** -- optionally verify pixel color before clicking; skip or stop on mismatch (configurable tolerance)
|
||||
- **Game profiles** -- save/load coordinate sets + click settings as named presets; export/import `.autoclick` files
|
||||
- **Scheduler** -- set start/stop times for automated sessions with live countdown
|
||||
- **Click heatmap overlay** -- transparent click-through layer over the game window plotting click frequency as a blue→red gradient, foreground-aware so only the active game's heatmap shows (compat: ✅ Windowed / ✅ Borderless / ⚠️ Fullscreen — engine-dependent, see [HEATMAP_COMPATIBILITY.md](docs/HEATMAP_COMPATIBILITY.md))
|
||||
- **Real-time dashboard** -- CPM line chart, per-game breakdown, success/skip ratio pie, per-game CPM timeline, session summary cards, JSON stats export
|
||||
- **Session statistics** -- live stats bar: Total Clicks, Skipped, Uptime, Clicks/min, Peak CPM
|
||||
- **Game exit notifications** -- balloon notification when a game process exits; auto-stop when queue is empty
|
||||
- **Sound notifications** -- system sounds for Start, Stop, Pause, coordinate pick, errors (toggleable)
|
||||
- **Global hotkeys** -- Start All (F8), Stop All (F7), Pause/Resume (F6), fully customizable
|
||||
- **Dark / Light theme** -- toggle in settings, defaults to system preference
|
||||
- **5 languages** -- English, Tiếng Việt, 日本語, 한국어, 中文
|
||||
- **System tray** -- minimize to tray, configurable exit behavior
|
||||
- **Auto-update** -- via Velopack + GitHub Releases, optional on startup
|
||||
- **Settings persistence** -- JSON file at `%LocalAppData%\AutoClick\`, export/import supported
|
||||
- **Comprehensive logging** -- real-time log panel + file export
|
||||
|
||||
## Tech Stack
|
||||
|
||||
| Layer | Technology |
|
||||
|-------|------------|
|
||||
| UI | WPF (.NET 8), MVVM pattern |
|
||||
| Charts | LiveChartsCore + SkiaSharp |
|
||||
| Click engine | Win32 `PostMessage` via P/Invoke |
|
||||
| Game detection | `EnumWindows` + process filtering |
|
||||
| Hotkeys | `RegisterHotKey` global hooks |
|
||||
| Update | Velopack + GitHub Releases API |
|
||||
| Logging | Serilog (file + in-memory) |
|
||||
| DI | Microsoft.Extensions.DependencyInjection |
|
||||
- **Game queue**: add up to 50 game windows (10 by default), each with its own steps and statistics; start, pause, resume and stop them one by one or all together.
|
||||
- **Step sequences**: left click, double click, right click or a key press per step, run in order with a delay between steps, then repeated after the interval.
|
||||
- **Timing**: fixed or random interval (1 s to 1 h). *Global* mode uses one timing for every game; *Custom* mode gives each game its own timing and profiles.
|
||||
- **Coordinate picker**: a crosshair over exactly the game's window area, on any monitor and display scaling. Click the spot, or move with the arrow keys and press `Enter`. Keys `1`-`4` switch between left, double, right click and key press; `Esc` cancels. Or add a random point.
|
||||
- **Pixel color guard**: remember the color under each point and only click while it still matches; otherwise skip the step, stop, or wait until it matches.
|
||||
- **Profiles**: save, load, import and export steps and timing (`.autoclick` files).
|
||||
- **Sessions**: export or import everything (settings, profiles and the game queue) in one `.autoclick-session` file.
|
||||
- **Scheduler**: start everything at a time of day and optionally stop at another (overnight windows work).
|
||||
- **Heatmap overlay**: where the clicks landed, drawn over the game window while the game is in front.
|
||||
- **Dashboard**: clicks per minute (live), clicked vs. skipped, per-game breakdown and timeline, CSV export.
|
||||
- **Global hotkeys**: Pause/Resume all (`F6`), Stop all (`F7`), Start all (`F8`), changeable, with conflict detection.
|
||||
- **Administrator only when needed**: AutoClick tells you when a game runs as administrator and offers to restart elevated.
|
||||
- **Notifications and tray**: notification-area icon, a notice when a game exits, optional sounds; closing the window can minimize to the tray, stop and exit, or exit.
|
||||
- **Themes and languages**: System, Light, Dark or High contrast; English, Tiếng Việt, 日本語, 한국어, 中文, switchable without a restart.
|
||||
- **Accessibility**: works with the keyboard alone (the coordinate picker included) and with Narrator, follows Windows contrast themes, display scaling and animation settings. See the [Accessibility statement](docs/ACCESSIBILITY.md).
|
||||
- **Updates**: from GitHub Releases through Velopack, checked at startup and every 6 hours, installed when you choose or when you exit.
|
||||
|
||||
## Requirements
|
||||
|
||||
| | Minimum | Recommended |
|
||||
|---|---|---|
|
||||
| **OS** | Windows 8.1 (x64) | Windows 10 22H2+ (x64) |
|
||||
| **RAM** | 4 GB | 8 GB+ |
|
||||
| **CPU** | Dual-core (x64) | Quad-core (x64) |
|
||||
| **Runtime** | None (self-contained) | None (self-contained) |
|
||||
| | |
|
||||
|---|---|
|
||||
| **Windows** | Windows 10 version 2004 (build 19041) or later, or Windows 11 |
|
||||
| **CPU** | 64-bit (x64) |
|
||||
| **Runtime** | Included (.NET 10, self-contained): nothing else to install |
|
||||
| **Rights** | Standard user. Administrator only for games that run as administrator |
|
||||
|
||||
- No additional runtime required — the release is **self-contained** (includes .NET 8 runtime)
|
||||
- **Windows 8.1** requires [Visual C++ Redistributable 2015 (Legacy)](https://www.microsoft.com/en-us/download/details.aspx?id=48145) and is limited to v1.1.0 (no dashboard). **Windows 7 is not supported.**
|
||||
- Administrator privileges required for global hotkeys and PostMessage to elevated processes
|
||||
- **For multi-game usage:** Ensure your system meets the minimum hardware requirements specified by each game's developer. Running multiple games simultaneously increases CPU, RAM, and GPU load significantly.
|
||||
|
||||
See [System Requirements](docs/SYSTEM_REQUIREMENTS.md) for tested configurations, compatibility matrix, and performance notes.
|
||||
Games work best in **windowed or borderless** mode. See [System Requirements](docs/SYSTEM_REQUIREMENTS.md) for tested configurations and the [heatmap compatibility notes](docs/HEATMAP_COMPATIBILITY.md).
|
||||
|
||||
## Installation
|
||||
|
||||
### From Release (recommended)
|
||||
1. Open the [latest release](https://github.com/poli0981/autoclick/releases/latest).
|
||||
2. Download **`AutoClick-win-Setup.exe`** (installs for your Windows account, no administrator prompt, and updates itself) or **`AutoClick-win-Portable.zip`** (unzip anywhere).
|
||||
3. Windows SmartScreen may warn that the app is unrecognized because the files are not code-signed. Choose **More info → Run anyway** if the file came from this repository's Releases page.
|
||||
|
||||
1. Go to [Releases](https://github.com/poli0981/autoclick/releases)
|
||||
2. Download the latest `.exe` installer (self-contained, no .NET runtime needed)
|
||||
3. Run and follow the setup wizard
|
||||
To check that a download was built by this repository's release workflow, use the [GitHub CLI](https://cli.github.com/):
|
||||
|
||||
### From Source
|
||||
```bash
|
||||
gh attestation verify AutoClick-win-Setup.exe -R poli0981/autoclick
|
||||
```
|
||||
|
||||
**Upgrading from 1.x:** update from inside AutoClick or run the new installer. Settings, profiles and hotkeys are migrated; the 1.x settings file is kept unchanged so 1.x still works if you go back. Because 1.x always ran as administrator, AutoClick 2 keeps doing so for upgraded installs until you turn it off (a notice explains how).
|
||||
|
||||
**Uninstalling** removes AutoClick and its data folder `%LocalAppData%\AutoClick`, including saved profiles: export the ones you want to keep first.
|
||||
|
||||
## Usage
|
||||
|
||||
1. **Add game** and pick the game's window.
|
||||
2. **Add step** and click the spot in the game, or move to it with the arrow keys and press `Enter` (or press `4`, then the key to send). Repeat for more steps; **Random point** adds one automatically.
|
||||
3. Press **Start** on the game card, or **Start all**.
|
||||
4. Watch clicks, skips and clicks per minute on the card and on the **Dashboard**; use **Heatmap** to see where clicks land.
|
||||
5. **Settings** holds timing, the pixel color guard, hotkeys, theme, language, exit behavior and administrator mode; changes apply immediately.
|
||||
|
||||
Data lives in `%LocalAppData%\AutoClick`: `settings.v2.json`, `profiles\`, and `logs\` (daily files; the 14 most recent are kept). See the [Privacy Policy](docs/PRIVACY_POLICY.md).
|
||||
|
||||
## Building from source
|
||||
|
||||
Requirements: Windows 10/11 x64 and the .NET SDK version in [`global.json`](global.json) (10.0.4xx).
|
||||
|
||||
```bash
|
||||
git clone https://github.com/poli0981/autoclick.git
|
||||
cd autoclick
|
||||
dotnet build
|
||||
dotnet tool restore
|
||||
dotnet build AutoClick.slnx
|
||||
dotnet test --solution AutoClick.slnx
|
||||
dotnet run --project src/AutoClick.UI
|
||||
```
|
||||
|
||||
## Usage
|
||||
| Project | Contents |
|
||||
|---|---|
|
||||
| `src/AutoClick.Core` | Models, settings and file formats (with 1.x migration), scheduling, hotkey parsing, DPI math. No Windows dependencies. |
|
||||
| `src/AutoClick.Win32` | Win32 interop (CsWin32): input, windows, pixels, DPI scopes, hotkeys, WinEvent hooks, elevation. |
|
||||
| `src/AutoClick.Services` | Click engine, settings/profile/session stores, scheduler, updates, log buffer. |
|
||||
| `src/AutoClick.UI` | WPF application (WPF-UI, MVVM), overlays, tray, localization. |
|
||||
| `tests/` | Core, Services, Win32 and architecture tests (xUnit v3). |
|
||||
| `tools/AutoClick.ClickTarget` | A test window that logs every click and key it receives. |
|
||||
|
||||
1. **Add Game** -- click "Add Game", select a running game window
|
||||
2. **Add Points** -- click "Add Point" (crosshair picker) or "Random" to build a click sequence. Add multiple points for multi-step automation
|
||||
3. **Set Delay** -- when >1 point exists, set delay between points (ms) for the sequence timing
|
||||
4. **Start** -- click "Start" on individual games, or "Start All" for all at once
|
||||
5. **Monitor** -- watch live stats (Total Clicks, Uptime, Clicks/min, Peak) on the stats bar
|
||||
6. **Configure** -- go to Settings tab to adjust intervals, hotkeys, theme, language, sounds
|
||||
|
||||
### Settings
|
||||
|
||||
Settings are saved to `%LocalAppData%\AutoClick\settings.json` and loaded on startup. You can:
|
||||
- Export / Import settings as JSON
|
||||
- Open the settings file directly from the app
|
||||
- Reset to factory defaults
|
||||
|
||||
## Project Structure
|
||||
|
||||
```
|
||||
src/
|
||||
AutoClick.Core/ # Models, Enums, Interfaces (no dependencies)
|
||||
AutoClick.Win32/ # P/Invoke wrappers (NativeMethods, InputSimulator, WindowHelper)
|
||||
AutoClick.Services/ # Business logic (ClickEngine, GameDetector, Settings, Hotkey, Log)
|
||||
AutoClick.UI/ # WPF app (Views, ViewModels, Themes, Resources, Converters)
|
||||
docs/ # Legal documents
|
||||
```
|
||||
See [CONTRIBUTING](CONTRIBUTING.md) for the checks every pull request must pass and [ARCHITECTURE](docs/ARCHITECTURE.md) for the design and its decisions.
|
||||
|
||||
## Contributing
|
||||
|
||||
Contributions are welcome! Please read the guidelines below before submitting.
|
||||
Issues and pull requests are welcome; please read [CONTRIBUTING](CONTRIBUTING.md) and the [Code of Conduct](docs/CODE_OF_CONDUCT.md). Accessibility barriers have their own [issue form](https://github.com/poli0981/autoclick/issues/new?template=accessibility.yml). Issues and pull requests that contain suspicious code or links, are unrelated to the project, or are disrespectful are closed without discussion. Report security problems privately as described in the [Security Policy](docs/SECURITY.md).
|
||||
|
||||
### Issue & PR Templates
|
||||
## Connect & Support
|
||||
|
||||
This repo provides built-in templates for [Bug Reports](.github/ISSUE_TEMPLATE/bug_report.yml), [Feature Requests](.github/ISSUE_TEMPLATE/feature_request.yml), and [Pull Requests](.github/PULL_REQUEST_TEMPLATE.md). You may use these templates or write your own, as long as required fields are included.
|
||||
- **Discord**: [discord.gg/kDM9GMu5vm](https://discord.gg/kDM9GMu5vm)
|
||||
- **Other profiles** (X, YouTube, Bluesky, Mastodon, Steam, ...): [docs/social.md](docs/social.md) ([tiếng Việt](docs/i18n/vi/social.md))
|
||||
- **Bugs and ideas**: [Bug report](https://github.com/poli0981/autoclick/issues/new?template=bug_report.yml), [Feature request](https://github.com/poli0981/autoclick/issues/new?template=feature_request.yml), or [Discussions](https://github.com/poli0981/autoclick/discussions)
|
||||
|
||||
### Auto-Ignore Policy
|
||||
If AutoClick saves you time, consider supporting its development:
|
||||
|
||||
Issues and PRs will be automatically ignored if they:
|
||||
- Contain suspicious code or links (potential malware/data theft)
|
||||
- Discuss topics unrelated to this project
|
||||
- Are excessively verbose, vague, or off-topic
|
||||
- Insult or disrespect any contributor to this repository
|
||||
[](https://github.com/sponsors/poli0981)
|
||||
[](https://ko-fi.com/skullmute)
|
||||
[](https://www.patreon.com/skullmute)
|
||||
[](https://www.buymeacoffee.com/skullmute)
|
||||
[](https://paypal.me/DungDang212)
|
||||
|
||||
Suspicious PRs will be reviewed in a sandboxed VM before merge.
|
||||
|
||||
See [Code of Conduct](docs/CODE_OF_CONDUCT.md) for community guidelines.
|
||||
The PC used to build and test releases is described in [docs/pc_spec.md](docs/pc_spec.md) ([tiếng Việt](docs/i18n/vi/pc_spec.md)).
|
||||
|
||||
## Legal
|
||||
|
||||
| Document | Description |
|
||||
|----------|-------------|
|
||||
| [LICENSE](LICENSE) | GPL-3.0 |
|
||||
| [System Requirements](docs/SYSTEM_REQUIREMENTS.md) | Tested configs, min/recommended specs, compatibility matrix |
|
||||
| [Privacy Policy](docs/PRIVACY_POLICY.md) | No data collection, local-only storage |
|
||||
| [Disclaimer](docs/DISCLAIMER.md) | Anti-cheat risks, system requirements, AI disclosure, liability |
|
||||
| [Terms of Service](docs/TERMS_OF_SERVICE.md) | Usage terms and conditions |
|
||||
| [EULA](docs/EULA.md) | End-user license agreement |
|
||||
| [Acknowledgements](docs/ACKNOWLEDGEMENTS.md) | Third-party libraries, AI credits |
|
||||
| [Security Policy](docs/SECURITY.md) | Vulnerability reporting |
|
||||
|---|---|
|
||||
| [LICENSE](LICENSE) | GNU General Public License v3.0 |
|
||||
| [EULA](docs/EULA.md) | End-user license agreement (the GPL-3.0 prevails if they conflict) |
|
||||
| [Terms of Service](docs/TERMS_OF_SERVICE.md) | Terms of use |
|
||||
| [Privacy Policy](docs/PRIVACY_POLICY.md) | What is stored, where, and for how long; nothing is collected |
|
||||
| [Disclaimer](docs/DISCLAIMER.md) | Anti-cheat and hardware risks, liability |
|
||||
| [Security Policy](docs/SECURITY.md) | Supported versions and private vulnerability reporting |
|
||||
| [Accessibility](docs/ACCESSIBILITY.md) | What AutoClick supports, known limitations, and how to report a barrier |
|
||||
| [Acknowledgements](docs/ACKNOWLEDGEMENTS.md) | Third-party software and credits |
|
||||
| [Code of Conduct](docs/CODE_OF_CONDUCT.md) | Community guidelines |
|
||||
|
||||
## License
|
||||
|
||||
This project is licensed under the [GNU General Public License v3.0](LICENSE).
|
||||
AutoClick is free software under the [GNU General Public License v3.0](LICENSE). Third-party components keep their own licenses, listed in `THIRD-PARTY-NOTICES.txt` inside every release and in [Acknowledgements](docs/ACKNOWLEDGEMENTS.md).
|
||||
@@ -0,0 +1,130 @@
|
||||
# Accessibility
|
||||
|
||||
**Last reviewed:** November 2026 (AutoClick 2.1)
|
||||
|
||||
AutoClick should work for everyone who wants to automate a game, including people who use only a keyboard, a screen reader, a contrast theme or large display scaling. This statement explains what AutoClick supports, what does not work yet, how it is tested, and how to report a barrier. It covers the AutoClick app for Windows, its installer and this repository's documentation.
|
||||
|
||||
## Goals
|
||||
|
||||
- **Target:** we work toward [WCAG 2.2](https://www.w3.org/TR/WCAG22/) Level AA, applied to desktop software as described in [WCAG2ICT](https://www.w3.org/TR/wcag2ict/). This is a goal, not a claim of conformance: AutoClick has not had a formal accessibility audit.
|
||||
- **Keyboard:** every feature can be used without a mouse, with a visible focus indicator, a logical Tab order and no keyboard traps.
|
||||
- **Screen readers:** every control has a name in the language of the interface, status changes and messages are announced, and page and section titles are headings. Narrator is the reference screen reader.
|
||||
- **Vision:** contrast themes, display scaling on every monitor, and color never as the only way to tell something.
|
||||
- **Motion:** no flashing content, and animations follow the Windows setting.
|
||||
|
||||
## Accessibility features
|
||||
|
||||
### Keyboard
|
||||
|
||||
| Where | Keys |
|
||||
|-------|------|
|
||||
| Anywhere in the window | `Tab` / `Shift+Tab` move between controls, `Enter` or `Space` activates a button, arrow keys move in lists and menus, `Esc` closes a dialog. The page list (Queue, Dashboard, Settings, About) is reached with `Tab`. |
|
||||
| Global hotkeys | `F6` pause or resume all, `F7` stop all, `F8` start all. They work while the game is in front and can be changed in **Settings → Hotkeys**. |
|
||||
| Coordinate picker (**Add step**) | Arrow keys move the pointer 10 pixels (`Shift`+arrow: 1 pixel) inside the game window; `Enter` or `Space` picks the point. `1`-`4` choose left, double or right click, or a key press; `Esc` cancels. After picking, AutoClick comes back to the front with the focus on **Add step**. |
|
||||
| Key press steps | In the picker, press `4`, then the key to send. Every key is recorded in this mode, including the arrow keys and `Enter`. |
|
||||
| Steps list | **Move up** and **Move down** reorder steps without dragging. **Random point** adds a click point without picking one. |
|
||||
| Recording a hotkey | Press the new combination. `Tab` moves to the buttons and `Esc` cancels. |
|
||||
|
||||
### Screen readers
|
||||
|
||||
- Buttons that show only an icon, inputs, lists and list items have names, in every language of the interface. Each game card is named after its game, and each step after what it does (for example "Click at (40, 60), reference color #336699").
|
||||
- These changes are announced without moving the focus:
|
||||
- the state of a game, and why a game stopped by itself;
|
||||
- the status bar and the update status;
|
||||
- schedule errors, and the key combination while you record a hotkey;
|
||||
- the coordinate picker's instructions;
|
||||
- messages that appear for a few seconds, and each step you add.
|
||||
- Page titles are level 1 headings and section titles level 2 or 3, so the heading keys of a screen reader (in Narrator's scan mode: `H` and `Shift+H`) move between them.
|
||||
- The scheduler's countdown is not announced every second; read it when you need it.
|
||||
|
||||
### Display
|
||||
|
||||
- **Themes:** *Use Windows setting* follows Windows' light, dark and contrast themes. *Light*, *Dark* and *High contrast* can also be chosen in AutoClick's **Settings → Appearance**.
|
||||
- **Color is never the only signal:** game states, warnings and log levels also have text, and the reference color of a step is named for screen readers and shown as a hex value in its tooltip.
|
||||
- **Scaling:** AutoClick is per-monitor DPI aware. It follows the Windows *Scale* setting, and the coordinate picker and the heatmap stay exact on every monitor.
|
||||
- **Motion:** with *Animation effects* turned off in Windows (Windows 11: **Settings → Accessibility → Visual effects**; Windows 10: **Settings → Ease of Access → Display → Show animations**), pages no longer slide in and the dashboard charts no longer animate.
|
||||
- **Sounds** are optional (the **Sounds** setting in AutoClick's Settings), and every sound has a visual or spoken equivalent.
|
||||
|
||||
## Supported environments
|
||||
|
||||
| Environment | Support |
|
||||
|-------------|---------|
|
||||
| Windows 10 version 2004 or later, Windows 11 (x64) | Supported |
|
||||
| Keyboard only | Supported, including the coordinate picker |
|
||||
| Narrator | Supported; the reference screen reader, checked before releases that change the interface |
|
||||
| NVDA | Expected to work (AutoClick uses Windows UI Automation), not tested regularly |
|
||||
| JAWS and other screen readers | Not tested |
|
||||
| Voice Access and other speech input | Not tested; the control names it relies on are in place |
|
||||
| Contrast themes and the High contrast theme | Supported |
|
||||
| Display scaling | Supported at any scale, on every monitor |
|
||||
|
||||
## Known limitations
|
||||
|
||||
- **Windows *Text size* setting:** WPF applications do not receive it, so AutoClick's text keeps its size. Use the Windows *Scale* setting instead (**Settings → System → Display**), which AutoClick follows.
|
||||
- **Dashboard charts** are drawings: screen readers read only their titles. The totals, clicks per minute, the peak and the active time are text on the same page, each game card shows its own numbers, and **Export statistics** saves the current totals as a CSV file.
|
||||
- **Heatmap overlay:** it shows where clicks landed with colors and sizes only; its legend gives the totals as text.
|
||||
- **Overlays:** the coordinate picker and the heatmap use their own fixed colors (a light blue tint, white text on a dark background), not the theme or a contrast theme.
|
||||
- **Coordinate picker:** the coordinates next to the pointer are not read aloud while it moves; the step is announced once you pick it.
|
||||
- **Notification area icon:** its menu has not been tested with a screen reader. The main window offers the same commands.
|
||||
- **Translations** are AI-generated and may contain mistakes; corrections are welcome.
|
||||
- **Games:** AutoClick cannot change how accessible a game itself is.
|
||||
|
||||
**If you meet a barrier that is not listed here, please [report it](#reporting-a-barrier).**
|
||||
|
||||
## How we test
|
||||
|
||||
| When | What |
|
||||
|------|------|
|
||||
| Every pull request and release build | The smoke test opens every page in every theme (including High contrast) and every language, plus the dialogs, and fails when a control that can be reached with the keyboard has no name, when a list item has no readable name, or when text does not follow the theme. Architecture tests check that all interface text is translated. |
|
||||
| Before a release that changes the interface | A keyboard-only pass with the mouse disconnected, a Narrator pass of the changed screens, and a look at the High contrast theme. |
|
||||
|
||||
Recorded passes:
|
||||
|
||||
| Version | Pass |
|
||||
|---------|------|
|
||||
| 2.0.3 (October 2026) | Keyboard only (mouse disconnected) and Narrator, Windows 11, by the maintainer: no errors found. |
|
||||
| 2.1.0 (November 2026) | Name check added to the smoke test (it found the problems fixed in 2.1.0). Keyboard picking and the announcements were checked through UI Automation, the interface Narrator uses. |
|
||||
|
||||
## Reporting a barrier
|
||||
|
||||
Open an [accessibility issue](https://github.com/poli0981/autoclick/issues/new?template=accessibility.yml). It helps to include:
|
||||
|
||||
- what you were trying to do, and where it failed;
|
||||
- the steps to get there;
|
||||
- your assistive technology and its version (for example Narrator, NVDA 2026.2, a switch device), or how you use the computer (keyboard only, magnifier, contrast theme);
|
||||
- your Windows version and AutoClick version (shown on the About page);
|
||||
- a screen recording or screenshot, if you can.
|
||||
|
||||
You never need to explain a disability or share personal information. If you prefer not to report in public, write to the developer by email (address on the [GitHub profile](https://github.com/poli0981) and in [social.md](social.md)) or on [Discord](https://discord.gg/kDM9GMu5vm).
|
||||
|
||||
### Severity
|
||||
|
||||
| Severity | Meaning |
|
||||
|----------|---------|
|
||||
| Critical | Blocks a core task, with no workaround (for example, a game cannot be added or started) |
|
||||
| Serious | A core task is very hard, but a workaround exists |
|
||||
| Moderate | Annoying or inconsistent, but the task can be done |
|
||||
| Minor | Little effect on use |
|
||||
|
||||
### How we respond
|
||||
|
||||
- We acknowledge a report within a week, without questioning the reporter's experience.
|
||||
- We explain what we will do next, and what we cannot change (for example, a limit of WPF or of a game).
|
||||
- We suggest a workaround when there is one, and post updates in the issue.
|
||||
- We ask the reporter to confirm the fix before closing, if they are willing.
|
||||
|
||||
AutoClick is maintained by one person in their spare time. From the day a report is opened, we aim to fix Critical barriers within 30 days, Serious ones within 60 days, and Moderate and Minor ones within 90 days. When a target is missed, the issue says why, what the workaround is, and when to expect a fix.
|
||||
|
||||
## Contributing
|
||||
|
||||
Interface changes follow the [accessibility rules in CONTRIBUTING](../CONTRIBUTING.md#accessibility), and the pull request template asks for a keyboard and Narrator check. Reports and suggestions from people who use assistive technology are especially welcome, in issues, in [Discussions](https://github.com/poli0981/autoclick/discussions) or as pull requests.
|
||||
|
||||
## Ownership
|
||||
|
||||
The maintainer ([poli0981](https://github.com/poli0981)) is responsible for accessibility: triaging reports, tracking barriers, and reviewing this statement with every minor release.
|
||||
|
||||
## Feedback
|
||||
|
||||
Accessibility is ongoing work. If something in this statement is unclear, wrong or missing, open an issue or a pull request.
|
||||
|
||||
This statement follows the guidance of [Open Source Guides](https://opensource.guide/accessibility-best-practices-for-your-project/#start-with-an-accessibility-statement) and the [Open Source Accessibility toolkit](https://github.com/open-source-accessibility/accessibility-toolkit/blob/main/ACCESSIBILITY.md).
|
||||
+32
-57
@@ -1,78 +1,53 @@
|
||||
# Acknowledgements & Third-Party Licenses
|
||||
|
||||
**Last updated:** April 2026
|
||||
**Last updated:** October 2026 (AutoClick 2.0)
|
||||
|
||||
## Third-Party Libraries
|
||||
AutoClick is free software under the [GNU General Public License v3.0](../LICENSE). It is built on the open-source projects below. The complete list of every package in a release, with its license and copyright notice and the full license texts, is in `THIRD-PARTY-NOTICES.txt` next to `AutoClick.UI.exe` (also on **About → Third-party notices**). Every license is checked against a GPL-3.0-compatible allow list on each change.
|
||||
|
||||
AutoClick uses the following open-source libraries:
|
||||
## Runtime and interface
|
||||
|
||||
### LiveChartsCore
|
||||
- **License:** MIT License
|
||||
- **Website:** https://livecharts.dev/
|
||||
- **Repository:** https://github.com/beto-rodriguez/LiveCharts2
|
||||
- **Usage:** Real-time dashboard charts (CPM line chart, per-game breakdown, pie chart, timeline)
|
||||
| Project | License | Used for |
|
||||
|---------|---------|----------|
|
||||
| [.NET and WPF](https://github.com/dotnet/wpf) | MIT | Runtime (included in the app) and UI framework |
|
||||
| [WPF UI](https://github.com/lepoco/wpfui) (lepo.co) | MIT | Fluent controls, navigation, dialogs, themes |
|
||||
| [CommunityToolkit.Mvvm](https://github.com/CommunityToolkit/dotnet) | MIT | MVVM: observable properties and commands |
|
||||
| [H.NotifyIcon](https://github.com/HavenDV/H.NotifyIcon) | MIT | Notification-area (tray) icon and balloon messages |
|
||||
| [LiveCharts2](https://github.com/beto-rodriguez/LiveCharts2) | MIT | Dashboard charts |
|
||||
| [SkiaSharp](https://github.com/mono/SkiaSharp) and HarfBuzzSharp | MIT | Chart rendering and text shaping |
|
||||
| [OpenTK](https://github.com/opentk/opentk) and GLWpfControl | MIT | Pulled in by SkiaSharp's WPF views (not used for drawing) |
|
||||
| [GLFW](https://www.glfw.org/) (via OpenTK.redist.glfw) | Zlib | Pulled in by OpenTK |
|
||||
|
||||
### SkiaSharp
|
||||
- **License:** MIT License
|
||||
- **Repository:** https://github.com/mono/SkiaSharp
|
||||
- **Usage:** 2D graphics rendering backend for LiveChartsCore
|
||||
## Services
|
||||
|
||||
### Serilog
|
||||
- **License:** Apache License 2.0
|
||||
- **Website:** https://serilog.net/
|
||||
- **Repository:** https://github.com/serilog/serilog
|
||||
- **Usage:** Structured logging framework for application diagnostics
|
||||
| Project | License | Used for |
|
||||
|---------|---------|----------|
|
||||
| [Microsoft.Extensions.Hosting](https://github.com/dotnet/runtime) | MIT | Startup, dependency injection, logging abstractions |
|
||||
| [Serilog](https://serilog.net/) with Sinks.File, Sinks.Async and Extensions.Hosting | Apache-2.0 | Log files and the in-app log |
|
||||
| [Velopack](https://velopack.io/) | MIT | Installer and updates from GitHub Releases |
|
||||
| [CsWin32](https://github.com/microsoft/CsWin32) | MIT | Generates the Win32 interop code at build time (not shipped) |
|
||||
|
||||
### Serilog.Sinks.File
|
||||
- **License:** Apache License 2.0
|
||||
- **Repository:** https://github.com/serilog/serilog-sinks-file
|
||||
- **Usage:** File-based log output sink
|
||||
## Development and testing (not shipped)
|
||||
|
||||
### Microsoft.Extensions.DependencyInjection
|
||||
- **License:** MIT License
|
||||
- **Repository:** https://github.com/dotnet/runtime
|
||||
- **Usage:** Dependency injection container for service management
|
||||
xUnit v3, Microsoft.Testing.Platform and its code coverage extension, Microsoft.Extensions.TimeProvider.Testing, ArchUnitNET, ReSharper Command Line Tools (JetBrains), nuget-license, Microsoft SBOM Tool, ReportGenerator, CodeQL, actionlint and zizmor.
|
||||
|
||||
### Velopack
|
||||
- **License:** MIT License
|
||||
- **Website:** https://velopack.io/
|
||||
- **Repository:** https://github.com/velopack/velopack
|
||||
- **Usage:** Application update mechanism via GitHub Releases
|
||||
## AI assistance
|
||||
|
||||
### .NET 8 / WPF
|
||||
- **License:** MIT License
|
||||
- **Repository:** https://github.com/dotnet/wpf
|
||||
- **Usage:** UI framework and runtime platform
|
||||
AutoClick is developed with the assistance of **Claude** (Anthropic) for code, architecture, reviews, documentation and translations. The developer reviews and tests the results.
|
||||
|
||||
## Development Tools
|
||||
## Translations
|
||||
|
||||
### AI Assistance
|
||||
This software was developed with the assistance of **Claude** (by Anthropic), an AI language model. AI was used for:
|
||||
- Code generation and architecture design
|
||||
- Bug fixing and code review
|
||||
- UI/UX suggestions
|
||||
- Documentation drafting
|
||||
- Language translations (Vietnamese, Japanese, Korean, Chinese Simplified)
|
||||
|
||||
All AI-generated code was reviewed and validated by the developer.
|
||||
|
||||
## Translation
|
||||
|
||||
In-app translations were generated with AI assistance and may contain inaccuracies. Community contributions for translation improvements are welcome via GitHub Pull Requests.
|
||||
The in-app translations are AI-generated and may contain mistakes; corrections are welcome as pull requests to `src/AutoClick.UI/Resources/Strings.<language>.resx`.
|
||||
|
||||
| Language | Status |
|
||||
|----------|--------|
|
||||
| English | Primary (manually written) |
|
||||
| English | Primary |
|
||||
| Tiếng Việt | AI-generated, developer-reviewed |
|
||||
| 日本語 (Japanese) | AI-generated |
|
||||
| 한국어 (Korean) | AI-generated |
|
||||
| 中文 (Chinese Simplified) | AI-generated |
|
||||
| 中文 (Chinese, Simplified) | AI-generated |
|
||||
|
||||
## Special Thanks
|
||||
## Special thanks
|
||||
|
||||
- The .NET and WPF open-source community
|
||||
- LiveCharts2 contributors for the excellent charting library
|
||||
- SkiaSharp maintainers for the cross-platform graphics engine
|
||||
- Velopack contributors for the modern update framework
|
||||
- Serilog maintainers for the excellent logging library
|
||||
- All users who report bugs and suggest features
|
||||
- The .NET, WPF and WPF UI communities
|
||||
- The maintainers of every library listed above
|
||||
- Everyone who reports bugs and suggests features
|
||||
@@ -0,0 +1,115 @@
|
||||
# Architecture
|
||||
|
||||
How AutoClick 2.x is put together, and why. Decisions that are easy to question later are recorded at the end.
|
||||
|
||||
## Projects
|
||||
|
||||
```text
|
||||
AutoClick.Core net10.0 models, settings and file formats (+ 1.x migration),
|
||||
scheduling, hotkey parsing, DPI math. No Windows APIs.
|
||||
AutoClick.Win32 net10.0-windows10.0.19041 Win32 interop generated by CsWin32: input, windows,
|
||||
│ pixels, DPI scopes, hotkeys, WinEvent hooks, elevation
|
||||
▼
|
||||
AutoClick.Services net10.0-windows10.0.19041 click engine, settings/profile/session stores,
|
||||
(depends on Core only) scheduler, updates (Velopack), log buffer
|
||||
▼
|
||||
AutoClick.UI net10.0-windows10.0.19041 WPF + WPF-UI, MVVM (CommunityToolkit), overlays, tray,
|
||||
localization, Generic Host composition root
|
||||
```
|
||||
|
||||
`AutoClick.Win32` and `AutoClick.Services` both depend only on Core; the UI composes them. Core defines the platform abstractions (`IInputSender`, `IWindowInspector`, `IPixelReader`, `IElevationService`) that Win32 implements and the engine consumes, so the engine is tested with fakes. Architecture tests check the project references, the compiled references, and that view models never reference views or overlays.
|
||||
|
||||
## Startup
|
||||
|
||||
`Program.Main` (the WPF `App` is a plain page, so startup order is explicit):
|
||||
|
||||
1. `VelopackApp.Build().Run()`: install/update/uninstall hooks run here and exit.
|
||||
2. Logging (Serilog: daily files, an in-app buffer) and settings, including the one-time migration from 1.x.
|
||||
3. If *Always run as administrator* is on and the process is not elevated, relaunch with `runas` (arguments passed on the command line, `--restarting` added). A cancelled UAC prompt continues without elevation instead of looping.
|
||||
4. Single instance: a named mutex and a named pipe, both with an ACL for the current user. A second launch asks the first one to show its window and exits.
|
||||
5. Generic Host with dependency injection (`ValidateOnBuild`), then `App.Run()`.
|
||||
|
||||
`--smoke-test` skips 3-4, uses `%TEMP%\AutoClick-smoke` as data folder, applies the theme before showing the window as a normal start does, opens every page in every theme and language plus the dialogs and a heatmap, checks that page text and chart text follow the theme, and exits 1 on any binding error or wrong text color.
|
||||
|
||||
## Click engine
|
||||
|
||||
`ClickEngine` starts one `ClickSession` per game (at most one per id). A session is an async loop:
|
||||
|
||||
- Run every step in order (click or key press with `PostMessage`, the configured delay between steps), then wait for the interval (fixed or random). Time comes from `TimeProvider`, so tests run on fake time.
|
||||
- Pause and resume use an async gate; stop cancels the loop and waits for it.
|
||||
- Every coordinate conversion runs in a `DpiScope` for the game window (`SetThreadDpiAwarenessContext` with the window's own awareness), so points stay correct for DPI-unaware games on scaled monitors. Clicks get a small jitter, clamped to the client area.
|
||||
- `PostMessage` results are interpreted: access denied (5) means the game runs elevated (UIPI) and stops with *ElevationRequired*; an invalid window (1400) stops with *WindowClosed*; a full message queue (1816) and other errors are retried, and five failures in a row stop the session (*TargetNotResponding* or *Error*). Blocked or failed sends are never counted as clicks.
|
||||
- A minimized game is not out of bounds: the session waits until it is restored.
|
||||
- The pixel color guard reads the pixel (`GetPixel`, falling back to `PrintWindow`) and skips, stops, or waits with a timeout; mismatch logging is rate limited.
|
||||
- Statistics are lock-free counters plus a heatmap dictionary with a version number, so readers redraw only when something changed.
|
||||
|
||||
## Persistence
|
||||
|
||||
| Data | File | Format |
|
||||
|------|------|--------|
|
||||
| Settings | `settings.v2.json` | Schema 2, enums as names, `Normalize()` on load. Written atomically (temp file, flush, move). An unreadable file is moved aside and reported. |
|
||||
| 1.x settings | `settings.json` | Read once to migrate; never written, so 1.x keeps working after a downgrade. Backed up to `backup\settings.v1.json`. |
|
||||
| Profiles | `profiles\{id}.json` | The 1.x layout (property names, enums as numbers). Ids must match `^[a-z0-9]{8,32}$`; the file name is the id that counts. |
|
||||
| Sessions | `*.autoclick-session` | Schema 2 (settings, profiles, saved games); schema 1 files still import. |
|
||||
|
||||
Everything lives in `%LocalAppData%\AutoClick`, which is also Velopack's install folder: uninstalling removes the data.
|
||||
|
||||
## User interface
|
||||
|
||||
- **Shell:** WPF-UI `FluentWindow` with a title bar row, a `NavigationView` (Queue, Dashboard, Settings, About), info bars for app-wide notices, a `ContentDialogHost` and a snackbar presenter. Pages and view models are singletons from the container. Each page sets its own themed `Foreground`, because WPF-UI's implicit `Page` style does not apply to page subclasses.
|
||||
- **MVVM:** CommunityToolkit.Mvvm source generators (`[ObservableProperty]` partial properties, `[RelayCommand]`). View models use services; dialogs and file pickers go through `DialogService`.
|
||||
- **One clock:** `UiTicker` raises a single once-per-second tick for statistics, the scheduler, window checks and the dashboard (1.x had five timers).
|
||||
- **Localization:** `LocalizationService` reads `Strings*.resx`. XAML binds through `{l:Loc Key}` (an indexer binding), so changing the language updates the whole UI without a restart.
|
||||
- **Overlays:** the coordinate picker is placed over the game's client area in physical pixels (`SetWindowPos`), so it works on any monitor. The heatmap is a click-through, no-activate, tool window that follows the game through out-of-process WinEvent hooks (focus and location, filtered by process and window, at most one update per frame) with a one-second fallback, shows only while the game or its dialogs are in front, and draws all markers in one `OnRender` pass with frozen brushes.
|
||||
- **Hotkeys:** registered on a message-only window owned by the UI thread; registration results are reported; recording a new hotkey suspends the old ones and re-registers them in a `finally`.
|
||||
- **Accessibility** ([ACCESSIBILITY.md](ACCESSIBILITY.md)): names come from `{l:Loc}` like all text (`AccessibleNames` names icon-only parts of WPF-UI templates). `LiveTextBlock` raises the UI Automation `LiveRegionChanged` event that WPF never raises for `LiveSetting` alone, at most once a second with the latest text; `DialogService.Announce` raises a notification for toasts and added steps. `Motion` relays Windows' *Animation effects* setting to page transitions and charts, which ignore it. The smoke test checks the names in every language.
|
||||
|
||||
## Updates
|
||||
|
||||
Velopack (`packId` `AutoClick`, channel `win`, main exe `AutoClick.UI.exe`, none of which may change) reads this repository's GitHub Releases. `UpdateService` checks at startup and every six hours when enabled, downloads in the background, and either restarts into the update (after stopping sessions, saving settings, flushing logs and releasing the single-instance lock) or applies it on exit.
|
||||
|
||||
## Build, tests and CI
|
||||
|
||||
- One version in `Directory.Build.props`; packages in `Directory.Packages.props` (central package management with transitive pinning); tools in `.config/dotnet-tools.json`.
|
||||
- Tests: xUnit v3 on Microsoft.Testing.Platform. Core and Services tests use fixtures from real 1.x files and fake time; Win32 tests drive real windows in-process; architecture tests cover layering and localization.
|
||||
- CI gates and the release pipeline are described in [CONTRIBUTING.md](../CONTRIBUTING.md) and [RELEASING.md](RELEASING.md).
|
||||
|
||||
## Decision records
|
||||
|
||||
### 1. Stay on C# and .NET 10 (October 2026)
|
||||
|
||||
**Considered:** rewriting the engine in C++ or Rust, or the whole app in another stack.
|
||||
**Decided:** keep C#, move from .NET 8 (end of support November 2026) to .NET 10 LTS.
|
||||
**Why:** the engine sends a few window messages per second; a P/Invoke call costs microseconds, so a native engine gains nothing measurable while adding an FFI boundary, a second toolchain and more antivirus false positives. The real problems of 1.x were correctness bugs, which a rewrite in place fixes.
|
||||
|
||||
### 2. WPF with WPF-UI (October 2026)
|
||||
|
||||
**Considered:** WinUI 3, Avalonia, WPF's built-in Fluent theme, WPF-UI.
|
||||
**Decided:** WPF with [WPF-UI](https://github.com/lepoco/wpfui) 4.x.
|
||||
**Why:** WPF-UI gives a complete Fluent control set (navigation, content dialogs, info bars, number boxes, theme following Windows) on top of the existing WPF code, overlays and LiveCharts2. WinUI 3 complicates transparent click-through overlays and unpackaged deployment; Avalonia would mean rewriting every view and overlay for no user-visible gain; WPF's built-in Fluent theme was still experimental and lacks those controls.
|
||||
|
||||
### 3. Run as a standard user, elevate on demand (October 2026)
|
||||
|
||||
**Decided:** the manifest uses `asInvoker`. AutoClick detects games running at a higher integrity level (and `PostMessage` failures with access denied), explains the problem and offers to restart elevated, or to always run elevated.
|
||||
**Why:** 1.x required administrator rights for everything. Only games that run elevated need it; Velopack also starts the app with `CreateProcess` during updates, which fails with error 740 for an exe that requires elevation. Users upgrading from 1.x keep starting elevated (with a one-time notice) so nothing breaks for them.
|
||||
|
||||
### 4. New settings file next to the old one (October 2026)
|
||||
|
||||
**Decided:** v2 writes `settings.v2.json` and never touches 1.x's `settings.json`; profiles keep the 1.x format.
|
||||
**Why:** a downgrade keeps the user's 1.x configuration, and profiles stay shareable between versions.
|
||||
|
||||
### 5. Full Velopack packages only (October 2026)
|
||||
|
||||
**Decided:** `--delta None`; package id, exe name and channel fixed.
|
||||
**Why:** most of the package is the self-contained runtime, so deltas save little and need the previous release at build time. Changing the package identity would orphan existing installs. Releases are uploaded as drafts and tested in Windows Sandbox (update from the previous releases with data kept) before they are published.
|
||||
|
||||
### 6. No WinRT projection in the package (October 2026)
|
||||
|
||||
**Decided:** the build drops `Microsoft.Windows.SDK.NET.dll` (24 MB) and SkiaSharp's native debug symbols (about 100 MB) from the output.
|
||||
**Why:** the `windows10.0.19041` target framework (needed for the modern assets of SkiaSharp.Views.WPF) and CommunityToolkit.Mvvm pull in the WinRT projection, but no assembly of the app references it; `WinRT.Runtime.dll`, which some libraries reference, stays. The smoke test runs on the published output to catch a mistake here.
|
||||
|
||||
### 7. Keyboard picking moves the real pointer (November 2026)
|
||||
|
||||
**Considered:** a virtual crosshair moved by the arrow keys, converted to the game's coordinates by the overlay.
|
||||
**Decided:** the arrow keys move the real pointer (`SetCursorPos`, physical pixels, kept inside the game's client area) and `Enter` picks through the same `GetCursorPos`/`ScreenToClient` path as a click.
|
||||
**Why:** that path already maps correctly for DPI-unaware games on scaled monitors, with no second conversion to keep right. The pointer moves only while the user is picking.
|
||||
@@ -6,7 +6,7 @@ We as contributors and maintainers pledge to make participation in our project a
|
||||
|
||||
## Our Standards
|
||||
|
||||
### Positive behavior includes:
|
||||
### Positive behavior includes
|
||||
|
||||
- Using welcoming and inclusive language
|
||||
- Being respectful of differing viewpoints and experiences
|
||||
@@ -14,7 +14,7 @@ We as contributors and maintainers pledge to make participation in our project a
|
||||
- Focusing on what is best for the community and the project
|
||||
- Showing empathy toward other community members
|
||||
|
||||
### Unacceptable behavior includes:
|
||||
### Unacceptable behavior includes
|
||||
|
||||
- Trolling, insulting/derogatory comments, and personal or political attacks
|
||||
- Public or private harassment
|
||||
|
||||
+30
-43
@@ -1,39 +1,43 @@
|
||||
# Developer Environment
|
||||
|
||||
Configuration of the machine used to develop, debug, and test AutoClick. Provided as reference for contributors who want to reproduce the build and test environment.
|
||||
How AutoClick is built and tested, for contributors who want to reproduce the environment. The machine itself is described in [pc_spec.md](pc_spec.md). The Vietnamese mirror is at [i18n/vi/DEV_ENVIRONMENT.md](i18n/vi/DEV_ENVIRONMENT.md).
|
||||
|
||||
## Machine Specifications
|
||||
## Toolchain
|
||||
|
||||
| Component | Details |
|
||||
|-----------|---------|
|
||||
| **OS** | Windows 11 Pro Insider Preview (Dev Channel) |
|
||||
| **Build** | 26300.8142.ge_prerelease_im.260321-1005 |
|
||||
| **CPU** | Intel Core i7-14700KF |
|
||||
| **GPU** | NVIDIA GeForce RTX 5080 (16 GB VRAM) |
|
||||
| **RAM** | 32 GB DDR5 |
|
||||
| **Storage** | 1 TB SSD |
|
||||
| **IDE** | JetBrains Rider 2026.1 |
|
||||
| **.NET SDK** | 11.0.100-preview.2 (targets `net8.0-windows`) |
|
||||
| Tool | Version | Notes |
|
||||
|------|---------|-------|
|
||||
| **.NET SDK** | 10.0.4xx | Pinned in [`global.json`](../global.json) (`rollForward: latestFeature`) |
|
||||
| **Target frameworks** | `net10.0` (Core), `net10.0-windows10.0.19041.0` (everything else) | |
|
||||
| **Local tools** | [`.config/dotnet-tools.json`](../.config/dotnet-tools.json) | `vpk` (Velopack), ReSharper InspectCode, nuget-license, sbom-tool, ReportGenerator |
|
||||
| **IDE** | JetBrains Rider 2026.x or Visual Studio Code | Any editor that honors `.editorconfig` |
|
||||
|
||||
## Build Instructions
|
||||
## Build and test
|
||||
|
||||
```bash
|
||||
git clone https://github.com/poli0981/autoclick.git
|
||||
cd autoclick
|
||||
dotnet restore
|
||||
dotnet build
|
||||
```
|
||||
|
||||
Run the application:
|
||||
```bash
|
||||
dotnet tool restore
|
||||
dotnet build AutoClick.slnx
|
||||
dotnet test --solution AutoClick.slnx
|
||||
dotnet run --project src/AutoClick.UI
|
||||
```
|
||||
|
||||
> **Note:** The app requires administrator privileges. When running from IDE, ensure the IDE is launched as Administrator, or right-click the built `.exe` and select "Run as administrator".
|
||||
AutoClick runs as a normal user; administrator rights are only needed to click games that themselves run as administrator.
|
||||
|
||||
The checks CI runs on every pull request, and how to run them locally, are listed in [CONTRIBUTING.md](../CONTRIBUTING.md).
|
||||
|
||||
## Test tools
|
||||
|
||||
| Tool | Purpose |
|
||||
|------|---------|
|
||||
| **`tools/AutoClick.ClickTarget`** | A window that logs every mouse and keyboard message it receives (client coordinates, virtual-key and scan codes). `--dpi unaware\|system\|pmv2` changes its DPI awareness to test coordinate mapping, `--log <file>` writes the log to a file. |
|
||||
| **`AutoClick.UI.exe --smoke-test`** | Opens every page in every theme and language, the dialogs and a heatmap overlay, and fails on any binding error, on text that does not follow the theme, and on a control or list item that screen readers would find without a name. Uses `%TEMP%\AutoClick-smoke` instead of the real data folder. |
|
||||
| **Narrator and the keyboard** | Manual accessibility check of interface changes: unplug the mouse and use `Tab`, the arrow keys, `Enter` and `Esc`; start Narrator with `Ctrl+Win+Enter`. What to check is in [ACCESSIBILITY.md](ACCESSIBILITY.md#how-we-test). |
|
||||
| **`eng/Invoke-UpgradeTest.ps1`** | Update test in Windows Sandbox, without touching the development machine: installs an older release (for example 1.3.3), updates it to a new package with the installed updater, and checks the data migration, the uninstall and a fresh install. Used before every release ([RELEASING.md](RELEASING.md)). |
|
||||
|
||||
## Tested Games
|
||||
|
||||
The following games were tested during development. Results are specific to the developer's machine and may vary depending on your system, game version, and anti-cheat configuration.
|
||||
Results with AutoClick 1.x on the developer's machine; they can differ with your system, game version and anti-cheat configuration.
|
||||
|
||||
### Passed
|
||||
|
||||
@@ -47,7 +51,7 @@ The following games were tested during development. Results are specific to the
|
||||
|
||||
| Game | Store Link | Anti-Cheat | Notes |
|
||||
|------|------------|------------|-------|
|
||||
| **Wuthering Waves** | [Steam](https://store.steampowered.com/app/3513350/Wuthering_Waves/) | ACE (Kernel) | Temporarily passed during testing. **Kernel-level anti-cheat is present** -- use at your own risk. Detection behavior may change with game updates. |
|
||||
| **Wuthering Waves** | [Steam](https://store.steampowered.com/app/3513350/Wuthering_Waves/) | ACE (Kernel) | Temporarily passed during testing. **Kernel-level anti-cheat is present**: use at your own risk. Detection behavior may change with game updates. |
|
||||
|
||||
### Failed
|
||||
|
||||
@@ -55,26 +59,9 @@ The following games were tested during development. Results are specific to the
|
||||
|------|------------|-------|
|
||||
| **Mercury Elopement Syndrome** | [Steam](https://store.steampowered.com/app/4417890/Mercury_Elopement_Syndrome/) | PostMessage clicks not recognized by the game. Likely uses DirectInput or Raw Input, which does not respond to `WM_LBUTTONDOWN` messages. |
|
||||
|
||||
## VM Testing Environment
|
||||
|
||||
OS compatibility was tested using virtual machines. See [System Requirements](SYSTEM_REQUIREMENTS.md) for the full compatibility matrix.
|
||||
|
||||
| Tool | Version | Notes |
|
||||
|------|---------|-------|
|
||||
| **Oracle VirtualBox** | 7.2.6 r172322 (Qt 6.8.0 on Windows) | Primary VM platform |
|
||||
| **Windows Sandbox** | Windows 10/11 built-in | Quick isolated testing |
|
||||
|
||||
### VM Test Results
|
||||
|
||||
| OS | RAM | CPU | Result |
|
||||
|----|-----|-----|--------|
|
||||
| Windows 10 22H2 (Build 19045.3803) | 4 GB | 2 cores | **Pass** — all features including dashboard |
|
||||
| Windows 8.1 / 8.1 Pro (Build 9600) | 8 GB | 2 cores | **Partial** — v1.1.0 only; requires [VC++ 2015 Redistributable](https://www.microsoft.com/en-us/download/details.aspx?id=48145); dashboard (LiveChartsCore/SkiaSharp) not compatible |
|
||||
| Windows 7 | — | — | **Failed** — .NET 8 not supported |
|
||||
|
||||
## Compatibility Notes
|
||||
|
||||
- **PostMessage-based clicking** works with games that process standard Windows messages (`WM_LBUTTONDOWN` / `WM_LBUTTONUP`). Games using DirectInput, Raw Input, or custom input pipelines may not respond.
|
||||
- **Fullscreen exclusive mode** may prevent message delivery. Borderless Windowed or Windowed mode is recommended.
|
||||
- **Kernel-level anti-cheat** (EasyAntiCheat, BattlEye, Vanguard, ACE) can detect and flag automation tools regardless of the method used. Always check the game's Terms of Service before use.
|
||||
- **Results may vary** across different hardware configurations, driver versions, and game patches.
|
||||
- **PostMessage-based clicking** works with games that process standard window messages (`WM_LBUTTONDOWN` / `WM_LBUTTONUP`, `WM_KEYDOWN` / `WM_KEYUP`). Games that read DirectInput, Raw Input or their own input pipeline may not respond.
|
||||
- **Games that run as administrator** only accept input from a program with the same rights; AutoClick detects this and offers to restart as administrator.
|
||||
- **Fullscreen exclusive mode** may prevent message delivery and overlays. Windowed or borderless mode is recommended.
|
||||
- **Kernel-level anti-cheat** (EasyAntiCheat, BattlEye, Vanguard, ACE) can detect and flag automation tools regardless of the method used. Check the game's terms of service before use.
|
||||
+5
-4
@@ -1,6 +1,6 @@
|
||||
# Disclaimer
|
||||
|
||||
**Last updated:** April 2026
|
||||
**Last updated:** October 2026
|
||||
|
||||
## General Disclaimer
|
||||
|
||||
@@ -14,9 +14,10 @@ AutoClick has been tested on the following configurations (see [System Requireme
|
||||
|
||||
| OS | Status |
|
||||
|----|--------|
|
||||
| Windows 10 22H2+ / Windows 11 | **Full support** (all features) |
|
||||
| Windows 8.1 | **Partial support** (requires [VC++ 2015 Redistributable](https://www.microsoft.com/en-us/download/details.aspx?id=48145); dashboard not available; v1.1.0 recommended) |
|
||||
| Windows 7 and earlier | **Not supported** (application will not launch) |
|
||||
| Windows 11, Windows 10 version 2004 or later (64-bit) | **Supported** by AutoClick 2.x |
|
||||
| Earlier Windows 10 versions | AutoClick 1.3.x only (no longer updated) |
|
||||
| Windows 8.1 | AutoClick 1.1.0 only (no longer updated; requires the [VC++ 2015 Redistributable](https://www.microsoft.com/en-us/download/details.aspx?id=48145); no dashboard) |
|
||||
| Windows 7 and earlier | **Not supported** |
|
||||
|
||||
The developer makes no guarantees of compatibility with OS versions, builds, or configurations not listed in [System Requirements](SYSTEM_REQUIREMENTS.md).
|
||||
|
||||
|
||||
+17
-2
@@ -1,6 +1,6 @@
|
||||
# End-User License Agreement (EULA)
|
||||
|
||||
**Last updated:** April 2026
|
||||
**Last updated:** October 2026
|
||||
|
||||
## IMPORTANT - READ CAREFULLY
|
||||
|
||||
@@ -8,6 +8,8 @@ This End-User License Agreement ("EULA") is a legal agreement between you ("User
|
||||
|
||||
By installing or using the Software, you agree to be bound by the terms of this EULA. If you do not agree, do not install or use the Software.
|
||||
|
||||
**This EULA does not limit the GPL-3.0.** AutoClick is free software under the GNU General Public License v3.0 (GPL-3.0). Nothing in this EULA restricts the rights the GPL-3.0 gives you to run, study, share and modify the Software, and **where this EULA and the GPL-3.0 conflict, the GPL-3.0 prevails**. The other terms of this EULA (such as the hardware and anti-cheat notices, the warranty disclaimer and the limitation of liability) apply only as far as the GPL-3.0 permits; see sections 7, 15 and 16 of the GPL-3.0.
|
||||
|
||||
---
|
||||
|
||||
## 1. Grant of License
|
||||
@@ -39,6 +41,7 @@ You may NOT:
|
||||
## 4. System Requirements & Multi-Game Operation
|
||||
|
||||
### 4.1 Hardware Requirements
|
||||
|
||||
The Software supports running automation tasks on multiple games simultaneously. You acknowledge and agree that:
|
||||
|
||||
- **You are solely responsible** for ensuring your computer hardware meets or exceeds the minimum system requirements specified by each game's developer before running multiple games simultaneously.
|
||||
@@ -46,10 +49,13 @@ The Software supports running automation tasks on multiple games simultaneously.
|
||||
- The developer makes **no representations** regarding the hardware requirements for multi-game operation.
|
||||
|
||||
### 4.2 Hardware Damage
|
||||
|
||||
**THE DEVELOPER ACCEPTS NO RESPONSIBILITY** for any hardware damage, overheating, component failure, power supply damage, or any other physical damage to your computer or peripherals resulting from running the Software with one or more games. You use the Software entirely at your own risk.
|
||||
|
||||
### 4.3 System Monitoring
|
||||
|
||||
You agree to:
|
||||
|
||||
- Monitor system temperatures and resource usage during operation
|
||||
- Stop the Software immediately if signs of system stress are observed
|
||||
- Maintain adequate cooling and ventilation during sustained operation
|
||||
@@ -58,9 +64,11 @@ You agree to:
|
||||
## 5. Anti-Cheat & Game Policy Compliance
|
||||
|
||||
### 5.1 Compatibility
|
||||
|
||||
Not all games are compatible with AutoClick. The Software uses Win32 API messaging which some games may not recognize.
|
||||
|
||||
### 5.2 Anti-Cheat Systems
|
||||
|
||||
**WARNING:** Many games use anti-cheat systems that can detect automation software. This includes but is not limited to:
|
||||
|
||||
| Anti-Cheat | Risk Level | Notes |
|
||||
@@ -74,13 +82,16 @@ Not all games are compatible with AutoClick. The Software uses Win32 API messagi
|
||||
| Custom server-side detection | **VARIES** | Pattern detection on server side |
|
||||
|
||||
### 5.3 Consequences
|
||||
|
||||
Using automation tools with protected games may result in:
|
||||
|
||||
- **Temporary bans** (hours to months)
|
||||
- **Permanent bans** (account termination)
|
||||
- **Hardware ID bans** (all accounts on the device)
|
||||
- **Loss of purchases** (in-game items, subscriptions)
|
||||
|
||||
### 5.4 Developer Liability
|
||||
|
||||
**THE DEVELOPER (poli0981) ACCEPTS NO RESPONSIBILITY WHATSOEVER for any bans, suspensions, account losses, or other penalties resulting from use of this Software with any game.**
|
||||
|
||||
You use this Software entirely at your own risk.
|
||||
@@ -88,12 +99,15 @@ You use this Software entirely at your own risk.
|
||||
## 6. AI Disclosure
|
||||
|
||||
### 6.1 AI-Assisted Development
|
||||
|
||||
This Software was developed with the assistance of AI tools (Claude by Anthropic). AI was used for code generation, architecture design, debugging, and documentation.
|
||||
|
||||
### 6.2 AI-Generated Translations
|
||||
|
||||
In-app language localizations (e.g., Vietnamese) were generated by AI and **may contain inaccuracies**. The developer makes no guarantees regarding translation quality or completeness.
|
||||
|
||||
### 6.3 Code Quality
|
||||
|
||||
All AI-generated code has been reviewed by the developer. However, as with all software, bugs may exist. The developer makes no warranty that the Software is free of defects.
|
||||
|
||||
## 7. No Warranty
|
||||
@@ -101,6 +115,7 @@ All AI-generated code has been reviewed by the developer. However, as with all s
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND "AS AVAILABLE" WITHOUT ANY WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE, AND NON-INFRINGEMENT.
|
||||
|
||||
THE DEVELOPER DOES NOT WARRANT THAT:
|
||||
|
||||
- The Software will be compatible with any particular game
|
||||
- The Software will be undetectable by anti-cheat systems
|
||||
- The Software will be free of bugs or errors
|
||||
@@ -138,7 +153,7 @@ If any provision of this EULA is held to be unenforceable, the remaining provisi
|
||||
|
||||
## 13. Entire Agreement
|
||||
|
||||
This EULA, together with the GPL-3.0 License, constitutes the entire agreement between you and the developer regarding the Software.
|
||||
This EULA, together with the GPL-3.0 License, constitutes the entire agreement between you and the developer regarding the Software. Where they conflict, the GPL-3.0 prevails.
|
||||
|
||||
## 14. Contact
|
||||
|
||||
|
||||
@@ -1,18 +1,27 @@
|
||||
# Heatmap Overlay Compatibility
|
||||
|
||||
The click heatmap overlay (added in v1.3.0, foreground-aware in v1.3.1) renders a transparent, click-through layer above the game's client area, plotting each clicked coordinate as a colored circle on a blue→red gradient sized by relative click frequency.
|
||||
The click heatmap draws a transparent layer over the game's window area, with one circle per clicked point: blue for rarely clicked, red for the most clicked. The layer cannot be clicked (input passes through to the game), never takes focus and does not appear in Alt+Tab.
|
||||
|
||||
Compatibility depends on how the game presents its window to the desktop compositor:
|
||||
How the overlay behaves (AutoClick 2.0):
|
||||
|
||||
- **Windowed** — works reliably. Standard top-level window, overlay sits above via normal z-order.
|
||||
- **Borderless windowed** (a.k.a. *fullscreen window*) — works reliably. Same compositor path as windowed.
|
||||
- **Exclusive fullscreen** — depends on the game's rendering pipeline. Games using DWM-friendly DirectX 11/12 swap chains often work; legacy DirectX 9 or older OpenGL exclusive-fullscreen bypass the desktop compositor and the overlay cannot render above them.
|
||||
- It sits exactly over the game's client area, on any monitor and at any display scaling, and follows the game when it moves or is resized.
|
||||
- It is visible only while the game, or one of the game's own dialogs, is the active window. With several heatmaps open, only the one for the game in front shows.
|
||||
- It hides while the game is minimized and closes by itself when the game exits or is removed from the queue.
|
||||
- It redraws only when there are new clicks or the window moved, so it adds almost no load.
|
||||
|
||||
**This is a Windows OS-level limitation, not an AutoClick bug.** No overlay technology built on top-level WPF windows can render above an application that has taken exclusive ownership of the screen surface.
|
||||
## Game display modes
|
||||
|
||||
Whether an overlay can appear above a game depends on how the game presents its window:
|
||||
|
||||
- **Windowed**: works.
|
||||
- **Borderless window** (also called *fullscreen windowed*): works.
|
||||
- **Exclusive fullscreen**: depends on the game. Games whose DirectX 11/12 swap chain goes through the desktop compositor usually work; older DirectX 9 or OpenGL exclusive fullscreen bypasses the compositor and nothing can be drawn above it.
|
||||
|
||||
This is a Windows limitation, not an AutoClick bug: no overlay window can draw above a program that owns the screen exclusively. If the heatmap does not show, switch the game to **borderless window**; performance is about the same on modern GPUs.
|
||||
|
||||
## Tested games
|
||||
|
||||
Last updated: 2026-04-25 (v1.3.1)
|
||||
Tested with AutoClick 1.3.1 (2026-04-25). 2.0 uses the same kind of overlay window, so the display-mode results still apply.
|
||||
|
||||
| Game | Engine | Windowed | Borderless | Fullscreen | Notes |
|
||||
|------|--------|---------:|-----------:|-----------:|-------|
|
||||
@@ -22,32 +31,20 @@ Last updated: 2026-04-25 (v1.3.1)
|
||||
| [Deadly Heart Gambit](https://store.steampowered.com/app/3202110/) | Unity | ✅ | ✅ | ❌ | |
|
||||
| [STEINS;GATE](https://store.steampowered.com/app/412830/) | (unknown) | ✅ | — | ✅ | |
|
||||
|
||||
**Legend:** ✅ tested + renders correctly · ❌ tested + does not render · — not tested
|
||||
**Legend:** ✅ tested and shows · ❌ tested and does not show · — not tested
|
||||
|
||||
## Patterns observed so far
|
||||
Patterns so far: Ren'Py and Unity in exclusive fullscreen hide the overlay; Unreal Engine 4 with DirectX 12 shows it even in fullscreen; older or niche engines vary.
|
||||
|
||||
- **Ren'Py** and **Unity** in true exclusive fullscreen → overlay does not render. Switch to Windowed or Borderless.
|
||||
- **Unreal Engine 4 (DirectX 12)** → overlay renders even in fullscreen, because UE4's modern swap chain composites through DWM.
|
||||
- **Older or niche engines** vary individually — some legacy titles render fine in fullscreen, some don't. Hard to generalize without per-engine fingerprinting.
|
||||
## Display scaling and multiple monitors
|
||||
|
||||
If your game falls in the "doesn't render in fullscreen" category, the simplest fix is to switch the game to **Borderless windowed** in its display settings. Performance is comparable to true fullscreen on most modern GPUs, and the overlay will work.
|
||||
1.x placed the heatmap using the scaling of the monitor the overlay was on rather than the game's, so it could be offset on setups with different scaling per monitor. 2.0 measures the game window in physical pixels and converts with the game's own DPI.
|
||||
|
||||
## Reporting / contributing
|
||||
Click points are stored in the game's own coordinates. Points picked with 1.x in a game that is **not DPI aware**, on a **scaled** monitor, may land slightly off: pick them again in 2.0.
|
||||
|
||||
If you've tested AutoClick's heatmap with a game not listed here, please contribute a row to the table:
|
||||
## Reporting
|
||||
|
||||
1. **Open a PR** adding the game to the table above with:
|
||||
- Game name + Steam URL (or other storefront link)
|
||||
- Engine, if known (check the game's Steam page or PCGamingWiki)
|
||||
- Mode(s) tested: Windowed / Borderless / Fullscreen
|
||||
- Result per mode: ✅ shows / ❌ doesn't show
|
||||
- Notes (DirectX version, anti-cheat, alt-tab quirks, etc.)
|
||||
2. **Or open an issue** with the same information and we'll add it.
|
||||
|
||||
We aim to grow this list over releases so users can check expected behavior before relying on the heatmap feature for a particular title.
|
||||
Tested a game that is not listed? Open a pull request adding a row (game and store link, engine if known, the modes tried and the result for each, and notes such as the DirectX version or anti-cheat), or open an issue with the same information.
|
||||
|
||||
## Related limitations
|
||||
|
||||
- **Anti-cheat games** (kernel-level: EasyAntiCheat, BattlEye, Vanguard) may flag the overlay or AutoClick itself. The heatmap is purely visual (click-through, no input injection) but a topmost transparent window may still trip heuristics. Use at your own risk — see [DISCLAIMER](DISCLAIMER.md).
|
||||
- **Multi-monitor**: the overlay correctly tracks the game window across monitors via DPI-aware coordinate translation. No known multi-monitor issues so far.
|
||||
- **Multiple games simultaneously**: from v1.3.1 the overlay is foreground-aware — only the currently focused game's heatmap is visible at any time, even if multiple heatmaps are toggled on. Alt-Tab between games to swap which heatmap is shown.
|
||||
- **Anti-cheat** (kernel-level: EasyAntiCheat, BattlEye, Vanguard, ACE) may flag the overlay or AutoClick itself. The heatmap only draws (it never sends input), but a top-most transparent window can still trip heuristics. Use at your own risk; see the [Disclaimer](DISCLAIMER.md).
|
||||
+24
-30
@@ -1,50 +1,44 @@
|
||||
# Privacy Policy
|
||||
|
||||
**Last updated:** April 2026
|
||||
**Last updated:** October 2026 (AutoClick 2.0)
|
||||
|
||||
## Overview
|
||||
## Summary
|
||||
|
||||
AutoClick is a desktop application that runs entirely on your local machine. We are committed to protecting your privacy.
|
||||
AutoClick runs entirely on your PC. It has no accounts, no telemetry, no analytics and no crash reporting. The only network traffic is the update check against this project's GitHub Releases, which you can turn off.
|
||||
|
||||
## Data Collection
|
||||
## Data stored on your PC
|
||||
|
||||
AutoClick does **NOT** collect, transmit, or store any personal data on external servers. Specifically:
|
||||
Everything is kept in `%LocalAppData%\AutoClick` (for example `C:\Users\<you>\AppData\Local\AutoClick`):
|
||||
|
||||
- **No telemetry**: The application does not send usage data, crash reports, or analytics to any server.
|
||||
- **No account required**: No registration, login, or personal information is needed to use the software.
|
||||
- **No network requests**: The only outbound network requests are for checking application updates via the GitHub Releases API (`api.github.com`). This is optional and can be disabled in Settings.
|
||||
| Data | Location | Contents |
|
||||
|------|----------|----------|
|
||||
| Settings | `settings.v2.json` | Your preferences: timing, pixel color guard, hotkeys, theme, language, window position |
|
||||
| 1.x settings | `settings.json`, `backup\settings.v1.json` | Left from AutoClick 1.x (kept so 1.x keeps working, and a backup made during the upgrade) |
|
||||
| Profiles | `profiles\*.json` | The steps and timing you saved |
|
||||
| Logs | `logs\autoclick-YYYYMMDD.log` | Application events for troubleshooting, in daily files of at most 10 MB; the 14 most recent files are kept |
|
||||
| Damaged files | `settings.v2.json.corrupt-*` | A settings file that could not be read, kept instead of being deleted |
|
||||
|
||||
## Local Data Storage
|
||||
The logs contain the process names and window titles of the games you add, click coordinates, file paths you import from or export to, and error details. A window title can contain personal text if you add a window such as a browser or a chat app; check a log before sharing it in a bug report.
|
||||
|
||||
AutoClick stores the following data **locally** on your machine:
|
||||
Files you export (settings, profiles, sessions, statistics, logs) are written only where you choose.
|
||||
|
||||
| Data | Location | Purpose |
|
||||
|------|----------|---------|
|
||||
| Settings | `%LocalAppData%\AutoClick\settings.json` | User preferences (click mode, intervals, theme, language, hotkeys) |
|
||||
| Logs | `%LocalAppData%\AutoClick\logs\` | Application debug logs for troubleshooting |
|
||||
**Uninstalling AutoClick deletes the whole `%LocalAppData%\AutoClick` folder**, including profiles and logs. The portable version keeps its data in the same folder; delete it yourself if you no longer need it.
|
||||
|
||||
No game credentials, personal identifiers, or sensitive information is stored.
|
||||
## Network access
|
||||
|
||||
## Update Mechanism
|
||||
- **Update check:** when *Update automatically* is on (the default), AutoClick asks GitHub for the latest release at startup and every 6 hours, and downloads an update when there is one. With the setting off, this only happens when you press *Check for updates*. The requests go to GitHub (`api.github.com`, `github.com` and its release download hosts) and carry the information any web request does, such as your IP address. They do not identify you to the developer. See [GitHub's Privacy Statement](https://docs.github.com/en/site-policy/privacy-policies/github-general-privacy-statement).
|
||||
- **Links:** buttons on the About page open web pages in your browser. Nothing is sent until you click them.
|
||||
|
||||
When auto-update is enabled, AutoClick contacts the GitHub Releases API to check for new versions. This request includes:
|
||||
- Your IP address (standard HTTP request, handled by GitHub's privacy policy)
|
||||
- No authentication tokens for public repositories
|
||||
AutoClick sends nothing else: no usage data, no settings, no logs.
|
||||
|
||||
You may disable auto-update in Settings at any time.
|
||||
## Children's privacy
|
||||
|
||||
## Third-Party Services
|
||||
AutoClick collects no data from anyone, including children.
|
||||
|
||||
- **GitHub API**: Used solely for update checking. Subject to [GitHub's Privacy Statement](https://docs.github.com/en/site-policy/privacy-policies/github-general-privacy-statement).
|
||||
## Changes to this policy
|
||||
|
||||
## Children's Privacy
|
||||
|
||||
AutoClick does not knowingly collect any data from children or any other users.
|
||||
|
||||
## Changes to This Policy
|
||||
|
||||
We may update this Privacy Policy from time to time. Changes will be posted in the GitHub repository.
|
||||
Changes are published in the [GitHub repository](https://github.com/poli0981/autoclick) and noted in the [CHANGELOG](../CHANGELOG.md).
|
||||
|
||||
## Contact
|
||||
|
||||
For privacy-related questions, please open an issue on the [GitHub repository](https://github.com/poli0981/autoclick).
|
||||
Open an issue on the [GitHub repository](https://github.com/poli0981/autoclick/issues) for privacy questions.
|
||||
@@ -1,39 +0,0 @@
|
||||
# v1.0.1
|
||||
|
||||
Cleanup and localization fixes.
|
||||
|
||||
## What's Changed
|
||||
|
||||
### Fixed
|
||||
- Vietnamese translations now use proper Unicode diacritics across all resource files
|
||||
- GitHub repository URL default corrected in AppSettings (`poli0981/autoclick`)
|
||||
- Document links in About view corrected to `blob/master`
|
||||
- Removed orphaned `FreeRamCommand` (no UI binding existed)
|
||||
- Removed unused `MaxRAM` / `FreeRAM` string resources
|
||||
|
||||
### Improved
|
||||
- All remaining hardcoded English strings in XAML replaced with localized bindings:
|
||||
- "Remove All", "Random", "Reset", "Random Min (s)", "Random Max (s)"
|
||||
|
||||
### Added
|
||||
- README with full project documentation
|
||||
- CHANGELOG (v1.0.0 + v1.0.1)
|
||||
- Code of Conduct with auto-ignore policy
|
||||
- Developer Environment documentation (machine specs + tested games)
|
||||
- GitHub Issue templates: Bug Report and Feature Request (YAML forms)
|
||||
- Pull Request template with checklist and auto-ignore notice
|
||||
- New localized string keys: `RemoveAll`, `RandomMin`, `RandomMax`, `ResetStats` (EN + VI)
|
||||
|
||||
---
|
||||
|
||||
### Tested Games
|
||||
|
||||
| Game | Result |
|
||||
|------|--------|
|
||||
| [Bound Between Desks](https://store.steampowered.com/app/3790060/Bound_Between_Desks/) | Pass |
|
||||
| [Wuthering Waves](https://store.steampowered.com/app/3513350/Wuthering_Waves/) | Pass (ACE Kernel -- use at own risk) |
|
||||
| [Myosotis](https://store.steampowered.com/app/4220830/Myosotis_My_Life_Is_Not_Yours_to_Take/) | Pass |
|
||||
| [Man in a Suit...](https://store.steampowered.com/app/3292090/Man_in_a_suit_in_a_building_in_a_city/) | Pass |
|
||||
| [Mercury Elopement Syndrome](https://store.steampowered.com/app/4417890/Mercury_Elopement_Syndrome/) | Fail (DirectInput) |
|
||||
|
||||
**Full Changelog:** https://github.com/poli0981/autoclick/compare/v1.0.0...v1.0.1
|
||||
@@ -1,19 +0,0 @@
|
||||
# v1.0.2
|
||||
|
||||
Hotfix for update manager pointing to wrong repository.
|
||||
|
||||
## What's Fixed
|
||||
|
||||
- **Update URL migration**: Users who installed v1.0.0 or v1.0.1 had `"gitHubRepo": "autoclick/autoclick"` saved in their local `settings.json`. This caused the update checker to query a non-existent repository, resulting in 404 errors. v1.0.2 adds an automatic migration that detects and corrects this value on startup.
|
||||
|
||||
## Upgrade Recommendation
|
||||
|
||||
> **All users on v1.0.0 or v1.0.1 should upgrade to v1.0.2.** Auto-update will not function correctly on earlier versions. If auto-update fails, download this release manually from the link below.
|
||||
|
||||
## How It Works
|
||||
|
||||
On first launch, `SettingsService.Load()` checks if `GitHubRepo` is set to the old `"autoclick/autoclick"` value. If so, it auto-corrects to `"poli0981/autoclick"` and saves the file. This runs once and is transparent to the user.
|
||||
|
||||
---
|
||||
|
||||
**Full Changelog:** https://github.com/poli0981/autoclick/compare/v1.0.1...v1.0.2
|
||||
@@ -1,29 +0,0 @@
|
||||
# v1.0.3
|
||||
|
||||
Critical hotfix for the update system.
|
||||
|
||||
## Do NOT use v1.0.0 ~ v1.0.2
|
||||
|
||||
Versions 1.0.0, 1.0.1, and 1.0.2 all contain a broken update URL (`autoclick/autoclick` instead of `poli0981/autoclick`). This defect **cannot be fixed through auto-update or reinstall** because the wrong value was either baked into the settings file or shipped in cached binaries due to build issues.
|
||||
|
||||
**If you are on any version before 1.0.3, uninstall and download this release manually.**
|
||||
|
||||
## What's Fixed
|
||||
|
||||
- The GitHub repository URL is now a **compile-time constant** hardcoded in `UpdateService`. It no longer reads from `settings.json` or any runtime configuration.
|
||||
- The `GitHubRepo` property has been **completely removed** from `AppSettings`. Old `settings.json` files that still contain this key will simply ignore it on deserialization.
|
||||
- The migration code added in v1.0.2 has been removed (no longer needed).
|
||||
- Build output was fully cleaned and recompiled to ensure no stale cached binaries are shipped.
|
||||
|
||||
## Verification
|
||||
|
||||
After launching v1.0.3, the log should show:
|
||||
```
|
||||
[INF] Update manager initialized for https://github.com/poli0981/autoclick (installed: True, current: 1.0.3)
|
||||
```
|
||||
|
||||
If you still see `autoclick/autoclick` in the log, you are **not** running v1.0.3. Re-download from this release.
|
||||
|
||||
---
|
||||
|
||||
**Full Changelog:** https://github.com/poli0981/autoclick/compare/v1.0.2...v1.0.3
|
||||
@@ -1,53 +0,0 @@
|
||||
# v1.1.0
|
||||
|
||||
Major feature update with multi-point sequences, 3 new languages, live statistics, and sound notifications.
|
||||
|
||||
## New Features
|
||||
|
||||
### Multi-Point Click Sequences
|
||||
- Add **multiple coordinates** per game, creating click sequences executed in order each cycle
|
||||
- Display: `#1(100,200) → #2(300,400) → #3(500,600)`
|
||||
- Configurable **delay between points** (0–10,000ms) — set per game card
|
||||
- Click count now tracks **individual clicks**, not cycles (3 points = 3 clicks per cycle)
|
||||
- "Add Point" replaces old "Select Coordinate"; "Clear Points" to reset all
|
||||
|
||||
### Game Dialog / Choice Compatibility
|
||||
- `InputSimulator` now sends **`WM_MOUSEMOVE` + 15ms delay** before each click
|
||||
- Fixes games where choice buttons, dialog options, and menus ignored PostMessage clicks
|
||||
- Sequence: MouseMove → 15ms → MouseDown → 15ms → MouseUp
|
||||
|
||||
### 3 New Languages (5 total)
|
||||
- 🇯🇵 **日本語** (Japanese)
|
||||
- 🇰🇷 **한국어** (Korean)
|
||||
- 🇨🇳 **中文** (Chinese Simplified)
|
||||
- ~100 string keys per language. All AI-generated — community corrections welcome via PR
|
||||
|
||||
### Session Statistics Panel
|
||||
- Live stats bar below toolbar: **Total Clicks**, **Uptime** (hh:mm:ss), **Clicks/min** (average), **Peak** CPM
|
||||
- Appears after first game starts, updates every 2 seconds
|
||||
- Resets on "Reset App"
|
||||
|
||||
### Sound Notifications
|
||||
- System sounds for: Start, Stop, Pause/Resume, coordinate pick success, errors
|
||||
- Uses Windows `SystemSounds` — no external audio files
|
||||
- Toggle on/off in Settings > Advanced > "Sound Notifications"
|
||||
|
||||
## Fixes
|
||||
- **Peak CPM** no longer shows absurd values on first tick (was dividing by near-zero time)
|
||||
|
||||
## Upgrade
|
||||
If you are on v1.0.x, this version includes all previous fixes (hardcoded update URL, assembly metadata, etc.).
|
||||
|
||||
---
|
||||
|
||||
**Full Changelog:** https://github.com/poli0981/autoclick/compare/v1.0.3...v1.1.0
|
||||
|
||||
### Tested Games
|
||||
|
||||
| Game | Result |
|
||||
|------|--------|
|
||||
| [Bound Between Desks](https://store.steampowered.com/app/3790060/Bound_Between_Desks/) | Pass |
|
||||
| [Wuthering Waves](https://store.steampowered.com/app/3513350/Wuthering_Waves/) | Pass (ACE Kernel — use at own risk) |
|
||||
| [Myosotis](https://store.steampowered.com/app/4220830/Myosotis_My_Life_Is_Not_Yours_to_Take/) | Pass |
|
||||
| [Man in a Suit...](https://store.steampowered.com/app/3292090/Man_in_a_suit_in_a_building_in_a_city/) | Pass |
|
||||
| [Mercury Elopement Syndrome](https://store.steampowered.com/app/4417890/Mercury_Elopement_Syndrome/) | Fail (DirectInput) |
|
||||
@@ -1,88 +0,0 @@
|
||||
# v1.2.0
|
||||
|
||||
Major feature update with click type per point, pixel color guard, game profiles, scheduler, real-time dashboard, and comprehensive quality-of-life improvements.
|
||||
|
||||
## New Features
|
||||
|
||||
### Click Type Per Point
|
||||
- Each coordinate in a sequence can independently be **Left Click**, **Double Click**, or **Right Click**
|
||||
- Press `1`/`2`/`3` in the coordinate picker to switch type before clicking
|
||||
- Instruction banner updates dynamically to show the currently selected type
|
||||
- Coordinate display shows `[D]` or `[R]` suffix for non-default types
|
||||
|
||||
### Game Profiles
|
||||
- **Save** coordinates + click settings + delay as named presets
|
||||
- **Load** presets into any game session
|
||||
- **Export/Import** profiles as `.autoclick` files for sharing
|
||||
- **Delete** profiles you no longer need
|
||||
- Profiles persist across app sessions
|
||||
|
||||
### Pixel Color Guard
|
||||
- Before each click, optionally **verify the pixel color** at the coordinate matches a reference color (captured when the point was picked)
|
||||
- On mismatch: **Skip Point** or **Stop Session** (configurable)
|
||||
- Adjustable **color tolerance** (0-50) for minor color variations
|
||||
- Color swatches displayed next to coordinates when guard is enabled
|
||||
|
||||
### Scheduler
|
||||
- Set **start time** and optional **stop time** (HH:mm format) for automated sessions
|
||||
- Live **countdown display** in toolbar
|
||||
- One-shot execution: starts at scheduled time, stops at scheduled time (or manually)
|
||||
- Cancel anytime
|
||||
|
||||
### Real-Time Dashboard
|
||||
- Dedicated **Dashboard tab** with interactive charts:
|
||||
- **CPM Line Chart** (live, 2-second intervals, 5-minute rolling window)
|
||||
- **Per-Game Breakdown** (horizontal bar chart: success vs skipped per game)
|
||||
- **Success/Skip Ratio** (pie chart)
|
||||
- **Per-Game CPM Timeline** (individual line per game with color coding and legend)
|
||||
- **Summary cards**: Total Clicks, Skipped, Uptime, Clicks/min, Peak CPM
|
||||
- **Export Stats** to JSON (full session data including exited games)
|
||||
- **Reset All Stats** button (disabled while tasks run)
|
||||
- Charts **freeze automatically** when no tasks are running
|
||||
|
||||
### Game Exit Notifications
|
||||
- **Balloon notification** when a game process exits while tasks are running
|
||||
- Shows success and skipped click counts for the exited game
|
||||
- **Auto-stop** when all games have exited the queue
|
||||
|
||||
### Settings Mode
|
||||
- **Global mode**: Same click settings for all games (default)
|
||||
- **Custom mode**: Per-game intervals, click mode, and profiles
|
||||
|
||||
### Other Improvements
|
||||
- **Archived game stats**: Exited game data preserved in dashboard until manual reset
|
||||
- **Per-game click stats**: Each game card shows Success, Skipped, and Total counts
|
||||
- **Bounds validation**: Auto-stop if window resizes and coordinates go out of bounds
|
||||
- **Sound notifications** for all major actions (toggleable)
|
||||
|
||||
## Fixes
|
||||
- Pixel color guard settings not syncing to existing sessions after saving
|
||||
- Color swatches incorrectly shown when guard is disabled
|
||||
- Per-game chart only displaying one process name with 2+ games
|
||||
- ESC key handling in coordinate picker
|
||||
- Peak CPM absurd values on first tick (inherited from v1.1.0)
|
||||
|
||||
## Important Notices
|
||||
|
||||
> **System Requirements:** Running multiple games simultaneously increases CPU, RAM, and GPU usage significantly. Ensure your system meets the minimum requirements specified by each game's developer. See [DISCLAIMER](docs/DISCLAIMER.md).
|
||||
|
||||
> **Anti-Cheat Warning:** Games with kernel-level anti-cheat may detect this tool. Use at your own risk. The developer is not responsible for any account bans.
|
||||
|
||||
> **Self-Contained Build:** This release includes the .NET 8 runtime. No separate runtime installation is required.
|
||||
|
||||
## Compatibility
|
||||
|
||||
| OS | v1.2.0 | Notes |
|
||||
|----|:------:|-------|
|
||||
| Windows 10 22H2+ / Windows 11 | **Full** | Recommended |
|
||||
| Windows 8.1 | Partial | Requires [VC++ 2015 Redistributable](https://www.microsoft.com/en-us/download/details.aspx?id=48145). Dashboard not available; use v1.1.0 |
|
||||
| Windows 7 | **Failed** | Not supported |
|
||||
|
||||
See [System Requirements](docs/SYSTEM_REQUIREMENTS.md) for tested configs and performance notes.
|
||||
|
||||
## Upgrade
|
||||
If you are on v1.0.x or v1.1.0, this version includes all previous fixes. Auto-update from v1.0.3+ should work seamlessly.
|
||||
|
||||
---
|
||||
|
||||
**Full Changelog:** https://github.com/poli0981/autoclick/compare/v1.1.0...v1.2.0
|
||||
+52
-75
@@ -1,100 +1,77 @@
|
||||
# Release Process
|
||||
|
||||
AutoClick uses [Velopack](https://velopack.io/) for packaging and updates, with GitHub Actions handling build & release automation. This doc describes the steps to cut a new release.
|
||||
AutoClick is packaged and updated with [Velopack](https://velopack.io/); GitHub Actions builds every release. A release is uploaded as a **draft**, verified, and only then published.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- You can push to `master` and create tags on `github.com/poli0981/autoclick`.
|
||||
- `.github/workflows/release.yml` is present (the workflow we lean on).
|
||||
- The repo's default `GITHUB_TOKEN` has write access to releases (already granted by `permissions: contents: write` in the workflow).
|
||||
- You can merge to `master` (through a pull request: the branch is protected) and push tags.
|
||||
- Tags matching `v*` are protected by a ruleset: they cannot be moved or deleted. A mistake after tagging is fixed with a new patch version, never by re-tagging.
|
||||
|
||||
## Steps
|
||||
## 1. Prepare the version (pull request)
|
||||
|
||||
### 1. Bump version in source
|
||||
1. Set the version once in [`Directory.Build.props`](../Directory.Build.props) (`<Version>X.Y.Z</Version>`); every project and the file/assembly versions derive from it.
|
||||
2. Add a `## [X.Y.Z] - YYYY-MM-DD` section to [`CHANGELOG.md`](../CHANGELOG.md) (move the items from `[Unreleased]`) and add its compare link at the bottom. The section becomes the release notes shown on GitHub, in the in-app update notice and on Discord; CI fails if it is missing.
|
||||
3. Open a pull request. CI runs the full release packaging as a dry run with the real notes, so problems show up before tagging.
|
||||
4. Merge when every required check is green.
|
||||
|
||||
Edit the `<Version>`, `<AssemblyVersion>`, `<FileVersion>`, `<InformationalVersion>` (UI only) entries in all four `.csproj` files:
|
||||
|
||||
- `src/AutoClick.UI/AutoClick.UI.csproj`
|
||||
- `src/AutoClick.Services/AutoClick.Services.csproj`
|
||||
- `src/AutoClick.Win32/AutoClick.Win32.csproj`
|
||||
- `src/AutoClick.Core/AutoClick.Core.csproj`
|
||||
|
||||
All four must match (e.g. `1.2.1` and `1.2.1.0`).
|
||||
|
||||
### 2. Update CHANGELOG.md
|
||||
|
||||
Add a section at the top following the existing format:
|
||||
|
||||
```markdown
|
||||
## [X.Y.Z] - YYYY-MM-DD
|
||||
|
||||
### Added
|
||||
- ...
|
||||
|
||||
### Fixed
|
||||
- ...
|
||||
```
|
||||
|
||||
The release workflow extracts the body of this section verbatim into the GitHub Release notes.
|
||||
|
||||
### 3. Commit and push
|
||||
## 2. Tag
|
||||
|
||||
```bash
|
||||
git add -A
|
||||
git commit -m "chore: bump version to X.Y.Z"
|
||||
git push origin master
|
||||
```
|
||||
|
||||
### 4. Tag the release
|
||||
|
||||
```bash
|
||||
git tag vX.Y.Z
|
||||
git switch master
|
||||
git pull
|
||||
git tag -s vX.Y.Z -m "AutoClick X.Y.Z"
|
||||
git push origin vX.Y.Z
|
||||
```
|
||||
|
||||
The push of a `v*` tag triggers `.github/workflows/release.yml`, which will:
|
||||
The tag starts [`release.yml`](../.github/workflows/release.yml). Its **build** job (read-only token plus attestation permissions):
|
||||
|
||||
1. Resolve the version from the tag.
|
||||
2. Extract release notes from `CHANGELOG.md`.
|
||||
3. `dotnet publish` the UI project as self-contained `win-x64`.
|
||||
4. Run `vpk download github` to fetch prior releases (so deltas can be computed).
|
||||
5. Run `vpk pack` to produce:
|
||||
- `releases.win.json`
|
||||
- `AutoClick-X.Y.Z-full.nupkg`
|
||||
- `AutoClick-X.Y.Z-delta.nupkg`
|
||||
- `AutoClick-win-Portable.zip`
|
||||
- `AutoClick-win-Setup.exe`
|
||||
6. Run `vpk upload github` to attach the artifacts to a GitHub Release named `AutoClick vX.Y.Z`.
|
||||
1. Checks that the tag is `vX.Y.Z`, matches the project version, and that the `vpk` CLI pinned in `.config/dotnet-tools.json` matches the Velopack library.
|
||||
2. Extracts the release notes from `CHANGELOG.md`.
|
||||
3. Publishes the app (self-contained `win-x64`), writes `THIRD-PARTY-NOTICES.txt` into it (failing on any license outside the policy) and runs the `--smoke-test` of the published exe.
|
||||
4. Packs with `vpk pack` (full package only): `AutoClick-win-Setup.exe`, `AutoClick-win-Portable.zip`, `AutoClick-X.Y.Z-full.nupkg`, and the update feed `releases.win.json` plus `RELEASES` (read by older clients).
|
||||
5. Generates an SPDX SBOM and creates build provenance and SBOM attestations for the installer, the portable zip and the package.
|
||||
|
||||
### 5. Publish the draft
|
||||
The **upload draft release** job then uploads these files (plus `AutoClick-X.Y.Z.spdx.json`) to a draft release named `AutoClick vX.Y.Z`.
|
||||
|
||||
`vpk upload github` creates the release as a **draft** by default. After the workflow succeeds:
|
||||
To rebuild an existing tag after a transient failure, use **Actions → Release → Run workflow** with the tag; it builds that tag and merges into the existing draft.
|
||||
|
||||
## 3. Verify the draft
|
||||
|
||||
Until it is published, the release is invisible to users and to the updater.
|
||||
|
||||
1. The draft lists the files above, and `releases.win.json` contains the new version.
|
||||
2. Verify the attestation of the downloaded installer:
|
||||
|
||||
```bash
|
||||
gh attestation verify AutoClick-win-Setup.exe -R poli0981/autoclick
|
||||
```
|
||||
|
||||
3. Test the update in **Windows Sandbox** (nothing is installed on your machine), from the previous release and from older ones users may still have. In PowerShell 7:
|
||||
|
||||
```powershell
|
||||
gh release download v1.3.4 -p AutoClick-win-Setup.exe -D artifacts/upgrade-test/old
|
||||
gh release download vX.Y.Z -p 'AutoClick-*-full.nupkg' -p AutoClick-win-Setup.exe -D artifacts/upgrade-test/new
|
||||
./eng/Invoke-UpgradeTest.ps1 -OldSetup artifacts/upgrade-test/old/AutoClick-win-Setup.exe -NewDir artifacts/upgrade-test/new
|
||||
```
|
||||
|
||||
The script installs the old release, adds 1.x settings and a profile, updates with the installed `Update.exe` (as the in-app updater does), starts the new version once (data migration) and runs its smoke test, then uninstalls and checks a fresh install. It prints PASS or FAIL for each check and keeps the logs in `artifacts/upgrade-test/runs`.
|
||||
|
||||
4. If the release changes the interface: a keyboard-only pass (mouse unplugged) and a Narrator pass of the changed screens, and a look at the High contrast theme ([ACCESSIBILITY.md](ACCESSIBILITY.md#how-we-test)). Add the result to its *Recorded passes* table.
|
||||
|
||||
## 4. Publish
|
||||
|
||||
Publish from **your own account** (events raised by the workflow token would not start other workflows):
|
||||
|
||||
```bash
|
||||
gh release edit vX.Y.Z --repo poli0981/autoclick --draft=false
|
||||
gh release edit vX.Y.Z --repo poli0981/autoclick --draft=false --latest
|
||||
```
|
||||
|
||||
Or open the release on GitHub and click "Publish release". Until this is done the release is invisible to end users and the auto-updater won't pick it up.
|
||||
Publishing raises `release: published`, which posts the Discord announcement and creates the release discussion. Check both, and that **About → Check for updates** in an older install now finds the release.
|
||||
|
||||
### 6. Manual trigger (alternative)
|
||||
## Runtime security updates
|
||||
|
||||
If you need to re-run a release without re-tagging (e.g. transient CI failure), use **Actions → Release → Run workflow** and enter the version number (e.g. `1.2.1`). The workflow uses `--merge` on upload, so re-runs add to the existing release rather than failing.
|
||||
|
||||
## Verifying a release
|
||||
|
||||
After the workflow finishes:
|
||||
|
||||
1. Open https://github.com/poli0981/autoclick/releases — the new release should be there.
|
||||
2. Confirm the five Velopack artifacts are attached.
|
||||
3. Open `releases.win.json` — the new version should appear in the list with valid SHA hashes.
|
||||
4. Install the previous version locally, open AutoClick → Settings → "Check for updates" — the new version should be detected.
|
||||
AutoClick ships its own .NET runtime. When Microsoft releases a .NET 10 servicing update with security fixes, Dependabot proposes the new SDK in `global.json`; merge it and ship a patch release so installed copies get the fixed runtime.
|
||||
|
||||
## Code signing
|
||||
|
||||
Currently disabled. To enable:
|
||||
|
||||
1. Add the `.pfx` certificate as a GitHub repo secret (e.g. `SIGNING_CERT_PFX_BASE64`) and the password as `SIGNING_CERT_PASSWORD`.
|
||||
2. Decode the cert into a file in the workflow before `vpk pack`.
|
||||
3. Pass `--signParams "/f cert.pfx /p $env:SIGNING_CERT_PASSWORD /tr http://timestamp.digicert.com /td sha256 /fd sha256"` to `vpk pack`.
|
||||
|
||||
Until that's in place, Windows SmartScreen may show a warning on first install for new users. Existing installs auto-update without prompting.
|
||||
Releases are not code-signed (Windows SmartScreen may warn new users on first install; updates of existing installs are not affected). Build provenance attestations let anyone check that a file was built by this repository's workflow. Free signing for open-source projects is available from [SignPath Foundation](https://signpath.org/); `vpk pack` accepts `--signParams` or `--azureTrustedSignFile` once a certificate is available.
|
||||
+28
-34
@@ -1,51 +1,45 @@
|
||||
# Security Policy
|
||||
|
||||
**Last updated:** April 2026
|
||||
**Last updated:** October 2026 (AutoClick 2.0)
|
||||
|
||||
## Supported Versions
|
||||
## Supported versions
|
||||
|
||||
| Version | Supported |
|
||||
|---------|-----------|
|
||||
| Latest release | Yes |
|
||||
| Previous releases | Security fixes only |
|
||||
| 2.x (latest release) | Yes |
|
||||
| 1.x | No: update to 2.x (it migrates your settings and profiles) |
|
||||
|
||||
## Application Security
|
||||
AutoClick includes its own .NET runtime. When Microsoft publishes a .NET security update, a patch release of AutoClick is built with the updated runtime; installed copies receive it through the normal update.
|
||||
|
||||
### Administrator Privileges
|
||||
AutoClick requests administrator privileges (`requireAdministrator` in app manifest) for the following reasons:
|
||||
- **RegisterHotKey**: Global hotkey registration requires elevated privileges
|
||||
- **PostMessage to elevated processes**: Some games run as administrator; to send messages to them, AutoClick must also be elevated
|
||||
## Reporting a vulnerability
|
||||
|
||||
### No Remote Code Execution
|
||||
- The Software does not execute any remote code
|
||||
- Updates are downloaded as complete packages from GitHub Releases and verified before installation
|
||||
- Velopack handles update verification with checksum validation
|
||||
Please **do not open a public issue** for security problems.
|
||||
|
||||
### No Data Exfiltration
|
||||
- The Software does not transmit any user data, game data, or system information to external servers
|
||||
- The only network activity is optional update checking via GitHub API
|
||||
1. Report it privately through GitHub: [**Security → Report a vulnerability**](https://github.com/poli0981/autoclick/security/advisories/new).
|
||||
2. If that is not possible, email the developer (address on the developer's [GitHub profile](https://github.com/poli0981) and in [social.md](social.md)).
|
||||
3. Include the AutoClick version, steps to reproduce and the impact you expect.
|
||||
|
||||
### Local Storage
|
||||
- Settings are stored in plain JSON at `%LocalAppData%\AutoClick\`
|
||||
- No encryption is used because no sensitive data is stored
|
||||
- Log files contain only application events, no personal data
|
||||
You will get an answer as soon as possible. Please allow time for a fix before disclosing the problem publicly; you will be credited in the advisory unless you prefer otherwise.
|
||||
|
||||
## Reporting Vulnerabilities
|
||||
## How AutoClick is built and shipped
|
||||
|
||||
If you discover a security vulnerability, please:
|
||||
- Every change goes through pull requests that must pass CodeQL, dependency review (no known-vulnerable or non-GPL-compatible packages), a daily audit of all direct and transitive packages, and OpenSSF Scorecard checks. GitHub Actions are pinned to commit hashes.
|
||||
- Releases are built by the repository's release workflow from a protected `vX.Y.Z` tag. Each release includes an SPDX software bill of materials and a GitHub build provenance attestation. Releases are not code-signed; verify a download with:
|
||||
|
||||
1. **Do NOT** open a public GitHub Issue
|
||||
2. Contact the developer privately via GitHub ([@poli0981](https://github.com/poli0981))
|
||||
3. Include a detailed description and steps to reproduce
|
||||
4. Allow reasonable time for a fix before public disclosure
|
||||
```bash
|
||||
gh attestation verify AutoClick-win-Setup.exe -R poli0981/autoclick
|
||||
```
|
||||
|
||||
## Known Security Considerations
|
||||
- Updates come only from this repository's GitHub Releases over HTTPS, and Velopack checks each package against the hash in the release feed before applying it.
|
||||
|
||||
### Win32 API Usage
|
||||
- `PostMessage` is used to send synthetic mouse events to game windows
|
||||
- `EnumWindows` enumerates visible windows to detect running games
|
||||
- `SetForegroundWindow` brings game windows to the front for coordinate picking
|
||||
- These are standard Win32 APIs and do not bypass security boundaries
|
||||
## Design notes
|
||||
|
||||
### Anti-Virus False Positives
|
||||
Auto-clicker software may be flagged by antivirus programs as potentially unwanted software (PUP). This is a common false positive for automation tools. The source code is fully open for inspection.
|
||||
- **Privileges:** AutoClick runs as a standard user. Windows blocks input from a normal program into a program that runs as administrator (User Interface Privilege Isolation), so AutoClick only asks for administrator rights when you choose to click such a game. While it is elevated, links open through Explorer, so your browser does not inherit administrator rights.
|
||||
- **Input:** clicks and keys are sent with `PostMessage` to the window you picked. AutoClick does not inject code, read game memory, or install hooks into other processes; it watches window focus and position with out-of-process accessibility events (`SetWinEventHook`).
|
||||
- **Single instance:** the lock and the named pipe used to bring an existing window to the front are restricted to your Windows account.
|
||||
- **Files:** settings and profiles are plain JSON in `%LocalAppData%\AutoClick` and are written atomically. Imported profile and session files are validated; a profile id can never be used to write outside the profiles folder.
|
||||
- **No network** besides the update check (see the [Privacy Policy](PRIVACY_POLICY.md)).
|
||||
|
||||
## Antivirus false positives
|
||||
|
||||
Automation tools are sometimes flagged as potentially unwanted software. AutoClick's source code is public, and the attestation above proves that a download was built from it. If your antivirus flags an official release, please report it to the antivirus vendor as a false positive.
|
||||
+34
-110
@@ -1,129 +1,53 @@
|
||||
# System Requirements
|
||||
|
||||
**Last updated:** April 2026
|
||||
**Applies to:** AutoClick 2.0 and later. **Last updated:** November 2026.
|
||||
|
||||
## Minimum Requirements
|
||||
## Requirements
|
||||
|
||||
| Component | Requirement |
|
||||
|-----------|-------------|
|
||||
| **OS** | Windows 8.1 / Windows 8.1 Pro |
|
||||
| **RAM** | 4 GB |
|
||||
| **CPU** | Dual-core processor (x64) |
|
||||
| **GPU** | Required only if running games; no GPU needed for AutoClick itself |
|
||||
| **Disk** | ~260 MB (self-contained build, includes .NET 8 runtime) |
|
||||
| **Runtime** | None (self-contained; .NET 8 is bundled in the installer) |
|
||||
| Component | Minimum | Recommended |
|
||||
|-----------|---------|-------------|
|
||||
| **Windows** | Windows 10 version 2004 (build 19041) | Windows 11, or Windows 10 22H2 |
|
||||
| **Architecture** | 64-bit (x64) | 64-bit (x64) |
|
||||
| **Memory** | 4 GB | 8 GB or more, plus what your games need |
|
||||
| **Disk** | About 170 MB for the app, plus your settings and logs | |
|
||||
| **Runtime** | Included: .NET 10 ships inside AutoClick (self-contained) | |
|
||||
| **Rights** | Standard user | Administrator only for games that run as administrator |
|
||||
|
||||
### Windows 8.1 Notes
|
||||
AutoClick itself is light: about 160 MB of memory with the window open and close to 0% CPU while idle or clicking at normal intervals. The load you notice comes from the games.
|
||||
|
||||
- **Mandatory prerequisite:** [Visual C++ Redistributable for Visual Studio 2015 (Legacy)](https://www.microsoft.com/en-us/download/details.aspx?id=48145) must be installed before running AutoClick.
|
||||
- **Dashboard not supported:** The real-time dashboard (LiveChartsCore + SkiaSharp) is not compatible with Windows 8.1. Only **v1.1.0** (without dashboard) is confirmed to work on this OS. If you are a developer, you may remove the Dashboard tab from the source code and build a custom version for Windows 8.1.
|
||||
- **Core features work:** Multi-game queue, click sequences, profiles, scheduler, pixel color guard, and all other non-dashboard features function correctly on Windows 8.1.
|
||||
> **Several games at once** need the combined requirements of every game you run, plus the operating system. For example, a game that needs 4 GB and another that needs 6 GB need at least 10 GB together. Watch temperatures and memory use, and run fewer games if the PC throttles or stutters.
|
||||
|
||||
### Windows 7
|
||||
## Older Windows versions
|
||||
|
||||
**Not supported.** AutoClick does not run on Windows 7. The .NET 8 runtime and several Win32 APIs used by AutoClick are not available on Windows 7. Testing confirmed a hard failure on this OS.
|
||||
AutoClick 2.0 does not run on Windows 7, 8, 8.1 or Windows 10 before version 2004.
|
||||
|
||||
---
|
||||
- **Windows 10 before 2004** and **Windows 8.1** users can keep using AutoClick **1.3.x** (Windows 10) or **1.1.0** (Windows 8.1, without the dashboard, needs the [Visual C++ 2015 Redistributable](https://www.microsoft.com/en-us/download/details.aspx?id=48145)). These versions no longer receive fixes.
|
||||
- **Windows 7** has never been supported.
|
||||
|
||||
## Recommended Requirements
|
||||
## Game modes
|
||||
|
||||
| Component | Requirement |
|
||||
|-----------|-------------|
|
||||
| **OS** | Windows 10 22H2 (Build 19045) or higher |
|
||||
| **RAM** | 8 GB or more |
|
||||
| **CPU** | Quad-core processor (x64) |
|
||||
| **GPU** | Dedicated GPU if running games |
|
||||
| **Disk** | ~260 MB + space for game(s) |
|
||||
| Game mode | Clicking | Heatmap overlay |
|
||||
|-----------|----------|-----------------|
|
||||
| Windowed | Supported | Supported |
|
||||
| Borderless window | Supported | Supported |
|
||||
| Fullscreen exclusive | Depends on the game | Usually hidden by the game |
|
||||
|
||||
> **Multi-game usage:** Running multiple games simultaneously requires significantly more RAM, CPU, and GPU resources than running a single game. Add the minimum requirements of each game you intend to run concurrently. For example, if Game A requires 4 GB RAM and Game B requires 6 GB RAM, you need at least 10 GB RAM plus OS overhead.
|
||||
See [HEATMAP_COMPATIBILITY.md](HEATMAP_COMPATIBILITY.md) for the overlay details and [DEV_ENVIRONMENT.md](DEV_ENVIRONMENT.md) for the games tested so far.
|
||||
|
||||
---
|
||||
## Display scaling and multiple monitors
|
||||
|
||||
## Tested Configurations
|
||||
AutoClick is per-monitor DPI aware. The coordinate picker and the heatmap work on every monitor and at any scaling, and points are stored in the game's own coordinates. Points picked with AutoClick 1.x in a game that is not DPI aware, on a scaled monitor, may be off and should be picked again.
|
||||
|
||||
All tests were performed using the **self-contained (x64)** build unless otherwise noted.
|
||||
## Accessibility
|
||||
|
||||
### Physical Machine (Development)
|
||||
AutoClick works with the keyboard alone and with Narrator, follows Windows contrast themes, display scaling and the *Animation effects* setting, and has a High contrast theme of its own. Supported assistive technology, known limitations and how to report a barrier are in the [Accessibility statement](ACCESSIBILITY.md).
|
||||
|
||||
| Component | Details |
|
||||
|-----------|---------|
|
||||
| **OS** | Windows 11 Pro Insider Preview (Dev Channel), Build 26300.8142 |
|
||||
| **CPU** | Intel Core i7-14700KF |
|
||||
| **GPU** | NVIDIA GeForce RTX 5080 (16 GB VRAM) |
|
||||
| **RAM** | 32 GB DDR5 |
|
||||
| **Storage** | 1 TB SSD |
|
||||
| **Result** | **All features pass** (v1.2.0 full, including dashboard) |
|
||||
## Tested configurations (2.0)
|
||||
|
||||
### Virtual Machine — Windows 10
|
||||
| Configuration | What was tested |
|
||||
|---------------|-----------------|
|
||||
| Developer PC: Windows 11 Pro Insider Preview (Dev Channel) build 29648, Core i7-14700KF, RTX 5080, 32 GB ([details](pc_spec.md)) | Everything, including end-to-end checks against the click target tool |
|
||||
| GitHub Actions `windows-latest` runner | Build, all tests, and the smoke test of the published app in every theme and language, on every change |
|
||||
| Windows Sandbox on the developer PC | Before each release: fresh install, update from the previous releases with data kept, and uninstall |
|
||||
|
||||
| Component | Details |
|
||||
|-----------|---------|
|
||||
| **OS** | Windows 10 22H2, Build 19045.3803 |
|
||||
| **CPU** | 2 cores (virtualized) |
|
||||
| **RAM** | 4 GB |
|
||||
| **VM Host** | Oracle VirtualBox 7.2.6 r172322 (Qt 6.8.0) |
|
||||
| **Result** | **All features pass** (v1.2.0 full, including dashboard) |
|
||||
|
||||
### Virtual Machine — Windows 8.1
|
||||
|
||||
| Component | Details |
|
||||
|-----------|---------|
|
||||
| **OS** | Windows 8.1 / Windows 8.1 Pro, Build 9600 |
|
||||
| **CPU** | 2 cores (virtualized) |
|
||||
| **RAM** | 8 GB |
|
||||
| **VM Host** | Oracle VirtualBox 7.2.6 r172322 (Qt 6.8.0) |
|
||||
| **Prerequisite** | [Visual C++ Redistributable for Visual Studio 2015 (Legacy)](https://www.microsoft.com/en-us/download/details.aspx?id=48145) — **mandatory** |
|
||||
| **Result** | **Partial pass — v1.1.0 only.** Core features work. Dashboard (LiveChartsCore/SkiaSharp) is not compatible with this OS. |
|
||||
|
||||
### Virtual Machine — Windows 7
|
||||
|
||||
| Component | Details |
|
||||
|-----------|---------|
|
||||
| **OS** | Windows 7 |
|
||||
| **VM Host** | Oracle VirtualBox 7.2.6 r172322 (Qt 6.8.0) |
|
||||
| **Result** | **Failed.** Application does not launch. .NET 8 runtime is not supported on Windows 7. |
|
||||
|
||||
### Testing Tools
|
||||
|
||||
| Tool | Version | Purpose |
|
||||
|------|---------|---------|
|
||||
| **Oracle VirtualBox** | 7.2.6 r172322 (Qt 6.8.0 on Windows) | Primary VM platform for OS compatibility testing |
|
||||
| **Windows Sandbox** | (Windows 10/11 built-in) | Quick isolated testing environment |
|
||||
|
||||
---
|
||||
|
||||
## Compatibility Matrix
|
||||
|
||||
| OS | Version | AutoClick v1.2.0 | AutoClick v1.1.0 | Notes |
|
||||
|----|---------|:-:|:-:|-------|
|
||||
| Windows 11 | 23H2+ | **Full** | **Full** | Recommended |
|
||||
| Windows 10 | 22H2 (19045) | **Full** | **Full** | Recommended minimum |
|
||||
| Windows 10 | Older builds | Likely works | Likely works | Not officially tested |
|
||||
| Windows 8.1 | Build 9600 | Partial | **Full** | Requires VC++ 2015. No dashboard in v1.2.0 |
|
||||
| Windows 8 | — | Unknown | Unknown | Not tested |
|
||||
| Windows 7 | — | **Failed** | **Failed** | Not supported |
|
||||
|
||||
**Legend:**
|
||||
- **Full** — All features work as intended
|
||||
- **Partial** — Core features work; dashboard/charts unavailable
|
||||
- **Failed** — Application does not launch
|
||||
|
||||
---
|
||||
|
||||
## Performance Considerations
|
||||
|
||||
### Single Game
|
||||
- AutoClick itself consumes minimal resources (~30-50 MB RAM, <1% CPU at idle, <2% CPU during active clicking)
|
||||
- Performance impact depends almost entirely on the game being automated
|
||||
|
||||
### Multiple Games
|
||||
- Each additional game increases total system resource consumption
|
||||
- **Always check the minimum requirements on the game's store page** (Steam, Epic, etc.) and ensure your system can handle the combined load
|
||||
- Monitor CPU temperature, GPU temperature, and RAM usage during multi-game operation
|
||||
- If you observe thermal throttling, excessive fan noise, or sluggish performance, reduce the number of concurrent games
|
||||
- Consider using **Windowed** or **Borderless Windowed** mode for all games to reduce GPU overhead compared to Fullscreen Exclusive
|
||||
|
||||
### Dashboard
|
||||
- The real-time dashboard (LiveChartsCore + SkiaSharp) adds moderate GPU/CPU usage when the Dashboard tab is open
|
||||
- Charts update every 2 seconds; closing the Dashboard tab does not stop the timer but hides rendering
|
||||
- On low-spec systems, avoid keeping the Dashboard tab visible during heavy multi-game operation
|
||||
AutoClick 1.x was additionally tested in VirtualBox on Windows 10 22H2 (build 19045: all features) and Windows 8.1 (1.1.0 only).
|
||||
@@ -1,6 +1,6 @@
|
||||
# Terms of Service
|
||||
|
||||
**Last updated:** April 2026
|
||||
**Last updated:** October 2026
|
||||
|
||||
## 1. Acceptance of Terms
|
||||
|
||||
@@ -8,11 +8,12 @@ By downloading, installing, or using AutoClick ("the Software"), you agree to be
|
||||
|
||||
## 2. License
|
||||
|
||||
AutoClick is licensed under the **GNU General Public License v3.0 (GPL-3.0)**. You may use, modify, and distribute the Software in accordance with the terms of this license. See the [LICENSE](https://github.com/poli0981/autoclick/blob/main/LICENSE) file for full details.
|
||||
AutoClick is licensed under the **GNU General Public License v3.0 (GPL-3.0)**. You may use, modify, and distribute the Software in accordance with the terms of this license. See the [LICENSE](https://github.com/poli0981/autoclick/blob/master/LICENSE) file for full details. These Terms do not limit the rights the GPL-3.0 gives you; where they conflict, the GPL-3.0 prevails.
|
||||
|
||||
## 3. Permitted Use
|
||||
|
||||
The Software is intended for:
|
||||
|
||||
- Automating repetitive mouse clicks in games and applications
|
||||
- Personal, non-commercial use
|
||||
- Educational purposes (learning about Win32 API, WPF, MVVM architecture)
|
||||
@@ -20,6 +21,7 @@ The Software is intended for:
|
||||
## 4. Prohibited Use
|
||||
|
||||
You agree NOT to use the Software to:
|
||||
|
||||
- Violate any game's Terms of Service or End User License Agreement
|
||||
- Gain unfair competitive advantages in multiplayer or ranked games
|
||||
- Engage in any activity that is illegal under applicable laws
|
||||
@@ -49,8 +51,8 @@ You agree NOT to use the Software to:
|
||||
|
||||
## 8. Updates
|
||||
|
||||
- The Software may check for updates via the GitHub Releases API.
|
||||
- Updates are optional and can be disabled in Settings.
|
||||
- When automatic updates are on (the default), the Software checks this project's GitHub Releases at startup and every 6 hours and downloads new versions; it installs them when you choose or when you exit.
|
||||
- Automatic updates can be turned off in Settings.
|
||||
- Updated versions may include changes to these Terms; continued use constitutes acceptance.
|
||||
|
||||
## 9. Disclaimer of Warranties
|
||||
@@ -62,6 +64,7 @@ THE SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. THE DEVELOPER MAK
|
||||
IN NO EVENT SHALL THE DEVELOPER BE LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT, OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
This includes but is not limited to:
|
||||
|
||||
- Game account bans or suspensions
|
||||
- Loss of in-game items, currency, or progress
|
||||
- Hardware damage, overheating, or component failure
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
# Môi Trường Phát Triển
|
||||
|
||||
Cách AutoClick được build và kiểm thử, dành cho cộng tác viên muốn tái lập môi trường. Thông số máy nằm trong [pc_spec.md](pc_spec.md). Bản tiếng Anh ở [docs/DEV_ENVIRONMENT.md](../../DEV_ENVIRONMENT.md).
|
||||
|
||||
## Toolchain
|
||||
|
||||
| Công cụ | Phiên bản | Ghi chú |
|
||||
|---------|-----------|---------|
|
||||
| **.NET SDK** | 10.0.4xx | Pin trong [`global.json`](../../../global.json) (`rollForward: latestFeature`) |
|
||||
| **Target framework** | `net10.0` (Core), `net10.0-windows10.0.19041.0` (các project còn lại) | |
|
||||
| **Tool cục bộ** | [`.config/dotnet-tools.json`](../../../.config/dotnet-tools.json) | `vpk` (Velopack), ReSharper InspectCode, nuget-license, sbom-tool, ReportGenerator |
|
||||
| **IDE** | JetBrains Rider 2026.x hoặc Visual Studio Code | Trình soạn thảo nào hỗ trợ `.editorconfig` đều được |
|
||||
|
||||
## Build và kiểm thử
|
||||
|
||||
```bash
|
||||
git clone https://github.com/poli0981/autoclick.git
|
||||
cd autoclick
|
||||
dotnet tool restore
|
||||
dotnet build AutoClick.slnx
|
||||
dotnet test --solution AutoClick.slnx
|
||||
dotnet run --project src/AutoClick.UI
|
||||
```
|
||||
|
||||
AutoClick chạy với quyền người dùng thường; chỉ cần quyền quản trị khi click vào game cũng chạy với quyền quản trị.
|
||||
|
||||
Các bước kiểm tra CI chạy cho mỗi pull request, và cách chạy chúng trên máy, nằm trong [CONTRIBUTING.md](../../../CONTRIBUTING.md).
|
||||
|
||||
## Công cụ kiểm thử
|
||||
|
||||
| Công cụ | Mục đích |
|
||||
|---------|----------|
|
||||
| **`tools/AutoClick.ClickTarget`** | Cửa sổ ghi lại mọi message chuột và bàn phím nhận được (toạ độ client, mã phím ảo và scan code). `--dpi unaware\|system\|pmv2` đổi chế độ DPI để kiểm tra quy đổi toạ độ, `--log <file>` ghi log ra file. |
|
||||
| **`AutoClick.UI.exe --smoke-test`** | Mở mọi trang ở mọi theme và ngôn ngữ, các hộp thoại và lớp heatmap, báo lỗi nếu có binding hỏng, chữ không theo theme, hoặc control/mục danh sách mà trình đọc màn hình không tìm được tên. Dùng `%TEMP%\AutoClick-smoke` thay cho thư mục dữ liệu thật. |
|
||||
| **Narrator và bàn phím** | Kiểm tra accessibility thủ công cho các thay đổi giao diện: rút chuột ra và dùng `Tab`, phím mũi tên, `Enter`, `Esc`; bật Narrator bằng `Ctrl+Win+Enter`. Những điểm cần kiểm tra nằm trong [ACCESSIBILITY.md](../../ACCESSIBILITY.md#how-we-test) (tiếng Anh). |
|
||||
| **`eng/Invoke-UpgradeTest.ps1`** | Kiểm thử cập nhật trong Windows Sandbox, không ảnh hưởng máy phát triển: cài một bản cũ (ví dụ 1.3.3), cập nhật lên gói mới bằng trình cập nhật đã cài, rồi kiểm tra việc chuyển dữ liệu, gỡ cài đặt và cài mới. Chạy trước mỗi lần phát hành ([RELEASING.md](../../RELEASING.md)). |
|
||||
|
||||
## Game Đã Kiểm Thử
|
||||
|
||||
Kết quả với AutoClick 1.x trên máy của developer; có thể khác tuỳ hệ thống, phiên bản game và cấu hình anti-cheat của bạn.
|
||||
|
||||
### Đạt
|
||||
|
||||
| Game | Liên kết | Ghi chú |
|
||||
|------|----------|---------|
|
||||
| **Bound Between Desks** | [Steam](https://store.steampowered.com/app/3790060/Bound_Between_Desks/) | Click PostMessage được nhận đúng |
|
||||
| **Myosotis: My Life Is Not Yours to Take** | [Steam](https://store.steampowered.com/app/4220830/Myosotis_My_Life_Is_Not_Yours_to_Take/) | Mọi chế độ click đều hoạt động |
|
||||
| **Man in a Suit in a Building in a City** | [Steam](https://store.steampowered.com/app/3292090/Man_in_a_suit_in_a_building_in_a_city/) | Click nền ổn định |
|
||||
|
||||
### Đạt (có lưu ý)
|
||||
|
||||
| Game | Liên kết | Anti-Cheat | Ghi chú |
|
||||
|------|----------|------------|---------|
|
||||
| **Wuthering Waves** | [Steam](https://store.steampowered.com/app/3513350/Wuthering_Waves/) | ACE (Kernel) | Tạm thời đạt khi thử. **Có anti-cheat cấp kernel**: tự chịu rủi ro khi dùng. Cách phát hiện có thể thay đổi theo bản cập nhật game. |
|
||||
|
||||
### Không đạt
|
||||
|
||||
| Game | Liên kết | Ghi chú |
|
||||
|------|----------|---------|
|
||||
| **Mercury Elopement Syndrome** | [Steam](https://store.steampowered.com/app/4417890/Mercury_Elopement_Syndrome/) | Game không nhận click PostMessage. Có thể game dùng DirectInput hoặc Raw Input, không phản hồi message `WM_LBUTTONDOWN`. |
|
||||
|
||||
## Lưu Ý Tương Thích
|
||||
|
||||
- **Click bằng PostMessage** hoạt động với game xử lý message cửa sổ chuẩn (`WM_LBUTTONDOWN` / `WM_LBUTTONUP`, `WM_KEYDOWN` / `WM_KEYUP`). Game đọc DirectInput, Raw Input hoặc luồng input riêng có thể không phản hồi.
|
||||
- **Game chạy với quyền quản trị** chỉ nhận input từ chương trình có cùng quyền; AutoClick phát hiện điều này và đề nghị khởi động lại với quyền quản trị.
|
||||
- **Chế độ toàn màn hình độc quyền (fullscreen exclusive)** có thể chặn message và lớp phủ. Nên dùng chế độ cửa sổ hoặc không viền.
|
||||
- **Anti-cheat cấp kernel** (EasyAntiCheat, BattlEye, Vanguard, ACE) có thể phát hiện công cụ tự động bất kể cách làm. Hãy đọc điều khoản của game trước khi dùng.
|
||||
@@ -0,0 +1,42 @@
|
||||
# Cấu Hình Máy Phát Triển
|
||||
|
||||
Bản tiếng Việt của [docs/pc_spec.md](../../pc_spec.md). Tài liệu mô tả công khai máy chính của developer — máy dùng để build và kiểm thử dự án. Kết quả kiểm thử game nằm trong [DEV_ENVIRONMENT.md](DEV_ENVIRONMENT.md).
|
||||
|
||||
> Áp dụng cho **toàn bộ** các dự án đang triển khai của developer, không chỉ riêng AutoClick.
|
||||
|
||||
## Máy Phát Triển Chính
|
||||
|
||||
| Thành phần | Chi tiết |
|
||||
|------------|----------|
|
||||
| **OS** | Windows 11 Pro Insider Preview (kênh Dev) |
|
||||
| **Build** | 29648.1000 |
|
||||
| **CPU** | Intel Core i7-14700KF |
|
||||
| **GPU** | NVIDIA GeForce RTX 5080 (16 GB VRAM) |
|
||||
| **RAM** | 32 GB DDR5 |
|
||||
| **Lưu trữ** | SSD 1 TB |
|
||||
| **IDE** | JetBrains IDEs (bản trả phí) 2026.x + Visual Studio Code |
|
||||
|
||||
## Thiết Bị Di Động Để Kiểm Thử
|
||||
|
||||
Dùng cho kiểm tra web đa trình duyệt:
|
||||
|
||||
- iPhone 14 Pro — iOS 26.x — Chrome, Brave
|
||||
- iPhone 13 Pro Max — iOS 26.x — Chrome, Brave
|
||||
|
||||
## Phiên Bản Toolchain
|
||||
|
||||
Chỉ liệt kê các toolchain đang cài cho các dự án hiện hành. Mỗi dự án có thể pin phiên bản chặt hơn (AutoClick pin .NET SDK trong [`global.json`](../../../global.json)).
|
||||
|
||||
- **.NET** — SDK 10.0.4xx; runtime 8.0 và 10.0
|
||||
- **Python** — 3.14.x
|
||||
- **Node.js** — 24.x
|
||||
- **Rust** — stable (cài qua `rustup`)
|
||||
- **Git** — 2.56; bật GPG ký commit (`commit.gpgsign=true`)
|
||||
|
||||
Phiên bản mới sẽ được bổ sung khi xuất hiện trong dự án đã phát hành.
|
||||
|
||||
## Tài Liệu Liên Quan
|
||||
|
||||
- [DEV_ENVIRONMENT.md](DEV_ENVIRONMENT.md) — build, công cụ kiểm thử và các game đã thử (tiếng Việt)
|
||||
- [../../SYSTEM_REQUIREMENTS.md](../../SYSTEM_REQUIREMENTS.md) — yêu cầu hệ thống cho người dùng cuối
|
||||
- [../../pc_spec.md](../../pc_spec.md) — bản gốc tiếng Anh
|
||||
@@ -0,0 +1,56 @@
|
||||
# Kết Nối Với Developer
|
||||
|
||||
Hồ sơ công khai, kênh cộng đồng và các đường link ủng hộ developer AutoClick. Bản tiếng Anh ở [docs/social.md](../../social.md).
|
||||
|
||||
## Tài Khoản Chính
|
||||
|
||||
| Nền tảng | Handle / Link |
|
||||
|----------|---------------|
|
||||
| **X (Twitter)** | [@SkullMute0011](https://x.com/SkullMute0011) |
|
||||
| **YouTube** | [@SkullMute](https://www.youtube.com/@SkullMute) |
|
||||
| **GitHub** | [poli0981](https://github.com/poli0981) |
|
||||
| **Steam** | [SkullMute](https://steamcommunity.com/profiles/76561199544666292/) |
|
||||
|
||||
## Cộng Đồng
|
||||
|
||||
| Kênh | Lời mời |
|
||||
|------|---------|
|
||||
| **Discord** | [discord.gg/kDM9GMu5vm](https://discord.gg/kDM9GMu5vm) |
|
||||
|
||||
## Mạng Liên Bang
|
||||
|
||||
| Mạng | Hồ sơ |
|
||||
|------|-------|
|
||||
| **Bluesky** | [@skullmute0011.bsky.social](https://bsky.app/profile/skullmute0011.bsky.social) |
|
||||
| **Mastodon** | [@skullmute1122@mastodon.social](https://mastodon.social/@skullmute1122) |
|
||||
|
||||
## Telegram
|
||||
|
||||
| Loại | Handle |
|
||||
|------|--------|
|
||||
| **Bot** | [@my_skull_bot](https://t.me/my_skull_bot) — hoặc quét QR (trong `assets/qr/`, file chưa track — liên hệ trực tiếp) |
|
||||
| **User** | [@SkullMute0011](https://t.me/SkullMute0011) — hoặc quét QR |
|
||||
|
||||
## Liên Hệ Trực Tiếp
|
||||
|
||||
- **Email** — <lopop05905@proton.me>
|
||||
|
||||
## Ủng Hộ Dự Án
|
||||
|
||||
Nếu AutoClick giúp bạn tiết kiệm thời gian, bạn có thể tiếp sức cho việc phát triển tiếp:
|
||||
|
||||
| Nền tảng | Link |
|
||||
|----------|------|
|
||||
| **GitHub Sponsors** | [github.com/sponsors/poli0981](https://github.com/sponsors/poli0981) |
|
||||
| **Patreon** | [patreon.com/skullmute](https://www.patreon.com/skullmute) |
|
||||
| **Ko-fi** | [ko-fi.com/skullmute](https://ko-fi.com/skullmute) |
|
||||
| **Buy Me a Coffee** | [buymeacoffee.com/skullmute](https://www.buymeacoffee.com/skullmute) |
|
||||
| **PayPal** | [paypal.me/DungDang212](https://paypal.me/DungDang212) |
|
||||
|
||||
Cùng cấu hình funding này điều khiển nút [Sponsor this project](../../../.github/FUNDING.yml) hiển thị trên GitHub.
|
||||
|
||||
## Báo Cáo Sự Cố
|
||||
|
||||
- **Báo bug** — mở issue mới qua mẫu [Bug Report](https://github.com/poli0981/autoclick/issues/new?template=bug_report.yml).
|
||||
- **Đề xuất tính năng** — dùng mẫu [Feature Request](https://github.com/poli0981/autoclick/issues/new?template=feature_request.yml).
|
||||
- **Báo lỗ hổng bảo mật** — xem [SECURITY.md](../../SECURITY.md).
|
||||
@@ -0,0 +1,43 @@
|
||||
# PC Specification
|
||||
|
||||
Public-facing snapshot of the primary developer workstation: what the project is built and tested on. Game and test results live in [DEV_ENVIRONMENT.md](DEV_ENVIRONMENT.md). The Vietnamese mirror is at [i18n/vi/pc_spec.md](i18n/vi/pc_spec.md).
|
||||
|
||||
> Applies to **all** of the developer's active projects, not only AutoClick.
|
||||
|
||||
## Developer Machine (Primary)
|
||||
|
||||
| Component | Details |
|
||||
|-----------|---------|
|
||||
| **OS** | Windows 11 Pro Insider Preview (Dev Channel) |
|
||||
| **Build** | 29648.1000 |
|
||||
| **CPU** | Intel Core i7-14700KF |
|
||||
| **GPU** | NVIDIA GeForce RTX 5080 (16 GB VRAM) |
|
||||
| **RAM** | 32 GB DDR5 |
|
||||
| **Storage** | 1 TB SSD |
|
||||
| **IDE** | JetBrains IDEs (paid lineup) 2026.x + Visual Studio Code |
|
||||
|
||||
## Mobile Test Devices
|
||||
|
||||
Used for cross-browser web verification:
|
||||
|
||||
- iPhone 14 Pro — iOS 26.x — Chrome, Brave
|
||||
- iPhone 13 Pro Max — iOS 26.x — Chrome, Brave
|
||||
|
||||
## Toolchain Versions
|
||||
|
||||
Only the toolchains currently installed for active projects are listed. Each project may pin stricter versions (AutoClick pins its .NET SDK in [`global.json`](../global.json)).
|
||||
|
||||
- **.NET** — SDK 10.0.4xx; runtimes 8.0 and 10.0
|
||||
- **Python** — 3.14.x
|
||||
- **Node.js** — 24.x
|
||||
- **Rust** — stable (via `rustup`)
|
||||
- **Git** — 2.56; GPG commit signing enabled (`commit.gpgsign=true`)
|
||||
|
||||
Newer versions are added as they appear in shipped projects.
|
||||
|
||||
## Related Documents
|
||||
|
||||
- [DEV_ENVIRONMENT.md](DEV_ENVIRONMENT.md) — build, test tools and tested games
|
||||
- [SYSTEM_REQUIREMENTS.md](SYSTEM_REQUIREMENTS.md) — end-user system requirements
|
||||
- [i18n/vi/pc_spec.md](i18n/vi/pc_spec.md) — Vietnamese mirror of this document
|
||||
- [i18n/vi/DEV_ENVIRONMENT.md](i18n/vi/DEV_ENVIRONMENT.md) — Vietnamese mirror of the development environment document
|
||||
@@ -0,0 +1,56 @@
|
||||
# Connect with the Developer
|
||||
|
||||
Public profiles, community channels, and support links for the AutoClick developer. The Vietnamese mirror is at [i18n/vi/social.md](i18n/vi/social.md).
|
||||
|
||||
## Primary Handles
|
||||
|
||||
| Platform | Handle / Link |
|
||||
|----------|---------------|
|
||||
| **X (Twitter)** | [@SkullMute0011](https://x.com/SkullMute0011) |
|
||||
| **YouTube** | [@SkullMute](https://www.youtube.com/@SkullMute) |
|
||||
| **GitHub** | [poli0981](https://github.com/poli0981) |
|
||||
| **Steam** | [SkullMute](https://steamcommunity.com/profiles/76561199544666292/) |
|
||||
|
||||
## Communities
|
||||
|
||||
| Channel | Invite |
|
||||
|---------|--------|
|
||||
| **Discord** | [discord.gg/kDM9GMu5vm](https://discord.gg/kDM9GMu5vm) |
|
||||
|
||||
## Federated
|
||||
|
||||
| Network | Profile |
|
||||
|---------|---------|
|
||||
| **Bluesky** | [@skullmute0011.bsky.social](https://bsky.app/profile/skullmute0011.bsky.social) |
|
||||
| **Mastodon** | [@skullmute1122@mastodon.social](https://mastodon.social/@skullmute1122) |
|
||||
|
||||
## Telegram
|
||||
|
||||
| Type | Handle |
|
||||
|------|--------|
|
||||
| **Bot** | [@my_skull_bot](https://t.me/my_skull_bot) — or scan QR (in `assets/qr/`, file untracked — request directly) |
|
||||
| **User** | [@SkullMute0011](https://t.me/SkullMute0011) — or scan QR |
|
||||
|
||||
## Direct Contact
|
||||
|
||||
- **Email** — <lopop05905@proton.me>
|
||||
|
||||
## Support the Project
|
||||
|
||||
If AutoClick saved you time, you can fuel further development:
|
||||
|
||||
| Platform | Link |
|
||||
|----------|------|
|
||||
| **GitHub Sponsors** | [github.com/sponsors/poli0981](https://github.com/sponsors/poli0981) |
|
||||
| **Patreon** | [patreon.com/skullmute](https://www.patreon.com/skullmute) |
|
||||
| **Ko-fi** | [ko-fi.com/skullmute](https://ko-fi.com/skullmute) |
|
||||
| **Buy Me a Coffee** | [buymeacoffee.com/skullmute](https://www.buymeacoffee.com/skullmute) |
|
||||
| **PayPal** | [paypal.me/DungDang212](https://paypal.me/DungDang212) |
|
||||
|
||||
The same funding configuration drives the [Sponsor this project](../.github/FUNDING.yml) button on GitHub.
|
||||
|
||||
## Reporting Issues
|
||||
|
||||
- **Bug report** — open a new issue with the [Bug Report](https://github.com/poli0981/autoclick/issues/new?template=bug_report.yml) template.
|
||||
- **Feature request** — use the [Feature Request](https://github.com/poli0981/autoclick/issues/new?template=feature_request.yml) template.
|
||||
- **Security disclosure** — see [SECURITY.md](SECURITY.md).
|
||||
@@ -0,0 +1,36 @@
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Prints the product version and checks that the vpk CLI matches the Velopack library.
|
||||
.DESCRIPTION
|
||||
Velopack recommends packaging with the same vpk version as the referenced library.
|
||||
Writes 'version=<x.y.z>' to $env:GITHUB_OUTPUT when running in GitHub Actions.
|
||||
#>
|
||||
[CmdletBinding()]
|
||||
param(
|
||||
[string] $Project = (Join-Path $PSScriptRoot '..' 'src' 'AutoClick.UI' 'AutoClick.UI.csproj'),
|
||||
[string] $ExpectedVersion
|
||||
)
|
||||
|
||||
$ErrorActionPreference = 'Stop'
|
||||
$root = Join-Path $PSScriptRoot '..'
|
||||
|
||||
$raw = dotnet msbuild $Project -getProperty:Version -getItem:PackageReference -getItem:PackageVersion
|
||||
if ($LASTEXITCODE -ne 0) { throw "msbuild evaluation failed: $raw" }
|
||||
$info = $raw | ConvertFrom-Json
|
||||
|
||||
$version = $info.Properties.Version
|
||||
$velopack = ($info.Items.PackageVersion | Where-Object Identity -eq 'Velopack' | Select-Object -First 1).Version
|
||||
if (-not $velopack) {
|
||||
$velopack = ($info.Items.PackageReference | Where-Object Identity -eq 'Velopack' | Select-Object -First 1).Version
|
||||
}
|
||||
$vpk = (Get-Content -LiteralPath (Join-Path $root '.config' 'dotnet-tools.json') -Raw | ConvertFrom-Json).tools.vpk.version
|
||||
|
||||
Write-Host "Version: $version | Velopack: $velopack | vpk: $vpk"
|
||||
|
||||
if ($version -notmatch '^\d+\.\d+\.\d+$') { throw "Project version '$version' is not X.Y.Z." }
|
||||
if ($velopack -ne $vpk) { throw "vpk $vpk must match the Velopack library version $velopack (.config/dotnet-tools.json)." }
|
||||
if ($ExpectedVersion -and $ExpectedVersion -ne $version) {
|
||||
throw "Tag version $ExpectedVersion does not match the project version $version."
|
||||
}
|
||||
|
||||
if ($env:GITHUB_OUTPUT) { "version=$version" | Out-File -FilePath $env:GITHUB_OUTPUT -Append -Encoding utf8 }
|
||||
@@ -0,0 +1,29 @@
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Extracts the CHANGELOG.md section for one version into a Markdown file for Velopack.
|
||||
.DESCRIPTION
|
||||
Fails (exit 1) when the section is missing so a release can never ship with
|
||||
placeholder notes. Used by both the CI dry run and the Release workflow.
|
||||
.EXAMPLE
|
||||
./eng/Get-ReleaseNotes.ps1 -Version 1.3.4 -OutFile release_notes.md
|
||||
#>
|
||||
[CmdletBinding()]
|
||||
param(
|
||||
[Parameter(Mandatory)] [string] $Version,
|
||||
[Parameter(Mandatory)] [string] $OutFile,
|
||||
[string] $Changelog = (Join-Path $PSScriptRoot '..' 'CHANGELOG.md')
|
||||
)
|
||||
|
||||
$ErrorActionPreference = 'Stop'
|
||||
|
||||
$text = Get-Content -LiteralPath $Changelog -Raw
|
||||
$escaped = [regex]::Escape($Version)
|
||||
$match = [regex]::Match($text, "(?ms)^## \[$escaped\][^\n]*\r?\n(.*?)(?=^## \[|^---\s*$|\z)")
|
||||
if (-not $match.Success -or [string]::IsNullOrWhiteSpace($match.Groups[1].Value)) {
|
||||
Write-Error "CHANGELOG.md has no '## [$Version]' section with content."
|
||||
exit 1
|
||||
}
|
||||
|
||||
$notes = $match.Groups[1].Value.Trim()
|
||||
Set-Content -LiteralPath $OutFile -Value $notes -Encoding utf8NoBOM -NoNewline
|
||||
Write-Host "Release notes for $Version ($($notes.Length) chars) written to $OutFile"
|
||||
@@ -0,0 +1,41 @@
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Runs the published app with --smoke-test and fails if it does not exit 0 in time.
|
||||
.DESCRIPTION
|
||||
--smoke-test builds the DI graph, opens every page in every theme and language, the
|
||||
dialogs and a heatmap overlay, checks that page and chart text follow the theme and that
|
||||
screen readers find a name for every control and list item, and exits 1 on any exception,
|
||||
data-binding error, wrong text color or missing name. It uses %TEMP%\AutoClick-smoke as its
|
||||
data folder; on failure the newest log from there is printed.
|
||||
#>
|
||||
[CmdletBinding()]
|
||||
param(
|
||||
[Parameter(Mandatory)] [string] $Exe,
|
||||
[int] $TimeoutSeconds = 120
|
||||
)
|
||||
|
||||
$ErrorActionPreference = 'Stop'
|
||||
|
||||
$exePath = (Resolve-Path -LiteralPath $Exe).Path
|
||||
$process = Start-Process -FilePath $exePath -ArgumentList '--smoke-test' -PassThru
|
||||
if (-not $process.WaitForExit($TimeoutSeconds * 1000)) {
|
||||
$process.Kill($true)
|
||||
$code = 'timeout'
|
||||
} else {
|
||||
$code = $process.ExitCode
|
||||
}
|
||||
|
||||
$logDir = Join-Path ([IO.Path]::GetTempPath()) 'AutoClick-smoke\logs'
|
||||
$log = Get-ChildItem -LiteralPath $logDir -Filter '*.log' -ErrorAction SilentlyContinue |
|
||||
Sort-Object LastWriteTime | Select-Object -Last 1
|
||||
|
||||
if ($code -ne 0) {
|
||||
if ($log) {
|
||||
Write-Host "--- $($log.FullName) ---"
|
||||
Get-Content -LiteralPath $log.FullName -Tail 80
|
||||
}
|
||||
Write-Error "Smoke test failed (exit code: $code)."
|
||||
exit 1
|
||||
}
|
||||
|
||||
Write-Host "Smoke test passed ($exePath)."
|
||||
@@ -0,0 +1,119 @@
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Tests updating an installed older release to a new release, inside Windows Sandbox.
|
||||
.DESCRIPTION
|
||||
Installs the old release with its Setup.exe, adds 1.x user data (tests/Fixtures/v1), applies
|
||||
the new full package with the installed Update.exe (the path the in-app updater takes), starts
|
||||
the new version once (settings migration), runs its smoke test, uninstalls, and installs the
|
||||
new Setup.exe on a clean profile (eng/upgrade-test/run-upgrade-test.ps1). Nothing is installed
|
||||
on this machine. Needs the Windows Sandbox feature; a run takes about two minutes.
|
||||
Prints one line per check and exits 1 if any fails. Logs and result.json stay in the run folder.
|
||||
.EXAMPLE
|
||||
gh release download v1.3.4 -p AutoClick-win-Setup.exe -D artifacts/upgrade-test/old
|
||||
gh release download v2.0.1 -p 'AutoClick-*-full.nupkg' -p AutoClick-win-Setup.exe -D artifacts/upgrade-test/new
|
||||
./eng/Invoke-UpgradeTest.ps1 -OldSetup artifacts/upgrade-test/old/AutoClick-win-Setup.exe -NewDir artifacts/upgrade-test/new
|
||||
#>
|
||||
[CmdletBinding()]
|
||||
param(
|
||||
[Parameter(Mandatory)] [string] $OldSetup,
|
||||
[Parameter(Mandatory)] [string] $NewDir,
|
||||
[string] $OutDir = (Join-Path $PSScriptRoot '..' 'artifacts' 'upgrade-test' 'runs'),
|
||||
[int] $TimeoutMinutes = 15
|
||||
)
|
||||
|
||||
$ErrorActionPreference = 'Stop'
|
||||
|
||||
$sandboxExe = Join-Path $env:WINDIR 'System32\WindowsSandbox.exe'
|
||||
if (-not (Test-Path -LiteralPath $sandboxExe)) {
|
||||
throw 'Windows Sandbox is not installed: enable the optional feature Containers-DisposableClientVM.'
|
||||
}
|
||||
$sandboxProcesses = 'WindowsSandboxRemoteSession', 'WindowsSandboxClient'
|
||||
if (Get-Process $sandboxProcesses -ErrorAction SilentlyContinue) {
|
||||
throw 'Windows Sandbox is already running; only one instance can run at a time.'
|
||||
}
|
||||
|
||||
$oldSetupPath = (Resolve-Path -LiteralPath $OldSetup).Path
|
||||
$newDirPath = (Resolve-Path -LiteralPath $NewDir).Path
|
||||
$package = Get-ChildItem -LiteralPath $newDirPath -Filter 'AutoClick-*-full.nupkg' | Select-Object -First 1
|
||||
$newSetup = Join-Path $newDirPath 'AutoClick-win-Setup.exe'
|
||||
if (-not $package -or -not (Test-Path -LiteralPath $newSetup)) {
|
||||
throw "$newDirPath must contain AutoClick-X.Y.Z-full.nupkg and AutoClick-win-Setup.exe."
|
||||
}
|
||||
$version = $package.Name -replace '^AutoClick-(.+)-full\.nupkg$', '$1'
|
||||
$expectedFileVersion = ($version -split '-')[0] + '.0'
|
||||
|
||||
# Everything the sandbox sees lives in one run folder, mapped to C:\test.
|
||||
$fixtures = Join-Path $PSScriptRoot '..' 'tests' 'Fixtures' 'v1'
|
||||
$work = Join-Path ([IO.Path]::GetFullPath($OutDir)) (Get-Date -Format 'yyyyMMdd-HHmmss')
|
||||
foreach ($dir in 'old', 'new', 'fixtures\profiles', 'results') {
|
||||
New-Item -ItemType Directory -Force (Join-Path $work $dir) | Out-Null
|
||||
}
|
||||
Copy-Item -LiteralPath $oldSetupPath (Join-Path $work 'old')
|
||||
Copy-Item -LiteralPath $package.FullName, $newSetup (Join-Path $work 'new')
|
||||
Copy-Item (Join-Path $fixtures 'settings.json') (Join-Path $work 'fixtures')
|
||||
Copy-Item (Join-Path $fixtures 'profiles\*.json') (Join-Path $work 'fixtures\profiles')
|
||||
Copy-Item (Join-Path $PSScriptRoot 'upgrade-test\run-upgrade-test.ps1') $work
|
||||
|
||||
$wsb = Join-Path $work 'upgrade-test.wsb'
|
||||
@"
|
||||
<Configuration>
|
||||
<VGpu>Disable</VGpu>
|
||||
<Networking>Disable</Networking>
|
||||
<ClipboardRedirection>Disable</ClipboardRedirection>
|
||||
<PrinterRedirection>Disable</PrinterRedirection>
|
||||
<MappedFolders>
|
||||
<MappedFolder>
|
||||
<HostFolder>$work</HostFolder>
|
||||
<SandboxFolder>C:\test</SandboxFolder>
|
||||
<ReadOnly>false</ReadOnly>
|
||||
</MappedFolder>
|
||||
</MappedFolders>
|
||||
<LogonCommand>
|
||||
<Command>powershell.exe -NoProfile -ExecutionPolicy Bypass -File C:\test\run-upgrade-test.ps1</Command>
|
||||
</LogonCommand>
|
||||
</Configuration>
|
||||
"@ | Set-Content -LiteralPath $wsb -Encoding utf8
|
||||
|
||||
Write-Host "Windows Sandbox: $(Split-Path $oldSetupPath -Leaf) (old) -> $version, run folder $work"
|
||||
Start-Process -FilePath $sandboxExe -ArgumentList "`"$wsb`""
|
||||
|
||||
$resultFile = Join-Path $work 'results\result.json'
|
||||
$deadline = (Get-Date).AddMinutes($TimeoutMinutes)
|
||||
while (-not (Test-Path -LiteralPath $resultFile) -and (Get-Date) -lt $deadline) { Start-Sleep -Seconds 5 }
|
||||
if (-not (Test-Path -LiteralPath $resultFile)) {
|
||||
throw "No result after $TimeoutMinutes minutes; see $work\results\transcript.txt."
|
||||
}
|
||||
# The sandbox shuts itself down after writing the result.
|
||||
$closeBy = (Get-Date).AddMinutes(2)
|
||||
while ((Get-Process $sandboxProcesses -ErrorAction SilentlyContinue) -and (Get-Date) -lt $closeBy) { Start-Sleep -Seconds 3 }
|
||||
|
||||
$r = Get-Content -LiteralPath $resultFile -Raw | ConvertFrom-Json
|
||||
$v1 = Get-Content -LiteralPath (Join-Path $fixtures 'settings.json') -Raw | ConvertFrom-Json
|
||||
$warnings = @($r.firstRunWarnings | Where-Object { $_ })
|
||||
$checks = [ordered]@{
|
||||
'Old release installs' = $r.oldSetupExit -eq 0 -and [bool]$r.oldVersion
|
||||
"Installed Update.exe applies $version" = $r.applyExit -eq 0 -and $r.newVersion -eq $expectedFileVersion
|
||||
'New version starts and migrates the 1.x settings' = $r.firstRunAlive -and $r.settingsV2Exists
|
||||
'Hotkeys and language carried over' = $r.migratedHotkeys -eq "$($v1.hotkeys.pauseResume) / $($v1.hotkeys.stopAll) / $($v1.hotkeys.startAll)" -and $r.migratedLanguage -eq $v1.language
|
||||
'Upgraded install keeps administrator mode' = $r.migratedAlwaysRunAsAdmin -eq $true -and $r.migratedShowAdminNotice -eq $true
|
||||
'1.x data untouched and backed up' = $r.v1DataUntouched -and $r.v1BackupExists
|
||||
'No warning or error in the first-run log' = $warnings.Count -eq 0
|
||||
'Smoke test' = $r.smokeExit -eq 0
|
||||
'Uninstall' = $r.uninstallExit -eq 0
|
||||
'Fresh install starts' = $r.newSetupExit -eq 0 -and $r.freshInstallVersion -eq $expectedFileVersion -and $r.freshFirstRunAlive
|
||||
'Fresh install does not use administrator mode' = $r.freshAlwaysRunAsAdmin -eq $false
|
||||
}
|
||||
|
||||
$failed = 0
|
||||
foreach ($check in $checks.GetEnumerator()) {
|
||||
$ok = [bool]$check.Value
|
||||
if (-not $ok) { $failed++ }
|
||||
Write-Host ("{0} {1}" -f ($ok ? 'PASS' : 'FAIL'), $check.Key)
|
||||
}
|
||||
$warnings | ForEach-Object { Write-Host " log: $_" }
|
||||
Write-Host "Details: $resultFile"
|
||||
if ($failed) {
|
||||
Write-Host "$failed of $($checks.Count) checks failed." -ForegroundColor Red
|
||||
exit 1
|
||||
}
|
||||
Write-Host "All $($checks.Count) checks passed."
|
||||
@@ -0,0 +1,91 @@
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Checks the licenses of everything AutoClick ships and writes THIRD-PARTY-NOTICES.txt.
|
||||
.DESCRIPTION
|
||||
Runs nuget-license on the UI project's package closure (what the installer contains) with
|
||||
the policy in eng/licenses:
|
||||
allowed-licenses.json SPDX ids compatible with GPL-3.0 (also used by dependency review)
|
||||
url-mappings.json license URLs of packages without an SPDX expression
|
||||
overrides.json packages that publish no license metadata at all
|
||||
Fails when a package has a license outside the allow list or none at all. The notices file
|
||||
lists every package with its license and copyright, followed by the full license texts
|
||||
(eng/licenses/texts/<SPDX id>.txt).
|
||||
#>
|
||||
[CmdletBinding()]
|
||||
param(
|
||||
[Parameter(Mandatory)] [string] $OutFile,
|
||||
[string] $Project = 'src/AutoClick.UI/AutoClick.UI.csproj'
|
||||
)
|
||||
|
||||
$ErrorActionPreference = 'Stop'
|
||||
$root = Split-Path -Parent $PSScriptRoot
|
||||
$policy = Join-Path $PSScriptRoot 'licenses'
|
||||
$report = Join-Path ([IO.Path]::GetTempPath()) "autoclick-licenses-$PID.json"
|
||||
|
||||
dotnet nuget-license --input (Join-Path $root $Project) --include-transitive `
|
||||
--allowed-license-types (Join-Path $policy 'allowed-licenses.json') `
|
||||
--licenseurl-to-license-mappings (Join-Path $policy 'url-mappings.json') `
|
||||
--override-package-information (Join-Path $policy 'overrides.json') `
|
||||
--output JsonPretty --file-output $report
|
||||
$exitCode = $LASTEXITCODE
|
||||
if (-not (Test-Path -LiteralPath $report)) {
|
||||
throw "nuget-license failed (exit code $exitCode) without writing a report."
|
||||
}
|
||||
|
||||
$packages = @(Get-Content -LiteralPath $report -Raw | ConvertFrom-Json | Sort-Object PackageId)
|
||||
Remove-Item -LiteralPath $report
|
||||
|
||||
$violations = @($packages | Where-Object { $_.ValidationErrors })
|
||||
if ($violations.Count -gt 0 -or $exitCode -ne 0) {
|
||||
foreach ($package in $violations) {
|
||||
$errors = ($package.ValidationErrors | ForEach-Object { $_.Error }) -join '; '
|
||||
Write-Host "::error title=License policy::$($package.PackageId) $($package.PackageVersion): $errors (license: $($package.License); url: $($package.LicenseUrl))"
|
||||
}
|
||||
throw "$($violations.Count) package(s) violate the license policy (eng/licenses). Add a mapping or override only after checking the actual license."
|
||||
}
|
||||
|
||||
$lines = [Collections.Generic.List[string]]::new()
|
||||
$lines.Add('AutoClick - third-party notices')
|
||||
$lines.Add('===============================')
|
||||
$lines.Add('')
|
||||
$lines.Add('AutoClick is free software under the GNU General Public License v3.0 (see LICENSE.txt).')
|
||||
$lines.Add('It includes the components listed below, each under its own license.')
|
||||
$lines.Add('')
|
||||
$lines.Add('.NET and Windows Desktop runtime (self-contained in this package)')
|
||||
$lines.Add(' License: MIT')
|
||||
$lines.Add(' https://github.com/dotnet/runtime/blob/main/LICENSE.TXT')
|
||||
$lines.Add(' Notices: https://github.com/dotnet/runtime/blob/main/THIRD-PARTY-NOTICES.TXT')
|
||||
$lines.Add(' https://github.com/dotnet/wpf/blob/main/THIRD-PARTY-NOTICES.txt')
|
||||
$lines.Add('')
|
||||
$lines.Add('Packages')
|
||||
$lines.Add('--------')
|
||||
foreach ($package in $packages) {
|
||||
$lines.Add('')
|
||||
$lines.Add("$($package.PackageId) $($package.PackageVersion)")
|
||||
$lines.Add(" License: $($package.License)")
|
||||
if ($package.Copyright) { $lines.Add(" Copyright: $($package.Copyright)") }
|
||||
if ($package.Authors) { $lines.Add(" Authors: $($package.Authors -join ', ')") }
|
||||
if ($package.PackageProjectUrl) { $lines.Add(" Project: $($package.PackageProjectUrl)") }
|
||||
}
|
||||
|
||||
$licenses = $packages | ForEach-Object { $_.License } | Sort-Object -Unique
|
||||
$licenses = @('MIT') + @($licenses | Where-Object { $_ -ne 'MIT' })
|
||||
$lines.Add('')
|
||||
$lines.Add('License texts')
|
||||
$lines.Add('-------------')
|
||||
foreach ($license in $licenses) {
|
||||
$text = Join-Path $policy "texts/$license.txt"
|
||||
if (-not (Test-Path -LiteralPath $text)) {
|
||||
throw "No license text for '$license': add eng/licenses/texts/$license.txt (from https://github.com/spdx/license-list-data/tree/main/text)."
|
||||
}
|
||||
|
||||
$lines.Add('')
|
||||
$lines.Add("=== $license ===")
|
||||
$lines.Add('')
|
||||
foreach ($line in Get-Content -LiteralPath $text) { $lines.Add($line) }
|
||||
}
|
||||
|
||||
$directory = Split-Path -Parent ([IO.Path]::GetFullPath($OutFile))
|
||||
New-Item -ItemType Directory -Force -Path $directory | Out-Null
|
||||
[IO.File]::WriteAllText([IO.Path]::GetFullPath($OutFile), ($lines -join "`r`n") + "`r`n", [Text.UTF8Encoding]::new($false))
|
||||
Write-Host "Wrote $OutFile ($($packages.Count) packages, licenses: $($licenses -join ', '))."
|
||||
@@ -0,0 +1,35 @@
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Fails when line coverage of an assembly drops below its minimum.
|
||||
.DESCRIPTION
|
||||
Reads the merged Cobertura report written by ReportGenerator. The UI and Win32 layers are
|
||||
covered by the smoke test and the Win32 tests rather than by a percentage gate.
|
||||
#>
|
||||
[CmdletBinding()]
|
||||
param(
|
||||
[Parameter(Mandatory)] [string] $Cobertura,
|
||||
[hashtable] $Minimum = @{ 'AutoClick.Core' = 90; 'AutoClick.Services' = 70 }
|
||||
)
|
||||
|
||||
$ErrorActionPreference = 'Stop'
|
||||
[xml] $report = Get-Content -LiteralPath $Cobertura -Raw
|
||||
$failed = $false
|
||||
foreach ($assembly in $Minimum.Keys | Sort-Object) {
|
||||
$package = $report.coverage.packages.package | Where-Object { $_.name -eq $assembly }
|
||||
if (-not $package) {
|
||||
Write-Host "::error title=Coverage::$assembly is missing from the coverage report."
|
||||
$failed = $true
|
||||
continue
|
||||
}
|
||||
|
||||
$percent = [math]::Round([double]::Parse($package.'line-rate', [Globalization.CultureInfo]::InvariantCulture) * 100, 1)
|
||||
if ($percent -lt $Minimum[$assembly]) {
|
||||
Write-Host "::error title=Coverage::$assembly line coverage is $percent% (minimum $($Minimum[$assembly])%)."
|
||||
$failed = $true
|
||||
}
|
||||
else {
|
||||
Write-Host "$assembly line coverage: $percent% (minimum $($Minimum[$assembly])%)"
|
||||
}
|
||||
}
|
||||
|
||||
if ($failed) { throw 'Line coverage is below the minimum.' }
|
||||
@@ -0,0 +1,55 @@
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Dead-code gate over a ReSharper InspectCode SARIF report.
|
||||
.DESCRIPTION
|
||||
Fails on unused code (locals, parameters, private and public members, types), unused
|
||||
using directives and XAML bindings whose property does not exist. Everything else in the
|
||||
report (style suggestions, "can be private", naming) is summarized but does not fail the
|
||||
build. A deliberate exception is marked in code with "// ReSharper disable once <rule>".
|
||||
#>
|
||||
[CmdletBinding()]
|
||||
param(
|
||||
[Parameter(Mandatory)] [string] $Sarif
|
||||
)
|
||||
|
||||
$ErrorActionPreference = 'Stop'
|
||||
|
||||
$blocking = @(
|
||||
'\.Local$'
|
||||
'^UnusedType\.'
|
||||
'^UnusedMember\.'
|
||||
'^UnusedVariable'
|
||||
'^UnusedParameter'
|
||||
'^NotAccessedVariable'
|
||||
'^RedundantUsingDirective'
|
||||
'^Xaml\.BindingWithContextNotResolved$'
|
||||
'^Xaml\.PossibleNullReferenceException$'
|
||||
)
|
||||
|
||||
$report = Get-Content -LiteralPath $Sarif -Raw | ConvertFrom-Json
|
||||
$results = @($report.runs | ForEach-Object { $_.results } | Where-Object { $_ })
|
||||
|
||||
$failures = @($results | Where-Object { $rule = $_.ruleId; $blocking | Where-Object { $rule -match $_ } })
|
||||
foreach ($result in $failures) {
|
||||
$location = $result.locations[0].physicalLocation
|
||||
$file = $location.artifactLocation.uri
|
||||
$line = $location.region.startLine
|
||||
Write-Host "::error file=$file,line=$line,title=$($result.ruleId)::$($result.message.text)"
|
||||
}
|
||||
|
||||
$summary = [Text.StringBuilder]::new()
|
||||
[void]$summary.AppendLine('### InspectCode')
|
||||
[void]$summary.AppendLine("$($results.Count) finding(s), $($failures.Count) blocking.")
|
||||
[void]$summary.AppendLine()
|
||||
[void]$summary.AppendLine('| Rule | Count | Blocking |')
|
||||
[void]$summary.AppendLine('|---|---:|---|')
|
||||
foreach ($group in $results | Group-Object ruleId | Sort-Object Count -Descending) {
|
||||
$isBlocking = [bool]($blocking | Where-Object { $group.Name -match $_ })
|
||||
[void]$summary.AppendLine("| $($group.Name) | $($group.Count) | $(if ($isBlocking) { 'yes' } else { '' }) |")
|
||||
}
|
||||
if ($env:GITHUB_STEP_SUMMARY) { Add-Content -LiteralPath $env:GITHUB_STEP_SUMMARY -Value $summary.ToString() }
|
||||
Write-Host $summary.ToString()
|
||||
|
||||
if ($failures.Count -gt 0) {
|
||||
throw "$($failures.Count) unused-code finding(s). Remove the code, or mark a deliberate exception with '// ReSharper disable once <rule>'."
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Fails when any direct or transitive NuGet package has a known vulnerability.
|
||||
.DESCRIPTION
|
||||
`dotnet package list --vulnerable` always exits 0, so its JSON report is parsed instead.
|
||||
A vulnerability can be accepted on purpose with <NuGetAuditSuppress Include="advisory URL" />
|
||||
in Directory.Build.props (the same item NuGet's restore-time audit honors). Results go to the
|
||||
GitHub job summary when running in Actions.
|
||||
#>
|
||||
[CmdletBinding()]
|
||||
param(
|
||||
[string] $Solution = 'AutoClick.slnx'
|
||||
)
|
||||
|
||||
$ErrorActionPreference = 'Stop'
|
||||
$root = Split-Path -Parent $PSScriptRoot
|
||||
Push-Location $root
|
||||
try {
|
||||
$json = dotnet package list --project $Solution --vulnerable --include-transitive --format json
|
||||
if ($LASTEXITCODE -ne 0) { throw "dotnet package list failed (exit code $LASTEXITCODE). Run dotnet restore first." }
|
||||
$report = ($json | Out-String) | ConvertFrom-Json
|
||||
|
||||
$suppressed = @()
|
||||
$items = dotnet msbuild src/AutoClick.UI/AutoClick.UI.csproj -getItem:NuGetAuditSuppress | Out-String
|
||||
if ($LASTEXITCODE -eq 0 -and $items.Trim()) {
|
||||
$suppressed = @((ConvertFrom-Json $items).Items.NuGetAuditSuppress | ForEach-Object { $_.Identity })
|
||||
}
|
||||
|
||||
$problems = @($report.problems) + @($report.projects | ForEach-Object { $_.problems }) | Where-Object { $_ }
|
||||
$findings = foreach ($project in $report.projects) {
|
||||
foreach ($framework in $project.frameworks) {
|
||||
foreach ($package in @($framework.topLevelPackages) + @($framework.transitivePackages) | Where-Object { $_ }) {
|
||||
foreach ($vulnerability in $package.vulnerabilities) {
|
||||
[pscustomobject]@{
|
||||
Project = Split-Path -Leaf $project.path
|
||||
Package = $package.id
|
||||
Version = $package.resolvedVersion
|
||||
Severity = $vulnerability.severity
|
||||
Advisory = $vulnerability.advisoryurl
|
||||
Suppressed = $suppressed -contains $vulnerability.advisoryurl
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$findings = @($findings)
|
||||
$blocking = @($findings | Where-Object { -not $_.Suppressed })
|
||||
|
||||
$summary = [Text.StringBuilder]::new()
|
||||
[void]$summary.AppendLine('### NuGet vulnerability audit')
|
||||
if ($findings.Count -eq 0) {
|
||||
[void]$summary.AppendLine('No known vulnerabilities in direct or transitive packages.')
|
||||
}
|
||||
else {
|
||||
[void]$summary.AppendLine('| Package | Version | Severity | Advisory | Project | Accepted |')
|
||||
[void]$summary.AppendLine('|---|---|---|---|---|---|')
|
||||
foreach ($f in $findings | Sort-Object Package, Advisory -Unique) {
|
||||
[void]$summary.AppendLine("| $($f.Package) | $($f.Version) | $($f.Severity) | $($f.Advisory) | $($f.Project) | $($f.Suppressed) |")
|
||||
}
|
||||
}
|
||||
if ($env:GITHUB_STEP_SUMMARY) { Add-Content -LiteralPath $env:GITHUB_STEP_SUMMARY -Value $summary.ToString() }
|
||||
Write-Host $summary.ToString()
|
||||
|
||||
if ($problems.Count -gt 0) {
|
||||
$problems | ForEach-Object { Write-Host "::error title=Vulnerability audit::$($_.text ?? $_)" }
|
||||
throw 'The vulnerability data could not be read; the audit is incomplete.'
|
||||
}
|
||||
|
||||
foreach ($f in $blocking) {
|
||||
Write-Host "::error title=Vulnerable package::$($f.Package) $($f.Version) ($($f.Severity)): $($f.Advisory)"
|
||||
}
|
||||
if ($blocking.Count -gt 0) {
|
||||
throw "$($blocking.Count) vulnerable package reference(s). Update them, or accept one deliberately with NuGetAuditSuppress."
|
||||
}
|
||||
}
|
||||
finally {
|
||||
Pop-Location
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
[
|
||||
"MIT",
|
||||
"Apache-2.0",
|
||||
"BSD-2-Clause",
|
||||
"BSD-3-Clause",
|
||||
"ISC",
|
||||
"Zlib",
|
||||
"BSL-1.0",
|
||||
"MPL-2.0",
|
||||
"LGPL-2.1-only",
|
||||
"LGPL-2.1-or-later",
|
||||
"LGPL-3.0-only",
|
||||
"LGPL-3.0-or-later",
|
||||
"Unlicense",
|
||||
"0BSD",
|
||||
"CC0-1.0"
|
||||
]
|
||||
@@ -0,0 +1,74 @@
|
||||
[
|
||||
{
|
||||
"Id": "OpenTK.Compute",
|
||||
"Version": "4.3.0",
|
||||
"License": "MIT",
|
||||
"LicenseUrl": "https://github.com/opentk/opentk/blob/master/LICENSE.md",
|
||||
"Authors": "Team OpenTK",
|
||||
"Copyright": "Copyright (c) 2006-2020 Stefanos Apostolopoulos for the Open Toolkit project"
|
||||
},
|
||||
{
|
||||
"Id": "OpenTK.Core",
|
||||
"Version": "4.3.0",
|
||||
"License": "MIT",
|
||||
"LicenseUrl": "https://github.com/opentk/opentk/blob/master/LICENSE.md",
|
||||
"Authors": "Team OpenTK",
|
||||
"Copyright": "Copyright (c) 2006-2020 Stefanos Apostolopoulos for the Open Toolkit project"
|
||||
},
|
||||
{
|
||||
"Id": "OpenTK.Graphics",
|
||||
"Version": "4.3.0",
|
||||
"License": "MIT",
|
||||
"LicenseUrl": "https://github.com/opentk/opentk/blob/master/LICENSE.md",
|
||||
"Authors": "Team OpenTK",
|
||||
"Copyright": "Copyright (c) 2006-2020 Stefanos Apostolopoulos for the Open Toolkit project"
|
||||
},
|
||||
{
|
||||
"Id": "OpenTK.Input",
|
||||
"Version": "4.3.0",
|
||||
"License": "MIT",
|
||||
"LicenseUrl": "https://github.com/opentk/opentk/blob/master/LICENSE.md",
|
||||
"Authors": "Team OpenTK",
|
||||
"Copyright": "Copyright (c) 2006-2020 Stefanos Apostolopoulos for the Open Toolkit project"
|
||||
},
|
||||
{
|
||||
"Id": "OpenTK.Mathematics",
|
||||
"Version": "4.3.0",
|
||||
"License": "MIT",
|
||||
"LicenseUrl": "https://github.com/opentk/opentk/blob/master/LICENSE.md",
|
||||
"Authors": "Team OpenTK",
|
||||
"Copyright": "Copyright (c) 2006-2020 Stefanos Apostolopoulos for the Open Toolkit project"
|
||||
},
|
||||
{
|
||||
"Id": "OpenTK.OpenAL",
|
||||
"Version": "4.3.0",
|
||||
"License": "MIT",
|
||||
"LicenseUrl": "https://github.com/opentk/opentk/blob/master/LICENSE.md",
|
||||
"Authors": "Team OpenTK",
|
||||
"Copyright": "Copyright (c) 2006-2020 Stefanos Apostolopoulos for the Open Toolkit project"
|
||||
},
|
||||
{
|
||||
"Id": "OpenTK.Windowing.Common",
|
||||
"Version": "4.3.0",
|
||||
"License": "MIT",
|
||||
"LicenseUrl": "https://github.com/opentk/opentk/blob/master/LICENSE.md",
|
||||
"Authors": "Team OpenTK",
|
||||
"Copyright": "Copyright (c) 2006-2020 Stefanos Apostolopoulos for the Open Toolkit project"
|
||||
},
|
||||
{
|
||||
"Id": "OpenTK.Windowing.Desktop",
|
||||
"Version": "4.3.0",
|
||||
"License": "MIT",
|
||||
"LicenseUrl": "https://github.com/opentk/opentk/blob/master/LICENSE.md",
|
||||
"Authors": "Team OpenTK",
|
||||
"Copyright": "Copyright (c) 2006-2020 Stefanos Apostolopoulos for the Open Toolkit project"
|
||||
},
|
||||
{
|
||||
"Id": "OpenTK.Windowing.GraphicsLibraryFramework",
|
||||
"Version": "4.3.0",
|
||||
"License": "MIT",
|
||||
"LicenseUrl": "https://github.com/opentk/opentk/blob/master/LICENSE.md",
|
||||
"Authors": "Team OpenTK",
|
||||
"Copyright": "Copyright (c) 2006-2020 Stefanos Apostolopoulos for the Open Toolkit project"
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,73 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
@@ -0,0 +1,18 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) <year> <copyright holders>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
|
||||
associated documentation files (the "Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the
|
||||
following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial
|
||||
portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
|
||||
LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO
|
||||
EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
||||
USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
@@ -0,0 +1,11 @@
|
||||
zlib License
|
||||
|
||||
This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
|
||||
|
||||
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
|
||||
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"https://github.com/varon/GLWpfControl/blob/master/LICENSE.md": "MIT"
|
||||
}
|
||||
@@ -0,0 +1,113 @@
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Runs inside Windows Sandbox (Windows PowerShell 5.1); started by eng/Invoke-UpgradeTest.ps1.
|
||||
.DESCRIPTION
|
||||
Installs the old release with its Setup.exe, adds 1.x user data, applies the new full package
|
||||
with the installed Update.exe (the path the in-app updater takes), starts the new version once
|
||||
to migrate the data, runs its smoke test, uninstalls, then installs the new Setup.exe and starts
|
||||
it once on the clean profile. Writes C:\test\results\result.json and shuts the sandbox down.
|
||||
Inputs: C:\test\old\*Setup.exe, C:\test\new\*-full.nupkg + *Setup.exe, C:\test\fixtures.
|
||||
#>
|
||||
$ErrorActionPreference = 'Continue'
|
||||
$root = 'C:\test'
|
||||
$out = Join-Path $root 'results'
|
||||
New-Item -ItemType Directory -Force $out | Out-Null
|
||||
Start-Transcript -Path (Join-Path $out 'transcript.txt') | Out-Null
|
||||
|
||||
$result = [ordered]@{ started = (Get-Date).ToString('o') }
|
||||
$principal = New-Object Security.Principal.WindowsPrincipal([Security.Principal.WindowsIdentity]::GetCurrent())
|
||||
$result.elevated = $principal.IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)
|
||||
$app = Join-Path $env:LOCALAPPDATA 'AutoClick'
|
||||
|
||||
function Wait-Proc($p, $seconds) {
|
||||
if ($p.WaitForExit($seconds * 1000)) { return $p.ExitCode }
|
||||
try { $p.Kill() } catch {}
|
||||
return 'timeout'
|
||||
}
|
||||
function Stop-App { Get-Process AutoClick.UI -ErrorAction SilentlyContinue | Stop-Process -Force -ErrorAction SilentlyContinue }
|
||||
function Get-V1Hashes {
|
||||
$files = @(Get-ChildItem (Join-Path $app 'settings.json'), (Join-Path $app 'profiles\*.json') -ErrorAction SilentlyContinue)
|
||||
($files | Sort-Object FullName | ForEach-Object { "$($_.Name)=$((Get-FileHash $_.FullName).Hash)" }) -join ';'
|
||||
}
|
||||
# Callers wrap the result in @(): a function returning an empty array returns $null.
|
||||
function Get-LogLines($pattern) {
|
||||
Get-Content (Join-Path $app 'logs\*.log') -ErrorAction SilentlyContinue | Where-Object { $_ -match $pattern } | ForEach-Object { [string]$_ }
|
||||
}
|
||||
|
||||
# 1. Install the old release.
|
||||
$old = Get-ChildItem (Join-Path $root 'old') -Filter '*Setup.exe' | Select-Object -First 1
|
||||
$p = Start-Process $old.FullName -ArgumentList '--silent', '--log', (Join-Path $out 'setup-old.log') -PassThru
|
||||
$result.oldSetupExit = Wait-Proc $p 300
|
||||
Start-Sleep -Seconds 8
|
||||
Stop-App
|
||||
$result.oldVersion = (Get-Item (Join-Path $app 'current\AutoClick.UI.exe') -ErrorAction SilentlyContinue).VersionInfo.FileVersion
|
||||
|
||||
# 2. Add 1.x user data (what an existing user has on disk).
|
||||
Copy-Item (Join-Path $root 'fixtures\*') $app -Recurse -Force
|
||||
$result.v1DataBefore = Get-V1Hashes
|
||||
|
||||
# 3. Apply the new full package with the installed (old) Update.exe.
|
||||
$pkgDir = Join-Path $app 'packages'
|
||||
New-Item -ItemType Directory -Force $pkgDir | Out-Null
|
||||
$newPkg = Get-ChildItem (Join-Path $root 'new') -Filter '*-full.nupkg' | Select-Object -First 1
|
||||
Copy-Item $newPkg.FullName $pkgDir -Force
|
||||
$pkgPath = Join-Path $pkgDir $newPkg.Name
|
||||
$p = Start-Process (Join-Path $app 'Update.exe') -ArgumentList 'apply', '--norestart', '--silent', '--package', $pkgPath, '--log', (Join-Path $out 'update-apply.log') -PassThru
|
||||
$result.applyExit = Wait-Proc $p 600
|
||||
Start-Sleep -Seconds 5
|
||||
Stop-App
|
||||
$result.newVersion = (Get-Item (Join-Path $app 'current\AutoClick.UI.exe') -ErrorAction SilentlyContinue).VersionInfo.FileVersion
|
||||
|
||||
# 4. First start of the new version: migrates the 1.x data. The logon script runs elevated, so the
|
||||
# "keep running as administrator" setting of an upgraded install does not relaunch.
|
||||
$p = Start-Process (Join-Path $app 'current\AutoClick.UI.exe') -PassThru
|
||||
Start-Sleep -Seconds 15
|
||||
$result.firstRunAlive = -not $p.HasExited
|
||||
Stop-App
|
||||
Start-Sleep -Seconds 2
|
||||
$v2 = Join-Path $app 'settings.v2.json'
|
||||
$result.settingsV2Exists = Test-Path $v2
|
||||
if ($result.settingsV2Exists) {
|
||||
$s = Get-Content $v2 -Raw | ConvertFrom-Json
|
||||
$result.migratedHotkeys = "$($s.hotkeys.pauseResume) / $($s.hotkeys.stopAll) / $($s.hotkeys.startAll)"
|
||||
$result.migratedLanguage = $s.language
|
||||
$result.migratedAlwaysRunAsAdmin = $s.alwaysRunAsAdmin
|
||||
$result.migratedShowAdminNotice = $s.showAdminModeNotice
|
||||
}
|
||||
$result.v1BackupExists = Test-Path (Join-Path $app 'backup\settings.v1.json')
|
||||
$result.v1DataAfter = Get-V1Hashes
|
||||
$result.v1DataUntouched = ($result.v1DataBefore -eq $result.v1DataAfter) -and ($result.v1DataBefore -ne '')
|
||||
Copy-Item (Join-Path $app 'logs\*.log') $out -ErrorAction SilentlyContinue
|
||||
$result.firstRunWarnings = @(Get-LogLines '\[(WRN|ERR|FTL)\]')
|
||||
|
||||
# 5. Smoke test of the updated app (uses its own temporary data folder).
|
||||
$p = Start-Process (Join-Path $app 'current\AutoClick.UI.exe') -ArgumentList '--smoke-test' -PassThru
|
||||
$result.smokeExit = Wait-Proc $p 180
|
||||
|
||||
# 6. Uninstall: removes the install root, which is also the data folder.
|
||||
$p = Start-Process (Join-Path $app 'Update.exe') -ArgumentList 'uninstall', '--silent', '--log', (Join-Path $out 'uninstall.log') -PassThru
|
||||
$result.uninstallExit = Wait-Proc $p 300
|
||||
Start-Sleep -Seconds 5
|
||||
$result.afterUninstallFiles = @(Get-ChildItem $app -Recurse -Force -ErrorAction SilentlyContinue | ForEach-Object { $_.FullName.Substring($app.Length + 1) })
|
||||
|
||||
# 7. Fresh install of the new Setup.exe. A silent setup does not start the app, so start it once
|
||||
# like a new user would: it must not turn on administrator mode.
|
||||
$new = Get-ChildItem (Join-Path $root 'new') -Filter '*Setup.exe' | Select-Object -First 1
|
||||
$p = Start-Process $new.FullName -ArgumentList '--silent', '--log', (Join-Path $out 'setup-new.log') -PassThru
|
||||
$result.newSetupExit = Wait-Proc $p 300
|
||||
Start-Sleep -Seconds 5
|
||||
Stop-App
|
||||
$result.freshInstallVersion = (Get-Item (Join-Path $app 'current\AutoClick.UI.exe') -ErrorAction SilentlyContinue).VersionInfo.FileVersion
|
||||
$p = Start-Process (Join-Path $app 'current\AutoClick.UI.exe') -PassThru
|
||||
Start-Sleep -Seconds 12
|
||||
$result.freshFirstRunAlive = -not $p.HasExited
|
||||
Stop-App
|
||||
Start-Sleep -Seconds 2
|
||||
$fresh = Get-Content (Join-Path $app 'settings.v2.json') -Raw -ErrorAction SilentlyContinue | ConvertFrom-Json
|
||||
$result.freshAlwaysRunAsAdmin = $fresh.alwaysRunAsAdmin
|
||||
$result.freshStartupLines = @(Get-LogLines 'ready \(settings')
|
||||
|
||||
$result.finished = (Get-Date).ToString('o')
|
||||
$result | ConvertTo-Json -Depth 4 | Set-Content -Path (Join-Path $out 'result.json') -Encoding UTF8
|
||||
Stop-Transcript | Out-Null
|
||||
shutdown.exe /s /t 5
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"sdk": {
|
||||
"version": "10.0.403",
|
||||
"rollForward": "latestFeature"
|
||||
},
|
||||
"test": {
|
||||
"runner": "Microsoft.Testing.Platform"
|
||||
}
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
# Link checker settings (https://lychee.cli.rs). Used by .github/workflows/docs.yml.
|
||||
max_retries = 3
|
||||
retry_wait_time = 5
|
||||
timeout = 20
|
||||
accept = ["200..=299", "429"]
|
||||
exclude_path = ["CHANGELOG.md", ".claude", "artifacts"]
|
||||
exclude = [
|
||||
# Sites that block automated requests.
|
||||
"^https://(www\\.)?x\\.com/",
|
||||
"^https://discord\\.gg/",
|
||||
"^https://(www\\.)?patreon\\.com/",
|
||||
"^https://ko-fi\\.com/",
|
||||
"^https://steamcommunity\\.com/",
|
||||
"^https://(www\\.)?youtube\\.com/",
|
||||
"^mailto:",
|
||||
# Version comparison and tag links exist only once the release is published.
|
||||
"^https://github\\.com/poli0981/autoclick/(compare|releases/tag)/",
|
||||
]
|
||||
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<!-- Restore only from nuget.org, and map every package to it (package source mapping). -->
|
||||
<packageSources>
|
||||
<clear />
|
||||
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
|
||||
</packageSources>
|
||||
<packageSourceMapping>
|
||||
<packageSource key="nuget.org">
|
||||
<package pattern="*" />
|
||||
</packageSource>
|
||||
</packageSourceMapping>
|
||||
</configuration>
|
||||
@@ -0,0 +1,90 @@
|
||||
using AutoClick.Core.Models;
|
||||
|
||||
namespace AutoClick.Core.Abstractions;
|
||||
|
||||
/// <summary>Outcome of posting input to a window.</summary>
|
||||
public enum InputResult
|
||||
{
|
||||
Ok,
|
||||
|
||||
/// <summary>Blocked by User Interface Privilege Isolation: the target runs elevated.</summary>
|
||||
AccessDenied,
|
||||
|
||||
/// <summary>The window no longer exists.</summary>
|
||||
WindowGone,
|
||||
|
||||
/// <summary>The target's message queue is full (it is not processing messages).</summary>
|
||||
TargetNotResponding,
|
||||
|
||||
Failed,
|
||||
}
|
||||
|
||||
/// <summary>Sends mouse and keyboard input to a window without moving the real cursor.</summary>
|
||||
public interface IInputSender
|
||||
{
|
||||
/// <summary>Moves to and clicks the client point (x, y) of <paramref name="window"/>.</summary>
|
||||
ValueTask<InputResult> ClickAsync(nint window, int x, int y, ClickType type, CancellationToken cancellationToken);
|
||||
|
||||
ValueTask<InputResult> KeystrokeAsync(nint window, int virtualKey, CancellationToken cancellationToken);
|
||||
}
|
||||
|
||||
public enum WindowStatus
|
||||
{
|
||||
Alive,
|
||||
Minimized,
|
||||
|
||||
/// <summary>Closed, or the handle now belongs to another process.</summary>
|
||||
Gone,
|
||||
}
|
||||
|
||||
/// <summary>How a process's privileges compare to AutoClick's own.</summary>
|
||||
public enum ElevationState
|
||||
{
|
||||
Unknown,
|
||||
SameOrLower,
|
||||
|
||||
/// <summary>Higher integrity level: input from AutoClick will be blocked.</summary>
|
||||
Higher,
|
||||
}
|
||||
|
||||
/// <summary>A top-level window the user can pick as a click target.</summary>
|
||||
public sealed record WindowInfo(
|
||||
nint Handle,
|
||||
int ProcessId,
|
||||
string ProcessName,
|
||||
string Title,
|
||||
string ExecutablePath,
|
||||
ElevationState Elevation)
|
||||
{
|
||||
public override string ToString() => $"{ProcessName} - {Title}";
|
||||
}
|
||||
|
||||
public interface IWindowInspector
|
||||
{
|
||||
/// <summary>Visible, titled top-level windows of other processes, sorted by process name.</summary>
|
||||
IReadOnlyList<WindowInfo> GetCandidateWindows();
|
||||
|
||||
WindowStatus GetStatus(nint window, int processId);
|
||||
|
||||
/// <summary>Client area size in the window's own coordinate space (the space click points use).</summary>
|
||||
bool TryGetClientSize(nint window, out int width, out int height);
|
||||
}
|
||||
|
||||
/// <summary>A pixel read from a window; <see cref="IsValid"/> is false when it could not be read.</summary>
|
||||
public readonly record struct PixelSample(uint Color, bool IsValid)
|
||||
{
|
||||
public static PixelSample Invalid => new(ClickPoint.NoColor, false);
|
||||
}
|
||||
|
||||
public interface IPixelReader
|
||||
{
|
||||
/// <summary>Reads the pixel at client (x, y) of <paramref name="window"/>.</summary>
|
||||
PixelSample Read(nint window, int x, int y);
|
||||
}
|
||||
|
||||
public interface IElevationService
|
||||
{
|
||||
bool IsCurrentProcessElevated { get; }
|
||||
|
||||
ElevationState GetRelativeElevation(int processId);
|
||||
}
|
||||
@@ -1,25 +1,13 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<Product>AutoClick</Product>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<AssemblyTitle>AutoClick.Core</AssemblyTitle>
|
||||
<Description>Core models, enums, and interfaces for AutoClick.</Description>
|
||||
<Company>poli0981</Company>
|
||||
<Authors>poli0981</Authors>
|
||||
<Copyright>Copyright (c) 2026 poli0981. Licensed under GPL-3.0.</Copyright>
|
||||
<Version>1.3.1</Version>
|
||||
<AssemblyVersion>1.3.1.0</AssemblyVersion>
|
||||
<FileVersion>1.3.1.0</FileVersion>
|
||||
<Description>Core models, settings contracts, scheduling and hotkey parsing for AutoClick (no Windows dependencies).</Description>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="LiveChartsCore" Version="2.0.0" />
|
||||
<PackageReference Include="LiveChartsCore.SkiaSharpView" Version="2.0.0" />
|
||||
<PackageReference Include="LiveChartsCore.SkiaSharpView.WPF" Version="2.0.0" />
|
||||
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.28000.1721" />
|
||||
<InternalsVisibleTo Include="AutoClick.Core.Tests" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -0,0 +1,67 @@
|
||||
namespace AutoClick.Core.Dpi;
|
||||
|
||||
/// <summary>A point or size in whole pixels.</summary>
|
||||
public readonly record struct PixelPoint(int X, int Y);
|
||||
|
||||
public readonly record struct PixelRect(int Left, int Top, int Width, int Height)
|
||||
{
|
||||
public bool IsEmpty => Width <= 0 || Height <= 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Pure coordinate math used by the overlays. Click points are stored in the game window's
|
||||
/// own client coordinates (what PostMessage expects). For a DPI-unaware game on a scaled
|
||||
/// monitor those are "logical" pixels, while the overlay is positioned in physical pixels.
|
||||
/// </summary>
|
||||
public static class DpiMath
|
||||
{
|
||||
/// <summary>
|
||||
/// Scale between the game's own client coordinates and physical pixels, measured from the
|
||||
/// same client area seen in both coordinate spaces.
|
||||
/// </summary>
|
||||
public static (double X, double Y) ClientScale(int clientWidth, int clientHeight, PixelRect physicalClient)
|
||||
{
|
||||
if (clientWidth <= 0 || clientHeight <= 0 || physicalClient.IsEmpty)
|
||||
{
|
||||
return (1.0, 1.0);
|
||||
}
|
||||
|
||||
return ((double)physicalClient.Width / clientWidth, (double)physicalClient.Height / clientHeight);
|
||||
}
|
||||
|
||||
/// <summary>Offset (in physical pixels) of a game client point inside the client area.</summary>
|
||||
public static (double X, double Y) ToPhysicalOffset(int clientX, int clientY, (double X, double Y) scale) =>
|
||||
(clientX * scale.X, clientY * scale.Y);
|
||||
|
||||
/// <summary>Physical pixels to WPF device-independent pixels for a window at <paramref name="dpi"/>.</summary>
|
||||
public static double ToDips(double physical, double dpi) => dpi > 0 ? physical * 96.0 / dpi : physical;
|
||||
|
||||
/// <summary>Clamps a point to the client area [0, size - 1].</summary>
|
||||
public static PixelPoint ClampToClient(int x, int y, int clientWidth, int clientHeight) =>
|
||||
new(Math.Clamp(x, 0, Math.Max(0, clientWidth - 1)), Math.Clamp(y, 0, Math.Max(0, clientHeight - 1)));
|
||||
|
||||
public static bool IsInsideClient(int x, int y, int clientWidth, int clientHeight) =>
|
||||
x >= 0 && y >= 0 && x < clientWidth && y < clientHeight;
|
||||
|
||||
/// <summary>
|
||||
/// Where the coordinate picker's arrow keys move the pointer: <paramref name="dx"/>,
|
||||
/// <paramref name="dy"/> pixels from <paramref name="position"/>, kept inside
|
||||
/// <paramref name="area"/> (all in physical screen pixels). A position outside the area moves to
|
||||
/// its center first.
|
||||
/// </summary>
|
||||
public static PixelPoint MovePointer(PixelPoint position, PixelRect area, int dx, int dy)
|
||||
{
|
||||
if (area.IsEmpty)
|
||||
{
|
||||
return position;
|
||||
}
|
||||
|
||||
if (!IsInsideClient(position.X - area.Left, position.Y - area.Top, area.Width, area.Height))
|
||||
{
|
||||
return new PixelPoint(area.Left + (area.Width / 2), area.Top + (area.Height / 2));
|
||||
}
|
||||
|
||||
var moved = ClampToClient(position.X - area.Left + dx, position.Y - area.Top + dy, area.Width, area.Height);
|
||||
return new PixelPoint(area.Left + moved.X, area.Top + moved.Y);
|
||||
}
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
namespace AutoClick.Core.Enums;
|
||||
|
||||
public enum ClickMode
|
||||
{
|
||||
Random,
|
||||
Fixed
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
namespace AutoClick.Core.Enums;
|
||||
|
||||
public enum ClickType
|
||||
{
|
||||
LeftClick = 0,
|
||||
DoubleClick = 1,
|
||||
RightClick = 2,
|
||||
/// <summary>
|
||||
/// Send a virtual-key keystroke (WM_KEYDOWN/WM_KEYUP) to the window instead of a mouse click.
|
||||
/// X/Y are ignored; ClickPoint.VirtualKeyCode holds the VK_* code.
|
||||
/// </summary>
|
||||
Keystroke = 3
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
namespace AutoClick.Core.Enums;
|
||||
|
||||
public enum ColorMismatchBehavior
|
||||
{
|
||||
SkipPoint = 0,
|
||||
StopSession = 1,
|
||||
/// <summary>
|
||||
/// Block the click loop on this point, polling every 50ms until the pixel
|
||||
/// matches the reference color or ColorWaitTimeoutMs elapses (then skips).
|
||||
/// </summary>
|
||||
WaitUntilMatch = 2
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
namespace AutoClick.Core.Enums;
|
||||
|
||||
public enum ExitBehavior
|
||||
{
|
||||
MinimizeToTray = 0,
|
||||
StopAndExit = 1,
|
||||
ForceExit = 2
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
namespace AutoClick.Core.Enums;
|
||||
|
||||
public enum SessionState
|
||||
{
|
||||
Idle,
|
||||
Running,
|
||||
Paused,
|
||||
Stopped
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
namespace AutoClick.Core.Enums;
|
||||
|
||||
public enum SettingsMode
|
||||
{
|
||||
Global,
|
||||
Custom
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
namespace AutoClick.Core.Enums;
|
||||
|
||||
public enum ThemeMode
|
||||
{
|
||||
Dark = 0,
|
||||
Light = 1,
|
||||
HighContrast = 2
|
||||
}
|
||||
@@ -0,0 +1,145 @@
|
||||
namespace AutoClick.Core.Hotkeys;
|
||||
|
||||
/// <summary>Modifier flags; values equal the Win32 MOD_* constants used by RegisterHotKey.</summary>
|
||||
[Flags]
|
||||
public enum HotkeyModifiers
|
||||
{
|
||||
None = 0,
|
||||
Alt = 0x1,
|
||||
Control = 0x2,
|
||||
Shift = 0x4,
|
||||
Windows = 0x8,
|
||||
}
|
||||
|
||||
public enum HotkeyValidation
|
||||
{
|
||||
Valid,
|
||||
|
||||
/// <summary>The string could not be parsed or names no main key.</summary>
|
||||
Invalid,
|
||||
|
||||
/// <summary>F12 is reserved by Windows for debuggers.</summary>
|
||||
Reserved,
|
||||
|
||||
/// <summary>Win-key combinations are reserved for the operating system.</summary>
|
||||
UsesWindowsKey,
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A global hotkey such as "Ctrl+Shift+F8". Strings use WPF key names, the format v1 stored.
|
||||
/// </summary>
|
||||
public readonly record struct HotkeyGesture(HotkeyModifiers Modifiers, int VirtualKey)
|
||||
{
|
||||
private const int VkF12 = 0x7B;
|
||||
|
||||
/// <summary>A hotkey without modifiers also stops the key from reaching the game.</summary>
|
||||
public bool HasModifiers => (Modifiers & ~HotkeyModifiers.Windows) != HotkeyModifiers.None;
|
||||
|
||||
public static bool TryParse(string? text, out HotkeyGesture gesture)
|
||||
{
|
||||
gesture = default;
|
||||
if (string.IsNullOrWhiteSpace(text))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
var modifiers = HotkeyModifiers.None;
|
||||
var virtualKey = 0;
|
||||
foreach (var raw in text.Split('+', StringSplitOptions.TrimEntries | StringSplitOptions.RemoveEmptyEntries))
|
||||
{
|
||||
switch (raw.ToUpperInvariant())
|
||||
{
|
||||
case "CTRL" or "CONTROL":
|
||||
modifiers |= HotkeyModifiers.Control;
|
||||
continue;
|
||||
case "ALT":
|
||||
modifiers |= HotkeyModifiers.Alt;
|
||||
continue;
|
||||
case "SHIFT":
|
||||
modifiers |= HotkeyModifiers.Shift;
|
||||
continue;
|
||||
case "WIN" or "WINDOWS":
|
||||
modifiers |= HotkeyModifiers.Windows;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (virtualKey != 0 || !TryParseKey(raw, out virtualKey) || IsModifierKey(virtualKey))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (virtualKey == 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
gesture = new HotkeyGesture(modifiers, virtualKey);
|
||||
return true;
|
||||
}
|
||||
|
||||
public HotkeyValidation Validate()
|
||||
{
|
||||
if (VirtualKey is <= 0 or > 0xFE || IsModifierKey(VirtualKey))
|
||||
{
|
||||
return HotkeyValidation.Invalid;
|
||||
}
|
||||
|
||||
if (Modifiers.HasFlag(HotkeyModifiers.Windows))
|
||||
{
|
||||
return HotkeyValidation.UsesWindowsKey;
|
||||
}
|
||||
|
||||
return VirtualKey == VkF12 ? HotkeyValidation.Reserved : HotkeyValidation.Valid;
|
||||
}
|
||||
|
||||
/// <summary>Canonical text, e.g. "Ctrl+Alt+Shift+F8" (readable by v1 as well).</summary>
|
||||
public override string ToString()
|
||||
{
|
||||
var parts = new List<string>(4);
|
||||
if (Modifiers.HasFlag(HotkeyModifiers.Control))
|
||||
{
|
||||
parts.Add("Ctrl");
|
||||
}
|
||||
|
||||
if (Modifiers.HasFlag(HotkeyModifiers.Alt))
|
||||
{
|
||||
parts.Add("Alt");
|
||||
}
|
||||
|
||||
if (Modifiers.HasFlag(HotkeyModifiers.Shift))
|
||||
{
|
||||
parts.Add("Shift");
|
||||
}
|
||||
|
||||
if (Modifiers.HasFlag(HotkeyModifiers.Windows))
|
||||
{
|
||||
parts.Add("Win");
|
||||
}
|
||||
|
||||
parts.Add(VirtualKeyNames.GetDisplayName(VirtualKey));
|
||||
return string.Join('+', parts);
|
||||
}
|
||||
|
||||
private static bool TryParseKey(string name, out int virtualKey)
|
||||
{
|
||||
// A bare digit means the top-row key ("1" → D1). v1 parsed it as a numeric enum value
|
||||
// and silently registered the wrong key.
|
||||
if (name.Length == 1 && char.IsAsciiDigit(name[0]))
|
||||
{
|
||||
virtualKey = name[0];
|
||||
return true;
|
||||
}
|
||||
|
||||
if (name.StartsWith("VK", StringComparison.OrdinalIgnoreCase)
|
||||
&& int.TryParse(name.AsSpan(2), System.Globalization.NumberStyles.HexNumber, null, out virtualKey))
|
||||
{
|
||||
return virtualKey is > 0 and <= 0xFE;
|
||||
}
|
||||
|
||||
return VirtualKeyNames.TryGetVirtualKey(name, out virtualKey);
|
||||
}
|
||||
|
||||
private static bool IsModifierKey(int vk) =>
|
||||
vk is 0x10 or 0x11 or 0x12 or 0x5B or 0x5C or (>= 0xA0 and <= 0xA5);
|
||||
}
|
||||
@@ -0,0 +1,432 @@
|
||||
namespace AutoClick.Core.Hotkeys;
|
||||
|
||||
/// <summary>
|
||||
/// Key names used in hotkey strings, mapped to Win32 virtual-key codes.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The table mirrors WPF's <c>System.Windows.Input.Key</c> names and
|
||||
/// <c>KeyInterop.VirtualKeyFromKey</c>, because v1 stored hotkeys as <c>Key.ToString()</c>.
|
||||
/// Keeping it here avoids a WPF dependency in Core; a test in AutoClick.Win32.Tests checks
|
||||
/// it against WPF so the two can never drift apart.
|
||||
/// </remarks>
|
||||
public static class VirtualKeyNames
|
||||
{
|
||||
/// <summary>All (name, virtual key) pairs, including WPF aliases such as Enter/Return.</summary>
|
||||
public static IEnumerable<(string Name, int Vk)> All => Names;
|
||||
|
||||
public static bool TryGetVirtualKey(string name, out int virtualKey) =>
|
||||
Maps.ByName.TryGetValue(name, out virtualKey);
|
||||
|
||||
/// <summary>Name WPF would write for <paramref name="virtualKey"/>, or null when unknown.</summary>
|
||||
public static string? GetName(int virtualKey) =>
|
||||
Maps.ByCode.TryGetValue(virtualKey, out var name) ? name : null;
|
||||
|
||||
/// <summary>The key name for display: the WPF name, or "VKxx" for keys without one.</summary>
|
||||
public static string GetDisplayName(int virtualKey) =>
|
||||
GetName(virtualKey) ?? string.Create(System.Globalization.CultureInfo.InvariantCulture, $"VK{virtualKey:X2}");
|
||||
|
||||
/// <summary>Built on first use, after the tables below are initialized.</summary>
|
||||
private static class Maps
|
||||
{
|
||||
public static readonly Dictionary<string, int> ByName = BuildByName();
|
||||
public static readonly Dictionary<int, string> ByCode = BuildByCode();
|
||||
}
|
||||
|
||||
private static Dictionary<string, int> BuildByName()
|
||||
{
|
||||
var map = new Dictionary<string, int>(StringComparer.OrdinalIgnoreCase);
|
||||
foreach (var (name, vk) in Names)
|
||||
{
|
||||
map.TryAdd(name, vk);
|
||||
}
|
||||
|
||||
return map;
|
||||
}
|
||||
|
||||
private static Dictionary<int, string> BuildByCode()
|
||||
{
|
||||
var map = new Dictionary<int, string>();
|
||||
foreach (var (vk, name) in CanonicalNames)
|
||||
{
|
||||
map.TryAdd(vk, name);
|
||||
}
|
||||
|
||||
return map;
|
||||
}
|
||||
|
||||
private static readonly (string Name, int Vk)[] Names =
|
||||
[
|
||||
("Cancel", 3),
|
||||
("Back", 8),
|
||||
("Tab", 9),
|
||||
("Clear", 12),
|
||||
("Return", 13),
|
||||
("Enter", 13),
|
||||
("Pause", 19),
|
||||
("Capital", 20),
|
||||
("CapsLock", 20),
|
||||
("KanaMode", 21),
|
||||
("HangulMode", 21),
|
||||
("JunjaMode", 23),
|
||||
("FinalMode", 24),
|
||||
("HanjaMode", 25),
|
||||
("KanjiMode", 25),
|
||||
("Escape", 27),
|
||||
("ImeConvert", 28),
|
||||
("ImeNonConvert", 29),
|
||||
("ImeAccept", 30),
|
||||
("ImeModeChange", 31),
|
||||
("Space", 32),
|
||||
("Prior", 33),
|
||||
("PageUp", 33),
|
||||
("Next", 34),
|
||||
("PageDown", 34),
|
||||
("End", 35),
|
||||
("Home", 36),
|
||||
("Left", 37),
|
||||
("Up", 38),
|
||||
("Right", 39),
|
||||
("Down", 40),
|
||||
("Select", 41),
|
||||
("Print", 42),
|
||||
("Execute", 43),
|
||||
("Snapshot", 44),
|
||||
("PrintScreen", 44),
|
||||
("Insert", 45),
|
||||
("Delete", 46),
|
||||
("Help", 47),
|
||||
("D0", 48),
|
||||
("D1", 49),
|
||||
("D2", 50),
|
||||
("D3", 51),
|
||||
("D4", 52),
|
||||
("D5", 53),
|
||||
("D6", 54),
|
||||
("D7", 55),
|
||||
("D8", 56),
|
||||
("D9", 57),
|
||||
("A", 65),
|
||||
("B", 66),
|
||||
("C", 67),
|
||||
("D", 68),
|
||||
("E", 69),
|
||||
("F", 70),
|
||||
("G", 71),
|
||||
("H", 72),
|
||||
("I", 73),
|
||||
("J", 74),
|
||||
("K", 75),
|
||||
("L", 76),
|
||||
("M", 77),
|
||||
("N", 78),
|
||||
("O", 79),
|
||||
("P", 80),
|
||||
("Q", 81),
|
||||
("R", 82),
|
||||
("S", 83),
|
||||
("T", 84),
|
||||
("U", 85),
|
||||
("V", 86),
|
||||
("W", 87),
|
||||
("X", 88),
|
||||
("Y", 89),
|
||||
("Z", 90),
|
||||
("LWin", 91),
|
||||
("RWin", 92),
|
||||
("Apps", 93),
|
||||
("Sleep", 95),
|
||||
("NumPad0", 96),
|
||||
("NumPad1", 97),
|
||||
("NumPad2", 98),
|
||||
("NumPad3", 99),
|
||||
("NumPad4", 100),
|
||||
("NumPad5", 101),
|
||||
("NumPad6", 102),
|
||||
("NumPad7", 103),
|
||||
("NumPad8", 104),
|
||||
("NumPad9", 105),
|
||||
("Multiply", 106),
|
||||
("Add", 107),
|
||||
("Separator", 108),
|
||||
("Subtract", 109),
|
||||
("Decimal", 110),
|
||||
("Divide", 111),
|
||||
("F1", 112),
|
||||
("F2", 113),
|
||||
("F3", 114),
|
||||
("F4", 115),
|
||||
("F5", 116),
|
||||
("F6", 117),
|
||||
("F7", 118),
|
||||
("F8", 119),
|
||||
("F9", 120),
|
||||
("F10", 121),
|
||||
("F11", 122),
|
||||
("F12", 123),
|
||||
("F13", 124),
|
||||
("F14", 125),
|
||||
("F15", 126),
|
||||
("F16", 127),
|
||||
("F17", 128),
|
||||
("F18", 129),
|
||||
("F19", 130),
|
||||
("F20", 131),
|
||||
("F21", 132),
|
||||
("F22", 133),
|
||||
("F23", 134),
|
||||
("F24", 135),
|
||||
("NumLock", 144),
|
||||
("Scroll", 145),
|
||||
("LeftShift", 160),
|
||||
("RightShift", 161),
|
||||
("LeftCtrl", 162),
|
||||
("RightCtrl", 163),
|
||||
("LeftAlt", 164),
|
||||
("RightAlt", 165),
|
||||
("BrowserBack", 166),
|
||||
("BrowserForward", 167),
|
||||
("BrowserRefresh", 168),
|
||||
("BrowserStop", 169),
|
||||
("BrowserSearch", 170),
|
||||
("BrowserFavorites", 171),
|
||||
("BrowserHome", 172),
|
||||
("VolumeMute", 173),
|
||||
("VolumeDown", 174),
|
||||
("VolumeUp", 175),
|
||||
("MediaNextTrack", 176),
|
||||
("MediaPreviousTrack", 177),
|
||||
("MediaStop", 178),
|
||||
("MediaPlayPause", 179),
|
||||
("LaunchMail", 180),
|
||||
("SelectMedia", 181),
|
||||
("LaunchApplication1", 182),
|
||||
("LaunchApplication2", 183),
|
||||
("Oem1", 186),
|
||||
("OemSemicolon", 186),
|
||||
("OemPlus", 187),
|
||||
("OemComma", 188),
|
||||
("OemMinus", 189),
|
||||
("OemPeriod", 190),
|
||||
("Oem2", 191),
|
||||
("OemQuestion", 191),
|
||||
("Oem3", 192),
|
||||
("OemTilde", 192),
|
||||
("AbntC1", 193),
|
||||
("AbntC2", 194),
|
||||
("Oem4", 219),
|
||||
("OemOpenBrackets", 219),
|
||||
("Oem5", 220),
|
||||
("OemPipe", 220),
|
||||
("Oem6", 221),
|
||||
("OemCloseBrackets", 221),
|
||||
("Oem7", 222),
|
||||
("OemQuotes", 222),
|
||||
("Oem8", 223),
|
||||
("Oem102", 226),
|
||||
("OemBackslash", 226),
|
||||
("ImeProcessed", 229),
|
||||
("OemAttn", 240),
|
||||
("DbeAlphanumeric", 240),
|
||||
("OemFinish", 241),
|
||||
("DbeKatakana", 241),
|
||||
("OemCopy", 242),
|
||||
("DbeHiragana", 242),
|
||||
("OemAuto", 243),
|
||||
("DbeSbcsChar", 243),
|
||||
("OemEnlw", 244),
|
||||
("DbeDbcsChar", 244),
|
||||
("OemBackTab", 245),
|
||||
("DbeRoman", 245),
|
||||
("Attn", 246),
|
||||
("DbeNoRoman", 246),
|
||||
("CrSel", 247),
|
||||
("DbeEnterWordRegisterMode", 247),
|
||||
("ExSel", 248),
|
||||
("DbeEnterImeConfigureMode", 248),
|
||||
("EraseEof", 249),
|
||||
("DbeFlushString", 249),
|
||||
("Play", 250),
|
||||
("DbeCodeInput", 250),
|
||||
("Zoom", 251),
|
||||
("DbeNoCodeInput", 251),
|
||||
("NoName", 252),
|
||||
("DbeDetermineString", 252),
|
||||
("Pa1", 253),
|
||||
("DbeEnterDialogConversionMode", 253),
|
||||
("OemClear", 254),
|
||||
];
|
||||
|
||||
// Name WPF writes for each virtual key (Key.ToString() of the first Key mapping to it).
|
||||
private static readonly (int Vk, string Name)[] CanonicalNames =
|
||||
[
|
||||
(3, "Cancel"),
|
||||
(8, "Back"),
|
||||
(9, "Tab"),
|
||||
(12, "Clear"),
|
||||
(13, "Return"),
|
||||
(19, "Pause"),
|
||||
(20, "Capital"),
|
||||
(21, "KanaMode"),
|
||||
(23, "JunjaMode"),
|
||||
(24, "FinalMode"),
|
||||
(25, "HanjaMode"),
|
||||
(27, "Escape"),
|
||||
(28, "ImeConvert"),
|
||||
(29, "ImeNonConvert"),
|
||||
(30, "ImeAccept"),
|
||||
(31, "ImeModeChange"),
|
||||
(32, "Space"),
|
||||
(33, "PageUp"),
|
||||
(34, "Next"),
|
||||
(35, "End"),
|
||||
(36, "Home"),
|
||||
(37, "Left"),
|
||||
(38, "Up"),
|
||||
(39, "Right"),
|
||||
(40, "Down"),
|
||||
(41, "Select"),
|
||||
(42, "Print"),
|
||||
(43, "Execute"),
|
||||
(44, "Snapshot"),
|
||||
(45, "Insert"),
|
||||
(46, "Delete"),
|
||||
(47, "Help"),
|
||||
(48, "D0"),
|
||||
(49, "D1"),
|
||||
(50, "D2"),
|
||||
(51, "D3"),
|
||||
(52, "D4"),
|
||||
(53, "D5"),
|
||||
(54, "D6"),
|
||||
(55, "D7"),
|
||||
(56, "D8"),
|
||||
(57, "D9"),
|
||||
(65, "A"),
|
||||
(66, "B"),
|
||||
(67, "C"),
|
||||
(68, "D"),
|
||||
(69, "E"),
|
||||
(70, "F"),
|
||||
(71, "G"),
|
||||
(72, "H"),
|
||||
(73, "I"),
|
||||
(74, "J"),
|
||||
(75, "K"),
|
||||
(76, "L"),
|
||||
(77, "M"),
|
||||
(78, "N"),
|
||||
(79, "O"),
|
||||
(80, "P"),
|
||||
(81, "Q"),
|
||||
(82, "R"),
|
||||
(83, "S"),
|
||||
(84, "T"),
|
||||
(85, "U"),
|
||||
(86, "V"),
|
||||
(87, "W"),
|
||||
(88, "X"),
|
||||
(89, "Y"),
|
||||
(90, "Z"),
|
||||
(91, "LWin"),
|
||||
(92, "RWin"),
|
||||
(93, "Apps"),
|
||||
(95, "Sleep"),
|
||||
(96, "NumPad0"),
|
||||
(97, "NumPad1"),
|
||||
(98, "NumPad2"),
|
||||
(99, "NumPad3"),
|
||||
(100, "NumPad4"),
|
||||
(101, "NumPad5"),
|
||||
(102, "NumPad6"),
|
||||
(103, "NumPad7"),
|
||||
(104, "NumPad8"),
|
||||
(105, "NumPad9"),
|
||||
(106, "Multiply"),
|
||||
(107, "Add"),
|
||||
(108, "Separator"),
|
||||
(109, "Subtract"),
|
||||
(110, "Decimal"),
|
||||
(111, "Divide"),
|
||||
(112, "F1"),
|
||||
(113, "F2"),
|
||||
(114, "F3"),
|
||||
(115, "F4"),
|
||||
(116, "F5"),
|
||||
(117, "F6"),
|
||||
(118, "F7"),
|
||||
(119, "F8"),
|
||||
(120, "F9"),
|
||||
(121, "F10"),
|
||||
(122, "F11"),
|
||||
(123, "F12"),
|
||||
(124, "F13"),
|
||||
(125, "F14"),
|
||||
(126, "F15"),
|
||||
(127, "F16"),
|
||||
(128, "F17"),
|
||||
(129, "F18"),
|
||||
(130, "F19"),
|
||||
(131, "F20"),
|
||||
(132, "F21"),
|
||||
(133, "F22"),
|
||||
(134, "F23"),
|
||||
(135, "F24"),
|
||||
(144, "NumLock"),
|
||||
(145, "Scroll"),
|
||||
(160, "LeftShift"),
|
||||
(161, "RightShift"),
|
||||
(162, "LeftCtrl"),
|
||||
(163, "RightCtrl"),
|
||||
(164, "LeftAlt"),
|
||||
(165, "RightAlt"),
|
||||
(166, "BrowserBack"),
|
||||
(167, "BrowserForward"),
|
||||
(168, "BrowserRefresh"),
|
||||
(169, "BrowserStop"),
|
||||
(170, "BrowserSearch"),
|
||||
(171, "BrowserFavorites"),
|
||||
(172, "BrowserHome"),
|
||||
(173, "VolumeMute"),
|
||||
(174, "VolumeDown"),
|
||||
(175, "VolumeUp"),
|
||||
(176, "MediaNextTrack"),
|
||||
(177, "MediaPreviousTrack"),
|
||||
(178, "MediaStop"),
|
||||
(179, "MediaPlayPause"),
|
||||
(180, "LaunchMail"),
|
||||
(181, "SelectMedia"),
|
||||
(182, "LaunchApplication1"),
|
||||
(183, "LaunchApplication2"),
|
||||
(186, "Oem1"),
|
||||
(187, "OemPlus"),
|
||||
(188, "OemComma"),
|
||||
(189, "OemMinus"),
|
||||
(190, "OemPeriod"),
|
||||
(191, "OemQuestion"),
|
||||
(192, "Oem3"),
|
||||
(193, "AbntC1"),
|
||||
(194, "AbntC2"),
|
||||
(219, "OemOpenBrackets"),
|
||||
(220, "Oem5"),
|
||||
(221, "Oem6"),
|
||||
(222, "OemQuotes"),
|
||||
(223, "Oem8"),
|
||||
(226, "OemBackslash"),
|
||||
(229, "ImeProcessed"),
|
||||
(240, "OemAttn"),
|
||||
(241, "OemFinish"),
|
||||
(242, "OemCopy"),
|
||||
(243, "DbeSbcsChar"),
|
||||
(244, "OemEnlw"),
|
||||
(245, "OemBackTab"),
|
||||
(246, "DbeNoRoman"),
|
||||
(247, "DbeEnterWordRegisterMode"),
|
||||
(248, "DbeEnterImeConfigureMode"),
|
||||
(249, "EraseEof"),
|
||||
(250, "Play"),
|
||||
(251, "DbeNoCodeInput"),
|
||||
(252, "NoName"),
|
||||
(253, "Pa1"),
|
||||
(254, "OemClear"),
|
||||
];
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
using AutoClick.Core.Models;
|
||||
|
||||
namespace AutoClick.Core.Interfaces;
|
||||
|
||||
public interface IClickEngine
|
||||
{
|
||||
Task StartAsync(GameSession session, CancellationToken cancellationToken);
|
||||
void Pause(GameSession session);
|
||||
void Resume(GameSession session);
|
||||
void Stop(GameSession session);
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
using AutoClick.Core.Models;
|
||||
|
||||
namespace AutoClick.Core.Interfaces;
|
||||
|
||||
public interface IGameDetector
|
||||
{
|
||||
List<GameWindowInfo> GetRunningWindows();
|
||||
bool IsProcessAlive(int processId);
|
||||
bool IsWindowValid(IntPtr handle);
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
namespace AutoClick.Core.Interfaces;
|
||||
|
||||
public interface IHotkeyService : IDisposable
|
||||
{
|
||||
event Action<string>? HotkeyPressed;
|
||||
void Register(string id, string keyCombo, IntPtr windowHandle);
|
||||
void UnregisterAll();
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
namespace AutoClick.Core.Interfaces;
|
||||
|
||||
public interface ILogService
|
||||
{
|
||||
event Action<string>? LogReceived;
|
||||
void Info(string message);
|
||||
void Warn(string message);
|
||||
void Error(string message, Exception? ex = null);
|
||||
void ExportLog(string filePath);
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
namespace AutoClick.Core.Interfaces;
|
||||
|
||||
public interface IMemoryManager
|
||||
{
|
||||
long GetCurrentMemoryUsageMb();
|
||||
void ForceCleanup();
|
||||
bool IsOverLimit(long limitMb);
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
using AutoClick.Core.Models;
|
||||
|
||||
namespace AutoClick.Core.Interfaces;
|
||||
|
||||
public interface IProfileService
|
||||
{
|
||||
List<GameProfile> GetAll();
|
||||
GameProfile? GetByName(string name);
|
||||
void Save(GameProfile profile);
|
||||
void Delete(string id);
|
||||
void Export(string filePath, GameProfile profile);
|
||||
GameProfile Import(string filePath);
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
using AutoClick.Core.Models;
|
||||
|
||||
namespace AutoClick.Core.Interfaces;
|
||||
|
||||
public interface ISessionExportService
|
||||
{
|
||||
void Export(string filePath, SessionExport payload);
|
||||
SessionExport Import(string filePath);
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
using AutoClick.Core.Models;
|
||||
|
||||
namespace AutoClick.Core.Interfaces;
|
||||
|
||||
public interface ISettingsService
|
||||
{
|
||||
string SettingsFilePath { get; }
|
||||
AppSettings Load();
|
||||
void Save(AppSettings settings);
|
||||
void Export(string filePath, AppSettings settings);
|
||||
AppSettings Import(string filePath);
|
||||
}
|
||||
@@ -1,48 +0,0 @@
|
||||
namespace AutoClick.Core.Interfaces;
|
||||
|
||||
/// <summary>
|
||||
/// Represents the result of an update check with comprehensive status information.
|
||||
/// </summary>
|
||||
public class UpdateCheckResult
|
||||
{
|
||||
public bool Success { get; init; }
|
||||
public bool UpdateAvailable { get; init; }
|
||||
public string? NewVersion { get; init; }
|
||||
public string? CurrentVersion { get; init; }
|
||||
public string? ErrorMessage { get; init; }
|
||||
public UpdateErrorKind ErrorKind { get; init; } = UpdateErrorKind.None;
|
||||
}
|
||||
|
||||
public enum UpdateErrorKind
|
||||
{
|
||||
None,
|
||||
NotInstalled,
|
||||
NoRelease,
|
||||
RateLimited,
|
||||
Forbidden,
|
||||
ServerError,
|
||||
NetworkError,
|
||||
ChecksumFailed,
|
||||
Unknown
|
||||
}
|
||||
|
||||
public interface IUpdateService
|
||||
{
|
||||
/// <summary>True if the app was installed via Velopack (not running from IDE/debug).</summary>
|
||||
bool IsInstalled { get; }
|
||||
|
||||
/// <summary>Currently installed version string.</summary>
|
||||
string CurrentVersion { get; }
|
||||
|
||||
/// <summary>Check GitHub for updates with full status code handling.</summary>
|
||||
Task<UpdateCheckResult> CheckForUpdateAsync();
|
||||
|
||||
/// <summary>Download the available update. Returns progress 0-100 via callback.</summary>
|
||||
Task<UpdateCheckResult> DownloadUpdateAsync(Action<int>? progressCallback = null);
|
||||
|
||||
/// <summary>Apply the downloaded update and restart the application.</summary>
|
||||
void ApplyUpdateAndRestart();
|
||||
|
||||
/// <summary>Apply the downloaded update without restarting.</summary>
|
||||
void ApplyUpdateAndExit();
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
using AutoClick.Core.Enums;
|
||||
|
||||
namespace AutoClick.Core.Models;
|
||||
|
||||
public class AppSettings
|
||||
{
|
||||
public SettingsMode SettingsMode { get; set; } = SettingsMode.Global;
|
||||
public ClickMode DefaultClickMode { get; set; } = ClickMode.Random;
|
||||
public double DefaultFixedInterval { get; set; } = 2.0;
|
||||
public double RandomMin { get; set; } = 1.0;
|
||||
public double RandomMax { get; set; } = 60.0;
|
||||
public int MaxGamesInQueue { get; set; } = 10;
|
||||
public bool ShowRealTimeLogs { get; set; } = true;
|
||||
public ThemeMode Theme { get; set; } = ThemeMode.Dark; // default follows system on first launch
|
||||
public string Language { get; set; } = "en";
|
||||
public ExitBehavior ExitBehavior { get; set; } = ExitBehavior.MinimizeToTray;
|
||||
public bool AutoUpdate { get; set; } = true;
|
||||
public bool SoundNotifications { get; set; } = true;
|
||||
public bool ShowGameExitNotification { get; set; } = true;
|
||||
public bool MinimizeOnStartAll { get; set; } = false;
|
||||
public bool EnablePixelColorGuard { get; set; } = false;
|
||||
public int ColorTolerance { get; set; } = 10;
|
||||
public ColorMismatchBehavior ColorMismatchBehavior { get; set; } = ColorMismatchBehavior.StopSession;
|
||||
/// <summary>
|
||||
/// Maximum time the click loop will wait for a pixel to match its reference color
|
||||
/// when ColorMismatchBehavior is WaitUntilMatch. After timeout, the point is skipped.
|
||||
/// </summary>
|
||||
public int ColorWaitTimeoutMs { get; set; } = 5000;
|
||||
public HotkeySettings Hotkeys { get; set; } = new();
|
||||
}
|
||||
|
||||
public class HotkeySettings
|
||||
{
|
||||
public string PauseResume { get; set; } = "F6";
|
||||
public string StopAll { get; set; } = "F7";
|
||||
public string StartAll { get; set; } = "F8";
|
||||
}
|
||||
@@ -1,45 +1,51 @@
|
||||
using AutoClick.Core.Enums;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace AutoClick.Core.Models;
|
||||
|
||||
public class ClickPoint
|
||||
/// <summary>
|
||||
/// One step of a click sequence. Immutable: use <c>with</c> to change a copy, so no code path
|
||||
/// can forget to copy a field (v1 lost the keystroke key when copying points).
|
||||
/// </summary>
|
||||
/// <remarks>The property names are the v1 JSON contract (profiles, sessions): do not rename.</remarks>
|
||||
public sealed record ClickPoint
|
||||
{
|
||||
public int X { get; set; }
|
||||
public int Y { get; set; }
|
||||
public ClickType ClickType { get; set; } = ClickType.LeftClick;
|
||||
/// <summary>COLORREF sentinel meaning "no reference color captured".</summary>
|
||||
public const uint NoColor = 0xFFFFFFFF;
|
||||
|
||||
/// <summary>
|
||||
/// Delay in milliseconds AFTER this point is clicked, before moving to the next point.
|
||||
/// 0 = no extra delay (the main profile interval still applies after the full sequence).
|
||||
/// </summary>
|
||||
public int DelayAfterMs { get; set; }
|
||||
/// <summary>Client X coordinate in the target window's own coordinate space.</summary>
|
||||
public int X { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Reference pixel color (COLORREF 0x00BBGGRR) captured when coordinate was picked.
|
||||
/// 0xFFFFFFFF means no color was captured (sentinel value).
|
||||
/// </summary>
|
||||
public uint ReferenceColor { get; set; } = 0xFFFFFFFF;
|
||||
public bool HasReferenceColor => ReferenceColor != 0xFFFFFFFF;
|
||||
/// <summary>Client Y coordinate in the target window's own coordinate space.</summary>
|
||||
public int Y { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Virtual-key code (VK_*) sent when ClickType is Keystroke. Ignored otherwise.
|
||||
/// 0 means no key set.
|
||||
/// </summary>
|
||||
public int VirtualKeyCode { get; set; }
|
||||
public ClickType ClickType { get; init; } = ClickType.LeftClick;
|
||||
|
||||
public ClickPoint() { }
|
||||
/// <summary>Delay after this step, before the next step of the sequence.</summary>
|
||||
public int DelayAfterMs { get; init; }
|
||||
|
||||
public ClickPoint(int x, int y, ClickType clickType = ClickType.LeftClick, int delayAfterMs = 0)
|
||||
/// <summary>Reference pixel color (COLORREF 0x00BBGGRR) for the pixel color guard.</summary>
|
||||
public uint ReferenceColor { get; init; } = NoColor;
|
||||
|
||||
/// <summary>Virtual-key code sent when <see cref="ClickType"/> is Keystroke.</summary>
|
||||
public int VirtualKeyCode { get; init; }
|
||||
|
||||
/// <summary>Monitor DPI of the target window when the point was picked (null for v1 data).</summary>
|
||||
public int? CaptureDpi { get; init; }
|
||||
|
||||
[JsonIgnore]
|
||||
public bool HasReferenceColor => ReferenceColor != NoColor;
|
||||
|
||||
[JsonIgnore]
|
||||
public bool IsKeystroke => ClickType == ClickType.Keystroke;
|
||||
|
||||
/// <summary>Returns a copy with every value inside its valid range.</summary>
|
||||
public ClickPoint Normalize() => this with
|
||||
{
|
||||
X = x;
|
||||
Y = y;
|
||||
ClickType = clickType;
|
||||
DelayAfterMs = delayAfterMs;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
var suffix = DelayAfterMs > 0 ? $" +{DelayAfterMs}ms" : "";
|
||||
return $"({X}, {Y}){suffix}";
|
||||
}
|
||||
X = IsKeystroke ? 0 : Math.Clamp(X, 0, Limits.MaxCoordinate),
|
||||
Y = IsKeystroke ? 0 : Math.Clamp(Y, 0, Limits.MaxCoordinate),
|
||||
ClickType = Enum.IsDefined(ClickType) ? ClickType : ClickType.LeftClick,
|
||||
DelayAfterMs = Limits.ClampSequenceDelay(DelayAfterMs),
|
||||
VirtualKeyCode = IsKeystroke ? Math.Clamp(VirtualKeyCode, 0, 0xFE) : 0,
|
||||
CaptureDpi = CaptureDpi is > 0 and <= 1536 ? CaptureDpi : null,
|
||||
};
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
using AutoClick.Core.Enums;
|
||||
|
||||
namespace AutoClick.Core.Models;
|
||||
|
||||
public class ClickProfile
|
||||
{
|
||||
public ClickMode Mode { get; set; } = ClickMode.Random;
|
||||
public double FixedIntervalSeconds { get; set; } = 2.0;
|
||||
public double RandomMinSeconds { get; set; } = 1.0;
|
||||
public double RandomMaxSeconds { get; set; } = 60.0;
|
||||
|
||||
public double GetInterval()
|
||||
{
|
||||
return Mode switch
|
||||
{
|
||||
ClickMode.Fixed => FixedIntervalSeconds,
|
||||
ClickMode.Random => Random.Shared.NextDouble() * (RandomMaxSeconds - RandomMinSeconds) + RandomMinSeconds,
|
||||
_ => FixedIntervalSeconds
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
namespace AutoClick.Core.Models;
|
||||
|
||||
/// <summary>
|
||||
/// Interval between two runs of a click sequence. JSON names match v1's ClickProfile
|
||||
/// ("clickSettings" in profiles, "profile" in sessions).
|
||||
/// </summary>
|
||||
public sealed record ClickTiming
|
||||
{
|
||||
public ClickMode Mode { get; init; } = ClickMode.Random;
|
||||
public double FixedIntervalSeconds { get; init; } = Limits.DefaultIntervalSeconds;
|
||||
public double RandomMinSeconds { get; init; } = 1;
|
||||
public double RandomMaxSeconds { get; init; } = 60;
|
||||
|
||||
public ClickTiming Normalize()
|
||||
{
|
||||
var min = Limits.ClampInterval(RandomMinSeconds);
|
||||
var max = Limits.ClampInterval(RandomMaxSeconds);
|
||||
if (min > max)
|
||||
{
|
||||
(min, max) = (max, min);
|
||||
}
|
||||
|
||||
return this with
|
||||
{
|
||||
Mode = Enum.IsDefined(Mode) ? Mode : ClickMode.Random,
|
||||
FixedIntervalSeconds = Limits.ClampInterval(FixedIntervalSeconds),
|
||||
RandomMinSeconds = min,
|
||||
RandomMaxSeconds = max,
|
||||
};
|
||||
}
|
||||
|
||||
/// <summary>The wait before the next sequence run. Call on a normalized instance.</summary>
|
||||
public TimeSpan NextInterval(Random random)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(random);
|
||||
var seconds = Mode == ClickMode.Fixed
|
||||
? FixedIntervalSeconds
|
||||
: RandomMinSeconds + (random.NextDouble() * (RandomMaxSeconds - RandomMinSeconds));
|
||||
return TimeSpan.FromSeconds(seconds);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,84 @@
|
||||
namespace AutoClick.Core.Models;
|
||||
|
||||
// Numeric values are part of the v1 file formats (profiles store enums as numbers): never renumber.
|
||||
|
||||
public enum ClickType
|
||||
{
|
||||
LeftClick = 0,
|
||||
DoubleClick = 1,
|
||||
RightClick = 2,
|
||||
|
||||
/// <summary>Send a key press (WM_KEYDOWN/WM_KEYUP) instead of a mouse click; X/Y are ignored.</summary>
|
||||
Keystroke = 3,
|
||||
}
|
||||
|
||||
public enum ClickMode
|
||||
{
|
||||
Random = 0,
|
||||
Fixed = 1,
|
||||
}
|
||||
|
||||
public enum ColorMismatchBehavior
|
||||
{
|
||||
SkipPoint = 0,
|
||||
StopSession = 1,
|
||||
|
||||
/// <summary>Poll until the pixel matches or the wait timeout elapses (then skip the point).</summary>
|
||||
WaitUntilMatch = 2,
|
||||
}
|
||||
|
||||
public enum ExitBehavior
|
||||
{
|
||||
MinimizeToTray = 0,
|
||||
StopAndExit = 1,
|
||||
ForceExit = 2,
|
||||
}
|
||||
|
||||
public enum SettingsMode
|
||||
{
|
||||
/// <summary>Every game uses the global click timing from Settings.</summary>
|
||||
Global = 0,
|
||||
|
||||
/// <summary>Each game has its own timing and can save/load profiles.</summary>
|
||||
Custom = 1,
|
||||
}
|
||||
|
||||
/// <summary>Named AppTheme (not ThemeMode) to avoid clashing with System.Windows.ThemeMode.</summary>
|
||||
public enum AppTheme
|
||||
{
|
||||
Dark = 0,
|
||||
Light = 1,
|
||||
HighContrast = 2,
|
||||
|
||||
/// <summary>Follow the Windows app theme (and high contrast) setting.</summary>
|
||||
System = 3,
|
||||
}
|
||||
|
||||
public enum SessionState
|
||||
{
|
||||
Idle,
|
||||
Running,
|
||||
Paused,
|
||||
Stopped,
|
||||
}
|
||||
|
||||
/// <summary>Why a click session stopped.</summary>
|
||||
public enum StopReason
|
||||
{
|
||||
/// <summary>Not stopped (the default value).</summary>
|
||||
// ReSharper disable once UnusedMember.Global
|
||||
None,
|
||||
User,
|
||||
WindowClosed,
|
||||
OutOfBounds,
|
||||
ColorMismatch,
|
||||
|
||||
/// <summary>The game runs with higher privileges; Windows blocks input from AutoClick (UIPI).</summary>
|
||||
ElevationRequired,
|
||||
|
||||
/// <summary>The game's message queue is full (the game is not responding).</summary>
|
||||
TargetNotResponding,
|
||||
Scheduler,
|
||||
AppExit,
|
||||
Error,
|
||||
}
|
||||
Loaded 100 of 271 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user