Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GLScope: Add optional Wallclock time display #324

Merged
merged 13 commits into from
Apr 28, 2024
Merged
29 changes: 20 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,9 @@ set(SACNVIEW_HEADER_PATHS
set(SACNVIEW_HEADERS
src/ui/mdimainwindow.h
src/sacn/securesacn.h
src/widgets/monitorspinbox.h
src/widgets/qpushbutton_rightclick.h
src/widgets/qspinbox_resizetocontent.h
src/ui/newversiondialog.h
src/ui/scopewindow.h
src/ui/universeview.h
src/sacn/sacnsynchronization.h
src/models/sacnsynclistmodel.h
Expand All @@ -78,7 +76,6 @@ set(SACNVIEW_HEADERS
src/sacn/sacnsender.h
src/ui/configureperchanpriodlg.h
src/widgets/gridwidget.h
src/widgets/scopewidget.h
src/ui/aboutdialog.h
src/sacn/sacneffectengine.h
src/models/sacnuniverselistmodel.h
Expand All @@ -102,13 +99,15 @@ set(SACNVIEW_HEADERS
src/ui/multiview.h
src/models/sacnsourcetablemodel.h
src/models/csvmodelexport.h
src/widgets/glscopewidget.h
src/widgets/steppedspinbox.h
)

set(SACNVIEW_SOURCES
sacnview.natvis
src/commandline.cpp
src/firewallcheck.cpp
src/ipc.cpp
src/main.cpp
src/preferences.cpp
src/models/sacnsynclistmodel.cpp
src/models/sacndiscoveredsourcelistmodel.cpp
Expand All @@ -133,7 +132,6 @@ set(SACNVIEW_SOURCES
src/ui/configureperchanpriodlg.cpp
src/ui/newversiondialog.cpp
src/ui/mdimainwindow.cpp
src/ui/scopewindow.cpp
src/ui/universeview.cpp
src/ui/nicselectdialog.cpp
src/ui/preferencesdialog.cpp
Expand All @@ -145,21 +143,24 @@ set(SACNVIEW_SOURCES
src/ui/bigdisplay.cpp
src/ui/addmultidialog.cpp
src/ui/multiview.cpp
src/widgets/monitorspinbox.cpp
src/ui/glscopewindow.cpp
src/widgets/qpushbutton_rightclick.cpp
src/widgets/qspinbox_resizetocontent.cpp
src/widgets/steppedspinbox.cpp
src/widgets/universedisplay.cpp
src/widgets/gridwidget.cpp
src/widgets/scopewidget.cpp
src/widgets/clssnapshot.cpp
src/widgets/grideditwidget.cpp
src/widgets/glscopewidget.cpp
src/models/sacnsourcetablemodel.cpp
src/models/csvmodelexport.cpp
)

# Prepend the path to all sources
LIST(TRANSFORM SACNVIEW_SOURCES PREPEND ${CMAKE_CURRENT_LIST_DIR}/)

set(SACNVIEW_FORMS
ui/mdimainwindow.ui
ui/scopewindow.ui
ui/universeview.ui
ui/nicselectdialog.ui
ui/preferencesdialog.ui
Expand Down Expand Up @@ -199,8 +200,18 @@ set(CMAKE_AUTORCC ON)
# Find Qt 5.15 or Qt 6
find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core)
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Core Gui Network Multimedia Widgets REQUIRED)
set(SACNVIEW_QT_LIBRARIES
Qt::Core Qt::Gui Qt::Network Qt::Multimedia Qt::Widgets
)

# Qt 6 moved some components
if (Qt6_FOUND)
find_package(Qt6 COMPONENTS OpenGLWidgets REQUIRED)
list(APPEND SACNVIEW_QT_LIBRARIES Qt::OpenGLWidgets)
endif()

add_executable(sACNView WIN32
src/main.cpp
${SACNVIEW_HEADERS}
${SACNVIEW_SOURCES}
${SACNVIEW_FORMS}
Expand All @@ -219,7 +230,7 @@ set_target_properties(sACNView PROPERTIES
)

# Link Qt libraries
target_link_libraries(sACNView PRIVATE Qt::Core Qt::Gui Qt::Network Qt::Multimedia Qt::Widgets)
target_link_libraries(sACNView PRIVATE ${SACNVIEW_QT_LIBRARIES})

# Link PCap/WinPCap libraries
target_link_libraries(sACNView PRIVATE ${PCAP_LIBS})
Expand Down
57 changes: 28 additions & 29 deletions install/win/install.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
; limitations under the License.

SetCompressor /SOLID lzma
RequestExecutionLevel admin

!define PRODUCT_NAME "sACNView"
!define PRODUCT_PUBLISHER "Tom Steer"
Expand Down Expand Up @@ -55,27 +56,17 @@ ShowUninstDetails show
InstallDir "$PROGRAMFILES\${PRODUCT_NAME}"
InstallDirRegKey ${INSTDIR_REG_ROOT} "${INSTDIR_REG_KEY}" "InstallDir"

; Create this file if you wish to sign the installer and uninstaller
; Example content (NSIS 3.08):
; !finalize 'C:\sign.bat "%1" "${PRODUCT_NAME} Installer" http://example.com' = 0
; !uninstfinalize 'C:\sign.bat "%1" "${PRODUCT_NAME} Installer" http://example.com' = 0

!include /NONFATAL ..\signing\sign_installer.nsh

!insertmacro INTERACTIVE_UNINSTALL

!insertmacro MUI_PAGE_WELCOME

; Check for Admin rights
Section CheckAdmin
DetailPrint "Checking Admin Rights"
System::Call "kernel32::GetModuleHandle(t 'shell32.dll') i .s"
System::Call "kernel32::GetProcAddress(i s, i 680) i .r0"
System::Call "::$0() i .r0"

IntCmp $0 0 isNotAdmin isNotAdmin isAdmin
isNotAdmin:
DetailPrint "Missing Administrator Rights !!!"
messageBox MB_OK "You do not have Administrator rights on this computer.$\r$\r\
Please log in as an administrator to install sACNView."
quit
isAdmin:
DetailPrint "Administrator Rights granted"
SectionEnd

!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!define MUI_FINISHPAGE_RUN $INSTDIR\${PRODUCT_NAME}.exe
Expand Down Expand Up @@ -121,7 +112,13 @@ Section "Main Application" sec01
;Same as create shortcut you need to use ${UNINST_EXE} instead of anything else.
WriteRegStr ${INSTDIR_REG_ROOT} "${INSTDIR_REG_KEY}" "UninstallString" "${UNINST_EXE}"

SimpleFC::AddApplication "sACNView" "$INSTDIR\sACNView.exe" 0 2 "" 1
DetailPrint "Adding Firewall Exception"
; rule_name, description, protocol, direction,
; status, profiles, action, application,
; service_name, icmp_types_and_codes, group, local_ports, remote_ports, local_address, remote_address
SimpleFC::AdvAddRule ${PRODUCT_NAME} "${PRODUCT_NAME} UDP Multicast Receive" "17" \
"1" "1" "2147483647" "1" "$INSTDIR\sACNView.exe" \
"" "" "@$INSTDIR\sACNView.exe,-10000" "" "" "" ""
Pop $0

IntCmp $0 0 fw_ok
Expand Down Expand Up @@ -158,21 +155,23 @@ FunctionEnd
#######################################################################################

Section UnInstall
;uninstall from path, must be repeated for every install logged path individual
!insertmacro UNINSTALL.LOG_UNINSTALL "$INSTDIR"

;begin uninstall, especially for MUI could be added in UN.onInit function instead
;!insertmacro UNINSTALL.LOG_BEGIN_UNINSTALL

;uninstall from path, must be repeated for every install logged path individual
!insertmacro UNINSTALL.LOG_UNINSTALL "$INSTDIR"
;end uninstall, after uninstall from all logged paths has been performed
!insertmacro UNINSTALL.LOG_END_UNINSTALL

;end uninstall, after uninstall from all logged paths has been performed
!insertmacro UNINSTALL.LOG_END_UNINSTALL
; Remove firewall exception
SimpleFC::AdvRemoveRule ${PRODUCT_NAME}

Delete "$SMPROGRAMS\${PRODUCT_NAME}\${PRODUCT_NAME}.lnk"
Delete "$SMPROGRAMS\${PRODUCT_NAME}\Uninstall.lnk"
RmDir "$SMPROGRAMS\${PRODUCT_NAME}"
DeleteRegValue ${INSTDIR_REG_ROOT} "${INSTDIR_REG_KEY}" "InstallDir"
DeleteRegValue ${INSTDIR_REG_ROOT} "${INSTDIR_REG_KEY}" "DisplayIcon"
DeleteRegValue ${INSTDIR_REG_ROOT} "${INSTDIR_REG_KEY}" "DisplayName"
DeleteRegValue ${INSTDIR_REG_ROOT} "${INSTDIR_REG_KEY}" "DisplayVersion"
DeleteRegValue ${INSTDIR_REG_ROOT} "${INSTDIR_REG_KEY}" "Publisher"
DeleteRegValue ${INSTDIR_REG_ROOT} "${INSTDIR_REG_KEY}" "UninstallString"

DeleteRegKey /ifempty ${INSTDIR_REG_ROOT} "${INSTDIR_REG_KEY}"
DeleteRegKey /ifempty ${INSTDIR_REG_ROOT} "${INSTDIR_REG_KEY}"

SectionEnd

Expand Down
66 changes: 33 additions & 33 deletions install/win64/install.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
Unicode true

SetCompressor /SOLID lzma
RequestExecutionLevel admin

!define PRODUCT_NAME "sACNView64"
!define PRODUCT_PUBLISHER "Tom Steer"
Expand Down Expand Up @@ -58,27 +59,17 @@ ShowUninstDetails show
InstallDir "$PROGRAMFILES64\${PRODUCT_NAME}"
InstallDirRegKey ${INSTDIR_REG_ROOT} "${INSTDIR_REG_KEY}" "InstallDir"

; Create this file if you wish to sign the installer and uninstaller
; Example content (NSIS 3.08):
; !finalize 'C:\sign.bat "%1" "${PRODUCT_NAME} Installer" http://example.com' = 0
; !uninstfinalize 'C:\sign.bat "%1" "${PRODUCT_NAME} Installer" http://example.com' = 0

!include /NONFATAL ..\signing\sign_installer.nsh

!insertmacro INTERACTIVE_UNINSTALL

!insertmacro MUI_PAGE_WELCOME

; Check for Admin rights
Section CheckAdmin
DetailPrint "Checking Admin Rights"
System::Call "kernel32::GetModuleHandle(t 'shell32.dll') i .s"
System::Call "kernel32::GetProcAddress(i s, i 680) i .r0"
System::Call "::$0() i .r0"

IntCmp $0 0 isNotAdmin isNotAdmin isAdmin
isNotAdmin:
DetailPrint "Missing Administrator Rights !!!"
messageBox MB_OK "You do not have Administrator rights on this computer.$\r$\r\
Please log in as an administrator to install sACNView."
quit
isAdmin:
DetailPrint "Administrator Rights granted"
SectionEnd

!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!define MUI_FINISHPAGE_RUN $INSTDIR\sACNView.exe
Expand Down Expand Up @@ -125,8 +116,13 @@ Section "Main Application" sec01
;Same as create shortcut you need to use ${UNINST_EXE} instead of anything else.
WriteRegStr ${INSTDIR_REG_ROOT} "${INSTDIR_REG_KEY}" "UninstallString" "${UNINST_EXE}"

; Add firewall exception
SimpleFC::AddApplication ${PRODUCT_NAME} "$INSTDIR\sACNView.exe" 0 2 "" 1
DetailPrint "Adding Firewall Exception"
; rule_name, description, protocol, direction,
; status, profiles, action, application,
; service_name, icmp_types_and_codes, group, local_ports, remote_ports, local_address, remote_address
SimpleFC::AdvAddRule ${PRODUCT_NAME} "${PRODUCT_NAME} UDP Multicast Receive" "17" \
"1" "1" "2147483647" "1" "$INSTDIR\sACNView.exe" \
"" "" "@$INSTDIR\sACNView.exe,-10000" "" "" "" ""
Pop $0

IntCmp $0 0 fw_ok
Expand Down Expand Up @@ -169,22 +165,26 @@ Section UnInstall
; Use the 64bit registry
SetRegView 64

;begin uninstall, especially for MUI could be added in UN.onInit function instead
;!insertmacro UNINSTALL.LOG_BEGIN_UNINSTALL
;uninstall from path, must be repeated for every install logged path individual
!insertmacro UNINSTALL.LOG_UNINSTALL "$INSTDIR"

;end uninstall, after uninstall from all logged paths has been performed
!insertmacro UNINSTALL.LOG_END_UNINSTALL

;uninstall from path, must be repeated for every install logged path individual
!insertmacro UNINSTALL.LOG_UNINSTALL "$INSTDIR"
Delete "$SMPROGRAMS\${PRODUCT_NAME}\${PRODUCT_NAME}.lnk"
RmDir "$SMPROGRAMS\${PRODUCT_NAME}"

;end uninstall, after uninstall from all logged paths has been performed
!insertmacro UNINSTALL.LOG_END_UNINSTALL
; Remove firewall exception
SimpleFC::AdvRemoveRule ${PRODUCT_NAME}

Delete "$SMPROGRAMS\${PRODUCT_NAME}\${PRODUCT_NAME}.lnk"
RmDir "$SMPROGRAMS\${PRODUCT_NAME}"

; Remove firewall exception
SimpleFC::RemoveApplication "$INSTDIR\sACNView.exe"
DeleteRegValue ${INSTDIR_REG_ROOT} "${INSTDIR_REG_KEY}" "InstallDir"
DeleteRegValue ${INSTDIR_REG_ROOT} "${INSTDIR_REG_KEY}" "DisplayIcon"
DeleteRegValue ${INSTDIR_REG_ROOT} "${INSTDIR_REG_KEY}" "DisplayName"
DeleteRegValue ${INSTDIR_REG_ROOT} "${INSTDIR_REG_KEY}" "DisplayVersion"
DeleteRegValue ${INSTDIR_REG_ROOT} "${INSTDIR_REG_KEY}" "Publisher"
DeleteRegValue ${INSTDIR_REG_ROOT} "${INSTDIR_REG_KEY}" "UninstallString"

DeleteRegKey /ifempty ${INSTDIR_REG_ROOT} "${INSTDIR_REG_KEY}"
DeleteRegKey /ifempty ${INSTDIR_REG_ROOT} "${INSTDIR_REG_KEY}"

SectionEnd

Expand All @@ -193,7 +193,7 @@ Function UN.onInit
; Use the 64bit registry
SetRegView 64

;begin uninstall, could be added on top of uninstall section instead
!insertmacro UNINSTALL.LOG_BEGIN_UNINSTALL
;begin uninstall, could be added on top of uninstall section instead
!insertmacro UNINSTALL.LOG_BEGIN_UNINSTALL

FunctionEnd
17 changes: 10 additions & 7 deletions sACNView.pro
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@

QT += core gui network multimedia widgets

greaterThan(QT_MAJOR_VERSION, 5) {
QT += openglwidgets
}

TARGET = sACNView
TEMPLATE = app
DESCRIPTION = $$shell_quote("A tool for sending and receiving the Streaming ACN control protocol")
Expand Down Expand Up @@ -89,12 +93,12 @@ INCLUDEPATH += src \

SOURCES += src/main.cpp\
src/sacn/securesacn.cpp \
src/widgets/monitorspinbox.cpp \
src/widgets/steppedspinbox.cpp \
src/widgets/qpushbutton_rightclick.cpp \
src/widgets/qspinbox_resizetocontent.cpp \
src/ui/newversiondialog.cpp \
src/ui/mdimainwindow.cpp \
src/ui/scopewindow.cpp \
src/ui/glscopewindow.cpp \
src/ui/universeview.cpp \
src/ui/multiview.cpp \
src/sacn/sacnsynchronization.cpp \
Expand All @@ -114,7 +118,7 @@ SOURCES += src/main.cpp\
src/sacn/sacnsender.cpp \
src/ui/configureperchanpriodlg.cpp \
src/widgets/gridwidget.cpp \
src/widgets/scopewidget.cpp \
src/widgets/glscopewidget.cpp \
src/ui/aboutdialog.cpp \
src/sacn/sacneffectengine.cpp \
src/models/sacnuniverselistmodel.cpp \
Expand All @@ -138,11 +142,11 @@ SOURCES += src/main.cpp\

HEADERS += src/ui/mdimainwindow.h \
src/sacn/securesacn.h \
src/widgets/monitorspinbox.h \
src/widgets/steppedspinbox.h \
src/widgets/qpushbutton_rightclick.h \
src/widgets/qspinbox_resizetocontent.h \
src/ui/newversiondialog.h \
src/ui/scopewindow.h \
src/ui/glscopewindow.h \
src/ui/universeview.h \
src/ui/multiview.h \
src/sacn/sacnsynchronization.h \
Expand All @@ -164,7 +168,7 @@ HEADERS += src/ui/mdimainwindow.h \
src/sacn/sacnsender.h \
src/ui/configureperchanpriodlg.h \
src/widgets/gridwidget.h \
src/widgets/scopewidget.h \
src/widgets/glscopewidget.h \
src/ui/aboutdialog.h \
src/sacn/sacneffectengine.h \
src/models/sacnuniverselistmodel.h \
Expand All @@ -189,7 +193,6 @@ HEADERS += src/ui/mdimainwindow.h \
src/widgets/grideditwidget.h

FORMS += ui/mdimainwindow.ui \
ui/scopewindow.ui \
ui/universeview.ui \
ui/multiview.ui \
ui/nicselectdialog.ui \
Expand Down
12 changes: 12 additions & 0 deletions sacnview.natvis
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
<Type Name="CID">
<DisplayString>{{{(m_cid[0]),nvoXb}{(m_cid[1]),nvoXb}{(m_cid[2]),nvoXb}{(m_cid[3]),nvoXb}-{(m_cid[4]),nvoXb}{(m_cid[5]),nvoXb}-{(m_cid[6]),nvoXb}{(m_cid[7]),nvoXb}-{(m_cid[8]),nvoXb}{(m_cid[9]),nvoXb}-{(m_cid[10]),nvoXb}{(m_cid[11]),nvoXb}{(m_cid[12]),nvoXb}{(m_cid[13]),nvoXb}{(m_cid[14]),nvoXb}{(m_cid[15]),nvoXb}}}</DisplayString>
</Type>
<Type Name="DCID">
<DisplayString>{m_cid}</DisplayString>
</Type>
<Type Name="QHostAddress">
<DisplayString>{{ IPv4Addr = {(((uint32_t*)d.d)[8]>>24)&amp;0xff,d}.{(((uint32_t*)d.d)[8]>>16)&amp;0xff,d}.{(((uint32_t*)d.d)[8]>>8)&amp;0xff,d}.{(((uint32_t*)d.d)[8]>>0)&amp;0xff,d} }}</DisplayString>
</Type>
</AutoVisualizer>
Loading
Loading