Repository: qiin2333/foundation-sunshine Branch: master Commit: 3beecddb0cd1 Files: 586 Total size: 6.2 MB Directory structure: gitextract_wjclcvr9/ ├── .clang-format ├── .codeql-prebuild-cpp-Linux.sh ├── .codeql-prebuild-cpp-Windows.sh ├── .codeql-prebuild-cpp-macOS.sh ├── .coderabbit.yaml ├── .dockerignore ├── .flake8 ├── .gitattributes ├── .github/ │ ├── FUNDING.yml │ ├── ISSUE_TEMPLATE/ │ │ ├── bug_report_en.yml │ │ ├── bug_report_zh.yml │ │ ├── config.yml │ │ ├── feature_request_en.yml │ │ └── feature_request_zh.yml │ ├── RELEASE_TEMPLATE.md │ └── workflows/ │ ├── main.yml │ ├── sign-and-repackage.yml │ ├── test-signpath.yml │ ├── translate-simple.yml │ └── update-driver-versions.yml ├── .gitignore ├── .gitmodules ├── .prettierrc.json ├── .readthedocs.yaml ├── .rstcheck.cfg ├── CMakeLists.txt ├── CMakePresets.json ├── DOCKER_README.md ├── LICENSE ├── NOTICE ├── README.de.md ├── README.en.md ├── README.fr.md ├── README.ja.md ├── README.md ├── README.md.backup ├── cmake/ │ ├── FindLIBCAP.cmake │ ├── FindLIBDRM.cmake │ ├── FindLibva.cmake │ ├── FindSystemd.cmake │ ├── FindUdev.cmake │ ├── FindWayland.cmake │ ├── compile_definitions/ │ │ ├── common.cmake │ │ ├── linux.cmake │ │ ├── macos.cmake │ │ ├── unix.cmake │ │ └── windows.cmake │ ├── dependencies/ │ │ ├── Boost_Sunshine.cmake │ │ ├── common.cmake │ │ ├── libevdev_Sunshine.cmake │ │ ├── linux.cmake │ │ ├── macos.cmake │ │ ├── nlohmann_json.cmake │ │ ├── unix.cmake │ │ └── windows.cmake │ ├── macros/ │ │ ├── common.cmake │ │ ├── linux.cmake │ │ ├── macos.cmake │ │ ├── unix.cmake │ │ └── windows.cmake │ ├── packaging/ │ │ ├── ChineseSimplified.isl │ │ ├── FetchDriverDeps.cmake │ │ ├── FetchGUI.cmake │ │ ├── common.cmake │ │ ├── linux.cmake │ │ ├── macos.cmake │ │ ├── sunshine.iss.in │ │ ├── unix.cmake │ │ ├── windows.cmake │ │ ├── windows_innosetup.cmake │ │ ├── windows_nsis.cmake │ │ └── windows_wix.cmake │ ├── prep/ │ │ ├── build_version.cmake │ │ ├── constants.cmake │ │ ├── init.cmake │ │ ├── options.cmake │ │ └── special_package_configuration.cmake │ └── targets/ │ ├── common.cmake │ ├── linux.cmake │ ├── macos.cmake │ ├── unix.cmake │ └── windows.cmake ├── codecov.yml ├── crowdin.yml ├── docker/ │ ├── archlinux.dockerfile │ ├── clion-toolchain.dockerfile │ ├── debian-bookworm.dockerfile │ ├── fedora-39.dockerfile │ ├── fedora-40.dockerfile │ ├── ubuntu-22.04.dockerfile │ └── ubuntu-24.04.dockerfile ├── docs/ │ ├── Doxyfile │ ├── Doxyfile-1.10.0-default │ ├── WEBUI_DEVELOPMENT.md │ ├── WGC_vs_DDAPI_Smoothness_Fun_Guide.md │ ├── app_examples.md │ ├── building.md │ ├── changelog.md │ ├── configuration.md │ ├── contributing.md │ ├── gamestream_migration.md │ ├── getting_started.md │ ├── guides.md │ ├── legal.md │ ├── performance_tuning.md │ ├── run_command_dev_guide.md │ ├── source/ │ │ ├── about/ │ │ │ └── advanced_usage.rst │ │ └── source_code/ │ │ └── src/ │ │ ├── display_device/ │ │ │ ├── display_device.rst │ │ │ ├── parsed_config.rst │ │ │ ├── session.rst │ │ │ ├── settings.rst │ │ │ └── to_string.rst │ │ └── platform/ │ │ └── windows/ │ │ └── display_device/ │ │ ├── settings_data.rst │ │ ├── settings_topology.rst │ │ └── windows_utils.rst │ ├── third_party_packages.md │ ├── troubleshooting.md │ └── webhook_format.md ├── gh-pages-template/ │ └── index.html ├── package.json ├── scripts/ │ ├── README_I18N.md │ ├── _locale.py │ ├── format-i18n.js │ ├── generate-checksums.ps1 │ ├── icons/ │ │ └── convert_and_pack.sh │ ├── linux_build.sh │ ├── requirements.txt │ ├── reverse-sync-i18n.js │ ├── update_clang_format.py │ ├── validate-i18n.js │ └── vmouse_smoke.ps1 ├── src/ │ ├── abr.cpp │ ├── abr.h │ ├── amf/ │ │ ├── amf_config.h │ │ ├── amf_d3d11.cpp │ │ ├── amf_d3d11.h │ │ ├── amf_encoded_frame.h │ │ └── amf_encoder.h │ ├── assets/ │ │ └── abr_prompt.md │ ├── audio.cpp │ ├── audio.h │ ├── cbs.cpp │ ├── cbs.h │ ├── config.cpp │ ├── config.h │ ├── confighttp.cpp │ ├── confighttp.h │ ├── crypto.cpp │ ├── crypto.h │ ├── display_device/ │ │ ├── display_device.h │ │ ├── parsed_config.cpp │ │ ├── parsed_config.h │ │ ├── session.cpp │ │ ├── session.h │ │ ├── settings.cpp │ │ ├── settings.h │ │ ├── to_string.cpp │ │ ├── to_string.h │ │ ├── vdd_utils.cpp │ │ └── vdd_utils.h │ ├── entry_handler.cpp │ ├── entry_handler.h │ ├── file_handler.cpp │ ├── file_handler.h │ ├── globals.cpp │ ├── globals.h │ ├── httpcommon.cpp │ ├── httpcommon.h │ ├── input.cpp │ ├── input.h │ ├── logging.cpp │ ├── logging.h │ ├── main.cpp │ ├── main.h │ ├── move_by_copy.h │ ├── network.cpp │ ├── network.h │ ├── nvenc/ │ │ ├── common_impl/ │ │ │ ├── nvenc_base.cpp │ │ │ ├── nvenc_base.h │ │ │ ├── nvenc_utils.cpp │ │ │ └── nvenc_utils.h │ │ ├── nvenc_config.h │ │ ├── nvenc_encoded_frame.h │ │ ├── nvenc_encoder.h │ │ └── win/ │ │ ├── impl/ │ │ │ ├── nvenc_d3d11_base.cpp │ │ │ ├── nvenc_d3d11_base.h │ │ │ ├── nvenc_d3d11_native.cpp │ │ │ ├── nvenc_d3d11_native.h │ │ │ ├── nvenc_d3d11_on_cuda.cpp │ │ │ ├── nvenc_d3d11_on_cuda.h │ │ │ ├── nvenc_dynamic_factory_1100.cpp │ │ │ ├── nvenc_dynamic_factory_1100.h │ │ │ ├── nvenc_dynamic_factory_1200.cpp │ │ │ ├── nvenc_dynamic_factory_1200.h │ │ │ ├── nvenc_dynamic_factory_1202.cpp │ │ │ ├── nvenc_dynamic_factory_1202.h │ │ │ ├── nvenc_dynamic_factory_blueprint.h │ │ │ └── nvenc_shared_dll.h │ │ ├── nvenc_d3d11.h │ │ ├── nvenc_dynamic_factory.cpp │ │ └── nvenc_dynamic_factory.h │ ├── nvhttp.cpp │ ├── nvhttp.h │ ├── platform/ │ │ ├── common.h │ │ ├── linux/ │ │ │ ├── audio.cpp │ │ │ ├── cuda.cpp │ │ │ ├── cuda.cu │ │ │ ├── cuda.h │ │ │ ├── display_device.cpp │ │ │ ├── graphics.cpp │ │ │ ├── graphics.h │ │ │ ├── input/ │ │ │ │ ├── inputtino.cpp │ │ │ │ ├── inputtino_common.h │ │ │ │ ├── inputtino_gamepad.cpp │ │ │ │ ├── inputtino_gamepad.h │ │ │ │ ├── inputtino_keyboard.cpp │ │ │ │ ├── inputtino_keyboard.h │ │ │ │ ├── inputtino_mouse.cpp │ │ │ │ ├── inputtino_mouse.h │ │ │ │ ├── inputtino_pen.cpp │ │ │ │ ├── inputtino_pen.h │ │ │ │ ├── inputtino_touch.cpp │ │ │ │ ├── inputtino_touch.h │ │ │ │ └── legacy_input.cpp │ │ │ ├── kmsgrab.cpp │ │ │ ├── misc.cpp │ │ │ ├── misc.h │ │ │ ├── publish.cpp │ │ │ ├── vaapi.cpp │ │ │ ├── vaapi.h │ │ │ ├── wayland.cpp │ │ │ ├── wayland.h │ │ │ ├── wlgrab.cpp │ │ │ ├── x11grab.cpp │ │ │ └── x11grab.h │ │ ├── macos/ │ │ │ ├── av_audio.h │ │ │ ├── av_audio.m │ │ │ ├── av_img_t.h │ │ │ ├── av_video.h │ │ │ ├── av_video.m │ │ │ ├── display.mm │ │ │ ├── display_device.cpp │ │ │ ├── input.cpp │ │ │ ├── microphone.mm │ │ │ ├── misc.h │ │ │ ├── misc.mm │ │ │ ├── nv12_zero_device.cpp │ │ │ ├── nv12_zero_device.h │ │ │ └── publish.cpp │ │ ├── run_command.h │ │ └── windows/ │ │ ├── PolicyConfig.h │ │ ├── audio.cpp │ │ ├── display.h │ │ ├── display_amd.cpp │ │ ├── display_base.cpp │ │ ├── display_device/ │ │ │ ├── device_hdr_states.cpp │ │ │ ├── device_modes.cpp │ │ │ ├── device_topology.cpp │ │ │ ├── general_functions.cpp │ │ │ ├── session_listener.cpp │ │ │ ├── session_listener.h │ │ │ ├── settings.cpp │ │ │ ├── settings_topology.cpp │ │ │ ├── settings_topology.h │ │ │ ├── windows_utils.cpp │ │ │ └── windows_utils.h │ │ ├── display_ram.cpp │ │ ├── display_vram.cpp │ │ ├── display_wgc.cpp │ │ ├── dsu_server.cpp │ │ ├── dsu_server.h │ │ ├── ftime_compat.cpp │ │ ├── input.cpp │ │ ├── keylayout.h │ │ ├── mic_write.cpp │ │ ├── mic_write.h │ │ ├── misc.cpp │ │ ├── misc.h │ │ ├── nvprefs/ │ │ │ ├── driver_settings.cpp │ │ │ ├── driver_settings.h │ │ │ ├── nvapi_opensource_wrapper.cpp │ │ │ ├── nvprefs_common.cpp │ │ │ ├── nvprefs_common.h │ │ │ ├── nvprefs_interface.cpp │ │ │ ├── nvprefs_interface.h │ │ │ ├── undo_data.cpp │ │ │ ├── undo_data.h │ │ │ ├── undo_file.cpp │ │ │ └── undo_file.h │ │ ├── publish.cpp │ │ ├── virtual_mouse.cpp │ │ ├── virtual_mouse.h │ │ ├── win_dark_mode.cpp │ │ ├── win_dark_mode.h │ │ └── windows.rc.in │ ├── process.cpp │ ├── process.h │ ├── round_robin.h │ ├── rswrapper.c │ ├── rswrapper.h │ ├── rtsp.cpp │ ├── rtsp.h │ ├── stat_trackers.cpp │ ├── stat_trackers.h │ ├── stb_image.h │ ├── stb_image_write.h │ ├── stream.cpp │ ├── stream.h │ ├── sync.h │ ├── system_tray.cpp │ ├── system_tray.h │ ├── system_tray_i18n.cpp │ ├── system_tray_i18n.h │ ├── task_pool.h │ ├── thread_pool.h │ ├── thread_safe.h │ ├── upnp.cpp │ ├── upnp.h │ ├── utility.h │ ├── uuid.h │ ├── version.h.in │ ├── video.cpp │ ├── video.h │ ├── video_colorspace.cpp │ ├── video_colorspace.h │ ├── webhook.cpp │ ├── webhook.h │ ├── webhook_format.cpp │ ├── webhook_format.h │ ├── webhook_httpsclient.cpp │ └── webhook_httpsclient.h ├── src_assets/ │ ├── common/ │ │ └── assets/ │ │ └── web/ │ │ ├── apps.html │ │ ├── components/ │ │ │ ├── AccordionItem.vue │ │ │ ├── AppCard.vue │ │ │ ├── AppEditor.vue │ │ │ ├── AppListItem.vue │ │ │ ├── Checkbox.vue │ │ │ ├── CheckboxField.vue │ │ │ ├── CommandTable.vue │ │ │ ├── CoverFinder.vue │ │ │ ├── FormField.vue │ │ │ ├── ImageSelector.vue │ │ │ ├── LogDiagnosisModal.vue │ │ │ ├── LogsSection.vue │ │ │ ├── ScanResultModal.vue │ │ │ ├── SetupWizard.vue │ │ │ ├── TroubleshootingCard.vue │ │ │ ├── common/ │ │ │ │ ├── ErrorLogs.vue │ │ │ │ ├── Icon.vue │ │ │ │ ├── Locale.vue │ │ │ │ ├── ResourceCard.vue │ │ │ │ ├── ThemeToggle.vue │ │ │ │ └── VersionCard.vue │ │ │ └── layout/ │ │ │ ├── Navbar.vue │ │ │ └── PlatformLayout.vue │ │ ├── composables/ │ │ │ ├── useAiDiagnosis.js │ │ │ ├── useApps.js │ │ │ ├── useBackground.js │ │ │ ├── useConfig.js │ │ │ ├── useLogout.js │ │ │ ├── useLogs.js │ │ │ ├── usePin.js │ │ │ ├── useQrPair.js │ │ │ ├── useSetupWizard.js │ │ │ ├── useTheme.js │ │ │ ├── useTroubleshooting.js │ │ │ ├── useVersion.js │ │ │ └── useWelcome.js │ │ ├── config/ │ │ │ ├── firebase.js │ │ │ └── i18n.js │ │ ├── config.html │ │ ├── configs/ │ │ │ └── tabs/ │ │ │ ├── Advanced.vue │ │ │ ├── AudioVideo.vue │ │ │ ├── ContainerEncoders.vue │ │ │ ├── Files.vue │ │ │ ├── General.vue │ │ │ ├── Inputs.vue │ │ │ ├── Network.vue │ │ │ ├── audiovideo/ │ │ │ │ ├── AdapterNameSelector.vue │ │ │ │ ├── DisplayDeviceOptions.vue │ │ │ │ ├── DisplayModesSettings.vue │ │ │ │ ├── ExperimentalFeatures.vue │ │ │ │ ├── LegacyDisplayOutputSelector.vue │ │ │ │ ├── NewDisplayOutputSelector.vue │ │ │ │ └── VirtualDisplaySettings.vue │ │ │ └── encoders/ │ │ │ ├── AmdAmfEncoder.vue │ │ │ ├── IntelQuickSyncEncoder.vue │ │ │ ├── NvidiaNvencEncoder.vue │ │ │ ├── SoftwareEncoder.vue │ │ │ └── VideotoolboxEncoder.vue │ │ ├── fonts/ │ │ │ └── fonts.css │ │ ├── index.html │ │ ├── init.js │ │ ├── password.html │ │ ├── pin.html │ │ ├── platform-i18n.js │ │ ├── public/ │ │ │ └── assets/ │ │ │ ├── css/ │ │ │ │ └── sunshine.css │ │ │ └── locale/ │ │ │ ├── bg.json │ │ │ ├── cs.json │ │ │ ├── de.json │ │ │ ├── en.json │ │ │ ├── en_GB.json │ │ │ ├── en_US.json │ │ │ ├── es.json │ │ │ ├── fr.json │ │ │ ├── it.json │ │ │ ├── ja.json │ │ │ ├── ko.json │ │ │ ├── pl.json │ │ │ ├── pt.json │ │ │ ├── pt_BR.json │ │ │ ├── ru.json │ │ │ ├── sv.json │ │ │ ├── tr.json │ │ │ ├── uk.json │ │ │ ├── zh.json │ │ │ └── zh_TW.json │ │ ├── scripts/ │ │ │ └── extract-welcome-locales.js │ │ ├── services/ │ │ │ └── appService.js │ │ ├── styles/ │ │ │ ├── apps.less │ │ │ ├── global.less │ │ │ ├── modal-glass.less │ │ │ ├── var.css │ │ │ └── welcome.less │ │ ├── sunshine_version.js │ │ ├── template_header.html │ │ ├── template_header_dev.html │ │ ├── troubleshooting.html │ │ ├── utils/ │ │ │ ├── README.md │ │ │ ├── constants.js │ │ │ ├── coverSearch.js │ │ │ ├── errorHandler.js │ │ │ ├── fileSelection.js │ │ │ ├── helpers.js │ │ │ ├── imageUtils.js │ │ │ ├── steamApi.js │ │ │ ├── theme.js │ │ │ └── validation.js │ │ ├── views/ │ │ │ ├── Apps.vue │ │ │ ├── Config.vue │ │ │ ├── Home.vue │ │ │ ├── Password.vue │ │ │ ├── Pin.vue │ │ │ ├── Troubleshooting.vue │ │ │ └── Welcome.vue │ │ └── welcome.html.template │ ├── linux/ │ │ ├── assets/ │ │ │ ├── apps.json │ │ │ └── shaders/ │ │ │ └── opengl/ │ │ │ ├── ConvertUV.frag │ │ │ ├── ConvertUV.vert │ │ │ ├── ConvertY.frag │ │ │ ├── Scene.frag │ │ │ └── Scene.vert │ │ └── misc/ │ │ ├── 60-sunshine.rules │ │ └── postinst │ ├── macos/ │ │ ├── assets/ │ │ │ ├── Info.plist │ │ │ └── apps.json │ │ └── misc/ │ │ └── uninstall_pkg.sh │ └── windows/ │ ├── assets/ │ │ ├── apps.json │ │ └── shaders/ │ │ └── directx/ │ │ ├── convert_yuv420_packed_uv_bicubic_ps.hlsl │ │ ├── convert_yuv420_packed_uv_bicubic_ps_hybrid_log_gamma.hlsl │ │ ├── convert_yuv420_packed_uv_bicubic_ps_linear.hlsl │ │ ├── convert_yuv420_packed_uv_bicubic_ps_perceptual_quantizer.hlsl │ │ ├── convert_yuv420_packed_uv_bicubic_vs.hlsl │ │ ├── convert_yuv420_packed_uv_type0_ps.hlsl │ │ ├── convert_yuv420_packed_uv_type0_ps_hybrid_log_gamma.hlsl │ │ ├── convert_yuv420_packed_uv_type0_ps_linear.hlsl │ │ ├── convert_yuv420_packed_uv_type0_ps_perceptual_quantizer.hlsl │ │ ├── convert_yuv420_packed_uv_type0_vs.hlsl │ │ ├── convert_yuv420_packed_uv_type0s_ps.hlsl │ │ ├── convert_yuv420_packed_uv_type0s_ps_hybrid_log_gamma.hlsl │ │ ├── convert_yuv420_packed_uv_type0s_ps_linear.hlsl │ │ ├── convert_yuv420_packed_uv_type0s_ps_perceptual_quantizer.hlsl │ │ ├── convert_yuv420_packed_uv_type0s_vs.hlsl │ │ ├── convert_yuv420_planar_y_bicubic_ps.hlsl │ │ ├── convert_yuv420_planar_y_bicubic_ps_hybrid_log_gamma.hlsl │ │ ├── convert_yuv420_planar_y_bicubic_ps_linear.hlsl │ │ ├── convert_yuv420_planar_y_bicubic_ps_perceptual_quantizer.hlsl │ │ ├── convert_yuv420_planar_y_ps.hlsl │ │ ├── convert_yuv420_planar_y_ps_hybrid_log_gamma.hlsl │ │ ├── convert_yuv420_planar_y_ps_linear.hlsl │ │ ├── convert_yuv420_planar_y_ps_perceptual_quantizer.hlsl │ │ ├── convert_yuv420_planar_y_vs.hlsl │ │ ├── convert_yuv444_packed_ayuv_ps.hlsl │ │ ├── convert_yuv444_packed_ayuv_ps_linear.hlsl │ │ ├── convert_yuv444_packed_vs.hlsl │ │ ├── convert_yuv444_packed_y410_ps.hlsl │ │ ├── convert_yuv444_packed_y410_ps_hybrid_log_gamma.hlsl │ │ ├── convert_yuv444_packed_y410_ps_linear.hlsl │ │ ├── convert_yuv444_packed_y410_ps_perceptual_quantizer.hlsl │ │ ├── convert_yuv444_planar_ps.hlsl │ │ ├── convert_yuv444_planar_ps_hybrid_log_gamma.hlsl │ │ ├── convert_yuv444_planar_ps_linear.hlsl │ │ ├── convert_yuv444_planar_ps_perceptual_quantizer.hlsl │ │ ├── convert_yuv444_planar_vs.hlsl │ │ ├── cursor_ps.hlsl │ │ ├── cursor_ps_normalize_white.hlsl │ │ ├── cursor_vs.hlsl │ │ ├── hdr_luminance_analysis_cs.hlsl │ │ ├── hdr_luminance_reduce_cs.hlsl │ │ ├── include/ │ │ │ ├── base_vs.hlsl │ │ │ ├── base_vs_types.hlsl │ │ │ ├── common.hlsl │ │ │ ├── convert_base.hlsl │ │ │ ├── convert_hybrid_log_gamma_base.hlsl │ │ │ ├── convert_linear_base.hlsl │ │ │ ├── convert_perceptual_quantizer_base.hlsl │ │ │ ├── convert_yuv420_packed_uv_bicubic_ps_base.hlsl │ │ │ ├── convert_yuv420_packed_uv_ps_base.hlsl │ │ │ ├── convert_yuv420_planar_y_bicubic_ps_base.hlsl │ │ │ ├── convert_yuv420_planar_y_ps_base.hlsl │ │ │ └── convert_yuv444_ps_base.hlsl │ │ ├── simple_cursor_ps.hlsl │ │ └── simple_cursor_vs.hlsl │ └── misc/ │ ├── autostart/ │ │ └── autostart-service.bat │ ├── firewall/ │ │ ├── add-firewall-rule.bat │ │ └── delete-firewall-rule.bat │ ├── gamepad/ │ │ ├── install-gamepad.bat │ │ └── uninstall-gamepad.bat │ ├── install_portable.bat │ ├── languages/ │ │ ├── de-DE.lang │ │ ├── en-US.lang │ │ ├── fr-FR.lang │ │ ├── ja-JP.lang │ │ ├── ru-RU.lang │ │ └── zh-Simple.lang │ ├── migration/ │ │ ├── IMAGE_MIGRATION.md │ │ ├── migrate-config.bat │ │ └── migrate-images.ps1 │ ├── path/ │ │ └── update-path.bat │ ├── service/ │ │ ├── install-service.bat │ │ ├── sleep.bat │ │ └── uninstall-service.bat │ ├── uninstall_portable.bat │ ├── vdd/ │ │ ├── driver/ │ │ │ └── vdd_settings.xml │ │ ├── install-vdd.bat │ │ └── uninstall-vdd.bat │ ├── vmouse/ │ │ ├── driver/ │ │ │ ├── README.md │ │ │ └── ZakoVirtualMouse.cer │ │ ├── install-vmouse.bat │ │ └── uninstall-vmouse.bat │ └── vsink/ │ ├── install-vsink.bat │ └── uninstall-vsink.bat ├── sunshine.icns ├── tests/ │ ├── CMakeLists.txt │ ├── tests_common.h │ ├── tests_environment.h │ ├── tests_events.h │ ├── tests_log_checker.h │ ├── tests_main.cpp │ ├── tools/ │ │ ├── vmouse_logging_stubs.cpp │ │ ├── vmouse_probe.cpp │ │ └── vmouse_send_diag.cpp │ └── unit/ │ ├── platform/ │ │ ├── test_common.cpp │ │ └── windows/ │ │ └── test_virtual_mouse.cpp │ ├── test_audio.cpp │ ├── test_entry_handler.cpp │ ├── test_file_handler.cpp │ ├── test_httpcommon.cpp │ ├── test_logging.cpp │ ├── test_mouse.cpp │ ├── test_network.cpp │ ├── test_rswrapper.cpp │ ├── test_stream.cpp │ ├── test_video.cpp │ ├── test_webhook.cpp │ └── test_webhook_config.cpp ├── third-party/ │ ├── .clang-format-ignore │ ├── glad/ │ │ ├── include/ │ │ │ ├── EGL/ │ │ │ │ └── eglplatform.h │ │ │ ├── KHR/ │ │ │ │ └── khrplatform.h │ │ │ └── glad/ │ │ │ ├── egl.h │ │ │ └── gl.h │ │ └── src/ │ │ ├── egl.c │ │ └── gl.c │ └── nvfbc/ │ ├── NvFBC.h │ └── helper_math.h ├── tools/ │ ├── CMakeLists.txt │ ├── audio.cpp │ ├── build-qiin-tabtip.sh │ ├── dxgi.cpp │ ├── qiin-tabtip.cpp │ ├── sunshinesvc.cpp │ └── test_args.cpp ├── translate_simple.py ├── vite-plugin-ejs-v7.js ├── vite.config.js └── vite.dev.config.js ================================================ FILE CONTENTS ================================================ ================================================ FILE: .clang-format ================================================ --- # This file is centrally managed in https://github.com//.github/ # Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in # the above-mentioned repo. # Generated from CLion C/C++ Code Style settings BasedOnStyle: LLVM AccessModifierOffset: -2 AlignAfterOpenBracket: DontAlign AlignConsecutiveAssignments: false AlignOperands: Align AllowAllArgumentsOnNextLine: false AllowAllConstructorInitializersOnNextLine: false AllowAllParametersOfDeclarationOnNextLine: false AllowShortBlocksOnASingleLine: Always AllowShortCaseLabelsOnASingleLine: false AllowShortFunctionsOnASingleLine: All AllowShortIfStatementsOnASingleLine: WithoutElse AllowShortLambdasOnASingleLine: All AllowShortLoopsOnASingleLine: true AlignTrailingComments: false AlwaysBreakAfterReturnType: All AlwaysBreakTemplateDeclarations: MultiLine BreakBeforeBraces: Custom BraceWrapping: AfterCaseLabel: false AfterClass: false AfterControlStatement: Never AfterEnum: false AfterFunction: false AfterNamespace: false AfterObjCDeclaration: false AfterUnion: false BeforeCatch: true BeforeElse: true IndentBraces: false SplitEmptyFunction: false SplitEmptyRecord: true BreakBeforeBinaryOperators: None BreakBeforeTernaryOperators: false BreakConstructorInitializers: AfterColon BreakInheritanceList: AfterColon ColumnLimit: 0 CompactNamespaces: false ContinuationIndentWidth: 2 IndentCaseLabels: true IndentPPDirectives: BeforeHash IndentWidth: 2 KeepEmptyLinesAtTheStartOfBlocks: false MaxEmptyLinesToKeep: 1 NamespaceIndentation: All ObjCSpaceAfterProperty: true ObjCSpaceBeforeProtocolList: true PointerAlignment: Right ReflowComments: true SpaceAfterCStyleCast: true SpaceAfterLogicalNot: false SpaceAfterTemplateKeyword: true SpaceBeforeAssignmentOperators: true SpaceBeforeCpp11BracedList: true SpaceBeforeCtorInitializerColon: false SpaceBeforeInheritanceColon: false SpaceBeforeParens: ControlStatements SpaceBeforeRangeBasedForLoopColon: true SpaceInEmptyParentheses: false SpacesBeforeTrailingComments: 2 SpacesInAngles: Never SpacesInCStyleCastParentheses: false SpacesInContainerLiterals: false SpacesInParentheses: false SpacesInSquareBrackets: false TabWidth: 2 Cpp11BracedListStyle: false UseTab: Never ================================================ FILE: .codeql-prebuild-cpp-Linux.sh ================================================ # install dependencies for C++ analysis set -e chmod +x ./scripts/linux_build.sh ./scripts/linux_build.sh --skip-package --ubuntu-test-repo # Delete CUDA rm -rf ./build/cuda # skip autobuild echo "skip_autobuild=true" >> "$GITHUB_OUTPUT" ================================================ FILE: .codeql-prebuild-cpp-Windows.sh ================================================ # install dependencies for C++ analysis set -e # update pacman pacman --noconfirm -Syu gcc_version="15.1.0-5" broken_deps=( "mingw-w64-ucrt-x86_64-gcc" "mingw-w64-ucrt-x86_64-gcc-libs" ) tarballs="" for dep in "${broken_deps[@]}"; do tarball="${dep}-${gcc_version}-any.pkg.tar.zst" # download and install working version wget https://repo.msys2.org/mingw/ucrt64/${tarball} tarballs="${tarballs} ${tarball}" done # install broken dependencies if [ -n "$tarballs" ]; then pacman -U --noconfirm ${tarballs} fi # install dependencies dependencies=( "git" "mingw-w64-ucrt-x86_64-cmake" "mingw-w64-ucrt-x86_64-cppwinrt" "mingw-w64-ucrt-x86_64-curl-winssl" "mingw-w64-ucrt-x86_64-MinHook" "mingw-w64-ucrt-x86_64-miniupnpc" "mingw-w64-ucrt-x86_64-nlohmann-json" "mingw-w64-ucrt-x86_64-nodejs" "mingw-w64-ucrt-x86_64-nsis" "mingw-w64-ucrt-x86_64-onevpl" "mingw-w64-ucrt-x86_64-openssl" "mingw-w64-ucrt-x86_64-opus" "mingw-w64-ucrt-x86_64-toolchain" ) # Note: mingw-w64-ucrt-x86_64-rust conflicts with fixed gcc-15.1.0-5 # We install Rust via rustup instead pacman -Syu --noconfirm --ignore="$(IFS=,; echo "${broken_deps[*]}")" "${dependencies[@]}" # install Rust via rustup (for Tauri GUI) echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" echo "📦 Installing Rust via rustup (required for Tauri GUI)" echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" # check if cargo already exists if command -v cargo &> /dev/null; then echo "✅ Rust already installed: $(cargo --version)" else echo "📥 Downloading and installing rustup..." # download rustup-init for Windows curl --proto '=https' --tlsv1.2 -sSf https://win.rustup.rs/x86_64 -o /tmp/rustup-init.exe # install rustup with defaults (non-interactive) /tmp/rustup-init.exe -y --default-toolchain stable --profile minimal # add cargo to PATH for current session export PATH="$HOME/.cargo/bin:$PATH" # verify installation if command -v cargo &> /dev/null; then echo "✅ Rust installed successfully: $(cargo --version)" echo " rustc: $(rustc --version)" else echo "❌ Rust installation failed!" echo " Please install manually from: https://rustup.rs/" exit 1 fi fi echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" # build mkdir -p build cmake \ -B build \ -G Ninja \ -S . \ -DBUILD_DOCS=OFF \ -DBUILD_WERROR=ON ninja -C build # skip autobuild echo "skip_autobuild=true" >> "$GITHUB_OUTPUT" ================================================ FILE: .codeql-prebuild-cpp-macOS.sh ================================================ # install dependencies for C++ analysis set -e # install dependencies dependencies=( "cmake" "miniupnpc" "ninja" "node" "openssl@3" "opus" "pkg-config" ) brew install "${dependencies[@]}" # build mkdir -p build cd build || exit 1 cmake \ -DBOOST_USE_STATIC=OFF \ -DBUILD_DOCS=OFF \ -G "Unix Makefiles" .. make -j"$(sysctl -n hw.logicalcpu)" # skip autobuild echo "skip_autobuild=true" >> "$GITHUB_OUTPUT" ================================================ FILE: .coderabbit.yaml ================================================ # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json language: zh-CN early_access: true reviews: profile: chill high_level_summary: true high_level_summary_in_walkthrough: true collapse_walkthrough: false sequence_diagrams: true estimate_code_review_effort: true assess_linked_issues: true related_prs: true poem: false review_status: true review_details: true path_filters: - "!third-party/**" - "!node_modules/**" - "!build/**" - "!cmake-*/**" - "!docs/doxyconfig*" - "!**/*.log" - "!package-lock.json" - "!**/*.obj" - "!**/*.etl" - "!**/*.csv" - "!**/*.cat" - "!**/*.bmp" path_instructions: - path: "src/**/*.{cpp,c,h}" instructions: > Sunshine 核心 C++ 源码,自托管游戏串流服务器。审查要点:内存安全、 线程安全、RAII 资源管理、安全漏洞。注意预处理宏控制的平台相关代码。 - path: "src/platform/**" instructions: > 平台抽象层代码(Windows/Linux/macOS)。确保各平台实现一致, 注意 Windows API 调用的错误处理和资源释放。 - path: "cmake/**" instructions: > CMake 构建系统文件。审查跨平台兼容性、现代 CMake 实践。 - path: "src_assets/**/*.{vue,js,html}" instructions: > 基于 Vue.js 的 Web 配置面板。审查 XSS/CSRF 安全性、 组件设计、状态管理和可访问性。 - path: "docker/**" instructions: > Docker 配置文件。审查最小化基础镜像、层缓存、安全性。 - path: "packaging/**" instructions: > 打包配置(Inno Setup、Flatpak、DEB 等)。审查安装路径、 权限设置和依赖声明的正确性。 - path: "tests/**" instructions: > 测试文件。验证测试覆盖率、边界情况和断言正确性。 auto_review: enabled: true drafts: false base_branches: - master tools: cppcheck: enabled: true shellcheck: enabled: true yamllint: enabled: true markdownlint: enabled: true chat: auto_reply: true knowledge_base: opt_out: false learnings: scope: auto ================================================ FILE: .dockerignore ================================================ # ignore hidden files .* # do not ignore .git, needed for versioning !/.git # do not ignore .rstcheck.cfg, needed to test building docs !/.rstcheck.cfg # ignore repo directories and files docker/ gh-pages-template/ scripts/ tools/ crowdin.yml # don't ignore linux build script !scripts/linux_build.sh # ignore dev directories build/ cmake-*/ venv/ # ignore artifacts artifacts/ ================================================ FILE: .flake8 ================================================ [flake8] filename = *.py, *.pys max-line-length = 120 extend-exclude = venv/ ================================================ FILE: .gitattributes ================================================ # ensure dockerfiles are checked out with LF line endings Dockerfile text eol=lf *.dockerfile text eol=lf # ensure flatpak lint json files are checked out with LF line endings *flatpak-lint-*.json text eol=lf ================================================ FILE: .github/FUNDING.yml ================================================ custom: [ "https://www.ifdian.net/a/qiin2333", "https://www.ifdian.net/a/Yundi339" ] ================================================ FILE: .github/ISSUE_TEMPLATE/bug_report_en.yml ================================================ name: "🐛 Bug Report (English)" description: "Report a bug to help us improve" title: "[Bug]: " labels: ["bug"] body: - type: markdown attributes: value: | ## 📋 Before You Submit Thank you for taking the time to report this issue! This project is **Foundation Sunshine**, a self-hosted game stream host for Moonlight. **Please check before submitting:** - [ ] I have searched existing issues to avoid duplicates - [ ] This issue is specific to **Foundation Sunshine**, not other versions of Sunshine - [ ] I have checked the [documentation](https://docs.qq.com/aio/DSGdQc3htbFJjSFdO?p=YTpMj5JNNdB5hEKJhhqlSB) for solutions - [ ] I am using Windows 10/Windows 11 (Virtual Display feature requires Windows 10 22H2 or higher) --- - type: dropdown id: bug-type attributes: label: "🏷️ Bug Category" description: "What type of bug is this?" options: - "📺 Video Streaming issues" - "🎨 HDR Support issues" - "🖥️ Virtual Display issues" - "🎤 Remote Microphone issues" - "🔊 Audio issues" - "🌐 Network Connection issues" - "🎮 Gamepad/Controller issues" - "⚙️ Settings/Configuration issues" - "💻 Web Control Panel issues" - "💥 Crash/Freeze" - "🔋 Performance/Encoding issues" - "🔧 Pairing/Device Management issues" - "❓ Other" validations: required: true - type: textarea id: describe-bug attributes: label: "📝 Bug Description" description: "Describe the bug clearly and concisely. What happened? What did you expect to happen?" placeholder: | Example: When I start streaming, the video output is black screen. The HDR display is enabled but the stream shows no content. I expect the stream to display the game content correctly. validations: required: true - type: textarea id: steps-reproduce attributes: label: "🔄 Steps to Reproduce" description: "Provide detailed steps to reproduce the issue" placeholder: | 1. Start Sunshine server 2. Connect from Moonlight client 3. Launch a game/application 4. Perform specific action that triggers the bug 5. Bug occurs validations: required: true - type: textarea id: affected-games attributes: label: "🎯 Affected Games/Apps" description: "Which games or applications are affected? Does it happen in all games or specific ones?" placeholder: | - All games/applications - Specific games (list them) - Desktop streaming - Only with HDR enabled validations: required: false - type: dropdown id: reproducibility attributes: label: "🔁 Reproducibility" description: "How often can you reproduce this issue?" options: - "Always (100%)" - "Often (>50%)" - "Sometimes (<50%)" - "Rarely (<10%)" - "Only once" validations: required: false - type: markdown attributes: value: | --- ## 🖥️ Host Server Information - type: dropdown id: host-os attributes: label: "💻 Host Operating System" description: "Operating system running Sunshine (Only Windows 10/Windows 11 supported)" options: - "Windows 10" - "Windows 11" validations: required: true - type: input id: os-version attributes: label: "📌 Windows Specific Version" description: "Please get the specific Windows version from your system (e.g., Windows 10 22H2, Windows 11 23H2, Windows 10 LTSC 2021, etc.)" placeholder: "e.g. Windows 10 22H2 / Windows 11 23H2 / Windows 10 LTSC 2021" validations: required: false - type: input id: sunshine-version attributes: label: "☀️ Sunshine Version" description: "Sunshine server version" placeholder: "e.g. v0.23.1 / commit hash" validations: required: true - type: dropdown id: gpu-vendor attributes: label: "🎨 GPU Vendor" description: "Your GPU manufacturer" options: - "NVIDIA" - "AMD" - "Intel" - "Other/Unknown" validations: required: true - type: input id: gpu-model attributes: label: "🎨 GPU Model & Driver" description: "GPU model and driver version" placeholder: "e.g. RTX 4090 / Driver 545.92" validations: required: false - type: dropdown id: encoder attributes: label: "🔧 Video Encoder" description: "Which encoder is being used?" options: - "NVENC (NVIDIA)" - "AMD VCE" - "Intel QSV" - "Software (x264/x265)" - "Auto/Unknown" validations: required: false - type: markdown attributes: value: | --- ## 📱 Client Information (Optional) - type: input id: client-device attributes: label: "📱 Client Device" description: "Moonlight client device and version (if relevant)" placeholder: "e.g. Android Moonlight V+ v12.5.1 / Windows Moonlight-QT / iOS VoidLink" validations: required: false - type: markdown attributes: value: | --- ## 🔧 Configuration & Troubleshooting - type: dropdown id: settings-default attributes: label: "⚙️ Configuration Modified?" description: "Have you changed any Sunshine settings from default?" options: - "No, using default settings" - "Yes, configuration modified" validations: required: false - type: textarea id: settings-adjusted-settings attributes: label: "📋 Modified Configuration" description: "If you modified settings, list them here (bitrate, encoder, HDR, display, etc.)" validations: required: false - type: markdown attributes: value: | --- ## 📎 Additional Information - type: textarea id: screenshots attributes: label: "📸 Screenshots/Videos" description: "If applicable, add screenshots or screen recordings to help explain the problem" placeholder: "Drag and drop images/videos here" validations: required: false - type: textarea id: logs attributes: label: "📜 Log Output" description: "If you have relevant log output, paste it here. Especially helpful for connection or crash issues" render: shell validations: required: false - type: textarea id: additional attributes: label: "💬 Additional Information" description: "What settings have been modified besides default settings?" placeholder: | Example: - Modified settings: Resolution, bitrate, encoder, etc. - Network: Local LAN / Internet / VPN - Connection type: WiFi 6 / 5GHz / Ethernet - Display: Resolution, refresh rate, multi-monitor setup - HDR: Display model, HDR settings - Controller: Xbox / PlayStation / Other - Special software: Antivirus, firewall, other streaming software validations: required: false ================================================ FILE: .github/ISSUE_TEMPLATE/bug_report_zh.yml ================================================ name: "🐛 问题报告(中文)" description: "报告问题帮助我们改进" title: "[Bug]: " labels: ["bug"] body: - type: markdown attributes: value: | ## 📋 提交前请注意 感谢您花时间报告这个问题! 此项目是 **Foundation Sunshine**,一个自托管的游戏串流服务器。 **提交前请检查** - [ ] 我已搜索现有 issues,避免重复提交 - [ ] 此问题针对 **Foundation Sunshine**,不是其他版本的 Sunshine - [ ] 我已查阅[使用文档](https://docs.qq.com/aio/DSGdQc3htbFJjSFdO?p=YTpMj5JNNdB5hEKJhhqlSB)寻找解决方案 - [ ] 我使用的是 Windows 10/Windows 11(虚拟显示器功能需要 Windows 10 22H2 及以上版本) --- - type: dropdown id: bug-type attributes: label: "🏷️ 问题类型" description: "这是什么类型的问题?" options: - "📺 视频串流问题" - "🎨 HDR 支持问题" - "🖥️ 虚拟显示器问题" - "🎤 远程麦克风问题" - "🔊 音频问题" - "🌐 网络连接问题" - "🎮 手柄/控制器问题" - "⚙️ 设置/配置问题" - "💻 Web 控制面板问题" - "💥 崩溃/卡死" - "🔋 性能/编码问题" - "🔧 配对/设备管理问题" - "❓ 其他" validations: required: true - type: textarea id: describe-bug attributes: label: "📝 问题描述" description: "清晰简洁地描述问题。发生了什么?您期望发生什么?" placeholder: | 示例: 当我开始串流时,视频输出是黑屏。HDR 显示器已启用,但串流显示没有内容。我期望串流能正确显示游戏内容。 validations: required: true - type: textarea id: steps-reproduce attributes: label: "🔄 复现步骤" description: "提供详细的复现步骤" placeholder: | 1. 启动 Sunshine 服务器 2. 从 Moonlight 客户端连接 3. 启动游戏/应用 4. 执行触发问题的特定操作 5. 问题出现 validations: required: true - type: textarea id: affected-games attributes: label: "🎯 受影响的游戏/应用" description: "哪些游戏或应用受到影响?是所有游戏都有问题还是特定游戏?" placeholder: | - 所有游戏/应用 - 特定游戏(请列出) - 桌面串流 - 仅在启用 HDR 时 validations: required: false - type: dropdown id: reproducibility attributes: label: "🔁 可复现性" description: "多久能复现一次此问题?" options: - "总是发生 (100%)" - "经常发生 (>50%)" - "有时发生 (<50%)" - "很少发生 (<10%)" - "只发生过一次" validations: required: false - type: markdown attributes: value: | --- ## 🖥️ 主机服务器信息 - type: dropdown id: host-os attributes: label: "💻 主机操作系统" description: "运行 Sunshine 的操作系统(仅支持 Windows 10/Windows 11)" options: - "Windows 10" - "Windows 11" validations: required: true - type: input id: os-version attributes: label: "📌 Windows 具体版本" description: "请从系统中获取 Windows 的具体版本信息(如:Windows 10 22H2、Windows 11 23H2、Windows 10 LTSC 2021 等)" placeholder: "例如: Windows 10 22H2 / Windows 11 23H2 / Windows 10 LTSC 2021" validations: required: false - type: input id: sunshine-version attributes: label: "☀️ Sunshine 版本" description: "Sunshine 服务器版本" placeholder: "例如: v0.23.1 / commit hash" validations: required: true - type: dropdown id: gpu-vendor attributes: label: "🎨 显卡厂商" description: "您的显卡制造商" options: - "NVIDIA" - "AMD" - "Intel" - "其他/未知" validations: required: true - type: input id: gpu-model attributes: label: "🎨 显卡型号及驱动" description: "显卡型号和驱动版本" placeholder: "例如: RTX 4090 / 驱动 545.92" validations: required: false - type: dropdown id: encoder attributes: label: "🔧 视频编码器" description: "使用哪个编码器?" options: - "NVENC (NVIDIA)" - "AMD VCE" - "Intel QSV" - "软件编码 (x264/x265)" - "自动/未知" validations: required: false - type: markdown attributes: value: | --- ## 📱 客户端信息(可选) - type: input id: client-device attributes: label: "📱 客户端设备" description: "Moonlight 客户端设备和版本(如相关)" placeholder: "例如: Android Moonlight V+ v12.5.1 / Windows Moonlight-QT / iOS VoidLink" validations: required: false - type: markdown attributes: value: | --- ## 🔧 配置与故障排除 - type: dropdown id: settings-default attributes: label: "⚙️ 是否修改过配置?" description: "您是否修改过默认配置?" options: - "否,使用默认设置" - "是,已修改配置" validations: required: false - type: textarea id: settings-adjusted-settings attributes: label: "📋 已修改的配置" description: "如果修改了设置,请列出(码率、编码器、HDR、显示器等)" validations: required: false - type: markdown attributes: value: | --- ## 📎 附加信息 - type: textarea id: screenshots attributes: label: "📸 截图/视频" description: "如有必要,请添加截图或录屏来帮助说明问题" placeholder: "在此处拖放图片/视频" validations: required: false - type: textarea id: logs attributes: label: "📜 日志输出" description: "如有相关日志输出,请粘贴在此。对于连接或崩溃问题特别有帮助" render: shell validations: required: false - type: textarea id: additional attributes: label: "💬 其他补充" description: "除了默认设置外还修改了什么内容?" placeholder: | 示例: - 修改的设置: 分辨率、码率、编码器等 - 网络: 本地局域网 / 外网 / VPN - 连接类型: WiFi 6 / 5GHz / 有线 - 显示器: 分辨率、刷新率、多显示器设置 - HDR: 显示器型号、HDR 设置 - 手柄: Xbox / PlayStation / 其他 - 特殊软件: 杀毒软件、防火墙、其他串流软件 validations: required: false ================================================ FILE: .github/ISSUE_TEMPLATE/config.yml ================================================ blank_issues_enabled: false ================================================ FILE: .github/ISSUE_TEMPLATE/feature_request_en.yml ================================================ name: "✨ Feature Request (English)" description: "Suggest a new feature or improvement" title: "[Feature]: " labels: ["enhancement"] body: - type: markdown attributes: value: | ## 💡 Feature Request Thank you for taking the time to suggest a new feature! This project is **Foundation Sunshine**, a self-hosted game stream host for Moonlight. **⚠️ Important: This template is only for submitting Sunshine server-side feature requests. Client-side (Moonlight) issues should not be submitted here.** **Please check before submitting:** - [ ] I have searched existing issues and feature requests to avoid duplicates - [ ] This feature is not already available in the latest version - [ ] This feature is specific to the server-side (Sunshine), not the client-side (Moonlight) - [ ] I am using Windows 10/Windows 11 (Virtual Display feature requires Windows 10 22H2 or higher) --- - type: dropdown id: feature-type attributes: label: "🏷️ Feature Category" description: "What type of feature is this?" options: - "🎨 HDR Support" - "🖥️ Virtual Display" - "🎤 Remote Microphone" - "📺 Video Encoding/Streaming" - "🔊 Audio Processing" - "🌐 Network/Connection" - "💻 Web Control Panel" - "⚙️ Configuration/Settings" - "🔧 Device/Pairing Management" - "🎮 Controller/Input Support" - "🔋 Performance Optimization" - "📊 Monitoring/Logging" - "🔒 Security/Authentication" - "❓ Other" validations: required: false - type: dropdown id: priority attributes: label: "📊 Priority" description: "How important is this feature to you?" options: - "🔴 Critical - Can't use app without it" - "🟠 High - Significantly improves experience" - "🟡 Medium - Nice to have" - "🟢 Low - Minor improvement" validations: required: false - type: textarea id: problem attributes: label: "😤 Problem Statement" description: "Is your feature request related to a problem? Describe the frustration" placeholder: | Example: When streaming ends, my game doesn't close and continues running in the background. validations: required: true - type: textarea id: solution attributes: label: "💡 Proposed Solution" description: "Describe the solution you'd like. Be as specific as possible" placeholder: | Example: I need a feature that can execute specified background commands when streaming ends. It would be much better if this feature could be supported. validations: required: true - type: textarea id: alternatives attributes: label: "🔄 Alternative Solutions" description: "Have you considered any alternative solutions or workarounds?" placeholder: | Example: 1. Use third-party scripts to execute commands when streaming ends 2. Implement similar functionality through Task Scheduler 3. Manually manage game processes validations: required: false - type: textarea id: use-case attributes: label: "🎯 Use Case" description: "Describe a specific scenario where this feature would be useful" placeholder: | Example: When streaming ends, I need to automatically close the game process to free up system resources. This feature would help me manage multiple streaming sessions more efficiently. validations: required: false - type: dropdown id: willing-to-test attributes: label: "🧪 Willing to Test?" description: "Would you be willing to test this feature if implemented?" options: - "Yes, I can test and provide feedback" - "Maybe, depends on timing" - "No" validations: required: false - type: markdown attributes: value: | --- ## 📎 Additional Information - type: textarea id: screenshots attributes: label: "📸 Mockups/References" description: "Add mockups, sketches, or reference screenshots from other apps that have similar features" placeholder: "Drag and drop images here" validations: required: false - type: textarea id: additional attributes: label: "💬 Additional Information" description: "Log information, what settings have been modified besides default settings?" placeholder: | Example: - Log level: Verbose/Debug - Modified settings: Resolution, bitrate, encoder, etc. validations: required: false - type: markdown attributes: value: | --- ## 🖥️ System Information (Optional) - type: dropdown id: host-os attributes: label: "💻 Host Operating System" description: "Your host OS (Only Windows 10/Windows 11 supported)" options: - "Windows 10" - "Windows 11" validations: required: false - type: input id: os-version attributes: label: "📌 Windows Specific Version" description: "Please get the specific Windows version from your system (e.g., Windows 10 22H2, Windows 11 23H2, Windows 10 LTSC 2021, etc.)" placeholder: "e.g. Windows 10 22H2 / Windows 11 23H2 / Windows 10 LTSC 2021" validations: required: false - type: dropdown id: gpu-vendor attributes: label: "🎨 GPU Vendor" description: "Your GPU manufacturer (if relevant to the feature)" options: - "NVIDIA" - "AMD" - "Intel" - "Not applicable" - "Other/Unknown" validations: required: false ================================================ FILE: .github/ISSUE_TEMPLATE/feature_request_zh.yml ================================================ name: "✨ 功能建议(中文)" description: "建议新功能或改进" title: "[Feature]: " labels: ["enhancement"] body: - type: markdown attributes: value: | ## 💡 功能建议 感谢您花时间提出新功能建议! 此项目是 **Foundation Sunshine**,一个自托管的游戏串流服务器。 **⚠️ 重要提示:此模板仅用于提交 Sunshine 服务器端的功能建议,客户端(Moonlight)相关问题请勿在此提交。** **提交前请检查** - [ ] 我已搜索现有 issues,避免重复 - [ ] 此功能在最新版本中尚不可用 - [ ] 此功能针对服务器端(Sunshine),而非客户端(Moonlight) - [ ] 我使用的是 Windows 10/Windows 11(虚拟显示器功能需要 Windows 10 22H2 及以上版本) --- - type: dropdown id: feature-type attributes: label: "🏷️ 功能类别" description: "这是什么类型的功能?" options: - "� 界面体验" - "🎨 HDR 支持" - "🖥️ 虚拟显示器" - "🎤 远程麦克风" - "📺 视频编码/串流" - "🔊 音频处理" - "🌐 网络/连接" - "💻 控制面板" - "⚙️ 配置/设置" - "🔧 设备/配对管理" - "🎮 控制器/输入支持" - "🔋 性能优化" - "📊 监控/日志" - "🔒 安全/认证" - "❓ 其他" validations: required: false - type: dropdown id: priority attributes: label: "📊 优先级" description: "这个功能对您有多重要?" options: - "🔴 关键 - 没有它无法使用" - "🟠 高 - 显著改善体验" - "🟡 中 - 有了更好" - "🟢 低 - 小改进" validations: required: false - type: textarea id: problem attributes: label: "😤 问题描述" description: "您的功能请求是否与某个问题相关?请描述您遇到的困扰" placeholder: | 示例: 当我串流结束时,我的游戏没有关闭,而是继续在后台运行。 validations: required: true - type: textarea id: solution attributes: label: "💡 建议的解决方案" description: "描述您希望的解决方案。请尽可能具体" placeholder: | 示例: 我需要一个功能,当串流结束时,能够执行指定后台命令,如果能够支持这个功能会好得多。 validations: required: true - type: textarea id: alternatives attributes: label: "🔄 替代方案" description: "您是否考虑过任何替代解决方案或变通办法?" placeholder: | 示例: 1. 使用第三方脚本在串流结束时执行命令 2. 通过任务计划程序实现类似功能 3. 手动管理游戏进程 validations: required: false - type: textarea id: use-case attributes: label: "🎯 使用场景" description: "描述一个这个功能会很有用的具体场景" placeholder: | 示例: 当串流结束时,我需要自动关闭游戏进程以释放系统资源。这个功能将帮助我更高效地管理多个串流会话。 validations: required: false - type: dropdown id: willing-to-test attributes: label: "🧪 愿意测试吗?" description: "如果实现了此功能,您愿意帮忙测试吗?" options: - "是,我可以测试并提供反馈" - "也许,取决于时间" - "否" validations: required: false - type: markdown attributes: value: | --- ## 📎 附加信息 - type: textarea id: screenshots attributes: label: "📸 效果图/参考" description: "添加效果图、草图,或其他有类似功能的应用的参考截图" placeholder: "在此处拖放图片" validations: required: false - type: textarea id: additional attributes: label: "💬 其他补充" description: "日志信息、除了默认设置外还修改了什么内容?" placeholder: | 示例: - 日志级别: 详细/调试 - 修改的设置: 分辨率、码率、编码器等 validations: required: false - type: markdown attributes: value: | --- ## 🖥️ 系统信息(可选) - type: dropdown id: host-os attributes: label: "💻 主机操作系统" description: "您的主机操作系统(仅支持 Windows 10/Windows 11)" options: - "Windows 10" - "Windows 11" validations: required: false - type: input id: os-version attributes: label: "📌 Windows 具体版本" description: "请从系统中获取 Windows 的具体版本信息(如:Windows 10 22H2、Windows 11 23H2、Windows 10 LTSC 2021 等)" placeholder: "例如: Windows 10 22H2 / Windows 11 23H2 / Windows 10 LTSC 2021" validations: required: false - type: dropdown id: gpu-vendor attributes: label: "🎨 显卡厂商" description: "您的显卡制造商(如与功能相关)" options: - "NVIDIA" - "AMD" - "Intel" - "不适用" - "其他/未知" validations: required: false ================================================ FILE: .github/RELEASE_TEMPLATE.md ================================================ ## What's Changed ### ✨ New Features * **feat:** 功能描述 by [@用户名](https://github.com/用户名) in [#PR号](https://github.com/qiin2333/Sunshine-Foundation/pull/PR号) ### 🔧 Improvements & Refactors * **refactor:** 改进描述 by [@用户名](https://github.com/用户名) in [#PR号](https://github.com/qiin2333/Sunshine-Foundation/pull/PR号) * **chore:** 任务描述 by [@用户名](https://github.com/用户名) in [#PR号](https://github.com/qiin2333/Sunshine-Foundation/pull/PR号) ### 🐛 Bug Fixes * **fix:** 修复描述 by [@用户名](https://github.com/用户名) in [#PR号](https://github.com/qiin2333/Sunshine-Foundation/pull/PR号) --- ## ⚠️ 注意事项 * 版本特定的注意事项,例如驱动更新要求、配置变更等 --- ## 🎉 New Contributors * [@用户名](https://github.com/用户名) made their first contribution in [#PR号](https://github.com/qiin2333/Sunshine-Foundation/pull/PR号) --- **Full Changelog**: https://github.com/qiin2333/Sunshine-Foundation/compare/PREVIOUS_TAG...CURRENT_TAG --- ## 👥 Contributors | 用户名
用户名

合并次数 merges | | :---: | ================================================ FILE: .github/workflows/main.yml ================================================ name: Build and Release on: pull_request: branches: - master types: - opened - synchronize - reopened push: branches: - master release: types: [published] workflow_dispatch: concurrency: group: '${{ github.workflow }}-${{ github.ref }}' cancel-in-progress: true jobs: github_env: name: GitHub Env Debug runs-on: ubuntu-latest steps: - name: Dump github context run: echo "$GITHUB_CONTEXT" shell: bash env: GITHUB_CONTEXT: ${{ toJson(github) }} setup_release: name: Setup Release outputs: publish_release: ${{ steps.setup_release_auto.outputs.publish_release || steps.setup_release_release.outputs.publish_release || steps.setup_release_manual.outputs.publish_release }} release_body: ${{ steps.setup_release_auto.outputs.release_body || steps.setup_release_release.outputs.release_body || steps.setup_release_manual.outputs.release_body }} release_commit: ${{ steps.setup_release_auto.outputs.release_commit || steps.setup_release_release.outputs.release_commit || steps.setup_release_manual.outputs.release_commit }} release_generate_release_notes: ${{ steps.setup_release_auto.outputs.release_generate_release_notes || steps.setup_release_release.outputs.release_generate_release_notes || steps.setup_release_manual.outputs.release_generate_release_notes }} release_tag: ${{ steps.setup_release_auto.outputs.release_tag || steps.setup_release_release.outputs.release_tag || steps.setup_release_manual.outputs.release_tag }} release_version: ${{ steps.setup_release_auto.outputs.release_version || steps.setup_release_release.outputs.release_version || steps.setup_release_manual.outputs.release_version }} permissions: contents: write # read does not work to check squash and merge details runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 - name: Debug GitHub Event run: | echo "GitHub Event Name: ${{ github.event_name }}" echo "Has commits field: ${{ contains(toJson(github.event), 'commits') }}" - name: Setup Release (Auto) id: setup_release_auto if: github.event_name != 'workflow_dispatch' && github.event_name != 'release' uses: LizardByte/setup-release-action@v2025.426.225 with: github_token: ${{ secrets.GITHUB_TOKEN }} - name: Setup Release (Release event) id: setup_release_release if: github.event_name == 'release' env: RELEASE_BODY: ${{ github.event.release.body }} run: | TAG="${{ github.event.release.tag_name }}" SUFFIX=$([ "${{ github.event.release.target_commitish }}" = "master" ] && echo "" || echo "-dev") echo "publish_release=true" >> $GITHUB_OUTPUT { echo "release_body<> $GITHUB_OUTPUT echo "release_commit=${{ github.event.release.target_commitish }}" >> $GITHUB_OUTPUT echo "release_generate_release_notes=false" >> $GITHUB_OUTPUT echo "release_tag=${TAG}${SUFFIX}" >> $GITHUB_OUTPUT echo "release_version=${TAG}${SUFFIX}" >> $GITHUB_OUTPUT - name: Setup Release (Manual) id: setup_release_manual if: github.event_name == 'workflow_dispatch' run: | SUFFIX=$([ "${{ github.ref_name }}" = "master" ] && echo "" || echo "-dev") echo "publish_release=false" >> $GITHUB_OUTPUT echo "release_body=Manual build (${{ github.ref_name }})" >> $GITHUB_OUTPUT echo "release_commit=${{ github.sha }}" >> $GITHUB_OUTPUT echo "release_generate_release_notes=false" >> $GITHUB_OUTPUT echo "release_tag=manual-$(date +%Y%m%d-%H%M%S)${SUFFIX}" >> $GITHUB_OUTPUT echo "release_version=manual-$(date +%Y%m%d-%H%M%S)${SUFFIX}" >> $GITHUB_OUTPUT build_win: name: Windows needs: setup_release runs-on: windows-latest steps: - name: Checkout uses: actions/checkout@v4 with: ref: ${{ github.event_name == 'release' && github.event.release.tag_name || github.sha }} submodules: recursive - name: Setup Dependencies Windows uses: msys2/setup-msys2@v2 with: msystem: ucrt64 update: true install: >- wget curl - name: Update Windows dependencies env: gcc_version: '15.1.0-5' opus_version: '1.6.1-1' shell: msys2 {0} run: | broken_deps=( "mingw-w64-ucrt-x86_64-gcc" "mingw-w64-ucrt-x86_64-gcc-libs" ) tarballs="" for dep in "${broken_deps[@]}"; do tarball="${dep}-${gcc_version}-any.pkg.tar.zst" # download and install working version wget https://repo.msys2.org/mingw/ucrt64/${tarball} tarballs="${tarballs} ${tarball}" done # download pinned opus version opus_tarball="mingw-w64-ucrt-x86_64-opus-${opus_version}-any.pkg.tar.zst" wget https://repo.msys2.org/mingw/ucrt64/${opus_tarball} # install broken dependencies if [ -n "$tarballs" ]; then pacman -U --noconfirm ${tarballs} fi # install dependencies dependencies=( "git" "mingw-w64-ucrt-x86_64-cmake" "mingw-w64-ucrt-x86_64-ninja" "mingw-w64-ucrt-x86_64-cppwinrt" "mingw-w64-ucrt-x86_64-curl-winssl" "mingw-w64-ucrt-x86_64-graphviz" "mingw-w64-ucrt-x86_64-MinHook" "mingw-w64-ucrt-x86_64-miniupnpc" "mingw-w64-ucrt-x86_64-nlohmann-json" # "mingw-w64-ucrt-x86_64-nodejs" # Replaced by actions/setup-node (vite 8 requires MSVC Node.js) # "mingw-w64-ucrt-x86_64-nsis" # Replaced by Inno Setup "mingw-w64-ucrt-x86_64-onevpl" "mingw-w64-ucrt-x86_64-openssl" "mingw-w64-ucrt-x86_64-toolchain" "mingw-w64-ucrt-x86_64-autotools" ) pacman -Syu --noconfirm --ignore="$(IFS=,; echo "${broken_deps[*]}")" "${dependencies[@]}" # install pinned opus after Syu to prevent upgrade pacman --noconfirm -U ${opus_tarball} - name: Verify Build Tools shell: msys2 {0} run: | echo "Verifying build tools are installed..." which cmake || (echo "cmake not found" && exit 1) which ninja || (echo "ninja not found" && exit 1) which gcc || (echo "gcc not found" && exit 1) echo "All build tools verified successfully" echo " CMake: $(cmake --version | head -1)" echo " Ninja: $(ninja --version)" echo " GCC: $(gcc --version | head -1)" - name: Setup Node.js uses: actions/setup-node@v4 with: node-version: 22 - name: Cache npm dependencies uses: actions/cache@v4 with: path: node_modules key: npm-${{ hashFiles('package.json') }} - name: Build Web UI shell: pwsh run: | npm install New-Item -ItemType Directory -Force -Path build | Out-Null $env:SUNSHINE_SOURCE_ASSETS_DIR = "${{ github.workspace }}\src_assets" $env:SUNSHINE_ASSETS_DIR = "${{ github.workspace }}\build" npm run build - name: Build Windows shell: msys2 {0} env: BRANCH: ${{ github.head_ref || github.ref_name }} BUILD_VERSION: ${{ needs.setup_release.outputs.release_tag }}.杂鱼 COMMIT: ${{ needs.setup_release.outputs.release_commit }} GITHUB_TOKEN: ${{ secrets.DRIVER_DOWNLOAD_TOKEN }} run: | mkdir -p build cmake \ -B build \ -G Ninja \ -S . \ -DBUILD_DOCS=OFF \ -DBUILD_WEB_UI=OFF \ -DSUNSHINE_ASSETS_DIR=assets \ -DSUNSHINE_PUBLISHER_NAME='${{ github.repository_owner }}' \ -DSUNSHINE_PUBLISHER_WEBSITE='https://github.com/qiin2333/Sunshine-Foundation' \ -DSUNSHINE_PUBLISHER_ISSUE_URL='https://github.com/qiin2333/Sunshine-Foundation/issues' ninja -C build - name: Cache Inno Setup id: inno-cache uses: actions/cache@v4 with: path: C:\Program Files (x86)\Inno Setup 6 key: inno-setup-6 - name: Install Inno Setup if: steps.inno-cache.outputs.cache-hit != 'true' shell: pwsh run: | # Download and install Inno Setup 6 (silent install) $url = "https://jrsoftware.org/download.php/is.exe" $installer = "$env:TEMP\innosetup.exe" Invoke-WebRequest -Uri $url -OutFile $installer Start-Process -FilePath $installer -ArgumentList '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-' -Wait - name: Add Inno Setup to PATH shell: pwsh run: | echo "C:\Program Files (x86)\Inno Setup 6" >> $env:GITHUB_PATH - name: Package Windows shell: msys2 {0} run: | mkdir -p artifacts cd build # package - 生成 Inno Setup 安装包和 ZIP 便携版 # 先安装到 staging 目录 cmake --install . --prefix ./inno_staging # 运行 Inno Setup 编译器 "/c/Program Files (x86)/Inno Setup 6/ISCC.exe" sunshine_installer.iss # 生成 ZIP 便携版 cpack -G ZIP --config ./CPackConfig.cmake --verbose # move mv ./cpack_artifacts/Sunshine.exe ../artifacts/sunshine-windows-installer.exe mv ./cpack_artifacts/Sunshine.zip ../artifacts/sunshine-windows-portable.zip - name: Generate Checksums shell: pwsh run: | # 生成 SHA256 校验和 .\scripts\generate-checksums.ps1 -Path .\artifacts -Output "SHA256SUMS.txt" - name: Package Windows Debug Info working-directory: build run: | # use .dbg file extension for binaries to avoid confusion with real packages Get-ChildItem -File -Recurse | ` % { Rename-Item -Path $_.PSPath -NewName $_.Name.Replace(".exe",".dbg") } # save the binaries with debug info 7z -r ` "-xr!CMakeFiles" ` "-xr!cpack_artifacts" ` a "../artifacts/sunshine-win32-debuginfo.7z" "*.dbg" - name: Rename release assets shell: msys2 {0} run: | # Format tag to vYEAR.DATE where DATE is zero-padded to 4 digits TAG="${{ needs.setup_release.outputs.release_tag }}" NEWTAG="$TAG" if [[ "$TAG" =~ ^v([0-9]{4})\.([0-9]+) ]]; then YEAR="${BASH_REMATCH[1]}" DATE_PART="${BASH_REMATCH[2]}" DATE_PADDED=$(printf "%04d" "$DATE_PART") NEWTAG="v${YEAR}.${DATE_PADDED}" fi # 重命名安装包和便携版 mv artifacts/sunshine-windows-installer.exe "artifacts/Sunshine.${NEWTAG}.WindowsInstaller.exe" mv artifacts/sunshine-windows-portable.zip "artifacts/Sunshine.${NEWTAG}.WindowsPortable.zip" - name: Upload Artifacts uses: actions/upload-artifact@v4 with: name: sunshine-windows-r${{ github.run_number }} path: | artifacts/Sunshine.*.WindowsInstaller.exe artifacts/Sunshine.*.WindowsPortable.zip artifacts/SHA256SUMS.txt artifacts/checksums.json if-no-files-found: error - name: Create/Update GitHub Release if: needs.setup_release.outputs.publish_release == 'true' uses: LizardByte/create-release-action@v2025.426.1549 with: allowUpdates: true body: ${{ needs.setup_release.outputs.release_body }} generateReleaseNotes: ${{ needs.setup_release.outputs.release_generate_release_notes }} name: ${{ needs.setup_release.outputs.release_tag }}.杂鱼 prerelease: true tag: ${{ needs.setup_release.outputs.release_tag }}.杂鱼 token: ${{ secrets.GH_BOT_TOKEN }} ================================================ FILE: .github/workflows/sign-and-repackage.yml ================================================ # 签名并重新打包工作流(仅用于正式发布版本) # 流程: # 1. 编译当前分支的代码(只编译一次) # 2. 生成未签名的 ZIP 和 Inno Setup staging 目录 # 3. 将所有 EXE/DLL 文件提交到 SignPath 签名 # 4. 用签名文件重新打包 ZIP 便携版 # 5. 用签名文件替换 Inno Setup staging 目录中的文件并重新打包 # 6. 签名最终的 Inno Setup 安装包 # 注意:只在正式发布(非预发布)时运行,确保代码版本和签名文件一致 name: Sign and Repackage (Release Only) on: release: types: [published] workflow_dispatch: inputs: ref: description: "Branch or tag to checkout (e.g., master, v2025.1116)" required: true default: "master" release-tag: description: "Release tag for naming the output files" required: true jobs: sign-and-repackage: name: Sign Files and Repackage runs-on: windows-latest # 只在正式发布时运行(不是预发布) if: ${{ (github.event_name == 'release' && !github.event.release.prerelease) || github.event_name == 'workflow_dispatch' }} steps: - name: Checkout uses: actions/checkout@v4 with: ref: ${{ github.event.inputs.ref || github.ref }} submodules: recursive - name: Setup Dependencies Windows uses: msys2/setup-msys2@v2 with: msystem: ucrt64 update: true install: >- wget - name: Update Windows dependencies env: gcc_version: '15.1.0-5' shell: msys2 {0} run: | broken_deps=( "mingw-w64-ucrt-x86_64-gcc" "mingw-w64-ucrt-x86_64-gcc-libs" ) tarballs="" for dep in "${broken_deps[@]}"; do tarball="${dep}-${gcc_version}-any.pkg.tar.zst" # download and install working version wget https://repo.msys2.org/mingw/ucrt64/${tarball} tarballs="${tarballs} ${tarball}" done # install broken dependencies if [ -n "$tarballs" ]; then pacman -U --noconfirm ${tarballs} fi # install dependencies dependencies=( "git" "mingw-w64-ucrt-x86_64-cmake" "mingw-w64-ucrt-x86_64-ninja" "mingw-w64-ucrt-x86_64-cppwinrt" "mingw-w64-ucrt-x86_64-curl-winssl" "mingw-w64-ucrt-x86_64-graphviz" "mingw-w64-ucrt-x86_64-MinHook" "mingw-w64-ucrt-x86_64-miniupnpc" "mingw-w64-ucrt-x86_64-nlohmann-json" "mingw-w64-ucrt-x86_64-nodejs" # "mingw-w64-ucrt-x86_64-nsis" # Replaced by Inno Setup "mingw-w64-ucrt-x86_64-onevpl" "mingw-w64-ucrt-x86_64-openssl" "mingw-w64-ucrt-x86_64-opus" "mingw-w64-ucrt-x86_64-toolchain" ) # Note: mingw-w64-ucrt-x86_64-rust conflicts with fixed gcc-15.1.0-5 # We install Rust via rustup in a separate step pacman -Syu --noconfirm --ignore="$(IFS=,; echo "${broken_deps[*]}")" "${dependencies[@]}" - name: Install Rust (for Tauri GUI) shell: msys2 {0} run: | echo "Installing Rust via rustup..." # Rust installs to Windows user directory WINDOWS_USER=$(cmd //c "echo %USERNAME%" | tr -d '\r') CARGO_BIN="/c/Users/${WINDOWS_USER}/.cargo/bin" export PATH="$CARGO_BIN:$PATH" # Check if cargo already exists if command -v cargo &> /dev/null; then echo "Rust already installed: $(cargo --version)" else # Download and install rustup curl --proto '=https' --tlsv1.2 -sSf https://win.rustup.rs/x86_64 -o /tmp/rustup-init.exe /tmp/rustup-init.exe -y --default-toolchain stable --profile minimal # Refresh PATH sleep 3 export PATH="$CARGO_BIN:$PATH" # Verify installation if [ -f "$CARGO_BIN/cargo.exe" ]; then echo "Rust installed successfully: $(cargo --version)" else echo "Warning: Rust installed but cargo not found at $CARGO_BIN" exit 1 fi fi - name: Verify Build Tools shell: msys2 {0} run: | echo "Verifying build tools are installed..." which cmake || (echo "cmake not found" && exit 1) which ninja || (echo "ninja not found" && exit 1) which gcc || (echo "gcc not found" && exit 1) # verify Rust is in PATH WINDOWS_USER=$(cmd //c "echo %USERNAME%" | tr -d '\r') CARGO_BIN="/c/Users/${WINDOWS_USER}/.cargo/bin" export PATH="$CARGO_BIN:$PATH" which cargo || (echo "cargo not found" && exit 1) echo "All build tools verified successfully" echo " CMake: $(cmake --version | head -1)" echo " Ninja: $(ninja --version)" echo " GCC: $(gcc --version | head -1)" echo " Cargo: $(cargo --version)" - name: Build Windows shell: msys2 {0} env: BRANCH: master BUILD_VERSION: ${{ github.event_name == 'release' && github.event.release.tag_name || github.event.inputs.release-tag }}.杂鱼 COMMIT: ${{ github.sha }} run: | # add Rust to PATH for Tauri GUI build WINDOWS_USER=$(cmd //c "echo %USERNAME%" | tr -d '\r') CARGO_BIN="/c/Users/${WINDOWS_USER}/.cargo/bin" export PATH="$CARGO_BIN:$PATH" mkdir -p build cmake \ -B build \ -G Ninja \ -S . \ -DBUILD_DOCS=OFF \ -DSUNSHINE_ASSETS_DIR=assets \ -DSUNSHINE_PUBLISHER_NAME='${{ github.repository_owner }}' \ -DSUNSHINE_PUBLISHER_WEBSITE='https://github.com/qiin2333/Sunshine-Foundation' \ -DSUNSHINE_PUBLISHER_ISSUE_URL='https://github.com/qiin2333/Sunshine-Foundation/issues' ninja -C build ninja -C build sunshine-control-panel # Install Inno Setup - name: Install Inno Setup shell: pwsh run: | $url = "https://jrsoftware.org/download.php/is.exe" $installer = "$env:TEMP\innosetup.exe" Invoke-WebRequest -Uri $url -OutFile $installer Start-Process -FilePath $installer -ArgumentList '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-' -Wait echo "C:\Program Files (x86)\Inno Setup 6" >> $env:GITHUB_PATH # 生成未签名的打包产物 - name: Package unsigned files shell: msys2 {0} run: | cd build # 生成 ZIP 便携版(包含所有文件) cpack -G ZIP --verbose # 生成 Inno Setup staging 目录 echo "Generating Inno Setup staging directory..." cmake --install . --prefix ./inno_staging cd .. # 列出生成的文件 echo "Generated files:" ls -lh build/cpack_artifacts/ # 解压 Portable ZIP 获取所有需要签名的文件 - name: Extract files for signing shell: bash run: | PORTABLE=$(find build/cpack_artifacts -name "*.zip" | head -n 1) if [ -n "$PORTABLE" ]; then echo "Extracting: $PORTABLE" mkdir -p unsigned-files 7z x "$PORTABLE" -o"unsigned-files" -y -aoa echo "Extracted files for signing:" ls -laR unsigned-files/ else echo "No portable ZIP found" exit 1 fi # 上传所有未签名的文件到 SignPath - name: Upload unsigned files for signing id: upload-unsigned uses: actions/upload-artifact@v4 with: name: files-for-signing path: unsigned-files/ # 提交到 SignPath 签名(使用生产策略) - name: Submit to SignPath for signing uses: signpath/github-action-submit-signing-request@v1 with: api-token: ${{ secrets.SIGNPATH_API_TOKEN }} organization-id: ${{ secrets.SIGNPATH_ORGANIZATION_ID }} project-slug: Sunshine-Foundation signing-policy-slug: release-signing artifact-configuration-slug: windows-portable github-artifact-id: "${{ steps.upload-unsigned.outputs.artifact-id }}" output-artifact-directory: signed-files wait-for-completion: true wait-for-completion-timeout-in-seconds: 600 service-unavailable-timeout-in-seconds: 600 # 验证签名 - name: Verify all signatures shell: pwsh run: | Write-Host "Verifying signatures..." $signedFiles = Get-ChildItem -Path "signed-files" -Recurse -File -Include *.exe,*.dll foreach ($file in $signedFiles) { Write-Host "`n=== $($file.Name) ===" $signature = Get-AuthenticodeSignature $file.FullName Write-Host "Status: $($signature.Status)" if ($signature.Status -ne "Valid") { Write-Error "Signature invalid for: $($file.Name)" exit 1 } } Write-Host "`n✓ All signatures are VALID!" -ForegroundColor Green # 使用签名后的文件重新打包 ZIP 便携版 - name: Repackage signed Portable ZIP shell: bash run: | cd signed-files # 使用与输入一致的版本号 if [ -n "${{ github.event.inputs.release-tag }}" ]; then VERSION="${{ github.event.inputs.release-tag }}" elif [ -n "${{ github.event.release.tag_name }}" ]; then VERSION="${{ github.event.release.tag_name }}" else VERSION="v$(date +%Y.%m%d)" fi 7z a "../Sunshine-${VERSION}-Windows-Portable-Signed.zip" * -y cd .. echo "Created signed portable package:" ls -lh Sunshine-*-Portable-Signed.zip # 使用签名文件重新打包 Inno Setup 安装包 - name: Repackage signed Inno Setup installer shell: msys2 {0} run: | echo "Repackaging Inno Setup installer with signed files..." STAGING_DIR="build/inno_staging" # 检查 staging 目录是否存在 if [ ! -d "$STAGING_DIR" ]; then echo "Error: Inno Setup staging directory not found: $STAGING_DIR" ls -laR build/ exit 1 fi # 替换为签名后的文件 SIGNED_SRC="signed-files/Sunshine" echo "Replacing with signed files..." cp -fv "$SIGNED_SRC/sunshine.exe" "$STAGING_DIR/sunshine.exe" cp -fv "$SIGNED_SRC/zlib1.dll" "$STAGING_DIR/zlib1.dll" cp -fv "$SIGNED_SRC/tools/sunshinesvc.exe" "$STAGING_DIR/tools/sunshinesvc.exe" cp -fv "$SIGNED_SRC/tools/qiin-tabtip.exe" "$STAGING_DIR/tools/qiin-tabtip.exe" cp -fv "$SIGNED_SRC/tools/device-toggler.exe" "$STAGING_DIR/tools/device-toggler.exe" cp -fv "$SIGNED_SRC/tools/DevManView.exe" "$STAGING_DIR/tools/DevManView.exe" cp -fv "$SIGNED_SRC/tools/restart64.exe" "$STAGING_DIR/tools/restart64.exe" cp -fv "$SIGNED_SRC/tools/SetDpi.exe" "$STAGING_DIR/tools/SetDpi.exe" cp -fv "$SIGNED_SRC/tools/setreg.exe" "$STAGING_DIR/tools/setreg.exe" cp -fv "$SIGNED_SRC/tools/audio-info.exe" "$STAGING_DIR/tools/audio-info.exe" cp -fv "$SIGNED_SRC/tools/dxgi-info.exe" "$STAGING_DIR/tools/dxgi-info.exe" cp -fv "$SIGNED_SRC/assets/gui/sunshine-gui.exe" "$STAGING_DIR/assets/gui/sunshine-gui.exe" # 运行 Inno Setup 编译器重新打包 echo "Running ISCC to repackage installer..." "/c/Program Files (x86)/Inno Setup 6/ISCC.exe" "build/sunshine_installer.iss" # 使用与 Portable ZIP 一致的版本号 if [ -n "${{ github.event.inputs.release-tag }}" ]; then VERSION="${{ github.event.inputs.release-tag }}" elif [ -n "${{ github.event.release.tag_name }}" ]; then VERSION="${{ github.event.release.tag_name }}" else VERSION="v$(date +%Y.%m%d)" fi mv -fv "build/cpack_artifacts/Sunshine.exe" "Sunshine-${VERSION}-Windows-Installer-Signed.exe" echo "Created signed installer:" ls -lh Sunshine-*-Installer-Signed.exe # 签名最终的 Inno Setup 安装包 - name: Upload installer for final signing id: upload-installer uses: actions/upload-artifact@v4 with: name: installer-for-final-signing path: Sunshine-*-Installer-Signed.exe - name: Sign installer uses: signpath/github-action-submit-signing-request@v1 with: api-token: ${{ secrets.SIGNPATH_API_TOKEN }} organization-id: ${{ secrets.SIGNPATH_ORGANIZATION_ID }} project-slug: Sunshine-Foundation signing-policy-slug: release-signing artifact-configuration-slug: windows-installer github-artifact-id: "${{ steps.upload-installer.outputs.artifact-id }}" output-artifact-directory: final-signed wait-for-completion: true wait-for-completion-timeout-in-seconds: 600 service-unavailable-timeout-in-seconds: 600 # 验证最终签名 - name: Verify final installer signature shell: pwsh run: | $installer = Get-ChildItem "final-signed" -Filter "*.exe" | Select-Object -First 1 if ($installer) { Write-Host "Verifying installer signature..." $signature = Get-AuthenticodeSignature $installer.FullName Write-Host "Status: $($signature.Status)" if ($signature.Status -eq "Valid") { Write-Host "✓ Installer signature is VALID!" -ForegroundColor Green } } # 上传最终的签名文件 - name: Upload final signed packages uses: actions/upload-artifact@v4 with: name: sunshine-windows-fully-signed path: | Sunshine-*-Portable-Signed.zip final-signed/*.exe if-no-files-found: error # 发布到 GitHub Release - name: Create Release uses: softprops/action-gh-release@v1 with: tag_name: ${{ github.event_name == 'release' && github.event.release.tag_name || github.event.inputs.release-tag }} name: ${{ github.event_name == 'release' && github.event.release.name || github.event.inputs.release-tag }} (Signed) files: | Sunshine-*-Portable-Signed.zip final-signed/*.exe draft: true prerelease: true allowUpdates: true env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} ================================================ FILE: .github/workflows/test-signpath.yml ================================================ # SignPath 测试工作流 # 用于手动测试 SignPath 签名功能 name: Test SignPath Signing on: workflow_dispatch: inputs: artifact-name: description: 'Artifact name to sign' required: false default: 'sunshine-windows' run-id: description: 'Run ID to download artifact from (leave empty for latest)' required: false jobs: test-sign: name: Test SignPath runs-on: windows-latest steps: - name: Checkout uses: actions/checkout@v4 # 如果提供了 run-id,从指定的 run 下载 - name: Download specific artifact if: ${{ github.event.inputs.run-id != '' }} uses: actions/download-artifact@v4 with: name: ${{ github.event.inputs.artifact-name }} path: artifacts run-id: ${{ github.event.inputs.run-id }} github-token: ${{ secrets.GITHUB_TOKEN }} # 如果没有提供 run-id,尝试从最近的成功构建下载 - name: Download latest artifact if: ${{ github.event.inputs.run-id == '' }} uses: dawidd6/action-download-artifact@v3 with: workflow: main.yml name: ${{ github.event.inputs.artifact-name }} path: artifacts check_artifacts: true search_artifacts: true - name: List downloaded files shell: bash run: | echo "Downloaded files:" ls -lR artifacts/ # 查找文件 - name: Find installer file id: find-installer shell: bash run: | INSTALLER=$(find artifacts -name "*.exe" -name "*Installer*" | head -n 1) if [ -z "$INSTALLER" ]; then echo "No installer found" echo "has-installer=false" >> $GITHUB_OUTPUT else echo "Found installer: $INSTALLER" echo "installer-file=$INSTALLER" >> $GITHUB_OUTPUT echo "has-installer=true" >> $GITHUB_OUTPUT fi - name: Find portable file id: find-portable shell: bash run: | PORTABLE=$(find artifacts -name "*.zip" -name "*Portable*" | head -n 1) if [ -z "$PORTABLE" ]; then echo "No portable package found" echo "has-portable=false" >> $GITHUB_OUTPUT else echo "Found portable: $PORTABLE" echo "portable-file=$PORTABLE" >> $GITHUB_OUTPUT echo "has-portable=true" >> $GITHUB_OUTPUT fi # 解压 Portable ZIP 以减少一层嵌套 - name: Extract Portable ZIP if: ${{ steps.find-portable.outputs.has-portable == 'true' }} shell: bash run: | mkdir -p artifacts/portable-extracted 7z x "${{ steps.find-portable.outputs.portable-file }}" -o"artifacts/portable-extracted" echo "Extracted portable files:" ls -laR artifacts/portable-extracted/ # 为 Installer 创建单独的 artifact - name: Upload Installer for SignPath id: upload-installer if: ${{ steps.find-installer.outputs.has-installer == 'true' }} uses: actions/upload-artifact@v4 with: name: installer-for-signing path: ${{ steps.find-installer.outputs.installer-file }} # 为 Portable 创建单独的 artifact(上传解压后的文件夹) - name: Upload Portable for SignPath id: upload-portable if: ${{ steps.find-portable.outputs.has-portable == 'true' }} uses: actions/upload-artifact@v4 with: name: portable-for-signing path: artifacts/portable-extracted/ # 测试签名 - Installer - name: Test SignPath - Installer if: ${{ steps.find-installer.outputs.has-installer == 'true' }} uses: signpath/github-action-submit-signing-request@v1 with: api-token: ${{ secrets.SIGNPATH_API_TOKEN }} organization-id: ${{ secrets.SIGNPATH_ORGANIZATION_ID }} project-slug: Sunshine-Foundation signing-policy-slug: test-signing artifact-configuration-slug: windows-installer github-artifact-id: '${{ steps.upload-installer.outputs.artifact-id }}' output-artifact-directory: artifacts/signed/installer wait-for-completion: true wait-for-completion-timeout-in-seconds: 600 service-unavailable-timeout-in-seconds: 600 # 测试签名 - Portable - name: Test SignPath - Portable if: ${{ steps.find-portable.outputs.has-portable == 'true' }} uses: signpath/github-action-submit-signing-request@v1 with: api-token: ${{ secrets.SIGNPATH_API_TOKEN }} organization-id: ${{ secrets.SIGNPATH_ORGANIZATION_ID }} project-slug: Sunshine-Foundation signing-policy-slug: test-signing artifact-configuration-slug: windows-portable github-artifact-id: '${{ steps.upload-portable.outputs.artifact-id }}' output-artifact-directory: artifacts/signed/portable wait-for-completion: true wait-for-completion-timeout-in-seconds: 600 service-unavailable-timeout-in-seconds: 600 # 列出签名后的文件 - name: List signed files shell: bash run: | echo "Signed files:" if [ -d "artifacts/signed" ]; then ls -laR artifacts/signed/ else echo "No signed files directory found" fi # 验证签名 - name: Verify Signatures shell: pwsh run: | if (Test-Path "artifacts/signed") { Write-Host "Verifying signatures..." # 递归搜索所有签名文件 $signedFiles = Get-ChildItem -Path "artifacts/signed" -Recurse -File if ($signedFiles.Count -eq 0) { Write-Warning "No signed files found" } else { Write-Host "Found $($signedFiles.Count) signed file(s)" foreach ($file in $signedFiles) { Write-Host "`n=== Checking: $($file.Name) ===" Write-Host "Path: $($file.FullName)" $signature = Get-AuthenticodeSignature $file.FullName Write-Host "Status: $($signature.Status)" if ($signature.SignerCertificate) { Write-Host "Signer: $($signature.SignerCertificate.Subject)" } if ($signature.TimeStamperCertificate) { Write-Host "Timestamp: $($signature.TimeStamperCertificate.Subject)" } if ($signature.Status -eq "Valid") { Write-Host "✓ Signature is VALID" -ForegroundColor Green } elseif ($signature.Status -eq "NotSigned") { Write-Warning "⚠ File is NOT SIGNED" } else { Write-Warning "⚠ Signature status: $($signature.Status)" } } } } else { Write-Warning "Signed files directory not found" } # 上传已签名的文件 - name: Upload Signed Files uses: actions/upload-artifact@v4 with: name: signpath-test-signed path: artifacts/signed/ if-no-files-found: warn ================================================ FILE: .github/workflows/translate-simple.yml ================================================ name: Simple README Translation on: push: branches: - master paths: - 'README.md' workflow_dispatch: jobs: translate-simple: name: Simple README Translation runs-on: ubuntu-latest permissions: contents: write pull-requests: write steps: - name: Checkout uses: actions/checkout@v4 with: token: ${{ secrets.GITHUB_TOKEN }} - name: Setup Python uses: actions/setup-python@v4 with: python-version: '3.9' - name: Install translation dependencies run: | pip install requests - name: Create translation script run: | cat > translate_simple.py << 'EOF' import os import re import requests # 项目名和术语保护列表 PROTECTED_TERMS = [ 'Sunshine', 'README', 'GitHub', 'CI', 'API', 'Markdown', 'OpenAI', 'DeepL', 'Google Translate', # 可在此添加更多术语 ] def mask_terms(text): for term in PROTECTED_TERMS: text = re.sub(rf'(? language_selector.md << 'EOF' ## 🌐 多语言支持 / Multi-language Support
[![English](https://img.shields.io/badge/English-README.en.md-blue?style=for-the-badge)](README.en.md) [![中文简体](https://img.shields.io/badge/中文简体-README.zh--CN.md-red?style=for-the-badge)](README.md) [![Français](https://img.shields.io/badge/Français-README.fr.md-green?style=for-the-badge)](README.fr.md) [![Deutsch](https://img.shields.io/badge/Deutsch-README.de.md-yellow?style=for-the-badge)](README.de.md) [![日本語](https://img.shields.io/badge/日本語-README.ja.md-purple?style=for-the-badge)](README.ja.md)
--- EOF # Insert language selector after the first line (title) head -n 1 README.md > README.md.new cat language_selector.md >> README.md.new tail -n +2 README.md >> README.md.new # Replace the original file mv README.md.new README.md # Clean up rm language_selector.md echo "✓ Added language selector to main README" fi - name: Create Pull Request uses: peter-evans/create-pull-request@v5 with: token: ${{ secrets.GITHUB_TOKEN }} title: "docs: add multi-language README translations with language selector" body: | ## 自动翻译更新 此PR包含以下语言的README翻译: - English (en) - French (fr) - German (de) - Japanese (ja) ### 翻译说明 - 使用Google Translate API自动翻译 - 保持原始Markdown格式 - 保留所有链接和图片 - 建议人工检查翻译质量 ### 生成的文件 - `README.en.md` - 英语版本 - `README.fr.md` - 法语版本 - `README.de.md` - 德语版本 - `README.ja.md` - 日语版本 ### 新增功能 - 在主README文件中添加了语言选择器 - 用户可以通过徽章快速访问不同语言版本 - 支持5种语言的快速切换 --- *此PR由CI自动生成,当README.md文件更新时触发* branch: docs/translations delete-branch: true commit-message: "docs: add multi-language README translations with language selector [skip ci]" - name: Create summary run: | echo "## Translation Summary" >> $GITHUB_STEP_SUMMARY echo "" >> $GITHUB_STEP_SUMMARY echo "The following README translations were generated:" >> $GITHUB_STEP_SUMMARY echo "" >> $GITHUB_STEP_SUMMARY for file in README.*.md; do if [ -f "$file" ]; then lang=$(echo $file | sed 's/README\.\(.*\)\.md/\1/') echo "- $lang" >> $GITHUB_STEP_SUMMARY fi done echo "" >> $GITHUB_STEP_SUMMARY echo "✓ Language selector added to main README" >> $GITHUB_STEP_SUMMARY ================================================ FILE: .github/workflows/update-driver-versions.yml ================================================ # Update driver version pins in cmake/packaging/FetchDriverDeps.cmake # # Driver binaries are no longer committed to the repo. # CMake downloads them at configure time from GitHub Releases. # This workflow updates the version pins and creates a PR. name: Update Driver Versions on: workflow_dispatch: inputs: component: description: 'Which driver to update' required: true type: choice options: - vmouse - vdd - nefcon - all version: description: 'Release tag (e.g. v1.1.0). Leave empty for latest.' required: false default: '' type: string repository_dispatch: types: [driver-release] jobs: update-version: name: Update Driver Version Pin runs-on: ubuntu-latest permissions: contents: write pull-requests: write steps: - name: Checkout uses: actions/checkout@v4 - name: Resolve versions and update pins shell: bash env: GH_TOKEN: ${{ github.token }} run: | CMAKE_FILE="cmake/packaging/FetchDriverDeps.cmake" COMPONENT="${{ github.event.inputs.component }}" VERSION="${{ github.event.inputs.version }}" # Override with repository_dispatch values if [ "${{ github.event_name }}" = "repository_dispatch" ]; then COMPONENT="${{ github.event.client_payload.component }}" VERSION="${{ github.event.client_payload.version }}" echo "Triggered by repository_dispatch: component=$COMPONENT version=$VERSION" fi resolve_latest() { local repo="$1" local tag tag=$(gh api "repos/${repo}/releases/latest" --jq '.tag_name' 2>/dev/null || echo "") echo "$tag" } update_pin() { local var_name="$1" local new_version="$2" if [ -z "$new_version" ]; then echo "Warning: empty version for ${var_name}, skipping" return fi echo "Updating ${var_name} to ${new_version}" sed -i "s|set(${var_name} \"[^\"]*\"|set(${var_name} \"${new_version}\"|" "$CMAKE_FILE" } declare -A REPOS=( [vmouse]="AlkaidLab/ZakoVirtualMouse" [vdd]="qiin2333/zako-vdd" [nefcon]="nefarius/nefcon" ) declare -A VARS=( [vmouse]="VMOUSE_DRIVER_VERSION" [vdd]="VDD_DRIVER_VERSION" [nefcon]="NEFCON_VERSION" ) if [ "$COMPONENT" = "all" ]; then COMPONENTS=(vmouse vdd nefcon) else COMPONENTS=("$COMPONENT") fi SUMMARY="" for comp in "${COMPONENTS[@]}"; do repo="${REPOS[$comp]}" var="${VARS[$comp]}" ver="$VERSION" if [ -z "$ver" ]; then ver=$(resolve_latest "$repo") fi if [ -n "$ver" ]; then update_pin "$var" "$ver" SUMMARY="${SUMMARY}\n- ${comp}: ${ver}" else echo "Warning: could not resolve version for ${comp}" fi done echo "SUMMARY<> "$GITHUB_ENV" echo -e "$SUMMARY" >> "$GITHUB_ENV" echo "EOF" >> "$GITHUB_ENV" echo "Updated CMake file:" grep -E "^set\((VMOUSE_DRIVER_VERSION|VDD_DRIVER_VERSION|NEFCON_VERSION)" "$CMAKE_FILE" - name: Create PR uses: peter-evans/create-pull-request@v6 with: commit-message: "chore: update driver version pins" title: "Update driver versions" body: | Automated update of driver version pins in `FetchDriverDeps.cmake`. Updated versions: ${{ env.SUMMARY }} CMake will download the new driver binaries at configure time. branch: update-driver-versions delete-branch: true ================================================ FILE: .gitignore ================================================ # Prerequisites *.d # Compiled Object files *.slo *.lo *.o *.obj # Precompiled Headers *.gch *.pch # Compiled Dynamic libraries *.so *.dylib # Fortran module files *.mod *.smod # Compiled Static libraries *.lai *.la *.a *.lib # Executables *.out *.app # JetBrains IDE .idea/ # VSCode IDE .vscode/ .vs/ # build directories build/ cmake-*/ docs/doxyconfig* # Build logs build.log *.log # CMake user presets (personal overrides) CMakeUserPresets.json # npm node_modules/ package-lock.json # Translations *.mo *.pot # Dummy macOS files .DS_Store # Python *.pyc venv/ # Dev notes (analysis docs, guide generation, images) _dev_notes/ # Temp HID trace files temphidtrace* # Windows NUL device artifact nul # Driver binaries (downloaded at build time via FetchDriverDeps.cmake) src_assets/windows/misc/vdd/driver/*.dll src_assets/windows/misc/vdd/driver/*.inf src_assets/windows/misc/vdd/driver/*.cat src_assets/windows/misc/vdd/driver/*.cer src_assets/windows/misc/vdd/driver/*.zip src_assets/windows/misc/vdd/driver/*.exe src_assets/windows/misc/vmouse/driver/*.dll src_assets/windows/misc/vmouse/driver/*.inf src_assets/windows/misc/vmouse/driver/*.cat # Generated files src_assets/common/assets/web/welcome.html src_assets/common/assets/web/dist/ # Local dev scripts build.sh # Vulkan HDR layer source (standalone tool, not part of Sunshine) src/vk_layer_hdr_inject/ ================================================ FILE: .gitmodules ================================================ [submodule "packaging/linux/flatpak/deps/flatpak-builder-tools"] path = packaging/linux/flatpak/deps/flatpak-builder-tools url = https://github.com/flatpak/flatpak-builder-tools.git branch = master [submodule "packaging/linux/flatpak/deps/shared-modules"] path = packaging/linux/flatpak/deps/shared-modules url = https://github.com/flathub/shared-modules.git branch = master [submodule "third-party/build-deps"] path = third-party/build-deps url = https://github.com/LizardByte/build-deps.git branch = dist [submodule "third-party/doxyconfig"] path = third-party/doxyconfig url = https://github.com/LizardByte/doxyconfig.git branch = master [submodule "third-party/googletest"] path = third-party/googletest url = https://github.com/google/googletest.git branch = main [submodule "third-party/inputtino"] path = third-party/inputtino url = https://github.com/games-on-whales/inputtino.git branch = stable [submodule "third-party/moonlight-common-c"] path = third-party/moonlight-common-c url = https://github.com/moonlight-stream/moonlight-common-c.git branch = master [submodule "third-party/nanors"] path = third-party/nanors url = https://github.com/sleepybishop/nanors.git branch = master [submodule "third-party/nvenc-headers/1100"] path = third-party/nvenc-headers/1100 url = https://github.com/FFmpeg/nv-codec-headers.git branch = sdk/11.0 [submodule "third-party/nvenc-headers/1200"] path = third-party/nvenc-headers/1200 url = https://github.com/FFmpeg/nv-codec-headers.git branch = sdk/12.0 [submodule "third-party/nvenc-headers/1202"] path = third-party/nvenc-headers/1202 url = https://github.com/FFmpeg/nv-codec-headers.git branch = master [submodule "third-party/nvapi"] path = third-party/nvapi url = https://github.com/NVIDIA/nvapi.git branch = main [submodule "third-party/Simple-Web-Server"] path = third-party/Simple-Web-Server url = https://github.com/LizardByte-infrastructure/Simple-Web-Server.git branch = master [submodule "third-party/TPCircularBuffer"] path = third-party/TPCircularBuffer url = https://github.com/michaeltyson/TPCircularBuffer.git branch = master [submodule "third-party/tray"] path = third-party/tray url = https://github.com/LizardByte/tray.git branch = master [submodule "third-party/ViGEmClient"] path = third-party/ViGEmClient url = https://github.com/LizardByte/Virtual-Gamepad-Emulation-Client.git branch = master [submodule "third-party/wayland-protocols"] path = third-party/wayland-protocols url = https://github.com/LizardByte-infrastructure/wayland-protocols.git branch = main [submodule "third-party/wlr-protocols"] path = third-party/wlr-protocols url = https://github.com/LizardByte-infrastructure/wlr-protocols.git branch = master [submodule "src_assets/common/sunshine-control-panel"] path = src_assets/common/sunshine-control-panel url = https://github.com/qiin2333/sunshine-control-panel.git branch = master ================================================ FILE: .prettierrc.json ================================================ { "printWidth": 120, "semi": false, "singleQuote": true, "prettier.spaceBeforeFunctionParen": true } ================================================ FILE: .readthedocs.yaml ================================================ --- # .readthedocs.yaml # Read the Docs configuration file # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details version: 2 build: os: ubuntu-24.04 tools: python: "miniconda-latest" commands: - | if [ -f readthedocs_build.sh ]; then doxyconfig_dir="." else doxyconfig_dir="./third-party/doxyconfig" fi chmod +x "${doxyconfig_dir}/readthedocs_build.sh" export DOXYCONFIG_DIR="${doxyconfig_dir}" "${doxyconfig_dir}/readthedocs_build.sh" # using conda, we can get newer doxygen and graphviz than ubuntu provide # https://github.com/readthedocs/readthedocs.org/issues/8151#issuecomment-890359661 conda: environment: third-party/doxyconfig/environment.yml submodules: include: all recursive: true ================================================ FILE: .rstcheck.cfg ================================================ # configuration file for rstcheck, an rst linting tool # https://rstcheck.readthedocs.io/en/latest/usage/config [rstcheck] ignore_directives = doxygenfile, include, mdinclude, tab, todo, ================================================ FILE: CMakeLists.txt ================================================ cmake_minimum_required(VERSION 3.20) # `CMAKE_CUDA_ARCHITECTURES` requires 3.18 # `set_source_files_properties` requires 3.18 # `cmake_path(CONVERT ... TO_NATIVE_PATH_LIST ...)` requires 3.20 # todo - set this conditionally project(Sunshine VERSION 0.0.0 DESCRIPTION "Self-hosted game stream host for Moonlight" HOMEPAGE_URL "https://alkaidlab.com/sunshine") set(PROJECT_LICENSE "GPL-3.0-only") set(PROJECT_FQDN "sunshine.alkaidlab.com") set(PROJECT_BRIEF_DESCRIPTION "GameStream host for Moonlight") # must be <= 35 characters set(PROJECT_LONG_DESCRIPTION "Offering low latency, cloud gaming server capabilities with support for AMD, Intel, \ and Nvidia GPUs for hardware encoding. Software encoding is also available. You can connect to Sunshine from any \ Moonlight client on a variety of devices. A web UI is provided to allow configuration, and client pairing, from \ your favorite web browser. Pair from the local server or any mobile device.") if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) message(STATUS "Setting build type to 'Release' as none was specified.") set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Choose the type of build." FORCE) endif() # set the module path, used for includes set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake") # export compile_commands.json set(CMAKE_EXPORT_COMPILE_COMMANDS ON) # set version info for this build include(${CMAKE_MODULE_PATH}/prep/build_version.cmake) # cmake build flags include(${CMAKE_MODULE_PATH}/prep/options.cmake) # initial prep include(${CMAKE_MODULE_PATH}/prep/init.cmake) # configure special package files, such as sunshine.desktop, Flatpak manifest, Portfile , etc. include(${CMAKE_MODULE_PATH}/prep/special_package_configuration.cmake) # Exit early if END_BUILD is ON, i.e. when only generating package manifests if(${END_BUILD}) return() endif() # project constants include(${CMAKE_MODULE_PATH}/prep/constants.cmake) # load macros include(${CMAKE_MODULE_PATH}/macros/common.cmake) # load dependencies include(${CMAKE_MODULE_PATH}/dependencies/common.cmake) # setup compile definitions include(${CMAKE_MODULE_PATH}/compile_definitions/common.cmake) # target definitions include(${CMAKE_MODULE_PATH}/targets/common.cmake) # packaging include(${CMAKE_MODULE_PATH}/packaging/common.cmake) ================================================ FILE: CMakePresets.json ================================================ { "version": 6, "cmakeMinimumRequired": { "major": 3, "minor": 20, "patch": 0 }, "configurePresets": [ { "name": "dev-win", "displayName": "Windows Dev (Ninja + MSYS2)", "description": "Local Windows development build. Run inside MSYS2 UCRT64 shell.", "generator": "Ninja", "binaryDir": "${sourceDir}/build", "cacheVariables": { "BUILD_DOCS": "OFF", "SUNSHINE_ASSETS_DIR": "assets", "FETCH_DRIVER_DEPS": "OFF" } } ], "buildPresets": [ { "name": "dev", "displayName": "Dev Build", "configurePreset": "dev-win" } ] } ================================================ FILE: DOCKER_README.md ================================================ # Docker ## Important note Starting with v0.18.0, tag names have changed. You may no longer use `latest`, `master`, `vX.X.X`. ## Build your own containers This image provides a method for you to easily use the latest Sunshine release in your own docker projects. It is not intended to use as a standalone container at this point, and should be considered experimental. ```dockerfile ARG SUNSHINE_VERSION=latest ARG SUNSHINE_OS=ubuntu-22.04 FROM lizardbyte/sunshine:${SUNSHINE_VERSION}-${SUNSHINE_OS} # install Steam, Wayland, etc. ENTRYPOINT steam && sunshine ``` ### SUNSHINE_VERSION - `latest`, `master`, `vX.X.X` - commit hash ### SUNSHINE_OS Sunshine images are available with the following tag suffixes, based on their respective base images. - `archlinux` - `debian-bookworm` - `fedora-39` - `fedora-40` - `ubuntu-22.04` - `ubuntu-24.04` ### Tags You must combine the `SUNSHINE_VERSION` and `SUNSHINE_OS` to determine the tag to pull. The format should be `-`. For example, `latest-ubuntu-24.04`. See all our available tags on [docker hub](https://hub.docker.com/r/lizardbyte/sunshine/tags) or [ghcr](https://github.com/LizardByte/Sunshine/pkgs/container/sunshine/versions) for more info. ## Where used This is a list of docker projects using Sunshine. Something missing? Let us know about it! - [Games on Whales](https://games-on-whales.github.io) ## Port and Volume mappings Examples are below of the required mappings. The configuration file will be saved to `/config` in the container. ### Using docker run Create and run the container (substitute your ``): ```bash docker run -d \ --device /dev/dri/ \ --name= \ --restart=unless-stopped \ --ipc=host \ -e PUID= \ -e PGID= \ -e TZ= \ -v :/config \ -p 47984-47990:47984-47990/tcp \ -p 48010:48010 \ -p 47998-48000:47998-48000/udp \ ``` ### Using docker-compose Create a `docker-compose.yml` file with the following contents (substitute your ``): ```yaml version: '3' services: : image: container_name: sunshine restart: unless-stopped volumes: - :/config environment: - PUID= - PGID= - TZ= ipc: host ports: - "47984-47990:47984-47990/tcp" - "48010:48010" - "47998-48000:47998-48000/udp" ``` ### Using podman run Create and run the container (substitute your ``): ```bash podman run -d \ --device /dev/dri/ \ --name= \ --restart=unless-stopped \ --userns=keep-id \ -e PUID= \ -e PGID= \ -e TZ= \ -v :/config \ -p 47984-47990:47984-47990/tcp \ -p 48010:48010 \ -p 47998-48000:47998-48000/udp \ ``` ### Parameters You must substitute the `` with your own settings. Parameters are split into two halves separated by a colon. The left side represents the host and the right side the container. **Example:** `-p external:internal` - This shows the port mapping from internal to external of the container. Therefore `-p 47990:47990` would expose port `47990` from inside the container to be accessible from the host's IP on port `47990` (e.g. `http://:47990`). The internal port must be `47990`, but the external port may be changed (e.g. `-p 8080:47990`). All the ports listed in the `docker run` and `docker-compose` examples are required. | Parameter | Function | Example Value | Required | |-----------------------------|----------------------|--------------------|----------| | `-p :47990` | Web UI Port | `47990` | True | | `-v :/config` | Volume mapping | `/home/sunshine` | True | | `-e PUID=` | User ID | `1001` | False | | `-e PGID=` | Group ID | `1001` | False | | `-e TZ=` | Lookup [TZ value][1] | `America/New_York` | False | For additional configuration, it is recommended to reference the *Games on Whales* [sunshine config](https://github.com/games-on-whales/gow/blob/2e442292d79b9d996f886b8a03d22b6eb6bddf7b/compose/streamers/sunshine.yml). [1]: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones #### User / Group Identifiers: When using data volumes (-v flags) permissions issues can arise between the host OS and the container. To avoid this issue you can specify the user PUID and group PGID. Ensure the data volume directory on the host is owned by the same user you specify. In this instance `PUID=1001` and `PGID=1001`. To find yours use id user as below: ```bash $ id dockeruser uid=1001(dockeruser) gid=1001(dockergroup) groups=1001(dockergroup) ``` If you want to change the PUID or PGID after the image has been built, it will require rebuilding the image. ## Supported Architectures Specifying `lizardbyte/sunshine:latest-` or `ghcr.io/lizardbyte/sunshine:latest-` should retrieve the correct image for your architecture. The architectures supported by these images are shown in the table below. | tag suffix | amd64/x86_64 | arm64/aarch64 | |-----------------|--------------|---------------| | archlinux | ✅ | ❌ | | debian-bookworm | ✅ | ✅ | | fedora-39 | ✅ | ❌ | | fedora-40 | ✅ | ❌ | | ubuntu-22.04 | ✅ | ✅ | | ubuntu-24.04 | ✅ | ✅ |
| Previous | Next | |:-------------------------------|-----------------------------------------------------:| | [Changelog](docs/changelog.md) | [Third-Party Packages](docs/third_party_packages.md) |
================================================ FILE: LICENSE ================================================ GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . ================================================ FILE: NOTICE ================================================ ©2018 Valve Corporation. Steam and the Steam logo are trademarks and/or registered trademarks of Valve Corporation in the U.S. and/or other countries. All rights reserved. ================================================ FILE: README.de.md ================================================ # Sunshine Foundation Edition ## 🌐 Mehrsprachige Unterstützung / Multi-language Support
[![English](https://img.shields.io/badge/English-README.en.md-blue?style=for-the-badge)](README.en.md) [![中文简体](https://img.shields.io/badge/中文简体-README.zh--CN.md-red?style=for-the-badge)](README.md) [![Français](https://img.shields.io/badge/Français-README.fr.md-green?style=for-the-badge)](README.fr.md) [![Deutsch](https://img.shields.io/badge/Deutsch-README.de.md-yellow?style=for-the-badge)](README.de.md) [![日本語](https://img.shields.io/badge/日本語-README.ja.md-purple?style=for-the-badge)](README.ja.md)
--- Ein Fork basierend auf LizardByte/Sunshine, bietet vollständige Dokumentationsunterstützung [Read the Docs](https://docs.qq.com/aio/DSGdQc3htbFJjSFdO?p=YTpMj5JNNdB5hEKJhhqlSB). **Sunshine-Foundation** ist ein selbst gehosteter Game-Stream-Host für Moonlight. Diese Fork-Version hat erhebliche Verbesserungen gegenüber dem ursprünglichen Sunshine vorgenommen und konzentriert sich darauf, das Spiel-Streaming-Erlebnis für verschiedene Streaming-Endgeräte und Windows-Hosts zu verbessern: ### 🌟 Kernfunktionen - **Vollständige HDR-Pipeline-Unterstützung** - Dualformat HDR10 (PQ) + HLG Kodierung mit adaptiven Metadaten für eine breitere Geräteabdeckung - **Virtuelle Anzeige** - Integriertes virtuelles Display-Management, ermöglicht das Erstellen und Verwalten virtueller Displays ohne zusätzliche Software - **Entferntes Mikrofon** - Unterstützt das Empfangen von Client-Mikrofonen und bietet hochwertige Sprachdurchleitung - **Erweiterte Systemsteuerung** - Intuitive Web-Oberfläche zur Konfiguration mit Echtzeit-Überwachung und Verwaltung - **Niedrige Latenzübertragung** - Optimierte Encoder-Verarbeitung unter Nutzung der neuesten Hardware-Fähigkeiten - **Intelligente Paarung** - Intelligentes Management von Profilen für gepaarte Geräte ### 🎬 Vollständige HDR-Pipeline-Architektur **Dual-Format HDR-Kodierung: HDR10 (PQ) + HLG Parallelunterstützung** Herkömmliche Streaming-Lösungen unterstützen nur HDR10 (PQ) mit absoluter Luminanzzuordnung, was erfordert, dass das Client-Display die EOTF-Parameter und Spitzenhelligkeit der Quelle genau reproduziert. Wenn die Fähigkeiten des Empfangsgeräts unzureichend sind oder die Helligkeitsparameter nicht übereinstimmen, treten Tone-Mapping-Artefakte wie abgeschnittene Schatten und überbelichtete Lichter auf. Foundation Sunshine führt HLG-Unterstützung (Hybrid Log-Gamma, ITU-R BT.2100) auf der Kodierungsebene ein. Dieser Standard verwendet eine relative Luminanzzuordnung mit folgenden technischen Vorteilen: - **Szenenreferenzierte Luminanzanpassung**: HLG verwendet eine relative Luminanzkurve, die es dem Display ermöglicht, automatisch Tone Mapping basierend auf seiner eigenen Spitzenhelligkeit durchzuführen — die Erhaltung von Schattendetails auf Geräten mit niedriger Helligkeit ist PQ deutlich überlegen - **Sanfter Highlight-Roll-Off**: Die hybride Log-Gamma-Transferfunktion von HLG bietet einen graduellen Roll-Off in Highlight-Bereichen und vermeidet die Banding-Artefakte, die durch hartes Clipping bei PQ verursacht werden - **Native SDR-Abwärtskompatibilität**: HLG-Signale können von SDR-Displays direkt als Standard-BT.709-Inhalt dekodiert werden, ohne zusätzliches Tone Mapping **Einzelbild-Luminanzanalyse und adaptive Metadatengenerierung** Die Kodierungspipeline integriert ein Echtzeit-Luminanzanalysemodul auf der GPU-Seite, das über Compute Shader für jedes Einzelbild folgende Operationen ausführt: - **MaxFALL / MaxCLL Einzelbild-Berechnung**: Echtzeit-Berechnung des maximalen Inhaltslichtpegels (MaxCLL) und des maximalen durchschnittlichen Bildlichtpegels (MaxFALL) auf Einzelbildebene, dynamisch in HEVC/AV1 SEI/OBU-Metadaten injiziert - **Robuste Ausreißerfilterung**: Perzentilbasierte Abschneidestrategie zur Eliminierung extremer Luminanzpixel (z.B. Spiegelreflexionen), um zu verhindern, dass isolierte Leuchtpunkte die globale Luminanzreferenz anheben und zu einer allgemeinen Bildverdunkelung führen - **Interframe-Exponentialglättung**: EMA-Filterung (Exponentieller gleitender Durchschnitt) auf Luminanzstatistiken über aufeinanderfolgende Frames, zur Beseitigung von Helligkeitsflimmern durch abrupte Metadatenänderungen bei Szenenwechseln **Vollständige HDR-Metadaten-Durchleitung** Unterstützt die vollständige Durchleitung von statischen HDR10-Metadaten (Mastering Display Info + Content Light Level), dynamischen HDR Vivid-Metadaten und HLG-Transfercharakteristik-Kennungen. Dies stellt sicher, dass die von NVENC / AMF / QSV-Encodern ausgegebenen Bitstreams vollständige Farbvolumen- und Luminanzinformationen gemäß der CTA-861-Spezifikation enthalten, sodass Client-Decoder die HDR-Absicht der Quelle präzise reproduzieren können. ### 🖥️ Integriertes virtuelles Display (Erfordert Win10 22H2 oder neuer) - Dynamische Erstellung und Entfernung virtueller Displays - Unterstützung für benutzerdefinierte Auflösungen und Bildwiederholraten - Verwaltung von Mehrfachanzeigekonfigurationen - Echtzeit-Konfigurationsänderungen ohne Neustart ## Empfohlene Moonlight-Clients Für das beste Streaming-Erlebnis wird die Verwendung der folgenden optimierten Moonlight-Clients empfohlen (aktiviert Set-Boni): ### 🖥️ Windows(X86_64, Arm64), MacOS, Linux Clients [![Moonlight-PC](https://img.shields.io/badge/Moonlight-PC-red?style=for-the-badge&logo=windows)](https://github.com/qiin2333/moonlight-qt) ### 📱 Android Client [![Enhanced Edition Moonlight-Android](https://img.shields.io/badge/Enhanced_Edition-Moonlight--Android-green?style=for-the-badge&logo=android)](https://github.com/qiin2333/moonlight-android/releases/tag/shortcut) [![Crown Edition Moonlight-Android](https://img.shields.io/badge/Crown_Edition-Moonlight--Android-blue?style=for-the-badge&logo=android)](https://github.com/WACrown/moonlight-android) ### 📱 iOS Client [![Voidlink Moonlight-iOS](https://img.shields.io/badge/Voidlink-Moonlight--iOS-lightgrey?style=for-the-badge&logo=apple)](https://github.com/The-Fried-Fish/VoidLink) ### 🛠️ Weitere Ressourcen [awesome-sunshine](https://github.com/LizardByte/awesome-sunshine) ## Systemanforderungen > [!WARNING] > Diese Tabellen werden kontinuierlich aktualisiert. Bitte kaufen Sie Hardware nicht nur basierend auf diesen Informationen.
Mindestanforderungen
Komponente Anforderung
GPU AMD: VCE 1.0 oder höher, siehe: obs-amd Hardware-Unterstützung
Intel: VAAPI-kompatibel, siehe: VAAPI Hardware-Unterstützung
Nvidia: Grafikkarte mit NVENC-Unterstützung, siehe: NVENC-Unterstützungsmatrix
CPU AMD: Ryzen 3 oder höher
Intel: Core i3 oder höher
RAM 4GB oder mehr
Betriebssystem Windows: 10 22H2+ (Windows Server unterstützt keine virtuellen Gamepads)
macOS: 12+
Linux/Debian: 12+ (bookworm)
Linux/Fedora: 39+
Linux/Ubuntu: 22.04+ (jammy)
Netzwerk Host: 5GHz, 802.11ac
Client: 5GHz, 802.11ac
Empfohlene Konfiguration für 4K
Komponente Anforderung
GPU AMD: Video Coding Engine 3.1 oder höher
Intel: HD Graphics 510 oder höher
Nvidia: GeForce GTX 1080 oder höhere Modelle mit mehreren Encodern
CPU AMD: Ryzen 5 oder höher
Intel: Core i5 oder höher
Netzwerk Host: CAT5e Ethernet oder besser
Client: CAT5e Ethernet oder besser
## Technischer Support Lösungsweg bei Problemen: 1. Konsultieren Sie die [Nutzungsdokumentation](https://docs.qq.com/aio/DSGdQc3htbFJjSFdO?p=YTpMj5JNNdB5hEKJhhqlSB) [LizardByte-Dokumentation](https://docs.lizardbyte.dev/projects/sunshine/latest/) 2. Aktivieren Sie den detaillierten Log-Level in den Einstellungen, um relevante Informationen zu finden 3. [Treten Sie der QQ-Gruppe bei, um Hilfe zu erhalten](https://qm.qq.com/cgi-bin/qm/qr?k=5qnkzSaLIrIaU4FvumftZH_6Hg7fUuLD&jump_from=webapi) 4. [Benutze zwei Buchstaben!](https://uuyc.163.com/) **Problemrückmeldung-Labels:** - `hdr-support` - Probleme im Zusammenhang mit HDR - `virtual-display` - Probleme mit virtuellen Displays - `config-help` - Probleme im Zusammenhang mit der Konfiguration ## 📚 Entwicklerdokumentation - **[Build-Anleitung](docs/building.md)** - Anleitung zum Kompilieren und Erstellen des Projekts - **[Konfigurationshandbuch](docs/configuration.md)** - Erläuterung der Laufzeit-Konfigurationsoptionen - **[WebUI-Entwicklung](docs/WEBUI_DEVELOPMENT.md)** - Vollständige Anleitung zur Entwicklung der Vue 3 + Vite Web-Oberfläche ## Community beitreten Wir begrüßen die Teilnahme an Diskussionen und Code-Beiträgen! [![QQ-Gruppe beitreten](https://pub.idqqimg.com/wpa/images/group.png 'QQ-Gruppe beitreten')](https://qm.qq.com/cgi-bin/qm/qr?k=WC2PSZ3Q6Hk6j8U_DG9S7522GPtItk0m&jump_from=webapi&authKey=zVDLFrS83s/0Xg3hMbkMeAqI7xoHXaM3sxZIF/u9JW7qO/D8xd0npytVBC2lOS+z) ## Star-Verlauf [![Star-Verlauf Diagramm](https://api.star-history.com/svg?repos=qiin2333/Sunshine-Foundation&type=Date)](https://www.star-history.com/#qiin2333/Sunshine-Foundation&Date) --- **Sunshine Foundation Edition - Macht Game-Streaming eleganter** ================================================ FILE: README.en.md ================================================ # Sunshine Foundation Edition ## 🌐 Multi-language Support
[![English](https://img.shields.io/badge/English-README.en.md-blue?style=for-the-badge)](README.en.md) [![简体中文](https://img.shields.io/badge/简体中文-README.zh--CN.md-red?style=for-the-badge)](README.md) [![Français](https://img.shields.io/badge/Français-README.fr.md-green?style=for-the-badge)](README.fr.md) [![Deutsch](https://img.shields.io/badge/Deutsch-README.de.md-yellow?style=for-the-badge)](README.de.md) [![日本語](https://img.shields.io/badge/日本語-README.ja.md-purple?style=for-the-badge)](README.ja.md)
--- A fork based on LizardByte/Sunshine, providing comprehensive documentation support [Read the Docs](https://docs.qq.com/aio/DSGdQc3htbFJjSFdO?p=YTpMj5JNNdB5hEKJhhqlSB). **Sunshine-Foundation** is a self-hosted game stream host for Moonlight. This forked version introduces significant improvements over the original Sunshine, focusing on enhancing the game streaming experience for various streaming terminal devices connected to a Windows host: ### 🌟 Core Features - **Full HDR Pipeline Support** - Dual-format HDR10 (PQ) + HLG encoding with adaptive metadata, covering a wider range of endpoint devices - **Virtual Display** - Built-in virtual display management, allowing creation and management of virtual displays without additional software - **Remote Microphone** - Supports receiving client microphones, providing high-quality voice passthrough - **Advanced Control Panel** - Intuitive web control interface with real-time monitoring and configuration management - **Low-Latency Transmission** - Optimized encoding processing leveraging the latest hardware capabilities - **Smart Pairing** - Intelligent management of pairing devices with corresponding profiles ### 🎬 Full HDR Pipeline Architecture **Dual-Format HDR Encoding: HDR10 (PQ) + HLG Parallel Support** Conventional streaming solutions only support HDR10 (PQ) absolute luminance mapping, which requires the client display to precisely match the source EOTF parameters and peak brightness. When the receiving device has insufficient capabilities or mismatched brightness parameters, tone mapping artifacts such as crushed blacks and clipped highlights occur. Foundation Sunshine introduces HLG (Hybrid Log-Gamma, ITU-R BT.2100) support at the encoding layer. This standard employs relative luminance mapping with the following technical advantages: - **Scene-Referred Luminance Adaptation**: HLG uses a relative luminance curve, allowing the display to automatically perform tone mapping based on its own peak brightness — shadow detail retention on low-brightness devices is significantly superior to PQ - **Smooth Highlight Roll-Off**: HLG's hybrid log-gamma transfer function provides gradual roll-off in highlight regions, avoiding the banding artifacts caused by PQ's hard clipping - **Native SDR Backward Compatibility**: HLG signals can be directly decoded by SDR displays as standard BT.709 content without additional tone mapping **Per-Frame Luminance Analysis and Adaptive Metadata Generation** The encoding pipeline integrates a real-time luminance analysis module on the GPU side, executing the following via Compute Shaders on each frame: - **Per-Frame MaxFALL / MaxCLL Computation**: Real-time calculation of frame-level Maximum Content Light Level (MaxCLL) and Maximum Frame-Average Light Level (MaxFALL), dynamically injected into HEVC/AV1 SEI/OBU metadata - **Robust Outlier Filtering**: Percentile-based truncation strategy to discard extreme luminance pixels (e.g., specular highlights), preventing isolated bright spots from inflating the global luminance reference and causing overall image dimming - **Inter-Frame Exponential Smoothing**: EMA (Exponential Moving Average) filtering applied to luminance statistics across consecutive frames, eliminating brightness flicker caused by abrupt metadata changes during scene transitions **Complete HDR Metadata Passthrough** Supports full passthrough of HDR10 static metadata (Mastering Display Info + Content Light Level), HDR Vivid dynamic metadata, and HLG transfer characteristic identifiers, ensuring that bitstreams output by NVENC / AMF / QSV encoders carry complete color volume and luminance information compliant with the CTA-861 specification, enabling client decoders to accurately reproduce the source HDR intent. ### 🖥️ Virtual Display Integration (Requires Windows 10 22H2 or newer) - Dynamic virtual display creation and destruction - Custom resolution and refresh rate support - Multi-display configuration management - Real-time configuration changes without restarting ## Recommended Moonlight Clients For the best streaming experience (activating set bonuses), it is recommended to use the following optimized Moonlight clients: ### 🖥️ Windows (X86_64, Arm64), macOS, Linux Clients [![Moonlight-PC](https://img.shields.io/badge/Moonlight-PC-red?style=for-the-badge&logo=windows)](https://github.com/qiin2333/moonlight-qt) ### 📱 Android Clients [![Enhanced Edition Moonlight-Android](https://img.shields.io/badge/Enhanced_Edition-Moonlight--Android-green?style=for-the-badge&logo=android)](https://github.com/qiin2333/moonlight-android/releases/tag/shortcut) [![Crown Edition Moonlight-Android](https://img.shields.io/badge/Crown_Edition-Moonlight--Android-blue?style=for-the-badge&logo=android)](https://github.com/WACrown/moonlight-android) ### 📱 iOS Client [![Voidlink Moonlight-iOS](https://img.shields.io/badge/Voidlink-Moonlight--iOS-lightgrey?style=for-the-badge&logo=apple)](https://github.com/The-Fried-Fish/VoidLink) ### 🛠️ Additional Resources [awesome-sunshine](https://github.com/LizardByte/awesome-sunshine) ## System Requirements > [!WARNING] > These tables are continuously updated. Please do not purchase hardware based solely on this information.
Minimum Requirements
Component Requirement
GPU AMD: VCE 1.0 or later, see: obs-amd hardware support
Intel: VAAPI compatible, see: VAAPI hardware support
Nvidia: Graphics card with NVENC support, see: NVENC support matrix
CPU AMD: Ryzen 3 or higher
Intel: Core i3 or higher
RAM 4GB or more
Operating System Windows: 10 22H2+ (Windows Server does not support virtual gamepads)
macOS: 12+
Linux/Debian: 12+ (bookworm)
Linux/Fedora: 39+
Linux/Ubuntu: 22.04+ (jammy)
Network Host: 5GHz, 802.11ac
Client: 5GHz, 802.11ac
4K Recommended Configuration
Component Requirement
GPU AMD: Video Coding Engine 3.1 or later
Intel: HD Graphics 510 or higher
Nvidia: GeForce GTX 1080 or higher models with multiple encoders
CPU AMD: Ryzen 5 or higher
Intel: Core i5 or higher
Network Host: CAT5e Ethernet or better
Client: CAT5e Ethernet or better
## Technical Support Troubleshooting path when encountering issues: 1. Check the [Usage Documentation](https://docs.qq.com/aio/DSGdQc3htbFJjSFdO?p=YTpMj5JNNdB5hEKJhhqlSB) [LizardByte Documentation](https://docs.lizardbyte.dev/projects/sunshine/latest/) 2. Enable detailed log level in settings to find relevant information 3. [Join the QQ group for help](https://qm.qq.com/cgi-bin/qm/qr?k=5qnkzSaLIrIaU4FvumftZH_6Hg7fUuLD&jump_from=webapi) 4. [Use two letters!](https://uuyc.163.com/) **Issue Feedback Labels:** - `hdr-support` - HDR-related issues - `virtual-display` - Virtual display issues - `config-help` - Configuration-related issues ## 📚 Development Documentation - **[Building Instructions](docs/building.md)** - Project compilation and building instructions - **[Configuration Guide](docs/configuration.md)** - Runtime configuration options explanation - **[WebUI Development](docs/WEBUI_DEVELOPMENT.md)** - Complete guide for Vue 3 + Vite web interface development ## Join the Community We welcome everyone to participate in discussions and contribute code! [![Join QQ Group](https://pub.idqqimg.com/wpa/images/group.png 'Join QQ Group')](https://qm.qq.com/cgi-bin/qm/qr?k=WC2PSZ3Q6Hk6j8U_DG9S7522GPtItk0m&jump_from=webapi&authKey=zVDLFrS83s/0Xg3hMbkMeAqI7xoHXaM3sxZIF/u9JW7qO/D8xd0npytVBC2lOS+z) ## Star History [![Star History Chart](https://api.star-history.com/svg?repos=qiin2333/Sunshine-Foundation&type=Date)](https://www.star-history.com/#qiin2333/Sunshine-Foundation&Date) --- **Sunshine Foundation Edition - Making Game Streaming More Elegant** ``` ================================================ FILE: README.fr.md ================================================ # Sunshine Foundation ## 🌐 Support multilingue / Multi-language Support
[![English](https://img.shields.io/badge/English-README.en.md-blue?style=for-the-badge)](README.en.md) [![中文简体](https://img.shields.io/badge/简体中文-README.zh--CN.md-red?style=for-the-badge)](README.md) [![Français](https://img.shields.io/badge/Français-README.fr.md-green?style=for-the-badge)](README.fr.md) [![Deutsch](https://img.shields.io/badge/Deutsch-README.de.md-yellow?style=for-the-badge)](README.de.md) [![日本語](https://img.shields.io/badge/日本語-README.ja.md-purple?style=for-the-badge)](README.ja.md)
--- Fork basé sur LizardByte/Sunshine, offrant une documentation complète [Lire la documentation](https://docs.qq.com/aio/DSGdQc3htbFJjSFdO?p=YTpMj5JNNdB5hEKJhhqlSB). **Sunshine-Foundation** est un hôte de streaming de jeu auto-hébergé pour Moonlight. Cette version forkée apporte des améliorations significatives par rapport à Sunshine original, en se concentrant sur l'amélioration de l'expérience de streaming de jeu entre divers appareils terminaux et l'hôte Windows : ### 🌟 Fonctionnalités principales - **Support HDR Full Pipeline** - Double encodage HDR10 (PQ) + HLG avec métadonnées adaptatives, couvrant un plus large éventail d'appareils - **Écran virtuel** - Gestion intégrée des écrans virtuels, permettant de créer et gérer des écrans virtuels sans logiciel supplémentaire - **Microphone distant** - Prise en charge de la réception du microphone client, offrant une fonction de transmission vocale de haute qualité - **Panneau de contrôle avancé** - Interface de contrôle Web intuitive avec surveillance en temps réel et gestion de configuration - **Transmission à faible latence** - Traitement de codage optimisé exploitant les dernières capacités matérielles - **Appairage intelligent** - Gestion intelligente des profils correspondants aux appareils appairés ### 🎬 Architecture complète du pipeline HDR **Double format d'encodage HDR : HDR10 (PQ) + HLG en parallèle** Les solutions de streaming conventionnelles ne prennent en charge que le HDR10 (PQ) avec mappage de luminance absolue, ce qui exige que l'écran client reproduise précisément les paramètres EOTF et la luminosité maximale de la source. Lorsque les capacités de l'appareil récepteur sont insuffisantes ou que les paramètres de luminosité ne correspondent pas, des artefacts de tone mapping apparaissent, tels que la perte de détails dans les ombres et l'écrêtage des hautes lumières. Foundation Sunshine introduit la prise en charge du HLG (Hybrid Log-Gamma, ITU-R BT.2100) au niveau de l'encodage. Ce standard utilise un mappage de luminance relatif avec les avantages techniques suivants : - **Adaptation de luminance référencée à la scène** : Le HLG utilise une courbe de luminance relative, permettant à l'écran d'effectuer automatiquement le tone mapping en fonction de sa propre luminosité maximale — la préservation des détails d'ombre sur les appareils à faible luminosité est significativement supérieure au PQ - **Roll-off progressif des hautes lumières** : La fonction de transfert log-gamma hybride du HLG fournit un roll-off graduel dans les zones de haute luminosité, évitant les artefacts de banding causés par l'écrêtage dur du PQ - **Compatibilité ascendante native SDR** : Les signaux HLG peuvent être directement décodés par les écrans SDR comme du contenu standard BT.709 sans traitement de tone mapping supplémentaire **Analyse de luminance image par image et génération adaptative de métadonnées** Le pipeline d'encodage intègre un module d'analyse de luminance en temps réel côté GPU, exécutant via des Compute Shaders sur chaque image : - **Calcul MaxFALL / MaxCLL par image** : Calcul en temps réel du niveau de lumière maximal du contenu (MaxCLL) et du niveau de lumière moyen maximal par image (MaxFALL), injectés dynamiquement dans les métadonnées HEVC/AV1 SEI/OBU - **Filtrage robuste des valeurs aberrantes** : Stratégie de troncature par percentile pour éliminer les pixels de luminance extrême (ex. réflexions spéculaires), empêchant les points lumineux isolés d'élever la référence de luminance globale et de provoquer un assombrissement global de l'image - **Lissage exponentiel inter-images** : Filtrage EMA (Moyenne Mobile Exponentielle) appliqué aux statistiques de luminance sur les images consécutives, éliminant le scintillement de luminosité causé par les changements brusques de métadonnées lors des transitions de scène **Transmission complète des métadonnées HDR** Prise en charge de la transmission complète des métadonnées statiques HDR10 (Mastering Display Info + Content Light Level), des métadonnées dynamiques HDR Vivid et des identifiants de caractéristiques de transfert HLG, garantissant que les flux de bits produits par les encodeurs NVENC / AMF / QSV transportent des informations complètes de volume colorimétrique et de luminance conformes à la spécification CTA-861, permettant aux décodeurs clients de reproduire fidèlement l'intention HDR de la source. ### 🖥️ Intégration d'écran virtuel (nécessite Windows 10 22H2 ou plus récent) - Création et destruction dynamique d'écrans virtuels - Prise en charge des résolutions et taux de rafraîchissement personnalisés - Gestion de configuration multi-écrans - Modifications de configuration en temps réel sans redémarrage ## Clients Moonlight recommandés Il est recommandé d'utiliser les clients Moonlight suivants optimisés pour une expérience de streaming optimale (activation des propriétés du set) : ### 🖥️ Clients Windows(X86_64, Arm64), MacOS, Linux [![Moonlight-PC](https://img.shields.io/badge/Moonlight-PC-red?style=for-the-badge&logo=windows)](https://github.com/qiin2333/moonlight-qt) ### 📱 Client Android [![Édition renforcée Moonlight-Android](https://img.shields.io/badge/Édition_renforcée-Moonlight--Android-green?style=for-the-badge&logo=android)](https://github.com/qiin2333/moonlight-android/releases/tag/shortcut) [![Édition Crown Moonlight-Android](https://img.shields.io/badge/Édition_Crown-Moonlight--Android-blue?style=for-the-badge&logo=android)](https://github.com/WACrown/moonlight-android) ### 📱 Client iOS [![Terminal Void Moonlight-iOS](https://img.shields.io/badge/Voidlink-Moonlight--iOS-lightgrey?style=for-the-badge&logo=apple)](https://github.com/The-Fried-Fish/VoidLink) ### 🛠️ Autres ressources [awesome-sunshine](https://github.com/LizardByte/awesome-sunshine) ## Configuration système requise > [!WARNING] > Ces tableaux sont continuellement mis à jour. Veuillez ne pas acheter de matériel uniquement sur la base de ces informations.
Configuration minimale requise
Composant Exigence
GPU AMD : VCE 1.0 ou version ultérieure, voir : obs-amd support matériel
Intel : Compatible VAAPI, voir : Support matériel VAAPI
Nvidia : Carte graphique supportant NVENC, voir : Matrice de support nvenc
CPU AMD : Ryzen 3 ou supérieur
Intel : Core i3 ou supérieur
RAM 4GB ou plus
Système d'exploitation Windows : 10 22H2+ (Windows Server ne prend pas en charge les manettes de jeu virtuelles)
macOS : 12+
Linux/Debian : 12+ (bookworm)
Linux/Fedora : 39+
Linux/Ubuntu : 22.04+ (jammy)
Réseau Hôte : 5GHz, 802.11ac
Client : 5GHz, 802.11ac
Configuration recommandée pour la 4K
Composant Exigence
GPU AMD : Video Coding Engine 3.1 ou supérieur
Intel : HD Graphics 510 ou supérieur
Nvidia : GeForce GTX 1080 ou modèles supérieurs avec encodeurs multiples
CPU AMD : Ryzen 5 ou supérieur
Intel : Core i5 ou supérieur
Réseau Hôte : Ethernet CAT5e ou supérieur
Client : Ethernet CAT5e ou supérieur
## Support technique Procédure de résolution des problèmes : 1. Consultez la [documentation d'utilisation](https://docs.qq.com/aio/DSGdQc3htbFJjSFdO?p=YTpMj5JNNdB5hEKJhhqlSB) [Documentation LizardByte](https://docs.lizardbyte.dev/projects/sunshine/latest/) 2. Activez le niveau de journalisation détaillé dans les paramètres pour trouver des informations pertinentes 3. [Rejoignez le groupe QQ pour obtenir de l'aide](https://qm.qq.com/cgi-bin/qm/qr?k=5qnkzSaLIrIaU4FvumftZH_6Hg7fUuLD&jump_from=webapi) 4. [Utilisez deux lettres !](https://uuyc.163.com/) **Étiquettes de signalement des problèmes :** - `hdr-support` - Problèmes liés au HDR - `virtual-display` - Problèmes d'écran virtuel - `config-help` - Problèmes de configuration ## 📚 Documentation de développement - **[Instructions de compilation](docs/building.md)** - Instructions pour compiler et construire le projet - **[Guide de configuration](docs/configuration.md)** - Description des options de configuration d'exécution - **[Développement WebUI](docs/WEBUI_DEVELOPMENT.md)** - Guide complet du développement de l'interface Web Vue 3 + Vite ## Rejoignez la communauté Nous accueillons favorablement les discussions et les contributions de code ! [![Rejoindre le groupe QQ](https://pub.idqqimg.com/wpa/images/group.png 'Rejoindre le groupe QQ')](https://qm.qq.com/cgi-bin/qm/qr?k=WC2PSZ3Q6Hk6j8U_DG9S7522GPtItk0m&jump_from=webapi&authKey=zVDLFrS83s/0Xg3hMbkMeAqI7xoHXaM3sxZIF/u9JW7qO/D8xd0npytVBC2lOS+z) ## Historique des stars [![Graphique d'historique des stars](https://api.star-history.com/svg?repos=qiin2333/Sunshine-Foundation&type=Date)](https://www.star-history.com/#qiin2333/Sunshine-Foundation&Date) --- **Sunshine Foundation - Rendre le streaming de jeux plus élégant** ``` ================================================ FILE: README.ja.md ================================================ # Sunshine 基地版 ## 🌐 多言語サポート / Multi-language Support
[![English](https://img.shields.io/badge/English-README.en.md-blue?style=for-the-badge)](README.en.md) [![中文简体](https://img.shields.io/badge/中文简体-README.zh--CN.md-red?style=for-the-badge)](README.md) [![Français](https://img.shields.io/badge/Français-README.fr.md-green?style=for-the-badge)](README.fr.md) [![Deutsch](https://img.shields.io/badge/Deutsch-README.de.md-yellow?style=for-the-badge)](README.de.md) [![日本語](https://img.shields.io/badge/日本語-README.ja.md-purple?style=for-the-badge)](README.ja.md)
--- LizardByte/Sunshineをベースにしたフォークで、完全なドキュメントサポートを提供します [Read the Docs](https://docs.qq.com/aio/DSGdQc3htbFJjSFdO?p=YTpMj5JNNdB5hEKJhhqlSB)。 **Sunshine-Foundation** はMoonlight用のセルフホスト型ゲームストリームホストです。このフォークバージョンはオリジナルのSunshineに基づき、様々なストリーミング端末とWindowsホスト間のゲームストリーミング体験を向上させることに重点を置いた大幅な改良が加えられています: ### 🌟 コア機能 - **HDR フルパイプラインサポート** - HDR10 (PQ) + HLG デュアルフォーマットエンコーディングとアダプティブメタデータにより、幅広い端末デバイスをカバー - **仮想ディスプレイ** - 内蔵の仮想ディスプレイ管理により、追加ソフトウェアなしで仮想ディスプレイの作成と管理が可能 - **リモートマイク** - クライアントマイクの受信をサポートし、高音質の音声パススルー機能を提供 - **高度なコントロールパネル** - 直感的なWebコントロールインターフェースで、リアルタイム監視と設定管理を提供 - **低遅延伝送** - 最新のハードウェア能力を活用した最適化されたエンコード処理 - **インテリジェントペアリング** - ペアリングデバイスの対応プロファイルをインテリジェントに管理 ### 🎬 HDR フルパイプライン技術アーキテクチャ **デュアルフォーマット HDR エンコーディング:HDR10 (PQ) + HLG 並列サポート** 従来のストリーミングソリューションは HDR10 (PQ) の絶対輝度マッピングのみをサポートしており、クライアントディスプレイがソース側の EOTF パラメータとピーク輝度を正確に再現することが求められます。受信デバイスの能力が不十分な場合やパラメータが一致しない場合、暗部ディテールの消失やハイライトクリッピングなどのトーンマッピングアーティファクトが発生します。 Foundation Sunshine はエンコーディング層に HLG(Hybrid Log-Gamma、ITU-R BT.2100)サポートを追加しました。この規格は相対輝度マッピングを採用し、以下の技術的優位性を備えています: - **シーン参照型輝度適応**:HLG は相対輝度カーブに基づいており、ディスプレイ側が自身のピーク輝度に基づいて自動的にトーンマッピングを実行 — 低輝度デバイスでの暗部ディテール保持は PQ を大幅に上回る - **ハイライト領域のスムーズなロールオフ**:HLG のハイブリッド対数ガンマ伝達関数は高輝度領域で漸進的なロールオフを提供し、PQ のハードクリッピングによるバンディングアーティファクトを回避 - **ネイティブ SDR 後方互換性**:HLG 信号は SDR ディスプレイで標準 BT.709 コンテンツとして直接デコード可能。追加のトーンマッピング処理は不要 **フレームごとの輝度分析とアダプティブメタデータ生成** エンコーディングパイプラインは GPU 側にリアルタイム輝度分析モジュールを統合し、Compute Shader を介して各フレームに対して以下を実行します: - **MaxFALL / MaxCLL フレーム単位計算**:フレームレベルの最大コンテンツ輝度(MaxCLL)とフレーム平均輝度(MaxFALL)をリアルタイムで計算し、HEVC/AV1 SEI/OBU メタデータに動的に注入 - **ロバストな外れ値フィルタリング**:パーセンタイルベースの切断戦略により極端な輝度ピクセル(例:鏡面反射ハイライト)を除去。孤立した高輝度点がグローバル輝度参照を引き上げ、画面全体が暗くなることを防止 - **フレーム間指数平滑化**:連続フレームの輝度統計値に EMA(指数移動平均)フィルタリングを適用し、シーン遷移時のメタデータ急変による輝度フリッカーを解消 **完全な HDR メタデータパススルー** HDR10 静的メタデータ(Mastering Display Info + Content Light Level)、HDR Vivid ダイナミックメタデータ、および HLG 伝送特性識別子の完全なパススルーをサポートし、NVENC / AMF / QSV エンコーダが出力するビットストリームが CTA-861 仕様に準拠した完全な色域・輝度情報を含むことを保証します。これにより、クライアントデコーダがソース側の HDR インテントを正確に再現できます。 ### 🖥️ 仮想ディスプレイ統合 (win10 22H2 以降のシステムが必要) - 動的な仮想ディスプレイの作成と破棄 - カスタム解像度とリフレッシュレートのサポート - マルチディスプレイ設定管理 - 再起動不要のリアルタイム設定変更 ## 推奨されるMoonlightクライアント 最適なストリーミング体験を得るために、以下の最適化されたMoonlightクライアントの使用を推奨します(セット効果を発動): ### 🖥️ Windows(X86_64, Arm64), MacOS, Linux クライアント [![Moonlight-PC](https://img.shields.io/badge/Moonlight-PC-red?style=for-the-badge&logo=windows)](https://github.com/qiin2333/moonlight-qt) ### 📱 Androidクライアント [![威力加强版 Moonlight-Android](https://img.shields.io/badge/威力加强版-Moonlight--Android-green?style=for-the-badge&logo=android)](https://github.com/qiin2333/moonlight-android/releases/tag/shortcut) [![王冠版 Moonlight-Android](https://img.shields.io/badge/王冠版-Moonlight--Android-blue?style=for-the-badge&logo=android)](https://github.com/WACrown/moonlight-android) ### 📱 iOSクライアント [![虚空终端 Moonlight-iOS](https://img.shields.io/badge/Voidlink-Moonlight--iOS-lightgrey?style=for-the-badge&logo=apple)](https://github.com/The-Fried-Fish/VoidLink) ### 🛠️ その他のリソース [awesome-sunshine](https://github.com/LizardByte/awesome-sunshine) ## システム要件 > [!WARNING] > これらの表は継続的に更新中です。この情報のみに基づいてハードウェアを購入しないでください。
最小システム要件
コンポーネント 要件
GPU AMD: VCE 1.0以降、参照: obs-amdハードウェアサポート
Intel: VAAPI互換、参照: VAAPIハードウェアサポート
Nvidia: NVENC対応グラフィックカード、参照: nvencサポートマトリックス
CPU AMD: Ryzen 3以降
Intel: Core i3以降
RAM 4GB以上
オペレーティングシステム Windows: 10 22H2+ (Windows Serverは仮想ゲームパッドをサポートしません)
macOS: 12+
Linux/Debian: 12+ (bookworm)
Linux/Fedora: 39+
Linux/Ubuntu: 22.04+ (jammy)
ネットワーク ホスト: 5GHz, 802.11ac
クライアント: 5GHz, 802.11ac
4K推奨構成
コンポーネント 要件
GPU AMD: Video Coding Engine 3.1以降
Intel: HD Graphics 510以降
Nvidia: GeForce GTX 1080以降のマルチエンコーダ対応モデル
CPU AMD: Ryzen 5以降
Intel: Core i5以降
ネットワーク ホスト: CAT5eイーサネット以上
クライアント: CAT5eイーサネット以上
## テクニカルサポート 問題が発生した場合の解決手順: 1. [使用ドキュメント](https://docs.qq.com/aio/DSGdQc3htbFJjSFdO?p=YTpMj5JNNdB5hEKJhhqlSB) [LizardByteドキュメント](https://docs.lizardbyte.dev/projects/sunshine/latest/)を確認 2. 設定で詳細なログレベルを有効にして関連情報を見つける 3. [QQグループに参加してヘルプを入手](https://qm.qq.com/cgi-bin/qm/qr?k=5qnkzSaLIrIaU4FvumftZH_6Hg7fUuLD&jump_from=webapi) 4. [二文字を使おう!](https://uuyc.163.com/) **問題フィードバックタグ:** - `hdr-support` - HDR関連の問題 - `virtual-display` - 仮想ディスプレイの問題 - `config-help` - 設定関連の問題 ## 📚 開発ドキュメント - **[ビルド手順](docs/building.md)** - プロジェクトのコンパイルとビルド手順 - **[設定ガイド](docs/configuration.md)** - 実行時設定オプションの説明 - **[WebUI開発](docs/WEBUI_DEVELOPMENT.md)** - Vue 3 + Vite Webインターフェース開発完全ガイド ## コミュニティに参加 ディスカッションとコード貢献を歓迎します! [![QQグループに参加](https://pub.idqqimg.com/wpa/images/group.png 'QQグループに参加')](https://qm.qq.com/cgi-bin/qm/qr?k=WC2PSZ3Q6Hk6j8U_DG9S7522GPtItk0m&jump_from=webapi&authKey=zVDLFrS83s/0Xg3hMbkMeAqI7xoHXaM3sxZIF/u9JW7qO/D8xd0npytVBC2lOS+z) ## Star History [![Star History Chart](https://api.star-history.com/svg?repos=qiin2333/Sunshine-Foundation&type=Date)](https://www.star-history.com/#qiin2333/Sunshine-Foundation&Date) --- **Sunshine基地版 - ゲームストリーミングをよりエレガントに** ``` ================================================ FILE: README.md ================================================
Foundation Sunshine
[![English](https://img.shields.io/badge/English-blue?style=flat-square)](README.en.md) [![中文简体](https://img.shields.io/badge/中文简体-red?style=flat-square)](README.md) [![Français](https://img.shields.io/badge/Français-green?style=flat-square)](README.fr.md) [![Deutsch](https://img.shields.io/badge/Deutsch-yellow?style=flat-square)](README.de.md) [![日本語](https://img.shields.io/badge/日本語-purple?style=flat-square)](README.ja.md) 基于 [LizardByte/Sunshine](https://github.com/LizardByte/Sunshine) 的增强分支,专注于 Windows 游戏串流体验 [使用文档](https://docs.qq.com/aio/DSGdQc3htbFJjSFdO?p=YTpMj5JNNdB5hEKJhhqlSB) · [LizardByte 文档](https://docs.lizardbyte.dev/projects/sunshine/latest/) · [QQ 交流群](https://qm.qq.com/cgi-bin/qm/qr?k=5qnkzSaLIrIaU4FvumftZH_6Hg7fUuLD&jump_from=webapi)
--- ### ░▒▓ 核心特性 - **HDR 全链路** — 双格式编码 (PQ + HLG)・逐帧 GPU 亮度分析・HDR10+ / HDR Vivid 动态元数据・完整静态元数据透传 - **虚拟显示器** — 深度集成 [ZakoVDD](https://github.com/qiin2333/zako-vdd)・5 种屏幕模式・Named Pipe 通信・多客户端 GUID 会话 - **音频增强** — 7.1.4 环绕声 (12ch)・Opus DRED 丢包恢复・持续音频流・远程麦克风・虚拟扬声器位深匹配 - **编码优化** — NVENC SDK 13.0・AMF QVBR/HQVBR・编码器结果缓存 (260x)・自适应下采样・Vulkan 编码器 - **控制面板** — Tauri 2 + Vue 3 + Vite・深色模式・QR 配对・实时监控 - **智能配对** — 客户端独立配置・自动匹配设备能力・虚拟鼠标驱动 (vmouse) ### ░▒▓ 技术细节
HDR 全链路技术方案 #### 双格式 HDR 编码:HDR10 (PQ) + HLG 并行支持 传统串流方案仅支持 HDR10 (PQ) 绝对亮度映射,当终端设备能力不足或亮度参数不匹配时,会出现暗部细节丢失、高光截断等问题。 因此在编码层加入了 HLG(Hybrid Log-Gamma, ITU-R BT.2100)支持,采用相对亮度映射: - **场景参考式亮度适配**:HLG 基于相对亮度曲线,显示端根据自身峰值亮度自动进行色调映射,低亮度设备上暗部细节保留显著优于 PQ - **高光区域平滑滚降**:HLG 的对数-伽马混合传输函数在高亮区域提供渐进式滚降,避免 PQ 硬截断导致的高光色阶断裂 - **天然 SDR 向后兼容**:HLG 信号可直接被 SDR 显示器解码为标准 BT.709 画面,无需额外的色调映射处理 **逐帧亮度分析与自适应元数据生成** 在 GPU 端集成了实时亮度分析模块,通过 Compute Shader 对每帧画面执行: - **MaxFALL / MaxCLL 逐帧计算**:实时统计帧级最大内容亮度(MaxCLL)和帧平均亮度(MaxFALL),动态注入 HEVC/AV1 SEI/OBU 元数据 - **异常值鲁棒过滤**:采用百分位截断策略剔除极端亮度像素(如高光镜面反射),防止孤立高亮点拉高全局亮度参考导致整体画面偏暗 - **帧间指数平滑**:对连续帧的亮度统计值应用 EMA(指数移动平均)滤波,消除场景切换时元数据突变引发的亮度闪烁 **完整 HDR 元数据透传** HDR10 静态元数据(Mastering Display Info + Content Light Level)完整透传,NVENC / AMF / QSV 编码输出的码流携带符合 CTA-861 规范的完整色彩容积与亮度信息。 **HDR10+ / HDR Vivid 动态元数据注入** 在 NVENC 编码管线中,基于逐帧亮度分析结果,自动生成并注入以下动态元数据 SEI: - **HDR10+ (ST 2094-40)**:携带场景级 MaxSCL / distribution percentiles / knee point 等色调映射参考,支持 Samsung/Panasonic 等 HDR10+ 认证电视精确色调映射 - **HDR Vivid (CUVA T/UWA 005.3)**:ITU-T T.35 注册的中国超高清视频联盟(CUVA)标准,PQ 模式下提供绝对亮度色调映射、HLG 模式下提供场景参考相对亮度色调映射,覆盖国产终端生态
虚拟显示器集成 (需 Windows 10 22H2+) 深度集成 [ZakoVDD](https://github.com/qiin2333/zako-vdd) 虚拟显示器驱动: - 自定义分辨率和刷新率支持,10-bit HDR 色深 - **5 种屏幕组合模式**:仅虚拟屏、仅物理屏、混合模式、镜像模式、扩展模式 - Named Pipe 实时通信,串流开始/结束时自动创建/销毁虚拟显示器 - 每个客户端独立绑定 VDD 会话(GUID),支持多客户端快速切换 - 无需重启的实时配置更改
音频增强 - **7.1.4 环绕声 (12声道)**:Dolby Atmos 等沉浸式音频布局的完整声道映射 - **Opus DRED 深度冗余**:基于神经网络的丢包恢复,100ms 冗余窗口在网络抖动时平滑补偿 - **持续音频流**:无中断的音频流,无声时自动填充静音数据,避免音频设备反复初始化 - **虚拟扬声器自动匹配**:自动检测并匹配 16bit/24bit 等位深格式的虚拟音频设备
捕获与编码优化 **捕获管线** - **Gamma-Aware 着色器**:根据 DXGI ColorSpace 自动选择 sRGB / 线性 Gamma 颜色转换 - **高质量下采样**:双三次 (Bicubic) 插值,支持 fast / balanced / high_quality 三档 - **动态分辨率检测**:实时感知显示器分辨率与旋转变化,编码器自适应调整 - **GPU 亮度分析**:Compute Shader 两阶段规约、P95/P99 截断、帧间 EMA 时域平滑 **NVENC** - **SDK 13.0**:精细化码率控制与 Look-ahead - **HDR 元数据 API**:NVENC SDK 12.2+ 原生 Mastering Display / Content Light Level 写入 - **HDR10+ / HDR Vivid SEI**:逐帧自动生成 ST 2094-40 和 CUVA T.35 动态元数据 - **SPS 码流规范**:H.264/HEVC SPS bitstream restrictions 完整写入 **AMF (AMD)** - **QVBR / HQVBR / HQCBR**:高级码率控制,支持质量等级 UI 调节 - **AV1 低延迟**:AV1 编码器无延迟影响的优化选项 **通用** - **编码器结果缓存**:探测结果持久化,后续连接 26s → <100ms (260x 加速) - **自适应下采样**:支持双线性 / 双三次 / 高质量三档分辨率缩放,适配 4K 主机→1080p 串流场景 - **Vulkan 编码器**:实验性 Vulkan 视频编码支持 - **无锁证书链**:`shared_mutex` 替代 mutex,消除 TLS 队列开销

--- ### ░▒▓ 推荐客户端 搭配以下优化版 Moonlight 客户端可获得最佳体验(激活套装属性) - **PC** — [Moonlight-PC](https://github.com/qiin2333/moonlight-qt)(Windows · macOS · Linux) - **Android** — [威力加强版](https://github.com/qiin2333/moonlight-vplus) · [王冠版](https://github.com/WACrown/moonlight-android) - **iOS** — [VoidLink](https://github.com/The-Fried-Fish/VoidLink-previously-moonlight-zwm) - **鸿蒙** — [Moonlight V+](https://appgallery.huawei.com/app/detail?id=com.alkaidlab.sdream) 更多资源:[awesome-sunshine](https://github.com/LizardByte/awesome-sunshine)
░▒▓ 系统要求 | 组件 | 最低要求 | 4K 推荐 | |------|----------|---------| | **GPU** | AMD VCE 1.0+ / Intel VAAPI / NVIDIA NVENC | AMD VCE 3.1+ / Intel HD 510+ / GTX 1080+ | | **CPU** | Ryzen 3 / Core i3 | Ryzen 5 / Core i5 | | **RAM** | 4 GB | 8 GB | | **系统** | Windows 10 22H2+ | Windows 10 22H2+ | | **网络** | 5GHz 802.11ac | CAT5e 以太网 | GPU 兼容性:[NVENC](https://developer.nvidia.com/video-encode-and-decode-gpu-support-matrix-new) · [AMD VCE](https://github.com/obsproject/obs-amd-encoder/wiki/Hardware-Support) · [Intel VAAPI](https://www.intel.com/content/www/us/en/developer/articles/technical/linuxmedia-vaapi.html)
--- ### ░▒▓ 文档与支持 [![Docs](https://img.shields.io/badge/使用文档-ff69b4?style=flat-square)](https://docs.qq.com/aio/DSGdQc3htbFJjSFdO?p=YTpMj5JNNdB5hEKJhhqlSB) [![LizardByte](https://img.shields.io/badge/LizardByte_文档-a78bfa?style=flat-square)](https://docs.lizardbyte.dev/projects/sunshine/latest/) [![QQ群](https://img.shields.io/badge/QQ_交流群-38bdf8?style=flat-square)](https://qm.qq.com/cgi-bin/qm/qr?k=5qnkzSaLIrIaU4FvumftZH_6Hg7fUuLD&jump_from=webapi) 想帮杂鱼写代码? → [![Build](https://img.shields.io/badge/构建说明-34d399?style=flat-square)](docs/building.md) [![Config](https://img.shields.io/badge/配置指南-fbbf24?style=flat-square)](docs/configuration.md) [![WebUI](https://img.shields.io/badge/WebUI_开发-fb923c?style=flat-square)](docs/WEBUI_DEVELOPMENT.md)
「 ░▒▓ 」
[![加入QQ群](https://pub.idqqimg.com/wpa/images/group.png '加入QQ群')](https://qm.qq.com/cgi-bin/qm/qr?k=WC2PSZ3Q6Hk6j8U_DG9S7522GPtItk0m&jump_from=webapi&authKey=zVDLFrS83s/0Xg3hMbkMeAqI7xoHXaM3sxZIF/u9JW7qO/D8xd0npytVBC2lOS+z) [![Star History Chart](https://api.star-history.com/svg?repos=qiin2333/Sunshine-Foundation&type=Date)](https://www.star-history.com/#qiin2333/Sunshine-Foundation&Date)
================================================ FILE: README.md.backup ================================================ # Sunshine 基地版 基于LizardByte/Sunshine的分支,提供完整的文档支持 [Read the Docs](https://docs.qq.com/aio/DSGdQc3htbFJjSFdO?p=YTpMj5JNNdB5hEKJhhqlSB)。 **Sunshine-Foundation** is a self-hosted game stream host for Moonlight,本分支版本在原始Sunshine基础上进行了重大改进,专注于提高各种串流终端设备与windows主机接入的游戏串流体验: ### 🌟 核心特性 - **HDR友好支持** - 经过优化的HDR处理管线,提供真正的HDR游戏流媒体体验 - **集成虚拟显示器** - 内置虚拟显示器管理,无需额外软件即可创建和管理虚拟显示器 - **远程麦克风** - 支持接收客户端麦克风,提供高音质的语音直通功能 - **高级控制面板** - 直观的Web控制界面,提供实时监控和配置管理 - **低延迟传输** - 结合最新硬件能力优化的编码处理 - **智能配对** - 智能管理配对设备的对应配置文件 ### 🖥️ 虚拟显示器集成 (需win10 22H2 及更新的系统) - 动态虚拟显示器创建和销毁 - 自定义分辨率和刷新率支持 - 多显示器配置管理 - 无需重启的实时配置更改 ## 推荐的Moonlight客户端 建议使用以下经过优化的Moonlight客户端获得最佳的串流体验(激活套装属性): ### 🖥️ Windows(X86_64, Arm64), MacOS, Linux 客户端 [![Moonlight-PC](https://img.shields.io/badge/Moonlight-PC-red?style=for-the-badge&logo=windows)](https://github.com/qiin2333/moonlight-qt) ### 📱 Android客户端 [![威力加强版 Moonlight-Android](https://img.shields.io/badge/威力加强版-Moonlight--Android-green?style=for-the-badge&logo=android)](https://github.com/qiin2333/moonlight-android/releases/tag/shortcut) [![王冠版 Moonlight-Android](https://img.shields.io/badge/王冠版-Moonlight--Android-blue?style=for-the-badge&logo=android)](https://github.com/WACrown/moonlight-android) ### 📱 iOS客户端 [![真砖家版 Moonlight-iOS](https://img.shields.io/badge/真砖家版-Moonlight--iOS-lightgrey?style=for-the-badge&logo=apple)](https://github.com/TrueZhuangJia/moonlight-ios-NativeMultiTouchPassthrough) ### 🛠️ 其他资源 [awesome-sunshine](https://github.com/LizardByte/awesome-sunshine) ## 系统要求 > [!WARNING] > 这些表格正在持续更新中。请不要仅基于此信息购买硬件。
最低配置要求
组件 要求
GPU AMD: VCE 1.0或更高版本,参见: obs-amd硬件支持
Intel: VAAPI兼容,参见: VAAPI硬件支持
Nvidia: 支持NVENC的显卡,参见: nvenc支持矩阵
CPU AMD: Ryzen 3或更高
Intel: Core i3或更高
RAM 4GB或更多
操作系统 Windows: 10 22H2+ (Windows Server不支持虚拟游戏手柄)
macOS: 12+
Linux/Debian: 12+ (bookworm)
Linux/Fedora: 39+
Linux/Ubuntu: 22.04+ (jammy)
网络 主机: 5GHz, 802.11ac
客户端: 5GHz, 802.11ac
4K推荐配置
组件 要求
GPU AMD: Video Coding Engine 3.1或更高
Intel: HD Graphics 510或更高
Nvidia: GeForce GTX 1080或更高的具有多编码器的型号
CPU AMD: Ryzen 5或更高
Intel: Core i5或更高
网络 主机: CAT5e以太网或更好
客户端: CAT5e以太网或更好
## 技术支持 遇到问题时的解决路径: 1. 查看 [使用文档](https://docs.qq.com/aio/DSGdQc3htbFJjSFdO?p=YTpMj5JNNdB5hEKJhhqlSB) [LizardByte文档](https://docs.lizardbyte.dev/projects/sunshine/latest/) 2. 在设置中打开详细的日志等级找到相关信息 3. [加入QQ交流群获取帮助](https://qm.qq.com/cgi-bin/qm/qr?k=5qnkzSaLIrIaU4FvumftZH_6Hg7fUuLD&jump_from=webapi) 4. [使用两个字母!](https://uuyc.163.com/) **问题反馈标签:** - `hdr-support` - HDR相关问题 - `virtual-display` - 虚拟显示器问题 - `config-help` - 配置相关问题 ## 加入社区 我们欢迎大家参与讨论和贡献代码! [![加入QQ群](https://pub.idqqimg.com/wpa/images/group.png '加入QQ群')](https://qm.qq.com/cgi-bin/qm/qr?k=WC2PSZ3Q6Hk6j8U_DG9S7522GPtItk0m&jump_from=webapi&authKey=zVDLFrS83s/0Xg3hMbkMeAqI7xoHXaM3sxZIF/u9JW7qO/D8xd0npytVBC2lOS+z) ## Star History [![Star History Chart](https://api.star-history.com/svg?repos=qiin2333/Sunshine-Foundation&type=Date)](https://www.star-history.com/#qiin2333/Sunshine-Foundation&Date) --- **Sunshine基地版 - 让游戏串流更简单** ================================================ FILE: cmake/FindLIBCAP.cmake ================================================ # - Try to find Libcap # Once done this will define # # LIBCAP_FOUND - system has Libcap # LIBCAP_INCLUDE_DIRS - the Libcap include directory # LIBCAP_LIBRARIES - the libraries needed to use Libcap # LIBCAP_DEFINITIONS - Compiler switches required for using Libcap # Use pkg-config to get the directories and then use these values # in the find_path() and find_library() calls find_package(PkgConfig) pkg_check_modules(PC_LIBCAP libcap) set(LIBCAP_DEFINITIONS ${PC_LIBCAP_CFLAGS}) find_path(LIBCAP_INCLUDE_DIRS sys/capability.h PATHS ${PC_LIBCAP_INCLUDEDIR} ${PC_LIBCAP_INCLUDE_DIRS}) find_library(LIBCAP_LIBRARIES NAMES libcap.so PATHS ${PC_LIBCAP_LIBDIR} ${PC_LIBCAP_LIBRARY_DIRS}) mark_as_advanced(LIBCAP_INCLUDE_DIRS LIBCAP_LIBRARIES) include(FindPackageHandleStandardArgs) find_package_handle_standard_args(LIBCAP REQUIRED_VARS LIBCAP_LIBRARIES LIBCAP_INCLUDE_DIRS) ================================================ FILE: cmake/FindLIBDRM.cmake ================================================ # - Try to find Libdrm # Once done this will define # # LIBDRM_FOUND - system has Libdrm # LIBDRM_INCLUDE_DIRS - the Libdrm include directory # LIBDRM_LIBRARIES - the libraries needed to use Libdrm # LIBDRM_DEFINITIONS - Compiler switches required for using Libdrm # Use pkg-config to get the directories and then use these values # in the find_path() and find_library() calls find_package(PkgConfig) pkg_check_modules(PC_LIBDRM libdrm) set(LIBDRM_DEFINITIONS ${PC_LIBDRM_CFLAGS}) find_path(LIBDRM_INCLUDE_DIRS drm.h PATHS ${PC_LIBDRM_INCLUDEDIR} ${PC_LIBDRM_INCLUDE_DIRS} PATH_SUFFIXES libdrm) find_library(LIBDRM_LIBRARIES NAMES libdrm.so PATHS ${PC_LIBDRM_LIBDIR} ${PC_LIBDRM_LIBRARY_DIRS}) mark_as_advanced(LIBDRM_INCLUDE_DIRS LIBDRM_LIBRARIES) include(FindPackageHandleStandardArgs) find_package_handle_standard_args(LIBDRM REQUIRED_VARS LIBDRM_LIBRARIES LIBDRM_INCLUDE_DIRS) ================================================ FILE: cmake/FindLibva.cmake ================================================ # - Try to find Libva # This module defines the following variables: # # * LIBVA_FOUND - The component was found # * LIBVA_INCLUDE_DIRS - The component include directory # * LIBVA_LIBRARIES - The component library Libva # * LIBVA_DRM_LIBRARIES - The component library Libva DRM # Use pkg-config to get the directories and then use these values in the # find_path() and find_library() calls # cmake-format: on find_package(PkgConfig QUIET) if(PKG_CONFIG_FOUND) pkg_check_modules(_LIBVA libva) pkg_check_modules(_LIBVA_DRM libva-drm) endif() find_path( LIBVA_INCLUDE_DIR NAMES va/va.h va/va_drm.h HINTS ${_LIBVA_INCLUDE_DIRS} PATHS /usr/include /usr/local/include /opt/local/include) find_library( LIBVA_LIB NAMES ${_LIBVA_LIBRARIES} libva HINTS ${_LIBVA_LIBRARY_DIRS} PATHS /usr/lib /usr/local/lib /opt/local/lib) find_library( LIBVA_DRM_LIB NAMES ${_LIBVA_DRM_LIBRARIES} libva-drm HINTS ${_LIBVA_DRM_LIBRARY_DIRS} PATHS /usr/lib /usr/local/lib /opt/local/lib) include(FindPackageHandleStandardArgs) find_package_handle_standard_args(Libva REQUIRED_VARS LIBVA_INCLUDE_DIR LIBVA_LIB LIBVA_DRM_LIB) mark_as_advanced(LIBVA_INCLUDE_DIR LIBVA_LIB LIBVA_DRM_LIB) if(LIBVA_FOUND) set(LIBVA_INCLUDE_DIRS ${LIBVA_INCLUDE_DIR}) set(LIBVA_LIBRARIES ${LIBVA_LIB}) set(LIBVA_DRM_LIBRARIES ${LIBVA_DRM_LIB}) if(NOT TARGET Libva::va) if(IS_ABSOLUTE "${LIBVA_LIBRARIES}") add_library(Libva::va UNKNOWN IMPORTED) set_target_properties(Libva::va PROPERTIES IMPORTED_LOCATION "${LIBVA_LIBRARIES}") else() add_library(Libva::va INTERFACE IMPORTED) set_target_properties(Libva::va PROPERTIES IMPORTED_LIBNAME "${LIBVA_LIBRARIES}") endif() set_target_properties(Libva::va PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${LIBVA_INCLUDE_DIRS}") endif() if(NOT TARGET Libva::drm) if(IS_ABSOLUTE "${LIBVA_DRM_LIBRARIES}") add_library(Libva::drm UNKNOWN IMPORTED) set_target_properties(Libva::drm PROPERTIES IMPORTED_LOCATION "${LIBVA_DRM_LIBRARIES}") else() add_library(Libva::drm INTERFACE IMPORTED) set_target_properties(Libva::drm PROPERTIES IMPORTED_LIBNAME "${LIBVA_DRM_LIBRARIES}") endif() set_target_properties(Libva::drm PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${LIBVA_INCLUDE_DIRS}") endif() endif() ================================================ FILE: cmake/FindSystemd.cmake ================================================ # - Try to find Systemd # Once done this will define # # SYSTEMD_FOUND - system has systemd # SYSTEMD_USER_UNIT_INSTALL_DIR - the systemd system unit install directory # SYSTEMD_SYSTEM_UNIT_INSTALL_DIR - the systemd user unit install directory IF (NOT WIN32) find_package(PkgConfig QUIET) if(PKG_CONFIG_FOUND) pkg_check_modules(SYSTEMD "systemd") endif() if (SYSTEMD_FOUND) execute_process(COMMAND ${PKG_CONFIG_EXECUTABLE} --variable=systemduserunitdir systemd OUTPUT_VARIABLE SYSTEMD_USER_UNIT_INSTALL_DIR) string(REGEX REPLACE "[ \t\n]+" "" SYSTEMD_USER_UNIT_INSTALL_DIR "${SYSTEMD_USER_UNIT_INSTALL_DIR}") execute_process(COMMAND ${PKG_CONFIG_EXECUTABLE} --variable=systemdsystemunitdir systemd OUTPUT_VARIABLE SYSTEMD_SYSTEM_UNIT_INSTALL_DIR) string(REGEX REPLACE "[ \t\n]+" "" SYSTEMD_SYSTEM_UNIT_INSTALL_DIR "${SYSTEMD_SYSTEM_UNIT_INSTALL_DIR}") mark_as_advanced(SYSTEMD_USER_UNIT_INSTALL_DIR SYSTEMD_SYSTEM_UNIT_INSTALL_DIR) endif () ENDIF () ================================================ FILE: cmake/FindUdev.cmake ================================================ # - Try to find Udev # Once done this will define # # UDEV_FOUND - system has udev # UDEV_RULES_INSTALL_DIR - the udev rules install directory IF (NOT WIN32) find_package(PkgConfig QUIET) if(PKG_CONFIG_FOUND) pkg_check_modules(UDEV "udev") endif() if (UDEV_FOUND) execute_process(COMMAND ${PKG_CONFIG_EXECUTABLE} --variable=udevdir udev OUTPUT_VARIABLE UDEV_RULES_INSTALL_DIR) string(REGEX REPLACE "[ \t\n]+" "" UDEV_RULES_INSTALL_DIR "${UDEV_RULES_INSTALL_DIR}") set(UDEV_RULES_INSTALL_DIR "${UDEV_RULES_INSTALL_DIR}/rules.d") mark_as_advanced(UDEV_RULES_INSTALL_DIR) endif () ENDIF () ================================================ FILE: cmake/FindWayland.cmake ================================================ # Try to find Wayland on a Unix system # # This will define: # # WAYLAND_FOUND - True if Wayland is found # WAYLAND_LIBRARIES - Link these to use Wayland # WAYLAND_INCLUDE_DIRS - Include directory for Wayland # WAYLAND_DEFINITIONS - Compiler flags for using Wayland # # In addition the following more fine grained variables will be defined: # # Wayland_Client_FOUND WAYLAND_CLIENT_INCLUDE_DIRS WAYLAND_CLIENT_LIBRARIES # Wayland_Server_FOUND WAYLAND_SERVER_INCLUDE_DIRS WAYLAND_SERVER_LIBRARIES # Wayland_EGL_FOUND WAYLAND_EGL_INCLUDE_DIRS WAYLAND_EGL_LIBRARIES # Wayland_Cursor_FOUND WAYLAND_CURSOR_INCLUDE_DIRS WAYLAND_CURSOR_LIBRARIES # # Copyright (c) 2013 Martin Gräßlin # 2020 Georges Basile Stavracas Neto # # Redistribution and use is allowed according to the terms of the BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. IF (NOT WIN32) # Use pkg-config to get the directories and then use these values # in the find_path() and find_library() calls find_package(PkgConfig) PKG_CHECK_MODULES(PKG_WAYLAND QUIET wayland-client wayland-server wayland-egl wayland-cursor) set(WAYLAND_DEFINITIONS ${PKG_WAYLAND_CFLAGS}) find_path(WAYLAND_CLIENT_INCLUDE_DIRS NAMES wayland-client.h HINTS ${PKG_WAYLAND_INCLUDE_DIRS}) find_library(WAYLAND_CLIENT_LIBRARIES NAMES wayland-client HINTS ${PKG_WAYLAND_LIBRARY_DIRS}) if(WAYLAND_CLIENT_INCLUDE_DIRS AND WAYLAND_CLIENT_LIBRARIES) set(Wayland_Client_FOUND TRUE) # cmake-lint: disable=C0103 else() set(Wayland_Client_FOUND FALSE) # cmake-lint: disable=C0103 endif() mark_as_advanced(WAYLAND_CLIENT_INCLUDE_DIRS WAYLAND_CLIENT_LIBRARIES) find_path(WAYLAND_CURSOR_INCLUDE_DIRS NAMES wayland-cursor.h HINTS ${PKG_WAYLAND_INCLUDE_DIRS}) find_library(WAYLAND_CURSOR_LIBRARIES NAMES wayland-cursor HINTS ${PKG_WAYLAND_LIBRARY_DIRS}) if(WAYLAND_CURSOR_INCLUDE_DIRS AND WAYLAND_CURSOR_LIBRARIES) set(Wayland_Cursor_FOUND TRUE) # cmake-lint: disable=C0103 else() set(Wayland_Cursor_FOUND FALSE) # cmake-lint: disable=C0103 endif() mark_as_advanced(WAYLAND_CURSOR_INCLUDE_DIRS WAYLAND_CURSOR_LIBRARIES) find_path(WAYLAND_EGL_INCLUDE_DIRS NAMES wayland-egl.h HINTS ${PKG_WAYLAND_INCLUDE_DIRS}) find_library(WAYLAND_EGL_LIBRARIES NAMES wayland-egl HINTS ${PKG_WAYLAND_LIBRARY_DIRS}) if(WAYLAND_EGL_INCLUDE_DIRS AND WAYLAND_EGL_LIBRARIES) set(Wayland_EGL_FOUND TRUE) # cmake-lint: disable=C0103 else() set(Wayland_EGL_FOUND FALSE) # cmake-lint: disable=C0103 endif() mark_as_advanced(WAYLAND_EGL_INCLUDE_DIRS WAYLAND_EGL_LIBRARIES) find_path(WAYLAND_SERVER_INCLUDE_DIRS NAMES wayland-server.h HINTS ${PKG_WAYLAND_INCLUDE_DIRS}) find_library(WAYLAND_SERVER_LIBRARIES NAMES wayland-server HINTS ${PKG_WAYLAND_LIBRARY_DIRS}) if(WAYLAND_SERVER_INCLUDE_DIRS AND WAYLAND_SERVER_LIBRARIES) set(Wayland_Server_FOUND TRUE) # cmake-lint: disable=C0103 else() set(Wayland_Server_FOUND FALSE) # cmake-lint: disable=C0103 endif() mark_as_advanced(WAYLAND_SERVER_INCLUDE_DIRS WAYLAND_SERVER_LIBRARIES) set(WAYLAND_INCLUDE_DIRS ${WAYLAND_CLIENT_INCLUDE_DIRS} ${WAYLAND_SERVER_INCLUDE_DIRS} ${WAYLAND_EGL_INCLUDE_DIRS} ${WAYLAND_CURSOR_INCLUDE_DIRS}) set(WAYLAND_LIBRARIES ${WAYLAND_CLIENT_LIBRARIES} ${WAYLAND_SERVER_LIBRARIES} ${WAYLAND_EGL_LIBRARIES} ${WAYLAND_CURSOR_LIBRARIES}) mark_as_advanced(WAYLAND_INCLUDE_DIRS WAYLAND_LIBRARIES) list(REMOVE_DUPLICATES WAYLAND_INCLUDE_DIRS) include(FindPackageHandleStandardArgs) find_package_handle_standard_args(Wayland REQUIRED_VARS WAYLAND_LIBRARIES WAYLAND_INCLUDE_DIRS HANDLE_COMPONENTS) ENDIF () ================================================ FILE: cmake/compile_definitions/common.cmake ================================================ # common compile definitions # this file will also load platform specific definitions list(APPEND SUNSHINE_COMPILE_OPTIONS -Wall -Wno-sign-compare) # Wall - enable all warnings # Werror - treat warnings as errors # Wno-maybe-uninitialized/Wno-uninitialized - disable warnings for maybe uninitialized variables # Wno-sign-compare - disable warnings for signed/unsigned comparisons # Wno-restrict - disable warnings for memory overlap if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") # GCC specific compile options # GCC 12 and higher will complain about maybe-uninitialized if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 12) list(APPEND SUNSHINE_COMPILE_OPTIONS -Wno-maybe-uninitialized) # Disable the bogus warning that may prevent compilation (only for GCC 12). # See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105651. if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 13) list(APPEND SUNSHINE_COMPILE_OPTIONS -Wno-restrict) endif() endif() elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") # Clang specific compile options # Clang doesn't actually complain about this this, so disabling for now # list(APPEND SUNSHINE_COMPILE_OPTIONS -Wno-uninitialized) endif() if(BUILD_WERROR) list(APPEND SUNSHINE_COMPILE_OPTIONS -Werror) endif() # setup assets directory if(NOT SUNSHINE_ASSETS_DIR) set(SUNSHINE_ASSETS_DIR "assets") endif() # platform specific compile definitions if(WIN32) include(${CMAKE_MODULE_PATH}/compile_definitions/windows.cmake) elseif(UNIX) include(${CMAKE_MODULE_PATH}/compile_definitions/unix.cmake) if(APPLE) include(${CMAKE_MODULE_PATH}/compile_definitions/macos.cmake) else() include(${CMAKE_MODULE_PATH}/compile_definitions/linux.cmake) endif() endif() configure_file("${CMAKE_SOURCE_DIR}/src/version.h.in" version.h @ONLY) include_directories("${CMAKE_CURRENT_BINARY_DIR}") # required for importing version.h set(SUNSHINE_TARGET_FILES "${CMAKE_SOURCE_DIR}/third-party/moonlight-common-c/src/Input.h" "${CMAKE_SOURCE_DIR}/third-party/moonlight-common-c/src/Rtsp.h" "${CMAKE_SOURCE_DIR}/third-party/moonlight-common-c/src/RtspParser.c" "${CMAKE_SOURCE_DIR}/third-party/moonlight-common-c/src/Video.h" "${CMAKE_SOURCE_DIR}/third-party/tray/src/tray.h" "${CMAKE_SOURCE_DIR}/src/display_device/display_device.h" "${CMAKE_SOURCE_DIR}/src/display_device/parsed_config.cpp" "${CMAKE_SOURCE_DIR}/src/display_device/parsed_config.h" "${CMAKE_SOURCE_DIR}/src/display_device/session.cpp" "${CMAKE_SOURCE_DIR}/src/display_device/session.h" "${CMAKE_SOURCE_DIR}/src/display_device/settings.cpp" "${CMAKE_SOURCE_DIR}/src/display_device/settings.h" "${CMAKE_SOURCE_DIR}/src/display_device/to_string.cpp" "${CMAKE_SOURCE_DIR}/src/display_device/to_string.h" "${CMAKE_SOURCE_DIR}/src/display_device/vdd_utils.cpp" "${CMAKE_SOURCE_DIR}/src/display_device/vdd_utils.h" "${CMAKE_SOURCE_DIR}/src/upnp.cpp" "${CMAKE_SOURCE_DIR}/src/upnp.h" "${CMAKE_SOURCE_DIR}/src/cbs.cpp" "${CMAKE_SOURCE_DIR}/src/utility.h" "${CMAKE_SOURCE_DIR}/src/uuid.h" "${CMAKE_SOURCE_DIR}/src/config.h" "${CMAKE_SOURCE_DIR}/src/config.cpp" "${CMAKE_SOURCE_DIR}/src/entry_handler.cpp" "${CMAKE_SOURCE_DIR}/src/entry_handler.h" "${CMAKE_SOURCE_DIR}/src/file_handler.cpp" "${CMAKE_SOURCE_DIR}/src/file_handler.h" "${CMAKE_SOURCE_DIR}/src/globals.cpp" "${CMAKE_SOURCE_DIR}/src/globals.h" "${CMAKE_SOURCE_DIR}/src/logging.cpp" "${CMAKE_SOURCE_DIR}/src/logging.h" "${CMAKE_SOURCE_DIR}/src/main.cpp" "${CMAKE_SOURCE_DIR}/src/main.h" "${CMAKE_SOURCE_DIR}/src/crypto.cpp" "${CMAKE_SOURCE_DIR}/src/crypto.h" "${CMAKE_SOURCE_DIR}/src/webhook_format.cpp" "${CMAKE_SOURCE_DIR}/src/webhook_format.h" "${CMAKE_SOURCE_DIR}/src/webhook_httpsclient.cpp" "${CMAKE_SOURCE_DIR}/src/webhook_httpsclient.h" "${CMAKE_SOURCE_DIR}/src/webhook.cpp" "${CMAKE_SOURCE_DIR}/src/webhook.h" "${CMAKE_SOURCE_DIR}/src/nvhttp.cpp" "${CMAKE_SOURCE_DIR}/src/nvhttp.h" "${CMAKE_SOURCE_DIR}/src/abr.cpp" "${CMAKE_SOURCE_DIR}/src/abr.h" "${CMAKE_SOURCE_DIR}/src/httpcommon.cpp" "${CMAKE_SOURCE_DIR}/src/httpcommon.h" "${CMAKE_SOURCE_DIR}/src/confighttp.cpp" "${CMAKE_SOURCE_DIR}/src/confighttp.h" "${CMAKE_SOURCE_DIR}/src/rtsp.cpp" "${CMAKE_SOURCE_DIR}/src/rtsp.h" "${CMAKE_SOURCE_DIR}/src/stream.cpp" "${CMAKE_SOURCE_DIR}/src/stream.h" "${CMAKE_SOURCE_DIR}/src/video.cpp" "${CMAKE_SOURCE_DIR}/src/video.h" "${CMAKE_SOURCE_DIR}/src/video_colorspace.cpp" "${CMAKE_SOURCE_DIR}/src/video_colorspace.h" "${CMAKE_SOURCE_DIR}/src/input.cpp" "${CMAKE_SOURCE_DIR}/src/input.h" "${CMAKE_SOURCE_DIR}/src/audio.cpp" "${CMAKE_SOURCE_DIR}/src/audio.h" "${CMAKE_SOURCE_DIR}/src/platform/common.h" "${CMAKE_SOURCE_DIR}/src/process.cpp" "${CMAKE_SOURCE_DIR}/src/process.h" "${CMAKE_SOURCE_DIR}/src/network.cpp" "${CMAKE_SOURCE_DIR}/src/network.h" "${CMAKE_SOURCE_DIR}/src/move_by_copy.h" "${CMAKE_SOURCE_DIR}/src/system_tray.cpp" "${CMAKE_SOURCE_DIR}/src/system_tray.h" "${CMAKE_SOURCE_DIR}/src/system_tray_i18n.cpp" "${CMAKE_SOURCE_DIR}/src/system_tray_i18n.h" "${CMAKE_SOURCE_DIR}/src/task_pool.h" "${CMAKE_SOURCE_DIR}/src/thread_pool.h" "${CMAKE_SOURCE_DIR}/src/thread_safe.h" "${CMAKE_SOURCE_DIR}/src/sync.h" "${CMAKE_SOURCE_DIR}/src/round_robin.h" "${CMAKE_SOURCE_DIR}/src/stat_trackers.h" "${CMAKE_SOURCE_DIR}/src/stat_trackers.cpp" "${CMAKE_SOURCE_DIR}/src/rswrapper.h" "${CMAKE_SOURCE_DIR}/src/rswrapper.c" ${PLATFORM_TARGET_FILES}) if(NOT SUNSHINE_ASSETS_DIR_DEF) set(SUNSHINE_ASSETS_DIR_DEF "${SUNSHINE_ASSETS_DIR}") endif() list(APPEND SUNSHINE_DEFINITIONS SUNSHINE_ASSETS_DIR="${SUNSHINE_ASSETS_DIR_DEF}") list(APPEND SUNSHINE_DEFINITIONS SUNSHINE_TRAY=${SUNSHINE_TRAY}) # Publisher metadata - escape spaces for proper compilation string(REPLACE " " "_" SUNSHINE_PUBLISHER_NAME_SAFE "${SUNSHINE_PUBLISHER_NAME}") list(APPEND SUNSHINE_DEFINITIONS SUNSHINE_PUBLISHER_NAME="${SUNSHINE_PUBLISHER_NAME_SAFE}") list(APPEND SUNSHINE_DEFINITIONS SUNSHINE_PUBLISHER_WEBSITE="${SUNSHINE_PUBLISHER_WEBSITE}") list(APPEND SUNSHINE_DEFINITIONS SUNSHINE_PUBLISHER_ISSUE_URL="${SUNSHINE_PUBLISHER_ISSUE_URL}") include_directories("${CMAKE_SOURCE_DIR}") include_directories( SYSTEM "${CMAKE_SOURCE_DIR}/third-party" "${CMAKE_SOURCE_DIR}/third-party/moonlight-common-c/enet/include" "${CMAKE_SOURCE_DIR}/third-party/nanors" "${CMAKE_SOURCE_DIR}/third-party/nanors/deps/obl" ${FFMPEG_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} # has to be the last, or we get runtime error on macOS ffmpeg encoder ) list(APPEND SUNSHINE_EXTERNAL_LIBRARIES ${MINIUPNP_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} enet nlohmann_json::nlohmann_json opus ${FFMPEG_LIBRARIES} ${Boost_LIBRARIES} ${OPENSSL_LIBRARIES} ${PLATFORM_LIBRARIES}) ================================================ FILE: cmake/compile_definitions/linux.cmake ================================================ # linux specific compile definitions add_compile_definitions(SUNSHINE_PLATFORM="linux") # AppImage if(${SUNSHINE_BUILD_APPIMAGE}) # use relative assets path for AppImage string(REPLACE "${CMAKE_INSTALL_PREFIX}" ".${CMAKE_INSTALL_PREFIX}" SUNSHINE_ASSETS_DIR_DEF ${SUNSHINE_ASSETS_DIR}) endif() # cuda set(CUDA_FOUND OFF) if(${SUNSHINE_ENABLE_CUDA}) include(CheckLanguage) check_language(CUDA) if(CMAKE_CUDA_COMPILER) set(CUDA_FOUND ON) enable_language(CUDA) message(STATUS "CUDA Compiler Version: ${CMAKE_CUDA_COMPILER_VERSION}") set(CMAKE_CUDA_ARCHITECTURES "") # https://tech.amikelive.com/node-930/cuda-compatibility-of-nvidia-display-gpu-drivers/ if(CMAKE_CUDA_COMPILER_VERSION VERSION_LESS 6.5) list(APPEND CMAKE_CUDA_ARCHITECTURES 10) elseif(CMAKE_CUDA_COMPILER_VERSION VERSION_GREATER_EQUAL 6.5) list(APPEND CMAKE_CUDA_ARCHITECTURES 50 52) endif() if(CMAKE_CUDA_COMPILER_VERSION VERSION_LESS 7.0) list(APPEND CMAKE_CUDA_ARCHITECTURES 11) elseif(CMAKE_CUDA_COMPILER_VERSION VERSION_GREATER 7.6) list(APPEND CMAKE_CUDA_ARCHITECTURES 60 61 62) endif() # https://docs.nvidia.com/cuda/archive/9.2/cuda-compiler-driver-nvcc/index.html if(CMAKE_CUDA_COMPILER_VERSION VERSION_LESS 9.0) list(APPEND CMAKE_CUDA_ARCHITECTURES 20) elseif(CMAKE_CUDA_COMPILER_VERSION VERSION_GREATER_EQUAL 9.0) list(APPEND CMAKE_CUDA_ARCHITECTURES 70) endif() # https://docs.nvidia.com/cuda/archive/10.0/cuda-compiler-driver-nvcc/index.html if(CMAKE_CUDA_COMPILER_VERSION VERSION_GREATER_EQUAL 10.0) list(APPEND CMAKE_CUDA_ARCHITECTURES 72 75) endif() # https://docs.nvidia.com/cuda/archive/11.0/cuda-compiler-driver-nvcc/index.html if(CMAKE_CUDA_COMPILER_VERSION VERSION_LESS 11.0) list(APPEND CMAKE_CUDA_ARCHITECTURES 30) elseif(CMAKE_CUDA_COMPILER_VERSION VERSION_GREATER_EQUAL 11.0) list(APPEND CMAKE_CUDA_ARCHITECTURES 80) endif() # https://docs.nvidia.com/cuda/archive/11.8.0/cuda-compiler-driver-nvcc/index.html if(CMAKE_CUDA_COMPILER_VERSION VERSION_GREATER_EQUAL 11.8) list(APPEND CMAKE_CUDA_ARCHITECTURES 86 87 89 90) endif() if(CMAKE_CUDA_COMPILER_VERSION VERSION_LESS 12.0) list(APPEND CMAKE_CUDA_ARCHITECTURES 35) endif() # sort the architectures list(SORT CMAKE_CUDA_ARCHITECTURES COMPARE NATURAL) # message(STATUS "CUDA NVCC Flags: ${CUDA_NVCC_FLAGS}") message(STATUS "CUDA Architectures: ${CMAKE_CUDA_ARCHITECTURES}") endif() endif() if(CUDA_FOUND) include_directories(SYSTEM "${CMAKE_SOURCE_DIR}/third-party/nvfbc") list(APPEND PLATFORM_TARGET_FILES "${CMAKE_SOURCE_DIR}/src/platform/linux/cuda.h" "${CMAKE_SOURCE_DIR}/src/platform/linux/cuda.cu" "${CMAKE_SOURCE_DIR}/src/platform/linux/cuda.cpp" "${CMAKE_SOURCE_DIR}/third-party/nvfbc/NvFBC.h") add_compile_definitions(SUNSHINE_BUILD_CUDA) endif() # drm if(${SUNSHINE_ENABLE_DRM}) find_package(LIBDRM) find_package(LIBCAP) else() set(LIBDRM_FOUND OFF) set(LIBCAP_FOUND OFF) endif() if(LIBDRM_FOUND AND LIBCAP_FOUND) add_compile_definitions(SUNSHINE_BUILD_DRM) include_directories(SYSTEM ${LIBDRM_INCLUDE_DIRS} ${LIBCAP_INCLUDE_DIRS}) list(APPEND PLATFORM_LIBRARIES ${LIBDRM_LIBRARIES} ${LIBCAP_LIBRARIES}) list(APPEND PLATFORM_TARGET_FILES "${CMAKE_SOURCE_DIR}/src/platform/linux/kmsgrab.cpp") list(APPEND SUNSHINE_DEFINITIONS EGL_NO_X11=1) elseif(NOT LIBDRM_FOUND) message(WARNING "Missing libdrm") elseif(NOT LIBDRM_FOUND) message(WARNING "Missing libcap") endif() # evdev include(dependencies/libevdev_Sunshine) # vaapi if(${SUNSHINE_ENABLE_VAAPI}) find_package(Libva) else() set(LIBVA_FOUND OFF) endif() if(LIBVA_FOUND) add_compile_definitions(SUNSHINE_BUILD_VAAPI) include_directories(SYSTEM ${LIBVA_INCLUDE_DIR}) list(APPEND PLATFORM_LIBRARIES ${LIBVA_LIBRARIES} ${LIBVA_DRM_LIBRARIES}) list(APPEND PLATFORM_TARGET_FILES "${CMAKE_SOURCE_DIR}/src/platform/linux/vaapi.h" "${CMAKE_SOURCE_DIR}/src/platform/linux/vaapi.cpp") endif() # wayland if(${SUNSHINE_ENABLE_WAYLAND}) find_package(Wayland) else() set(WAYLAND_FOUND OFF) endif() if(WAYLAND_FOUND) add_compile_definitions(SUNSHINE_BUILD_WAYLAND) if(NOT SUNSHINE_SYSTEM_WAYLAND_PROTOCOLS) set(WAYLAND_PROTOCOLS_DIR "${CMAKE_SOURCE_DIR}/third-party/wayland-protocols") else() pkg_get_variable(WAYLAND_PROTOCOLS_DIR wayland-protocols pkgdatadir) pkg_check_modules(WAYLAND_PROTOCOLS wayland-protocols REQUIRED) endif() GEN_WAYLAND("${WAYLAND_PROTOCOLS_DIR}" "unstable/xdg-output" xdg-output-unstable-v1) GEN_WAYLAND("${CMAKE_SOURCE_DIR}/third-party/wlr-protocols" "unstable" wlr-export-dmabuf-unstable-v1) include_directories( SYSTEM ${WAYLAND_INCLUDE_DIRS} ${CMAKE_BINARY_DIR}/generated-src ) list(APPEND PLATFORM_LIBRARIES ${WAYLAND_LIBRARIES}) list(APPEND PLATFORM_TARGET_FILES "${CMAKE_SOURCE_DIR}/src/platform/linux/wlgrab.cpp" "${CMAKE_SOURCE_DIR}/src/platform/linux/wayland.h" "${CMAKE_SOURCE_DIR}/src/platform/linux/wayland.cpp") endif() # x11 if(${SUNSHINE_ENABLE_X11}) find_package(X11) else() set(X11_FOUND OFF) endif() if(X11_FOUND) add_compile_definitions(SUNSHINE_BUILD_X11) include_directories(SYSTEM ${X11_INCLUDE_DIR}) list(APPEND PLATFORM_LIBRARIES ${X11_LIBRARIES}) list(APPEND PLATFORM_TARGET_FILES "${CMAKE_SOURCE_DIR}/src/platform/linux/x11grab.h" "${CMAKE_SOURCE_DIR}/src/platform/linux/x11grab.cpp") endif() if(NOT ${CUDA_FOUND} AND NOT ${WAYLAND_FOUND} AND NOT ${X11_FOUND} AND NOT (${LIBDRM_FOUND} AND ${LIBCAP_FOUND}) AND NOT ${LIBVA_FOUND}) message(FATAL_ERROR "Couldn't find either cuda, wayland, x11, (libdrm and libcap), or libva") endif() # tray icon if(${SUNSHINE_ENABLE_TRAY}) pkg_check_modules(APPINDICATOR ayatana-appindicator3-0.1) if(APPINDICATOR_FOUND) list(APPEND SUNSHINE_DEFINITIONS TRAY_AYATANA_APPINDICATOR=1) else() pkg_check_modules(APPINDICATOR appindicator3-0.1) if(APPINDICATOR_FOUND) list(APPEND SUNSHINE_DEFINITIONS TRAY_LEGACY_APPINDICATOR=1) endif () endif() pkg_check_modules(LIBNOTIFY libnotify) if(NOT APPINDICATOR_FOUND OR NOT LIBNOTIFY_FOUND) set(SUNSHINE_TRAY 0) message(WARNING "Missing appindicator or libnotify, disabling tray icon") message(STATUS "APPINDICATOR_FOUND: ${APPINDICATOR_FOUND}") message(STATUS "LIBNOTIFY_FOUND: ${LIBNOTIFY_FOUND}") else() include_directories(SYSTEM ${APPINDICATOR_INCLUDE_DIRS} ${LIBNOTIFY_INCLUDE_DIRS}) link_directories(${APPINDICATOR_LIBRARY_DIRS} ${LIBNOTIFY_LIBRARY_DIRS}) list(APPEND PLATFORM_TARGET_FILES "${CMAKE_SOURCE_DIR}/third-party/tray/src/tray_linux.c") list(APPEND SUNSHINE_EXTERNAL_LIBRARIES ${APPINDICATOR_LIBRARIES} ${LIBNOTIFY_LIBRARIES}) endif() else() set(SUNSHINE_TRAY 0) message(STATUS "Tray icon disabled") endif() if(${SUNSHINE_ENABLE_TRAY} AND ${SUNSHINE_TRAY} EQUAL 0 AND SUNSHINE_REQUIRE_TRAY) message(FATAL_ERROR "Tray icon is required") endif() if(${SUNSHINE_USE_LEGACY_INPUT}) # TODO: Remove this legacy option after the next stable release list(APPEND PLATFORM_TARGET_FILES "${CMAKE_SOURCE_DIR}/src/platform/linux/input/legacy_input.cpp") else() # These need to be set before adding the inputtino subdirectory in order for them to be picked up set(LIBEVDEV_CUSTOM_INCLUDE_DIR "${EVDEV_INCLUDE_DIR}") set(LIBEVDEV_CUSTOM_LIBRARY "${EVDEV_LIBRARY}") add_subdirectory("${CMAKE_SOURCE_DIR}/third-party/inputtino") list(APPEND SUNSHINE_EXTERNAL_LIBRARIES inputtino::libinputtino) file(GLOB_RECURSE INPUTTINO_SOURCES ${CMAKE_SOURCE_DIR}/src/platform/linux/input/inputtino*.h ${CMAKE_SOURCE_DIR}/src/platform/linux/input/inputtino*.cpp) list(APPEND PLATFORM_TARGET_FILES ${INPUTTINO_SOURCES}) # build libevdev before the libinputtino target if(EXTERNAL_PROJECT_LIBEVDEV_USED) add_dependencies(libinputtino libevdev) endif() endif() list(APPEND PLATFORM_TARGET_FILES "${CMAKE_SOURCE_DIR}/src/platform/linux/publish.cpp" "${CMAKE_SOURCE_DIR}/src/platform/linux/graphics.h" "${CMAKE_SOURCE_DIR}/src/platform/linux/graphics.cpp" "${CMAKE_SOURCE_DIR}/src/platform/linux/misc.h" "${CMAKE_SOURCE_DIR}/src/platform/linux/misc.cpp" "${CMAKE_SOURCE_DIR}/src/platform/linux/audio.cpp" "${CMAKE_SOURCE_DIR}/src/platform/linux/display_device.cpp" "${CMAKE_SOURCE_DIR}/src/platform/linux/input.cpp" "${CMAKE_SOURCE_DIR}/src/platform/linux/display_device.cpp" "${CMAKE_SOURCE_DIR}/third-party/glad/src/egl.c" "${CMAKE_SOURCE_DIR}/third-party/glad/src/gl.c" "${CMAKE_SOURCE_DIR}/third-party/glad/include/EGL/eglplatform.h" "${CMAKE_SOURCE_DIR}/third-party/glad/include/KHR/khrplatform.h" "${CMAKE_SOURCE_DIR}/third-party/glad/include/glad/gl.h" "${CMAKE_SOURCE_DIR}/third-party/glad/include/glad/egl.h") list(APPEND PLATFORM_LIBRARIES dl pulse pulse-simple) include_directories( SYSTEM "${CMAKE_SOURCE_DIR}/third-party/glad/include") ================================================ FILE: cmake/compile_definitions/macos.cmake ================================================ # macos specific compile definitions add_compile_definitions(SUNSHINE_PLATFORM="macos") set(MACOS_LINK_DIRECTORIES /opt/homebrew/lib /opt/local/lib /usr/local/lib) foreach(dir ${MACOS_LINK_DIRECTORIES}) if(EXISTS ${dir}) link_directories(${dir}) endif() endforeach() if(NOT BOOST_USE_STATIC AND NOT FETCH_CONTENT_BOOST_USED) ADD_DEFINITIONS(-DBOOST_LOG_DYN_LINK) endif() list(APPEND SUNSHINE_EXTERNAL_LIBRARIES ${APP_KIT_LIBRARY} ${APP_SERVICES_LIBRARY} ${AV_FOUNDATION_LIBRARY} ${CORE_MEDIA_LIBRARY} ${CORE_VIDEO_LIBRARY} ${FOUNDATION_LIBRARY} ${VIDEO_TOOLBOX_LIBRARY}) set(APPLE_PLIST_FILE "${SUNSHINE_SOURCE_ASSETS_DIR}/macos/assets/Info.plist") # todo - tray is not working on macos set(SUNSHINE_TRAY 0) set(PLATFORM_TARGET_FILES "${CMAKE_SOURCE_DIR}/src/platform/macos/av_audio.h" "${CMAKE_SOURCE_DIR}/src/platform/macos/av_audio.m" "${CMAKE_SOURCE_DIR}/src/platform/macos/av_img_t.h" "${CMAKE_SOURCE_DIR}/src/platform/macos/av_video.h" "${CMAKE_SOURCE_DIR}/src/platform/macos/av_video.m" "${CMAKE_SOURCE_DIR}/src/platform/macos/display.mm" "${CMAKE_SOURCE_DIR}/src/platform/macos/display_device.cpp" "${CMAKE_SOURCE_DIR}/src/platform/macos/input.cpp" "${CMAKE_SOURCE_DIR}/src/platform/macos/microphone.mm" "${CMAKE_SOURCE_DIR}/src/platform/macos/misc.mm" "${CMAKE_SOURCE_DIR}/src/platform/macos/misc.h" "${CMAKE_SOURCE_DIR}/src/platform/macos/nv12_zero_device.cpp" "${CMAKE_SOURCE_DIR}/src/platform/macos/nv12_zero_device.h" "${CMAKE_SOURCE_DIR}/src/platform/macos/publish.cpp" "${CMAKE_SOURCE_DIR}/third-party/TPCircularBuffer/TPCircularBuffer.c" "${CMAKE_SOURCE_DIR}/third-party/TPCircularBuffer/TPCircularBuffer.h" ${APPLE_PLIST_FILE}) if(SUNSHINE_ENABLE_TRAY) list(APPEND SUNSHINE_EXTERNAL_LIBRARIES ${COCOA}) list(APPEND PLATFORM_TARGET_FILES "${CMAKE_SOURCE_DIR}/third-party/tray/src/tray_darwin.m") endif() ================================================ FILE: cmake/compile_definitions/unix.cmake ================================================ # unix specific compile definitions # put anything here that applies to both linux and macos list(APPEND SUNSHINE_EXTERNAL_LIBRARIES ${CURL_LIBRARIES}) # add install prefix to assets path if not already there if(NOT SUNSHINE_ASSETS_DIR MATCHES "^${CMAKE_INSTALL_PREFIX}") set(SUNSHINE_ASSETS_DIR "${CMAKE_INSTALL_PREFIX}/${SUNSHINE_ASSETS_DIR}") endif() ================================================ FILE: cmake/compile_definitions/windows.cmake ================================================ # windows specific compile definitions add_compile_definitions(SUNSHINE_PLATFORM="windows") enable_language(RC) set(CMAKE_RC_COMPILER windres) set(CMAKE_RC_FLAGS "${CMAKE_RC_FLAGS} --use-temp-file") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static") # gcc complains about misleading indentation in some mingw includes list(APPEND SUNSHINE_COMPILE_OPTIONS -Wno-misleading-indentation) # gcc15 complains about non-template type 'coroutine_handle' used as a template in Windows.Foundation.h # can remove after https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120495 is available in mingw-w64 list(APPEND SUNSHINE_COMPILE_OPTIONS -Wno-template-body) # see gcc bug 98723 add_definitions(-DUSE_BOOST_REGEX) # Fix for GCC 15 C++20 coroutine compatibility with WinRT if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 15) # Add compiler flags to handle WinRT coroutine issues with GCC 15 list(APPEND SUNSHINE_COMPILE_OPTIONS -Wno-template-body) add_definitions(-DWINRT_LEAN_AND_MEAN) # Force using experimental coroutine ABI for compatibility add_definitions(-D_ALLOW_COROUTINE_ABI_MISMATCH) endif() # curl add_definitions(-DCURL_STATICLIB) include_directories(SYSTEM ${CURL_STATIC_INCLUDE_DIRS}) link_directories(${CURL_STATIC_LIBRARY_DIRS}) # miniupnpc add_definitions(-DMINIUPNP_STATICLIB) # extra tools/binaries for audio/display devices add_subdirectory(tools) # todo - this is temporary, only tools for Windows are needed, for now # nvidia include_directories(SYSTEM "${CMAKE_SOURCE_DIR}/third-party/nvapi") file(GLOB NVPREFS_FILES CONFIGURE_DEPENDS "${CMAKE_SOURCE_DIR}/third-party/nvapi/*.h" "${CMAKE_SOURCE_DIR}/src/platform/windows/nvprefs/*.cpp" "${CMAKE_SOURCE_DIR}/src/platform/windows/nvprefs/*.h") include_directories(SYSTEM "${CMAKE_SOURCE_DIR}/third-party/nvenc-headers") file(GLOB_RECURSE NVENC_SOURCES CONFIGURE_DEPENDS "${CMAKE_SOURCE_DIR}/src/nvenc/*.h" "${CMAKE_SOURCE_DIR}/src/nvenc/*.cpp") # amf file(GLOB_RECURSE AMF_SOURCES CONFIGURE_DEPENDS "${CMAKE_SOURCE_DIR}/src/amf/*.h" "${CMAKE_SOURCE_DIR}/src/amf/*.cpp") # vigem include_directories(SYSTEM "${CMAKE_SOURCE_DIR}/third-party/ViGEmClient/include") # sunshine icon if(NOT DEFINED SUNSHINE_ICON_PATH) set(SUNSHINE_ICON_PATH "${CMAKE_SOURCE_DIR}/sunshine.ico") endif() configure_file("${CMAKE_SOURCE_DIR}/src/platform/windows/windows.rc.in" windows.rc @ONLY) # set(SUNSHINE_TRAY 0) set(PLATFORM_TARGET_FILES "${CMAKE_CURRENT_BINARY_DIR}/windows.rc" "${CMAKE_SOURCE_DIR}/src/platform/windows/publish.cpp" "${CMAKE_SOURCE_DIR}/src/platform/windows/ftime_compat.cpp" "${CMAKE_SOURCE_DIR}/src/platform/windows/misc.h" "${CMAKE_SOURCE_DIR}/src/platform/windows/misc.cpp" "${CMAKE_SOURCE_DIR}/src/platform/windows/win_dark_mode.h" "${CMAKE_SOURCE_DIR}/src/platform/windows/win_dark_mode.cpp" "${CMAKE_SOURCE_DIR}/src/platform/windows/input.cpp" "${CMAKE_SOURCE_DIR}/src/platform/windows/virtual_mouse.h" "${CMAKE_SOURCE_DIR}/src/platform/windows/virtual_mouse.cpp" "${CMAKE_SOURCE_DIR}/src/platform/windows/dsu_server.h" "${CMAKE_SOURCE_DIR}/src/platform/windows/dsu_server.cpp" "${CMAKE_SOURCE_DIR}/src/platform/windows/display.h" "${CMAKE_SOURCE_DIR}/src/platform/windows/display_base.cpp" "${CMAKE_SOURCE_DIR}/src/platform/windows/display_vram.cpp" "${CMAKE_SOURCE_DIR}/src/platform/windows/display_ram.cpp" "${CMAKE_SOURCE_DIR}/src/platform/windows/display_wgc.cpp" "${CMAKE_SOURCE_DIR}/src/platform/windows/display_amd.cpp" "${CMAKE_SOURCE_DIR}/src/platform/windows/audio.cpp" "${CMAKE_SOURCE_DIR}/src/platform/windows/mic_write.cpp" "${CMAKE_SOURCE_DIR}/src/platform/windows/display_device/device_hdr_states.cpp" "${CMAKE_SOURCE_DIR}/src/platform/windows/display_device/device_modes.cpp" "${CMAKE_SOURCE_DIR}/src/platform/windows/display_device/device_topology.cpp" "${CMAKE_SOURCE_DIR}/src/platform/windows/display_device/general_functions.cpp" "${CMAKE_SOURCE_DIR}/src/platform/windows/display_device/settings_topology.cpp" "${CMAKE_SOURCE_DIR}/src/platform/windows/display_device/settings_topology.h" "${CMAKE_SOURCE_DIR}/src/platform/windows/display_device/settings.cpp" "${CMAKE_SOURCE_DIR}/src/platform/windows/display_device/windows_utils.h" "${CMAKE_SOURCE_DIR}/src/platform/windows/display_device/windows_utils.cpp" "${CMAKE_SOURCE_DIR}/src/platform/windows/display_device/session_listener.h" "${CMAKE_SOURCE_DIR}/src/platform/windows/display_device/session_listener.cpp" "${CMAKE_SOURCE_DIR}/third-party/ViGEmClient/src/ViGEmClient.cpp" "${CMAKE_SOURCE_DIR}/third-party/ViGEmClient/include/ViGEm/Client.h" "${CMAKE_SOURCE_DIR}/third-party/ViGEmClient/include/ViGEm/Common.h" "${CMAKE_SOURCE_DIR}/third-party/ViGEmClient/include/ViGEm/Util.h" "${CMAKE_SOURCE_DIR}/third-party/ViGEmClient/include/ViGEm/km/BusShared.h" ${NVPREFS_FILES} ${NVENC_SOURCES} ${AMF_SOURCES}) set(OPENSSL_LIBRARIES libssl.a libcrypto.a) list(PREPEND PLATFORM_LIBRARIES ${CURL_STATIC_LIBRARIES} avrt d3d11 D3DCompiler dwmapi dxgi hid iphlpapi ksuser libssp.a libstdc++.a libwinpthread.a minhook::minhook nlohmann_json::nlohmann_json ntdll ole32 PowrProf setupapi shlwapi synchronization.lib userenv ws2_32 wsock32 ) if(SUNSHINE_ENABLE_TRAY) list(APPEND PLATFORM_TARGET_FILES "${CMAKE_SOURCE_DIR}/third-party/tray/src/tray_windows.c") endif() ================================================ FILE: cmake/dependencies/Boost_Sunshine.cmake ================================================ # # Loads the boost library giving the priority to the system package first, with a fallback to FetchContent. # include_guard(GLOBAL) set(BOOST_VERSION "1.89.0") set(BOOST_COMPONENTS filesystem locale log program_options system ) # system is not used by Sunshine, but by Simple-Web-Server, added here for convenience # algorithm, preprocessor, scope, and uuid are not used by Sunshine, but by libdisplaydevice, added here for convenience if(WIN32) list(APPEND BOOST_COMPONENTS algorithm preprocessor scope uuid ) endif() if(BOOST_USE_STATIC) set(Boost_USE_STATIC_LIBS ON) # cmake-lint: disable=C0103 endif() if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.30") cmake_policy(SET CMP0167 NEW) # Get BoostConfig.cmake from upstream endif() find_package(Boost CONFIG ${BOOST_VERSION} EXACT COMPONENTS ${BOOST_COMPONENTS}) if(NOT Boost_FOUND) message(STATUS "Boost v${BOOST_VERSION} package not found in the system. Falling back to FetchContent.") include(FetchContent) if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.24.0") cmake_policy(SET CMP0135 NEW) # Avoid warning about DOWNLOAD_EXTRACT_TIMESTAMP in CMake 3.24 endif() if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.31.0") cmake_policy(SET CMP0174 NEW) # Handle empty variables endif() # more components required for compiling boost targets list(APPEND BOOST_COMPONENTS asio crc format process property_tree) set(BOOST_ENABLE_CMAKE ON) # Limit boost to the required libraries only set(BOOST_INCLUDE_LIBRARIES ${BOOST_COMPONENTS}) set(BOOST_URL "https://github.com/boostorg/boost/releases/download/boost-${BOOST_VERSION}/boost-${BOOST_VERSION}-cmake.tar.xz") # cmake-lint: disable=C0301 set(BOOST_HASH "SHA256=67acec02d0d118b5de9eb441f5fb707b3a1cdd884be00ca24b9a73c995511f74") if(CMAKE_VERSION VERSION_LESS "3.24.0") FetchContent_Declare( Boost URL ${BOOST_URL} URL_HASH ${BOOST_HASH} ) elseif(APPLE AND CMAKE_VERSION VERSION_GREATER_EQUAL "3.25.0") # add SYSTEM to FetchContent_Declare, this fails on debian bookworm FetchContent_Declare( Boost URL ${BOOST_URL} URL_HASH ${BOOST_HASH} SYSTEM # requires CMake 3.25+ OVERRIDE_FIND_PACKAGE # requires CMake 3.24+, but we have a macro to handle it for other versions ) elseif(CMAKE_VERSION VERSION_GREATER_EQUAL "3.24.0") FetchContent_Declare( Boost URL ${BOOST_URL} URL_HASH ${BOOST_HASH} OVERRIDE_FIND_PACKAGE # requires CMake 3.24+, but we have a macro to handle it for other versions ) endif() FetchContent_MakeAvailable(Boost) set(FETCH_CONTENT_BOOST_USED TRUE) add_definitions(-DBOOST_SYSTEM_USE_UTF8) message(STATUS "Boost.System UTF-8 support enabled: BOOST_SYSTEM_USE_UTF8") set(Boost_FOUND TRUE) # cmake-lint: disable=C0103 set(Boost_INCLUDE_DIRS # cmake-lint: disable=C0103 "$") if(WIN32) # Windows build is failing to create .h file in this directory file(MAKE_DIRECTORY ${Boost_BINARY_DIR}/libs/log/src/windows) endif() set(Boost_LIBRARIES "") # cmake-lint: disable=C0103 foreach(component ${BOOST_COMPONENTS}) list(APPEND Boost_LIBRARIES "Boost::${component}") endforeach() endif() message(STATUS "Boost include dirs: ${Boost_INCLUDE_DIRS}") message(STATUS "Boost libraries: ${Boost_LIBRARIES}") ================================================ FILE: cmake/dependencies/common.cmake ================================================ # load common dependencies # this file will also load platform specific dependencies # boost, this should be before Simple-Web-Server as it also depends on boost include(dependencies/Boost_Sunshine) # submodules # moonlight common library set(ENET_NO_INSTALL ON CACHE BOOL "Don't install any libraries built for enet") add_subdirectory("${CMAKE_SOURCE_DIR}/third-party/moonlight-common-c/enet") # web server add_subdirectory("${CMAKE_SOURCE_DIR}/third-party/Simple-Web-Server") # common dependencies include("${CMAKE_MODULE_PATH}/dependencies/nlohmann_json.cmake") find_package(OpenSSL REQUIRED) find_package(PkgConfig REQUIRED) find_package(Threads REQUIRED) pkg_check_modules(CURL REQUIRED libcurl) # miniupnp pkg_check_modules(MINIUPNP miniupnpc REQUIRED) include_directories(SYSTEM ${MINIUPNP_INCLUDE_DIRS}) # ffmpeg pre-compiled binaries if(WIN32) set(FFMPEG_PLATFORM_LIBRARIES mfplat ole32 strmiids mfuuid vpl MinHook) elseif(UNIX AND NOT APPLE) set(FFMPEG_PLATFORM_LIBRARIES numa va va-drm va-x11 X11) endif() if(NOT DEFINED FFMPEG_PREPARED_BINARIES) set(FFMPEG_PREPARED_BINARIES "${CMAKE_SOURCE_DIR}/third-party/build-deps/dist/${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}") # check if the directory exists if(NOT EXISTS "${FFMPEG_PREPARED_BINARIES}") message(FATAL_ERROR "FFmpeg pre-compiled binaries not found at ${FFMPEG_PREPARED_BINARIES}. \ Please consider contributing to the LizardByte/build-deps repository. \ Optionally, you can use the FFMPEG_PREPARED_BINARIES option to specify the path to the \ system-installed FFmpeg libraries") endif() if(EXISTS "${FFMPEG_PREPARED_BINARIES}/lib/libhdr10plus.a") set(HDR10_PLUS_LIBRARY "${FFMPEG_PREPARED_BINARIES}/lib/libhdr10plus.a") endif() set(FFMPEG_LIBRARIES "${FFMPEG_PREPARED_BINARIES}/lib/libavcodec.a" "${FFMPEG_PREPARED_BINARIES}/lib/libswscale.a" "${FFMPEG_PREPARED_BINARIES}/lib/libavutil.a" "${FFMPEG_PREPARED_BINARIES}/lib/libcbs.a" "${FFMPEG_PREPARED_BINARIES}/lib/libSvtAv1Enc.a" "${FFMPEG_PREPARED_BINARIES}/lib/libx264.a" "${FFMPEG_PREPARED_BINARIES}/lib/libx265.a" ${HDR10_PLUS_LIBRARY} ${FFMPEG_PLATFORM_LIBRARIES}) else() if(EXISTS "${FFMPEG_PREPARED_BINARIES}/lib/libhdr10plus.a") set(HDR10_PLUS_LIBRARY "${FFMPEG_PREPARED_BINARIES}/lib/libhdr10plus.a") endif() set(FFMPEG_LIBRARIES "${FFMPEG_PREPARED_BINARIES}/lib/libavcodec.a" "${FFMPEG_PREPARED_BINARIES}/lib/libswscale.a" "${FFMPEG_PREPARED_BINARIES}/lib/libavutil.a" "${FFMPEG_PREPARED_BINARIES}/lib/libcbs.a" "${FFMPEG_PREPARED_BINARIES}/lib/libSvtAv1Enc.a" "${FFMPEG_PREPARED_BINARIES}/lib/libx264.a" "${FFMPEG_PREPARED_BINARIES}/lib/libx265.a" ${HDR10_PLUS_LIBRARY} ${FFMPEG_PLATFORM_LIBRARIES}) endif() set(FFMPEG_INCLUDE_DIRS "${FFMPEG_PREPARED_BINARIES}/include") # platform specific dependencies if(WIN32) include("${CMAKE_MODULE_PATH}/dependencies/windows.cmake") elseif(UNIX) include("${CMAKE_MODULE_PATH}/dependencies/unix.cmake") if(APPLE) include("${CMAKE_MODULE_PATH}/dependencies/macos.cmake") else() include("${CMAKE_MODULE_PATH}/dependencies/linux.cmake") endif() endif() ================================================ FILE: cmake/dependencies/libevdev_Sunshine.cmake ================================================ # # Loads the libevdev library giving the priority to the system package first, with a fallback to ExternalProject # include_guard(GLOBAL) set(LIBEVDEV_VERSION libevdev-1.13.2) pkg_check_modules(PC_EVDEV libevdev) if(PC_EVDEV_FOUND) find_path(EVDEV_INCLUDE_DIR libevdev/libevdev.h HINTS ${PC_EVDEV_INCLUDE_DIRS} ${PC_EVDEV_INCLUDEDIR}) find_library(EVDEV_LIBRARY NAMES evdev libevdev) else() include(ExternalProject) ExternalProject_Add(libevdev URL http://www.freedesktop.org/software/libevdev/${LIBEVDEV_VERSION}.tar.xz PREFIX ${LIBEVDEV_VERSION} CONFIGURE_COMMAND /configure --prefix= BUILD_COMMAND "make" INSTALL_COMMAND "" ) ExternalProject_Get_Property(libevdev SOURCE_DIR) message(STATUS "libevdev source dir: ${SOURCE_DIR}") set(EVDEV_INCLUDE_DIR "${SOURCE_DIR}") ExternalProject_Get_Property(libevdev BINARY_DIR) message(STATUS "libevdev binary dir: ${BINARY_DIR}") set(EVDEV_LIBRARY "${BINARY_DIR}/libevdev/.libs/libevdev.a") # compile libevdev before sunshine set(SUNSHINE_TARGET_DEPENDENCIES ${SUNSHINE_TARGET_DEPENDENCIES} libevdev) set(EXTERNAL_PROJECT_LIBEVDEV_USED TRUE) endif() if(EVDEV_INCLUDE_DIR AND EVDEV_LIBRARY) message(STATUS "Found libevdev library: ${EVDEV_LIBRARY}") message(STATUS "Found libevdev include directory: ${EVDEV_INCLUDE_DIR}") include_directories(SYSTEM ${EVDEV_INCLUDE_DIR}) list(APPEND PLATFORM_LIBRARIES ${EVDEV_LIBRARY}) else() message(FATAL_ERROR "Couldn't find or fetch libevdev") endif() ================================================ FILE: cmake/dependencies/linux.cmake ================================================ # linux specific dependencies ================================================ FILE: cmake/dependencies/macos.cmake ================================================ # macos specific dependencies FIND_LIBRARY(APP_KIT_LIBRARY AppKit) FIND_LIBRARY(APP_SERVICES_LIBRARY ApplicationServices) FIND_LIBRARY(AV_FOUNDATION_LIBRARY AVFoundation) FIND_LIBRARY(CORE_MEDIA_LIBRARY CoreMedia) FIND_LIBRARY(CORE_VIDEO_LIBRARY CoreVideo) FIND_LIBRARY(FOUNDATION_LIBRARY Foundation) FIND_LIBRARY(VIDEO_TOOLBOX_LIBRARY VideoToolbox) if(SUNSHINE_ENABLE_TRAY) FIND_LIBRARY(COCOA Cocoa REQUIRED) endif() ================================================ FILE: cmake/dependencies/nlohmann_json.cmake ================================================ # # Loads the nlohmann_json library giving the priority to the system package first, with a fallback to FetchContent. # include_guard(GLOBAL) find_package(nlohmann_json 3.11 QUIET GLOBAL) if(NOT nlohmann_json_FOUND) message(STATUS "nlohmann_json v3.11.x package not found in the system. Falling back to FetchContent.") include(FetchContent) if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.24.0") cmake_policy(SET CMP0135 NEW) # Avoid warning about DOWNLOAD_EXTRACT_TIMESTAMP in CMake 3.24 endif() if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.31.0") cmake_policy(SET CMP0174 NEW) # Handle empty variables endif() FetchContent_Declare( json URL https://github.com/nlohmann/json/releases/download/v3.11.3/json.tar.xz URL_HASH MD5=c23a33f04786d85c29fda8d16b5f0efd DOWNLOAD_EXTRACT_TIMESTAMP ) FetchContent_MakeAvailable(json) endif() ================================================ FILE: cmake/dependencies/unix.cmake ================================================ # unix specific dependencies # put anything here that applies to both linux and macos ================================================ FILE: cmake/dependencies/windows.cmake ================================================ # windows specific dependencies # nlohmann_json find_package(nlohmann_json CONFIG 3.11 REQUIRED) # Make sure MinHook is installed find_library(MINHOOK_LIBRARY libMinHook.a REQUIRED) find_path(MINHOOK_INCLUDE_DIR MinHook.h PATH_SUFFIXES include REQUIRED) add_library(minhook::minhook STATIC IMPORTED) set_property(TARGET minhook::minhook PROPERTY IMPORTED_LOCATION ${MINHOOK_LIBRARY}) target_include_directories(minhook::minhook INTERFACE ${MINHOOK_INCLUDE_DIR}) ================================================ FILE: cmake/macros/common.cmake ================================================ # common macros # this file will also load platform specific macros # platform specific macros if(WIN32) include(${CMAKE_MODULE_PATH}/macros/windows.cmake) elseif(UNIX) include(${CMAKE_MODULE_PATH}/macros/unix.cmake) if(APPLE) include(${CMAKE_MODULE_PATH}/macros/macos.cmake) else() include(${CMAKE_MODULE_PATH}/macros/linux.cmake) endif() endif() # override find_package function macro(find_package) # cmake-lint: disable=C0103 string(TOLOWER "${ARGV0}" ARGV0_LOWER) if( (("${ARGV0_LOWER}" STREQUAL "boost") AND DEFINED FETCH_CONTENT_BOOST_USED) OR (("${ARGV0_LOWER}" STREQUAL "libevdev") AND DEFINED EXTERNAL_PROJECT_LIBEVDEV_USED) ) # Do nothing, as the package has already been fetched else() # Call the original find_package function _find_package(${ARGV}) endif() endmacro() ================================================ FILE: cmake/macros/linux.cmake ================================================ # linux specific macros # GEN_WAYLAND: args = `filename` macro(GEN_WAYLAND wayland_directory subdirectory filename) file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/generated-src) message("wayland-scanner private-code \ ${wayland_directory}/${subdirectory}/${filename}.xml \ ${CMAKE_BINARY_DIR}/generated-src/${filename}.c") message("wayland-scanner client-header \ ${wayland_directory}/${subdirectory}/${filename}.xml \ ${CMAKE_BINARY_DIR}/generated-src/${filename}.h") execute_process( COMMAND wayland-scanner private-code ${wayland_directory}/${subdirectory}/${filename}.xml ${CMAKE_BINARY_DIR}/generated-src/${filename}.c COMMAND wayland-scanner client-header ${wayland_directory}/${subdirectory}/${filename}.xml ${CMAKE_BINARY_DIR}/generated-src/${filename}.h RESULT_VARIABLE EXIT_INT ) if(NOT ${EXIT_INT} EQUAL 0) message(FATAL_ERROR "wayland-scanner failed") endif() list(APPEND PLATFORM_TARGET_FILES ${CMAKE_BINARY_DIR}/generated-src/${filename}.c ${CMAKE_BINARY_DIR}/generated-src/${filename}.h) endmacro() ================================================ FILE: cmake/macros/macos.cmake ================================================ # macos specific macros # ADD_FRAMEWORK: args = `fwname`, `appname` macro(ADD_FRAMEWORK fwname appname) find_library(FRAMEWORK_${fwname} NAMES ${fwname} PATHS ${CMAKE_OSX_SYSROOT}/System/Library PATH_SUFFIXES Frameworks NO_DEFAULT_PATH) if( ${FRAMEWORK_${fwname}} STREQUAL FRAMEWORK_${fwname}-NOTFOUND) MESSAGE(ERROR ": Framework ${fwname} not found") else() TARGET_LINK_LIBRARIES(${appname} "${FRAMEWORK_${fwname}}/${fwname}") MESSAGE(STATUS "Framework ${fwname} found at ${FRAMEWORK_${fwname}}") endif() endmacro(ADD_FRAMEWORK) ================================================ FILE: cmake/macros/unix.cmake ================================================ # unix specific macros # put anything here that applies to both linux and macos ================================================ FILE: cmake/macros/windows.cmake ================================================ # windows specific macros ================================================ FILE: cmake/packaging/ChineseSimplified.isl ================================================ ; *** Inno Setup version 6.5.0+ Chinese Simplified messages *** ; ; To download user-contributed translations of this file, go to: ; https://jrsoftware.org/files/istrans/ ; ; Note: When translating this text, do not add periods (.) to the end of ; messages that didn't have them already, because on those messages Inno ; Setup adds the periods automatically (appending a period would result in ; two periods being displayed). ; ; Maintained by Zhenghan Yang ; Email: 847320916@QQ.com ; Translation based on network resource ; The latest Translation is on https://github.com/kira-96/Inno-Setup-Chinese-Simplified-Translation ; [LangOptions] ; The following three entries are very important. Be sure to read and ; understand the '[LangOptions] section' topic in the help file. LanguageName=简体中文 ; If Language Name display incorrect, uncomment next line ; LanguageName=<7B80><4F53><4E2D><6587> ; About LanguageID, to reference link: ; https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-lcid/a9eac961-e77d-41a6-90a5-ce1a8b0cdb9c LanguageID=$0804 ; About CodePage, to reference link: ; https://docs.microsoft.com/en-us/windows/win32/intl/code-page-identifiers LanguageCodePage=936 ; If the language you are translating to requires special font faces or ; sizes, uncomment any of the following entries and change them accordingly. ;DialogFontName= ;DialogFontSize=9 ;DialogFontBaseScaleWidth=7 ;DialogFontBaseScaleHeight=15 ;WelcomeFontName=Segoe UI ;WelcomeFontSize=14 [Messages] ; *** 应用程序标题 SetupAppTitle=安装 SetupWindowTitle=安装 - %1 UninstallAppTitle=卸载 UninstallAppFullTitle=%1 卸载 ; *** Misc. common InformationTitle=信息 ConfirmTitle=确认 ErrorTitle=错误 ; *** SetupLdr messages SetupLdrStartupMessage=现在将安装 %1。您想要继续吗? LdrCannotCreateTemp=无法创建临时文件。安装程序已中止 LdrCannotExecTemp=无法执行临时目录中的文件。安装程序已中止 HelpTextNote= ; *** 启动错误消息 LastErrorMessage=%1。%n%n错误 %2: %3 SetupFileMissing=安装目录中缺少文件 %1。请修正这个问题或者获取程序的新副本。 SetupFileCorrupt=安装文件已损坏。请获取程序的新副本。 SetupFileCorruptOrWrongVer=安装文件已损坏,或是与这个安装程序的版本不兼容。请修正这个问题或获取新的程序副本。 InvalidParameter=无效的命令行参数:%n%n%1 SetupAlreadyRunning=安装程序正在运行。 WindowsVersionNotSupported=此程序不支持当前计算机运行的 Windows 版本。 WindowsServicePackRequired=此程序需要 %1 服务包 %2 或更高版本。 NotOnThisPlatform=此程序不能在 %1 上运行。 OnlyOnThisPlatform=此程序只能在 %1 上运行。 OnlyOnTheseArchitectures=此程序只能安装到为下列处理器架构设计的 Windows 版本中:%n%n%1 WinVersionTooLowError=此程序需要 %1 版本 %2 或更高。 WinVersionTooHighError=此程序不能安装于 %1 版本 %2 或更高。 AdminPrivilegesRequired=在安装此程序时您必须以管理员身份登录。 PowerUserPrivilegesRequired=在安装此程序时您必须以管理员身份或有权限的用户组身份登录。 SetupAppRunningError=安装程序发现 %1 当前正在运行。%n%n请先关闭正在运行的程序,然后点击“确定”继续,或点击“取消”退出。 UninstallAppRunningError=卸载程序发现 %1 当前正在运行。%n%n请先关闭正在运行的程序,然后点击“确定”继续,或点击“取消”退出。 ; *** 启动问题 PrivilegesRequiredOverrideTitle=选择安装程序模式 PrivilegesRequiredOverrideInstruction=选择安装模式 PrivilegesRequiredOverrideText1=%1 可以为所有用户安装(需要管理员权限),或仅为您安装。 PrivilegesRequiredOverrideText2=%1 可以仅为您安装,或为所有用户安装(需要管理员权限)。 PrivilegesRequiredOverrideAllUsers=为所有用户安装(&A) PrivilegesRequiredOverrideAllUsersRecommended=为所有用户安装(&A) (建议选项) PrivilegesRequiredOverrideCurrentUser=仅为我安装(&M) PrivilegesRequiredOverrideCurrentUserRecommended=仅为我安装(&M) (建议选项) ; *** 其他错误 ErrorCreatingDir=安装程序无法创建目录“%1” ErrorTooManyFilesInDir=无法在目录“%1”中创建文件,因为里面包含太多文件 ; *** 安装程序公共消息 ExitSetupTitle=退出安装程序 ExitSetupMessage=安装程序尚未完成。如果现在退出,将不会安装该程序。%n%n您之后可以再次运行安装程序完成安装。%n%n现在退出安装程序吗? AboutSetupMenuItem=关于安装程序(&A)... AboutSetupTitle=关于安装程序 AboutSetupMessage=%1 版本 %2%n%3%n%n%1 主页:%n%4 AboutSetupNote= TranslatorNote=简体中文翻译由Kira(847320916@qq.com)维护。项目地址:https://github.com/kira-96/Inno-Setup-Chinese-Simplified-Translation ; *** 按钮 ButtonBack=< 上一步(&B) ButtonNext=下一步(&N) > ButtonInstall=安装(&I) ButtonOK=确定 ButtonCancel=取消 ButtonYes=是(&Y) ButtonYesToAll=全是(&A) ButtonNo=否(&N) ButtonNoToAll=全否(&O) ButtonFinish=完成(&F) ButtonBrowse=浏览(&B)... ButtonWizardBrowse=浏览(&R)... ButtonNewFolder=新建文件夹(&M) ; *** “选择语言”对话框消息 SelectLanguageTitle=选择安装语言 SelectLanguageLabel=选择安装时使用的语言。 ; *** 公共向导文字 ClickNext=点击“下一步”继续,或点击“取消”退出安装程序。 BeveledLabel= BrowseDialogTitle=浏览文件夹 BrowseDialogLabel=在下面的列表中选择一个文件夹,然后点击“确定”。 NewFolderName=新建文件夹 ; *** “欢迎”向导页 WelcomeLabel1=欢迎使用 [name] 安装向导 WelcomeLabel2=现在将安装 [name/ver] 到您的电脑中。%n%n建议您在继续安装前关闭所有其他应用程序。 ; *** “密码”向导页 WizardPassword=密码 PasswordLabel1=这个安装程序有密码保护。 PasswordLabel3=请输入密码,然后点击“下一步”继续。密码区分大小写。 PasswordEditLabel=密码(&P): IncorrectPassword=您输入的密码不正确,请重新输入。 ; *** “许可协议”向导页 WizardLicense=许可协议 LicenseLabel=请在继续安装前阅读以下重要信息。 LicenseLabel3=请仔细阅读下列许可协议。在继续安装前您必须同意这些协议条款。 LicenseAccepted=我同意此协议(&A) LicenseNotAccepted=我不同意此协议(&D) ; *** “信息”向导页 WizardInfoBefore=信息 InfoBeforeLabel=请在继续安装前阅读以下重要信息。 InfoBeforeClickLabel=准备好继续安装后,点击“下一步”。 WizardInfoAfter=信息 InfoAfterLabel=请在继续安装前阅读以下重要信息。 InfoAfterClickLabel=准备好继续安装后,点击“下一步”。 ; *** “用户信息”向导页 WizardUserInfo=用户信息 UserInfoDesc=请输入您的信息。 UserInfoName=用户名(&U): UserInfoOrg=组织(&O): UserInfoSerial=序列号(&S): UserInfoNameRequired=您必须输入用户名。 ; *** “选择目标目录”向导页 WizardSelectDir=选择目标位置 SelectDirDesc=您想将 [name] 安装在哪里? SelectDirLabel3=安装程序将安装 [name] 到下面的文件夹中。 SelectDirBrowseLabel=点击“下一步”继续。如果您想选择其他文件夹,点击“浏览”。 DiskSpaceGBLabel=至少需要有 [gb] GB 的可用磁盘空间。 DiskSpaceMBLabel=至少需要有 [mb] MB 的可用磁盘空间。 CannotInstallToNetworkDrive=安装程序无法安装到一个网络驱动器。 CannotInstallToUNCPath=安装程序无法安装到一个 UNC 路径。 InvalidPath=您必须输入一个带驱动器卷标的完整路径,例如:%n%nC:\APP%n%n或UNC路径:%n%n\\server\share InvalidDrive=您选定的驱动器或 UNC 共享不存在或不能访问。请选择其他位置。 DiskSpaceWarningTitle=磁盘空间不足 DiskSpaceWarning=安装程序至少需要 %1 KB 的可用空间才能安装,但选定驱动器只有 %2 KB 的可用空间。%n%n您一定要继续吗? DirNameTooLong=文件夹名称或路径太长。 InvalidDirName=文件夹名称无效。 BadDirName32=文件夹名称不能包含下列任何字符:%n%n%1 DirExistsTitle=文件夹已存在 DirExists=文件夹:%n%n%1%n%n已经存在。您一定要安装到这个文件夹中吗? DirDoesntExistTitle=文件夹不存在 DirDoesntExist=文件夹:%n%n%1%n%n不存在。您想要创建此文件夹吗? ; *** “选择组件”向导页 WizardSelectComponents=选择组件 SelectComponentsDesc=您想安装哪些程序组件? SelectComponentsLabel2=选中您想安装的组件;取消您不想安装的组件。然后点击“下一步”继续。 FullInstallation=完全安装 ; if possible don't translate 'Compact' as 'Minimal' (I mean 'Minimal' in your language) CompactInstallation=简洁安装 CustomInstallation=自定义安装 NoUninstallWarningTitle=组件已存在 NoUninstallWarning=安装程序检测到下列组件已安装在您的电脑中:%n%n%1%n%n取消选中这些组件不会卸载它们。%n%n确定要继续吗? ComponentSize1=%1 KB ComponentSize2=%1 MB ComponentsDiskSpaceGBLabel=当前选择的组件需要至少 [gb] GB 的磁盘空间。 ComponentsDiskSpaceMBLabel=当前选择的组件需要至少 [mb] MB 的磁盘空间。 ; *** “选择附加任务”向导页 WizardSelectTasks=选择附加任务 SelectTasksDesc=您想要安装程序执行哪些附加任务? SelectTasksLabel2=选择您想要安装程序在安装 [name] 时执行的附加任务,然后点击“下一步”。 ; *** “选择开始菜单文件夹”向导页 WizardSelectProgramGroup=选择开始菜单文件夹 SelectStartMenuFolderDesc=安装程序应该在哪里放置程序的快捷方式? SelectStartMenuFolderLabel3=安装程序将在下列“开始”菜单文件夹中创建程序的快捷方式。 SelectStartMenuFolderBrowseLabel=点击“下一步”继续。如果您想选择其他文件夹,点击“浏览”。 MustEnterGroupName=您必须输入一个文件夹名。 GroupNameTooLong=文件夹名或路径太长。 InvalidGroupName=无效的文件夹名字。 BadGroupName=文件夹名不能包含下列任何字符:%n%n%1 NoProgramGroupCheck2=不创建开始菜单文件夹(&D) ; *** “准备安装”向导页 WizardReady=准备安装 ReadyLabel1=安装程序准备就绪,现在可以开始安装 [name] 到您的电脑。 ReadyLabel2a=点击“安装”继续此安装程序。如果您想重新考虑或修改任何设置,点击“上一步”。 ReadyLabel2b=点击“安装”继续此安装程序。 ReadyMemoUserInfo=用户信息: ReadyMemoDir=目标位置: ReadyMemoType=安装类型: ReadyMemoComponents=已选择组件: ReadyMemoGroup=开始菜单文件夹: ReadyMemoTasks=附加任务: ; *** TExtractionWizardPage 向导页面与 ExtractArchive ExtractingLabel=正在解压文件... ButtonStopExtraction=停止解压(&S) StopExtraction=您确定要停止解压吗? ErrorExtractionAborted=解压已中止 ErrorExtractionFailed=解压失败:%1 ; *** 压缩文件解压失败详情 ArchiveIncorrectPassword=压缩文件密码不正确 ArchiveIsCorrupted=压缩文件已损坏 ArchiveUnsupportedFormat=不支持的压缩文件格式 ; *** TDownloadWizardPage 向导页面和 DownloadTemporaryFile DownloadingLabel2=正在下载文件... ButtonStopDownload=停止下载(&S) StopDownload=您确定要停止下载吗? ErrorDownloadAborted=下载已中止 ErrorDownloadFailed=下载失败:%1 %2 ErrorDownloadSizeFailed=获取下载大小失败:%1 %2 ErrorProgress=无效的进度:%1 / %2 ErrorFileSize=文件大小错误:预期 %1,实际 %2 ; *** “正在准备安装”向导页 WizardPreparing=正在准备安装 PreparingDesc=安装程序正在准备安装 [name] 到您的电脑。 PreviousInstallNotCompleted=先前的程序安装或卸载未完成,您需要重启您的电脑以完成。%n%n在重启电脑后,再次运行安装程序以完成 [name] 的安装。 CannotContinue=安装程序不能继续。请点击“取消”退出。 ApplicationsFound=以下应用程序正在使用将由安装程序更新的文件。建议您允许安装程序自动关闭这些应用程序。 ApplicationsFound2=以下应用程序正在使用将由安装程序更新的文件。建议您允许安装程序自动关闭这些应用程序。安装完成后,安装程序将尝试重新启动这些应用程序。 CloseApplications=自动关闭应用程序(&A) DontCloseApplications=不要关闭应用程序(&D) ErrorCloseApplications=安装程序无法自动关闭所有应用程序。建议您在继续之前,关闭所有在使用需要由安装程序更新的文件的应用程序。 PrepareToInstallNeedsRestart=安装程序必须重启您的计算机。计算机重启后,请再次运行安装程序以完成 [name] 的安装。%n%n是否立即重新启动? ; *** “正在安装”向导页 WizardInstalling=正在安装 InstallingLabel=安装程序正在安装 [name] 到您的电脑,请稍候。 ; *** “安装完成”向导页 FinishedHeadingLabel=[name] 安装完成 FinishedLabelNoIcons=安装程序已在您的电脑中安装了 [name]。 FinishedLabel=安装程序已在您的电脑中安装了 [name]。您可以通过已安装的快捷方式运行此应用程序。 ClickFinish=点击“完成”退出安装程序。 FinishedRestartLabel=为完成 [name] 的安装,安装程序必须重新启动您的电脑。要立即重启吗? FinishedRestartMessage=为完成 [name] 的安装,安装程序必须重新启动您的电脑。%n%n要立即重启吗? ShowReadmeCheck=是,我想查阅自述文件 YesRadio=是,立即重启电脑(&Y) NoRadio=否,稍后重启电脑(&N) ; used for example as 'Run MyProg.exe' RunEntryExec=运行 %1 ; used for example as 'View Readme.txt' RunEntryShellExec=查阅 %1 ; *** “安装程序需要下一张磁盘”提示 ChangeDiskTitle=安装程序需要下一张磁盘 SelectDiskLabel2=请插入磁盘 %1 并点击“确定”。%n%n如果这个磁盘中的文件可以在下列文件夹之外的文件夹中找到,请输入正确的路径或点击“浏览”。 PathLabel=路径(&P): FileNotInDir2=“%2”中找不到文件“%1”。请插入正确的磁盘或选择其他文件夹。 SelectDirectoryLabel=请指定下一张磁盘的位置。 ; *** 安装阶段消息 SetupAborted=安装程序未完成安装。%n%n请修正这个问题并重新运行安装程序。 AbortRetryIgnoreSelectAction=选择操作 AbortRetryIgnoreRetry=重试(&T) AbortRetryIgnoreIgnore=忽略错误并继续(&I) AbortRetryIgnoreCancel=关闭安装程序 RetryCancelSelectAction=选择操作 RetryCancelRetry=重试(&T) RetryCancelCancel=取消(&C) ; *** 安装状态消息 StatusClosingApplications=正在关闭应用程序... StatusCreateDirs=正在创建目录... StatusExtractFiles=正在提取文件... StatusDownloadFiles=正在下载文件... StatusCreateIcons=正在创建快捷方式... StatusCreateIniEntries=正在创建 INI 条目... StatusCreateRegistryEntries=正在创建注册表条目... StatusRegisterFiles=正在注册文件... StatusSavingUninstall=正在保存卸载信息... StatusRunProgram=正在完成安装... StatusRestartingApplications=正在重启应用程序... StatusRollback=正在撤销更改... ; *** 其他错误 ErrorInternal2=内部错误:%1 ErrorFunctionFailedNoCode=%1 失败 ErrorFunctionFailed=%1 失败;错误代码 %2 ErrorFunctionFailedWithMessage=%1 失败;错误代码 %2.%n%3 ErrorExecutingProgram=无法执行文件:%n%1 ; *** 注册表错误 ErrorRegOpenKey=打开注册表项时出错:%n%1\%2 ErrorRegCreateKey=创建注册表项时出错:%n%1\%2 ErrorRegWriteKey=写入注册表项时出错:%n%1\%2 ; *** INI 错误 ErrorIniEntry=在文件“%1”中创建 INI 条目时出错。 ; *** 文件复制错误 FileAbortRetryIgnoreSkipNotRecommended=跳过此文件(&S) (不推荐) FileAbortRetryIgnoreIgnoreNotRecommended=忽略错误并继续(&I) (不推荐) SourceIsCorrupted=源文件已损坏 SourceDoesntExist=源文件“%1”不存在 SourceVerificationFailed=源文件验证失败: %1 VerificationSignatureDoesntExist=签名文件“%1”不存在 VerificationSignatureInvalid=签名文件“%1”无效 VerificationKeyNotFound=签名文件“%1”使用了未知密钥 VerificationFileNameIncorrect=文件名不正确 VerificationFileTagIncorrect=文件标签不正确 VerificationFileSizeIncorrect=文件大小不正确 VerificationFileHashIncorrect=文件哈希值不正确 ExistingFileReadOnly2=无法替换现有文件,它是只读的。 ExistingFileReadOnlyRetry=移除只读属性并重试(&R) ExistingFileReadOnlyKeepExisting=保留现有文件(&K) ErrorReadingExistingDest=尝试读取现有文件时出错: FileExistsSelectAction=选择操作 FileExists2=文件已经存在。 FileExistsOverwriteExisting=覆盖已存在的文件(&O) FileExistsKeepExisting=保留现有的文件(&K) FileExistsOverwriteOrKeepAll=为所有冲突文件执行此操作(&D) ExistingFileNewerSelectAction=选择操作 ExistingFileNewer2=现有的文件比安装程序将要安装的文件还要新。 ExistingFileNewerOverwriteExisting=覆盖已存在的文件(&O) ExistingFileNewerKeepExisting=保留现有的文件(&K) (推荐) ExistingFileNewerOverwriteOrKeepAll=为所有冲突文件执行此操作(&D) ErrorChangingAttr=尝试更改下列现有文件的属性时出错: ErrorCreatingTemp=尝试在目标目录创建文件时出错: ErrorReadingSource=尝试读取下列源文件时出错: ErrorCopying=尝试复制下列文件时出错: ErrorDownloading=下载文件时出错: ErrorExtracting=解压压缩文件时出错: ErrorReplacingExistingFile=尝试替换现有文件时出错: ErrorRestartReplace=重启并替换失败: ErrorRenamingTemp=尝试重命名下列目标目录中的一个文件时出错: ErrorRegisterServer=无法注册 DLL/OCX:%1 ErrorRegSvr32Failed=RegSvr32 失败;退出代码 %1 ErrorRegisterTypeLib=无法注册类库:%1 ; *** 卸载显示名字标记 ; used for example as 'My Program (32-bit)' UninstallDisplayNameMark=%1 (%2) ; used for example as 'My Program (32-bit, All users)' UninstallDisplayNameMarks=%1 (%2, %3) UninstallDisplayNameMark32Bit=32 位 UninstallDisplayNameMark64Bit=64 位 UninstallDisplayNameMarkAllUsers=所有用户 UninstallDisplayNameMarkCurrentUser=当前用户 ; *** 安装后错误 ErrorOpeningReadme=尝试打开自述文件时出错。 ErrorRestartingComputer=安装程序无法重启电脑,请手动重启。 ; *** 卸载消息 UninstallNotFound=文件“%1”不存在。无法卸载。 UninstallOpenError=文件“%1”不能被打开。无法卸载。 UninstallUnsupportedVer=此版本的卸载程序无法识别卸载日志文件“%1”的格式。无法卸载 UninstallUnknownEntry=卸载日志中遇到一个未知条目 (%1) ConfirmUninstall=您确认要完全移除 %1 及其所有组件吗? UninstallOnlyOnWin64=仅允许在 64 位 Windows 中卸载此程序。 OnlyAdminCanUninstall=仅使用管理员权限的用户能完成此卸载。 UninstallStatusLabel=正在从您的电脑中移除 %1,请稍候。 UninstalledAll=已顺利从您的电脑中移除 %1。 UninstalledMost=%1 卸载完成。%n%n有部分内容未能被删除,但您可以手动删除它们。 UninstalledAndNeedsRestart=为完成 %1 的卸载,需要重启您的电脑。%n%n立即重启电脑吗? UninstallDataCorrupted=文件“%1”已损坏。无法卸载 ; *** 卸载状态消息 ConfirmDeleteSharedFileTitle=删除共享的文件吗? ConfirmDeleteSharedFile2=系统表示下列共享的文件已不有其他程序使用。您希望卸载程序删除这些共享的文件吗?%n%n如果删除这些文件,但仍有程序在使用这些文件,则这些程序可能出现异常。如果您不能确定,请选择“否”,在系统中保留这些文件以免引发问题。 SharedFileNameLabel=文件名: SharedFileLocationLabel=位置: WizardUninstalling=卸载状态 StatusUninstalling=正在卸载 %1... ; *** Shutdown block reasons ShutdownBlockReasonInstallingApp=正在安装 %1。 ShutdownBlockReasonUninstallingApp=正在卸载 %1。 ; The custom messages below aren't used by Setup itself, but if you make ; use of them in your scripts, you'll want to translate them. [CustomMessages] NameAndVersion=%1 版本 %2 AdditionalIcons=附加快捷方式: CreateDesktopIcon=创建桌面快捷方式(&D) CreateQuickLaunchIcon=创建快速启动栏快捷方式(&Q) ProgramOnTheWeb=%1 网站 UninstallProgram=卸载 %1 LaunchProgram=运行 %1 AssocFileExtension=将 %2 文件扩展名与 %1 建立关联(&A) AssocingFileExtension=正在将 %2 文件扩展名与 %1 建立关联... AutoStartProgramGroupDescription=启动: AutoStartProgram=自动启动 %1 AddonHostProgramNotFound=您选择的文件夹中无法找到 %1。%n%n您要继续吗? ================================================ FILE: cmake/packaging/FetchDriverDeps.cmake ================================================ # FetchDriverDeps.cmake — Download driver dependencies from GitHub Releases # # Downloads pre-built signed driver binaries at configure time. # All downloads are cached in ${CMAKE_BINARY_DIR}/_driver_deps/. # # Configuration (CMake cache variables): # FETCH_DRIVER_DEPS — Enable/disable downloads (default: ON) # VMOUSE_DRIVER_VERSION — ZakoVirtualMouse release tag (e.g. v1.1.0) # VDD_DRIVER_VERSION — ZakoVDD release tag (e.g. v0.1.4) # NEFCON_VERSION — nefcon release tag (e.g. v1.10.0) # GITHUB_TOKEN — Token for private repos (or set env GITHUB_TOKEN) # # Output variables (CACHE FORCE, available to parent): # VMOUSE_DRIVER_DIR — Directory containing vmouse driver files # VDD_DRIVER_DIR — Directory containing VDD driver files # NEFCON_DRIVER_DIR — Directory containing nefconw.exe include_guard(GLOBAL) if(NOT WIN32) return() endif() option(FETCH_DRIVER_DEPS "Download driver dependencies from GitHub Releases" ON) # Version pins set(VMOUSE_DRIVER_VERSION "v1.2.0" CACHE STRING "ZakoVirtualMouse driver version tag") set(VDD_DRIVER_VERSION "v0.14" CACHE STRING "ZakoVDD driver version tag") set(NEFCON_VERSION "v1.10.0" CACHE STRING "nefcon version tag") # Repositories set(_VMOUSE_REPO "AlkaidLab/ZakoVirtualMouse") set(_VDD_REPO "qiin2333/zako-vdd") set(_NEFCON_REPO "nefarius/nefcon") # Output directories set(DRIVER_DEPS_CACHE "${CMAKE_BINARY_DIR}/_driver_deps" CACHE PATH "Driver dependencies cache") set(VMOUSE_DRIVER_DIR "${DRIVER_DEPS_CACHE}/vmouse" CACHE PATH "" FORCE) set(VDD_DRIVER_DIR "${DRIVER_DEPS_CACHE}/vdd" CACHE PATH "" FORCE) set(NEFCON_DRIVER_DIR "${DRIVER_DEPS_CACHE}/nefcon" CACHE PATH "" FORCE) if(NOT FETCH_DRIVER_DEPS) message(STATUS "Driver dependency downloads disabled (FETCH_DRIVER_DEPS=OFF)") return() endif() # GitHub token for private repos if(NOT GITHUB_TOKEN AND DEFINED ENV{GITHUB_TOKEN}) set(GITHUB_TOKEN "$ENV{GITHUB_TOKEN}") endif() # --------------------------------------------------------------------------- # Helper: download a single file (skip if already cached) # Uses curl for authenticated requests to handle GitHub's 302 redirects # properly (CMake file(DOWNLOAD) doesn't forward auth headers on redirect). # --------------------------------------------------------------------------- function(_driver_download url output_path) if(EXISTS "${output_path}") return() endif() get_filename_component(_dir "${output_path}" DIRECTORY) file(MAKE_DIRECTORY "${_dir}") message(STATUS " Downloading: ${url}") if(GITHUB_TOKEN) # Use curl to handle GitHub's 302 redirects for private repo assets. # CMake's file(DOWNLOAD) won't send auth headers after redirect to S3. find_program(_CURL curl REQUIRED) execute_process( COMMAND "${_CURL}" -fsSL -H "Authorization: token ${GITHUB_TOKEN}" -H "Accept: application/octet-stream" -o "${output_path}" "${url}" RESULT_VARIABLE _code ERROR_VARIABLE _err) if(NOT _code EQUAL 0) message(WARNING " curl download failed (${_code}): ${_err}") file(REMOVE "${output_path}") return() endif() else() file(DOWNLOAD "${url}" "${output_path}" STATUS _status TLS_VERIFY ON) list(GET _status 0 _code) if(NOT _code EQUAL 0) list(GET _status 1 _msg) message(WARNING " Download failed (${_code}): ${_msg}") file(REMOVE "${output_path}") return() endif() endif() if(EXISTS "${output_path}") file(SIZE "${output_path}" _size) if(_size EQUAL 0) message(WARNING " Downloaded file is empty: ${output_path}") file(REMOVE "${output_path}") endif() endif() endfunction() # --------------------------------------------------------------------------- # ZakoVirtualMouse (private repo — use GitHub API for authenticated downloads) # For private repos, browser_download_url returns 302→S3 which rejects # forwarded auth headers. We must use the GitHub REST API asset endpoint # with Accept: application/octet-stream. # --------------------------------------------------------------------------- function(_fetch_vmouse) message(STATUS "Fetching ZakoVirtualMouse ${VMOUSE_DRIVER_VERSION} ...") set(_files ZakoVirtualMouse.dll ZakoVirtualMouse.inf ZakoVirtualMouse.cat ZakoVirtualMouse.cer) # Check if all files already cached set(_all_cached TRUE) foreach(_f ${_files}) if(NOT EXISTS "${VMOUSE_DRIVER_DIR}/${_f}") set(_all_cached FALSE) break() endif() endforeach() if(_all_cached) message(STATUS " All vmouse files already cached") return() endif() if(NOT GITHUB_TOKEN) message(WARNING " GITHUB_TOKEN required for private repo ${_VMOUSE_REPO}") return() endif() find_program(_CURL curl REQUIRED) file(MAKE_DIRECTORY "${VMOUSE_DRIVER_DIR}") # Query release assets via GitHub API set(_api_url "https://api.github.com/repos/${_VMOUSE_REPO}/releases/tags/${VMOUSE_DRIVER_VERSION}") set(_json "${DRIVER_DEPS_CACHE}/_vmouse_release.json") execute_process( COMMAND "${_CURL}" -fsSL -H "Authorization: token ${GITHUB_TOKEN}" -H "Accept: application/vnd.github+json" -o "${_json}" "${_api_url}" RESULT_VARIABLE _rc ERROR_VARIABLE _err) if(NOT _rc EQUAL 0) message(WARNING " Failed to query vmouse release API (${_rc}): ${_err}") return() endif() # For each required file, find its asset id and download via API foreach(_f ${_files}) if(EXISTS "${VMOUSE_DRIVER_DIR}/${_f}") continue() endif() # Extract asset download URL from JSON using regex # The API JSON contains entries like: # "name": "ZakoVirtualMouse.dll", ... "url": "https://api.github.com/repos/.../assets/12345" file(READ "${_json}" _json_content) # Find block for this asset: locate "name": "" then extract nearest "url" # We use string(REGEX) to find the asset API url string(REGEX MATCH "\"url\"[^}]*\"name\":[ ]*\"${_f}\"" _match_after "${_json_content}") string(REGEX MATCH "\"name\":[ ]*\"${_f}\"[^}]*\"url\"" _match_before "${_json_content}") set(_asset_api_url "") # Try to extract the url from the assets array # GitHub API returns assets like: { "url": "https://api.github.com/repos/.../assets/ID", ... "name": "file" } string(REGEX MATCH "\"url\":[ ]*\"(https://api\\.github\\.com/repos/[^\"]+/assets/[0-9]+)\"[^}]*\"name\":[ ]*\"${_f}\"" _m "${_json_content}") if(_m) set(_asset_api_url "${CMAKE_MATCH_1}") endif() if(NOT _asset_api_url) message(WARNING " Could not find asset URL for ${_f} in release JSON") continue() endif() message(STATUS " Downloading ${_f} via API: ${_asset_api_url}") execute_process( COMMAND "${_CURL}" -fsSL -H "Authorization: token ${GITHUB_TOKEN}" -H "Accept: application/octet-stream" -o "${VMOUSE_DRIVER_DIR}/${_f}" "${_asset_api_url}" RESULT_VARIABLE _rc ERROR_VARIABLE _err) if(NOT _rc EQUAL 0) message(WARNING " Download failed for ${_f} (${_rc}): ${_err}") file(REMOVE "${VMOUSE_DRIVER_DIR}/${_f}") endif() endforeach() file(REMOVE "${_json}") endfunction() # --------------------------------------------------------------------------- # ZakoVDD (single zip release asset) # --------------------------------------------------------------------------- function(_fetch_vdd) message(STATUS "Fetching ZakoVDD ${VDD_DRIVER_VERSION} ...") set(_zip_url "https://github.com/${_VDD_REPO}/releases/download/${VDD_DRIVER_VERSION}/zakovdd.zip") set(_zip "${DRIVER_DEPS_CACHE}/zakovdd-${VDD_DRIVER_VERSION}.zip") _driver_download("${_zip_url}" "${_zip}") if(EXISTS "${_zip}" AND NOT EXISTS "${VDD_DRIVER_DIR}/ZakoVDD.dll") file(MAKE_DIRECTORY "${VDD_DRIVER_DIR}") file(ARCHIVE_EXTRACT INPUT "${_zip}" DESTINATION "${VDD_DRIVER_DIR}") message(STATUS " Extracted VDD driver to ${VDD_DRIVER_DIR}") endif() endfunction() # --------------------------------------------------------------------------- # nefcon (zip with architecture subdirectories) # --------------------------------------------------------------------------- function(_fetch_nefcon) message(STATUS "Fetching nefcon ${NEFCON_VERSION} ...") set(_zip_url "https://github.com/${_NEFCON_REPO}/releases/download/${NEFCON_VERSION}/nefcon_${NEFCON_VERSION}.zip") set(_zip "${DRIVER_DEPS_CACHE}/nefcon-${NEFCON_VERSION}.zip") _driver_download("${_zip_url}" "${_zip}") if(EXISTS "${_zip}" AND NOT EXISTS "${NEFCON_DRIVER_DIR}/nefconw.exe") set(_tmp "${DRIVER_DEPS_CACHE}/_nefcon_extract") file(ARCHIVE_EXTRACT INPUT "${_zip}" DESTINATION "${_tmp}") file(MAKE_DIRECTORY "${NEFCON_DRIVER_DIR}") file(COPY_FILE "${_tmp}/x64/nefconw.exe" "${NEFCON_DRIVER_DIR}/nefconw.exe") file(REMOVE_RECURSE "${_tmp}") message(STATUS " Extracted nefconw.exe (x64) to ${NEFCON_DRIVER_DIR}") endif() endfunction() # --------------------------------------------------------------------------- # Execute all fetches # --------------------------------------------------------------------------- _fetch_vmouse() _fetch_vdd() _fetch_nefcon() # --------------------------------------------------------------------------- # Verify critical files # --------------------------------------------------------------------------- set(_missing) foreach(_f "${VMOUSE_DRIVER_DIR}/ZakoVirtualMouse.dll" "${VDD_DRIVER_DIR}/ZakoVDD.dll" "${NEFCON_DRIVER_DIR}/nefconw.exe") if(NOT EXISTS "${_f}") list(APPEND _missing "${_f}") endif() endforeach() if(_missing) string(REPLACE ";" "\n " _list "${_missing}") message(FATAL_ERROR "Missing driver dependencies:\n ${_list}\n" "For private repos, set -DGITHUB_TOKEN= or env GITHUB_TOKEN.\n" "To skip downloads: -DFETCH_DRIVER_DEPS=OFF (provide files manually in ${DRIVER_DEPS_CACHE}).") endif() ================================================ FILE: cmake/packaging/FetchGUI.cmake ================================================ # FetchGUI.cmake — Download pre-built Sunshine GUI from GitHub Releases # # Downloads the Tauri-based GUI binary at configure time instead of building # it from source. This removes the Rust/Cargo/Node.js dependency from the # main build. # # Configuration (CMake cache variables): # FETCH_GUI — Enable/disable GUI download (default: ON) # GUI_VERSION — Release tag to download (e.g. v0.2.9) # GUI_REPO — GitHub repo (default: qiin2333/sunshine-control-panel) # # Output variables (CACHE FORCE): # GUI_DIR — Directory containing sunshine-gui.exe include_guard(GLOBAL) if(NOT WIN32) return() endif() option(FETCH_GUI "Download pre-built GUI from GitHub Releases" ON) set(GUI_VERSION "latest" CACHE STRING "Sunshine GUI release tag (or 'latest')") set(GUI_REPO "qiin2333/sunshine-control-panel" CACHE STRING "GUI GitHub repository") set(GUI_DIR "${CMAKE_BINARY_DIR}/_gui" CACHE PATH "GUI binary directory" FORCE) if(NOT FETCH_GUI) message(STATUS "GUI download disabled (FETCH_GUI=OFF)") return() endif() # Skip if already downloaded if(EXISTS "${GUI_DIR}/sunshine-gui.exe") message(STATUS "GUI binary already cached at ${GUI_DIR}") return() endif() file(MAKE_DIRECTORY "${GUI_DIR}") find_program(_CURL curl REQUIRED) # GitHub token (optional, for rate limits) if(NOT GITHUB_TOKEN AND DEFINED ENV{GITHUB_TOKEN}) set(GITHUB_TOKEN "$ENV{GITHUB_TOKEN}") endif() # Resolve release URL if(GUI_VERSION STREQUAL "latest") set(_api_url "https://api.github.com/repos/${GUI_REPO}/releases/latest") else() set(_api_url "https://api.github.com/repos/${GUI_REPO}/releases/tags/${GUI_VERSION}") endif() message(STATUS "Fetching Sunshine GUI ${GUI_VERSION} from ${GUI_REPO} ...") # Build auth header args set(_auth_args) if(GITHUB_TOKEN) set(_auth_args -H "Authorization: token ${GITHUB_TOKEN}") endif() # Query release to get sunshine-gui.exe asset URL set(_json "${CMAKE_BINARY_DIR}/_gui_release.json") execute_process( COMMAND "${_CURL}" -fsSL ${_auth_args} -H "Accept: application/vnd.github+json" -o "${_json}" "${_api_url}" RESULT_VARIABLE _rc ERROR_VARIABLE _err) if(NOT _rc EQUAL 0) message(WARNING "Failed to query GUI release API (${_rc}): ${_err}") message(WARNING "GUI will not be available. Build it manually or set FETCH_GUI=OFF.") return() endif() # Parse asset download URLs from JSON file(READ "${_json}" _json_content) # Extract sunshine-gui.exe browser_download_url string(REGEX MATCH "\"browser_download_url\"[^\"]*\"(https://[^\"]*sunshine-gui\\.exe)\"" _m "${_json_content}") if(_m) set(_gui_url "${CMAKE_MATCH_1}") else() # Try API asset URL for private repos string(REGEX MATCH "\"url\":[ ]*\"(https://api\\.github\\.com/repos/[^\"]+/assets/[0-9]+)\"[^}]*\"name\":[ ]*\"sunshine-gui\\.exe\"" _m2 "${_json_content}") if(_m2) set(_gui_api_url "${CMAKE_MATCH_1}") else() message(WARNING "Could not find sunshine-gui.exe in release assets") file(REMOVE "${_json}") return() endif() endif() # Download sunshine-gui.exe if(_gui_url) message(STATUS " Downloading sunshine-gui.exe ...") execute_process( COMMAND "${_CURL}" -fsSL ${_auth_args} -o "${GUI_DIR}/sunshine-gui.exe" -L "${_gui_url}" RESULT_VARIABLE _rc ERROR_VARIABLE _err) elseif(_gui_api_url) message(STATUS " Downloading sunshine-gui.exe via API ...") execute_process( COMMAND "${_CURL}" -fsSL ${_auth_args} -H "Accept: application/octet-stream" -o "${GUI_DIR}/sunshine-gui.exe" "${_gui_api_url}" RESULT_VARIABLE _rc ERROR_VARIABLE _err) endif() if(NOT _rc EQUAL 0) message(WARNING " Download failed (${_rc}): ${_err}") file(REMOVE "${GUI_DIR}/sunshine-gui.exe") endif() # Try downloading WebView2Loader.dll (optional, Tauri 2 may embed it) string(REGEX MATCH "\"browser_download_url\"[^\"]*\"(https://[^\"]*WebView2Loader\\.dll)\"" _wv "${_json_content}") if(_wv) set(_wv_url "${CMAKE_MATCH_1}") message(STATUS " Downloading WebView2Loader.dll ...") execute_process( COMMAND "${_CURL}" -fsSL ${_auth_args} -o "${GUI_DIR}/WebView2Loader.dll" -L "${_wv_url}" RESULT_VARIABLE _rc) if(NOT _rc EQUAL 0) file(REMOVE "${GUI_DIR}/WebView2Loader.dll") endif() endif() file(REMOVE "${_json}") # Verify if(NOT EXISTS "${GUI_DIR}/sunshine-gui.exe") message(WARNING "GUI download failed. sunshine-gui.exe will not be available in the install.") else() file(SIZE "${GUI_DIR}/sunshine-gui.exe" _size) math(EXPR _size_mb "${_size} / 1048576") message(STATUS " GUI downloaded successfully (${_size_mb} MB)") endif() ================================================ FILE: cmake/packaging/common.cmake ================================================ # common packaging # common cpack options set(CPACK_PACKAGE_NAME ${CMAKE_PROJECT_NAME}) set(CPACK_PACKAGE_VENDOR "qiin2333") string(REGEX REPLACE "^v" "" CPACK_PACKAGE_VERSION ${PROJECT_VERSION}) # remove the v prefix if it exists set(CPACK_PACKAGE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/cpack_artifacts) set(CPACK_PACKAGE_CONTACT "https://alkaidlab.com") set(CPACK_PACKAGE_DESCRIPTION ${CMAKE_PROJECT_DESCRIPTION}) set(CPACK_PACKAGE_HOMEPAGE_URL ${CMAKE_PROJECT_HOMEPAGE_URL}) set(CPACK_RESOURCE_FILE_LICENSE ${PROJECT_SOURCE_DIR}/LICENSE) set(CPACK_PACKAGE_ICON ${PROJECT_SOURCE_DIR}/sunshine.png) set(CPACK_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}") set(CPACK_STRIP_FILES YES) # install common assets install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/common/assets/" DESTINATION "${SUNSHINE_ASSETS_DIR}" PATTERN "web" EXCLUDE) # install ABR prompt template install(FILES "${PROJECT_SOURCE_DIR}/src/assets/abr_prompt.md" DESTINATION "${SUNSHINE_ASSETS_DIR}") file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/assets") configure_file("${PROJECT_SOURCE_DIR}/src/assets/abr_prompt.md" "${CMAKE_CURRENT_BINARY_DIR}/assets/abr_prompt.md" COPYONLY) # copy assets to build directory, for running without install file(GLOB_RECURSE ALL_ASSETS RELATIVE "${SUNSHINE_SOURCE_ASSETS_DIR}/common/assets/" "${SUNSHINE_SOURCE_ASSETS_DIR}/common/assets/*") list(FILTER ALL_ASSETS EXCLUDE REGEX "^web/.*$") # Filter out the web directory foreach(asset ${ALL_ASSETS}) # Copy assets to build directory, excluding the web directory file(COPY "${SUNSHINE_SOURCE_ASSETS_DIR}/common/assets/${asset}" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/assets") endforeach() # install built vite assets install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/assets/web" DESTINATION "${SUNSHINE_ASSETS_DIR}") # install sunshine control panel (Tauri GUI) — from pre-built download if(WIN32) include(${CMAKE_MODULE_PATH}/packaging/FetchGUI.cmake) if(EXISTS "${GUI_DIR}/sunshine-gui.exe") install(PROGRAMS "${GUI_DIR}/sunshine-gui.exe" DESTINATION "${SUNSHINE_ASSETS_DIR}/gui" COMPONENT assets) # WebView2Loader.dll (optional — Tauri 2 may embed it) if(EXISTS "${GUI_DIR}/WebView2Loader.dll") install(FILES "${GUI_DIR}/WebView2Loader.dll" DESTINATION "${SUNSHINE_ASSETS_DIR}/gui" COMPONENT assets) endif() else() # Fallback: try local Tauri build output (for developers building GUI locally) set(TAURI_TARGET_DIR "${SUNSHINE_SOURCE_ASSETS_DIR}/common/sunshine-control-panel/src-tauri/target") install(PROGRAMS "${TAURI_TARGET_DIR}/x86_64-pc-windows-gnu/release/sunshine-gui.exe" DESTINATION "${SUNSHINE_ASSETS_DIR}/gui" RENAME "sunshine-gui.exe" OPTIONAL) install(PROGRAMS "${TAURI_TARGET_DIR}/x86_64-pc-windows-msvc/release/sunshine-gui.exe" DESTINATION "${SUNSHINE_ASSETS_DIR}/gui" RENAME "sunshine-gui.exe" OPTIONAL) install(PROGRAMS "${TAURI_TARGET_DIR}/release/sunshine-gui.exe" DESTINATION "${SUNSHINE_ASSETS_DIR}/gui" RENAME "sunshine-gui.exe" OPTIONAL) install(FILES "${TAURI_TARGET_DIR}/x86_64-pc-windows-gnu/release/WebView2Loader.dll" "${TAURI_TARGET_DIR}/x86_64-pc-windows-msvc/release/WebView2Loader.dll" "${TAURI_TARGET_DIR}/release/WebView2Loader.dll" DESTINATION "${SUNSHINE_ASSETS_DIR}/gui" OPTIONAL) endif() endif() # platform specific packaging if(WIN32) include(${CMAKE_MODULE_PATH}/packaging/windows.cmake) elseif(UNIX) include(${CMAKE_MODULE_PATH}/packaging/unix.cmake) if(APPLE) include(${CMAKE_MODULE_PATH}/packaging/macos.cmake) else() include(${CMAKE_MODULE_PATH}/packaging/linux.cmake) endif() endif() include(CPack) ================================================ FILE: cmake/packaging/linux.cmake ================================================ # linux specific packaging install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/linux/assets/" DESTINATION "${SUNSHINE_ASSETS_DIR}") # copy assets (excluding shaders) to build directory, for running without install file(COPY "${SUNSHINE_SOURCE_ASSETS_DIR}/linux/assets/" DESTINATION "${CMAKE_BINARY_DIR}/assets" PATTERN "shaders" EXCLUDE) # use symbolic link for shaders directory file(CREATE_LINK "${SUNSHINE_SOURCE_ASSETS_DIR}/linux/assets/shaders" "${CMAKE_BINARY_DIR}/assets/shaders" COPY_ON_ERROR SYMBOLIC) if(${SUNSHINE_BUILD_APPIMAGE} OR ${SUNSHINE_BUILD_FLATPAK}) install(FILES "${SUNSHINE_SOURCE_ASSETS_DIR}/linux/misc/60-sunshine.rules" DESTINATION "${SUNSHINE_ASSETS_DIR}/udev/rules.d") install(FILES "${CMAKE_CURRENT_BINARY_DIR}/sunshine.service" DESTINATION "${SUNSHINE_ASSETS_DIR}/systemd/user") else() find_package(Systemd) find_package(Udev) if(UDEV_FOUND) install(FILES "${SUNSHINE_SOURCE_ASSETS_DIR}/linux/misc/60-sunshine.rules" DESTINATION "${UDEV_RULES_INSTALL_DIR}") endif() if(SYSTEMD_FOUND) install(FILES "${CMAKE_CURRENT_BINARY_DIR}/sunshine.service" DESTINATION "${SYSTEMD_USER_UNIT_INSTALL_DIR}") endif() endif() # Post install set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${SUNSHINE_SOURCE_ASSETS_DIR}/linux/misc/postinst") set(CPACK_RPM_POST_INSTALL_SCRIPT_FILE "${SUNSHINE_SOURCE_ASSETS_DIR}/linux/misc/postinst") # Apply setcap for RPM # https://github.com/coreos/rpm-ostree/discussions/5036#discussioncomment-10291071 set(CPACK_RPM_USER_FILELIST "%caps(cap_sys_admin+p) ${SUNSHINE_EXECUTABLE_PATH}") # Dependencies set(CPACK_DEB_COMPONENT_INSTALL ON) set(CPACK_DEBIAN_PACKAGE_DEPENDS "\ ${CPACK_DEB_PLATFORM_PACKAGE_DEPENDS} \ libcap2, \ libcurl4, \ libdrm2, \ libevdev2, \ libnuma1, \ libopus0, \ libpulse0, \ libva2, \ libva-drm2, \ libwayland-client0, \ libx11-6, \ miniupnpc, \ openssl | libssl3") set(CPACK_RPM_PACKAGE_REQUIRES "\ ${CPACK_RPM_PLATFORM_PACKAGE_REQUIRES} \ libcap >= 2.22, \ libcurl >= 7.0, \ libdrm >= 2.4.97, \ libevdev >= 1.5.6, \ libopusenc >= 0.2.1, \ libva >= 2.14.0, \ libwayland-client >= 1.20.0, \ libX11 >= 1.7.3.1, \ miniupnpc >= 2.2.4, \ numactl-libs >= 2.0.14, \ openssl >= 3.0.2, \ pulseaudio-libs >= 10.0") if(NOT BOOST_USE_STATIC) set(CPACK_DEBIAN_PACKAGE_DEPENDS "\ ${CPACK_DEBIAN_PACKAGE_DEPENDS}, \ libboost-filesystem${Boost_VERSION}, \ libboost-locale${Boost_VERSION}, \ libboost-log${Boost_VERSION}, \ libboost-program-options${Boost_VERSION}") set(CPACK_RPM_PACKAGE_REQUIRES "\ ${CPACK_RPM_PACKAGE_REQUIRES}, \ boost-filesystem >= ${Boost_VERSION}, \ boost-locale >= ${Boost_VERSION}, \ boost-log >= ${Boost_VERSION}, \ boost-program-options >= ${Boost_VERSION}") endif() # This should automatically figure out dependencies, doesn't work with the current config set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS OFF) # application icon if(NOT ${SUNSHINE_BUILD_FLATPAK}) install(FILES "${CMAKE_SOURCE_DIR}/sunshine.svg" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/apps") else() install(FILES "${CMAKE_SOURCE_DIR}/sunshine.svg" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/apps" RENAME "${PROJECT_FQDN}.svg") endif() # tray icon if(${SUNSHINE_TRAY} STREQUAL 1) install(FILES "${CMAKE_SOURCE_DIR}/sunshine.svg" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/status" RENAME "sunshine-tray.svg") install(FILES "${SUNSHINE_SOURCE_ASSETS_DIR}/common/assets/web/public/images/sunshine-playing.svg" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/status") install(FILES "${SUNSHINE_SOURCE_ASSETS_DIR}/common/assets/web/public/images/sunshine-pausing.svg" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/status") install(FILES "${SUNSHINE_SOURCE_ASSETS_DIR}/common/assets/web/public/images/sunshine-locked.svg" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/status") set(CPACK_DEBIAN_PACKAGE_DEPENDS "\ ${CPACK_DEBIAN_PACKAGE_DEPENDS}, \ libayatana-appindicator3-1, \ libnotify4") set(CPACK_RPM_PACKAGE_REQUIRES "\ ${CPACK_RPM_PACKAGE_REQUIRES}, \ libappindicator-gtk3 >= 12.10.0") endif() # desktop file # todo - validate desktop files with `desktop-file-validate` if(NOT ${SUNSHINE_BUILD_FLATPAK}) install(FILES "${CMAKE_CURRENT_BINARY_DIR}/sunshine.desktop" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/applications") else() install(FILES "${CMAKE_CURRENT_BINARY_DIR}/sunshine.desktop" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/applications" RENAME "${PROJECT_FQDN}.desktop") install(FILES "${CMAKE_CURRENT_BINARY_DIR}/sunshine_kms.desktop" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/applications" RENAME "${PROJECT_FQDN}_kms.desktop") endif() if(${SUNSHINE_BUILD_FLATPAK}) install(FILES "${CMAKE_CURRENT_BINARY_DIR}/sunshine_terminal.desktop" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/applications" RENAME "${PROJECT_FQDN}_terminal.desktop") elseif(NOT ${SUNSHINE_BUILD_APPIMAGE}) install(FILES "${CMAKE_CURRENT_BINARY_DIR}/sunshine_terminal.desktop" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/applications") endif() # metadata file # todo - validate file with `appstream-util validate-relax` if(NOT ${SUNSHINE_BUILD_FLATPAK}) install(FILES "${CMAKE_CURRENT_BINARY_DIR}/sunshine.appdata.xml" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/metainfo") else() install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_FQDN}.metainfo.xml" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/metainfo") endif() ================================================ FILE: cmake/packaging/macos.cmake ================================================ # macos specific packaging # todo - bundle doesn't produce a valid .app use cpack -G DragNDrop set(CPACK_BUNDLE_NAME "${CMAKE_PROJECT_NAME}") set(CPACK_BUNDLE_PLIST "${APPLE_PLIST_FILE}") set(CPACK_BUNDLE_ICON "${PROJECT_SOURCE_DIR}/sunshine.icns") # set(CPACK_BUNDLE_STARTUP_COMMAND "${INSTALL_RUNTIME_DIR}/sunshine") if(SUNSHINE_PACKAGE_MACOS) # todo set(MAC_PREFIX "${CMAKE_PROJECT_NAME}.app/Contents") set(INSTALL_RUNTIME_DIR "${MAC_PREFIX}/MacOS") install(TARGETS sunshine BUNDLE DESTINATION . COMPONENT Runtime RUNTIME DESTINATION ${INSTALL_RUNTIME_DIR} COMPONENT Runtime) else() install(FILES "${SUNSHINE_SOURCE_ASSETS_DIR}/macos/misc/uninstall_pkg.sh" DESTINATION "${SUNSHINE_ASSETS_DIR}") endif() install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/macos/assets/" DESTINATION "${SUNSHINE_ASSETS_DIR}") # copy assets to build directory, for running without install file(COPY "${SUNSHINE_SOURCE_ASSETS_DIR}/macos/assets/" DESTINATION "${CMAKE_BINARY_DIR}/assets") ================================================ FILE: cmake/packaging/sunshine.iss.in ================================================ ; Sunshine Inno Setup Script ; Generated from CMake template - DO NOT EDIT DIRECTLY ; Edit cmake/packaging/sunshine.iss.in instead #define MyAppName "@CMAKE_PROJECT_NAME@" #define MyAppVersion "@CPACK_PACKAGE_VERSION@" #define MyAppPublisher "@CPACK_PACKAGE_VENDOR@" #define MyAppURL "@CMAKE_PROJECT_HOMEPAGE_URL@" #define MyAppExeName "@CMAKE_PROJECT_NAME@.exe" #define MyAppGUIExeName "sunshine-gui.exe" #define MySourceDir "@INNO_STAGING_DIR@" #define MyIconFile "@CMAKE_SOURCE_DIR@\sunshine.ico" #define MyWelcomeBmp "@CMAKE_SOURCE_DIR@\welcome.bmp" #define MySmallBmp "@CMAKE_SOURCE_DIR@\wizard_small.bmp" #define MyLicenseFile "@CMAKE_SOURCE_DIR@\LICENSE" [Setup] ; 基本设置 AppId={{B16E5C0D-7B8A-4E3B-9F1A-2D4C6E8F0A1B} AppName={#MyAppName} AppVersion={#MyAppVersion} AppVerName=Sunshine Foundation Game Streaming Server v{#MyAppVersion} AppPublisher={#MyAppPublisher} AppPublisherURL={#MyAppURL} AppSupportURL={#MyAppURL}/support AppUpdatesURL={#MyAppURL} DefaultDirName={code:GetPreviousInstallDir|{autopf}\{#MyAppName}} DefaultGroupName={#MyAppName} ; 管理员权限 PrivilegesRequired=admin PrivilegesRequiredOverridesAllowed=dialog ; 输出设置 OutputDir=@CPACK_PACKAGE_DIRECTORY@ OutputBaseFilename=Sunshine ; 压缩 Compression=lzma2/ultra64 SolidCompression=yes ; UI 设置 SetupIconFile={#MyIconFile} UninstallDisplayIcon={app}\{#MyAppExeName} WizardStyle=modern hidebevels WizardImageFile={#MyWelcomeBmp} WizardSmallImageFile={#MySmallBmp} WizardImageAlphaFormat=defined WizardSizePercent=120 ; 版本信息 (VersionInfoVersion requires X.X.X.X format, use AppVersion for display) VersionInfoCompany={#MyAppPublisher} VersionInfoDescription=Sunshine Foundation Game Streaming Server VersionInfoProductName={#MyAppName} ; 其他 LicenseFile={#MyLicenseFile} ; 允许覆盖安装 UsePreviousAppDir=yes ; 最小 Windows 版本 (Windows 10) MinVersion=10.0 ; 64 位安装 ArchitecturesAllowed=x64compatible ArchitecturesInstallIn64BitMode=x64compatible ; 重启管理器 CloseApplications=yes RestartApplications=yes [Languages] Name: "english"; MessagesFile: "compiler:Default.isl" Name: "chinesesimplified"; MessagesFile: "@CMAKE_SOURCE_DIR@\cmake\packaging\ChineseSimplified.isl" [CustomMessages] ; English custom messages english.ComponentApplication=Sunshine main application english.ComponentAssets=Required assets (shaders, web UI) english.ComponentVDD=Zako Virtual Display Driver (HDR) english.ComponentAutostart=Launch on system startup english.ComponentFirewall=Add firewall exclusions english.ComponentGamepad=Virtual Gamepad (ViGEmBus) english.ComponentVmouse=Virtual Mouse Driver (UMDF) english.ComponentTools=Diagnostic tools (dxgi-info, audio-info) english.TypeRecommended=Recommended (virtual display + firewall + autostart) english.TypeFull=Full installation (all components) english.TypeCompact=Compact installation (core only) english.TypeCustom=Custom installation english.ComponentVDDDesc=Required for headless/remote streaming without a physical monitor. Enables HDR passthrough. english.ComponentFirewallDesc=Allows Moonlight clients to discover and connect to this PC over the network. english.ComponentAutostartDesc=Sunshine will start automatically when Windows boots. Recommended for always-on streaming. english.ComponentGamepadDesc=Emulates Xbox controller for games. Install only if you need gamepad input from the client. english.ComponentVmouseDesc=Provides smooth absolute mouse positioning. Install if cursor feels laggy. english.ComponentToolsDesc=dxgi-info, audio-info for troubleshooting display and audio issues. english.StatusResetPermissions=Resetting file permissions... english.StatusUpdatePath=Updating system PATH... english.StatusMigrateConfig=Migrating configuration files... english.StatusFirewall=Configuring firewall rules... english.StatusInstallVDD=Installing virtual display driver... english.StatusInstallGamepad=Installing virtual gamepad... english.StatusInstallVmouse=Installing virtual mouse driver... english.StatusInstallService=Installing system service... english.StatusAutostart=Configuring autostart... english.FinishOpenDocs=Open documentation english.FinishLaunchGUI=Launch Sunshine GUI english.MsgOldNSISDetected=Detected a previous NSIS installation of Sunshine.%nIt must be uninstalled before continuing.%n%nUninstall the previous version now? english.MsgOldNSISFailed=The previous installation could not be fully removed.%nPlease uninstall it manually and try again. english.MsgUninstallGamepad=Do you want to remove Virtual Gamepad? english.MsgUninstallData=Do you want to remove all data in %1?%n(This includes configuration, cover images, and settings) english.StatusStoppingService=Stopping Sunshine service... english.StatusStoppingProcesses=Stopping running Sunshine processes... ; Chinese Simplified custom messages chinesesimplified.ComponentApplication=Sunshine 主程序 chinesesimplified.ComponentAssets=必要资源(着色器、Web UI) chinesesimplified.ComponentVDD=Zako 虚拟显示驱动(HDR) chinesesimplified.ComponentAutostart=开机自动启动 chinesesimplified.ComponentFirewall=添加防火墙规则 chinesesimplified.ComponentGamepad=虚拟手柄(ViGEmBus) chinesesimplified.ComponentVmouse=虚拟鼠标驱动(UMDF) chinesesimplified.ComponentTools=诊断工具(dxgi-info、audio-info) chinesesimplified.TypeRecommended=推荐安装(虚拟显示器 + 防火墙 + 开机自启) chinesesimplified.TypeFull=完全安装(所有组件) chinesesimplified.TypeCompact=简洁安装(仅核心) chinesesimplified.TypeCustom=自定义安装 chinesesimplified.ComponentVDDDesc=无头/远程串流必装。无需外接显示器即可串流,支持 HDR 直通。 chinesesimplified.ComponentFirewallDesc=允许 Moonlight 客户端通过网络发现并连接本机。 chinesesimplified.ComponentAutostartDesc=Windows 启动时自动运行 Sunshine。推荐常驻串流使用。 chinesesimplified.ComponentGamepadDesc=模拟 Xbox 手柄。仅需要从客户端传入手柄输入时安装。 chinesesimplified.ComponentVmouseDesc=提供平滑的绝对定位鼠标。如鼠标延迟可尝试安装。 chinesesimplified.ComponentToolsDesc=dxgi-info、audio-info 等,用于排查显示和音频问题。 chinesesimplified.StatusResetPermissions=正在重置文件权限... chinesesimplified.StatusUpdatePath=正在更新系统 PATH... chinesesimplified.StatusMigrateConfig=正在迁移配置文件... chinesesimplified.StatusFirewall=正在配置防火墙规则... chinesesimplified.StatusInstallVDD=正在安装虚拟显示驱动... chinesesimplified.StatusInstallGamepad=正在安装虚拟手柄... chinesesimplified.StatusInstallVmouse=正在安装虚拟鼠标驱动... chinesesimplified.StatusInstallService=正在安装系统服务... chinesesimplified.StatusAutostart=正在配置自动启动... chinesesimplified.FinishOpenDocs=打开使用文档 chinesesimplified.FinishLaunchGUI=启动 Sunshine 管理界面 chinesesimplified.MsgOldNSISDetected=检测到旧版 NSIS 安装的 Sunshine。%n需要先卸载才能继续。%n%n是否现在卸载旧版本? chinesesimplified.MsgOldNSISFailed=无法完全移除旧版安装。%n请手动卸载后重试。 chinesesimplified.MsgUninstallGamepad=是否移除虚拟手柄(ViGEmBus)? chinesesimplified.MsgUninstallData=是否删除 %1 中的所有数据?%n(包括配置文件、封面图片和设置) chinesesimplified.StatusStoppingService=正在停止 Sunshine 服务... chinesesimplified.StatusStoppingProcesses=正在停止 Sunshine 进程... [Types] Name: "recommended"; Description: "{cm:TypeRecommended}" Name: "full"; Description: "{cm:TypeFull}" Name: "compact"; Description: "{cm:TypeCompact}" Name: "custom"; Description: "{cm:TypeCustom}"; Flags: iscustom [Components] Name: "application"; Description: "{cm:ComponentApplication}"; Types: recommended full compact custom; Flags: fixed Name: "assets"; Description: "{cm:ComponentAssets}"; Types: recommended full compact custom; Flags: fixed Name: "vdd"; Description: "{cm:ComponentVDD} — {cm:ComponentVDDDesc}"; Types: recommended full; ExtraDiskSpaceRequired: 2097152 Name: "firewall"; Description: "{cm:ComponentFirewall} — {cm:ComponentFirewallDesc}"; Types: recommended full compact Name: "autostart"; Description: "{cm:ComponentAutostart} — {cm:ComponentAutostartDesc}"; Types: recommended full Name: "gamepad"; Description: "{cm:ComponentGamepad} — {cm:ComponentGamepadDesc}"; Types: full Name: "vmouse"; Description: "{cm:ComponentVmouse} — {cm:ComponentVmouseDesc}"; Types: full Name: "tools"; Description: "{cm:ComponentTools} — {cm:ComponentToolsDesc}"; Types: full [Tasks] Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}" [Files] ; Main application Source: "{#MySourceDir}\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion; Components: application Source: "{#MySourceDir}\zlib1.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: application ; Mandatory tools Source: "{#MySourceDir}\tools\sunshinesvc.exe"; DestDir: "{app}\tools"; Flags: ignoreversion; Components: application Source: "{#MySourceDir}\tools\qiin-tabtip.exe"; DestDir: "{app}\tools"; Flags: ignoreversion; Components: application Source: "{#MySourceDir}\tools\nefconw.exe"; DestDir: "{app}\tools"; Flags: ignoreversion; Components: application ; Portable scripts (will be deleted during install, but needed for layout) Source: "{#MySourceDir}\install_portable.bat"; DestDir: "{app}"; Flags: ignoreversion; Components: application Source: "{#MySourceDir}\uninstall_portable.bat"; DestDir: "{app}"; Flags: ignoreversion; Components: application ; Language files Source: "{#MySourceDir}\scripts\languages\*"; DestDir: "{app}\scripts\languages"; Flags: ignoreversion recursesubdirs; Components: application ; Service scripts Source: "{#MySourceDir}\scripts\install-service.bat"; DestDir: "{app}\scripts"; Flags: ignoreversion; Components: application Source: "{#MySourceDir}\scripts\uninstall-service.bat"; DestDir: "{app}\scripts"; Flags: ignoreversion; Components: application Source: "{#MySourceDir}\scripts\sleep.bat"; DestDir: "{app}\scripts"; Flags: ignoreversion; Components: application ; Migration scripts Source: "{#MySourceDir}\scripts\migrate-config.bat"; DestDir: "{app}\scripts"; Flags: ignoreversion; Components: application Source: "{#MySourceDir}\scripts\migrate-images.ps1"; DestDir: "{app}\scripts"; Flags: ignoreversion; Components: application Source: "{#MySourceDir}\scripts\IMAGE_MIGRATION.md"; DestDir: "{app}\scripts"; Flags: ignoreversion; Components: application ; PATH management Source: "{#MySourceDir}\scripts\update-path.bat"; DestDir: "{app}\scripts"; Flags: ignoreversion; Components: application ; Assets (includes GUI, shaders, web UI, etc.) Source: "{#MySourceDir}\assets\*"; DestDir: "{app}\assets"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: assets ; Helper tools Source: "{#MySourceDir}\tools\device-toggler.exe"; DestDir: "{app}\tools"; Flags: ignoreversion; Components: assets Source: "{#MySourceDir}\tools\DevManView.exe"; DestDir: "{app}\tools"; Flags: ignoreversion; Components: assets Source: "{#MySourceDir}\tools\restart64.exe"; DestDir: "{app}\tools"; Flags: ignoreversion; Components: assets Source: "{#MySourceDir}\tools\SetDpi.exe"; DestDir: "{app}\tools"; Flags: ignoreversion; Components: assets Source: "{#MySourceDir}\tools\setreg.exe"; DestDir: "{app}\tools"; Flags: ignoreversion; Components: assets ; Autostart script Source: "{#MySourceDir}\scripts\autostart-service.bat"; DestDir: "{app}\scripts"; Flags: ignoreversion; Components: autostart ; Firewall scripts Source: "{#MySourceDir}\scripts\add-firewall-rule.bat"; DestDir: "{app}\scripts"; Flags: ignoreversion; Components: firewall Source: "{#MySourceDir}\scripts\delete-firewall-rule.bat"; DestDir: "{app}\scripts"; Flags: ignoreversion; Components: firewall ; Virtual Display Driver scripts & files Source: "{#MySourceDir}\scripts\install-vdd.bat"; DestDir: "{app}\scripts"; Flags: ignoreversion; Components: vdd Source: "{#MySourceDir}\scripts\uninstall-vdd.bat"; DestDir: "{app}\scripts"; Flags: ignoreversion; Components: vdd Source: "{#MySourceDir}\scripts\driver\*"; DestDir: "{app}\scripts\driver"; Flags: ignoreversion recursesubdirs; Components: vdd ; Gamepad scripts Source: "{#MySourceDir}\scripts\install-gamepad.bat"; DestDir: "{app}\scripts"; Flags: ignoreversion; Components: gamepad Source: "{#MySourceDir}\scripts\uninstall-gamepad.bat"; DestDir: "{app}\scripts"; Flags: ignoreversion; Components: gamepad ; Virtual Mouse Driver scripts & files Source: "{#MySourceDir}\scripts\vmouse\install-vmouse.bat"; DestDir: "{app}\scripts\vmouse"; Flags: ignoreversion; Components: vmouse Source: "{#MySourceDir}\scripts\vmouse\uninstall-vmouse.bat"; DestDir: "{app}\scripts\vmouse"; Flags: ignoreversion; Components: vmouse Source: "{#MySourceDir}\scripts\vmouse\driver\*"; DestDir: "{app}\scripts\vmouse\driver"; Flags: ignoreversion recursesubdirs; Components: vmouse ; Optional diagnostic tools Source: "{#MySourceDir}\tools\dxgi-info.exe"; DestDir: "{app}\tools"; Flags: ignoreversion; Components: tools Source: "{#MySourceDir}\tools\audio-info.exe"; DestDir: "{app}\tools"; Flags: ignoreversion; Components: tools [Icons] ; Start Menu shortcuts Name: "{group}\Sunshine"; Filename: "{app}\{#MyAppExeName}"; Parameters: "--shortcut"; IconFilename: "{app}\{#MyAppExeName}" Name: "{group}\Sunshine GUI"; Filename: "{app}\assets\gui\{#MyAppGUIExeName}"; IconFilename: "{app}\assets\gui\{#MyAppGUIExeName}" Name: "{group}\Sunshine Tools"; Filename: "{app}\tools"; IconFilename: "{app}\{#MyAppExeName}" Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}" ; Desktop shortcuts (optional, controlled by Tasks) Name: "{autodesktop}\Sunshine"; Filename: "{app}\{#MyAppExeName}"; Parameters: "--shortcut"; IconFilename: "{app}\{#MyAppExeName}"; Tasks: desktopicon Name: "{autodesktop}\Sunshine GUI"; Filename: "{app}\assets\gui\{#MyAppGUIExeName}"; IconFilename: "{app}\assets\gui\{#MyAppGUIExeName}"; Tasks: desktopicon ; Install dir shortcut Name: "{app}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Parameters: "--shortcut"; IconFilename: "{app}\{#MyAppExeName}" [Registry] ; Store installation directory for future upgrades Root: HKLM64; Subkey: "SOFTWARE\AlkaidLab\Sunshine"; ValueType: string; ValueName: "InstallDir"; ValueData: "{app}"; Flags: uninsdeletevalue [Run] ; Post-install actions (shown on progress page) Filename: "{cmd}"; Parameters: "/c icacls ""{app}"" /reset /T /C /Q >nul 2>&1"; StatusMsg: "{cm:StatusResetPermissions}"; Flags: runhidden Filename: "{app}\scripts\update-path.bat"; Parameters: "add"; StatusMsg: "{cm:StatusUpdatePath}"; Flags: runhidden waituntilterminated Filename: "{app}\scripts\migrate-config.bat"; StatusMsg: "{cm:StatusMigrateConfig}"; Flags: runhidden waituntilterminated Filename: "{app}\scripts\add-firewall-rule.bat"; StatusMsg: "{cm:StatusFirewall}"; Flags: runhidden waituntilterminated; Components: firewall Filename: "{app}\scripts\install-vdd.bat"; StatusMsg: "{cm:StatusInstallVDD}"; Flags: runhidden waituntilterminated; Components: vdd Filename: "{app}\scripts\install-gamepad.bat"; StatusMsg: "{cm:StatusInstallGamepad}"; Flags: runhidden waituntilterminated; Components: gamepad Filename: "{app}\scripts\vmouse\install-vmouse.bat"; StatusMsg: "{cm:StatusInstallVmouse}"; Flags: runhidden waituntilterminated; Components: vmouse Filename: "{app}\scripts\install-service.bat"; StatusMsg: "{cm:StatusInstallService}"; Flags: runhidden waituntilterminated Filename: "{app}\scripts\autostart-service.bat"; StatusMsg: "{cm:StatusAutostart}"; Flags: runhidden waituntilterminated; Components: autostart ; Finish page actions - user selectable ; Use explorer.exe to launch GUI so it always runs as the non-elevated current user, ; even though the installer itself is running with admin privileges. Filename: "https://docs.qq.com/aio/DSGdQc3htbFJjSFdO?p=DXpTjzl2kZwBjN7jlRMkRJ"; Description: "{cm:FinishOpenDocs}"; Flags: postinstall shellexec runascurrentuser unchecked nowait skipifsilent Filename: "{win}\explorer.exe"; Parameters: """{app}\assets\gui\{#MyAppGUIExeName}"""; Description: "{cm:FinishLaunchGUI}"; Flags: postinstall nowait skipifsilent [UninstallRun] ; Stop running processes first Filename: "taskkill"; Parameters: "/f /im sunshine-gui.exe"; Flags: runhidden; RunOnceId: "KillGUI" Filename: "taskkill"; Parameters: "/f /im sunshine.exe"; Flags: runhidden; RunOnceId: "KillSunshine" ; Remove system components Filename: "{app}\scripts\delete-firewall-rule.bat"; Flags: runhidden waituntilterminated; RunOnceId: "DelFirewall" Filename: "{app}\scripts\uninstall-service.bat"; Flags: runhidden waituntilterminated; RunOnceId: "UninstallService" Filename: "{app}\scripts\uninstall-vdd.bat"; Flags: runhidden waituntilterminated; RunOnceId: "UninstallVDD" Filename: "{app}\scripts\vmouse\uninstall-vmouse.bat"; Flags: runhidden waituntilterminated; RunOnceId: "UninstallVmouse" Filename: "{app}\{#MyAppExeName}"; Parameters: "--restore-nvprefs-undo"; Flags: runhidden waituntilterminated; RunOnceId: "RestoreNV" Filename: "{app}\scripts\update-path.bat"; Parameters: "remove"; Flags: runhidden waituntilterminated; RunOnceId: "RemovePath" [UninstallDelete] ; Clean up portable scripts that shouldn't be in installed version Type: files; Name: "{app}\install_portable.bat" Type: files; Name: "{app}\uninstall_portable.bat" ; Clean up temporary files Type: files; Name: "{app}\*.tmp" Type: files; Name: "{app}\*.old" [Code] // ============================================================================= // Pascal Script for custom behavior // ============================================================================= // ============================================================================= // Deep UI Customization — Sunshine Branded Installer Theme // ============================================================================= // Color palette (BGR format for Delphi): // Brand Gold: $0098E8 (RGB #E89800) — primary accent // Brand Orange: $0060C0 (RGB #C06000) — headings // Dark Text: $1A1A1A (RGB #1A1A1A) — body text // Mid Text: $444444 (RGB #444444) — secondary text // Light BG: $FAF6F2 (RGB #F2F6FA) — warm tint background // Inner BG: $F5F2EF (RGB #EFF2F5) — inner panel bg // Header BG: $A86420 (RGB #2064A8) — header band color // Accent Line: $0088D8 (RGB #D88800) — accent bar var BrandPanel: TPanel; BrandLogo: TBitmapImage; BrandTitle: TNewStaticText; BrandSubtitle: TNewStaticText; AccentBar: TBevel; procedure InitializeWizard(); var WelcomeLeft: Integer; begin // ── Main form tweaks ── WizardForm.Color := $FAF6F2; // ── Header panel (top bar on inner pages) — brand color ── WizardForm.MainPanel.Color := $C07020; WizardForm.PageNameLabel.Font.Color := $FFFFFF; WizardForm.PageNameLabel.Font.Size := 11; WizardForm.PageNameLabel.Font.Style := [fsBold]; WizardForm.PageDescriptionLabel.Font.Color := $F0E0D0; WizardForm.PageDescriptionLabel.Font.Size := 9; // ── Welcome page — full brand makeover ── WelcomeLeft := WizardForm.WelcomeLabel1.Left; // Welcome heading WizardForm.WelcomeLabel1.Font.Name := 'Segoe UI'; WizardForm.WelcomeLabel1.Font.Color := $0060C0; WizardForm.WelcomeLabel1.Font.Size := 16; WizardForm.WelcomeLabel1.Font.Style := [fsBold]; // Welcome body text WizardForm.WelcomeLabel2.Font.Name := 'Segoe UI'; WizardForm.WelcomeLabel2.Font.Color := $333333; WizardForm.WelcomeLabel2.Font.Size := 9; // ── License page ── WizardForm.LicenseMemo.Font.Name := 'Consolas'; WizardForm.LicenseMemo.Font.Size := 9; WizardForm.LicenseMemo.Color := $FFFFFF; // ── Components page ── WizardForm.ComponentsList.Color := $FFFFFF; WizardForm.TypesCombo.Color := $FFFFFF; // ── Directory page ── WizardForm.DirEdit.Color := $FFFFFF; // ── Ready page memo ── WizardForm.ReadyMemo.Font.Name := 'Segoe UI'; WizardForm.ReadyMemo.Font.Size := 9; WizardForm.ReadyMemo.Color := $FFFFFF; // ── Progress page ── WizardForm.StatusLabel.Font.Name := 'Segoe UI'; WizardForm.StatusLabel.Font.Color := $444444; WizardForm.ProgressGauge.Top := WizardForm.ProgressGauge.Top; // ── Finish page — brand style ── WizardForm.FinishedHeadingLabel.Font.Name := 'Segoe UI'; WizardForm.FinishedHeadingLabel.Font.Color := $0060C0; WizardForm.FinishedHeadingLabel.Font.Size := 16; WizardForm.FinishedHeadingLabel.Font.Style := [fsBold]; WizardForm.FinishedLabel.Font.Name := 'Segoe UI'; WizardForm.FinishedLabel.Font.Color := $333333; WizardForm.FinishedLabel.Font.Size := 9; // ── Inner page background ── WizardForm.InnerPage.Color := $F5F2EF; // ── Bottom button panel styling ── WizardForm.NextButton.Font.Size := 9; WizardForm.BackButton.Font.Size := 9; WizardForm.CancelButton.Font.Size := 9; // ── Create accent bar below header ── AccentBar := TBevel.Create(WizardForm); AccentBar.Parent := WizardForm.InnerPage; AccentBar.Shape := bsTopLine; AccentBar.Left := 0; AccentBar.Top := 0; AccentBar.Width := WizardForm.InnerPage.Width; AccentBar.Height := 3; // ── Create brand panel on Welcome page (right side overlay) ── BrandPanel := TPanel.Create(WizardForm); BrandPanel.Parent := WizardForm.WelcomeLabel1.Parent; BrandPanel.Left := WelcomeLeft; BrandPanel.Top := WizardForm.WelcomeLabel2.Top + WizardForm.WelcomeLabel2.Height + 20; BrandPanel.Width := WizardForm.WelcomeLabel1.Width; BrandPanel.Height := 90; BrandPanel.Color := $F0E8E0; BrandPanel.BevelOuter := bvNone; BrandPanel.ParentBackground := False; // Version info in brand panel BrandTitle := TNewStaticText.Create(WizardForm); BrandTitle.Parent := BrandPanel; BrandTitle.Left := 16; BrandTitle.Top := 12; BrandTitle.Caption := 'Foundation Game Streaming Server'; BrandTitle.Font.Name := 'Segoe UI'; BrandTitle.Font.Size := 10; BrandTitle.Font.Color := $0060C0; BrandTitle.Font.Style := [fsBold]; BrandSubtitle := TNewStaticText.Create(WizardForm); BrandSubtitle.Parent := BrandPanel; BrandSubtitle.Left := 16; BrandSubtitle.Top := 38; BrandSubtitle.Caption := 'v' + '{#MyAppVersion}' + ' | Open Source | Low-latency'; BrandSubtitle.Font.Name := 'Segoe UI'; BrandSubtitle.Font.Size := 9; BrandSubtitle.Font.Color := $666666; // URL link in brand panel BrandLogo := TBitmapImage.Create(WizardForm); BrandLogo.Parent := BrandPanel; BrandLogo.Left := 16; BrandLogo.Top := 60; // Use as a visual separator line effect (reuse the bitmap component for placement) end; // Check if old NSIS installation exists and offer to uninstall function DetectOldNSISInstall(): Boolean; var UninstallString: String; begin Result := False; // Check for NSIS uninstall registry entry if RegQueryStringValue(HKLM, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Sunshine', 'UninstallString', UninstallString) then begin Result := True; end; // Also check WOW6432Node if not Result then begin if RegQueryStringValue(HKLM, 'SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Sunshine', 'UninstallString', UninstallString) then begin Result := True; end; end; end; function GetOldNSISUninstallString(): String; var UninstallString: String; begin Result := ''; if RegQueryStringValue(HKLM, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Sunshine', 'UninstallString', UninstallString) then begin Result := UninstallString; end else if RegQueryStringValue(HKLM, 'SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Sunshine', 'UninstallString', UninstallString) then begin Result := UninstallString; end; end; // Read previous install directory from registry function GetPreviousInstallDir(Default: String): String; var InstallDir: String; begin Result := Default; if RegQueryStringValue(HKLM64, 'SOFTWARE\AlkaidLab\Sunshine', 'InstallDir', InstallDir) then begin if DirExists(InstallDir) then Result := InstallDir; end; end; // Initialization: handle old NSIS upgrade function InitializeSetup(): Boolean; var UninstallString: String; ResultCode: Integer; begin Result := True; if DetectOldNSISInstall() then begin UninstallString := GetOldNSISUninstallString(); if UninstallString <> '' then begin if MsgBox(CustomMessage('MsgOldNSISDetected'), mbConfirmation, MB_YESNO) = IDYES then begin // Run the NSIS uninstaller silently Exec(RemoveQuotes(UninstallString), '/S', '', SW_SHOW, ewWaitUntilTerminated, ResultCode); // Give it a moment to finish Sleep(2000); // Check if uninstall was successful if DetectOldNSISInstall() then begin MsgBox(CustomMessage('MsgOldNSISFailed'), mbError, MB_OK); Result := False; end; end else begin Result := False; end; end; end; end; // Stop services and processes before installation to avoid locked files function PrepareToInstall(var NeedsRestart: Boolean): String; var ResultCode: Integer; begin Result := ''; // Stop the Sunshine service Exec('net', 'stop SunshineService', '', SW_HIDE, ewWaitUntilTerminated, ResultCode); // Kill any running processes Exec('taskkill', '/f /im sunshine.exe', '', SW_HIDE, ewWaitUntilTerminated, ResultCode); Exec('taskkill', '/f /im sunshine-gui.exe', '', SW_HIDE, ewWaitUntilTerminated, ResultCode); Exec('taskkill', '/f /im sunshinesvc.exe', '', SW_HIDE, ewWaitUntilTerminated, ResultCode); // Small delay to allow processes to release files Sleep(1000); end; // Clean up portable scripts during install procedure CurStepChanged(CurStep: TSetupStep); begin if CurStep = ssPostInstall then begin // Delete portable scripts in installed version DeleteFile(ExpandConstant('{app}\install_portable.bat')); DeleteFile(ExpandConstant('{app}\uninstall_portable.bat')); end; end; // Custom uninstall: ask about gamepad and data removal procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep); var ResultCode: Integer; begin if CurUninstallStep = usUninstall then begin // Ask about virtual gamepad if MsgBox(CustomMessage('MsgUninstallGamepad'), mbConfirmation, MB_YESNO or MB_DEFBUTTON2) = IDYES then begin Exec(ExpandConstant('{app}\scripts\uninstall-gamepad.bat'), '', '', SW_HIDE, ewWaitUntilTerminated, ResultCode); end; end; if CurUninstallStep = usPostUninstall then begin // Ask about data removal if MsgBox(FmtMessage(CustomMessage('MsgUninstallData'), [ExpandConstant('{app}')]), mbConfirmation, MB_YESNO or MB_DEFBUTTON2) = IDNO then begin // User chose to keep data, do nothing end else begin // Remove the installation directory DelTree(ExpandConstant('{app}'), True, True, True); // Clean up registry RegDeleteValue(HKLM64, 'SOFTWARE\AlkaidLab\Sunshine', 'InstallDir'); RegDeleteKeyIfEmpty(HKLM64, 'SOFTWARE\AlkaidLab\Sunshine'); RegDeleteKeyIfEmpty(HKLM64, 'SOFTWARE\AlkaidLab'); end; end; end; // Use previous installation directory as default function NextButtonClick(CurPageID: Integer): Boolean; begin Result := True; end; ================================================ FILE: cmake/packaging/unix.cmake ================================================ # unix specific packaging # put anything here that applies to both linux and macos # return here if building a macos package if(SUNSHINE_PACKAGE_MACOS) return() endif() # Installation destination dir set(CPACK_SET_DESTDIR true) if(NOT CMAKE_INSTALL_PREFIX) set(CMAKE_INSTALL_PREFIX "/usr/share/sunshine") endif() install(TARGETS sunshine RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}") ================================================ FILE: cmake/packaging/windows.cmake ================================================ # windows specific packaging # Fetch driver dependencies (downloads at configure time) include(${CMAKE_MODULE_PATH}/packaging/FetchDriverDeps.cmake) install(TARGETS sunshine RUNTIME DESTINATION "." COMPONENT application) # Hardening: include zlib1.dll (loaded via LoadLibrary() in openssl's libcrypto.a) install(FILES "${ZLIB}" DESTINATION "." COMPONENT application) # Adding tools install(TARGETS dxgi-info RUNTIME DESTINATION "tools" COMPONENT dxgi) install(TARGETS audio-info RUNTIME DESTINATION "tools" COMPONENT audio) # Mandatory tools install(TARGETS sunshinesvc RUNTIME DESTINATION "tools" COMPONENT application) install(TARGETS qiin-tabtip RUNTIME DESTINATION "tools" COMPONENT application) # Shared tool: nefconw.exe (used by VDD and vmouse install scripts) install(FILES "${NEFCON_DRIVER_DIR}/nefconw.exe" DESTINATION "tools" COMPONENT application) # Mandatory scripts install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/windows/misc/service/" DESTINATION "scripts" COMPONENT assets) install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/windows/misc/migration/" DESTINATION "scripts" COMPONENT assets) # Portable initialization and uninstall scripts and language files install(FILES "${SUNSHINE_SOURCE_ASSETS_DIR}/windows/misc/install_portable.bat" DESTINATION "." COMPONENT application) install(FILES "${SUNSHINE_SOURCE_ASSETS_DIR}/windows/misc/uninstall_portable.bat" DESTINATION "." COMPONENT application) install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/windows/misc/languages/" DESTINATION "scripts/languages" COMPONENT application) # add sunshine environment to PATH install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/windows/misc/path/" DESTINATION "scripts" COMPONENT assets) # Configurable options for the service install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/windows/misc/autostart/" DESTINATION "scripts" COMPONENT autostart) # scripts install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/windows/misc/firewall/" DESTINATION "scripts" COMPONENT firewall) install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/windows/misc/gamepad/" DESTINATION "scripts" COMPONENT gamepad) install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/windows/misc/vsink/" DESTINATION "scripts" COMPONENT vsink) # VDD: scripts & config from source tree, driver binaries from download cache install(FILES "${SUNSHINE_SOURCE_ASSETS_DIR}/windows/misc/vdd/install-vdd.bat" "${SUNSHINE_SOURCE_ASSETS_DIR}/windows/misc/vdd/uninstall-vdd.bat" DESTINATION "scripts" COMPONENT vdd) install(FILES "${SUNSHINE_SOURCE_ASSETS_DIR}/windows/misc/vdd/driver/vdd_settings.xml" DESTINATION "scripts/driver" COMPONENT vdd) install(FILES "${VDD_DRIVER_DIR}/ZakoVDD.dll" "${VDD_DRIVER_DIR}/ZakoVDD.inf" "${VDD_DRIVER_DIR}/zakovdd.cat" "${VDD_DRIVER_DIR}/ZakoVDD.cer" DESTINATION "scripts/driver" COMPONENT vdd) # vmouse: scripts from source tree, driver binaries + cert from download cache install(FILES "${SUNSHINE_SOURCE_ASSETS_DIR}/windows/misc/vmouse/install-vmouse.bat" "${SUNSHINE_SOURCE_ASSETS_DIR}/windows/misc/vmouse/uninstall-vmouse.bat" DESTINATION "scripts/vmouse" COMPONENT assets) install(FILES "${VMOUSE_DRIVER_DIR}/ZakoVirtualMouse.dll" "${VMOUSE_DRIVER_DIR}/ZakoVirtualMouse.inf" "${VMOUSE_DRIVER_DIR}/ZakoVirtualMouse.cat" "${VMOUSE_DRIVER_DIR}/ZakoVirtualMouse.cer" DESTINATION "scripts/vmouse/driver" COMPONENT assets) install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/windows/misc/helper/" DESTINATION "tools" COMPONENT assets) # Sunshine assets install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/windows/assets/" DESTINATION "${SUNSHINE_ASSETS_DIR}" COMPONENT assets) # copy assets (excluding shaders) to build directory, for running without install file(COPY "${SUNSHINE_SOURCE_ASSETS_DIR}/windows/assets/" DESTINATION "${CMAKE_BINARY_DIR}/assets" PATTERN "shaders" EXCLUDE) # use junction for shaders directory cmake_path(CONVERT "${SUNSHINE_SOURCE_ASSETS_DIR}/windows/assets/shaders" TO_NATIVE_PATH_LIST shaders_in_build_src_native) cmake_path(CONVERT "${CMAKE_BINARY_DIR}/assets/shaders" TO_NATIVE_PATH_LIST shaders_in_build_dest_native) set(CPACK_PACKAGE_ICON "${CMAKE_SOURCE_DIR}\\\\sunshine.ico") # The name of the directory that will be created in C:/Program files/ set(CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_NAME}") # Setting components groups and dependencies set(CPACK_COMPONENT_GROUP_CORE_EXPANDED true) set(CPACK_COMPONENT_GROUP_SCRIPTS_EXPANDED true) # sunshine binary set(CPACK_COMPONENT_APPLICATION_DISPLAY_NAME "${CMAKE_PROJECT_NAME}") set(CPACK_COMPONENT_APPLICATION_DESCRIPTION "${CMAKE_PROJECT_NAME} main application and required components.") set(CPACK_COMPONENT_APPLICATION_GROUP "Core") set(CPACK_COMPONENT_APPLICATION_REQUIRED true) set(CPACK_COMPONENT_APPLICATION_DEPENDS assets) # Virtual Display Driver set(CPACK_COMPONENT_VDD_DISPLAY_NAME "Zako Display Driver") set(CPACK_COMPONENT_VDD_DESCRIPTION "支持HDR的虚拟显示器驱动安装") set(CPACK_COMPONENT_VDD_GROUP "Core") # service auto-start script set(CPACK_COMPONENT_AUTOSTART_DISPLAY_NAME "Launch on Startup") set(CPACK_COMPONENT_AUTOSTART_DESCRIPTION "If enabled, launches Sunshine automatically on system startup.") set(CPACK_COMPONENT_AUTOSTART_GROUP "Core") # assets set(CPACK_COMPONENT_ASSETS_DISPLAY_NAME "Required Assets") set(CPACK_COMPONENT_ASSETS_DESCRIPTION "Shaders, default box art, and web UI.") set(CPACK_COMPONENT_ASSETS_GROUP "Core") set(CPACK_COMPONENT_ASSETS_REQUIRED true) # audio tool set(CPACK_COMPONENT_AUDIO_DISPLAY_NAME "audio-info") set(CPACK_COMPONENT_AUDIO_DESCRIPTION "CLI tool providing information about sound devices.") set(CPACK_COMPONENT_AUDIO_GROUP "Tools") # display tool set(CPACK_COMPONENT_DXGI_DISPLAY_NAME "dxgi-info") set(CPACK_COMPONENT_DXGI_DESCRIPTION "CLI tool providing information about graphics cards and displays.") set(CPACK_COMPONENT_DXGI_GROUP "Tools") # superCmds set(CPACK_COMPONENT_SUPERCMD_DISPLAY_NAME "super-cmd") set(CPACK_COMPONENT_SUPERCMD_DESCRIPTION "Commands that can running on host.") set(CPACK_COMPONENT_SUPERCMD_GROUP "Tools") # firewall scripts set(CPACK_COMPONENT_FIREWALL_DISPLAY_NAME "Add Firewall Exclusions") set(CPACK_COMPONENT_FIREWALL_DESCRIPTION "Scripts to enable or disable firewall rules.") set(CPACK_COMPONENT_FIREWALL_GROUP "Scripts") # gamepad scripts set(CPACK_COMPONENT_GAMEPAD_DISPLAY_NAME "Virtual Gamepad") set(CPACK_COMPONENT_GAMEPAD_DESCRIPTION "Scripts to install and uninstall Virtual Gamepad.") set(CPACK_COMPONENT_GAMEPAD_GROUP "Scripts") # include specific packaging include(${CMAKE_MODULE_PATH}/packaging/windows_innosetup.cmake) # Legacy NSIS/WiX (kept for reference, no longer used) # include(${CMAKE_MODULE_PATH}/packaging/windows_nsis.cmake) # include(${CMAKE_MODULE_PATH}/packaging/windows_wix.cmake) ================================================ FILE: cmake/packaging/windows_innosetup.cmake ================================================ # Inno Setup Packaging # Replaces NSIS packaging with Inno Setup for Windows installer generation # # Usage: # cmake --build build --target innosetup # 或直接: # iscc build/sunshine_installer.iss # # 依赖: Inno Setup 6.x (https://jrsoftware.org/isinfo.php) # Find Inno Setup compiler find_program(ISCC_EXECUTABLE iscc PATHS "$ENV{ProgramFiles\(x86\)}/Inno Setup 6" "$ENV{ProgramFiles}/Inno Setup 6" "$ENV{LOCALAPPDATA}/Programs/Inno Setup 6" DOC "Inno Setup Compiler (iscc.exe)" ) if(NOT ISCC_EXECUTABLE) message(STATUS "Inno Setup not found - 'innosetup' target will not be available") message(STATUS "Install from: https://jrsoftware.org/isdl.php") return() endif() message(STATUS "Found Inno Setup: ${ISCC_EXECUTABLE}") # Configure the .iss template with CMake variables set(INNO_STAGING_DIR "${CMAKE_BINARY_DIR}/inno_staging") # Use a separate variable so we don't overwrite CMAKE_INSTALL_PREFIX set(CMAKE_INSTALL_PREFIX_SAVED "${CMAKE_INSTALL_PREFIX}") set(CMAKE_INSTALL_PREFIX "${INNO_STAGING_DIR}") configure_file( "${CMAKE_MODULE_PATH}/packaging/sunshine.iss.in" "${CMAKE_BINARY_DIR}/sunshine_installer.iss" @ONLY ) # Restore CMAKE_INSTALL_PREFIX set(CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX_SAVED}") # Create a custom target for building the Inno Setup installer # Step 1: Install files to staging directory # Step 2: Strip debug symbols from executables to reduce installer size # Step 3: Run Inno Setup compiler add_custom_target(innosetup COMMENT "Building Inno Setup installer..." # Install to staging directory COMMAND ${CMAKE_COMMAND} --install "${CMAKE_BINARY_DIR}" --prefix "${CMAKE_BINARY_DIR}/inno_staging" # Strip debug symbols from executables to reduce installer size COMMAND ${CMAKE_COMMAND} -E echo "Stripping debug symbols from executables..." COMMAND strip --strip-debug "${CMAKE_BINARY_DIR}/inno_staging/sunshine.exe" COMMAND strip --strip-debug "${CMAKE_BINARY_DIR}/inno_staging/tools/sunshinesvc.exe" COMMAND strip --strip-debug "${CMAKE_BINARY_DIR}/inno_staging/tools/dxgi-info.exe" COMMAND strip --strip-debug "${CMAKE_BINARY_DIR}/inno_staging/tools/audio-info.exe" # Run Inno Setup compiler COMMAND "${ISCC_EXECUTABLE}" "${CMAKE_BINARY_DIR}/sunshine_installer.iss" WORKING_DIRECTORY "${CMAKE_BINARY_DIR}" VERBATIM ) # Make sure sunshine is built before creating the installer add_dependencies(innosetup sunshine) # Also provide a convenience target to just generate the staging directory add_custom_target(innosetup-staging COMMENT "Generating Inno Setup staging directory..." COMMAND ${CMAKE_COMMAND} --install "${CMAKE_BINARY_DIR}" --prefix "${CMAKE_BINARY_DIR}/inno_staging" WORKING_DIRECTORY "${CMAKE_BINARY_DIR}" VERBATIM ) ================================================ FILE: cmake/packaging/windows_nsis.cmake ================================================ # NSIS Packaging # see options at: https://cmake.org/cmake/help/latest/cpack_gen/nsis.html set(CPACK_NSIS_INSTALLED_ICON_NAME "${PROJECT__DIR}\\\\${PROJECT_EXE}") # 由于 CPack 的 NSIS 模板限制,我们无法直接修改 .onInit 函数 # 但可以通过以下方式实现: # 通过 MUI_PAGE_CUSTOMFUNCTION_PRE 在目录页面显示前读取注册表 # # 注意:CPACK_NSIS_INSTALLER_MUI_ICON_CODE 是在页面定义之前的钩子 # 我们用它来定义自定义函数,并设置 MUI_PAGE_CUSTOMFUNCTION_PRE set(CPACK_NSIS_INSTALLER_MUI_ICON_CODE " ; 定义安装程序图标 !define MUI_ICON \\\"${CMAKE_SOURCE_DIR}/sunshine.ico\\\" !define MUI_UNICON \\\"${CMAKE_SOURCE_DIR}/sunshine.ico\\\" ; 定义在目录页面显示前执行的函数 !define MUI_PAGE_CUSTOMFUNCTION_PRE PreDirectoryPage ; 从注册表读取之前的安装路径 ; 使用自定义注册表键,避免覆盖安装触发卸载时被清除 Function PreDirectoryPage ; 只在默认安装目录时才尝试读取注册表 StrCmp $IS_DEFAULT_INSTALLDIR '1' 0 SkipRegRead Push $0 SetRegView 64 ; 从自定义注册表读取上次安装目录 ReadRegStr $0 HKLM 'SOFTWARE\\\\AlkaidLab\\\\Sunshine' 'InstallDir' StrCmp $0 '' DoneRegRead 0 IfFileExists '$0\\\\*.*' SetPath DoneRegRead SetPath: StrCpy $INSTDIR $0 StrCpy $IS_DEFAULT_INSTALLDIR '0' DoneRegRead: Pop $0 SkipRegRead: FunctionEnd ; 辅助函数:获取路径的父目录 Function GetParent Exch $0 Push $1 Push $2 StrLen $1 $0 IntOp $1 $1 - 1 loop: IntOp $1 $1 - 1 IntCmp $1 0 done done StrCpy $2 $0 1 $1 StrCmp $2 '\\\\' found Goto loop found: StrCpy $0 $0 $1 done: Pop $2 Pop $1 Exch $0 FunctionEnd ; Finish Page 自定义选项 ; 复选框1: 打开使用教程(默认勾选) !define MUI_FINISHPAGE_RUN !define MUI_FINISHPAGE_RUN_TEXT '打开使用教程' !define MUI_FINISHPAGE_RUN_FUNCTION OpenDocumentation ; 复选框2: 启动 Sunshine GUI(默认勾选) !define MUI_FINISHPAGE_SHOWREADME !define MUI_FINISHPAGE_SHOWREADME_TEXT '启动 Sunshine GUI' !define MUI_FINISHPAGE_SHOWREADME_FUNCTION LaunchGUI Function OpenDocumentation ExecShell 'open' 'https://docs.qq.com/aio/DSGdQc3htbFJjSFdO?p=DXpTjzl2kZwBjN7jlRMkRJ' FunctionEnd Function LaunchGUI Exec '\$INSTDIR\\\\assets\\\\gui\\\\sunshine-gui.exe' FunctionEnd ") # ============================================================================== # File Conflict Prevention - 在文件解压前停止进程 # ============================================================================== # 策略:直接禁用 ENABLE_UNINSTALL_BEFORE_INSTALL,手动在安装过程中处理 # 这样可以避免在选择目录阶段就检查文件导致冲突 # 自动卸载功能 set(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL "ON") # Windows Restart Manager 支持和高DPI位图优化 set(CPACK_NSIS_EXTRA_DEFINES " \${CPACK_NSIS_EXTRA_DEFINES} !define MUI_FINISHPAGE_REBOOTLATER_DEFAULT ManifestDPIAware true ") # Basic installer configuration set(CPACK_NSIS_MUI_ICON "${CMAKE_SOURCE_DIR}\\\\sunshine.ico") set(CPACK_NSIS_MUI_UNIICON "${CMAKE_SOURCE_DIR}\\\\sunshine.ico") # 设置DPI感知 set(CPACK_NSIS_MANIFEST_DPI_AWARE ON) set(CPACK_NSIS_MUI_WELCOMEFINISHPAGE_BITMAP "${CMAKE_SOURCE_DIR}\\\\welcome.bmp") set(CPACK_NSIS_MUI_UNWELCOMEFINISHPAGE_BITMAP "${CMAKE_SOURCE_DIR}\\\\welcome.bmp") # 头部图像(需要150x57像素) # set(CPACK_NSIS_MUI_HEADERIMAGE_BITMAP "${CMAKE_SOURCE_DIR}\\\\cmake\\\\packaging\\\\welcome.bmp") # Custom branding set(CPACK_NSIS_BRANDING_TEXT "Sunshine Foundation Game Streaming Server v${CPACK_PACKAGE_VERSION}") set(CPACK_NSIS_BRANDING_TEXT_TRIM_POSITION "LEFT") # ============================================================================== # Page Customization and Enhanced User Experience # ============================================================================== # Custom welcome page text set(CPACK_NSIS_WELCOME_TITLE "Welcome to Sunshine Foundation Game Streaming Server Install Wizard") set(CPACK_NSIS_WELCOME_TITLE_3LINES "ON") # Custom finish page configuration set(CPACK_NSIS_FINISH_TITLE "安装完成!") set(CPACK_NSIS_FINISH_TEXT "Sunshine Foundation Game Streaming Server 已成功安装到您的系统中。\\r\\n\\r\\n点击 '完成' 开始使用这个强大的游戏流媒体服务器。") # ============================================================================== # Installation Progress and User Feedback # ============================================================================== # Enhanced installation commands with progress feedback SET(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "${CPACK_NSIS_EXTRA_INSTALL_COMMANDS} ; 确保覆盖模式仍然生效 SetOverwrite try ; ---------------------------------------------------------------------- ; 清理便携版脚本:安装版不需要这两个文件 ; 需求:如果目录下有 install_portable.bat / uninstall_portable.bat,就删除 ; 安全防护:防止符号链接攻击 - 使用 IfFileExists 检查文件是否存在 ; 限制在 $INSTDIR 目录内,避免路径遍历攻击 ; ---------------------------------------------------------------------- DetailPrint '🧹 清理便携版脚本...' ; 安全删除:先检查文件是否存在,避免符号链接攻击 IfFileExists '\$INSTDIR\\\\install_portable.bat' 0 +2 Delete '\$INSTDIR\\\\install_portable.bat' IfFileExists '\$INSTDIR\\\\uninstall_portable.bat' 0 +2 Delete '\$INSTDIR\\\\uninstall_portable.bat' ; 重置文件权限 DetailPrint '🔓 重置文件权限...' nsExec::ExecToLog 'icacls \\\"$INSTDIR\\\" /reset /T /C /Q >nul 2>&1' ; ---------------------------------------------------------------------- ; 清理临时文件 ; 安全防护:防止符号链接攻击 ; 注意:通配符删除(*.tmp, *.old)在遇到符号链接时可能有风险 ; 但限制在 $INSTDIR 目录内,且 NSIS 的 Delete 命令会处理符号链接 ; 为了更安全,可以考虑逐个检查文件,但通配符删除在安装目录内风险较低 ; ---------------------------------------------------------------------- DetailPrint '🧹 清理临时文件...' ; 使用通配符删除,限制在 $INSTDIR 目录内 ; NSIS 的 Delete 命令在处理符号链接时会删除链接本身,不会跟随到目标 Delete '\$INSTDIR\\\\*.tmp' Delete '\$INSTDIR\\\\*.old' ; 显示安装进度信息 DetailPrint '🎯 正在配置 Sunshine Foundation Game Streaming Server...' ; 系统配置 DetailPrint '🔧 配置系统权限...' nsExec::ExecToLog 'icacls \\\"$INSTDIR\\\" /reset' DetailPrint '🛣️ 更新系统PATH环境变量...' nsExec::ExecToLog '\\\"$INSTDIR\\\\scripts\\\\update-path.bat\\\" add' DetailPrint '📦 迁移配置文件...' nsExec::ExecToLog '\\\"$INSTDIR\\\\scripts\\\\migrate-config.bat\\\"' DetailPrint '🔥 配置防火墙规则...' nsExec::ExecToLog '\\\"$INSTDIR\\\\scripts\\\\add-firewall-rule.bat\\\"' DetailPrint '📺 安装虚拟显示器驱动...' nsExec::ExecToLog '\\\"$INSTDIR\\\\scripts\\\\install-vdd.bat\\\"' DetailPrint '🎯 安装虚拟游戏手柄...' nsExec::ExecToLog '\\\"$INSTDIR\\\\scripts\\\\install-gamepad.bat\\\"' DetailPrint '⚙️ 安装并启动系统服务...' nsExec::ExecToLog '\\\"$INSTDIR\\\\scripts\\\\install-service.bat\\\"' nsExec::ExecToLog '\\\"$INSTDIR\\\\scripts\\\\autostart-service.bat\\\"' ; 写入安装目录,供后续覆盖安装读取 SetRegView 64 WriteRegStr HKLM 'SOFTWARE\\\\AlkaidLab\\\\Sunshine' 'InstallDir' '$INSTDIR' DetailPrint '✅ 安装完成!' NoController: ") # 卸载命令配置 set(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS "${CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS} ; 显示卸载进度信息 DetailPrint '正在卸载 Sunshine Foundation Game Streaming Server...' ; 停止运行的程序 DetailPrint '停止运行的程序...' nsExec::ExecToLog 'taskkill /f /im sunshine-gui.exe' nsExec::ExecToLog 'taskkill /f /im sunshine.exe' ; 卸载系统组件 DetailPrint '删除防火墙规则...' nsExec::ExecToLog '\\\"$INSTDIR\\\\scripts\\\\delete-firewall-rule.bat\\\"' DetailPrint '卸载系统服务...' nsExec::ExecToLog '\\\"$INSTDIR\\\\scripts\\\\uninstall-service.bat\\\"' DetailPrint '卸载虚拟显示器驱动...' nsExec::ExecToLog '\\\"$INSTDIR\\\\scripts\\\\uninstall-vdd.bat\\\"' DetailPrint '恢复NVIDIA设置...' nsExec::ExecToLog '\\\"$INSTDIR\\\\${CMAKE_PROJECT_NAME}.exe\\\" --restore-nvprefs-undo' MessageBox MB_YESNO|MB_ICONQUESTION \ 'Do you want to remove Virtual Gamepad?' \ /SD IDNO IDNO NoGamepad nsExec::ExecToLog '\\\"$INSTDIR\\\\scripts\\\\uninstall-gamepad.bat\\\"'; skipped if no NoGamepad: MessageBox MB_YESNO|MB_ICONQUESTION \ 'Do you want to remove $INSTDIR (this includes the configuration, cover images, and settings)?' \ /SD IDNO IDNO NoDelete RMDir /r \\\"$INSTDIR\\\"; skipped if no SetRegView 64 DeleteRegValue HKLM 'SOFTWARE\\\\AlkaidLab\\\\Sunshine' 'InstallDir' DeleteRegKey /ifempty HKLM 'SOFTWARE\\\\AlkaidLab\\\\Sunshine' DetailPrint '清理环境变量...' nsExec::ExecToLog '\\\"$INSTDIR\\\\scripts\\\\update-path.bat\\\" remove' NoDelete: DetailPrint 'Uninstall complete!' ") # ============================================================================== # Start Menu and Shortcuts Configuration # ============================================================================== set(CPACK_NSIS_MODIFY_PATH OFF) set(CPACK_NSIS_EXECUTABLES_DIRECTORY ".") set(CPACK_NSIS_INSTALLED_ICON_NAME "${CMAKE_PROJECT_NAME}.exe") # Enhanced Start Menu shortcuts with better icons and descriptions set(CPACK_NSIS_CREATE_ICONS_EXTRA "${CPACK_NSIS_CREATE_ICONS_EXTRA} SetOutPath '\$INSTDIR' ; 主程序快捷方式 - 使用可执行文件的内嵌图标 CreateShortCut '\$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\Sunshine.lnk' \ '\$INSTDIR\\\\${CMAKE_PROJECT_NAME}.exe' '--shortcut' '\$INSTDIR\\\\${CMAKE_PROJECT_NAME}.exe' 0 ; 安装目录主程序快捷方式 - 使用可执行文件的内嵌图标 CreateShortCut '\$INSTDIR\\\\${CMAKE_PROJECT_NAME}.lnk' \ '\$INSTDIR\\\\${CMAKE_PROJECT_NAME}.exe' '--shortcut' '\$INSTDIR\\\\${CMAKE_PROJECT_NAME}.exe' 0 ; GUI管理工具快捷方式 - 使用GUI程序的内嵌图标 CreateShortCut '\$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\Sunshine GUI.lnk' \ '\$INSTDIR\\\\assets\\\\gui\\\\sunshine-gui.exe' '' '\$INSTDIR\\\\assets\\\\gui\\\\sunshine-gui.exe' 0 ; 工具文件夹快捷方式 - 使用主程序图标 CreateShortCut '\$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\Sunshine Tools.lnk' \ '\$INSTDIR\\\\tools' '' '\$INSTDIR\\\\${CMAKE_PROJECT_NAME}.exe' 0 ; 创建桌面快捷方式 - 使用可执行文件的内嵌图标 CreateShortCut '\$DESKTOP\\\\Sunshine.lnk' \ '\$INSTDIR\\\\${CMAKE_PROJECT_NAME}.exe' '--shortcut' '\$INSTDIR\\\\${CMAKE_PROJECT_NAME}.exe' 0 ; 创建桌面快捷方式 - GUI管理工具 CreateShortCut '\$DESKTOP\\\\Sunshine GUI.lnk' \ '\$INSTDIR\\\\assets\\\\gui\\\\sunshine-gui.exe' '' '\$INSTDIR\\\\assets\\\\gui\\\\sunshine-gui.exe' 0 ") set(CPACK_NSIS_DELETE_ICONS_EXTRA "${CPACK_NSIS_DELETE_ICONS_EXTRA} ; ---------------------------------------------------------------------- ; 安全删除快捷方式:防止符号链接攻击和路径遍历 ; ; 安全分析: ; 1. 符号链接攻击风险:如果攻击者在桌面/开始菜单创建符号链接,使用我们的快捷方式名称, ; 删除时可能误删其他文件。但 NSIS 的 Delete 命令对于符号链接会删除链接本身,不会跟随。 ; 2. 路径遍历风险:我们使用固定的系统变量($DESKTOP, $SMPROGRAMS),不接受外部输入, ; 路径是硬编码的,降低了路径遍历风险。 ; 3. 文件类型验证:我们只删除预期的 .lnk 文件,文件名是固定的,降低了误删风险。 ; ; 防护措施: ; - 使用 IfFileExists 检查文件是否存在,避免删除不存在的文件 ; - 使用固定的系统路径变量,不接受外部输入 ; - 只删除预期的 .lnk 文件,文件名硬编码 ; - NSIS 的 Delete 命令会自动处理符号链接,只删除链接本身 ; ---------------------------------------------------------------------- ; 删除开始菜单快捷方式(安全删除) ; 注意:$MUI_TEMP 是 NSIS 内部变量,指向开始菜单文件夹,由安装程序控制 IfFileExists '\$SMPROGRAMS\\\\$MUI_TEMP\\\\Sunshine.lnk' 0 +2 Delete '\$SMPROGRAMS\\\\$MUI_TEMP\\\\Sunshine.lnk' IfFileExists '\$SMPROGRAMS\\\\$MUI_TEMP\\\\Sunshine GUI.lnk' 0 +2 Delete '\$SMPROGRAMS\\\\$MUI_TEMP\\\\Sunshine GUI.lnk' IfFileExists '\$SMPROGRAMS\\\\$MUI_TEMP\\\\Sunshine Tools.lnk' 0 +2 Delete '\$SMPROGRAMS\\\\$MUI_TEMP\\\\Sunshine Tools.lnk' IfFileExists '\$SMPROGRAMS\\\\$MUI_TEMP\\\\Sunshine Service.lnk' 0 +2 Delete '\$SMPROGRAMS\\\\$MUI_TEMP\\\\Sunshine Service.lnk' IfFileExists '\$SMPROGRAMS\\\\$MUI_TEMP\\\\${CMAKE_PROJECT_NAME}.lnk' 0 +2 Delete '\$SMPROGRAMS\\\\$MUI_TEMP\\\\${CMAKE_PROJECT_NAME}.lnk' ; 删除桌面快捷方式(安全删除) ; 注意:$DESKTOP 是 NSIS 系统变量,指向当前用户的桌面目录 ; 如果攻击者创建符号链接,NSIS 的 Delete 会删除链接本身,不会跟随到目标 IfFileExists '\$DESKTOP\\\\Sunshine.lnk' 0 +2 Delete '\$DESKTOP\\\\Sunshine.lnk' IfFileExists '\$DESKTOP\\\\Sunshine GUI.lnk' 0 +2 Delete '\$DESKTOP\\\\Sunshine GUI.lnk' ") # ============================================================================== # Advanced Installation Features # ============================================================================== # Custom installation options set(CPACK_NSIS_COMPRESSOR "lzma") # Better compression set(CPACK_NSIS_COMPRESSOR_OPTIONS "/SOLID") # Solid compression for smaller file size # ============================================================================== # Support Links and Documentation # ============================================================================== set(CPACK_NSIS_HELP_LINK "https://alkaidlab.com/sunshine/docs") set(CPACK_NSIS_URL_INFO_ABOUT "${CMAKE_PROJECT_HOMEPAGE_URL}") set(CPACK_NSIS_CONTACT "${CMAKE_PROJECT_HOMEPAGE_URL}/support") # ============================================================================== # System Integration and Compatibility # ============================================================================== # Enable high DPI awareness for modern displays set(CPACK_NSIS_MANIFEST_DPI_AWARE true) # Request administrator privileges for proper installation set(CPACK_NSIS_REQUEST_EXECUTION_LEVEL "admin") # Custom installer appearance set(CPACK_NSIS_DISPLAY_NAME "Sunshine Foundation Game Streaming Server v${CPACK_PACKAGE_VERSION}") set(CPACK_NSIS_PACKAGE_NAME "Sunshine") ================================================ FILE: cmake/packaging/windows_wix.cmake ================================================ # WIX Packaging # see options at: https://cmake.org/cmake/help/latest/cpack_gen/wix.html # TODO: Replace nsis with wix ================================================ FILE: cmake/prep/build_version.cmake ================================================ # Check if env vars are defined before attempting to access them, variables will be defined even if blank if((DEFINED ENV{BRANCH}) AND (DEFINED ENV{BUILD_VERSION}) AND (DEFINED ENV{COMMIT})) # cmake-lint: disable=W0106 if(($ENV{BRANCH} STREQUAL "master") AND (NOT $ENV{BUILD_VERSION} STREQUAL "")) # If BRANCH is "master" and BUILD_VERSION is not empty, then we are building a master branch MESSAGE("Got from CI master branch and version $ENV{BUILD_VERSION}") set(PROJECT_VERSION $ENV{BUILD_VERSION}) set(CMAKE_PROJECT_VERSION ${PROJECT_VERSION}) # cpack will use this to set the binary versions elseif((DEFINED ENV{BRANCH}) AND (DEFINED ENV{COMMIT})) # If BRANCH is set but not BUILD_VERSION we are building a PR, we gather only the commit hash MESSAGE("Got from CI $ENV{BRANCH} branch and commit $ENV{COMMIT}") set(PROJECT_VERSION ${PROJECT_VERSION}.$ENV{COMMIT}) endif() # Generate Sunshine Version based of the git tag # https://github.com/nocnokneo/cmake-git-versioning-example/blob/master/LICENSE else() find_package(Git) string(TIMESTAMP COMPILE_TIME "%Y.%m%d.%H%M%S") set(PROJECT_VERSION ${COMPILE_TIME}) if(GIT_EXECUTABLE) MESSAGE("${CMAKE_SOURCE_DIR}") get_filename_component(SRC_DIR "${CMAKE_SOURCE_DIR}" DIRECTORY) #Get current Branch execute_process( COMMAND ${GIT_EXECUTABLE} rev-parse --abbrev-ref HEAD OUTPUT_VARIABLE GIT_DESCRIBE_BRANCH RESULT_VARIABLE GIT_DESCRIBE_ERROR_CODE OUTPUT_STRIP_TRAILING_WHITESPACE ) # Gather current commit execute_process( COMMAND ${GIT_EXECUTABLE} rev-parse --short HEAD OUTPUT_VARIABLE GIT_DESCRIBE_VERSION RESULT_VARIABLE GIT_DESCRIBE_ERROR_CODE OUTPUT_STRIP_TRAILING_WHITESPACE ) # Check if Dirty execute_process( COMMAND ${GIT_EXECUTABLE} diff --quiet --exit-code RESULT_VARIABLE GIT_IS_DIRTY OUTPUT_STRIP_TRAILING_WHITESPACE ) if(NOT GIT_DESCRIBE_ERROR_CODE) MESSAGE("Sunshine Branch: ${GIT_DESCRIBE_BRANCH}") if(NOT GIT_DESCRIBE_BRANCH STREQUAL "master") set(PROJECT_VERSION ${PROJECT_VERSION}.${GIT_DESCRIBE_VERSION}) MESSAGE("Sunshine Version: ${GIT_DESCRIBE_VERSION}") endif() if(GIT_IS_DIRTY) set(PROJECT_VERSION ${PROJECT_VERSION}.杂鱼) MESSAGE("Git tree is dirty!") endif() else() MESSAGE(ERROR ": Got git error while fetching tags: ${GIT_DESCRIBE_ERROR_CODE}") endif() else() MESSAGE(WARNING ": Git not found, cannot find git version") endif() endif() ================================================ FILE: cmake/prep/constants.cmake ================================================ # source assets will be installed from this directory set(SUNSHINE_SOURCE_ASSETS_DIR "${CMAKE_SOURCE_DIR}/src_assets") # enable system tray, we will disable this later if we cannot find the required package config on linux set(SUNSHINE_TRAY 1) ================================================ FILE: cmake/prep/init.cmake ================================================ if (WIN32) elseif (APPLE) elseif (UNIX) include(GNUInstallDirs) if(NOT DEFINED SUNSHINE_EXECUTABLE_PATH) set(SUNSHINE_EXECUTABLE_PATH "sunshine") endif() if(SUNSHINE_BUILD_FLATPAK) set(SUNSHINE_SERVICE_START_COMMAND "ExecStart=flatpak run --command=sunshine ${PROJECT_FQDN}") set(SUNSHINE_SERVICE_STOP_COMMAND "ExecStop=flatpak kill ${PROJECT_FQDN}") else() set(SUNSHINE_SERVICE_START_COMMAND "ExecStart=${SUNSHINE_EXECUTABLE_PATH}") set(SUNSHINE_SERVICE_STOP_COMMAND "") endif() endif () ================================================ FILE: cmake/prep/options.cmake ================================================ # Publisher Metadata set(SUNSHINE_PUBLISHER_NAME "qiin2333" CACHE STRING "The name of the publisher (not developer) of the application.") set(SUNSHINE_PUBLISHER_WEBSITE "https://alkaidlab.com" CACHE STRING "The URL of the publisher's website.") set(SUNSHINE_PUBLISHER_ISSUE_URL "https://github.com/qiin2333/Sunshine/issues" CACHE STRING "The URL of the publisher's support site or issue tracker. If you provide a modified version of Sunshine, we kindly request that you use your own url.") option(BUILD_DOCS "Build documentation" OFF) option(BUILD_TESTS "Build tests" OFF) option(NPM_OFFLINE "Use offline npm packages. You must ensure packages are in your npm cache." OFF) option(BUILD_WERROR "Enable -Werror flag." OFF) # if this option is set, the build will exit after configuring special package configuration files option(SUNSHINE_CONFIGURE_ONLY "Configure special files only, then exit." OFF) option(SUNSHINE_ENABLE_TRAY "Enable system tray icon. This option will be ignored on macOS." ON) option(SUNSHINE_REQUIRE_TRAY "Require system tray icon. Fail the build if tray requirements are not met." ON) option(SUNSHINE_SYSTEM_NLOHMANN_JSON "Use system installation of nlohmann_json rather than the submodule." OFF) option(SUNSHINE_SYSTEM_WAYLAND_PROTOCOLS "Use system installation of wayland-protocols rather than the submodule." OFF) if(APPLE) option(BOOST_USE_STATIC "Use static boost libraries." OFF) else() option(BOOST_USE_STATIC "Use static boost libraries." ON) endif() option(CUDA_FAIL_ON_MISSING "Fail the build if CUDA is not found." ON) option(CUDA_INHERIT_COMPILE_OPTIONS "When building CUDA code, inherit compile options from the the main project. You may want to disable this if your IDE throws errors about unknown flags after running cmake." ON) if(UNIX) option(SUNSHINE_BUILD_HOMEBREW "Enable a Homebrew build." OFF) option(SUNSHINE_CONFIGURE_HOMEBREW "Configure Homebrew formula. Recommended to use with SUNSHINE_CONFIGURE_ONLY" OFF) endif() if(APPLE) option(SUNSHINE_CONFIGURE_PORTFILE "Configure macOS Portfile. Recommended to use with SUNSHINE_CONFIGURE_ONLY" OFF) option(SUNSHINE_PACKAGE_MACOS "Should only be used when creating a macOS package/dmg." OFF) elseif(UNIX) # Linux option(SUNSHINE_BUILD_APPIMAGE "Enable an AppImage build." OFF) option(SUNSHINE_BUILD_FLATPAK "Enable a Flatpak build." OFF) option(SUNSHINE_CONFIGURE_PKGBUILD "Configure files required for AUR. Recommended to use with SUNSHINE_CONFIGURE_ONLY" OFF) option(SUNSHINE_CONFIGURE_FLATPAK_MAN "Configure manifest file required for Flatpak build. Recommended to use with SUNSHINE_CONFIGURE_ONLY" OFF) # Linux capture methods option(SUNSHINE_ENABLE_CUDA "Enable cuda specific code." ON) option(SUNSHINE_ENABLE_DRM "Enable KMS grab if available." ON) option(SUNSHINE_ENABLE_VAAPI "Enable building vaapi specific code." ON) option(SUNSHINE_ENABLE_WAYLAND "Enable building wayland specific code." ON) option(SUNSHINE_ENABLE_X11 "Enable X11 grab if available." ON) endif() ================================================ FILE: cmake/prep/special_package_configuration.cmake ================================================ if(UNIX) if(${SUNSHINE_CONFIGURE_HOMEBREW}) configure_file(packaging/sunshine.rb sunshine.rb @ONLY) endif() endif() if(APPLE) if(${SUNSHINE_CONFIGURE_PORTFILE}) configure_file(packaging/macos/Portfile Portfile @ONLY) endif() elseif(UNIX) # configure the .desktop file set(SUNSHINE_DESKTOP_ICON "sunshine.svg") if(${SUNSHINE_BUILD_APPIMAGE}) configure_file(packaging/linux/AppImage/sunshine.desktop sunshine.desktop @ONLY) elseif(${SUNSHINE_BUILD_FLATPAK}) set(SUNSHINE_DESKTOP_ICON "${PROJECT_FQDN}.svg") configure_file(packaging/linux/flatpak/sunshine.desktop sunshine.desktop @ONLY) configure_file(packaging/linux/flatpak/sunshine_kms.desktop sunshine_kms.desktop @ONLY) configure_file(packaging/linux/sunshine_terminal.desktop sunshine_terminal.desktop @ONLY) configure_file(packaging/linux/flatpak/${PROJECT_FQDN}.metainfo.xml ${PROJECT_FQDN}.metainfo.xml @ONLY) else() configure_file(packaging/linux/sunshine.desktop sunshine.desktop @ONLY) configure_file(packaging/linux/sunshine_terminal.desktop sunshine_terminal.desktop @ONLY) endif() # configure metadata file configure_file(packaging/linux/sunshine.appdata.xml sunshine.appdata.xml @ONLY) # configure service configure_file(packaging/linux/sunshine.service.in sunshine.service @ONLY) # configure the arch linux pkgbuild if(${SUNSHINE_CONFIGURE_PKGBUILD}) configure_file(packaging/linux/Arch/PKGBUILD PKGBUILD @ONLY) configure_file(packaging/linux/Arch/sunshine.install sunshine.install @ONLY) endif() # configure the flatpak manifest if(${SUNSHINE_CONFIGURE_FLATPAK_MAN}) configure_file(packaging/linux/flatpak/${PROJECT_FQDN}.yml ${PROJECT_FQDN}.yml @ONLY) file(COPY packaging/linux/flatpak/deps/ DESTINATION ${CMAKE_BINARY_DIR}) file(COPY packaging/linux/flatpak/modules DESTINATION ${CMAKE_BINARY_DIR}) endif() endif() # return if configure only is set if(${SUNSHINE_CONFIGURE_ONLY}) # message message(STATUS "SUNSHINE_CONFIGURE_ONLY: ON, exiting...") set(END_BUILD ON) else() set(END_BUILD OFF) endif() ================================================ FILE: cmake/targets/common.cmake ================================================ # common target definitions # this file will also load platform specific macros add_executable(sunshine ${SUNSHINE_TARGET_FILES}) foreach(dep ${SUNSHINE_TARGET_DEPENDENCIES}) add_dependencies(sunshine ${dep}) # compile these before sunshine endforeach() # platform specific target definitions if(WIN32) include(${CMAKE_MODULE_PATH}/targets/windows.cmake) elseif(UNIX) include(${CMAKE_MODULE_PATH}/targets/unix.cmake) if(APPLE) include(${CMAKE_MODULE_PATH}/targets/macos.cmake) else() include(${CMAKE_MODULE_PATH}/targets/linux.cmake) endif() endif() # todo - is this necessary? ... for anything except linux? if(NOT DEFINED CMAKE_CUDA_STANDARD) set(CMAKE_CUDA_STANDARD 17) set(CMAKE_CUDA_STANDARD_REQUIRED ON) endif() target_link_libraries(sunshine ${SUNSHINE_EXTERNAL_LIBRARIES} ${EXTRA_LIBS}) target_compile_definitions(sunshine PUBLIC ${SUNSHINE_DEFINITIONS}) set_target_properties(sunshine PROPERTIES CXX_STANDARD 23 VERSION ${PROJECT_VERSION} SOVERSION ${PROJECT_VERSION_MAJOR}) # CLion complains about unknown flags after running cmake, and cannot add symbols to the index for cuda files if(CUDA_INHERIT_COMPILE_OPTIONS) foreach(flag IN LISTS SUNSHINE_COMPILE_OPTIONS) list(APPEND SUNSHINE_COMPILE_OPTIONS_CUDA "$<$:--compiler-options=${flag}>") endforeach() endif() target_compile_options(sunshine PRIVATE $<$:${SUNSHINE_COMPILE_OPTIONS}>;$<$:${SUNSHINE_COMPILE_OPTIONS_CUDA};-std=c++17>) # cmake-lint: disable=C0301 # Homebrew build fails the vite build if we set these environment variables if(${SUNSHINE_BUILD_HOMEBREW}) set(NPM_SOURCE_ASSETS_DIR "") set(NPM_ASSETS_DIR "") set(NPM_BUILD_HOMEBREW "true") else() set(NPM_SOURCE_ASSETS_DIR ${SUNSHINE_SOURCE_ASSETS_DIR}) set(NPM_ASSETS_DIR ${CMAKE_BINARY_DIR}) set(NPM_BUILD_HOMEBREW "") endif() #WebUI build option(BUILD_WEB_UI "Build the web UI via npm" ON) if(BUILD_WEB_UI) find_program(NPM npm REQUIRED) if (NPM_OFFLINE) set(NPM_INSTALL_FLAGS "--offline") else() set(NPM_INSTALL_FLAGS "") endif() add_custom_target(web-ui ALL WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" COMMENT "Installing NPM Dependencies and Building the Web UI" COMMAND "$<$:cmd;/C>" "${NPM}" install ${NPM_INSTALL_FLAGS} COMMAND "${CMAKE_COMMAND}" -E env "SUNSHINE_BUILD_HOMEBREW=${NPM_BUILD_HOMEBREW}" "SUNSHINE_SOURCE_ASSETS_DIR=${NPM_SOURCE_ASSETS_DIR}" "SUNSHINE_ASSETS_DIR=${NPM_ASSETS_DIR}" "$<$:cmd;/C>" "${NPM}" run build # cmake-lint: disable=C0301 COMMAND_EXPAND_LISTS VERBATIM) endif() # docs if(BUILD_DOCS) add_subdirectory(third-party/doxyconfig docs) endif() # tests if(BUILD_TESTS) add_subdirectory(tests) endif() # custom compile flags, must be after adding tests if (NOT BUILD_TESTS) set(TEST_DIR "") else() set(TEST_DIR "${CMAKE_SOURCE_DIR}/tests") endif() # src/upnp set_source_files_properties("${CMAKE_SOURCE_DIR}/src/upnp.cpp" DIRECTORY "${CMAKE_SOURCE_DIR}" "${TEST_DIR}" PROPERTIES COMPILE_FLAGS -Wno-pedantic) # third-party/nanors set_source_files_properties("${CMAKE_SOURCE_DIR}/src/rswrapper.c" DIRECTORY "${CMAKE_SOURCE_DIR}" "${TEST_DIR}" PROPERTIES COMPILE_FLAGS "-ftree-vectorize -funroll-loops") # third-party/ViGEmClient set(VIGEM_COMPILE_FLAGS "") string(APPEND VIGEM_COMPILE_FLAGS "-Wno-unknown-pragmas ") string(APPEND VIGEM_COMPILE_FLAGS "-Wno-misleading-indentation ") string(APPEND VIGEM_COMPILE_FLAGS "-Wno-class-memaccess ") string(APPEND VIGEM_COMPILE_FLAGS "-Wno-unused-function ") string(APPEND VIGEM_COMPILE_FLAGS "-Wno-unused-variable ") set_source_files_properties("${CMAKE_SOURCE_DIR}/third-party/ViGEmClient/src/ViGEmClient.cpp" DIRECTORY "${CMAKE_SOURCE_DIR}" "${TEST_DIR}" PROPERTIES COMPILE_DEFINITIONS "UNICODE=1;ERROR_INVALID_DEVICE_OBJECT_PARAMETER=650" COMPILE_FLAGS ${VIGEM_COMPILE_FLAGS}) # src/nvhttp string(TOUPPER "x${CMAKE_BUILD_TYPE}" BUILD_TYPE) if("${BUILD_TYPE}" STREQUAL "XDEBUG") if(WIN32) if (NOT BUILD_TESTS) set_source_files_properties("${CMAKE_SOURCE_DIR}/src/nvhttp.cpp" DIRECTORY "${CMAKE_SOURCE_DIR}" PROPERTIES COMPILE_FLAGS -O2) else() set_source_files_properties("${CMAKE_SOURCE_DIR}/src/nvhttp.cpp" DIRECTORY "${CMAKE_SOURCE_DIR}" "${CMAKE_SOURCE_DIR}/tests" PROPERTIES COMPILE_FLAGS -O2) endif() endif() else() add_definitions(-DNDEBUG) endif() ================================================ FILE: cmake/targets/linux.cmake ================================================ # linux specific target definitions ================================================ FILE: cmake/targets/macos.cmake ================================================ # macos specific target definitions target_link_options(sunshine PRIVATE LINKER:-sectcreate,__TEXT,__info_plist,${APPLE_PLIST_FILE}) # Tell linker to dynamically load these symbols at runtime, in case they're unavailable: target_link_options(sunshine PRIVATE -Wl,-U,_CGPreflightScreenCaptureAccess -Wl,-U,_CGRequestScreenCaptureAccess) ================================================ FILE: cmake/targets/unix.cmake ================================================ # unix specific target definitions # put anything here that applies to both linux and macos ================================================ FILE: cmake/targets/windows.cmake ================================================ # windows specific target definitions set_target_properties(sunshine PROPERTIES LINK_SEARCH_START_STATIC 1) set(CMAKE_FIND_LIBRARY_SUFFIXES ".dll") find_library(ZLIB ZLIB1) list(APPEND SUNSHINE_EXTERNAL_LIBRARIES Windowsapp.lib Wtsapi32.lib) # GUI build (optional — CI uses pre-built binary from GUI repo releases) # For local development: ninja -C build sunshine-control-panel find_program(NPM npm) find_program(CARGO cargo) if(NPM AND CARGO) add_custom_target(sunshine-control-panel WORKING_DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/common/sunshine-control-panel" COMMENT "Building Sunshine Control Panel (Tauri GUI)" COMMAND ${CMAKE_COMMAND} -E echo "Installing npm dependencies..." COMMAND ${NPM} install COMMAND ${CMAKE_COMMAND} -E echo "Building frontend with Vite..." COMMAND ${NPM} run build:renderer COMMAND ${CMAKE_COMMAND} -E echo "Building Tauri backend with Cargo..." COMMAND ${CARGO} build --manifest-path src-tauri/Cargo.toml --release USES_TERMINAL) else() message(STATUS "npm/cargo not found — sunshine-control-panel target disabled (GUI will be fetched from release)") endif() ================================================ FILE: codecov.yml ================================================ --- codecov: branch: master coverage: status: project: default: target: auto threshold: 10% comment: layout: "diff, flags, files" behavior: default require_changes: false # if true: only post the comment if coverage changes ignore: - "tests" - "third-party" ================================================ FILE: crowdin.yml ================================================ --- "base_path": "." "base_url": "https://api.crowdin.com" # optional (for Crowdin Enterprise only) "preserve_hierarchy": true # false will flatten tree on crowdin, but doesn't work with dest option "pull_request_title": "chore(l10n): update translations" "pull_request_labels": [ "crowdin", "l10n" ] "files": [ { "source": "/locale/*.po", "dest": "/%original_file_name%", "translation": "/locale/%two_letters_code%/LC_MESSAGES/%original_file_name%", "languages_mapping": { "two_letters_code": { # map non-two letter codes here, left side is crowdin designation, right side is babel designation "en-GB": "en_GB", "en-US": "en_US", "pt-BR": "pt_BR", "zh-TW": "zh_TW" } }, "update_option": "update_as_unapproved" }, { "source": "/src_assets/common/assets/web/public/assets/locale/en.json", "dest": "/sunshine.json", "translation": "/src_assets/common/assets/web/public/assets/locale/%two_letters_code%.%file_extension%", "update_option": "update_as_unapproved" } ] ================================================ FILE: docker/archlinux.dockerfile ================================================ # syntax=docker/dockerfile:1 # artifacts: true # platforms: linux/amd64 # archlinux does not have an arm64 base image # no-cache-filters: artifacts,sunshine ARG BASE=archlinux/archlinux ARG TAG=base-devel FROM ${BASE}:${TAG} AS sunshine-base # Update keyring to avoid signature errors, and update system RUN <<_DEPS #!/bin/bash set -e pacman -Syy --disable-download-timeout --needed --noconfirm \ archlinux-keyring pacman -Syu --disable-download-timeout --noconfirm pacman -Scc --noconfirm _DEPS FROM sunshine-base AS sunshine-build ARG BRANCH ARG BUILD_VERSION ARG COMMIT ARG CLONE_URL # note: BUILD_VERSION may be blank ENV BRANCH=${BRANCH} ENV BUILD_VERSION=${BUILD_VERSION} ENV COMMIT=${COMMIT} SHELL ["/bin/bash", "-o", "pipefail", "-c"] # hadolint ignore=SC2016 RUN <<_SETUP #!/bin/bash set -e # Setup builder user, arch prevents running makepkg as root useradd -m builder echo 'builder ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers # patch the build flags sed -i 's,#MAKEFLAGS="-j2",MAKEFLAGS="-j$(nproc)",g' /etc/makepkg.conf # install dependencies pacman -Syu --disable-download-timeout --needed --noconfirm \ base-devel \ cmake \ cuda \ git \ namcap \ xorg-server-xvfb pacman -Scc --noconfirm _SETUP # Setup builder user USER builder # copy repository WORKDIR /build/sunshine/ COPY --link .. . # setup build directory WORKDIR /build/sunshine/build # configure PKGBUILD file RUN <<_MAKE #!/bin/bash set -e if [[ "${BUILD_VERSION}" == '' ]]; then sub_version=".r${COMMIT}" else sub_version="" fi cmake \ -DSUNSHINE_CONFIGURE_PKGBUILD=ON \ -DSUNSHINE_SUB_VERSION="${sub_version}" \ -DGITHUB_CLONE_URL="${CLONE_URL}" \ -DGITHUB_BRANCH=${BRANCH} \ -DGITHUB_BUILD_VERSION=${BUILD_VERSION} \ -DGITHUB_COMMIT="${COMMIT}" \ -DSUNSHINE_CONFIGURE_ONLY=ON \ /build/sunshine _MAKE WORKDIR /build/sunshine/pkg RUN <<_PACKAGE mv /build/sunshine/build/PKGBUILD . mv /build/sunshine/build/sunshine.install . makepkg --printsrcinfo > .SRCINFO _PACKAGE # create a PKGBUILD archive USER root RUN <<_REPO #!/bin/bash set -e tar -czf /build/sunshine/sunshine.pkg.tar.gz . _REPO # namcap and build PKGBUILD file USER builder RUN <<_PKGBUILD #!/bin/bash set -e # shellcheck source=/dev/null source /etc/profile # ensure cuda is in the PATH export DISPLAY=:1 Xvfb ${DISPLAY} -screen 0 1024x768x24 & namcap -i PKGBUILD makepkg -si --noconfirm rm -f /build/sunshine/pkg/sunshine-debug*.pkg.tar.zst ls -a _PKGBUILD FROM scratch AS artifacts COPY --link --from=sunshine-build /build/sunshine/pkg/sunshine*.pkg.tar.zst /sunshine.pkg.tar.zst COPY --link --from=sunshine-build /build/sunshine/sunshine.pkg.tar.gz /sunshine.pkg.tar.gz FROM sunshine-base AS sunshine COPY --link --from=artifacts /sunshine.pkg.tar.zst / # install sunshine RUN <<_INSTALL_SUNSHINE #!/bin/bash set -e pacman -U --disable-download-timeout --needed --noconfirm \ /sunshine.pkg.tar.zst pacman -Scc --noconfirm _INSTALL_SUNSHINE # network setup EXPOSE 47984-47990/tcp EXPOSE 48010 EXPOSE 47998-48000/udp # setup user ARG PGID=1000 ENV PGID=${PGID} ARG PUID=1000 ENV PUID=${PUID} ENV TZ="UTC" ARG UNAME=lizard ENV UNAME=${UNAME} ENV HOME=/home/$UNAME # setup user RUN <<_SETUP_USER #!/bin/bash set -e groupadd -f -g "${PGID}" "${UNAME}" useradd -lm -d ${HOME} -s /bin/bash -g "${PGID}" -u "${PUID}" "${UNAME}" mkdir -p ${HOME}/.config/sunshine ln -s ${HOME}/.config/sunshine /config chown -R ${UNAME} ${HOME} _SETUP_USER USER ${UNAME} WORKDIR ${HOME} # entrypoint ENTRYPOINT ["/usr/bin/sunshine"] ================================================ FILE: docker/clion-toolchain.dockerfile ================================================ # syntax=docker/dockerfile:1 # artifacts: false # platforms: linux/amd64 # platforms_pr: linux/amd64 # no-cache-filters: toolchain-base,toolchain ARG BASE=ubuntu ARG TAG=22.04 FROM ${BASE}:${TAG} AS toolchain-base ENV DEBIAN_FRONTEND=noninteractive FROM toolchain-base AS toolchain ARG TARGETPLATFORM RUN echo "target_platform: ${TARGETPLATFORM}" ENV DISPLAY=:0 SHELL ["/bin/bash", "-o", "pipefail", "-c"] # install dependencies # hadolint ignore=SC1091 RUN <<_DEPS #!/bin/bash set -e apt-get update -y apt-get install -y --no-install-recommends \ build-essential \ cmake=3.22.* \ ca-certificates \ doxygen \ gcc=4:11.2.* \ g++=4:11.2.* \ gdb \ git \ graphviz \ libayatana-appindicator3-dev \ libcap-dev \ libcurl4-openssl-dev \ libdrm-dev \ libevdev-dev \ libminiupnpc-dev \ libnotify-dev \ libnuma-dev \ libopus-dev \ libpulse-dev \ libssl-dev \ libva-dev \ libwayland-dev \ libx11-dev \ libxcb-shm0-dev \ libxcb-xfixes0-dev \ libxcb1-dev \ libxfixes-dev \ libxrandr-dev \ libxtst-dev \ udev \ wget \ x11-xserver-utils \ xvfb apt-get clean rm -rf /var/lib/apt/lists/* # Install Node wget --max-redirect=0 -qO- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash source "$HOME/.nvm/nvm.sh" nvm install node nvm use node nvm alias default node _DEPS # install cuda WORKDIR /build/cuda # versions: https://developer.nvidia.com/cuda-toolkit-archive ENV CUDA_VERSION="11.8.0" ENV CUDA_BUILD="520.61.05" # hadolint ignore=SC3010 RUN <<_INSTALL_CUDA #!/bin/bash set -e cuda_prefix="https://developer.download.nvidia.com/compute/cuda/" cuda_suffix="" if [[ "${TARGETPLATFORM}" == 'linux/arm64' ]]; then cuda_suffix="_sbsa" fi url="${cuda_prefix}${CUDA_VERSION}/local_installers/cuda_${CUDA_VERSION}_${CUDA_BUILD}_linux${cuda_suffix}.run" echo "cuda url: ${url}" wget "$url" --progress=bar:force:noscroll -q --show-progress -O ./cuda.run chmod a+x ./cuda.run ./cuda.run --silent --toolkit --toolkitpath=/usr/local --no-opengl-libs --no-man-page --no-drm rm ./cuda.run _INSTALL_CUDA WORKDIR / # Write a shell script that starts Xvfb and then runs a shell RUN <<_ENTRYPOINT #!/bin/bash set -e cat < /entrypoint.sh #!/bin/bash Xvfb ${DISPLAY} -screen 0 1024x768x24 & if [ "\$#" -eq 0 ]; then exec "/bin/bash" else exec "\$@" fi EOF # Make the script executable chmod +x /entrypoint.sh # Note about CLion echo "ATTENTION: CLion will override the entrypoint, you can disable this in the toolchain settings" _ENTRYPOINT # Use the shell script as the entrypoint ENTRYPOINT ["/entrypoint.sh"] ================================================ FILE: docker/debian-bookworm.dockerfile ================================================ # syntax=docker/dockerfile:1 # artifacts: true # platforms: linux/amd64,linux/arm64/v8 # platforms_pr: linux/amd64 # no-cache-filters: sunshine-base,artifacts,sunshine ARG BASE=debian ARG TAG=bookworm FROM ${BASE}:${TAG} AS sunshine-base ENV DEBIAN_FRONTEND=noninteractive FROM sunshine-base AS sunshine-build ARG BRANCH ARG BUILD_VERSION ARG COMMIT # note: BUILD_VERSION may be blank ENV BRANCH=${BRANCH} ENV BUILD_VERSION=${BUILD_VERSION} ENV COMMIT=${COMMIT} SHELL ["/bin/bash", "-o", "pipefail", "-c"] # copy repository WORKDIR /build/sunshine/ COPY --link .. . # cmake and cpack RUN <<_BUILD #!/bin/bash set -e chmod +x ./scripts/linux_build.sh ./scripts/linux_build.sh \ --publisher-name='LizardByte' \ --publisher-website='https://app.lizardbyte.dev' \ --publisher-issue-url='https://app.lizardbyte.dev/support' \ --sudo-off apt-get clean rm -rf /var/lib/apt/lists/* _BUILD # run tests WORKDIR /build/sunshine/build/tests # hadolint ignore=SC1091 RUN <<_TEST #!/bin/bash set -e export DISPLAY=:1 Xvfb ${DISPLAY} -screen 0 1024x768x24 & ./test_sunshine --gtest_color=yes _TEST FROM scratch AS artifacts ARG BASE ARG TAG ARG TARGETARCH COPY --link --from=sunshine-build /build/sunshine/build/cpack_artifacts/Sunshine.deb /sunshine-${BASE}-${TAG}-${TARGETARCH}.deb FROM sunshine-base AS sunshine # copy deb from builder COPY --link --from=artifacts /sunshine*.deb /sunshine.deb # install sunshine RUN <<_INSTALL_SUNSHINE #!/bin/bash set -e apt-get update -y apt-get install -y --no-install-recommends /sunshine.deb apt-get clean rm -rf /var/lib/apt/lists/* _INSTALL_SUNSHINE # network setup EXPOSE 47984-47990/tcp EXPOSE 48010 EXPOSE 47998-48000/udp # setup user ARG PGID=1000 ENV PGID=${PGID} ARG PUID=1000 ENV PUID=${PUID} ENV TZ="UTC" ARG UNAME=lizard ENV UNAME=${UNAME} ENV HOME=/home/$UNAME # setup user RUN <<_SETUP_USER #!/bin/bash set -e groupadd -f -g "${PGID}" "${UNAME}" useradd -lm -d ${HOME} -s /bin/bash -g "${PGID}" -u "${PUID}" "${UNAME}" mkdir -p ${HOME}/.config/sunshine ln -s ${HOME}/.config/sunshine /config chown -R ${UNAME} ${HOME} _SETUP_USER USER ${UNAME} WORKDIR ${HOME} # entrypoint ENTRYPOINT ["/usr/bin/sunshine"] ================================================ FILE: docker/fedora-39.dockerfile ================================================ # syntax=docker/dockerfile:1 # artifacts: true # platforms: linux/amd64 # platforms_pr: linux/amd64 # no-cache-filters: sunshine-base,artifacts,sunshine ARG BASE=fedora ARG TAG=39 FROM ${BASE}:${TAG} AS sunshine-base FROM sunshine-base AS sunshine-build ARG BRANCH ARG BUILD_VERSION ARG COMMIT # note: BUILD_VERSION may be blank ENV BRANCH=${BRANCH} ENV BUILD_VERSION=${BUILD_VERSION} ENV COMMIT=${COMMIT} SHELL ["/bin/bash", "-o", "pipefail", "-c"] # copy repository WORKDIR /build/sunshine/ COPY --link .. . # cmake and cpack RUN <<_BUILD #!/bin/bash set -e chmod +x ./scripts/linux_build.sh ./scripts/linux_build.sh \ --publisher-name='LizardByte' \ --publisher-website='https://app.lizardbyte.dev' \ --publisher-issue-url='https://app.lizardbyte.dev/support' \ --sudo-off dnf clean all rm -rf /var/cache/yum _BUILD # run tests WORKDIR /build/sunshine/build/tests # hadolint ignore=SC1091 RUN <<_TEST #!/bin/bash set -e export DISPLAY=:1 Xvfb ${DISPLAY} -screen 0 1024x768x24 & ./test_sunshine --gtest_color=yes _TEST FROM scratch AS artifacts ARG BASE ARG TAG ARG TARGETARCH COPY --link --from=sunshine-build /build/sunshine/build/cpack_artifacts/Sunshine.rpm /sunshine-${BASE}-${TAG}-${TARGETARCH}.rpm FROM sunshine-base AS sunshine # copy deb from builder COPY --link --from=artifacts /sunshine*.rpm /sunshine.rpm # install sunshine RUN <<_INSTALL_SUNSHINE #!/bin/bash set -e dnf -y update dnf -y install /sunshine.rpm dnf clean all rm -rf /var/cache/yum _INSTALL_SUNSHINE # network setup EXPOSE 47984-47990/tcp EXPOSE 48010 EXPOSE 47998-48000/udp # setup user ARG PGID=1000 ENV PGID=${PGID} ARG PUID=1000 ENV PUID=${PUID} ENV TZ="UTC" ARG UNAME=lizard ENV UNAME=${UNAME} ENV HOME=/home/$UNAME # setup user RUN <<_SETUP_USER #!/bin/bash set -e groupadd -f -g "${PGID}" "${UNAME}" useradd -lm -d ${HOME} -s /bin/bash -g "${PGID}" -u "${PUID}" "${UNAME}" mkdir -p ${HOME}/.config/sunshine ln -s ${HOME}/.config/sunshine /config chown -R ${UNAME} ${HOME} _SETUP_USER USER ${UNAME} WORKDIR ${HOME} # entrypoint ENTRYPOINT ["/usr/bin/sunshine"] ================================================ FILE: docker/fedora-40.dockerfile ================================================ # syntax=docker/dockerfile:1 # artifacts: true # platforms: linux/amd64 # platforms_pr: linux/amd64 # no-cache-filters: sunshine-base,artifacts,sunshine ARG BASE=fedora ARG TAG=40 FROM ${BASE}:${TAG} AS sunshine-base FROM sunshine-base AS sunshine-build ARG BRANCH ARG BUILD_VERSION ARG COMMIT # note: BUILD_VERSION may be blank ENV BRANCH=${BRANCH} ENV BUILD_VERSION=${BUILD_VERSION} ENV COMMIT=${COMMIT} SHELL ["/bin/bash", "-o", "pipefail", "-c"] # copy repository WORKDIR /build/sunshine/ COPY --link .. . # cmake and cpack RUN <<_BUILD #!/bin/bash set -e chmod +x ./scripts/linux_build.sh ./scripts/linux_build.sh \ --publisher-name='LizardByte' \ --publisher-website='https://app.lizardbyte.dev' \ --publisher-issue-url='https://app.lizardbyte.dev/support' \ --sudo-off dnf clean all rm -rf /var/cache/yum _BUILD # run tests WORKDIR /build/sunshine/build/tests # hadolint ignore=SC1091 RUN <<_TEST #!/bin/bash set -e export DISPLAY=:1 Xvfb ${DISPLAY} -screen 0 1024x768x24 & ./test_sunshine --gtest_color=yes _TEST FROM scratch AS artifacts ARG BASE ARG TAG ARG TARGETARCH COPY --link --from=sunshine-build /build/sunshine/build/cpack_artifacts/Sunshine.rpm /sunshine-${BASE}-${TAG}-${TARGETARCH}.rpm FROM sunshine-base AS sunshine # copy deb from builder COPY --link --from=artifacts /sunshine*.rpm /sunshine.rpm # install sunshine RUN <<_INSTALL_SUNSHINE #!/bin/bash set -e dnf -y update dnf -y install /sunshine.rpm dnf clean all rm -rf /var/cache/yum _INSTALL_SUNSHINE # network setup EXPOSE 47984-47990/tcp EXPOSE 48010 EXPOSE 47998-48000/udp # setup user ARG PGID=1000 ENV PGID=${PGID} ARG PUID=1000 ENV PUID=${PUID} ENV TZ="UTC" ARG UNAME=lizard ENV UNAME=${UNAME} ENV HOME=/home/$UNAME # setup user RUN <<_SETUP_USER #!/bin/bash set -e groupadd -f -g "${PGID}" "${UNAME}" useradd -lm -d ${HOME} -s /bin/bash -g "${PGID}" -u "${PUID}" "${UNAME}" mkdir -p ${HOME}/.config/sunshine ln -s ${HOME}/.config/sunshine /config chown -R ${UNAME} ${HOME} _SETUP_USER USER ${UNAME} WORKDIR ${HOME} # entrypoint ENTRYPOINT ["/usr/bin/sunshine"] ================================================ FILE: docker/ubuntu-22.04.dockerfile ================================================ # syntax=docker/dockerfile:1 # artifacts: true # platforms: linux/amd64,linux/arm64/v8 # platforms_pr: linux/amd64 # no-cache-filters: sunshine-base,artifacts,sunshine ARG BASE=ubuntu ARG TAG=22.04 FROM ${BASE}:${TAG} AS sunshine-base ENV DEBIAN_FRONTEND=noninteractive FROM sunshine-base AS sunshine-build ARG BRANCH ARG BUILD_VERSION ARG COMMIT # note: BUILD_VERSION may be blank ENV BRANCH=${BRANCH} ENV BUILD_VERSION=${BUILD_VERSION} ENV COMMIT=${COMMIT} SHELL ["/bin/bash", "-o", "pipefail", "-c"] # copy repository WORKDIR /build/sunshine/ COPY --link .. . # cmake and cpack RUN <<_BUILD #!/bin/bash set -e chmod +x ./scripts/linux_build.sh ./scripts/linux_build.sh \ --publisher-name='LizardByte' \ --publisher-website='https://app.lizardbyte.dev' \ --publisher-issue-url='https://app.lizardbyte.dev/support' \ --sudo-off apt-get clean rm -rf /var/lib/apt/lists/* _BUILD # run tests WORKDIR /build/sunshine/build/tests # hadolint ignore=SC1091 RUN <<_TEST #!/bin/bash set -e export DISPLAY=:1 Xvfb ${DISPLAY} -screen 0 1024x768x24 & ./test_sunshine --gtest_color=yes _TEST FROM scratch AS artifacts ARG BASE ARG TAG ARG TARGETARCH COPY --link --from=sunshine-build /build/sunshine/build/cpack_artifacts/Sunshine.deb /sunshine-${BASE}-${TAG}-${TARGETARCH}.deb FROM sunshine-base AS sunshine # copy deb from builder COPY --link --from=artifacts /sunshine*.deb /sunshine.deb # install sunshine RUN <<_INSTALL_SUNSHINE #!/bin/bash set -e apt-get update -y apt-get install -y --no-install-recommends /sunshine.deb apt-get clean rm -rf /var/lib/apt/lists/* _INSTALL_SUNSHINE # network setup EXPOSE 47984-47990/tcp EXPOSE 48010 EXPOSE 47998-48000/udp # setup user ARG PGID=1000 ENV PGID=${PGID} ARG PUID=1000 ENV PUID=${PUID} ENV TZ="UTC" ARG UNAME=lizard ENV UNAME=${UNAME} ENV HOME=/home/$UNAME # setup user RUN <<_SETUP_USER #!/bin/bash set -e groupadd -f -g "${PGID}" "${UNAME}" useradd -lm -d ${HOME} -s /bin/bash -g "${PGID}" -u "${PUID}" "${UNAME}" mkdir -p ${HOME}/.config/sunshine ln -s ${HOME}/.config/sunshine /config chown -R ${UNAME} ${HOME} _SETUP_USER USER ${UNAME} WORKDIR ${HOME} # entrypoint ENTRYPOINT ["/usr/bin/sunshine"] ================================================ FILE: docker/ubuntu-24.04.dockerfile ================================================ # syntax=docker/dockerfile:1 # artifacts: true # platforms: linux/amd64,linux/arm64/v8 # platforms_pr: linux/amd64 # no-cache-filters: sunshine-base,artifacts,sunshine ARG BASE=ubuntu ARG TAG=24.04 FROM ${BASE}:${TAG} AS sunshine-base ENV DEBIAN_FRONTEND=noninteractive FROM sunshine-base AS sunshine-build ARG BRANCH ARG BUILD_VERSION ARG COMMIT # note: BUILD_VERSION may be blank ENV BRANCH=${BRANCH} ENV BUILD_VERSION=${BUILD_VERSION} ENV COMMIT=${COMMIT} SHELL ["/bin/bash", "-o", "pipefail", "-c"] # copy repository WORKDIR /build/sunshine/ COPY --link .. . # cmake and cpack RUN <<_BUILD #!/bin/bash set -e chmod +x ./scripts/linux_build.sh ./scripts/linux_build.sh \ --publisher-name='LizardByte' \ --publisher-website='https://app.lizardbyte.dev' \ --publisher-issue-url='https://app.lizardbyte.dev/support' \ --sudo-off apt-get clean rm -rf /var/lib/apt/lists/* _BUILD # run tests WORKDIR /build/sunshine/build/tests # hadolint ignore=SC1091 RUN <<_TEST #!/bin/bash set -e export DISPLAY=:1 Xvfb ${DISPLAY} -screen 0 1024x768x24 & ./test_sunshine --gtest_color=yes _TEST FROM scratch AS artifacts ARG BASE ARG TAG ARG TARGETARCH COPY --link --from=sunshine-build /build/sunshine/build/cpack_artifacts/Sunshine.deb /sunshine-${BASE}-${TAG}-${TARGETARCH}.deb FROM sunshine-base AS sunshine # copy deb from builder COPY --link --from=artifacts /sunshine*.deb /sunshine.deb # install sunshine RUN <<_INSTALL_SUNSHINE #!/bin/bash set -e apt-get update -y apt-get install -y --no-install-recommends /sunshine.deb apt-get clean rm -rf /var/lib/apt/lists/* _INSTALL_SUNSHINE # network setup EXPOSE 47984-47990/tcp EXPOSE 48010 EXPOSE 47998-48000/udp # setup user ARG PGID=1001 ENV PGID=${PGID} ARG PUID=1001 ENV PUID=${PUID} ENV TZ="UTC" ARG UNAME=lizard ENV UNAME=${UNAME} ENV HOME=/home/$UNAME # setup user RUN <<_SETUP_USER #!/bin/bash set -e groupadd -f -g "${PGID}" "${UNAME}" useradd -lm -d ${HOME} -s /bin/bash -g "${PGID}" -u "${PUID}" "${UNAME}" mkdir -p ${HOME}/.config/sunshine ln -s ${HOME}/.config/sunshine /config chown -R ${UNAME} ${HOME} _SETUP_USER USER ${UNAME} WORKDIR ${HOME} # entrypoint ENTRYPOINT ["/usr/bin/sunshine"] ================================================ FILE: docs/Doxyfile ================================================ # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project. # # All text after a double hash (##) is considered a comment and is placed in # front of the TAG it is preceding. # # All text after a single hash (#) is considered a comment and will be ignored. # The format is: # TAG = value [value, ...] # For lists, items can also be appended using: # TAG += value [value, ...] # Values that contain spaces should be placed between quotes (\" \"). # # Note: # # Use doxygen to compare the used configuration file with the template # configuration file: # doxygen -x [configFile] # Use doxygen to compare the used configuration file with the template # configuration file without replacing the environment variables or CMake type # replacement variables: # doxygen -x_noenv [configFile] # project metadata DOCSET_BUNDLE_ID = dev.lizardbyte.Sunshine DOCSET_PUBLISHER_ID = dev.lizardbyte.Sunshine.documentation PROJECT_BRIEF = "Self-hosted game stream host for Moonlight." PROJECT_ICON = ../sunshine.ico PROJECT_LOGO = ../sunshine.png PROJECT_NAME = Sunshine # project specific settings DOT_GRAPH_MAX_NODES = 60 IMAGE_PATH = ../docs/images INCLUDE_PATH = ../third-party/build-deps/ffmpeg/Linux-x86_64/include/ PREDEFINED += SUNSHINE_BUILD_WAYLAND PREDEFINED += SUNSHINE_TRAY=1 # TODO: Enable this when we have complete documentation WARN_IF_UNDOCUMENTED = NO # files and directories to process USE_MDFILE_AS_MAINPAGE = ../README.md INPUT = ../README.md \ getting_started.md \ changelog.md \ ../DOCKER_README.md \ third_party_packages.md \ gamestream_migration.md \ legal.md \ configuration.md \ app_examples.md \ guides.md \ performance_tuning.md \ troubleshooting.md \ building.md \ contributing.md \ ../third-party/doxyconfig/docs/source_code.md \ ../src ================================================ FILE: docs/Doxyfile-1.10.0-default ================================================ # Doxyfile 1.10.0 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project. # # All text after a double hash (##) is considered a comment and is placed in # front of the TAG it is preceding. # # All text after a single hash (#) is considered a comment and will be ignored. # The format is: # TAG = value [value, ...] # For lists, items can also be appended using: # TAG += value [value, ...] # Values that contain spaces should be placed between quotes (\" \"). # # Note: # # Use doxygen to compare the used configuration file with the template # configuration file: # doxygen -x [configFile] # Use doxygen to compare the used configuration file with the template # configuration file without replacing the environment variables or CMake type # replacement variables: # doxygen -x_noenv [configFile] #--------------------------------------------------------------------------- # Project related configuration options #--------------------------------------------------------------------------- # This tag specifies the encoding used for all characters in the configuration # file that follow. The default is UTF-8 which is also the encoding used for all # text before the first occurrence of this tag. Doxygen uses libiconv (or the # iconv built into libc) for the transcoding. See # https://www.gnu.org/software/libiconv/ for the list of possible encodings. # The default value is: UTF-8. DOXYFILE_ENCODING = UTF-8 # The PROJECT_NAME tag is a single word (or a sequence of words surrounded by # double-quotes, unless you are using Doxywizard) that should identify the # project for which the documentation is generated. This name is used in the # title of most generated pages and in a few other places. # The default value is: My Project. PROJECT_NAME = "My Project" # The PROJECT_NUMBER tag can be used to enter a project or revision number. This # could be handy for archiving the generated documentation or if some version # control system is used. PROJECT_NUMBER = # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a # quick idea about the purpose of the project. Keep the description short. PROJECT_BRIEF = # With the PROJECT_LOGO tag one can specify a logo or an icon that is included # in the documentation. The maximum height of the logo should not exceed 55 # pixels and the maximum width should not exceed 200 pixels. Doxygen will copy # the logo to the output directory. PROJECT_LOGO = # With the PROJECT_ICON tag one can specify an icon that is included in the tabs # when the HTML document is shown. Doxygen will copy the logo to the output # directory. PROJECT_ICON = # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path # into which the generated documentation will be written. If a relative path is # entered, it will be relative to the location where doxygen was started. If # left blank the current directory will be used. OUTPUT_DIRECTORY = # If the CREATE_SUBDIRS tag is set to YES then doxygen will create up to 4096 # sub-directories (in 2 levels) under the output directory of each output format # and will distribute the generated files over these directories. Enabling this # option can be useful when feeding doxygen a huge amount of source files, where # putting all generated files in the same directory would otherwise causes # performance problems for the file system. Adapt CREATE_SUBDIRS_LEVEL to # control the number of sub-directories. # The default value is: NO. CREATE_SUBDIRS = NO # Controls the number of sub-directories that will be created when # CREATE_SUBDIRS tag is set to YES. Level 0 represents 16 directories, and every # level increment doubles the number of directories, resulting in 4096 # directories at level 8 which is the default and also the maximum value. The # sub-directories are organized in 2 levels, the first level always has a fixed # number of 16 directories. # Minimum value: 0, maximum value: 8, default value: 8. # This tag requires that the tag CREATE_SUBDIRS is set to YES. CREATE_SUBDIRS_LEVEL = 8 # If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII # characters to appear in the names of generated files. If set to NO, non-ASCII # characters will be escaped, for example _xE3_x81_x84 will be used for Unicode # U+3044. # The default value is: NO. ALLOW_UNICODE_NAMES = NO # The OUTPUT_LANGUAGE tag is used to specify the language in which all # documentation generated by doxygen is written. Doxygen will use this # information to generate all constant output in the proper language. # Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Bulgarian, # Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, Dutch, English # (United States), Esperanto, Farsi (Persian), Finnish, French, German, Greek, # Hindi, Hungarian, Indonesian, Italian, Japanese, Japanese-en (Japanese with # English messages), Korean, Korean-en (Korean with English messages), Latvian, # Lithuanian, Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, # Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, # Swedish, Turkish, Ukrainian and Vietnamese. # The default value is: English. OUTPUT_LANGUAGE = English # If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member # descriptions after the members that are listed in the file and class # documentation (similar to Javadoc). Set to NO to disable this. # The default value is: YES. BRIEF_MEMBER_DESC = YES # If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief # description of a member or function before the detailed description # # Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the # brief descriptions will be completely suppressed. # The default value is: YES. REPEAT_BRIEF = YES # This tag implements a quasi-intelligent brief description abbreviator that is # used to form the text in various listings. Each string in this list, if found # as the leading text of the brief description, will be stripped from the text # and the result, after processing the whole list, is used as the annotated # text. Otherwise, the brief description is used as-is. If left blank, the # following values are used ($name is automatically replaced with the name of # the entity):The $name class, The $name widget, The $name file, is, provides, # specifies, contains, represents, a, an and the. ABBREVIATE_BRIEF = "The $name class" \ "The $name widget" \ "The $name file" \ is \ provides \ specifies \ contains \ represents \ a \ an \ the # If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then # doxygen will generate a detailed section even if there is only a brief # description. # The default value is: NO. ALWAYS_DETAILED_SEC = NO # If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all # inherited members of a class in the documentation of that class as if those # members were ordinary class members. Constructors, destructors and assignment # operators of the base classes will not be shown. # The default value is: NO. INLINE_INHERITED_MEMB = NO # If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path # before files name in the file list and in the header files. If set to NO the # shortest path that makes the file name unique will be used # The default value is: YES. FULL_PATH_NAMES = YES # The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path. # Stripping is only done if one of the specified strings matches the left-hand # part of the path. The tag can be used to show relative paths in the file list. # If left blank the directory from which doxygen is run is used as the path to # strip. # # Note that you can specify absolute paths here, but also relative paths, which # will be relative from the directory where doxygen is started. # This tag requires that the tag FULL_PATH_NAMES is set to YES. STRIP_FROM_PATH = # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the # path mentioned in the documentation of a class, which tells the reader which # header file to include in order to use a class. If left blank only the name of # the header file containing the class definition is used. Otherwise one should # specify the list of include paths that are normally passed to the compiler # using the -I flag. STRIP_FROM_INC_PATH = # If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but # less readable) file names. This can be useful is your file systems doesn't # support long names like on DOS, Mac, or CD-ROM. # The default value is: NO. SHORT_NAMES = NO # If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the # first line (until the first dot) of a Javadoc-style comment as the brief # description. If set to NO, the Javadoc-style will behave just like regular Qt- # style comments (thus requiring an explicit @brief command for a brief # description.) # The default value is: NO. JAVADOC_AUTOBRIEF = NO # If the JAVADOC_BANNER tag is set to YES then doxygen will interpret a line # such as # /*************** # as being the beginning of a Javadoc-style comment "banner". If set to NO, the # Javadoc-style will behave just like regular comments and it will not be # interpreted by doxygen. # The default value is: NO. JAVADOC_BANNER = NO # If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first # line (until the first dot) of a Qt-style comment as the brief description. If # set to NO, the Qt-style will behave just like regular Qt-style comments (thus # requiring an explicit \brief command for a brief description.) # The default value is: NO. QT_AUTOBRIEF = NO # The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a # multi-line C++ special comment block (i.e. a block of //! or /// comments) as # a brief description. This used to be the default behavior. The new default is # to treat a multi-line C++ comment block as a detailed description. Set this # tag to YES if you prefer the old behavior instead. # # Note that setting this tag to YES also means that rational rose comments are # not recognized any more. # The default value is: NO. MULTILINE_CPP_IS_BRIEF = NO # By default Python docstrings are displayed as preformatted text and doxygen's # special commands cannot be used. By setting PYTHON_DOCSTRING to NO the # doxygen's special commands can be used and the contents of the docstring # documentation blocks is shown as doxygen documentation. # The default value is: YES. PYTHON_DOCSTRING = YES # If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the # documentation from any documented member that it re-implements. # The default value is: YES. INHERIT_DOCS = YES # If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new # page for each member. If set to NO, the documentation of a member will be part # of the file/class/namespace that contains it. # The default value is: NO. SEPARATE_MEMBER_PAGES = NO # The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen # uses this value to replace tabs by spaces in code fragments. # Minimum value: 1, maximum value: 16, default value: 4. TAB_SIZE = 4 # This tag can be used to specify a number of aliases that act as commands in # the documentation. An alias has the form: # name=value # For example adding # "sideeffect=@par Side Effects:^^" # will allow you to put the command \sideeffect (or @sideeffect) in the # documentation, which will result in a user-defined paragraph with heading # "Side Effects:". Note that you cannot put \n's in the value part of an alias # to insert newlines (in the resulting output). You can put ^^ in the value part # of an alias to insert a newline as if a physical newline was in the original # file. When you need a literal { or } or , in the value part of an alias you # have to escape them by means of a backslash (\), this can lead to conflicts # with the commands \{ and \} for these it is advised to use the version @{ and # @} or use a double escape (\\{ and \\}) ALIASES = # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources # only. Doxygen will then generate output that is more tailored for C. For # instance, some of the names that are used will be different. The list of all # members will be omitted, etc. # The default value is: NO. OPTIMIZE_OUTPUT_FOR_C = NO # Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or # Python sources only. Doxygen will then generate output that is more tailored # for that language. For instance, namespaces will be presented as packages, # qualified scopes will look different, etc. # The default value is: NO. OPTIMIZE_OUTPUT_JAVA = NO # Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran # sources. Doxygen will then generate output that is tailored for Fortran. # The default value is: NO. OPTIMIZE_FOR_FORTRAN = NO # Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL # sources. Doxygen will then generate output that is tailored for VHDL. # The default value is: NO. OPTIMIZE_OUTPUT_VHDL = NO # Set the OPTIMIZE_OUTPUT_SLICE tag to YES if your project consists of Slice # sources only. Doxygen will then generate output that is more tailored for that # language. For instance, namespaces will be presented as modules, types will be # separated into more groups, etc. # The default value is: NO. OPTIMIZE_OUTPUT_SLICE = NO # Doxygen selects the parser to use depending on the extension of the files it # parses. With this tag you can assign which parser to use for a given # extension. Doxygen has a built-in mapping, but you can override or extend it # using this tag. The format is ext=language, where ext is a file extension, and # language is one of the parsers supported by doxygen: IDL, Java, JavaScript, # Csharp (C#), C, C++, Lex, D, PHP, md (Markdown), Objective-C, Python, Slice, # VHDL, Fortran (fixed format Fortran: FortranFixed, free formatted Fortran: # FortranFree, unknown formatted Fortran: Fortran. In the later case the parser # tries to guess whether the code is fixed or free formatted code, this is the # default for Fortran type files). For instance to make doxygen treat .inc files # as Fortran files (default is PHP), and .f files as C (default is Fortran), # use: inc=Fortran f=C. # # Note: For files without extension you can use no_extension as a placeholder. # # Note that for custom extensions you also need to set FILE_PATTERNS otherwise # the files are not read by doxygen. When specifying no_extension you should add # * to the FILE_PATTERNS. # # Note see also the list of default file extension mappings. EXTENSION_MAPPING = # If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments # according to the Markdown format, which allows for more readable # documentation. See https://daringfireball.net/projects/markdown/ for details. # The output of markdown processing is further processed by doxygen, so you can # mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in # case of backward compatibilities issues. # The default value is: YES. MARKDOWN_SUPPORT = YES # When the TOC_INCLUDE_HEADINGS tag is set to a non-zero value, all headings up # to that level are automatically included in the table of contents, even if # they do not have an id attribute. # Note: This feature currently applies only to Markdown headings. # Minimum value: 0, maximum value: 99, default value: 5. # This tag requires that the tag MARKDOWN_SUPPORT is set to YES. TOC_INCLUDE_HEADINGS = 5 # The MARKDOWN_ID_STYLE tag can be used to specify the algorithm used to # generate identifiers for the Markdown headings. Note: Every identifier is # unique. # Possible values are: DOXYGEN use a fixed 'autotoc_md' string followed by a # sequence number starting at 0 and GITHUB use the lower case version of title # with any whitespace replaced by '-' and punctuation characters removed. # The default value is: DOXYGEN. # This tag requires that the tag MARKDOWN_SUPPORT is set to YES. MARKDOWN_ID_STYLE = DOXYGEN # When enabled doxygen tries to link words that correspond to documented # classes, or namespaces to their corresponding documentation. Such a link can # be prevented in individual cases by putting a % sign in front of the word or # globally by setting AUTOLINK_SUPPORT to NO. # The default value is: YES. AUTOLINK_SUPPORT = YES # If you use STL classes (i.e. std::string, std::vector, etc.) but do not want # to include (a tag file for) the STL sources as input, then you should set this # tag to YES in order to let doxygen match functions declarations and # definitions whose arguments contain STL classes (e.g. func(std::string); # versus func(std::string) {}). This also make the inheritance and collaboration # diagrams that involve STL classes more complete and accurate. # The default value is: NO. BUILTIN_STL_SUPPORT = NO # If you use Microsoft's C++/CLI language, you should set this option to YES to # enable parsing support. # The default value is: NO. CPP_CLI_SUPPORT = NO # Set the SIP_SUPPORT tag to YES if your project consists of sip (see: # https://www.riverbankcomputing.com/software/sip/intro) sources only. Doxygen # will parse them like normal C++ but will assume all classes use public instead # of private inheritance when no explicit protection keyword is present. # The default value is: NO. SIP_SUPPORT = NO # For Microsoft's IDL there are propget and propput attributes to indicate # getter and setter methods for a property. Setting this option to YES will make # doxygen to replace the get and set methods by a property in the documentation. # This will only work if the methods are indeed getting or setting a simple # type. If this is not the case, or you want to show the methods anyway, you # should set this option to NO. # The default value is: YES. IDL_PROPERTY_SUPPORT = YES # If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC # tag is set to YES then doxygen will reuse the documentation of the first # member in the group (if any) for the other members of the group. By default # all members of a group must be documented explicitly. # The default value is: NO. DISTRIBUTE_GROUP_DOC = NO # If one adds a struct or class to a group and this option is enabled, then also # any nested class or struct is added to the same group. By default this option # is disabled and one has to add nested compounds explicitly via \ingroup. # The default value is: NO. GROUP_NESTED_COMPOUNDS = NO # Set the SUBGROUPING tag to YES to allow class member groups of the same type # (for instance a group of public functions) to be put as a subgroup of that # type (e.g. under the Public Functions section). Set it to NO to prevent # subgrouping. Alternatively, this can be done per class using the # \nosubgrouping command. # The default value is: YES. SUBGROUPING = YES # When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions # are shown inside the group in which they are included (e.g. using \ingroup) # instead of on a separate page (for HTML and Man pages) or section (for LaTeX # and RTF). # # Note that this feature does not work in combination with # SEPARATE_MEMBER_PAGES. # The default value is: NO. INLINE_GROUPED_CLASSES = NO # When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions # with only public data fields or simple typedef fields will be shown inline in # the documentation of the scope in which they are defined (i.e. file, # namespace, or group documentation), provided this scope is documented. If set # to NO, structs, classes, and unions are shown on a separate page (for HTML and # Man pages) or section (for LaTeX and RTF). # The default value is: NO. INLINE_SIMPLE_STRUCTS = NO # When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or # enum is documented as struct, union, or enum with the name of the typedef. So # typedef struct TypeS {} TypeT, will appear in the documentation as a struct # with name TypeT. When disabled the typedef will appear as a member of a file, # namespace, or class. And the struct will be named TypeS. This can typically be # useful for C code in case the coding convention dictates that all compound # types are typedef'ed and only the typedef is referenced, never the tag name. # The default value is: NO. TYPEDEF_HIDES_STRUCT = NO # The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This # cache is used to resolve symbols given their name and scope. Since this can be # an expensive process and often the same symbol appears multiple times in the # code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small # doxygen will become slower. If the cache is too large, memory is wasted. The # cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range # is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 # symbols. At the end of a run doxygen will report the cache usage and suggest # the optimal cache size from a speed point of view. # Minimum value: 0, maximum value: 9, default value: 0. LOOKUP_CACHE_SIZE = 0 # The NUM_PROC_THREADS specifies the number of threads doxygen is allowed to use # during processing. When set to 0 doxygen will based this on the number of # cores available in the system. You can set it explicitly to a value larger # than 0 to get more control over the balance between CPU load and processing # speed. At this moment only the input processing can be done using multiple # threads. Since this is still an experimental feature the default is set to 1, # which effectively disables parallel processing. Please report any issues you # encounter. Generating dot graphs in parallel is controlled by the # DOT_NUM_THREADS setting. # Minimum value: 0, maximum value: 32, default value: 1. NUM_PROC_THREADS = 1 # If the TIMESTAMP tag is set different from NO then each generated page will # contain the date or date and time when the page was generated. Setting this to # NO can help when comparing the output of multiple runs. # Possible values are: YES, NO, DATETIME and DATE. # The default value is: NO. TIMESTAMP = NO #--------------------------------------------------------------------------- # Build related configuration options #--------------------------------------------------------------------------- # If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in # documentation are documented, even if no documentation was available. Private # class members and static file members will be hidden unless the # EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. # Note: This will also disable the warnings about undocumented members that are # normally produced when WARNINGS is set to YES. # The default value is: NO. EXTRACT_ALL = NO # If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will # be included in the documentation. # The default value is: NO. EXTRACT_PRIVATE = NO # If the EXTRACT_PRIV_VIRTUAL tag is set to YES, documented private virtual # methods of a class will be included in the documentation. # The default value is: NO. EXTRACT_PRIV_VIRTUAL = NO # If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal # scope will be included in the documentation. # The default value is: NO. EXTRACT_PACKAGE = NO # If the EXTRACT_STATIC tag is set to YES, all static members of a file will be # included in the documentation. # The default value is: NO. EXTRACT_STATIC = NO # If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined # locally in source files will be included in the documentation. If set to NO, # only classes defined in header files are included. Does not have any effect # for Java sources. # The default value is: YES. EXTRACT_LOCAL_CLASSES = YES # This flag is only useful for Objective-C code. If set to YES, local methods, # which are defined in the implementation section but not in the interface are # included in the documentation. If set to NO, only methods in the interface are # included. # The default value is: NO. EXTRACT_LOCAL_METHODS = NO # If this flag is set to YES, the members of anonymous namespaces will be # extracted and appear in the documentation as a namespace called # 'anonymous_namespace{file}', where file will be replaced with the base name of # the file that contains the anonymous namespace. By default anonymous namespace # are hidden. # The default value is: NO. EXTRACT_ANON_NSPACES = NO # If this flag is set to YES, the name of an unnamed parameter in a declaration # will be determined by the corresponding definition. By default unnamed # parameters remain unnamed in the output. # The default value is: YES. RESOLVE_UNNAMED_PARAMS = YES # If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all # undocumented members inside documented classes or files. If set to NO these # members will be included in the various overviews, but no documentation # section is generated. This option has no effect if EXTRACT_ALL is enabled. # The default value is: NO. HIDE_UNDOC_MEMBERS = NO # If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all # undocumented classes that are normally visible in the class hierarchy. If set # to NO, these classes will be included in the various overviews. This option # will also hide undocumented C++ concepts if enabled. This option has no effect # if EXTRACT_ALL is enabled. # The default value is: NO. HIDE_UNDOC_CLASSES = NO # If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend # declarations. If set to NO, these declarations will be included in the # documentation. # The default value is: NO. HIDE_FRIEND_COMPOUNDS = NO # If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any # documentation blocks found inside the body of a function. If set to NO, these # blocks will be appended to the function's detailed documentation block. # The default value is: NO. HIDE_IN_BODY_DOCS = NO # The INTERNAL_DOCS tag determines if documentation that is typed after a # \internal command is included. If the tag is set to NO then the documentation # will be excluded. Set it to YES to include the internal documentation. # The default value is: NO. INTERNAL_DOCS = NO # With the correct setting of option CASE_SENSE_NAMES doxygen will better be # able to match the capabilities of the underlying filesystem. In case the # filesystem is case sensitive (i.e. it supports files in the same directory # whose names only differ in casing), the option must be set to YES to properly # deal with such files in case they appear in the input. For filesystems that # are not case sensitive the option should be set to NO to properly deal with # output files written for symbols that only differ in casing, such as for two # classes, one named CLASS and the other named Class, and to also support # references to files without having to specify the exact matching casing. On # Windows (including Cygwin) and MacOS, users should typically set this option # to NO, whereas on Linux or other Unix flavors it should typically be set to # YES. # Possible values are: SYSTEM, NO and YES. # The default value is: SYSTEM. CASE_SENSE_NAMES = SYSTEM # If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with # their full class and namespace scopes in the documentation. If set to YES, the # scope will be hidden. # The default value is: NO. HIDE_SCOPE_NAMES = NO # If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will # append additional text to a page's title, such as Class Reference. If set to # YES the compound reference will be hidden. # The default value is: NO. HIDE_COMPOUND_REFERENCE= NO # If the SHOW_HEADERFILE tag is set to YES then the documentation for a class # will show which file needs to be included to use the class. # The default value is: YES. SHOW_HEADERFILE = YES # If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of # the files that are included by a file in the documentation of that file. # The default value is: YES. SHOW_INCLUDE_FILES = YES # If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each # grouped member an include statement to the documentation, telling the reader # which file to include in order to use the member. # The default value is: NO. SHOW_GROUPED_MEMB_INC = NO # If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include # files with double quotes in the documentation rather than with sharp brackets. # The default value is: NO. FORCE_LOCAL_INCLUDES = NO # If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the # documentation for inline members. # The default value is: YES. INLINE_INFO = YES # If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the # (detailed) documentation of file and class members alphabetically by member # name. If set to NO, the members will appear in declaration order. # The default value is: YES. SORT_MEMBER_DOCS = YES # If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief # descriptions of file, namespace and class members alphabetically by member # name. If set to NO, the members will appear in declaration order. Note that # this will also influence the order of the classes in the class list. # The default value is: NO. SORT_BRIEF_DOCS = NO # If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the # (brief and detailed) documentation of class members so that constructors and # destructors are listed first. If set to NO the constructors will appear in the # respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS. # Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief # member documentation. # Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting # detailed member documentation. # The default value is: NO. SORT_MEMBERS_CTORS_1ST = NO # If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy # of group names into alphabetical order. If set to NO the group names will # appear in their defined order. # The default value is: NO. SORT_GROUP_NAMES = NO # If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by # fully-qualified names, including namespaces. If set to NO, the class list will # be sorted only by class name, not including the namespace part. # Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. # Note: This option applies only to the class list, not to the alphabetical # list. # The default value is: NO. SORT_BY_SCOPE_NAME = NO # If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper # type resolution of all parameters of a function it will reject a match between # the prototype and the implementation of a member function even if there is # only one candidate or it is obvious which candidate to choose by doing a # simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still # accept a match between prototype and implementation in such cases. # The default value is: NO. STRICT_PROTO_MATCHING = NO # The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo # list. This list is created by putting \todo commands in the documentation. # The default value is: YES. GENERATE_TODOLIST = YES # The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test # list. This list is created by putting \test commands in the documentation. # The default value is: YES. GENERATE_TESTLIST = YES # The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug # list. This list is created by putting \bug commands in the documentation. # The default value is: YES. GENERATE_BUGLIST = YES # The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO) # the deprecated list. This list is created by putting \deprecated commands in # the documentation. # The default value is: YES. GENERATE_DEPRECATEDLIST= YES # The ENABLED_SECTIONS tag can be used to enable conditional documentation # sections, marked by \if ... \endif and \cond # ... \endcond blocks. ENABLED_SECTIONS = # The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the # initial value of a variable or macro / define can have for it to appear in the # documentation. If the initializer consists of more lines than specified here # it will be hidden. Use a value of 0 to hide initializers completely. The # appearance of the value of individual variables and macros / defines can be # controlled using \showinitializer or \hideinitializer command in the # documentation regardless of this setting. # Minimum value: 0, maximum value: 10000, default value: 30. MAX_INITIALIZER_LINES = 30 # Set the SHOW_USED_FILES tag to NO to disable the list of files generated at # the bottom of the documentation of classes and structs. If set to YES, the # list will mention the files that were used to generate the documentation. # The default value is: YES. SHOW_USED_FILES = YES # Set the SHOW_FILES tag to NO to disable the generation of the Files page. This # will remove the Files entry from the Quick Index and from the Folder Tree View # (if specified). # The default value is: YES. SHOW_FILES = YES # Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces # page. This will remove the Namespaces entry from the Quick Index and from the # Folder Tree View (if specified). # The default value is: YES. SHOW_NAMESPACES = YES # The FILE_VERSION_FILTER tag can be used to specify a program or script that # doxygen should invoke to get the current version for each file (typically from # the version control system). Doxygen will invoke the program by executing (via # popen()) the command command input-file, where command is the value of the # FILE_VERSION_FILTER tag, and input-file is the name of an input file provided # by doxygen. Whatever the program writes to standard output is used as the file # version. For an example see the documentation. FILE_VERSION_FILTER = # The LAYOUT_FILE tag can be used to specify a layout file which will be parsed # by doxygen. The layout file controls the global structure of the generated # output files in an output format independent way. To create the layout file # that represents doxygen's defaults, run doxygen with the -l option. You can # optionally specify a file name after the option, if omitted DoxygenLayout.xml # will be used as the name of the layout file. See also section "Changing the # layout of pages" for information. # # Note that if you run doxygen from a directory containing a file called # DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE # tag is left empty. LAYOUT_FILE = # The CITE_BIB_FILES tag can be used to specify one or more bib files containing # the reference definitions. This must be a list of .bib files. The .bib # extension is automatically appended if omitted. This requires the bibtex tool # to be installed. See also https://en.wikipedia.org/wiki/BibTeX for more info. # For LaTeX the style of the bibliography can be controlled using # LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the # search path. See also \cite for info how to create references. CITE_BIB_FILES = #--------------------------------------------------------------------------- # Configuration options related to warning and progress messages #--------------------------------------------------------------------------- # The QUIET tag can be used to turn on/off the messages that are generated to # standard output by doxygen. If QUIET is set to YES this implies that the # messages are off. # The default value is: NO. QUIET = NO # The WARNINGS tag can be used to turn on/off the warning messages that are # generated to standard error (stderr) by doxygen. If WARNINGS is set to YES # this implies that the warnings are on. # # Tip: Turn warnings on while writing the documentation. # The default value is: YES. WARNINGS = YES # If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate # warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag # will automatically be disabled. # The default value is: YES. WARN_IF_UNDOCUMENTED = YES # If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for # potential errors in the documentation, such as documenting some parameters in # a documented function twice, or documenting parameters that don't exist or # using markup commands wrongly. # The default value is: YES. WARN_IF_DOC_ERROR = YES # If WARN_IF_INCOMPLETE_DOC is set to YES, doxygen will warn about incomplete # function parameter documentation. If set to NO, doxygen will accept that some # parameters have no documentation without warning. # The default value is: YES. WARN_IF_INCOMPLETE_DOC = YES # This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that # are documented, but have no documentation for their parameters or return # value. If set to NO, doxygen will only warn about wrong parameter # documentation, but not about the absence of documentation. If EXTRACT_ALL is # set to YES then this flag will automatically be disabled. See also # WARN_IF_INCOMPLETE_DOC # The default value is: NO. WARN_NO_PARAMDOC = NO # If WARN_IF_UNDOC_ENUM_VAL option is set to YES, doxygen will warn about # undocumented enumeration values. If set to NO, doxygen will accept # undocumented enumeration values. If EXTRACT_ALL is set to YES then this flag # will automatically be disabled. # The default value is: NO. WARN_IF_UNDOC_ENUM_VAL = NO # If the WARN_AS_ERROR tag is set to YES then doxygen will immediately stop when # a warning is encountered. If the WARN_AS_ERROR tag is set to FAIL_ON_WARNINGS # then doxygen will continue running as if WARN_AS_ERROR tag is set to NO, but # at the end of the doxygen process doxygen will return with a non-zero status. # If the WARN_AS_ERROR tag is set to FAIL_ON_WARNINGS_PRINT then doxygen behaves # like FAIL_ON_WARNINGS but in case no WARN_LOGFILE is defined doxygen will not # write the warning messages in between other messages but write them at the end # of a run, in case a WARN_LOGFILE is defined the warning messages will be # besides being in the defined file also be shown at the end of a run, unless # the WARN_LOGFILE is defined as - i.e. standard output (stdout) in that case # the behavior will remain as with the setting FAIL_ON_WARNINGS. # Possible values are: NO, YES, FAIL_ON_WARNINGS and FAIL_ON_WARNINGS_PRINT. # The default value is: NO. WARN_AS_ERROR = NO # The WARN_FORMAT tag determines the format of the warning messages that doxygen # can produce. The string should contain the $file, $line, and $text tags, which # will be replaced by the file and line number from which the warning originated # and the warning text. Optionally the format may contain $version, which will # be replaced by the version of the file (if it could be obtained via # FILE_VERSION_FILTER) # See also: WARN_LINE_FORMAT # The default value is: $file:$line: $text. WARN_FORMAT = "$file:$line: $text" # In the $text part of the WARN_FORMAT command it is possible that a reference # to a more specific place is given. To make it easier to jump to this place # (outside of doxygen) the user can define a custom "cut" / "paste" string. # Example: # WARN_LINE_FORMAT = "'vi $file +$line'" # See also: WARN_FORMAT # The default value is: at line $line of file $file. WARN_LINE_FORMAT = "at line $line of file $file" # The WARN_LOGFILE tag can be used to specify a file to which warning and error # messages should be written. If left blank the output is written to standard # error (stderr). In case the file specified cannot be opened for writing the # warning and error messages are written to standard error. When as file - is # specified the warning and error messages are written to standard output # (stdout). WARN_LOGFILE = #--------------------------------------------------------------------------- # Configuration options related to the input files #--------------------------------------------------------------------------- # The INPUT tag is used to specify the files and/or directories that contain # documented source files. You may enter file names like myfile.cpp or # directories like /usr/src/myproject. Separate the files or directories with # spaces. See also FILE_PATTERNS and EXTENSION_MAPPING # Note: If this tag is empty the current directory is searched. INPUT = # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses # libiconv (or the iconv built into libc) for the transcoding. See the libiconv # documentation (see: # https://www.gnu.org/software/libiconv/) for the list of possible encodings. # See also: INPUT_FILE_ENCODING # The default value is: UTF-8. INPUT_ENCODING = UTF-8 # This tag can be used to specify the character encoding of the source files # that doxygen parses The INPUT_FILE_ENCODING tag can be used to specify # character encoding on a per file pattern basis. Doxygen will compare the file # name with each pattern and apply the encoding instead of the default # INPUT_ENCODING) if there is a match. The character encodings are a list of the # form: pattern=encoding (like *.php=ISO-8859-1). See cfg_input_encoding # "INPUT_ENCODING" for further information on supported encodings. INPUT_FILE_ENCODING = # If the value of the INPUT tag contains directories, you can use the # FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and # *.h) to filter out the source-files in the directories. # # Note that for custom extensions or not directly supported extensions you also # need to set EXTENSION_MAPPING for the extension otherwise the files are not # read by doxygen. # # Note the list of default checked file patterns might differ from the list of # default file extension mappings. # # If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cxxm, # *.cpp, *.cppm, *.ccm, *.c++, *.c++m, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, # *.idl, *.ddl, *.odl, *.h, *.hh, *.hxx, *.hpp, *.h++, *.ixx, *.l, *.cs, *.d, # *.php, *.php4, *.php5, *.phtml, *.inc, *.m, *.markdown, *.md, *.mm, *.dox (to # be provided as doxygen C comment), *.py, *.pyw, *.f90, *.f95, *.f03, *.f08, # *.f18, *.f, *.for, *.vhd, *.vhdl, *.ucf, *.qsf and *.ice. FILE_PATTERNS = *.c \ *.cc \ *.cxx \ *.cxxm \ *.cpp \ *.cppm \ *.ccm \ *.c++ \ *.c++m \ *.java \ *.ii \ *.ixx \ *.ipp \ *.i++ \ *.inl \ *.idl \ *.ddl \ *.odl \ *.h \ *.hh \ *.hxx \ *.hpp \ *.h++ \ *.ixx \ *.l \ *.cs \ *.d \ *.php \ *.php4 \ *.php5 \ *.phtml \ *.inc \ *.m \ *.markdown \ *.md \ *.mm \ *.dox \ *.py \ *.pyw \ *.f90 \ *.f95 \ *.f03 \ *.f08 \ *.f18 \ *.f \ *.for \ *.vhd \ *.vhdl \ *.ucf \ *.qsf \ *.ice # The RECURSIVE tag can be used to specify whether or not subdirectories should # be searched for input files as well. # The default value is: NO. RECURSIVE = NO # The EXCLUDE tag can be used to specify files and/or directories that should be # excluded from the INPUT source files. This way you can easily exclude a # subdirectory from a directory tree whose root is specified with the INPUT tag. # # Note that relative paths are relative to the directory from which doxygen is # run. EXCLUDE = # The EXCLUDE_SYMLINKS tag can be used to select whether or not files or # directories that are symbolic links (a Unix file system feature) are excluded # from the input. # The default value is: NO. EXCLUDE_SYMLINKS = NO # If the value of the INPUT tag contains directories, you can use the # EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude # certain files from those directories. # # Note that the wildcards are matched against the file with absolute path, so to # exclude all test directories for example use the pattern */test/* EXCLUDE_PATTERNS = # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names # (namespaces, classes, functions, etc.) that should be excluded from the # output. The symbol name can be a fully qualified name, a word, or if the # wildcard * is used, a substring. Examples: ANamespace, AClass, # ANamespace::AClass, ANamespace::*Test EXCLUDE_SYMBOLS = # The EXAMPLE_PATH tag can be used to specify one or more files or directories # that contain example code fragments that are included (see the \include # command). EXAMPLE_PATH = # If the value of the EXAMPLE_PATH tag contains directories, you can use the # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and # *.h) to filter out the source-files in the directories. If left blank all # files are included. EXAMPLE_PATTERNS = * # If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be # searched for input files to be used with the \include or \dontinclude commands # irrespective of the value of the RECURSIVE tag. # The default value is: NO. EXAMPLE_RECURSIVE = NO # The IMAGE_PATH tag can be used to specify one or more files or directories # that contain images that are to be included in the documentation (see the # \image command). IMAGE_PATH = # The INPUT_FILTER tag can be used to specify a program that doxygen should # invoke to filter for each input file. Doxygen will invoke the filter program # by executing (via popen()) the command: # # # # where is the value of the INPUT_FILTER tag, and is the # name of an input file. Doxygen will then use the output that the filter # program writes to standard output. If FILTER_PATTERNS is specified, this tag # will be ignored. # # Note that the filter must not add or remove lines; it is applied before the # code is scanned, but not when the output code is generated. If lines are added # or removed, the anchors will not be placed correctly. # # Note that doxygen will use the data processed and written to standard output # for further processing, therefore nothing else, like debug statements or used # commands (so in case of a Windows batch file always use @echo OFF), should be # written to standard output. # # Note that for custom extensions or not directly supported extensions you also # need to set EXTENSION_MAPPING for the extension otherwise the files are not # properly processed by doxygen. INPUT_FILTER = # The FILTER_PATTERNS tag can be used to specify filters on a per file pattern # basis. Doxygen will compare the file name with each pattern and apply the # filter if there is a match. The filters are a list of the form: pattern=filter # (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how # filters are used. If the FILTER_PATTERNS tag is empty or if none of the # patterns match the file name, INPUT_FILTER is applied. # # Note that for custom extensions or not directly supported extensions you also # need to set EXTENSION_MAPPING for the extension otherwise the files are not # properly processed by doxygen. FILTER_PATTERNS = # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using # INPUT_FILTER) will also be used to filter the input files that are used for # producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). # The default value is: NO. FILTER_SOURCE_FILES = NO # The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file # pattern. A pattern will override the setting for FILTER_PATTERN (if any) and # it is also possible to disable source filtering for a specific pattern using # *.ext= (so without naming a filter). # This tag requires that the tag FILTER_SOURCE_FILES is set to YES. FILTER_SOURCE_PATTERNS = # If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that # is part of the input, its contents will be placed on the main page # (index.html). This can be useful if you have a project on for instance GitHub # and want to reuse the introduction page also for the doxygen output. USE_MDFILE_AS_MAINPAGE = # The Fortran standard specifies that for fixed formatted Fortran code all # characters from position 72 are to be considered as comment. A common # extension is to allow longer lines before the automatic comment starts. The # setting FORTRAN_COMMENT_AFTER will also make it possible that longer lines can # be processed before the automatic comment starts. # Minimum value: 7, maximum value: 10000, default value: 72. FORTRAN_COMMENT_AFTER = 72 #--------------------------------------------------------------------------- # Configuration options related to source browsing #--------------------------------------------------------------------------- # If the SOURCE_BROWSER tag is set to YES then a list of source files will be # generated. Documented entities will be cross-referenced with these sources. # # Note: To get rid of all source code in the generated output, make sure that # also VERBATIM_HEADERS is set to NO. # The default value is: NO. SOURCE_BROWSER = NO # Setting the INLINE_SOURCES tag to YES will include the body of functions, # multi-line macros, enums or list initialized variables directly into the # documentation. # The default value is: NO. INLINE_SOURCES = NO # Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any # special comment blocks from generated source code fragments. Normal C, C++ and # Fortran comments will always remain visible. # The default value is: YES. STRIP_CODE_COMMENTS = YES # If the REFERENCED_BY_RELATION tag is set to YES then for each documented # entity all documented functions referencing it will be listed. # The default value is: NO. REFERENCED_BY_RELATION = NO # If the REFERENCES_RELATION tag is set to YES then for each documented function # all documented entities called/used by that function will be listed. # The default value is: NO. REFERENCES_RELATION = NO # If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set # to YES then the hyperlinks from functions in REFERENCES_RELATION and # REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will # link to the documentation. # The default value is: YES. REFERENCES_LINK_SOURCE = YES # If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the # source code will show a tooltip with additional information such as prototype, # brief description and links to the definition and documentation. Since this # will make the HTML file larger and loading of large files a bit slower, you # can opt to disable this feature. # The default value is: YES. # This tag requires that the tag SOURCE_BROWSER is set to YES. SOURCE_TOOLTIPS = YES # If the USE_HTAGS tag is set to YES then the references to source code will # point to the HTML generated by the htags(1) tool instead of doxygen built-in # source browser. The htags tool is part of GNU's global source tagging system # (see https://www.gnu.org/software/global/global.html). You will need version # 4.8.6 or higher. # # To use it do the following: # - Install the latest version of global # - Enable SOURCE_BROWSER and USE_HTAGS in the configuration file # - Make sure the INPUT points to the root of the source tree # - Run doxygen as normal # # Doxygen will invoke htags (and that will in turn invoke gtags), so these # tools must be available from the command line (i.e. in the search path). # # The result: instead of the source browser generated by doxygen, the links to # source code will now point to the output of htags. # The default value is: NO. # This tag requires that the tag SOURCE_BROWSER is set to YES. USE_HTAGS = NO # If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a # verbatim copy of the header file for each class for which an include is # specified. Set to NO to disable this. # See also: Section \class. # The default value is: YES. VERBATIM_HEADERS = YES # If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the # clang parser (see: # http://clang.llvm.org/) for more accurate parsing at the cost of reduced # performance. This can be particularly helpful with template rich C++ code for # which doxygen's built-in parser lacks the necessary type information. # Note: The availability of this option depends on whether or not doxygen was # generated with the -Duse_libclang=ON option for CMake. # The default value is: NO. CLANG_ASSISTED_PARSING = NO # If the CLANG_ASSISTED_PARSING tag is set to YES and the CLANG_ADD_INC_PATHS # tag is set to YES then doxygen will add the directory of each input to the # include path. # The default value is: YES. # This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES. CLANG_ADD_INC_PATHS = YES # If clang assisted parsing is enabled you can provide the compiler with command # line options that you would normally use when invoking the compiler. Note that # the include paths will already be set by doxygen for the files and directories # specified with INPUT and INCLUDE_PATH. # This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES. CLANG_OPTIONS = # If clang assisted parsing is enabled you can provide the clang parser with the # path to the directory containing a file called compile_commands.json. This # file is the compilation database (see: # http://clang.llvm.org/docs/HowToSetupToolingForLLVM.html) containing the # options used when the source files were built. This is equivalent to # specifying the -p option to a clang tool, such as clang-check. These options # will then be passed to the parser. Any options specified with CLANG_OPTIONS # will be added as well. # Note: The availability of this option depends on whether or not doxygen was # generated with the -Duse_libclang=ON option for CMake. CLANG_DATABASE_PATH = #--------------------------------------------------------------------------- # Configuration options related to the alphabetical class index #--------------------------------------------------------------------------- # If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all # compounds will be generated. Enable this if the project contains a lot of # classes, structs, unions or interfaces. # The default value is: YES. ALPHABETICAL_INDEX = YES # The IGNORE_PREFIX tag can be used to specify a prefix (or a list of prefixes) # that should be ignored while generating the index headers. The IGNORE_PREFIX # tag works for classes, function and member names. The entity will be placed in # the alphabetical list under the first letter of the entity name that remains # after removing the prefix. # This tag requires that the tag ALPHABETICAL_INDEX is set to YES. IGNORE_PREFIX = #--------------------------------------------------------------------------- # Configuration options related to the HTML output #--------------------------------------------------------------------------- # If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output # The default value is: YES. GENERATE_HTML = YES # The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a # relative path is entered the value of OUTPUT_DIRECTORY will be put in front of # it. # The default directory is: html. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_OUTPUT = html # The HTML_FILE_EXTENSION tag can be used to specify the file extension for each # generated HTML page (for example: .htm, .php, .asp). # The default value is: .html. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_FILE_EXTENSION = .html # The HTML_HEADER tag can be used to specify a user-defined HTML header file for # each generated HTML page. If the tag is left blank doxygen will generate a # standard header. # # To get valid HTML the header file that includes any scripts and style sheets # that doxygen needs, which is dependent on the configuration options used (e.g. # the setting GENERATE_TREEVIEW). It is highly recommended to start with a # default header using # doxygen -w html new_header.html new_footer.html new_stylesheet.css # YourConfigFile # and then modify the file new_header.html. See also section "Doxygen usage" # for information on how to generate the default header that doxygen normally # uses. # Note: The header is subject to change so you typically have to regenerate the # default header when upgrading to a newer version of doxygen. For a description # of the possible markers and block names see the documentation. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_HEADER = # The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each # generated HTML page. If the tag is left blank doxygen will generate a standard # footer. See HTML_HEADER for more information on how to generate a default # footer and what special commands can be used inside the footer. See also # section "Doxygen usage" for information on how to generate the default footer # that doxygen normally uses. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_FOOTER = # The HTML_STYLESHEET tag can be used to specify a user-defined cascading style # sheet that is used by each HTML page. It can be used to fine-tune the look of # the HTML output. If left blank doxygen will generate a default style sheet. # See also section "Doxygen usage" for information on how to generate the style # sheet that doxygen normally uses. # Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as # it is more robust and this tag (HTML_STYLESHEET) will in the future become # obsolete. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_STYLESHEET = # The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined # cascading style sheets that are included after the standard style sheets # created by doxygen. Using this option one can overrule certain style aspects. # This is preferred over using HTML_STYLESHEET since it does not replace the # standard style sheet and is therefore more robust against future updates. # Doxygen will copy the style sheet files to the output directory. # Note: The order of the extra style sheet files is of importance (e.g. the last # style sheet in the list overrules the setting of the previous ones in the # list). # Note: Since the styling of scrollbars can currently not be overruled in # Webkit/Chromium, the styling will be left out of the default doxygen.css if # one or more extra stylesheets have been specified. So if scrollbar # customization is desired it has to be added explicitly. For an example see the # documentation. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_EXTRA_STYLESHEET = # The HTML_EXTRA_FILES tag can be used to specify one or more extra images or # other source files which should be copied to the HTML output directory. Note # that these files will be copied to the base HTML output directory. Use the # $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these # files. In the HTML_STYLESHEET file, use the file name only. Also note that the # files will be copied as-is; there are no commands or markers available. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_EXTRA_FILES = # The HTML_COLORSTYLE tag can be used to specify if the generated HTML output # should be rendered with a dark or light theme. # Possible values are: LIGHT always generate light mode output, DARK always # generate dark mode output, AUTO_LIGHT automatically set the mode according to # the user preference, use light mode if no preference is set (the default), # AUTO_DARK automatically set the mode according to the user preference, use # dark mode if no preference is set and TOGGLE allow to user to switch between # light and dark mode via a button. # The default value is: AUTO_LIGHT. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_COLORSTYLE = AUTO_LIGHT # The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen # will adjust the colors in the style sheet and background images according to # this color. Hue is specified as an angle on a color-wheel, see # https://en.wikipedia.org/wiki/Hue for more information. For instance the value # 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 # purple, and 360 is red again. # Minimum value: 0, maximum value: 359, default value: 220. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_COLORSTYLE_HUE = 220 # The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors # in the HTML output. For a value of 0 the output will use gray-scales only. A # value of 255 will produce the most vivid colors. # Minimum value: 0, maximum value: 255, default value: 100. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_COLORSTYLE_SAT = 100 # The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the # luminance component of the colors in the HTML output. Values below 100 # gradually make the output lighter, whereas values above 100 make the output # darker. The value divided by 100 is the actual gamma applied, so 80 represents # a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not # change the gamma. # Minimum value: 40, maximum value: 240, default value: 80. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_COLORSTYLE_GAMMA = 80 # If the HTML_DYNAMIC_MENUS tag is set to YES then the generated HTML # documentation will contain a main index with vertical navigation menus that # are dynamically created via JavaScript. If disabled, the navigation index will # consists of multiple levels of tabs that are statically embedded in every HTML # page. Disable this option to support browsers that do not have JavaScript, # like the Qt help browser. # The default value is: YES. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_DYNAMIC_MENUS = YES # If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML # documentation will contain sections that can be hidden and shown after the # page has loaded. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_DYNAMIC_SECTIONS = NO # If the HTML_CODE_FOLDING tag is set to YES then classes and functions can be # dynamically folded and expanded in the generated HTML source code. # The default value is: YES. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_CODE_FOLDING = YES # If the HTML_COPY_CLIPBOARD tag is set to YES then doxygen will show an icon in # the top right corner of code and text fragments that allows the user to copy # its content to the clipboard. Note this only works if supported by the browser # and the web page is served via a secure context (see: # https://www.w3.org/TR/secure-contexts/), i.e. using the https: or file: # protocol. # The default value is: YES. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_COPY_CLIPBOARD = YES # Doxygen stores a couple of settings persistently in the browser (via e.g. # cookies). By default these settings apply to all HTML pages generated by # doxygen across all projects. The HTML_PROJECT_COOKIE tag can be used to store # the settings under a project specific key, such that the user preferences will # be stored separately. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_PROJECT_COOKIE = # With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries # shown in the various tree structured indices initially; the user can expand # and collapse entries dynamically later on. Doxygen will expand the tree to # such a level that at most the specified number of entries are visible (unless # a fully collapsed tree already exceeds this amount). So setting the number of # entries 1 will produce a full collapsed tree by default. 0 is a special value # representing an infinite number of entries and will result in a full expanded # tree by default. # Minimum value: 0, maximum value: 9999, default value: 100. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_INDEX_NUM_ENTRIES = 100 # If the GENERATE_DOCSET tag is set to YES, additional index files will be # generated that can be used as input for Apple's Xcode 3 integrated development # environment (see: # https://developer.apple.com/xcode/), introduced with OSX 10.5 (Leopard). To # create a documentation set, doxygen will generate a Makefile in the HTML # output directory. Running make will produce the docset in that directory and # running make install will install the docset in # ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at # startup. See https://developer.apple.com/library/archive/featuredarticles/Doxy # genXcode/_index.html for more information. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_DOCSET = NO # This tag determines the name of the docset feed. A documentation feed provides # an umbrella under which multiple documentation sets from a single provider # (such as a company or product suite) can be grouped. # The default value is: Doxygen generated docs. # This tag requires that the tag GENERATE_DOCSET is set to YES. DOCSET_FEEDNAME = "Doxygen generated docs" # This tag determines the URL of the docset feed. A documentation feed provides # an umbrella under which multiple documentation sets from a single provider # (such as a company or product suite) can be grouped. # This tag requires that the tag GENERATE_DOCSET is set to YES. DOCSET_FEEDURL = # This tag specifies a string that should uniquely identify the documentation # set bundle. This should be a reverse domain-name style string, e.g. # com.mycompany.MyDocSet. Doxygen will append .docset to the name. # The default value is: org.doxygen.Project. # This tag requires that the tag GENERATE_DOCSET is set to YES. DOCSET_BUNDLE_ID = org.doxygen.Project # The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify # the documentation publisher. This should be a reverse domain-name style # string, e.g. com.mycompany.MyDocSet.documentation. # The default value is: org.doxygen.Publisher. # This tag requires that the tag GENERATE_DOCSET is set to YES. DOCSET_PUBLISHER_ID = org.doxygen.Publisher # The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. # The default value is: Publisher. # This tag requires that the tag GENERATE_DOCSET is set to YES. DOCSET_PUBLISHER_NAME = Publisher # If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three # additional HTML index files: index.hhp, index.hhc, and index.hhk. The # index.hhp is a project file that can be read by Microsoft's HTML Help Workshop # on Windows. In the beginning of 2021 Microsoft took the original page, with # a.o. the download links, offline the HTML help workshop was already many years # in maintenance mode). You can download the HTML help workshop from the web # archives at Installation executable (see: # http://web.archive.org/web/20160201063255/http://download.microsoft.com/downlo # ad/0/A/9/0A939EF6-E31C-430F-A3DF-DFAE7960D564/htmlhelp.exe). # # The HTML Help Workshop contains a compiler that can convert all HTML output # generated by doxygen into a single compiled HTML file (.chm). Compiled HTML # files are now used as the Windows 98 help format, and will replace the old # Windows help format (.hlp) on all Windows platforms in the future. Compressed # HTML files also contain an index, a table of contents, and you can search for # words in the documentation. The HTML workshop also contains a viewer for # compressed HTML files. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_HTMLHELP = NO # The CHM_FILE tag can be used to specify the file name of the resulting .chm # file. You can add a path in front of the file if the result should not be # written to the html output directory. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. CHM_FILE = # The HHC_LOCATION tag can be used to specify the location (absolute path # including file name) of the HTML help compiler (hhc.exe). If non-empty, # doxygen will try to run the HTML help compiler on the generated index.hhp. # The file has to be specified with full path. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. HHC_LOCATION = # The GENERATE_CHI flag controls if a separate .chi index file is generated # (YES) or that it should be included in the main .chm file (NO). # The default value is: NO. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. GENERATE_CHI = NO # The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc) # and project file content. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. CHM_INDEX_ENCODING = # The BINARY_TOC flag controls whether a binary table of contents is generated # (YES) or a normal table of contents (NO) in the .chm file. Furthermore it # enables the Previous and Next buttons. # The default value is: NO. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. BINARY_TOC = NO # The TOC_EXPAND flag can be set to YES to add extra items for group members to # the table of contents of the HTML help documentation and to the tree view. # The default value is: NO. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. TOC_EXPAND = NO # The SITEMAP_URL tag is used to specify the full URL of the place where the # generated documentation will be placed on the server by the user during the # deployment of the documentation. The generated sitemap is called sitemap.xml # and placed on the directory specified by HTML_OUTPUT. In case no SITEMAP_URL # is specified no sitemap is generated. For information about the sitemap # protocol see https://www.sitemaps.org # This tag requires that the tag GENERATE_HTML is set to YES. SITEMAP_URL = # If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and # QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that # can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help # (.qch) of the generated HTML documentation. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_QHP = NO # If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify # the file name of the resulting .qch file. The path specified is relative to # the HTML output folder. # This tag requires that the tag GENERATE_QHP is set to YES. QCH_FILE = # The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help # Project output. For more information please see Qt Help Project / Namespace # (see: # https://doc.qt.io/archives/qt-4.8/qthelpproject.html#namespace). # The default value is: org.doxygen.Project. # This tag requires that the tag GENERATE_QHP is set to YES. QHP_NAMESPACE = org.doxygen.Project # The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt # Help Project output. For more information please see Qt Help Project / Virtual # Folders (see: # https://doc.qt.io/archives/qt-4.8/qthelpproject.html#virtual-folders). # The default value is: doc. # This tag requires that the tag GENERATE_QHP is set to YES. QHP_VIRTUAL_FOLDER = doc # If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom # filter to add. For more information please see Qt Help Project / Custom # Filters (see: # https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom-filters). # This tag requires that the tag GENERATE_QHP is set to YES. QHP_CUST_FILTER_NAME = # The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the # custom filter to add. For more information please see Qt Help Project / Custom # Filters (see: # https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom-filters). # This tag requires that the tag GENERATE_QHP is set to YES. QHP_CUST_FILTER_ATTRS = # The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this # project's filter section matches. Qt Help Project / Filter Attributes (see: # https://doc.qt.io/archives/qt-4.8/qthelpproject.html#filter-attributes). # This tag requires that the tag GENERATE_QHP is set to YES. QHP_SECT_FILTER_ATTRS = # The QHG_LOCATION tag can be used to specify the location (absolute path # including file name) of Qt's qhelpgenerator. If non-empty doxygen will try to # run qhelpgenerator on the generated .qhp file. # This tag requires that the tag GENERATE_QHP is set to YES. QHG_LOCATION = # If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be # generated, together with the HTML files, they form an Eclipse help plugin. To # install this plugin and make it available under the help contents menu in # Eclipse, the contents of the directory containing the HTML and XML files needs # to be copied into the plugins directory of eclipse. The name of the directory # within the plugins directory should be the same as the ECLIPSE_DOC_ID value. # After copying Eclipse needs to be restarted before the help appears. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_ECLIPSEHELP = NO # A unique identifier for the Eclipse help plugin. When installing the plugin # the directory name containing the HTML and XML files should also have this # name. Each documentation set should have its own identifier. # The default value is: org.doxygen.Project. # This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES. ECLIPSE_DOC_ID = org.doxygen.Project # If you want full control over the layout of the generated HTML pages it might # be necessary to disable the index and replace it with your own. The # DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top # of each HTML page. A value of NO enables the index and the value YES disables # it. Since the tabs in the index contain the same information as the navigation # tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. DISABLE_INDEX = NO # The GENERATE_TREEVIEW tag is used to specify whether a tree-like index # structure should be generated to display hierarchical information. If the tag # value is set to YES, a side panel will be generated containing a tree-like # index structure (just like the one that is generated for HTML Help). For this # to work a browser that supports JavaScript, DHTML, CSS and frames is required # (i.e. any modern browser). Windows users are probably better off using the # HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can # further fine tune the look of the index (see "Fine-tuning the output"). As an # example, the default style sheet generated by doxygen has an example that # shows how to put an image at the root of the tree instead of the PROJECT_NAME. # Since the tree basically has the same information as the tab index, you could # consider setting DISABLE_INDEX to YES when enabling this option. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_TREEVIEW = NO # When both GENERATE_TREEVIEW and DISABLE_INDEX are set to YES, then the # FULL_SIDEBAR option determines if the side bar is limited to only the treeview # area (value NO) or if it should extend to the full height of the window (value # YES). Setting this to YES gives a layout similar to # https://docs.readthedocs.io with more room for contents, but less room for the # project logo, title, and description. If either GENERATE_TREEVIEW or # DISABLE_INDEX is set to NO, this option has no effect. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. FULL_SIDEBAR = NO # The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that # doxygen will group on one line in the generated HTML documentation. # # Note that a value of 0 will completely suppress the enum values from appearing # in the overview section. # Minimum value: 0, maximum value: 20, default value: 4. # This tag requires that the tag GENERATE_HTML is set to YES. ENUM_VALUES_PER_LINE = 4 # If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used # to set the initial width (in pixels) of the frame in which the tree is shown. # Minimum value: 0, maximum value: 1500, default value: 250. # This tag requires that the tag GENERATE_HTML is set to YES. TREEVIEW_WIDTH = 250 # If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to # external symbols imported via tag files in a separate window. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. EXT_LINKS_IN_WINDOW = NO # If the OBFUSCATE_EMAILS tag is set to YES, doxygen will obfuscate email # addresses. # The default value is: YES. # This tag requires that the tag GENERATE_HTML is set to YES. OBFUSCATE_EMAILS = YES # If the HTML_FORMULA_FORMAT option is set to svg, doxygen will use the pdf2svg # tool (see https://github.com/dawbarton/pdf2svg) or inkscape (see # https://inkscape.org) to generate formulas as SVG images instead of PNGs for # the HTML output. These images will generally look nicer at scaled resolutions. # Possible values are: png (the default) and svg (looks nicer but requires the # pdf2svg or inkscape tool). # The default value is: png. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_FORMULA_FORMAT = png # Use this tag to change the font size of LaTeX formulas included as images in # the HTML documentation. When you change the font size after a successful # doxygen run you need to manually remove any form_*.png images from the HTML # output directory to force them to be regenerated. # Minimum value: 8, maximum value: 50, default value: 10. # This tag requires that the tag GENERATE_HTML is set to YES. FORMULA_FONTSIZE = 10 # The FORMULA_MACROFILE can contain LaTeX \newcommand and \renewcommand commands # to create new LaTeX commands to be used in formulas as building blocks. See # the section "Including formulas" for details. FORMULA_MACROFILE = # Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see # https://www.mathjax.org) which uses client side JavaScript for the rendering # instead of using pre-rendered bitmaps. Use this if you do not have LaTeX # installed or if you want to formulas look prettier in the HTML output. When # enabled you may also need to install MathJax separately and configure the path # to it using the MATHJAX_RELPATH option. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. USE_MATHJAX = NO # With MATHJAX_VERSION it is possible to specify the MathJax version to be used. # Note that the different versions of MathJax have different requirements with # regards to the different settings, so it is possible that also other MathJax # settings have to be changed when switching between the different MathJax # versions. # Possible values are: MathJax_2 and MathJax_3. # The default value is: MathJax_2. # This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_VERSION = MathJax_2 # When MathJax is enabled you can set the default output format to be used for # the MathJax output. For more details about the output format see MathJax # version 2 (see: # http://docs.mathjax.org/en/v2.7-latest/output.html) and MathJax version 3 # (see: # http://docs.mathjax.org/en/latest/web/components/output.html). # Possible values are: HTML-CSS (which is slower, but has the best # compatibility. This is the name for Mathjax version 2, for MathJax version 3 # this will be translated into chtml), NativeMML (i.e. MathML. Only supported # for NathJax 2. For MathJax version 3 chtml will be used instead.), chtml (This # is the name for Mathjax version 3, for MathJax version 2 this will be # translated into HTML-CSS) and SVG. # The default value is: HTML-CSS. # This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_FORMAT = HTML-CSS # When MathJax is enabled you need to specify the location relative to the HTML # output directory using the MATHJAX_RELPATH option. The destination directory # should contain the MathJax.js script. For instance, if the mathjax directory # is located at the same level as the HTML output directory, then # MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax # Content Delivery Network so you can quickly see the result without installing # MathJax. However, it is strongly recommended to install a local copy of # MathJax from https://www.mathjax.org before deployment. The default value is: # - in case of MathJax version 2: https://cdn.jsdelivr.net/npm/mathjax@2 # - in case of MathJax version 3: https://cdn.jsdelivr.net/npm/mathjax@3 # This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_RELPATH = # The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax # extension names that should be enabled during MathJax rendering. For example # for MathJax version 2 (see # https://docs.mathjax.org/en/v2.7-latest/tex.html#tex-and-latex-extensions): # MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols # For example for MathJax version 3 (see # http://docs.mathjax.org/en/latest/input/tex/extensions/index.html): # MATHJAX_EXTENSIONS = ams # This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_EXTENSIONS = # The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces # of code that will be used on startup of the MathJax code. See the MathJax site # (see: # http://docs.mathjax.org/en/v2.7-latest/output.html) for more details. For an # example see the documentation. # This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_CODEFILE = # When the SEARCHENGINE tag is enabled doxygen will generate a search box for # the HTML output. The underlying search engine uses javascript and DHTML and # should work on any modern browser. Note that when using HTML help # (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) # there is already a search function so this one should typically be disabled. # For large projects the javascript based search engine can be slow, then # enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to # search using the keyboard; to jump to the search box use + S # (what the is depends on the OS and browser, but it is typically # , /