Best way to set this up is to install opam (the ocaml package manager) For the current (2024-06-23) version of googledrive ocaml fuse (0.7.32), you can't use the latest version of opam because it uses old packages.
- Install opam first (opam - Install)
sudo bash -c "sh <(curl -fsSL https://raw.githubusercontent.com/ocaml/opam/master/shell/install.sh)"
Then run
opam init
opam update
If you simply install the googledrive-ocaml-fuse package like that, it will complain that gapi-ocaml 0.4.5
can't be installed because It seems to be for an older version of OCaml.
So activate the older version of ocaml by
opam switch create 4.08.0
The requirement on the github page is ocaml >= 4.02.3
but 4.02.3 is way too old, and when you try to switch, it will complain of The compilation of ocaml-base-compiler.4.02.3 failed at "make world.opt".
After it become successful, do
opam init
opam update
opam install google-drive-ocamlfuse
-
Set up a blank project, and set up OAuth2.0 (Setting up OAuth 2.0 - Google Cloud Platform Console Help)
-
Add Google Drive API to it (Enabling and Disabling Services | Service Usage Documentation | Google Cloud)
-
On the OAuth consent screen, add dummy privacy policy, terms etc. I read that's what's required for approval(?)
-
Then in the "Scope" tab, after the OAuth consent screen, add all the Googledrive API rows
-
Also add yourself as the test user
You're all set!
Finally run
google-drive-ocamlfuse -id 12345678.apps.googleusercontent.com -secret abcde12345
To set up the Googledrive sync!