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

libass包的配置有问题 #3055

Closed
BusyStudent opened this issue Jan 7, 2024 · 11 comments
Closed

libass包的配置有问题 #3055

BusyStudent opened this issue Jan 7, 2024 · 11 comments
Labels

Comments

@BusyStudent
Copy link
Contributor

Xmake 版本

v2.8.5+HEAD.debbd3ac3

操作系统版本和架构

Windows 11 22H2

描述问题

你好 我在使用libass这个包的时候发现没有系统字体供应器 感觉这个编译选项没有开
然后我看libass/port/xmake.lua的时候看到了这个选项

option("system-font-provider")
    on_check(function (option)
        option:enable(not is_plat("wasm"))
    end)
    set_description("enable checking for system fonts provider")

看样子只要不在wasm上就是开的 但是就没有开的样子
而且我也手动打开不了开关

add_requires("libass", {configs = {system-font-provider = true} })

这样不行 应该是'-'的问题

期待的结果

我希望这个选项应该是开的 或者我能手动打开这个选项
正确的话 在Windows上应该有ASS_FONTPROVIDER_DIRECTWRITE这个提供器

工程配置

test.zip

附加信息和错误日志

暂无

@BusyStudent BusyStudent added the bug label Jan 7, 2024
@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


Title: There is a problem with the configuration of the libass package.

Xmake version

v2.8.5+HEAD.debbd3ac3

Operating system version and architecture

Windows 11 22H2

Describe the problem

Hello, I found that there is no system font provider when using the libass package. I feel that this compilation option is not turned on.
Then I saw this option when I looked at libass/port/xmake.lua

option("system-font-provider")
    on_check(function (option)
        option:enable(not is_plat("wasm"))
    end)
    set_description("enable checking for system fonts provider")

It seems that it is enabled as long as it is not on wasm, but it does not appear to be enabled.
And I can't turn on the switch manually either

add_requires("libass", {configs = {system-font-provider = true} })

This doesn't work. It should be a problem with '-'

Expected results

I hope this option should be on or I can turn this option on manually
If correct, there should be the ASS_FONTPROVIDER_DIRECTWRITE provider on Windows

Project configuration

test.zip

Additional information and error logs

No

@waruqi
Copy link
Member

waruqi commented Jan 8, 2024

提个 pr 过来,改进下包,加上 config 就行了

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


Submit a PR, improve the package, and add config.

@BusyStudent
Copy link
Contributor Author

找到原因了 在 port/config.h.in里面 前面有一堆无意义的 #unref 他会导致 构建时候设置的CONFIG_DIRECTWRITE等其他宏被undef

/* found CoreText framework */
#undef CONFIG_CORETEXT

/* found DirectWrite and GDI (Win32) */
#undef CONFIG_DIRECTWRITE

/* found libpng via pkg-config */
#undef CONFIG_LIBPNG
#define CONFIG_SOURCEVERSION "commit: ${GIT_TAG}${GIT_COMMIT_LONG}"
${define HAVE_STRDUP}
${define HAVE_STRNDUP}

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


I found the reason. In port/config.h.in, there are a bunch of meaningless #unref in front of it. This will cause CONFIG_DIRECTWRITE and other macros set during the build to be undefed.

/* found CoreText framework */
#undef CONFIG_CORETEXT

/* found DirectWrite and GDI (Win32) */
#undef CONFIG_DIRECTWRITE

/* found libpng via pkg-config */
#undef CONFIG_LIBPNG
#define CONFIG_SOURCEVERSION "commit: ${GIT_TAG}${GIT_COMMIT_LONG}"
${define HAVE_STRDUP}
${define HAVE_STRNDUP}

@BusyStudent
Copy link
Contributor Author

#3056 我提了个pr 这样子改在我电脑上行的通, 话说这个库用的构建工具用的是autotools 有办法方便的集成进去么 我看目前仓库里面这个包的构建是手写的xmake

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


#3056 I submitted a PR so that the change works on my computer. It is said that the construction tool used by this library is autotools. Is there a way to integrate it easily? I see that the current construction of this package in the warehouse is handwritten xmake.

@waruqi
Copy link
Member

waruqi commented Jan 8, 2024

#3056 我提了个pr 这样子改在我电脑上行的通, 话说这个库用的构建工具用的是autotools 有办法方便的集成进去么 我看目前仓库里面这个包的构建是手写的xmake

原本大部分库就是 autotools 直接用的,只有 autotools 构建遇到了很多问题,才会 port 到 xmake.lua 。。既然这个包目前走的 xmake.lua ,说明当初 autotools 就遇到了很多的问题搞不定。

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


#3056 I submitted a PR so that the change works on my computer. It is said that the construction tool used by this library is autotools. Is there a way to integrate it easily? I see that the current construction of this package in the warehouse is handwritten xmake.

Originally, most of the libraries were used directly by autotools. Only when autotools encountered many problems during construction would they be ported to xmake.lua. . Since this package currently uses xmake.lua, it means that autotools encountered a lot of problems at the beginning.

@BusyStudent
Copy link
Contributor Author

那 应该没问题了

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


Then it should be fine

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

No branches or pull requests

3 participants