Add application icon support and update build configuration#31
Merged
duartebarbosadev merged 8 commits intomainfrom Sep 3, 2025
Merged
Add application icon support and update build configuration#31duartebarbosadev merged 8 commits intomainfrom
duartebarbosadev merged 8 commits intomainfrom
Conversation
…implementation and enhance functionality
Contributor
There was a problem hiding this comment.
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.icoinstead ofbuild/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 |
There was a problem hiding this comment.
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.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
_set_windows_app_id,_resolve_app_icon_path, andapply_app_identityinsrc/main.pyto explicitly set the Windows AppUserModelID and consistently apply the app icon in both development and packaged (PyInstaller) environments. (src/main.py)apply_app_identity, ensuring the app icon and Windows identity are set when launching the main window. (src/main.py)QIconfromPyQt6.QtGuito support icon handling. (src/main.py)Build and packaging improvements:
.github/workflows/release-build.ymlto useassets/app_icon.icoinstead ofbuild/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]