Hide Systray on exit & Install DirectX Redistributable

This commit is contained in:
Paulchen Panther 2020-10-28 18:48:46 +01:00
parent f3dc25891d
commit 69eec61de8
3 changed files with 31 additions and 0 deletions

View File

@ -311,6 +311,28 @@ macro(DeployWindows TARGET)
)
endforeach()
# Download DirectX End-User Runtimes (June 2010)
set(url "https://download.microsoft.com/download/8/4/A/84A35BF1-DAFE-4AE8-82AF-AD2AE20B6B14/directx_Jun2010_redist.exe")
if(NOT EXISTS "${CMAKE_CURRENT_BINARY_DIR}/dx_redist.exe")
file(DOWNLOAD "${url}" "${CMAKE_CURRENT_BINARY_DIR}/dx_redist.exe"
STATUS result
)
# Check if the download is successful
list(GET result 0 result_code)
if(NOT result_code EQUAL 0)
list(GET result 1 reason)
message(FATAL_ERROR "Could not download DirectX End-User Runtimes: ${reason}")
endif()
endif()
# Copy DirectX End-User Runtimes to 'hyperion'
install(
FILES ${CMAKE_CURRENT_BINARY_DIR}/dx_redist.exe
DESTINATION "bin"
COMPONENT "Hyperion"
)
else()
# Run CMake after target was built
add_custom_command(

View File

@ -789,8 +789,15 @@ Section "-Core installation"
; Goto End
;End:
; Install Visual c++ Redistributable
ExecWait '"$INSTDIR\bin\vc_redist.x64.exe" /install /quiet'
; Install DirectX 9 Redistributable
ExecWait '"$INSTDIR\bin\dx_redist.exe" /q /t:"$INSTDIR\tmp"'
ExecWait '"$INSTDIR\tmp\DXSETUP.exe" /silent'
Delete '$INSTDIR\tmp\*.*'
RMDir '$INSTDIR\tmp'
SectionEnd
Section "-Add to path"

View File

@ -221,6 +221,8 @@ void SysTray::handleInstanceStateChange(InstanceState state, quint8 instance, co
connect(_trayIcon, SIGNAL(activated(QSystemTrayIcon::ActivationReason)),
this, SLOT(iconActivated(QSystemTrayIcon::ActivationReason)));
connect(quitAction, &QAction::triggered, _trayIcon, &QSystemTrayIcon::hide, Qt::DirectConnection);
connect(&_colorDlg, SIGNAL(currentColorChanged(const QColor&)), this, SLOT(setColor(const QColor &)));
QIcon icon(":/hyperion-icon-32px.png");
_trayIcon->setIcon(icon);