Skip to content
This repository has been archived by the owner on May 14, 2020. It is now read-only.

Implement automatic precompilation #29

Merged
merged 10 commits into from
Sep 25, 2018
Merged

Implement automatic precompilation #29

merged 10 commits into from
Sep 25, 2018

Conversation

NicoHood
Copy link
Collaborator

Fixes #28

@fossfreedom You said this works for gtk > 3.20 but not for 3.18 (ubuntu 16.04). For the sassc PR you already figured out how to add an if statement to the makefile, how about also adding this change to the new release?

fossfreedom and others added 5 commits November 27, 2017 20:15
Following the path of Adwaita, this commit implements the automation to
automatically precompile the GTK3 theme versions to gresource binary
files, to improve performance of theme rendering, and avoid unnecessary
re-read and re-parsing of the theme on every app run.
.
Given that the theme is coded in sass to begin with directly altering it
is not a reasonable thing to do, and so we don't loose anything by
having the installed theme in binary form, specially when accessing the
sources is easy enough.
.
The takes #656 and adds to this proposed commit and ensures that
precompilation works for both GTK+3.18 and later GTK+ versions
@NicoHood
Copy link
Collaborator Author

Some more useful information may be found here in the 3 listed commits:
https://github.com/adapta-project/adapta-gtk-theme/issues/286

@NicoHood NicoHood modified the milestones: 20180114, 2018_xx_xx Jan 10, 2018
@fossfreedom
Copy link
Collaborator

hmm - totally forgot about this. I'll have a play.

@fossfreedom
Copy link
Collaborator

fossfreedom commented Jan 10, 2018

ok - the final commit shows the compilation in action - so compile as normal on branch fix656

./autogen.sh --prefix=/usr 
sudo make install

however a very odd thing which I can't figure out - if you delete all Arc theme folders (i.e. start from fresh sudo rm -rf /usr/share/themes/Arc*) and run the autogen.sh and sudo make install the compilation for "Arc-Dark" fails (there is some bash script errors that you can see). It succeeds for Arc-Darker and Arc

if you re-run sudo make install then the compilation of Arc-Dark succeeds i.e. no bash script errors.

No idea why.

EDIT: think I know - need to rejig compile-resources.sh slightly - will have a look tonight.

@fossfreedom
Copy link
Collaborator

@NicoHood should be working now. Please have a play. If ready I would suggest use the squash and merge option to collapse all the individual commits into one commit.

common/Makefile.am Outdated Show resolved Hide resolved
@jnsh
Copy link
Contributor

jnsh commented Sep 9, 2018

I've been using this for few days, and haven't encountered issues on gtk+ 3.22.
Is there something specific that should still be tested before merging?

I added a few minor notes on the Makefile.am, and I'll take a more thorough look at the compile-gresource.sh scripts later. But generally this seems OK to me.

@NicoHood
Copy link
Collaborator Author

@jnsh Could you open a PR with your changes against the branch fix656? Or @fossfreedom Fixes the requested changes. Thanks for the review!

@fossfreedom
Copy link
Collaborator

fossfreedom commented Sep 10, 2018 via email

common/compile-gresources.sh Outdated Show resolved Hide resolved
@jnsh
Copy link
Contributor

jnsh commented Sep 22, 2018

@fossfreedom Are you still planning on updating this PR?
I can also open a new PR based on this branch with the updates I suggested if you're busy.

@fossfreedom
Copy link
Collaborator

fossfreedom commented Sep 22, 2018 via email

@fossfreedom fossfreedom merged commit dcb93f1 into master Sep 25, 2018
@jnsh
Copy link
Contributor

jnsh commented Sep 25, 2018

Nice to see this merged.

I was also working for a updated PR as promised, but ended up changing the gtk3 version detection in Makefile.am to use automake macros instead of bash conditionals (which seems nicer to me), and that part still needed a little more work. I'll add another PR once that's finished, and you can check if that looks better to you.

I'm curious though, why did you add the common/compile-gresources.sh to .gitignore? I though that file was just leftover from old commits. Does it serve some other purpose that I'm missing?

@fossfreedom fossfreedom deleted the fix656 branch May 19, 2019 21:50
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