gopro-utils icon indicating copy to clipboard operation
gopro-utils copied to clipboard

Instructions to build?

Open delormej opened this issue 7 years ago • 5 comments

As someone new to GO, there doesn't seem to be a build file or instructions on how to build the project? Could you add a section on build instructions? Thank you!

delormej avatar Jun 13 '18 04:06 delormej

I'll do a PR on the man page, but here's what I found to work for me (on Linux/Mac):

  1. Install Go (https://golang.org/doc/install)
  2. Create a directory $HOME/go/src/github.com/stilldavid/
  3. Clone the repo into the dir created in #2
  4. export GOPATH=$HOME/go
  5. go get github.com/stilldavid/gopro-utils/bin/gopro2json
  6. go install github.com/stilldavid/gopro-utils/bin/gopro2json

delormej avatar Jun 15 '18 14:06 delormej

I'm having an issue when I do this (working on windows)

When I do step 5, it says:

can't` query specific version for package github.com/stilldavid/gopro-utils/bin/gopro2json in the main module

If I try to ignore that and go to step 6, i get :

    go: inconsistent vendoring in C:\Go\src:
            go.mod requires github.com/paulmach/go.geo v0.0.0-20180829195134-22b514266d33 but vendor/modules.txt does not include it.
    run 'go mod tidy; go mod vendor' to sync

Any idea why I can't build/install this? I know nothing about using Go or these functions, thank you!

Also, running 'go mod tidy; go mod vendor' (either of them) will return

      go: github.com/paulmach/go.geo/go.geo-master: looping trying to add package

Nothing changes if return to step 5 or 6 at this point. I'm brand new to this, I'm not sure how to fix this

MSM-Mystery avatar Sep 09 '19 21:09 MSM-Mystery

These install instructions are not working for me. After step 6 I can not just run gopro2json from the command line. I am on a Mac.

Does anyone have updated build and run instructions?

kevinlieb avatar Jan 04 '22 01:01 kevinlieb

kk:Go kris$ find . -ls
9413857        0 drwxr-xr-x    4 kris             staff                 128 Sep 22 15:14 .
67901209        0 drwxr-xr-x    2 kris             staff                  64 Sep 22 15:16 ./bin
9427751        0 drwxr-xr-x    2 kris             staff                  64 Sep 22 15:16 ./pkg
kk:Go kris$ echo $GOPATH
/Users/kris/Go
kk:Go kris$ go install github.com/stilldavid/gopro-utils/bin/gopro2json@latest
go: downloading github.com/stilldavid/gopro-utils v0.0.0-20190102034544-f0186d2edd34
go: finding module for package github.com/paulmach/go.geo
go: downloading github.com/paulmach/go.geo v0.0.0-20180829195134-22b514266d33
go: found github.com/paulmach/go.geo in github.com/paulmach/go.geo v0.0.0-20180829195134-22b514266d33
go: finding module for package github.com/paulmach/go.geojson
go: downloading github.com/paulmach/go.geojson v1.5.0
go: found github.com/paulmach/go.geojson in github.com/paulmach/go.geojson v1.5.0
kk:Go kris$ file bin/gopro2json
bin/gopro2json: Mach-O 64-bit executable arm64
kk:Go kris$ bin/gopro2json
Usage of bin/gopro2json:
  -i string
    	Required: telemetry file to read
  -o string
    	Required: json file to write

That is,

  • mkdir $HOME/Go
  • export GOPATH=$HOME/Go
  • mkdir $GOPATH/{bin,pkg}
  • go install github.com/stilldavid/gopro-utils/bin/gopro2json@latest

and you are done. Go made multiple incompatible changes on how it uses $GOPATH, but that made it actually easier.

isotopp avatar Sep 22 '23 13:09 isotopp