From 2614d45ce1f8aac69fd3db3cb5976a77d1e2af66 Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Sat, 2 Mar 2024 23:37:03 +0700 Subject: [PATCH] #4100 lightweight builds, initial cut --- packaging/MSWindows/ALL_RELEASE_BUILDS.sh | 4 +- packaging/MSWindows/BUILD.sh | 136 +++++++++++++++------- setup.py | 136 ++++++++++++---------- 3 files changed, 172 insertions(+), 104 deletions(-) diff --git a/packaging/MSWindows/ALL_RELEASE_BUILDS.sh b/packaging/MSWindows/ALL_RELEASE_BUILDS.sh index d1c1717972..6d122e3b06 100755 --- a/packaging/MSWindows/ALL_RELEASE_BUILDS.sh +++ b/packaging/MSWindows/ALL_RELEASE_BUILDS.sh @@ -7,7 +7,7 @@ DO_MSI=${DO_MSI:-1} MSWINDOWS_DIR=`dirname $(readlink -f $0)` -for CLIENT_ONLY in 0 1; do +for DO_FULL in 1 0; do echo "********************************************************************************" - CLIENT_ONLY=${CLIENT_ONLY} DO_ZIP=${DO_ZIP} DO_INSTALLER=${DO_INSTALLER} RUN_INSTALLER=${RUN_INSTALLER} DO_MSI=${DO_MSI} PYTHON=python3 sh ${MSWINDOWS_DIR}/BUILD.sh /silent + DO_FULLL=${DO_FULL} DO_ZIP=${DO_ZIP} DO_INSTALLER=${DO_INSTALLER} RUN_INSTALLER=${RUN_INSTALLER} DO_MSI=${DO_MSI} sh ${MSWINDOWS_DIR}/BUILD.sh /silent done diff --git a/packaging/MSWindows/BUILD.sh b/packaging/MSWindows/BUILD.sh index 6be2e851b5..d7961d3bcc 100644 --- a/packaging/MSWindows/BUILD.sh +++ b/packaging/MSWindows/BUILD.sh @@ -7,33 +7,27 @@ ARGS=$@ DO_CLEAN=${DO_CLEAN:-1} -DO_CUDA=${DO_CUDA:-1} DO_ZIP=${DO_ZIP:-0} DO_INSTALLER=${DO_INSTALLER:-1} DO_VERPATCH=${DO_VERPATCH:-1} -DO_DOC=${DO_DOC:-1} -CLIENT_ONLY=${CLIENT_ONLY:-0} +DO_FULL=${DO_FULL:-1} RUN_INSTALLER=${RUN_INSTALLER:-1} DO_MSI=${DO_MSI:-0} DO_SIGN=${DO_SIGN:-1} -BUNDLE_PUTTY=${BUNDLE_PUTTY:-1} -if [ "${CLIENT_ONLY}" == "1" ]; then - BUNDLE_OPENSSH=${BUNDLE_OPENSSH:-0} - BUNDLE_OPENSSL=${BUNDLE_OPENSSL:-0} - BUNDLE_PAEXEC=${BUNDLE_PAEXEC:-0} - BUNDLE_DESKTOPLOGON=${BUNDLE_DESKTOPLOGON:-0} - DO_TESTS=${DO_TESTS:-0} - DO_SERVICE=${DO_SERVICE:-0} - DO_NUMPY=${DO_NUMPY:-0} -else - BUNDLE_OPENSSH=${BUNDLE_OPENSSH:-1} - BUNDLE_OPENSSL=${BUNDLE_OPENSSL:-1} - BUNDLE_PAEXEC=${BUNDLE_PAEXEC:-1} - BUNDLE_DESKTOPLOGON=${BUNDLE_DESKTOPLOGON:-1} - DO_TESTS=${DO_TESTS:-1} - DO_SERVICE=${DO_SERVICE:-1} - DO_NUMPY=${DO_NUMPY:-$DO_CUDA} -fi +DO_TESTS=${DO_TESTS:-0} + +# these are only enabled for "full" builds: +DO_CUDA=${DO_CUDA:-$DO_FULL} +DO_SERVICE=${DO_SERVICE:-$DO_FULL} +DO_DOC=${DO_DOC:-$DO_FULL} +BUNDLE_HTML5=${BUNDLE_HTML5:-$DO_FULL} +BUNDLE_MANUAL=${BUNDLE_MANUAL:-$DO_FULL} +BUNDLE_PUTTY=${BUNDLE_PUTTY:-$DO_FULL} +BUNDLE_OPENSSH=${BUNDLE_OPENSSH:-$DO_FULL} +BUNDLE_OPENSSL=${BUNDLE_OPENSSL:-$DO_FULL} +BUNDLE_PAEXEC=${BUNDLE_PAEXEC:-$DO_FULL} +BUNDLE_NUMPY=${BUNDLE_NUMPY:-$DO_CUDA} +BUNDLE_DESKTOPLOGON=${BUNDLE_DESKTOPLOGON:-$DO_FULL} ZIP_MODULES=${ZIP_MODULES:-1} PYTHON=python3 @@ -41,8 +35,17 @@ PYTHON=python3 KEY_FILE="E:\\xpra.pfx" DIST="./dist" -if [ "${CLIENT_ONLY}" == "1" ]; then - BUILD_OPTIONS="${BUILD_OPTIONS} --without-enc_x264 --without-nvenc --without-nvfbc" +if [ "${DO_FULL}" == "0" ]; then + BUILD_OPTIONS="${BUILD_OPTIONS} --without-shadow --without-server --without-proxy" + BUILD_OPTIONS="${BUILD_OPTIONS} --without-dbus" + BUILD_OPTIONS="${BUILD_OPTIONS} --without-enc_proxy --without-enc_x264 --without-openh264_encoder --without-webp_encoder --without-spng_encoder --without-jpeg_encoder --without-avif" + BUILD_OPTIONS="${BUILD_OPTIONS} --without-nvenc --without-nvfbc --without-cuda_kernels" + BUILD_OPTIONS="${BUILD_OPTIONS} --without-csc_cython" + # gstreamer? + # BUILD_OPTIONS="${BUILD_OPTIONS} --without-example" + BUILD_OPTIONS="${BUILD_OPTIONS} --without-webcam" + BUILD_OPTIONS="${BUILD_OPTIONS} --without-win32_tools" + BUILD_OPTIONS="${BUILD_OPTIONS} --without-docs" shift fi if [ "${DO_CUDA}" == "0" ]; then @@ -71,9 +74,11 @@ fi PROGRAMFILES_X86="C:\\Program Files (x86)" -if [ "${CLIENT_ONLY}" == "1" ]; then +if [ "${DO_FULL}" == "0" ]; then BUILD_OPTIONS="${BUILD_OPTIONS} --without-server --without-shadow --without-proxy --without-rfb" -else +fi + +if [ "${BUNDLE_HTML5}" == "1" ]; then # Make sure we have the HTML5 client if [ ! -d "xpra-html5" ]; then echo "html5 client not found" @@ -131,9 +136,8 @@ if [ "${LOCAL_MODIFICATIONS}" != "0" ]; then FULL_VERSION="${FULL_VERSION}M" fi EXTRA_VERSION="" -if [ "${CLIENT_ONLY}" == "1" ]; then - EXTRA_VERSION="-Client" - DO_CUDA="0" +if [ "${DO_FULL}" == "0" ]; then + EXTRA_VERSION="-Minimal" fi echo echo -n "Xpra${EXTRA_VERSION} ${FULL_VERSION}" @@ -356,7 +360,8 @@ else #keep cuda bits at top level: mv lib/cuda* lib/nvjpeg* ./ fi -if [ "${DO_NUMPY}" == "0" ]; then + +if [ "${BUNDLE_NUMPY}" == "0" ]; then rm -fr ./lib/numpy else rm -fr ./lib/numpy/_pyinstaller @@ -393,10 +398,32 @@ for x in `ls *dll`; do find ./ -mindepth 2 -name "${x}" -exec rm {} \; done +rm -f ./libjasper* ./libjbig* +# Python modules: +rm -fr ./lib2to3* ./xdg* ./olefile* ./pygtkcompat* keyring/testing ./jaraco* ./p11-kit* #remove codecs we don't need: -rm -f ./libSvt* -rm -f ./libx265* - +rm -f ./libSvt* ./libx265* ./libjxl* ./libLerc* ./libde265* ./libkvazaar* ./libopenjp2* +if [ "${DO_FULL}" == "0" ]; then + # kerberos / gss libs: + rm -f ./libshishi* ./libgss* + # no dbus: + rm -f ./libdbus* + # no AV1: + rm -f ./libaom* ./rav1e* ./libdav1d* ./libheif* + # no avif: + rm -f ./libavif* + # remove h264 encoder: + rm -f ./libx264* + # should not be needed: + rm -f ./libsqlite* ./libp11-kit* ./libsharpyuv* + # extra audio codecs (we just keep vorbis and opus): + rm -f ./libmp3* ./libwavpack* ./libmpdec* ./libspeex* ./libFLAC* ./libmpg123* ./libfaad* ./libfaac* + # matching gstreamer modules: + pushd ./gstreamer-1.0 + rm -f ./libgstflac* ./libgstaom* ./libgstwavpack* ./libgstspeex* ./libgstwinscreencap* ./libgstwavenc* ./libgstlame* ./libgstmpg123* ./libgstfaac* ./libgstfaad* ./libgstx264* + popd + # libgstvideo? +fi #remove PIL loaders we don't use: echo "* removing unnecessary PIL plugins:" @@ -420,6 +447,7 @@ popd #remove test bits we don't need: rm -fr ./future/backports/test ./comtypes/test/ ./ctypes/macholib/fetch_macholib* ./distutils/tests ./distutils/command ./enum/doc ./websocket/tests ./email/test/ rm -fr ./Crypto/SelfTest/* + #remove source: find xpra -name "*.pyx" -exec rm {} \; find xpra -name "*.c" -exec rm {} \; @@ -430,23 +458,38 @@ find xpra -name "*.h" -exec rm {} \; find xpra -name "*.html" -exec rm {} \; find xpra -name "*.pxd" -exec rm {} \; find xpra -name "*.cu" -exec rm {} \; + #remove empty directories: rmdir xpra/*/*/* 2> /dev/null rmdir xpra/*/* 2> /dev/null rmdir xpra/* 2> /dev/null + #zip up some modules: if [ "${ZIP_MODULES}" == "1" ]; then #these modules contain native code or data files, #so they will require special treatment: #xpra numpy cryptography PIL nacl cffi gtk rencode gobject glib > /dev/null - zip --move -ur library.zip OpenGL test encodings unittest ldap3 future paramiko html \ - pyasn1 distutils comtypes asn1crypto ldap email multiprocessing \ - pkg_resources pyu2f pycparser idna ctypes json \ - http enum sqlite3 winreg copyreg _thread _dummythread builtins importlib \ - logging queue urllib xml xmlrpc pyasn1_modules concurrent pynvml collections > /dev/null + if [ "${DO_FULL}" == "0" ]; then + rm -fr test unittest gssapi pynvml ldap ldap3 pyasn1 asn1crypto pyu2f sqlite3 + else + zip --move -ur library.zip test unittest gssapi pynvml ldap ldap3 pyasn1 asn1crypto pyu2f sqlite3 + fi + zip --move -ur library.zip OpenGL encodings future paramiko html \ + distutils comtypes email multiprocessing \ + pkg_resources pycparser idna ctypes json \ + http enum winreg copyreg _thread _dummythread builtins importlib \ + logging queue urllib xml xmlrpc pyasn1_modules concurrent collections > /dev/null fi #leave ./lib popd > /dev/null + +rm -f etc/pkcs11 +if [ "${DO_FULL}" == "0" ]; then + # remove extra bits that take up a lot of space: + rm -fr share/icons/Adwaita/cursors + rm -fr share/fonts/gsfonts share/fonts/adobe* share/fonts/cantarell +fi + #remove empty icon directories for i in `seq 4`; do find share/icons -type d -exec rmdir {} \; 2> /dev/null @@ -457,9 +500,14 @@ popd > /dev/null echo "* Adding manifest" -for exe in Bug_Report GTK_info NativeGUI_info Screenshot Xpra-Launcher Xpra-Shadow Xpra Xpra_cmd; do +for exe in Bug_Report Xpra-Launcher Xpra Xpra_cmd; do cp packaging/MSWindows/exe.manifest ./dist/${exe}.exe.manifest done +if [ "${DO_FULL}" == "1" ]; then + for exe in GTK_info NativeGUI_info Screenshot Xpra-Shadow; do + cp packaging/MSWindows/exe.manifest ./dist/${exe}.exe.manifest + done +fi echo "* Generating gdk pixbuf loaders.cache" @@ -469,10 +517,12 @@ for itheme in `ls dist/share/icons/`; do gtk-update-icon-cache.exe -t -i "dist/share/icons/${itheme}" done -echo "* Generating HTML Manual Page" -groff.exe -mandoc -Thtml < ./fs/share/man/man1/xpra.1 > ${DIST}/manual.html +if [ "${BUNDLE_MANUAL}" == "1" ]; then + echo "* Generating HTML Manual Page" + groff.exe -mandoc -Thtml < ./fs/share/man/man1/xpra.1 > ${DIST}/manual.html +fi -if [ "${CLIENT_ONLY}" != "1" ]; then +if [ "${BUNDLE_HTML5}" == "1" ]; then echo "* Installing the HTML5 client" pushd "xpra-html5" python3 ./setup.py install ../${DIST}/www/ @@ -537,8 +587,10 @@ if [ "${DO_VERPATCH}" == "1" ]; then verpatch $exe //s desc "Xpra $tool_name" //va "${ZERO_PADDED_VERSION}" //s company "xpra.org" //s copyright "(c) xpra.org 2020" //s product "xpra" //pv "${ZERO_PADDED_VERSION}" done verpatch dist/Xpra_cmd.exe //s desc "Xpra command line" //va "${ZERO_PADDED_VERSION}" //s company "xpra.org" //s copyright "(c) xpra.org 2020" //s product "xpra" //pv "${ZERO_PADDED_VERSION}" - verpatch dist/Xpra-Proxy.exe //s desc "Xpra Proxy Server" //va "${ZERO_PADDED_VERSION}" //s company "xpra.org" //s copyright "(c) xpra.org 2020" //s product "xpra" //pv "${ZERO_PADDED_VERSION}" verpatch dist/Xpra.exe //s desc "Xpra" //va "${ZERO_PADDED_VERSION}" //s company "xpra.org" //s copyright "(c) xpra.org 2020" //s product "xpra" //pv "${ZERO_PADDED_VERSION}" + if [ "${DO_FULL}" == "1" ]; then + verpatch dist/Xpra-Proxy.exe //s desc "Xpra Proxy Server" //va "${ZERO_PADDED_VERSION}" //s company "xpra.org" //s copyright "(c) xpra.org 2020" //s product "xpra" //pv "${ZERO_PADDED_VERSION}" + fi fi ################################################################################ diff --git a/setup.py b/setup.py index 289e4b3cf4..650ab9603c 100755 --- a/setup.py +++ b/setup.py @@ -309,10 +309,14 @@ def has_header_file(name, isdir=False): spng_decoder_ENABLED = DEFAULT and pkg_config_version("0.6", "spng") spng_encoder_ENABLED = DEFAULT and pkg_config_version("0.7", "spng") webp_ENABLED = DEFAULT and pkg_config_version("0.5", "libwebp") +webp_encoder_ENABLED = webp_ENABLED +webp_decoder_ENABLED = webp_ENABLED jpeg_encoder_ENABLED = DEFAULT and pkg_config_version("1.2", "libturbojpeg") jpeg_decoder_ENABLED = DEFAULT and pkg_config_version("1.4", "libturbojpeg") avif_ENABLED = DEFAULT and pkg_config_version("0.9", "libavif") and not OSX vpx_ENABLED = DEFAULT and pkg_config_version("1.7", "vpx") and BITS==64 +vpx_encoder_ENABLED = vpx_ENABLED +vpx_decoder_ENABLED = vpx_ENABLED # opencv currently broken on 32-bit windows (crashes on load): webcam_ENABLED = DEFAULT and not OSX and not WIN32 notifications_ENABLED = DEFAULT @@ -332,6 +336,7 @@ def has_header_file(name, isdir=False): csc_libyuv_ENABLED = DEFAULT and pkg_config_ok("--exists", "libyuv") gstreamer_ENABLED = DEFAULT example_ENABLED = DEFAULT +win32_tools_ENABLED = WIN32 and DEFAULT # Cython / gcc / packaging build options: docs_ENABLED = DEFAULT and shutil.which("pandoc") @@ -354,7 +359,9 @@ def has_header_file(name, isdir=False): "cuda_kernels", "cuda_rebuild", "openh264", "openh264_decoder", "openh264_encoder", "nvidia", "nvenc", "nvdec", "nvfbc", "nvjpeg_encoder", "nvjpeg_decoder", - "vpx", "webp", "pillow", + "vpx", "vpx_encoder", "vpx_decoder", + "webp", "webp_encoder", "webp_decoder", + "pillow", "spng_decoder", "spng_encoder", "jpeg_encoder", "jpeg_decoder", "avif", "argb", @@ -381,10 +388,13 @@ def has_header_file(name, isdir=False): "shadow", "proxy", "rfb", "quic", "http", "ssh", "debug", "PIC", "Xdummy", "Xdummy_wrapper", "verbose", "tests", "bundle_tests", + "win32_tools", ] # some switches can control multiple switches: SWITCH_ALIAS = { "codecs": ["codecs"] + CODEC_SWITCHES, + "vpx" : ("vpx_encoder", "vpx_decoder"), + "webp" : ("webp_encoder", "webp_decoder"), "openh264": ("openh264", "openh264_decoder", "openh264_encoder"), "nvidia": ("nvidia", "nvenc", "nvdec", "nvfbc", "nvjpeg_encoder", "nvjpeg_decoder", "cuda_kernels", "cuda_rebuild"), "cython": ( @@ -1662,68 +1672,73 @@ def add_service_exe(script, icon, base_name): add_gui_exe("fs/bin/xpra", "xpra.ico", "Xpra") add_gui_exe("xpra/platform/win32/scripts/shadow_server.py", "server-notconnected.ico", "Xpra-Shadow") add_gui_exe("fs/bin/xpra_launcher", "xpra.ico", "Xpra-Launcher") - add_console_exe("fs/bin/xpra_launcher", "xpra.ico", "Xpra-Launcher-Debug") - add_gui_exe("xpra/gtk/dialogs/view_keyboard.py", "keyboard.ico", "GTK_Keyboard_Test") + if win32_tools_ENABLED: + add_console_exe("fs/bin/xpra_launcher", "xpra.ico", "Xpra-Launcher-Debug") + add_gui_exe("xpra/gtk/dialogs/view_keyboard.py", "keyboard.ico", "GTK_Keyboard_Test") add_gui_exe("xpra/gtk/dialogs/bug_report.py", "bugs.ico", "Bug_Report") add_gui_exe("xpra/gtk/configure/main.py", "directory.ico", "Configure") - add_gui_exe("xpra/platform/win32/gdi_screen_capture.py", "screenshot.ico", "Screenshot") - if server_ENABLED: + if shadow_ENABLED: + add_gui_exe("xpra/platform/win32/gdi_screen_capture.py", "screenshot.ico", "Screenshot") + if win32_tools_ENABLED and server_ENABLED: add_gui_exe("fs/libexec/xpra/auth_dialog", "authentication.ico", "Auth_Dialog") # Console: provide an Xpra_cmd.exe we can run from the cmd.exe shell add_console_exe("fs/bin/xpra", "xpra_txt.ico", "Xpra_cmd") - add_console_exe("xpra/scripts/version.py", "information.ico", "Version_info") - add_console_exe("xpra/net/net_util.py", "network.ico", "Network_info") - if gtk3_ENABLED: - add_console_exe("xpra/gtk/info.py", "gtk.ico", "GTK_info") - add_console_exe("xpra/gtk/keymap.py", "keymap.ico", "Keymap_info") - add_console_exe("xpra/platform/keyboard.py", "keymap.ico", "Keyboard_info") - add_gui_exe("xpra/gtk/examples/tray.py", "xpra.ico", "SystemTray_Test") - add_gui_exe("xpra/gtk/dialogs/u2f_tool.py", "authentication.ico", "U2F_Tool") - add_gui_exe("xpra/gtk/configure/main.py", "toolbox.ico", "Configure") - if client_ENABLED or server_ENABLED: - add_console_exe("xpra/platform/win32/scripts/exec.py", "python.ico", "Python_exec_cmd") - add_gui_exe("xpra/platform/win32/scripts/exec.py", "python.ico", "Python_exec_gui") - add_console_exe("xpra/platform/win32/scripts/execfile.py", "python.ico", "Python_execfile_cmd") - add_gui_exe("xpra/platform/win32/scripts/execfile.py", "python.ico", "Python_execfile_gui") - add_console_exe("xpra/scripts/config.py", "gears.ico", "Config_info") - if server_ENABLED: - add_console_exe("xpra/server/auth/sqlite.py", "sqlite.ico", "SQLite_auth_tool") - add_console_exe("xpra/server/auth/sql.py", "sql.ico", "SQL_auth_tool") - add_console_exe("xpra/server/auth/win32.py", "authentication.ico", "System-Auth-Test") - add_console_exe("xpra/server/auth/ldap.py", "authentication.ico", "LDAP-Auth-Test") - add_console_exe("xpra/server/auth/ldap3.py", "authentication.ico", "LDAP3-Auth-Test") - add_console_exe("xpra/platform/win32/scripts/proxy.py", "xpra_txt.ico", "Xpra-Proxy_cmd") - add_gui_exe("xpra/platform/win32/scripts/proxy.py", "xpra.ico", "Xpra-Proxy") - add_console_exe("xpra/platform/win32/lsa_logon_lib.py", "xpra_txt.ico", "System-Logon-Test") - if client_ENABLED: - add_console_exe("xpra/codecs/loader.py", "encoding.ico", "Encoding_info") - add_console_exe("xpra/platform/paths.py", "directory.ico", "Path_info") - add_console_exe("xpra/platform/features.py", "features.ico", "Feature_info") - if client_ENABLED: - add_console_exe("xpra/platform/gui.py", "browse.ico", "NativeGUI_info") - add_console_exe("xpra/platform/win32/gui.py", "loop.ico", "Events_Test") + add_console_exe("xpra/platform/win32/scripts/exec.py", "python.ico", "Python_exec_cmd") + add_gui_exe("xpra/platform/win32/scripts/exec.py", "python.ico", "Python_exec_gui") if audio_ENABLED: - add_console_exe("xpra/audio/gstreamer_util.py", "gstreamer.ico", "GStreamer_info") - add_console_exe("fs/bin/xpra", "speaker.ico", "Xpra_Audio") - add_console_exe("xpra/platform/win32/directsound.py", "speaker.ico", "Audio_Devices") - # add_console_exe("xpra/audio/src.py", "microphone.ico", "Audio_Record") - # add_console_exe("xpra/audio/sink.py", "speaker.ico", "Audio_Play") add_data_files("", (shutil.which("gst-launch-1.0.exe"), )) - if opengl_ENABLED: - add_console_exe("xpra/client/gl/check.py", "opengl.ico", "OpenGL_check") - if webcam_ENABLED: - add_console_exe("xpra/platform/webcam.py", "webcam.ico", "Webcam_info") - add_console_exe("xpra/scripts/show_webcam.py", "webcam.ico", "Webcam_Test") if printing_ENABLED: - add_console_exe("xpra/platform/printing.py", "printer.ico", "Print") add_console_exe("xpra/platform/win32/pdfium.py", "printer.ico", "PDFIUM_Print") do_add_DLLs("", "pdfium") - if nvenc_ENABLED or nvdec_ENABLED: - add_console_exe("xpra/codecs/nvidia/util.py", "nvidia.ico", "NVidia_info") - if nvfbc_ENABLED: - add_console_exe("xpra/codecs/nvidia/nvfbc/capture.py", "nvidia.ico", "NvFBC_capture") - if nvfbc_ENABLED or nvenc_ENABLED or nvdec_ENABLED or nvjpeg_encoder_ENABLED or nvjpeg_decoder_ENABLED: - add_console_exe("xpra/codecs/nvidia/cuda/context.py", "cuda.ico", "CUDA_info") + # extra tools: + if win32_tools_ENABLED: + add_console_exe("xpra/scripts/version.py", "information.ico", "Version_info") + add_console_exe("xpra/net/net_util.py", "network.ico", "Network_info") + if gtk3_ENABLED: + add_console_exe("xpra/gtk/info.py", "gtk.ico", "GTK_info") + add_console_exe("xpra/gtk/keymap.py", "keymap.ico", "Keymap_info") + add_console_exe("xpra/platform/keyboard.py", "keymap.ico", "Keyboard_info") + add_gui_exe("xpra/gtk/examples/tray.py", "xpra.ico", "SystemTray_Test") + add_gui_exe("xpra/gtk/dialogs/u2f_tool.py", "authentication.ico", "U2F_Tool") + if client_ENABLED or server_ENABLED: + add_console_exe("xpra/platform/win32/scripts/execfile.py", "python.ico", "Python_execfile_cmd") + add_gui_exe("xpra/platform/win32/scripts/execfile.py", "python.ico", "Python_execfile_gui") + add_console_exe("xpra/scripts/config.py", "gears.ico", "Config_info") + if server_ENABLED: + add_console_exe("xpra/server/auth/sqlite.py", "sqlite.ico", "SQLite_auth_tool") + add_console_exe("xpra/server/auth/sql.py", "sql.ico", "SQL_auth_tool") + add_console_exe("xpra/server/auth/win32.py", "authentication.ico", "System-Auth-Test") + add_console_exe("xpra/server/auth/ldap.py", "authentication.ico", "LDAP-Auth-Test") + add_console_exe("xpra/server/auth/ldap3.py", "authentication.ico", "LDAP3-Auth-Test") + add_console_exe("xpra/platform/win32/scripts/proxy.py", "xpra_txt.ico", "Xpra-Proxy_cmd") + add_gui_exe("xpra/platform/win32/scripts/proxy.py", "xpra.ico", "Xpra-Proxy") + add_console_exe("xpra/platform/win32/lsa_logon_lib.py", "xpra_txt.ico", "System-Logon-Test") + if client_ENABLED: + add_console_exe("xpra/codecs/loader.py", "encoding.ico", "Encoding_info") + add_console_exe("xpra/platform/paths.py", "directory.ico", "Path_info") + add_console_exe("xpra/platform/features.py", "features.ico", "Feature_info") + if client_ENABLED: + add_console_exe("xpra/platform/gui.py", "browse.ico", "NativeGUI_info") + add_console_exe("xpra/platform/win32/gui.py", "loop.ico", "Events_Test") + if audio_ENABLED: + add_console_exe("xpra/audio/gstreamer_util.py", "gstreamer.ico", "GStreamer_info") + add_console_exe("fs/bin/xpra", "speaker.ico", "Xpra_Audio") + add_console_exe("xpra/platform/win32/directsound.py", "speaker.ico", "Audio_Devices") + # add_console_exe("xpra/audio/src.py", "microphone.ico", "Audio_Record") + # add_console_exe("xpra/audio/sink.py", "speaker.ico", "Audio_Play") + if opengl_ENABLED: + add_console_exe("xpra/client/gl/check.py", "opengl.ico", "OpenGL_check") + if webcam_ENABLED: + add_console_exe("xpra/platform/webcam.py", "webcam.ico", "Webcam_info") + add_console_exe("xpra/scripts/show_webcam.py", "webcam.ico", "Webcam_Test") + if printing_ENABLED: + add_console_exe("xpra/platform/printing.py", "printer.ico", "Print") + if nvenc_ENABLED or nvdec_ENABLED: + add_console_exe("xpra/codecs/nvidia/util.py", "nvidia.ico", "NVidia_info") + if nvfbc_ENABLED: + add_console_exe("xpra/codecs/nvidia/nvfbc/capture.py", "nvidia.ico", "NvFBC_capture") + if nvfbc_ENABLED or nvenc_ENABLED or nvdec_ENABLED or nvjpeg_encoder_ENABLED or nvjpeg_decoder_ENABLED: + add_console_exe("xpra/codecs/nvidia/cuda/context.py", "cuda.ico", "CUDA_info") if ("install_exe" in sys.argv) or ("install" in sys.argv): # FIXME: how do we figure out what target directory to use? @@ -1740,9 +1755,10 @@ def add_service_exe(script, icon, base_name): if data_ENABLED: add_data_files("", [ "packaging/MSWindows/website.url", - "packaging/MSWindows/DirectShow.tlb", "packaging/MSWindows/TaskbarLib.tlb", ]) + if webcam_ENABLED: + add_data_files("", ["packaging/MSWindows/DirectShow.tlb"]) remove_packages(*external_excludes) external_includes += [ @@ -2339,9 +2355,9 @@ def bundle_tests(): tace(openh264_decoder_ENABLED, "xpra.codecs.openh264.decoder", "openh264", language="c++") tace(openh264_encoder_ENABLED, "xpra.codecs.openh264.encoder", "openh264", language="c++") toggle_packages(pillow_ENABLED, "xpra.codecs.pillow") -toggle_packages(webp_ENABLED, "xpra.codecs.webp") -tace(webp_ENABLED, "xpra.codecs.webp.encoder", "libwebp") -tace(webp_ENABLED, "xpra.codecs.webp.decoder", "libwebp") +toggle_packages(webp_encoder_ENABLED or webp_decoder_ENABLED, "xpra.codecs.webp") +tace(webp_encoder_ENABLED, "xpra.codecs.webp.encoder", "libwebp") +tace(webp_decoder_ENABLED, "xpra.codecs.webp.decoder", "libwebp") toggle_packages(spng_decoder_ENABLED or spng_encoder_ENABLED, "xpra.codecs.spng") tace(spng_decoder_ENABLED, "xpra.codecs.spng.decoder", "spng") tace(spng_encoder_ENABLED, "xpra.codecs.spng.encoder", "spng") @@ -2359,9 +2375,9 @@ def bundle_tests(): tace(csc_libyuv_ENABLED, "xpra.codecs.libyuv.converter", "libyuv", language="c++") toggle_packages(csc_cython_ENABLED, "xpra.codecs.csc_cython") tace(csc_cython_ENABLED, "xpra.codecs.csc_cython.converter", optimize=3) -toggle_packages(vpx_ENABLED, "xpra.codecs.vpx") -tace(vpx_ENABLED, "xpra.codecs.vpx.encoder", "vpx") -tace(vpx_ENABLED, "xpra.codecs.vpx.decoder", "vpx") +toggle_packages(vpx_encoder_ENABLED or vpx_decoder_ENABLED, "xpra.codecs.vpx") +tace(vpx_encoder_ENABLED, "xpra.codecs.vpx.encoder", "vpx") +tace(vpx_decoder_ENABLED, "xpra.codecs.vpx.decoder", "vpx") toggle_packages(gstreamer_ENABLED, "xpra.codecs.gstreamer", "xpra.gstreamer") toggle_packages(v4l2_ENABLED, "xpra.codecs.v4l2")