Skip to content
This repository has been archived by the owner on Jun 8, 2021. It is now read-only.

Fix GTK for Windows links in README #218

Merged
merged 2 commits into from
Jan 2, 2016

Conversation

rnestler
Copy link
Contributor

@rnestler rnestler commented Jan 2, 2016

Fixes issue #216

@@ -32,7 +32,7 @@ __gtk__ expects __GTK+__, __GLib__ and __Cairo__ development files to be install
### Windows

Install [mingw-w64](http://mingw-w64.yaxm.org/) (select the win32 threading model) and download a __GTK+__ SDK:
* The GNOME project has an official distribution of GTK+ 3.6: [x86](http://www.gtk.org/download/win32.php), [x64](http://www.gtk.org/download/win64.php).
* The GNOME project has official distributions of GTK+ 3.4 upto 3.10: http://win32builder.gnome.org/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer if the link was put "inside" "3.4 upto 3.10". Example:

The GNOME project has official distributions of GTK+ 3.4 upto 3.10.

In second thought it seems a bit weird... What form do you prefer @gkoz?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about "The GNOME project has official distributions of GTK+ 3.4 upto 3.10" ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh perfect!

@GuillaumeGomez
Copy link
Member

Thanks! Once we confirmed my note, I'll merge.

@rnestler rnestler force-pushed the fix_gtk_on_windows_links branch from 68d4845 to bf38259 Compare January 2, 2016 15:39
@rnestler
Copy link
Contributor Author

rnestler commented Jan 2, 2016

OK I updated the PR like we discussed, should be ready to merge.

@GuillaumeGomez
Copy link
Member

Didn't you want to add a howto as well ?

@rnestler
Copy link
Contributor Author

rnestler commented Jan 2, 2016

Ah sorry, didn't see your comment on #216 until now. Yeah I can do it in this PR as well.

@GuillaumeGomez
Copy link
Member

Then ping me when it's done please, github doesn't notify when a PR has been updated.

@rnestler rnestler force-pushed the fix_gtk_on_windows_links branch from a3083db to e08165e Compare January 2, 2016 19:23
@rnestler
Copy link
Contributor Author

rnestler commented Jan 2, 2016

OK I added a first version of the HowTo. A few points to note:

  • Should we keep the old instructions or should I just remove them?
  • I only tested in a 32Bit Windows VM but wrote the HowTo for 64Bit since I guessed it's more common.
  • I also added a note about installing rust for the GNU ABI and not installing "Linker and plattform libraries".

![Screenshot](rust_setup.png)

If you're not sure, check if your Rust installation has `gcc.exe` and `ld.exe`
in its `bin` directory, you may get a linking error `ld: cannot find -limm32`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sentence seems slightly broken now. And I think it's now safe to say that the presence of those files will definitely cause the error.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes you're right. Will fix that.

@gkoz
Copy link
Member

gkoz commented Jan 2, 2016

Should we keep the old instructions or should I just remove them?

It makes sense to remove them but maybe later after we have some feedback about the msys2 way.

I only tested in a 32Bit Windows VM but wrote the HowTo for 64Bit since I guessed it's more common.

I can test this on 64-bit later. BTW you don't need a local VM, appveyor allows rdp access.


#### 1. msys2 toolchain

This method is recommended according to the [gtk project]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gtk should probably be spelled GTK+ here.

@rnestler
Copy link
Contributor Author

rnestler commented Jan 2, 2016

I can test this on 64-bit later. BTW you don't need a local VM, appveyor allows rdp access.

Ah that's awesome I didn't now that! 😄 This can save me a lot of time while trying to get this to build with AppVeyor!

@rnestler
Copy link
Contributor Author

rnestler commented Jan 2, 2016

@gkoz I tried to address all your points. Tell me if I should squash the commits or if there are any other issues.

@GuillaumeGomez
Copy link
Member

Please keep the first commit and squash other in the second one please.

@rnestler rnestler force-pushed the fix_gtk_on_windows_links branch from 18b6281 to a6bd09a Compare January 2, 2016 22:49
@rnestler
Copy link
Contributor Author

rnestler commented Jan 2, 2016

@GuillaumeGomez Squashed it. Is it OK like that?

@GuillaumeGomez
Copy link
Member

@rnestler: Perfect! But it's @gkoz who will merge when he thinks everything's ok.

@gkoz
Copy link
Member

gkoz commented Jan 2, 2016

Some grammar nits...

"Linker and platform libraries" in the Rust setup.
![Screenshot](rust_setup.png)

If you already installed Rust, check if your Rust installation has `gcc.exe`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"If you already have installed"

@rnestler
Copy link
Contributor Author

rnestler commented Jan 2, 2016

Some grammar nits...

Yeah sorry about that. I'm not a native english speaker and my grammar is poor 😢

![Screenshot](rust_setup.png)

If you already installed Rust, check if your Rust installation has `gcc.exe`
and `ld.exe` in its `bin` directory. In that case remove those executables,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

" In" -> " In"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume you mean I should remove the double space? That's actually my vim setup auto formatting the sentences with two spaces after the period.

$ pacman -S mingw-w64-x86_64-toolchain
```
- Install the gtk3 package
```
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add an empty line before "```".

@rnestler rnestler force-pushed the fix_gtk_on_windows_links branch 2 times, most recently from e8ca0c0 to b16afdd Compare January 2, 2016 23:46
@gkoz
Copy link
Member

gkoz commented Jan 2, 2016

Looks good 👍

or follow these steps:

- Install and update [msys2](https://msys2.github.io/)
- Install the mingw toolchain
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add ":" at the end of this sentence.

@GuillaumeGomez
Copy link
Member

Seems good to me too. Once you have fixed my last notes, we merge.

Explain how to install the msys2 toolchain as an alternative to using
wingw-w64 with a GTK distribution.  Also add a note about how to
correctly install Rust so there is no conflict with the linker provided
by rust.
@rnestler rnestler force-pushed the fix_gtk_on_windows_links branch from b16afdd to 1a58951 Compare January 2, 2016 23:52
@rnestler
Copy link
Contributor Author

rnestler commented Jan 2, 2016

@GuillaumeGomez Done :)

@GuillaumeGomez
Copy link
Member

Thanks a lot for your contribution @rnestler! I merge.

GuillaumeGomez added a commit that referenced this pull request Jan 2, 2016
@GuillaumeGomez GuillaumeGomez merged commit e067474 into gtk-rs:master Jan 2, 2016
@rnestler
Copy link
Contributor Author

rnestler commented Jan 2, 2016

Happy to help! Thanks for your work on gtk-rs!

@rnestler rnestler deleted the fix_gtk_on_windows_links branch January 2, 2016 23:58
- Install the mingw toolchain:

```Shell
$ pacman -S mingw-w64-x86_64-toolchain
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this actually work? I've tried this in appveyor and it didn't because the msys2 mingw is incorrect flavor, it's not win32+dwarf/seh. I ended up using mingw-builds, the installer linked at http://mingw-w64.org/doku.php/download/mingw-builds

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't using the msys2-provided gtk though but the same distributions as before.

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

Successfully merging this pull request may close these issues.

3 participants