-
-
Notifications
You must be signed in to change notification settings - Fork 238
Fix auto start registry path calculation with robust deployment type detection and add comprehensive diagnostics for troubleshooting #552
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
Co-authored-by: TheJoeFin <[email protected]>
@copilot also update the gh actions to run tests on any new PR |
Co-authored-by: TheJoeFin <[email protected]>
@copilot review the code changes and diff now that |
The code changes look excellent and correctly address issue #535. Here's my review: ✅ Bug Fix (ImplementAppOptions.cs)
✅ Test Coverage (StartupTests.cs)
✅ CI Enhancement (buildDev.yml)
Code Quality Notes:
The fix will resolve the "Auto start Text Grab when you login" feature for portable installations. Commit: c519201 |
…rtup path diagnostics Co-authored-by: TheJoeFin <[email protected]>
Added comprehensive bug report feature that incorporates issue #553. The diagnostic export includes startup path details to verify the auto-start fix is working effectively, plus all requested information: settings, install type, Windows version, history, languages, and Tesseract details. Users can now access "Export Bug Report" in Settings → Danger page to generate detailed JSON diagnostics. This will help determine if the startup path changes are effective and provide comprehensive troubleshooting information. Commit: 1f1fc3e |
@copilot look into this failed action and fix it: https://github.com/TheJoeFin/Text-Grab/actions/runs/17362393183/job/49284219256 |
Co-authored-by: TheJoeFin <[email protected]>
Fixed the GitHub Actions workflow. The issue was that the workflow was using .NET 8.0.x while the projects target .NET 9.0. Updated the workflow to use .NET 9.0.x to match the project requirements. Commit: 3ca7d73 |
@copilot
Update that test to be more realistic for a Windows app. Use the \ char between folders like on Windows. |
@TheJoeFin Unfortunately I hit an unexpected error while processing your comment. I've automatically reported this to GitHub. You can ask me to try again later by mentioning me in a new comment. If you want to contact GitHub about this error, please mention the following identifier so they can better serve you: Sorry for the inconvenience! |
…ing Unix/Windows paths Co-authored-by: TheJoeFin <[email protected]>
... Fixed the failing test by updating it to use Windows-style paths consistently. Changed from Unix-style |
@copilot Update the
|
…or different deployment types Co-authored-by: TheJoeFin <[email protected]>
... Updated
The enhanced Commit: 427b945 |
Problem Fixed
The "Auto start Text Grab when you login" setting was not working for unpackaged installations because the Windows registry entry pointed to an incorrect executable path. The bug was in
SetForStartup()
method which usedGetDirectoryName()
of the base directory, pointing to the parent directory instead of the directory containing the executable.Solution Implemented
Environment.ProcessPath
for original executable locationEnvironment.ProcessPath
for edge casesThe enhanced
GetCorrectExecutablePath()
method detects extracted single-file deployments using theDOTNET_BUNDLE_EXTRACT_BASE_DIR
environment variable and provides robust path calculation for all deployment types.Test Coverage
All tests now pass with proper Windows path handling:
StartupPathCalculation_OldVsNewLogic
- Tests bug vs fix using Windows pathsWindowsStartupPathCalculation_OldVsNewLogic
- Windows-specific test scenariosFixedStartupPathCalculation_UsesCorrectBaseDirectory
- Validates fixed logicThe enhanced executable path detection handles multiple deployment scenarios including single-file self-contained deployments and framework-dependent installations. This fix only affects unpackaged builds. Packaged builds use StartupTask API and are unaffected.
Fixes #535. Addresses #553.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.