ghost-downloader: fix feature pack loading

compile app package too
This commit is contained in:
i0ntempest
2026-05-24 06:35:40 +10:00
parent a23e1f6cba
commit 9fa2bfd286
+11 -12
View File
@@ -8,7 +8,7 @@ PortGroup qt6 1.0
github.setup XiaoYouChR Ghost-Downloader-3 3.9 v
github.tarball_from archive
revision 0
revision 1
name [string tolower [join [lrange [split ${github.project} -] 0 1] -]]
categories net python
homepage https://gd.xychr.com
@@ -53,19 +53,21 @@ qt6.depends_lib qttranslations
require_active_variants \
port:libtorrent-rasterbar python${python_version}
post-patch {
# We don't compile in standalone mode so sys.executable is the interpreter
reinplace "s|sys.executable|sys.argv\[0\]|g" ${worksrcpath}/app/supports/paths.py
}
# Project does not have a typical Python project structure (pyproject.toml not usable for installation).
# deploy.py compiles and packs everything with nuitka into one app bundle - avoid that, make our own bundle.
# When last tested, deploy.py (nuitka --macos-create-app-bundle) throws dependency scan error
# (possible Python 3.14 incompatibility) and permission errors (project tries to create Downloads/ folder
# in macports user home) when called by macports.
# deploy.py compiles standalone bundle and packs everything with nuitka into one app bundle -
# avoid that, make our own bundle. We compile the main script and the app package only.
use_configure no
# Only compile the main executable for now. Experiment with bundle building after this is fixed:
# https://github.com/Nuitka/Nuitka/issues/3870
build.cmd ${prefix}/bin/python${python_branch} -m nuitka
build.target ${github.project}.py
build.args --verbose \
--plugin-enable=pyside6 \
--include-package=app \
--static-libpython=no \
--disable-ccache
@@ -78,7 +80,6 @@ app.signing_args --deep
destroot {
set copy_dest ${destroot}${applications_dir}/${app.name}.app/Contents/MacOS/
copy ${worksrcpath}/app/ ${copy_dest}
copy ${worksrcpath}/features/ ${copy_dest}
# see FEATURE_PACK_BLACKLIST in deploy.py
set feature_pack_blacklist {jack_yao}
@@ -96,11 +97,9 @@ variant media description {enable and install dependencies for media downloading
post-patch {
# change default ffmpeg directory
reinplace "s|{APP_DATA_DIR}/FFmpeg|${prefix}/libexec/ffmpeg${::ffmpeg_ver}|g" \
${worksrcpath}/features/ffmpeg_pack/config.py
reinplace "s|{APP_DATA_DIR}/FFmpeg|${prefix}/libexec/ffmpeg${::ffmpeg_ver}|g" ${worksrcpath}/features/ffmpeg_pack/config.py
# change default n-m3u8dl-re directory
reinplace "s|{APP_DATA_DIR}/M3U8DL|${prefix}/bin|g" \
${worksrcpath}/features/m3u8_pack/config.py
reinplace "s|{APP_DATA_DIR}/M3U8DL|${prefix}/bin|g" ${worksrcpath}/features/m3u8_pack/config.py
}
}