Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add build instructions #1

Closed
t0stiman opened this issue Apr 7, 2022 · 21 comments
Closed

Add build instructions #1

t0stiman opened this issue Apr 7, 2022 · 21 comments

Comments

@t0stiman
Copy link

t0stiman commented Apr 7, 2022

Some compilation instructions and a list of requirements would be most welcome.

@ghost
Copy link

ghost commented Apr 8, 2022

YES PLS

@sylviiu
Copy link

sylviiu commented Apr 8, 2022

I'm not sure if this is the OFFICIAL way to go about it, but...

gtkcord3's installation process invoked one command: go install -v github.com/diamondburned/gtkcord3@latest

having no knowledge of go, i assumed that it pulled the files from the repository & builds according to the instructions for go in the git repo; i replaced the old URL with this repository's URL (go install -v github.com/diamondburned/gtkcord4@latest) and the process actually started! it's still downloading at the time of writing this, so i'll edit the message if it works.

edit: yup, installed the client perfectly!

clipboard

i will note though that because discord is requiring captchas to log in on a regular basis, your mileage may vary when trying to login using your email / password; i logged using the token method instead

@Animationss
Copy link

Animationss commented Apr 8, 2022

Hmmm...

https://pastebin.com/vQXHV2yF

No clue what happened here...

P.S Using pop os 21.10, I think I didn't install something could I get the commands I needa run?

@poudink
Copy link

poudink commented Apr 10, 2022

it's the exact same as gtkcord3. go install -v github.com/diamondburned/gtkcord4@[commit].
@Animationss I think you might be missing the gtk4 build dependency.

@diamondburned
Copy link
Owner

https://pastebin.com/vQXHV2yF

This is just the compiler being slow. You can wait out for the whole build or you can patch the compiler to make it faster. See golang/go#9887 (comment) for more information.

@diamondburned
Copy link
Owner

diamondburned commented Apr 10, 2022

I'm not sure if this is the OFFICIAL way to go about it, but...

gtkcord3's installation process invoked one command: go install -v github.com/diamondburned/gtkcord3@latest

This is indeed what I'll eventually add onto the README. You can also clone the repository down and run go install within, but this works just fine.

I'll also eventually add a CI that automatically produces binaries for each release, but that's only for when I'm happy with the state of the program.

having no knowledge of go, i assumed that it pulled the files from the repository & builds according to the instructions for go in the git repo

There is actually no custom way to build this project. Most Go projects build the same, and the toolchain handles all the complicated steps. The only additional step here is installing the C dependencies of the program.

@ghost
Copy link

ghost commented Apr 12, 2022

I'm not sure if this is the OFFICIAL way to go about it, but...
gtkcord3's installation process invoked one command: go install -v github.com/diamondburned/gtkcord3@latest

This is indeed what I'll eventually add onto the README. You can also clone the repository down and run go install within, but this works just fine.

I'll also eventually add a CI that automatically produces binaries for each release, but that's only for when I'm happy with the state of the program.

having no knowledge of go, i assumed that it pulled the files from the repository & builds according to the instructions for go in the git repo

There is actually no custom way to build this project. Most Go projects build the same, and the toolchain handles all the complicated steps. The only additional step here is installing the C dependencies of the program.

your fork of go is super fast, It take 8 sec to build

@diamondburned
Copy link
Owner

your fork of go is super fast, It take 8 sec to build

This might just be because you've already built it before, so the time-intensive parts (gotk4) are cached. It will be cached until you update your Go version or I update the dependencies.

@ghost
Copy link

ghost commented Apr 12, 2022

No, the difference is 7 sec to 8 min with the other GO version under the same conditions

@BasicNoob
Copy link

BasicNoob commented Apr 13, 2022

https://pastebin.com/vQXHV2yF

This is just the compiler being slow. You can wait out for the whole build or you can patch the compiler to make it faster. See golang/go#9887 (comment) for more information.

Dont see any proper way to install your fork of go?

@diamondburned
Copy link
Owner

Dont see any proper way to install your fork of go?

There's no "proper way" to install it. It patches over the source code, so use whichever way to do that that your distro recommends.

The way I do it is with a Nix overlay, as written in the bottom comment, but that's only for me (and Nix users).

@TheKrafter
Copy link

I get errors regarding pkg-config when building
This happens both on Pop!_OS 21.10 (amd64), and on Mobian (aarch64).
I don't think I've changed or used pkg-config for anything else since install. It appears that I'm missing some packages:
gobject-introspection-1.0, cairo, cairo-gobject, graphene-gobject-1.0, and graphene-1.0
any ideas of what these packages would be called in the default repos?
I don't build things very often, especially with go. So any help would be appreciated. It might be debian-specific, I'll test on my fedora machine later today.

@diamondburned
Copy link
Owner

any ideas of what these packages would be called in the default repos?

Try these.

@poudink
Copy link

poudink commented Apr 14, 2022

you can generally find the packages you're missing for your distro pretty easily with a package search engine like pkgs.org

@BasicNoob
Copy link

Dont see any proper way to install your fork of go?

There's no "proper way" to install it. It patches over the source code, so use whichever way to do that that your distro recommends.

The way I do it is with a Nix overlay, as written in the bottom comment, but that's only for me (and Nix users).

Noticed Pop os is like the worst distro to build stuff on, Atleast for coding noobs like me. So how would I apply this patch on pop os 21.10

@poudink
Copy link

poudink commented Apr 15, 2022

the nix package manager should be available on any linux distro

@ghost
Copy link

ghost commented Apr 16, 2022

so is there any particular reason why you wouldn't include the go install -v github.com/diamondburned/gtkcord4@latest on the README.md right now?

@diamondburned
Copy link
Owner

so is there any particular reason why you wouldn't include the go install -v github.com/diamondburned/gtkcord4@latest on the README.md right now?

It isn't yet a priority to me.

@ghost
Copy link

ghost commented Apr 17, 2022

So if I were to send a PR with those Instructions added you would merge it?

@diamondburned
Copy link
Owner

So if I were to send a PR with those Instructions added you would merge it?

Yes.

@diamondburned
Copy link
Owner

Closed by #6.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants