xiaoyifang / goldendict-ng

The Next Generation GoldenDict
https://xiaoyifang.github.io/goldendict-ng/
Other
1.71k stars 95 forks source link

fix: manually deploy icu4c dylibs for macOS #1961

Closed shenlebantongying closed 4 days ago

shenlebantongying commented 4 days ago

Stop using the trick of linking goldendict to icu4c-i18n/uc to bring the related dylibs to the app bundle.

(For whatever reason, icudata is not copied.

Edit -> icudata is in icuuc's pkg config file's Private.Lib as an indirect dependency. )

Instead, change the strategy into:

Find out the icu4c's dylibs then explicitly pass them to qt_deploy_runtime_dependencies (which pass the arguments to underlying macdeplogyqt -executable="path_to_some_dylib")

Actually fix https://github.com/xiaoyifang/goldendict-ng/issues/1954

xiaoyifang commented 4 days ago

(For whatever reason, icudata is not copied.)

I suspected that macdeployqt should be blamed.

shenlebantongying commented 4 days ago

This works -> https://github.com/shenlebantongying/goldendict-ng/actions/runs/11889509346/job/33126218459#step:9:60

sonarcloud[bot] commented 4 days ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarQube Cloud

shenlebantongying commented 4 days ago

I suspected that macdeployqt should be blamed.

I don't actually know what's wrong.

I also don't want to think too much of it, let's just live with this reality 😅

shenlebantongying commented 3 days ago

Why are you still changing it? @xiaoyifang

We don't need to link icu with goldendict and also don't need FindICU.

After this change, everything works fine with various problems considered.

Excluding logging message, there are 5 commands in total in this PR.

BTW, libzim needs to find icu through pkgconfig, and pkgconfig can find icu is because my previous temporal fix is not deleted. This PR also updates that temporal fixed to something reliable.

xiaoyifang commented 3 days ago

just to test some ideas. failed at last.:(

shenlebantongying commented 3 days ago

No worries. Build systems, every one of them and particularly C/C++, are 💩 :)