Windows Build Instructions

Here’s what I was able to get to build a windows binary. Note the following, however:

  • I’ve never used Go before, and I’m sure I made many silly/rookie mistakes
  • I don’t have the GIT binary installed on my Windows PC
  • I have very little GIT experience
  • the rclone.exe file that was created was 25MB vs the download exe of 14MB file

If you’re still reading this…

  • download/install the Go compiler from:
    https://golang.org/doc/install?download=go1.9.2.windows-amd64.msi

  • create a GoLang directory/folder and the subdirs/folders bin, pkg, and src in the GoLang dir/folder:
    + golang
    | + bin
    | + pkg
    | + src

  • download the rclone source from
    https://github.com/ncw/rclone/archive/v1.38.zip

  • unpack this zip into the src subdir/subfolder

  • (Note - the following is probably my biggest assumption/error.)
    Because I think I have all of the 1.38 source, and do not have a git binary, create the new folder:
    GoLang\src\rclone-1.38\vendor\github.com\ncw\rclone

  • move the 25 dirs/folders from rclone-1.38 to this new "vendor\github.com\ncw\rclone" subdir
    amazonclouddrive
    azureblob
    b2
    box
    cmd
    crypt
    dircache
    drive
    dropbox
    fs
    fstest
    ftp
    googlecloudstorage
    http
    hubic
    local
    oauthutil
    onedrive
    pacer
    qingstor
    rest
    s3
    sftp
    swift
    yandex

  • open a cmd window and switch to it

  • set the GOPATH environment variable to the GoLang directory, such as:
    SET GOPATH="C:\Pg1\Temp\GoLang"

  • switch to the rclone directory:
    cd /d c:\pg1\temp\GoLang\src\rclone1-38

  • build rclone via:
    go build