-
Notifications
You must be signed in to change notification settings - Fork 338
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
Allow Portable Installs #2556
Allow Portable Installs #2556
Conversation
1a2e74e
to
503f1f7
Compare
I've seen a few people comment that this change would be useful to them, so we should probably review this. |
from what i've checked when writing it, everything that fetches/stores data goes through |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Initial selection should have a way to back out of the current folder
the `RefreshFolders` call on `Update` also broke the return path, so i moved it into RefreshFolders itself
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change mostly works as expected now. Except, we still generate a Player.log in the AppData folder, Unity's idea of the Persistent Path. I'm testing some workarounds, but until we resolve that, I think this PR fails at achieving the goal of not modifying the environment outside the installation
# Conflicts: # Assets/Scripts/Game/UserInterface/FolderBrowser.cs # Assets/Scripts/SettingsManager.cs
I've updated this feature with the new "DaggerfallUnityApplication", so that log files are properly in the portable settings folder. The feature should be good to go. |
Actually, one thing about this feature is that it saves the Daggerfall install and the save/screenshot folders as a relative path. However, I don't think we should do that if those folders are outside the DFU installation. Relative for inner folders is fine, since we want them to relocate if users move those folders. Gonna rework the feature to actually check for that before saving as relative. Note that it's already possible to put your DF installation under StreamingAssets/GameFiles. |
ah, sorry, i didn't take into account that someone might do that 😅 (point it to an outside folder) |
…ded DF install, use the StreamingAssets/GameFiles folder
In addition to the changes described above, I've reverted the changes to the FolderBrowser (and associated changes to ListBox.cs). The change was made with the idea that people would use this to embed their DF install into the DFU installation, but the proper way to do this is to put the DF install in StreamingAssets/GameFiles. There is no reason to make the FolderBrowser behave differently otherwise. I have a test Win64 build here for reviewers, with the Portable.txt file already included. Simply run it, it shouldn't affect your global DFU settings at all. |
I'd really like to get this merged for the v1.1.1 official release soon. I have demo builds you can download, should be really easy to test |
This allows data to be stored in a
PortableAppdata
folder instead of inpersistentDataPath
if an emptyPortable.txt
file is in the same folder as the executable. If the install is portable, it alsoopens the browse window on the exe folder and stores paths as relative in the ini.