Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
110 changes: 110 additions & 0 deletions .github/workflows/windows_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
name: Build Check(Windows)

on:
pull_request:
types: [opened, synchronize, reopened]

jobs:
build:
runs-on: windows-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '^1.24'
# Alternatively: go-version: 'stable'
- name: Set up MinGW for CGO (required for Fyne)
uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
update: true
install: >-
mingw-w64-x86_64-gcc
mingw-w64-x86_64-pkg-config

- name: Add MinGW to PATH and set CGO vars
shell: pwsh
run: |
$mingwPath = "C:\msys64\mingw64\bin"
echo $mingwPath >> $env:GITHUB_PATH
echo "CC=gcc" >> $env:GITHUB_ENV
echo "CXX=g++" >> $env:GITHUB_ENV
echo "CGO_ENABLED=1" >> $env:GITHUB_ENV

- name: Verify Go installation and CGO setup
run: |
go version
gcc --version
echo "CGO_ENABLED: $env:CGO_ENABLED"

- name: Check go.mod exists
shell: cmd
run: |
if not exist go.mod (
echo "❌ go.mod not found!"
exit /b 1
)
echo "✅ go.mod found"

- name: Install Go dependencies
shell: cmd
run: |
echo "Downloading dependencies..."
go mod download -x
echo "Dependencies downloaded successfully"

- name: Create dist directory
shell: cmd
run: if not exist "dist" mkdir dist

- name: Clean previous builds
shell: cmd
run: del /Q dist\*.exe 2>nul || echo "No previous builds to clean"

- name: Check Go and CGO environment
run: |
go version
go env GOOS GOARCH CGO_ENABLED CC CXX

- name: List dependencies
run: go list -m all

- name: Build GUI version
shell: cmd
run: |
echo Building GUI version...
go build -v -ldflags "-s -w -H=windowsgui" -o dist\click-guardian-gui.exe .\cmd\click-guardian
if %ERRORLEVEL% EQU 0 (
echo ✅ GUI build successful!
) else (
echo ❌ GUI build failed with error code %ERRORLEVEL%!
)

- name: Build console version
shell: cmd
run: |
echo Building console version...
go build -v -ldflags "-s -w" -o dist\click-guardian.exe .\cmd\click-guardian
if %ERRORLEVEL% EQU 0 (
echo ✅ Console build successful!
) else (
echo ❌ Console build failed with error code %ERRORLEVEL%!
exit /b 1
)

- name: Check if EXE was generated
shell: cmd
run: |
if not exist dist\click-guardian-gui.exe (
echo "❌ GUI EXE not found!"
exit /b 1
)
if not exist dist\click-guardian.exe (
echo "❌ Console EXE not found!"
exit /b 1
)
echo "✅ Both EXE files found."
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ dist/
*.deb
*.rpm
*.msi
*.syso

# Logs
*.log
Expand Down
10 changes: 3 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

- 🎯 **Strict Double-Click Blocking**: Ensures no double-clicks are allowed under any circumstances
- ⚙️ **Customizable Delay**: Set delay from 5ms to 500ms (default: 50ms)
- **Adaptive Protection**: Automatically increases delay when faulty mouse hardware is detected (never decreases below user setting)
- 📊 **Real-time Logging**: Detailed logs for allowed and blocked clicks, including reasons and timestamps
- 🛡️ **Adaptive Protection**: Automatically increases delay when faulty mouse hardware is detected (never decreases below user setting)
- 📊 **Real-time Logging**: Detailed logs for allowed and blocked clicks, including reasons and timestamps
- 🖥️ **Modern GUI**: Clean and intuitive Fyne-based interface
- 🚀 **Lightweight**: Minimal resource usage
- 🛡️ **Safe**: Only monitors clicks, doesn't interfere with other mouse operations
Expand Down Expand Up @@ -56,12 +56,8 @@ _Tip: Start with the default 50ms delay - it works well for most users._

1. Go to [Releases](../../releases) page
2. Download the latest `click-guardian-v*.zip`
3. Extract and run `click-guardian-gui.exe`
3. Extract and run `click-guardian.exe`

**Alternative downloads:**

- `click-guardian-gui.exe` - Main application (recommended)
- `click-guardian.exe` - Console version (shows debug output)

### Build from Source

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion build/build.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build Configuration
VERSION=1.0.0
VERSION=1.0.1
COMPANY_NAME=Click Guardian Project
PRODUCT_NAME=Click Guardian
DESCRIPTION=Prevents accidental double-clicks with configurable delay protection
Expand Down
70 changes: 31 additions & 39 deletions build/windows/app-manifest.xml
Original file line number Diff line number Diff line change
@@ -1,42 +1,34 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity
version="1.0.0.0"
processorArchitecture="*"
name="ClickGuardian"
type="win32" />

<!-- Application information -->
<description>Click Guardian - Double-Click Protection</description>

<!-- UAC settings - run as normal user -->
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
</requestedPrivileges>
</security>
</trustInfo>

<!-- DPI awareness -->
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitorV2</dpiAwareness>
</windowsSettings>
<assemblyIdentity version="1.0.1.0" processorArchitecture="*" name="ClickGuardian" type="win32" />
<!-- Application information -->
<description>Click Guardian - Double-Click Protection</description>
<!-- UAC settings - run as normal user -->
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
</requestedPrivileges>
</security>
</trustInfo>
<!-- DPI awareness -->
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitorV2</dpiAwareness>
</windowsSettings>
</application>
<!-- Supported Windows versions -->
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!-- Windows 10 and later -->
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />
<!-- Windows 8.1 -->
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}" />
<!-- Windows 8 -->
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}" />
<!-- Windows 7 -->
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}" />
</application>

<!-- Supported Windows versions -->
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!-- Windows 10 and later -->
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />
<!-- Windows 8.1 -->
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}" />
<!-- Windows 8 -->
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}" />
<!-- Windows 7 -->
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}" />
</application>
</compatibility>
</compatibility>
</assembly>
10 changes: 5 additions & 5 deletions build/windows/app.rc
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
ICON_ID ICON "app-icon.ico"

1 VERSIONINFO
FILEVERSION 1,0,0,0
PRODUCTVERSION 1,0,0,0
FILEVERSION 1,0,1,0
PRODUCTVERSION 1,0,1,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
Expand All @@ -21,12 +21,12 @@ BEGIN
BEGIN
VALUE "CompanyName", "Click Guardian Project"
VALUE "FileDescription", "Click Guardian - Double-Click Protection"
VALUE "FileVersion", "1.0.0.0"
VALUE "FileVersion", "1.0.1"
VALUE "InternalName", "click-guardian"
VALUE "LegalCopyright", "© 2025 Click Guardian Project"
VALUE "LegalCopyright", "© 2025 Azizul hakim"
VALUE "OriginalFilename", "click-guardian.exe"
VALUE "ProductName", "Click Guardian"
VALUE "ProductVersion", "1.0.0.0"
VALUE "ProductVersion", "1.0.1"
VALUE "Comments", "Prevents accidental double-clicks with configurable delay protection"
END
END
Expand Down
Binary file removed cmd/click-guardian/app.syso
Binary file not shown.
Loading