Skip to content

Add application icon support and update build configuration#31

Merged
duartebarbosadev merged 8 commits intomainfrom
feat-app-icon
Sep 3, 2025
Merged

Add application icon support and update build configuration#31
duartebarbosadev merged 8 commits intomainfrom
feat-app-icon

Conversation

@duartebarbosadev
Copy link
Copy Markdown
Owner

This pull request improves how the application's icon is handled and displayed, especially for Windows users, and updates the build configuration to ensure the icon is correctly bundled and referenced. The main changes include new helper functions for setting the app icon and Windows AppUserModelID, and updates to the build workflow to use the correct icon file.

App identity and icon handling:

  • Added helper functions _set_windows_app_id, _resolve_app_icon_path, and apply_app_identity in src/main.py to explicitly set the Windows AppUserModelID and consistently apply the app icon in both development and packaged (PyInstaller) environments. (src/main.py)
  • Updated the main application startup to call apply_app_identity, ensuring the app icon and Windows identity are set when launching the main window. (src/main.py)
  • Imported QIcon from PyQt6.QtGui to support icon handling. (src/main.py)

Build and packaging improvements:

  • Changed the PyInstaller build configuration in .github/workflows/release-build.yml to use assets/app_icon.ico instead of build/icons/photosort.ico, and added the icon file to the bundled data for both Windows and macOS builds. (.github/workflows/release-build.yml) [1] [2]

@duartebarbosadev duartebarbosadev marked this pull request as ready for review September 3, 2025 21:13
Copilot AI review requested due to automatic review settings September 3, 2025 21:13

This comment was marked as outdated.

This comment was marked as outdated.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request improves application icon handling and Windows identity management while updating the build configuration to use the correct icon assets.

  • Added helper functions for setting Windows AppUserModelID and resolving icon paths in development vs. packaged environments
  • Updated PyInstaller build configuration to use the correct icon file path (assets/app_icon.ico instead of build/icons/photosort.ico)
  • Enhanced test coverage for the release notes generator with sanitization and SHA linking functionality

Reviewed Changes

Copilot reviewed 5 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/main.py Added Windows identity helpers and icon resolution functions with application startup integration
.github/workflows/release-build.yml Updated build workflow to use correct icon paths and bundle icon assets
tests/test_release_notes_generator.py Expanded test coverage with improved structure and new sanitization tests
.github/scripts/generate_release_notes.py Enhanced release notes generation with SHA sanitization and linking capabilities
RELEASE_NOTES_GENERATOR.md Removed documentation file (likely consolidated elsewhere)

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

func.argtypes = [ctypes.c_wchar_p]
func.restype = ctypes.c_long # HRESULT
hr = func(app_id)
if hr != 0: # S_OK == 0
Copy link

Copilot AI Sep 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment 'S_OK == 0' should use the actual constant value or a more descriptive explanation. Consider defining S_OK = 0 as a constant or expanding the comment to explain what this HRESULT value represents.

Copilot uses AI. Check for mistakes.
duartebarbosadev and others added 3 commits September 3, 2025 23:59
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@duartebarbosadev duartebarbosadev merged commit 7873a07 into main Sep 3, 2025
3 checks passed
@duartebarbosadev duartebarbosadev deleted the feat-app-icon branch September 3, 2025 23:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants