beaker icon indicating copy to clipboard operation
beaker copied to clipboard

Portable Version

Open markstinson opened this issue 5 years ago • 3 comments

Operation System: Windows Beaker version: All

With a FOSS perspective, it would make sense to offer Beaker Browser in a Portable Application so folks could run it from a thumb drive (and keep its various files contained to specific directory.

Could it be packaged as a portable "installer" as well please?

markstinson avatar Apr 24 '19 00:04 markstinson

Added to our feature requests. We'll see if I can find the time for something like this.

pfrazee avatar Apr 26 '19 16:04 pfrazee

Fyi, a portable version of Beaker Browser is available through Portapps ;)

crazy-max avatar Jul 27 '19 15:07 crazy-max

Observations from testing and reading source:

Installation: The installer .exe seems like an NSIS installer. By extracting it with 7zip (7z x .\beaker-browser-setup-1.1.0.exe -obeaker), we get $PLUGINSDIR dir inside beaker dir, containing app-64.7z, which is a normal 7zip archive containing the installed files. So, although hacky, it is currently possible to get Beaker as an archive without running the .exe installer.

Ideally, this archive would be provided directly (.zip would probably be better for compatibility, but .7z is imo also ok, and it has better compression).

Running: https://github.com/beakerbrowser/beaker/blob/master/app/main.js#L51 By setting BEAKER_USER_DATA_PATH, we can tell Beaker where to store data. This works quite well, except for 2 things:

  1. the Dictionaries directory, which is an electron/chromium bug: https://github.com/electron/electron/issues/26039

  2. $HOME/.hyperdrive directory, which seems unaffected by the environment variable; this looks a bit like a bug, as the path is passed to hyperdrive, but not used: passed to hyper.setup: https://github.com/beakerbrowser/beaker/blob/master/app/main.js#L119 passed to drives.setup: https://github.com/beakerbrowser/beaker/blob/master/app/bg/hyper/index.js#L15 ignored in the actual drives.setup fn: https://github.com/beakerbrowser/beaker/blob/master/app/bg/hyper/drives.js#L53

Instead, a constant HYPERDRIVE_STORAGE_DIR is used: https://github.com/beakerbrowser/beaker/blob/master/app/bg/hyper/daemon.js#L19 This could be fixed by forwarding the userData path passed to drives.setup and using it instead of os.homedir(). I could try making a PR for this, but this seems like the type of issue where it might be faster for devs to fix it themselves than haggle over an external PR. (also, there would probably need to be some migration code which checks for an existing .hyperdrive directory, which I don't feel qualified to write :) )

With the 1st issue fixed upstream, and 2nd issue fixed by Beaker devs (@pfrazee ?), it should be fairly trivial to make Beaker portable by extracting an archive and creating a small launcher script that sets the environment variable and then launches Beaker Browser.exe.

MatejKafka avatar Apr 05 '21 19:04 MatejKafka