FreeTube icon indicating copy to clipboard operation
FreeTube copied to clipboard

Add new setting for storing user data inside app folder for windows

Open PikachuEXE opened this issue 6 months ago • 15 comments

Pull Request Type

  • [ ] Bugfix
  • [x] Feature Implementation
  • [ ] Documentation
  • [ ] Other

Related issue

https://github.com/FreeTubeApp/FreeTube/issues/746

Description

It's common for a portable app to store user data (settings and other data files)

https://portableapps.com/about/what_is_a_portable_app#definition

A portable app is a computer program that doesn't need to be installed into Windows like traditional apps so you can carry it with you on a portable device or synced cloud folder and use on any Windows computer. When your USB flash drive, portable hard drive, or other portable device is plugged in or your cloud drive is synced, you have access to your software and personal data just as you would on your own PC. And when you unplug the device, none of your personal data is left behind.

Screenshots

image

Testing

** Backup data before testing ** Suggest to test with non dev version to be accurate (I have never tested this with dev on windows) Custom build: https://github.com/PikachuEXE/FreeTube/actions/runs/15481269896

A1. Windows - 7z/zip version

  • Open app
  • Ensure all data like subscribed channels/profiles, sub cache, playlist, settings, etc. are still present
  • Ensure new setting DOES appear and disabled
  • Turn OFF Replace HTTP Cache (for later special setting sync test)
  • Close app
  • Create folder userData under the app folder (if you want to test auto folder creation you can do that later) e.g. if executable is at C:\FreeTube\Freetube.exe, create C:\FreeTube\userData
  • Create empty file experiment-replace-http-cache inside that folder (which should be absent when Replace HTTP Cache disabled)
  • Open app, turn ON new setting
  • Ensure all data like subscribed channels/profiles, sub cache, playlist, settings, etc. are still present
  • Ensure Replace HTTP Cache still OFF (and empty file experiment-replace-http-cache is gone)
  • Ensure data files (*.db) now present in new userData folder in app folder
  • Turn ON Replace HTTP Cache
  • Ensure no empty file experiment-replace-http-cache present in default user data folder
  • Optionally do some updates and ensure only files in app folder updated not those in default folder
  • DELETE data files in default user data folder
  • Turn OFF new setting
  • Ensure all data like subscribed channels/profiles, sub cache, playlist, settings, etc. are still present
  • Ensure Replace HTTP Cache still ON
  • Ensure data files now present in default userData folder (%APPDATA%\FreeTube, see https://www.electronjs.org/docs/latest/api/app#appgetpathname)

A2. Windows - portable version (single executable) Similar to A1 but userData folder and new flag file are both in the same folder as the portable executable file

A3. Windows - NSIS installer version

  • Install to a new folder
  • Ensure all data like subscribed channels/profiles, sub cache, playlist, settings, etc. are still present
  • Ensure new setting does NOT appear

B. Non windows (macOS/Linux)

  • Open app
  • Ensure all data like subscribed channels/profiles, sub cache, playlist, settings, etc. are still present
  • Ensure new setting does NOT appear

Desktop

  • OS:
  • OS Version:
  • FreeTube version:

Additional context

PikachuEXE avatar Jun 04 '25 01:06 PikachuEXE

Ya also this doesn't work with portable version I admit I have never thought about those 2 versions coz I have never used/tried them (as a user) Marking as WIP

PikachuEXE avatar Jun 04 '25 08:06 PikachuEXE

Updated for portable version and NSIS installer version, custom build updated

PikachuEXE avatar Jun 05 '25 03:06 PikachuEXE

Not sure patching the installer is the right approach. I think if we add this, it should only be available in the portable version/zip files, as it doesn't make much sense to show and allow it with the installer version, as the installer is inherently not portable and the entire point of this is to make FreeTube more portable.

absidue avatar Jun 05 '25 22:06 absidue

Updated installer version (by detecting the existence of uninstaller executable) to have new setting hidden and disabled (even with flag file created)

PikachuEXE avatar Jun 06 '25 03:06 PikachuEXE

This PR is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 14 days.

github-actions[bot] avatar Jun 21 '25 02:06 github-actions[bot]

This PR is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 14 days.

github-actions[bot] avatar Jul 08 '25 02:07 github-actions[bot]

This PR is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 14 days.

github-actions[bot] avatar Jul 23 '25 02:07 github-actions[bot]

This PR is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 14 days.

github-actions[bot] avatar Aug 20 '25 02:08 github-actions[bot]

This PR is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 14 days.

github-actions[bot] avatar Sep 04 '25 01:09 github-actions[bot]

This PR is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 14 days.

github-actions[bot] avatar Sep 19 '25 02:09 github-actions[bot]

This PR is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 14 days.

github-actions[bot] avatar Oct 04 '25 01:10 github-actions[bot]

This PR is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 14 days.

github-actions[bot] avatar Oct 19 '25 02:10 github-actions[bot]

This PR is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 14 days.

github-actions[bot] avatar Nov 03 '25 02:11 github-actions[bot]

This PR is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 14 days.

github-actions[bot] avatar Nov 18 '25 02:11 github-actions[bot]

This PR is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 14 days.

github-actions[bot] avatar Dec 03 '25 02:12 github-actions[bot]