edge-frfox icon indicating copy to clipboard operation
edge-frfox copied to clipboard

create install script

Open DanielSGH opened this issue 2 years ago • 8 comments

  • [x] Check if firefox and git are installed
  • [x] Clone repo
  • [x] Move chrome folder to profile folder root and change about:config prefs
  • [x] Detect profile folder automatically (deducted from files in mozilla/firefox)
  • [x] Add option to uninstall
  • [x] Add support for windows
  • [x] Options for recommended settings (may do in separate PR)

Designed to make the installation a lot simpler, by just using curl to execute the script

DanielSGH avatar Feb 09 '23 21:02 DanielSGH

Might require testing on MacOS, will probably do a Windows .ps1 script later

DanielSGH avatar Feb 11 '23 01:02 DanielSGH

@bmFtZQ This is probably all I'll do for now, let me know what you think

Check out https://github.com/bmFtZQ/edge-frfox/issues/82#issue-1580553602 to see how it looks installing on linux, there is also the uninstall feature which I've not shown in that video clip, but you can verify it or I can show you somehow

DanielSGH avatar Feb 17 '23 00:02 DanielSGH

I added a better way to uninstall, which preserves the user's user.js in case they want to keep it but removes only the custom settings added by the script if the user wishes.

I've also done everything you suggested above, let me know if there's anything you'd change.

I've also updated the README.md accordingly.

DanielSGH avatar Dec 27 '23 01:12 DanielSGH

@bmFtZQ

Also with the user.js file, if running the script again after installing it, duplicate values will be added to the user.js file as Firefox will never edit user.js. When Firefox is opened, it sets the preferences found in user.js. Removing them from the user.js file later does not remove the preferences from Firefox as they have already been set previously.

The preferences that firefox sets are found in prefs.js, which means they can easily be removed (which sets them to default) provided firefox is closed. Of course, this would mean we also remove the prefs in user.js, because we don't want to set them again.

TL;DR change nothing about how it's currently being installed, but on uninstall, remove prefs in user.js and prefs.js.

The option is there, let me know if you prefer that instead.

DanielSGH avatar Dec 29 '23 22:12 DanielSGH

The preferences that firefox sets are found in prefs.js, which means they can easily be removed (which sets them to default) provided firefox is closed. Of course, this would mean we also remove the prefs in user.js, because we don't want to set them again.

TL;DR change nothing about how it's currently being installed, but on uninstall, remove prefs in user.js and prefs.js.

The option is there, let me know if you prefer that instead.

When uninstalling I think removing the preferences should be optional and the script could prompt the user with something like this:

Reset preferences to default values in 'prefs.js' and 'user.js'? [y/N]

Then also create a backup of the existing files before starting (create a copy with .bak added to the end of the filename).

When installing, maybe the script can look in the user.js file for existing preferences and only set the preferences that are needed.

If someone's existing user.js file looked like this:

user_pref("toolkit.legacyUserProfileCustomizations.stylesheets", true);
user_pref("layout.css.color-mix.enabled", true);
user_pref("layout.css.light-dark.enabled", true);

then only user_pref("svg.context-properties.content.enabled", true); would need to be added to the file.

bmFtZQ avatar Dec 30 '23 04:12 bmFtZQ

Happy New Year!

DanielSGH avatar Dec 31 '23 23:12 DanielSGH

Happy new year!

bmFtZQ avatar Jan 01 '24 02:01 bmFtZQ

@bmFtZQ PR is ready to merge unless you want anything else changed.

DanielSGH avatar Jan 09 '24 20:01 DanielSGH