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
115 changes: 64 additions & 51 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ on:
workflow_dispatch:
inputs:
tag_name:
description: 'Tag for the release'
description: "Tag for the release"
required: true
default: 'v1.0.0'
default: "v1.2.0"

permissions:
contents: write
Expand All @@ -15,66 +15,79 @@ permissions:

jobs:
build:

runs-on: windows-latest

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

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12.5'
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12.5"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt

- name: Install PyInstaller
run: pip install pyinstaller
- name: Install PyInstaller
run: pip install pyinstaller

- name: Package Application
run: |
pyinstaller --noconfirm --onefile --windowed --icon "src\img\icon.ico" --name "CS2.Triggerbot" --version-file "version.txt" --add-data "classes;classes/" --add-data "gui;gui/" --add-data "src/img/*;src/img" --add-data "src/*;src" "main.py"
- name: Package Application
run: |
pyinstaller --noconfirm --onefile --windowed --icon "src\img\icon.ico" --name "CS2.Triggerbot" --version-file "version.txt" --add-data "classes;classes/" --add-data "gui;gui/" --add-data "src/img/*;src/img" --add-data "src/fonts/*;src/fonts" --add-data "src/*;src" "main.py"

- name: Upload Build Artifact
uses: actions/upload-artifact@v4
with:
name: CS2_Triggerbot
path: dist/CS2.Triggerbot.exe
- name: Upload Build Artifact
uses: actions/upload-artifact@v4
with:
name: CS2_Triggerbot
path: dist/CS2.Triggerbot.exe

release:
needs: build
runs-on: ubuntu-latest

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

- name: Download Build Artifact
uses: actions/download-artifact@v4
with:
name: CS2_Triggerbot
path: ./artifact-download

- name: Verify Downloaded Artifact
run: |
echo "Listing artifact-download directory:"
ls -la ./artifact-download
if [ ! -f ./artifact-download/CS2.Triggerbot.exe ]; then
echo "Error: File CS2.Triggerbot.exe not found in artifact-download directory!"
exit 1
fi

- name: Create release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.event.inputs.tag_name }}
name: CS2 TriggerBot - Release ${{ github.event.inputs.tag_name }}
body_path: ./ChangeLog.md
files: |
./artifact-download/CS2.Triggerbot.exe
- name: Checkout code
uses: actions/checkout@v4

- name: Download Build Artifact
uses: actions/download-artifact@v4
with:
name: CS2_Triggerbot
path: ./artifact-download

- name: Verify Downloaded Artifact
run: |
echo "Listing artifact-download directory:"
ls -la ./artifact-download
if [ ! -f ./artifact-download/CS2.Triggerbot.exe ]; then
echo "Error: File CS2.Triggerbot.exe not found in artifact-download directory!"
exit 1
fi

- name: Create release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.event.inputs.tag_name }}
name: CS2 TriggerBot - Release ${{ github.event.inputs.tag_name }}
body_path: ./ChangeLog.md
files: |
./artifact-download/CS2.Triggerbot.exe

- name: Send Telegram Notification
if: success()
run: |
curl -s -X POST https://api.telegram.org/bot${{ secrets.TELEGRAM_BOT_TOKEN }}/sendMessage \
-d chat_id=${{ secrets.TELEGRAM_CHAT_ID }} \
-d text="🎉 New Release: CS2 TriggerBot ${{ github.event.inputs.tag_name }} has been published! Check it out: ${{ github.server_url }}/${{ github.repository }}/releases/tag/${{ github.event.inputs.tag_name }}"

- name: Send Telegram Notification on Failure
if: failure()
run: |
curl -s -X POST https://api.telegram.org/bot${{ secrets.TELEGRAM_BOT_TOKEN }}/sendMessage \
-d chat_id=${{ secrets.TELEGRAM_ADMIN_CHAT_ID }} \
-d text="🚨 Release Failed: CS2 TriggerBot ${{ github.event.inputs.tag_name }}. Check the workflow run: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/gui/__pycache__/
/classes/__pycache__/
/output/
/output/
/dist/
/build/
*.spec
*.bat
/__pycache__/
49 changes: 27 additions & 22 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ Thank you for your interest in contributing to the CS2 TriggerBot project. This

## Table of Contents

* [Code of Conduct](#code-of-conduct)
* [Getting Started](#getting-started)
* [Development Setup](#development-setup)
* [Coding Standards](#coding-standards)
* [Submitting Issues](#submitting-issues)
* [Pull Request Process](#pull-request-process)
* [Feature Requests and Feedback](#feature-requests-and-feedback)
- [Code of Conduct](#code-of-conduct)
- [Getting Started](#getting-started)
- [Development Setup](#development-setup)
- [Coding Standards](#coding-standards)
- [Submitting Issues](#submitting-issues)
- [Pull Request Process](#pull-request-process)
- [Feature Requests and Feedback](#feature-requests-and-feedback)

---

Expand All @@ -27,6 +27,7 @@ By participating in this project, you agree to abide by the [Code of Conduct](CO
git clone https://github.com/Jesewe/cs2-triggerbot.git
cd cs2-triggerbot
```

3. **Add Upstream Remote**: Stay updated with the original repository:

```bash
Expand All @@ -41,6 +42,7 @@ By participating in this project, you agree to abide by the [Code of Conduct](CO
```bash
pip install -r requirements.txt
```

3. **Run the Application**: Launch the application for testing and development:

```bash
Expand All @@ -49,27 +51,27 @@ By participating in this project, you agree to abide by the [Code of Conduct](CO

### Testing Changes

* Execute the application to verify your modifications.
* Review logs at `%LOCALAPPDATA%\Requests\ItsJesewe\crashes\tb_logs.log` for debugging.
- Execute the application to verify your modifications.
- Review logs at `%LOCALAPPDATA%\Requests\ItsJesewe\crashes\tb_logs.log` for debugging.

## Coding Standards

Adhere to the following guidelines for consistency and readability:

* **PEP 8**: Follow the [PEP 8 style guide](https://www.python.org/dev/peps/pep-0008/).
* **Naming**: Use clear, descriptive names for variables, functions, and classes.
* **Error Handling**: Handle exceptions gracefully and log errors appropriately.
* **Documentation**: Comment complex or critical sections to explain intent.
* **Modularity**: Decompose large functions into smaller, reusable units.
- **PEP 8**: Follow the [PEP 8 style guide](https://www.python.org/dev/peps/pep-0008/).
- **Naming**: Use clear, descriptive names for variables, functions, and classes.
- **Error Handling**: Handle exceptions gracefully and log errors appropriately.
- **Documentation**: Comment complex or critical sections to explain intent.
- **Modularity**: Decompose large functions into smaller, reusable units.

### GUI Development

* **customtkinter**: Use `customtkinter` for any enhancements or changes to the graphical interface.
- **customtkinter**: Use `customtkinter` for any enhancements or changes to the graphical interface.

### Logging

* **Format**: Use the `Logger` class format for log entries.
* **Levels**: Apply appropriate log levels (`INFO`, `WARNING`, `ERROR`) based on severity.
- **Format**: Use the `Logger` class format for log entries.
- **Levels**: Apply appropriate log levels (`INFO`, `WARNING`, `ERROR`) based on severity.

## Submitting Issues

Expand All @@ -85,26 +87,29 @@ Before submitting a new issue:
```bash
git checkout -b feature/your-feature
```

2. **Commit Changes**: Ensure each commit message is concise and descriptive:

```bash
git commit -m "Brief description of changes"
```

3. **Push to Fork**:

```bash
git push origin feature/your-feature
```

4. **Open a Pull Request**: On GitHub, submit a PR to the main repository, including:

* Purpose of your changes.
* Potential impact on existing functionality.
* Testing steps and results.
- Purpose of your changes.
- Potential impact on existing functionality.
- Testing steps and results.

### Review Process

* **Code Review**: PRs are reviewed for quality, functionality, and adherence to standards.
* **Feedback**: Address requested changes promptly.
- **Code Review**: PRs are reviewed for quality, functionality, and adherence to standards.
- **Feedback**: Address requested changes promptly.

## Feature Requests and Feedback

Expand Down
19 changes: 15 additions & 4 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
### Summary

- Added `Share/Import Settings` feature to export and import configuration settings via the GUI.
- Added `Reset to Defaults` button in the GUI to restore all settings to their default values.
- Replaced `json` module with `orjson` for improved performance in handling configuration files.
- **A complete rework of all GUI elements**.
- Reworking the logic of binding the triggerbot to the side mouse buttons.
- Moved memory functions into a **MemoryManager** class.
- Moved offset initialization to a **Utility** class.
- Updated trigger_bot.py to use the new **MemoryManager** and **Utility** classes.
- Improved styling.
- Improved logging system.
- Fixed logging system in **"Application Logs"** tab.
- Fixed a bug displaying TriggerBot status in the **"DashBoard"** tab.
- Added Line Limiting Logic.
- Added **"Supporters"** tab.
- Added **"Auto-Update"** Logic.
- Added fonts: **Chivo** and **Gambetta**.
- Redesigned the **"Supporters"** tab.

![Downloads](https://img.shields.io/github/downloads/Jesewe/cs2-triggerbot/v1.2.4.5/total?style=for-the-badge&logo=github&color=D5006D) ![Platforms](https://img.shields.io/badge/platform-Windows-blue?style=for-the-badge&color=D5006D) ![License](https://img.shields.io/github/license/jesewe/cs2-triggerbot?style=for-the-badge&color=D5006D)
![Downloads](https://img.shields.io/github/downloads/Jesewe/cs2-triggerbot/v1.2.5/total?style=for-the-badge&logo=github&color=D5006D) ![Platforms](https://img.shields.io/badge/platform-Windows-blue?style=for-the-badge&color=D5006D) ![License](https://img.shields.io/github/license/jesewe/cs2-triggerbot?style=for-the-badge&color=D5006D)
Loading
Loading