Fix runtime directory creation for Windows installer - #58
Merged
Conversation
- Add get_runtime_dir() function to dynamically determine runtime directory - Use /run/runtime on MSYS2/Cygwin, /var/run/runtime on Linux - Ensure directory exists before writing .env file - Fixes FileNotFoundError when installer runs for the first time - Fix pre-existing pylint warnings (encoding, sys.exit, too-few-public-methods) Co-Authored-By: Thiago Alves <thiagoralves@gmail.com>
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
- Download favicon from autonomylogic.com as openplc.ico - Configure SetupIconFile for installer icon - Add icon to Start Menu and desktop shortcuts - Bundle icon with installation for shortcut references Co-Authored-By: Thiago Alves <thiagoralves@gmail.com>
- Replace favicon with the blue Autonomy logo provided by user - ICO file includes 6 sizes (16x16 to 256x256) for best Windows compatibility Co-Authored-By: Thiago Alves <thiagoralves@gmail.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.
Summary
Fixes the
FileNotFoundError: [Errno 2] No such file or directory: '/var/run/runtime/.env'error that occurs when the Windows installer runs for the first time.The issue was that the runtime directory doesn't exist when the packaged installer runs, unlike manual MSYS2 installations where
install.shcreates it. This PR adds aget_runtime_dir()function that:/run/runtimeon MSYS2/Cygwin,/var/run/runtimeon Linux).envfileAlso fixes pre-existing pylint warnings (encoding, sys.exit, too-few-public-methods).
Updates since last revision
openplc.ico) downloaded from autonomylogic.com faviconSetupIconFile,UninstallDisplayIcon)Review & Testing Checklist for Human
platform.system() != "Linux"which catches ALL non-Linux platforms. Confirm this is the intended behavior for MSYS2 detection/run/runtimeon MSYS2 matches whatinstall.shandstart_openplc.shexpect/var/run/runtime)Recommended test plan:
Notes
Link to Devin run: https://app.devin.ai/sessions/64ffd9e3ddb84cc08e3e414b5296e07d
Requested by: Thiago Alves (@thiagoralves)