-
Notifications
You must be signed in to change notification settings - Fork 899
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
Store data and settings in portable directory with portable version #746
Comments
You can use FreeTubePortable as a workaround. Its deal also with the registry strings. |
Correct, that is why I think the portable version should NOT use the registry settings. It should keep the data within the portable directory. |
I'm using the portable version. It is saving to: One of the bigger problems I have is I run the portable version from a network share. The portable version isn't using the network share. |
@snakyjake1 I make some tests and:
In the next release I will change the |
Is it possible to add a config variable to place the configuration in a user specified location and not %AppData%..... not matter where it is run from? This was my original post subject. |
At the moment, the data path is hardcoded as the path Electron uses by default |
I found this code https://github.com/getferdi/ferdi/blob/develop/src/index.js#L13:L23 And modified the ...
import Datastore from 'nedb'
const path = require('path')
// Set app directory before loading user modules
if (process.env.FREETUBE_APPDATA_DIR != null) {
app.setPath('appData', process.env.FREETUBE_APPDATA_DIR)
app.setPath('userData', path.join(app.getPath('appData')))
} else if (process.env.PORTABLE_EXECUTABLE_DIR != null) {
app.setPath('appData', process.env.PORTABLE_EXECUTABLE_DIR, `${app.name}AppData`)
app.setPath('userData', path.join(app.getPath('appData'), `${app.name}AppData`))
} else if (process.platform === 'win32') {
app.setPath('appData', process.env.APPDATA)
app.setPath('userData', path.join(app.getPath('appData'), app.name))
}
require('electron-context-menu')({
... I move the With the environment Please note that I'm not a programmer. I hope this code will help to created trully portable FreeTube. |
Hi, so thanks for checking on this. It'd be great if you could create a Draft Pull Request for any code changes for this issue. Then it is easier to discuss and direct any necessary changes :) |
This comment was marked as off-topic.
This comment was marked as off-topic.
Adding a I will add this argument to the next release of FreeTube in PA.com format. |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
https://github.com/deltachat/deltachat-desktop is also Electron based and has a working portable variant so I guess everything needed should be in it's source code. |
On Windows, I ended up simply symlinking (via hard link, directory junction or whatever they call it) the local folder to appdata.: mklink /J c:\Users\user\AppData\Roaming\FreeTube d:\Soft\FreeTube\data (with Which produces something like And now I have a folder-link in AppData (I can safely delete that link too, without damaging the And, most important, the privacy redirect and freetube:// protocol working fine (could not find an easy way to provide arguments to freetube:// protocol) |
It seems that the portable version store its settings and data within the AppData folder structure in Windows.
For a portable application, the data and settings should reside within the application's directory.
The text was updated successfully, but these errors were encountered: