akiyosi / goneovim

A GUI frontend for neovim.
MIT License
2.36k stars 59 forks source link

OpenBSD support? #464

Closed anoduck closed 11 months ago

anoduck commented 1 year ago

Was wondering if in the future support for OpenBSD could be implemented, since it really does not like to compile in OpenBSD in its current state. I can only assume it doesn't compile in FreeBSD either.

akiyosi commented 1 year ago

@anoduck No at this time.

FreeBSD could be supported in the future. I have created an experimental artifact for FreeBSD.

https://github.com/akiyosi/goneovim/actions/runs/4915257535

If you are interested, feedback on this experimental deliverable would be greatly appreciated. (I don't know if it works in the first place)

anoduck commented 1 year ago

Sure, FreeBSD is a breeze compared to OpenBSD. I am working on reconfiguring my VNC configuration for my development box at the moment, when I get finished I will install FreeBSD in VirtualBox, and give it a go.

anoduck commented 12 months ago

Ooops... I forgot to do this.

anoduck commented 12 months ago

@akiyosi I have a FreeBSD virtual instance up and ready to roll. Go and qt5 are installed, and $GOPATH is configured. Just like OpenBSD, FreeBSD does not use GnuMake by default, so that was installed.

I wanted to run the build steps with you to make sure I did what I was supposed to do.

  1. git switch freebsd-target - Configured the repo to use the branch that resulted from creation of the artifact.
  2. gmake qt_bindings - resulted in a "Nothing left to do."
  3. gmake deps - resulted in a $HOME/go/bin/qtmoc not found. I looked at the mod.go file and it is not listed as one of the dependencies. I searched for it in the FreeBSD ports, and around for it on github. I did not find anything.

Been a while since I had setup a FreeBSD system from scratch. Nice to know, I still got the touch.

anoduck commented 12 months ago

A few updates from before...

2. `gmake qt_bindings` - resulted in a "Nothing left to do."

I understand now this was supposed to install go's bindings for the QT5 framework. So, I had to install the pkgconf package, export an additional variable export QT_PKG_CONFIG=true and then ran the installation command for the bindings. Which was export GO111MODULE=off; go get -v github.com/therecipe/qt/cmd/... && $(go env GOPATH)/bin/qtsetup test && $(go env GOPATH)/bin/qtsetup -test=false.

It is mostly completed with the installation of the bindings as of now, I do not foresee any other hangups with that part of the build. So, will try to build the deps for goneovim next.

akiyosi commented 12 months ago

@anoduck Hi, thanks for your feedback :) I have created a branch and build procedure for freebsd. I think you can build it this way.

  1. Clone the goneovim repogitory
  2. checkout freebsd-again branch: git checkout freebsd-again
  3. Follow the build steps:

        cd {goneovim directory path}
        yes | sudo pkg install git go pkgconf
        yes | sudo pkg install devel/qt5
        go get github.com/akiyosi/qt/internal/cmd@v0.0.0-20230718095223-7e4e923f23fa
        go get github.com/akiyosi/qt/internal/binding/files/docs/5.12.0
        go get github.com/akiyosi/qt/internal/binding/files/docs/5.13.0
        go get github.com/akiyosi/qt/internal/cmd/moc@v0.0.0-20230718095223-7e4e923f23fa
        go install -v -tags=no_env github.com/akiyosi/qt/cmd/...
        go mod vendor
        git clone https://github.com/akiyosi/env_linux_amd64_513.git vendor/github.com/akiyosi/env_linux_amd64_513
        qtsetup -test=false
        qtmoc desktop ./cmd/goneovim
        go generate
        qtdeploy build freebsd ./cmd/goneovim
anoduck commented 12 months ago

That is pretty cool little trick there, piping "yes" prior to pkg install .... I will have to remember that one.


OK, OK... I got lazy and turned your build instructions into a script. After all, I only had to fill in the goneovim directory.Then Viola.

anoduck commented 11 months ago

@akiyosi I left it compiling. We will have to see what comes of it. It was building the app, so fingers crossed buddy.

anoduck commented 11 months ago

@akiyosi I used one of those official distribution generated virtual images for testing, should have known better, and the build stopped due to exhausted swap space. It came with only 1GB of swap, so I have had to wipe the slate clean and start all over with a fresh install. Doubled the swap this time.

Just an update...

akiyosi commented 11 months ago

@anoduck Thanks for your attempt. Have you had any success with the build since then?

I am also wondering if the binaries generated by Github Actions work. https://github.com/akiyosi/goneovim/actions/runs/6043932753

anoduck commented 11 months ago

Still building. I went through a period of banging my head against the wall, until I remembered to set GO111MODULE=off. Silly anoduck...

If you get a binary built. Get it to me, I will try it.

akiyosi commented 11 months ago

The binaries can be downloaded from the GA build deliverables above.

anoduck commented 11 months ago

Well, shit. Isn't that neato. 😅 Downloaded, and giving it a whirl tomorrow. This duck is bedding down for a few quacks of sleep. 😴

anoduck commented 11 months ago

@akiyosi The github build works without a hitch. Saved me a lot of time waiting for it to compile.

Congratulations, your application now supports FreeBSD. 🎉

For prosperity and in case anyone ever needs it. https://gist.github.com/anoduck/090363ca659777b26169696a107a873a

akiyosi commented 11 months ago

@anoduck Thanks for confirming :D I will officially start working on adding the workflow for the FreeBSD target.