From c958d2f7d76169477a4ca4b4e3a018073b2e0f55 Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Mon, 23 Apr 2018 09:41:07 +0100 Subject: [PATCH] Created Setting up a Windows development environment for rclone (markdown) --- ...dows-development-environment-for-rclone.md | 43 +++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 Setting-up-a-Windows-development-environment-for-rclone.md diff --git a/Setting-up-a-Windows-development-environment-for-rclone.md b/Setting-up-a-Windows-development-environment-for-rclone.md new file mode 100644 index 0000000..c444960 --- /dev/null +++ b/Setting-up-a-Windows-development-environment-for-rclone.md @@ -0,0 +1,43 @@ +Tested on a fresh Windows 2016 Server VM + +From within an interactive powershell session: + +Install [chocolatey](https://chocolatey.org/install) + +``` +Get-ExecutionPolicy # Check it doesn't say restricted +Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) +choco +``` + +Install go, git and libraries needed by rclone + +``` +choco install git +choco install golang +go version +choco install WinFSP +choco install MinGW +[Environment]::SetEnvironmentVariable("CPATH", "C:\Program Files\WinFsp\inc\fuse;C:\Program Files (x86)\WinFsp\inc\fuse", "Machine") +$gopath = go env GOPATH +[Environment]::SetEnvironmentVariable("PATH", $env:PATH + ";" + $gopath + "\bin", "User") +``` + +Logout of powershell and back in to set the environment variables + +Install editor and configure git + +``` +choco install emacs +git config --global user.name "Your Name Goes Here" +git config --global user.email you@example.com +``` + +Compile rclone with mount support + +``` +go get github.com/ncw/rclone +cd .\go\src\github.com\ncw\rclone\ +go install -tags cmount -v +rclone -V +```