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
Scope: fix Automake conditional when building for Windows #787
Conversation
This is not valid, because the AM_CONDITIONAL has to be known by Automake in all cases. Automake is smart enough to detect it if used in a AutoShell conditional (like AS_IF/AS_CASE/...), but can't work any magic inside a pure shell conditional (if/case/...). So, move the AM_CONDITIONAL outside the conditional, as the value is already conditional anyway.
See the build failure there: https://nightly.geany.org/win32/build_win32_plugins_stderr.log |
LGBI. The build error on Linux and GTK3 seems to only appear on Travis CI environment. |
The CI needs to be set up to get the GTK3 VTE library I think. |
Yes. I assume the entry "libvte-dev" in the config needs to be replaced with "libvte-2.91-dev". But I am not sure what that will do to other plugins. |
Strangely Geany builds with VTE for both GTK2 and GTK3, but its not mentioned in its |
@elextr Geany doesn't depend on libvte at all, it dynamically loads it and has it's own copy of the prototypes and constants and such -- see vte.c. |
More worried about it not depending on Instead it silently depends on VTE devs not changing anything in the structs or consts, well, G* stuff has a great record for that, though to be fair so far we seem to have gotten away with it. |
And |
dddd4bc
to
347a0c1
Compare
Nah it's my bad, dddd4bc removes the check for whether Scope is enabled because I thought it was redundant but didn't realize this conditional was in utilslib… …which IMO is a very bad thing. BTW, as is I doubt the vtecompat thing in utilslib makes much sense, because it seems highly specific to Scope's use of it, but well. Anyway, the test should be in the corresponding module, so as it's in utilslib it should be in the utils checks. |
OK, as for Travis, it doesn't have libvte-2.91, but it does have libvte-2.90, which should likely be usable, maybe with a little bit of care (IIRC, 2.91 switched to using GdkRGBA instead of GdkColor). |
4f238af
to
347a0c1
Compare
OK, so I have commits to check for VTE-2.90 as well, but it will need actual code support to be useful, so I took it out from this PR. If it's wanted, I can push it somewhere again. |
Presumably the idea was that since several plugins use the VTE library, eventually in the future the other plugins' code/checks/compat could be factored out into the common utils library. |
Correct. I have put some Gtk and Vte compatibility stuff in the common utils lib as there was no attempt for shared compatibility code yet. Also, regarding Vte I wanted to prevent that the utils lib always depends on Vte even if no plugin is enabled which uses it. That's why there is this "cross-reference" in the makefiles. I didn't know a better way to do it. If there is a cleaner way for archiving this then I am open for suggestions. Vte compatibility code might not be used often but there are definitely some plugins which still need to be ported to Gtk3. So I have made a first attempt to introduce some code in PR #750. There was a discussion about it some time ago but not much feedback IIRC. The bottom line is: this is a first attempt - suggestions/feedback/PRs are welcome. It won't be to much work adjusting the scope plugin to changes of the utils lib I think. |
Look at 347a0c1 :)
I'm not saying that it's a bad thing to have VTE compatibility code in that utils lib, but that in the current state it doesn't seem super friendly for other users to me. But indeed it can be improved and made to fit in the future as consumers grow. |
Its the old thing with a library, do you build it and hope users come, or do you wait for users to demand then build it? |
Saw it later, sorry :-) One question: could the Travis CI build be extended to also build for Windows to recognize Windows build related errors sooner? |
Should be possible as we cross-compile also on Linux in the nightly builds setup. As usual, it just needs someone to port it to Travis. If someone wants to start, I can provide the necessary GTK stack (i.e. the files we use for the nightly builds). |
Just tested the changes on native Windows: |
Looks unused to me too. Note that the include of |
Yes, my fault. It's unused now. Maybe I needed it in some intermittent version of the code and forgot to remove it later. All calls to vte should be in |
I removed the |
This adds GP_CHECK_UTILSLIB_VTECOMPAT for a plugin to request the VTE compatibility support.
347a0c1
to
81957e3
Compare
@LarsGit223 did you oush your changes regarding the |
@eht16: no, I didn't. I already have a fork from the geany main repository and don't know how to fork a second one from b4n's repository. Anyway, once this is merged I can update and deliver a PR with the changes. |
https://git-scm.com/book/en/v2/Git-Basics-Working-with-Remotes |
@codebrainz: sorry, but how does that help me? I used |
@LarsGit223 can't you fork |
@elextr: no, because I already have a fork from geany/geany-plugins. github just says "You've already forked geany-plugins" if I click on fork in b4n/geany-plugins repo. |
Well theres ya problem :) Stupid github. Guess all you can do is pull b4n's changes into your fork using Git and then publish a PR to G-P with those and your additional changes. |
@LarsGit223 other solution is just show me the commit and I add it :) But @elextr and @codebrainz are right, you can easily just pull my changes into your Geany clone repo: you add my remote, and you fetch suff from it. |
@b4n, @elextr, @codebrainz: ok, I took the simplest way and just created a PR for the changes of the includes as the change is not depending on b4n's changes (see #793). @b4n, @codebrainz: sorry. I tried fetching b4n's repo but it seems to fetch everything out of it. Merging into one of my branches was not a problem. But I was afraid to push back in my github repo cause I feared that it would push all new branches into it. So I took the easy/save way. |
Fix depending on VTE on Windows and overall checks for utilslib VTE support.
It is not valid to place
AM_CONDITIONAL
s inside a shell condition, because Automake has to known its value in all cases. Automake is smart enough to detect it if used in a AutoShell conditional (likeAS_IF
/AS_CASE
/...), but can't work any magic inside a pure shell conditional (if/case/...). So, move theAM_CONDITIONAL
outside the conditional, as the value is already conditional anyway.This PR also cleans up the conditional a little bit by giving it a plugin-specific name, and removing irrelevant test fro the condition (whether or not the plugin is enabled has little to no relevance here, and the plugin won't be built anyway).