installer: drop Windows installer build config

Drop installer build config in favor of the external build config at:
https://github.com/streamlink/windows-installer

- remove installer build scripts+configs
- remove Streamlink config file in win32 subdirectory
- remove windows-installer CI job
  - update steps of the release CI job
- remove removed-plugins file
  - remove src/streamlink/plugins/.removed
  - update package manifest
  - update tests
  - update developing docs
- rewrite install docs
This commit is contained in:
bastimeyer 2022-03-28 13:23:05 +02:00 committed by Sebastian Meyer
parent 03d1863db4
commit 2dd2f35930
11 changed files with 48 additions and 730 deletions

View File

@ -92,43 +92,12 @@ jobs:
- name: Build
run: make --directory=docs html man
windows-installer:
name: Windows installer
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 300
- name: Fetch tags
run: git fetch --depth=300 origin +refs/tags/*:refs/tags/*
- uses: actions/setup-python@v1
with:
python-version: 3.9
- name: Install dependencies
run: |
./script/install-dependencies.sh
python -m pip install wheel pynsist==2.7 distlib==0.3.3
sudo apt update
sudo apt install -y nsis imagemagick inkscape
- name: Installer file name
id: installer
run: echo ::set-output name=filename::streamlink-$(python setup.py --version | sed 's/+/_/')
- name: Build
run: ./script/makeinstaller.sh "${{ steps.installer.outputs.filename }}"
- name: Upload artifact
if: github.repository == 'streamlink/streamlink' && (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') || github.event_name == 'schedule')
uses: actions/upload-artifact@v2-preview
with:
name: ${{ steps.installer.outputs.filename }}-win32
path: ${{ env.STREAMLINK_DIST_DIR }}/${{ steps.installer.outputs.filename }}.exe
deploy-documentation:
name: Deploy docs
if: github.repository == 'streamlink/streamlink' && github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/'))
needs:
- test
- documentation
- windows-installer
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
@ -174,14 +143,6 @@ jobs:
run: ./script/build-shell-completions.sh
- name: Build man page
run: make --directory=docs man
- name: Installer file name
id: installer
run: echo ::set-output name=filename::streamlink-$(python setup.py --version | sed 's/+/_/')
- name: Download installer artifact
uses: actions/download-artifact@v2-preview
with:
name: ${{ steps.installer.outputs.filename }}-win32
path: ${{ env.STREAMLINK_DIST_DIR }}
- name: sdist and wheels
env:
RELEASE_KEY_PASSPHRASE: ${{ secrets.RELEASE_KEY_PASSPHRASE }}
@ -189,7 +150,7 @@ jobs:
- name: Github release
env:
RELEASES_API_KEY: ${{ secrets.RELEASES_API_KEY }}
run: ./script/github_releases.py "${STREAMLINK_DIST_DIR}/"*{.exe,.tar.gz{,.asc}}
run: ./script/github_releases.py "${STREAMLINK_DIST_DIR}/"*{.tar.gz{,.asc}}
- name: PyPI release
env:
PYPI_USER: streamlink

View File

@ -4,7 +4,6 @@ include README.md
include LICENSE*
include *requirements.txt
include src/streamlink/_version.py
include src/streamlink/plugins/.removed
include versioneer.py
recursive-include completions *

View File

@ -191,4 +191,3 @@ Removing plugins
^^^^^^^^^^^^^^^^
1. Remove the plugin file from ``src/streamlink/plugins/`` and the test file from ``tests/plugins/``
2. Run ``script/update-removed-plugins.sh`` once to update ``src/streamlink/plugins/.removed``

View File

@ -13,9 +13,11 @@ Windows
==================================== ===========================================
Method Installing
==================================== ===========================================
Installers See the `Windows binaries`_ section below
Installers (stable) See the `Windows stable installers`_ section below
Portable See the `Windows portable version`_ section below
Installers (nightly) See the `Windows nightly installers`_ section below
Portable See the `Windows portable builds`_ section below
Python pip See the `PyPI package and source code`_ section below
@ -33,11 +35,8 @@ Python pip See the `PyPI package and source code`_ sec
==================================== ===========================================
.. _Chocolatey: https://chocolatey.org/packages/streamlink
.. _Windows Package Manager: https://github.com/microsoft/winget-pkgs/tree/master/manifests/s/Streamlink/Streamlink
.. _Installing Chocolatey packages: https://chocolatey.org
.. _Installing Winget packages: https://docs.microsoft.com/en-us/windows/package-manager/
macOS
@ -179,7 +178,7 @@ OpenBSD Brian Callahan <bcallah at openbsd.org>
Solus Joey Riches <josephriches at gmail.com>
Ubuntu Alin Andrei <andrew at webupd8.org>
Void Michal Vasilek <michal at vasilek.cz>
Windows binaries beardypig <beardypig at protonmail.com>
Windows binaries Sebastian Meyer <mail at bastimeyer.de>
Windows port. version beardypig <beardypig at protonmail.com>
==================================== ===========================================
@ -318,68 +317,61 @@ Name Notes
Windows binaries
----------------
Since late March 2022, Windows installers for Streamlink can be found at the `streamlink/windows-installer`_ repository
on GitHub, with support for different architectures and different Python versions.
These installers contain
- an embedded Python version, built at `streamlink/python-windows-embed`_
- FFmpeg, for muxing streams, built at `streamlink/FFmpeg-Builds`_
For further information, please see the README file of the `streamlink/windows-installer`_ repository.
Windows stable installers
^^^^^^^^^^^^^^^^^^^^^^^^^
.. rst-class:: table-custom-layout
==================================== ====================================
Release Notes
==================================== ====================================
`Stable release`_ Download the installer from the `GitHub releases page`_.
================================================== ==================================================
Installer flavor Notes
================================================== ==================================================
`Python 3.10, x86_64 <windows-stable_>`_ for Windows 8+, 64-bit
`Python 3.10, x86 <windows-stable_>`_ for Windows 8+, 32-bit
`Python 3.8, x86_64 <windows-stable_>`_ for Windows 7, 64-bit
`Python 3.8, x86 <windows-stable_>`_ for Windows 7, 32-bit
================================================== ==================================================
`Development build`_ For testing purposes only! Built each day at midnight (UTC). |br|
Download the zipped installer from the `build artifacts`_ section of one of
the recent scheduled builds. Build artifacts are stored by Github for 90 days. |br|
See the `commit log`_ for a list of changes since the last stable release.
==================================== ====================================
Windows nightly installers
^^^^^^^^^^^^^^^^^^^^^^^^^^
.. warning::
Built once each day at midnight UTC from Streamlink's master branch. |br|
This includes the most recent changes, but is not considered "stable". |br|
Download from the build-artifacts of the `scheduled nightly build runs <windows-nightly_>`_ (requires a GitHub login). |br|
See the `commit log <streamlink-master_>`_ of Steamlink's master branch for all the recent changes.
**The Streamlink installer for Windows is currently based on Python 3.9.** |br|
Versions of Windows prior to 10 are **not** supported.
Be aware that the packages for `Chocolatey`_ and the `Windows Package Manager`_ are just wrappers
around the stable installer and thus depend on Windows 10+ as well.
Alternatively, :ref:`Streamlink can be installed via python-pip <install:PyPI package and source code>`
in a :ref:`compatible Python environment <install:Dependencies>`.
.. _Stable release:
.. _GitHub releases page: https://github.com/streamlink/streamlink/releases/latest
.. _Development build:
.. _build artifacts: https://github.com/streamlink/streamlink/actions?query=event%3Aschedule+is%3Asuccess+branch%3Amaster
.. _commit log: https://github.com/streamlink/streamlink/commits/master
These installers contain:
- A compiled version of Streamlink that **does not require an existing Python installation**
- `ffmpeg`_ for muxing streams
and perform the following tasks:
- Add Streamlink to the system's list of installed applications. |br|
An uninstaller will automatically be created during installation.
- Add Streamlink's installation directory to the system's ``PATH`` environment variable. |br|
This allows the user to run the ``streamlink`` command globally
from the command prompt or powershell without specifying its directory.
To build the installer on your own, ``NSIS`` and ``pynsist`` need to be installed.
Windows portable version
^^^^^^^^^^^^^^^^^^^^^^^^
Windows portable builds
^^^^^^^^^^^^^^^^^^^^^^^
.. rst-class:: table-custom-layout
==================================== ===========================================
Maintainer Links
==================================== ===========================================
Beardypig `Latest precompiled stable release`__ |br|
`Latest builder`__ |br|
`More info`__
Beardypig `Latest precompiled stable release <windows-portable-beardypig-releases_>`_ |br|
`Latest builder <windows-portable-beardypig-latest_>`_ |br|
`More info <windows-portable-beardypig_>`_
==================================== ===========================================
__ https://github.com/beardypig/streamlink-portable/releases/latest
__ https://github.com/beardypig/streamlink-portable/archive/master.zip
__ https://github.com/beardypig/streamlink-portable
.. _streamlink/windows-installer: https://github.com/streamlink/windows-installer
.. _streamlink/python-windows-embed: https://github.com/streamlink/python-windows-embed
.. _streamlink/FFmpeg-Builds: https://github.com/streamlink/FFmpeg-Builds
.. _windows-stable: https://github.com/streamlink/windows-installer/releases
.. _windows-nightly: https://github.com/streamlink/windows-installer/actions?query=event%3Aschedule+is%3Asuccess+branch%3Amaster
.. _streamlink-master: https://github.com/streamlink/streamlink/commits/master
.. _windows-portable-beardypig: https://github.com/beardypig/streamlink-portable
.. _windows-portable-beardypig-releases: https://github.com/beardypig/streamlink-portable/releases
.. _windows-portable-beardypig-latest: https://github.com/beardypig/streamlink-portable/archive/master.zip
AppImages

View File

@ -1,24 +0,0 @@
[
{
"url": "https://github.com/streamlink/FFmpeg-Builds/releases/download/20211030-1/ffmpeg-n4.4.1-win32-gpl-4.4.zip",
"sha256": "cb92b2ff3caf5d2169f97006c44c8e702304b09b95a0a7d7f83d48f9ee3227e7",
"filename": "ffmpeg-n4.4.1-win32-gpl-4.4.zip",
"type": "zip",
"sourcedir": "ffmpeg-n4.4.1-win32-gpl-4.4",
"targetdir": "ffmpeg",
"files": [
{
"from": "bin/ffmpeg.exe",
"to": "ffmpeg.exe"
},
{
"from": "LICENSE.txt",
"to": "LICENSE.txt"
},
{
"from": "BUILDINFO.txt",
"to": "BUILDINFO.txt"
}
]
}
]

View File

@ -1,18 +0,0 @@
{
"build_wheels": {
"pycountry": "20.7.3 --hash=sha256:81084a53d3454344c0292deebc20fcd0a1488c136d4900312cbd465cf552cb42"
},
"wheels": {
"certifi": "2021.10.8 --hash=sha256:d62a0163eb4c2344ac042ab2bdf75399a71a2d8c7d47eac2e2ee91b9d6339569",
"charset-normalizer": "2.0.12 --hash=sha256:6881edbebdb17b39b4eaaa821b438bf6eddffb4468cf344f09f89def34a8b1df",
"idna": "3.3 --hash=sha256:84d9dd047ffa80596e0f246e2eab0b391788b0503584e8945f2368256d2735ff",
"isodate": "0.6.1 --hash=sha256:0751eece944162659049d35f4f549ed815792b38793f07cf73381c1c87cbed96",
"lxml": "4.7.1 --hash=sha256:59e7da839a1238807226f7143c68a479dee09244d1b3cf8c134f2fce777d12d0",
"pycryptodome": "3.14.1 --hash=sha256:53dedbd2a6a0b02924718b520a723e88bcf22e37076191eb9b91b79934fb2192",
"PySocks": "1.7.1 --hash=sha256:2725bd0a9925919b9b51739eea5f9e2bae91e83288108a9ad338b2e3a4435ee5",
"requests": "2.27.1 --hash=sha256:f22fa1e554c9ddfd16e6e41ac79759e17be9e492b3587efa038054674760e72d",
"six": "1.16.0 --hash=sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254",
"urllib3": "1.26.8 --hash=sha256:000ca7f471a233c2251c6c7023ee85305721bfdf18621ebff4fd17a8653427ed",
"websocket-client": "1.2.3 --hash=sha256:2eed4cc58e4d65613ed6114af2f380f7910ff416fc8c46947f6e76b6815f56c0"
}
}

View File

@ -1,318 +0,0 @@
#!/usr/bin/env bash
set -e
MAKEINSTALLER=$(basename "$(readlink -f "${0}")")
log() {
echo "[${MAKEINSTALLER}] $@"
}
err() {
log >&2 "$@"
exit 1
}
declare -A DEPS=(
[pip]=pip
[makensis]=NSIS
[pynsist]=pynsist
[convert]=Imagemagick
[inkscape]=inkscape
[curl]=curl
[jq]=jq
[unzip]=unzip
)
for dep in "${!DEPS[@]}"; do
command -v "${dep}" 2>&1 >/dev/null || err "${DEPS["${dep}"]} is required to build the installer. Aborting."
done
ROOT=$(git rev-parse --show-toplevel 2>/dev/null || realpath "$(dirname "$(readlink -f "${0}")")/..")
cd "${ROOT}"
# For CI nightly builds generate a version number with commit hash
STREAMLINK_VERSION=$(python setup.py --version)
STREAMLINK_VERSION_PLAIN="${STREAMLINK_VERSION%%+*}"
STREAMLINK_INSTALLER="${1:-"streamlink-${STREAMLINK_VERSION/\+/_}"}"
STREAMLINK_PYTHON_VERSION=3.9.11
STREAMLINK_ASSETS_FILE="${ROOT}/script/makeinstaller-assets.json"
STREAMLINK_REQUIREMENTS_FILE="${ROOT}/script/makeinstaller-requirements.json"
CI_BUILD_NUMBER=${GITHUB_RUN_ID:-0}
STREAMLINK_VI_VERSION="${STREAMLINK_VERSION_PLAIN}.${CI_BUILD_NUMBER}"
DIST_DIR="${STREAMLINK_DIST_DIR:-"${ROOT}/dist"}"
INSTALLER_PATH="${DIST_DIR}/${STREAMLINK_INSTALLER}.exe"
build_dir="${ROOT}/build"
build_dir_plugins="${build_dir}/lib/streamlink/plugins"
cache_dir="${build_dir}/cache"
nsis_dir="${build_dir}/nsis"
files_dir="${build_dir}/files"
icons_dir="${files_dir}/icons"
wheels_dir=$(mktemp -d) && trap "rm -rf '${wheels_dir}'" RETURN || exit 255
removed_plugins_file="${ROOT}/src/streamlink/plugins/.removed"
log "Setting up clean build directories"
[[ -d "${build_dir}" ]] && rm -rf "${nsis_dir}" "${files_dir}" "${icons_dir}"
mkdir -p "${build_dir}" "${cache_dir}" "${nsis_dir}" "${files_dir}" "${icons_dir}" "${DIST_DIR}"
log "Building streamlink-${STREAMLINK_VERSION} package"
python setup.py build 1>&2
log "Creating empty plugin files"
# https://github.com/streamlink/streamlink/issues/1223
while read -r pluginname; do
touch "${build_dir_plugins}/${pluginname}.py"
done < <(sed -e 's/[[:space:]]*[#;].*//; /^[[:space:]]*$/d' "${removed_plugins_file}")
log "Creating icons"
for size in 16 32 48 256; do
inkscape --without-gui --export-png="${icons_dir}/icon-${size}.png" -w ${size} -h ${size} icon.svg 2>/dev/null
done
convert "${icons_dir}"/icon-{16,32,48,256}.png "${icons_dir}/icon.ico" 2>/dev/null
log "Downloading dependency wheels"
pip download \
--disable-pip-version-check \
--progress-bar off \
--no-cache-dir \
--require-hashes \
--only-binary :all: \
--platform win32 \
--python-version "${STREAMLINK_PYTHON_VERSION}" \
--implementation cp \
--dest "${wheels_dir}" \
--requirement /dev/stdin \
< <(jq -r '.wheels | to_entries[] | "\(.key)==\(.value)"' "${STREAMLINK_REQUIREMENTS_FILE}")
log "Locally building missing dependency wheels"
pip wheel \
--disable-pip-version-check \
--progress-bar off \
--no-cache-dir \
--require-hashes \
--no-binary :all: \
--wheel-dir "${wheels_dir}" \
--requirement /dev/stdin \
< <(jq -r '.build_wheels | to_entries[] | "\(.key)==\(.value)"' "${STREAMLINK_REQUIREMENTS_FILE}")
log "Configuring installer"
cat > "${build_dir}/streamlink.cfg" <<EOF
[Application]
name=Streamlink
version=${STREAMLINK_VERSION}
entry_point=streamlink_cli.main:main
icon=${icons_dir}/icon.ico
license_file=${files_dir}/LICENSE.txt
[Python]
version=${STREAMLINK_PYTHON_VERSION}
format=bundled
[Include]
packages=pkg_resources
local_wheels=${wheels_dir}/*.whl
files=${ROOT}/build/lib/streamlink > \$INSTDIR\pkgs
${ROOT}/build/lib/streamlink_cli > \$INSTDIR\pkgs
[Command streamlink]
entry_point=streamlink_cli.main:main
[Command streamlinkw]
entry_point=streamlink_cli.main:main
console=false
[Build]
directory=nsis
nsi_template=installer_tmpl.nsi
installer_name=${INSTALLER_PATH}
EOF
cat > "${build_dir}/installer_tmpl.nsi" <<EOF
!include "FileFunc.nsh"
!include "TextFunc.nsh"
[% extends "pyapp_msvcrt.nsi" %]
[% block modernui %]
; let the user review all changes being made to the system first
!define MUI_FINISHPAGE_NOAUTOCLOSE
!define MUI_UNFINISHPAGE_NOAUTOCLOSE
; add checkbox for opening the documentation in the user's default web browser
!define MUI_FINISHPAGE_RUN
!define MUI_FINISHPAGE_RUN_TEXT "Open online manual in web browser"
!define MUI_FINISHPAGE_RUN_FUNCTION "OpenDocs"
!define MUI_FINISHPAGE_RUN_NOTCHECKED
; make global installation mode the default choice
; see MULTIUSER_PAGE_INSTALLMODE macro below
!undef MULTIUSER_INSTALLMODE_DEFAULT_CURRENTUSER
Function OpenDocs
ExecShell "" "https://streamlink.github.io/cli.html"
FunctionEnd
; add checkbox for editing the configuration file
!define MUI_FINISHPAGE_SHOWREADME
!define MUI_FINISHPAGE_SHOWREADME_TEXT "Edit configuration file"
!define MUI_FINISHPAGE_SHOWREADME_FUNCTION "EditConfig"
!define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED
Function EditConfig
SetShellVarContext current
Exec '"\$WINDIR\notepad.exe" "\$APPDATA\streamlink\config"'
SetShellVarContext all
FunctionEnd
; constants need to be defined before importing MUI
[[ super() ]]
; Add the product version information
VIProductVersion "${STREAMLINK_VI_VERSION}"
VIAddVersionKey /LANG=\${LANG_ENGLISH} "ProductName" "Streamlink"
VIAddVersionKey /LANG=\${LANG_ENGLISH} "CompanyName" "Streamlink"
VIAddVersionKey /LANG=\${LANG_ENGLISH} "FileDescription" "Streamlink Installer"
VIAddVersionKey /LANG=\${LANG_ENGLISH} "LegalCopyright" ""
VIAddVersionKey /LANG=\${LANG_ENGLISH} "FileVersion" "${STREAMLINK_VERSION}"
[% endblock %]
; UI pages
[% block ui_pages %]
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_COMPONENTS
!insertmacro MULTIUSER_PAGE_INSTALLMODE
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH
[% endblock ui_pages %]
[% block sections %]
[[ super() ]]
SubSection /e "Bundled tools" bundled
Section "FFMPEG" ffmpeg
SetOutPath "\$INSTDIR\ffmpeg"
File /r "${files_dir}\ffmpeg\*.*"
SetShellVarContext current
\${ConfigWrite} "\$APPDATA\streamlink\config" "ffmpeg-ffmpeg=" "\$INSTDIR\ffmpeg\ffmpeg.exe" \$R0
SetShellVarContext all
SetOutPath -
SectionEnd
SubSectionEnd
[% endblock %]
[% block install_files %]
[[ super() ]]
; Install config file
SetShellVarContext current # install the config file for the current user
SetOverwrite off # config file we don't want to overwrite
SetOutPath \$APPDATA\streamlink
File /r "${files_dir}\config"
SetOverwrite ifnewer
SetOutPath -
SetShellVarContext all
; Add metadata
; hijack the install_files block for this
WriteRegStr HKLM "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\\${PRODUCT_NAME}" "DisplayVersion" "${STREAMLINK_VERSION}"
WriteRegStr HKLM "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\\${PRODUCT_NAME}" "Publisher" "Streamlink"
WriteRegStr HKLM "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\\${PRODUCT_NAME}" "URLInfoAbout" "https://streamlink.github.io/"
WriteRegStr HKLM "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\\${PRODUCT_NAME}" "HelpLink" "https://streamlink.github.io/"
\${GetSize} "\$INSTDIR" "/S=0K" \$0 \$1 \$2
IntFmt \$0 "0x%08X" \$0
WriteRegDWORD HKLM "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\\${PRODUCT_NAME}" "EstimatedSize" "\$0"
[% endblock %]
[% block uninstall_files %]
[[ super() ]]
RMDir /r "\$INSTDIR\ffmpeg"
[% endblock %]
[% block install_commands %]
; Remove any existing bin dir from %PATH% to avoid duplicates
[% if has_commands %]
nsExec::ExecToLog '[[ python ]] -Es "\$INSTDIR\_system_path.py" remove "\$INSTDIR\bin"'
[% endif %]
[[ super() ]]
[% endblock install_commands %]
[% block install_shortcuts %]
; Remove shortcut from previous releases
Delete "\$SMPROGRAMS\Streamlink.lnk"
[% endblock %]
[% block uninstall_shortcuts %]
; no shortcuts to be removed...
[% endblock %]
[% block mouseover_messages %]
[[ super() ]]
StrCmp \$0 \${sec_app} "" +2
SendMessage \$R0 \${WM_SETTEXT} 0 "STR:\${PRODUCT_NAME} with embedded Python"
StrCmp \$0 \${bundled} "" +2
SendMessage \$R0 \${WM_SETTEXT} 0 "STR:Extra tools used to play some streams"
StrCmp \$0 \${ffmpeg} "" +2
SendMessage \$R0 \${WM_SETTEXT} 0 "STR:FFMPEG is used to mux separate video and audio streams, for example high quality YouTube videos or DASH streams"
[% endblock %]
EOF
# copy the config file to the build dir, we cannot use the Include.files property in the config file
# because those files will always overwrite, and for a config file we do not want to overwrite
cp "${ROOT}/win32/config" "${files_dir}/config"
# make sure the license has a file extension
cp "${ROOT}/LICENSE" "${files_dir}/LICENSE.txt"
ASSETS_DATA=$(cat "${STREAMLINK_ASSETS_FILE}")
assets_prepare() {
log "Preparing assets"
while read -r filename sha256 url; do
if ! [[ -f "${cache_dir}/${filename}" ]]; then
log "Downloading asset: ${filename}"
curl -L -o "${cache_dir}/${filename}" "${url}"
fi
echo "${sha256} ${cache_dir}/${filename}" | sha256sum --check -
done < <(jq -r '.[] | "\(.filename) \(.sha256) \(.url)"' <<< "${ASSETS_DATA}")
}
assets_assemble() {
log "Assembling files directory"
local tmp=$(mktemp -d) && trap "rm -rf '${tmp}'" RETURN || exit 255
for ((i=$(jq length <<< "${ASSETS_DATA}") - 1; i >= 0; --i)); do
read -r type filename sourcedir targetdir \
< <(jq -r ".[$i] | \"\(.type) \(.filename) \(.sourcedir) \(.targetdir)\"" <<< "${ASSETS_DATA}")
case "${type}" in
zip)
mkdir -p "${tmp}/${i}"
unzip "${cache_dir}/${filename}" -d "${tmp}/${i}"
sourcedir="${tmp}/${i}/${sourcedir}"
;;
*)
sourcedir="${cache_dir}"
;;
esac
while read -r from to; do
install -v -D -T "${sourcedir}/${from}" "${files_dir}/${targetdir}/${to}"
done < <(jq -r ".[$i].files[] | \"\(.from) \(.to)\"" <<< "${ASSETS_DATA}")
done
}
assets_prepare
assets_assemble
log "Building ${STREAMLINK_INSTALLER} installer"
pynsist "${build_dir}/streamlink.cfg"
log "Success!"

View File

@ -1,37 +0,0 @@
#!/usr/bin/env bash
set -eo pipefail
ROOT=$(git rev-parse --show-toplevel 2>/dev/null || realpath "$(dirname "$(readlink -f "${0}")")/..")
DIR_PLUGINS="${ROOT}/src/streamlink/plugins/"
FILE_REMOVED="${DIR_PLUGINS}/.removed"
# ----
[[ -d "${DIR_PLUGINS}" ]] || { echo >&2 "Missing directory: ${DIR_PLUGINS}"; exit 1; }
[[ -f "${FILE_REMOVED}" ]] || { echo >&2 "Missing file: ${FILE_REMOVED}"; exit 1; }
get_plugin_names() {
grep -E '\.py$' | xargs -I@ basename @ .py | LC_ALL=C sort -u
}
header=$(sed -e '/^[^#;]/d' "${FILE_REMOVED}")
content=$(
`# Only show plugin names which are unique to the first list` \
comm -23 --nocheck-order \
`# Find all deleted and renamed files in the plugins directory` \
`# Merge output from the git log and the current git status` \
<(
(
git log --diff-filter=DR --name-status --pretty=tformat: -- "${DIR_PLUGINS}" | cut -f2
git status --porcelain=v1 -- "${DIR_PLUGINS}" | awk '/^[DR]/ {print $2}'
) \
| get_plugin_names
) \
`# Find all current plugin names` \
<(find "${DIR_PLUGINS}" -type f | get_plugin_names)
)
cat >"${FILE_REMOVED}" <<EOF
${header}
${content}
EOF

View File

@ -1,132 +0,0 @@
# Removed plugin files
# https://github.com/streamlink/streamlink/pull/2003
# https://github.com/streamlink/streamlink/issues/1223
abweb
afreecatv
aftonbladet
akamaihd
aliez
alieztv
aljazeeraen
animelab
antenna
apac
arconai
arconia
atv
azubutv
bambuser
beam
beattv
bliptv
bnt
bongacams
brittv
btsports
cam4
camsoda
canalplus
canlitv
chaturbate
common_swf
connectcast
cubetv
cybergame
cyro
daisuki
dingittv
disney_de
dmcloud
dmcloud_embed
dommune
douyutv
douyutv_blackbox
dplay
ellobo
eurocom
europaplus
expressen
filmon_us
furstream
gaminglive
gardenersworld
gomexp
googledocs
hds
hitbox
huomao
ine
itvplayer
kanal7
kingkong
kralmuzik
latina
letontv
live_russia_tv
livecodingtv
liveedu
liveme
livestation
looch
media_ccc_de
meerkat
metube
mico
mips
mixer
mlgtv
neulion
nineanime
npo
ok_live
oldlivestream
ovvatv
pandatv
pcyourfreetv
periscope
playtv
powerapp
reshet
rte
rtlxl
rtmp
seemeplay
seetv
servustv
showtv
skai
speedrunslive
srgssr
startv
stream
streamboat
streamingvideoprovider
streamlive
streamme
streamupcom
tamago
teamliquid
teleclubzoom
tga
tigerdile
toya
trt
trtspor
tv1channel
tv8cat
tvcatchup
tvnbg
tvplayer
ufctv
vaughnlive
veetle
vgtv
viagame
viasat
viasat_embed
viutv
wattv
webcast_india_gov
weeb
willax
younow

View File

@ -189,19 +189,3 @@ class TestPluginMetadata:
def test_key_type(self, metadata_dict):
assert metadata_dict.get("type") in ("live", "vod", "live, vod"), \
"Type metadata has the correct value"
class TestRemovedPluginsFile:
@pytest.fixture(scope="class")
def removedplugins(self):
with (Path(plugins_path) / ".removed").open() as handle:
return [line.strip() for line in handle.readlines() if not line.strip().startswith("#")]
@pytest.mark.parametrize("plugin", plugins)
def test_plugin_not_in_file(self, plugin, removedplugins):
assert plugin not in removedplugins, "Existing plugin is not in removed plugins list"
def test_is_sorted(self, removedplugins):
removedplugins_sorted = removedplugins.copy()
removedplugins_sorted.sort()
assert removedplugins_sorted == removedplugins, "Removed plugins list is sorted alphabetically"

View File

@ -1,88 +0,0 @@
# The format is option=value
# Lines starting with a # are considered comments and are ignored.
# Please see the Streamlink CLI documentation for all available options
# and their descriptions. All leading dashes need to be ignored,
# e.g. --default-stream=STREAM becomes default-stream=STREAM
# https://streamlink.github.io/cli.html#command-line-usage
# By default, Streamlink will attempt to locate VLC on your system
# and use that, but you can also specify the location of a player yourself.
# Important: You must use a quoted path if there are spaces in it. This
# is because the player command is parsed like a shell command, to allow
# parameters to be passed to the player when not using the player-args option.
# Here are a couple of player examples:
# VLC
#player="C:\Program Files (x86)\VideoLAN\VLC\vlc.exe"
#player="C:\Program Files\VideoLAN\VLC\vlc.exe"
# Using --file-caching is recommended, but is only supported in VLC 2.0+
#player="C:\Program Files (x86)\VideoLAN\VLC\vlc.exe" --file-caching=5000
#player="C:\Program Files\VideoLAN\VLC\vlc.exe" --file-caching=5000
# MPC-HC, must be at least version 1.7 to be used
#player="C:\Program Files (x86)\MPC-HC\mpc-hc.exe"
#player="C:\Program Files\MPC-HC\mpc-hc64.exe"
# MPV
#player="C:\Program Files\mpv-x86_64\mpv.exe"
# Alternatively, player arguments can also be set via the player-args option.
# Please see the documentation of the used player for its available arguments.
# VLC
#player-args=--no-one-instance --play-and-exit
#player-args=--qt-minimal-view
#player-args=--file-caching=5000
# MPC-HC
#player-args=/new /play /close
# MPV
#player-args=--keep-open=no --force-window=yes
#player-args=--no-border
#player-args=--cache=yes --demuxer-max-bytes=2M
# Custom player window titles can automatically be set when a supported player
# and plugin are used. The title option has several variables available, which
# can show the stream's author, category/game, title, URL, etc.
#title={author} - {category} - {title}
# Use this if you want to transport the stream to the player via a named pipe.
#player-fifo
# Use one of these if you want to transport the stream to the player via HTTP.
# The continuous option will allow the player to stop and resume the output.
#player-http
#player-continuous-http
# Use player-passthrough if you want Streamlink to only pass the resolved URL
# to your player and let it handle the transport of the stream itself.
# Please note that the player needs to support the streaming protocol
# and that custom stream implementations in plugins will become unavailable,
# same as buffering options and those which change the network behavior.
#player-passthrough=http,hls
# By default, Streamlink will close the player when the stream is over.
# Use this option to let the player stay or close itself instead.
#player-no-close
# Show the player's console output
#verbose-player
# FFMPEG is used to mux separate video and audio streams in to a single
# stream so that they can be played. The full or relative path to ffmpeg
# or avconv should be specified here.
#ffmpeg-ffmpeg=C:\Program Files (x86)\Streamlink\ffmpeg\ffmpeg.exe
ffmpeg-ffmpeg=ffmpeg.exe
# Log level, default is info
#loglevel=debug
# Number of threads to use when streaming HLS streams
#hls-segment-threads=1