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

Fix issues with resource.dat generation on Windows. #740

Merged
merged 3 commits into from
Dec 17, 2020

Conversation

Hoikas
Copy link
Member

@Hoikas Hoikas commented Dec 13, 2020

This fixes our cairosvg dependency such that pip install -r requirements.txt works without undocumented dependencies. Further, some invalid assumptions have been corrected in makeres.py. Namely that: the python executable is named exactly python and that pngcrush is available when building an external client. This should also fix an issue where CMake would error if CMAKE_RUNTIME_OUTPUT_DIRECTORY is a generator expression.

The latest version of cairosvg on pip seems to have an undocumented
dependency that either cairo or GTK is installed and available on the
PATH. Therefore, we roll back to the old cairosvg 1.x on all Python
versions. This version of cairosvg using pycairo as a backend and works
correctly, without hidden surprises.
There were two bad assumptions that could lead to failure:
- Python is available on the PATH or in the CWD. Its executable is named
  exactly `python`. In the case of multi-install python on Linux or
  applications embedding Python, this may be false.
- When building an external client, the program pngcrush is always
  available.

This also makes using both pngcrush itself and its bruteforce mode
optional. Bruteforce seems to yield minimal gains for a significant time
penalty.
Copy link
Member

@dpogue dpogue left a comment

Choose a reason for hiding this comment

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

Looks good to me

@Hoikas Hoikas mentioned this pull request Dec 15, 2020
Copy link
Member

@Deledrius Deledrius left a comment

Choose a reason for hiding this comment

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

Works here for me. Just one minor edit seems necessary.

@Hoikas Hoikas merged commit 756c2e9 into H-uru:master Dec 17, 2020
@Hoikas Hoikas deleted the resource-dat-fixes branch December 17, 2020 23:35
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

Successfully merging this pull request may close these issues.

None yet

3 participants