Anonymous | Login | Signup for a new account | 2025-06-15 13:30 UTC | ![]() |
My View | View Issues | Change Log | Roadmap | All Projects Issue Support Ranking | Rules | My Account |
View Revisions: Issue #3354 | [ All Revisions ] [ Back to Issue ] | ||
Summary | 0003354: Portable mode is portable in name only. | ||
Revision | 2017-12-11 16:49 by Zalewa | ||
Description | The '--portable' mode is really a '--stick-config-files-next-to-exe' mode. The idea of '--portable' is to put the app on a USB stick and take it with you anywhere. However, when you look at config files, you will notice that it saves absolute paths everywhere when it spawns the config files. If your Windows loads the USB under the letter "G:\", the .ini will contain paths "G:\Doomseeker\.doomseeker\". Then you take the stick with you somewhere, and it gets mounted as "F:\" - nothing works because all paths are invalid now. This is similar to 0003262 where user home dir is not saved as $HOME or ~. The proposed fix is to create a place-holder token that can be used when configuring various paths and this token will always resolve to the current "dir-with-executable" path. Propositions for such token:
We should come up with something that has minimal chance of colliding with actual OS path but also won't be too cumbersome and won't be QString::replaced() incorrectly and won't potentially collide with env vars that could also be expanded in the same way. For example, EAGLE uses "$EAGLEDIR" as a placeholder. |
||
Revision | 2017-12-11 16:48 by Zalewa | ||
Description | The '--portable' mode is really a '--stick-config-files-next-to-exe' mode. The idea of '--portable' is to put the app on a USB stick and take it with you anywhere. However, when you look at config files, you will notice that it saves absolute paths everywhere when it spawns the config files. If your Windows loads the USB under the letter "G:\", the .ini will contain paths "G:\Doomseeker\.doomseeker\". Then you take the stick with you somewhere, and it gets mounted as "F:\" - nothing works because all paths are invalid now. This is similar to 0003262 where user home dir is not saved as $HOME or ~. The proposed fix is to create a place-holder token that can be used when configuring various paths and this token will always resolve to the current "dir-with-executable" path. Propositions for such token:
We should come up with something that has minimal chance of colliding with actual OS path but also won't be too cumbersome and won't be QString::replaced() incorrectly and won't potentially collide with env vars that could also be expanded in the same way. For example, EAGLE uses "$EAGLEDIR" as a placeholder. |
Copyright © 2000 - 2025 MantisBT Team |