Fix/output path standalone app#23
Merged
Merged
Conversation
…on-logic スタンドアロン/開発実行での output ディレクトリ解決を一元化
…alone-app Prefer portable output directory in standalone builds (スタンドアロン版でポータブル出力ディレクトリを優先)
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 introduces a utility module to centralize and robustly handle output directory paths, ensuring that all exported files are saved in user-writable locations across both development and standalone (frozen) builds. The refactor replaces hardcoded output paths throughout the codebase with this new logic, improving portability and reliability.
Centralized output path handling:
src/leaf_contour_efd/utils/paths.py, which providesget_output_dirand related helpers to determine a writable output directory, preferring a location near the app/executable for standalone builds and falling back to the OS user data directory if necessary.Refactored widgets to use new output path logic:
binarize_image.py,calculate_efd.py,clear_viewer.py,crop_rectangle.py,extract_contour.py,rotate_image.py) to useget_output_dirinstead of hardcoded"output/..."paths for saving results. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12]Documentation updates:
README.mdandREADME_ja.mdto explain the new output directory behavior for standalone builds, clarifying the fallback mechanism for non-writable locations. [1] [2]