diff --git a/.travis.yml b/.travis.yml index cba3ca5a..ac554314 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,13 +2,13 @@ language: cpp matrix: include: - os: linux - dist: trusty + dist: xenial sudo: required compiler: gcc addons: apt: sources: - - sourceline: 'ppa:beineri/opt-qt594-trusty' + - sourceline: 'ppa:beineri/opt-qt-5.12.3-xenial' - sourceline: 'ppa:brightbox/ruby-ng' packages: # FPM dependencies @@ -16,9 +16,11 @@ matrix: - ruby2.3 - ruby2.3-dev # QT - - qt59base - - qt59multimedia - - qt59tools + - qt512base + - qt512multimedia + - qt512tools + - mesa-common-dev + - libgl1-mesa-dev # PCap - libpcap-dev @@ -38,14 +40,18 @@ matrix: - echo "Uploading $BASENAME to file.io..." && curl -sF "file=@$FILE" https://file.io | xargs printf "$BASENAME uploaded - %s\n" - os: osx - osx_image: xcode8.3 + osx_image: xcode9.4 before_install: + - chmod +x install/mac/sign-mac-executable.sh + - ./install/mac/sign-mac-executable.sh - brew update install: # PCap - brew install libpcap - # QT - - brew install qt + # QT 5.12.3 + - git -C "$(brew --repo homebrew/core)" pull --unshallow + - git -C "$(brew --repo homebrew/core)" checkout -b qt5.12.3 65a45a9e61f15046a256cdba6a008f38f79570c9 + - HOMEBREW_NO_AUTO_UPDATE=1 brew install qt - brew link --force qt script: - qmake diff --git a/appveyor.yml b/appveyor.yml index ad5f4813..26b28103 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -11,17 +11,20 @@ # Start builds on tags only #skip_non_tags: true -# Build worker image (VM template) -image: Visual Studio 2015 - #---------------------------------# # build configuration # #---------------------------------# environment: matrix: - - QT_Ver: 5.9 - - QT_Ver: 5.6 + - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 + QT_Ver: 5.6 + MSVC_Compiler: msvc2015 + MSVC_Name: Microsoft Visual Studio 14.0 + - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 + QT_Ver: 5.12 + MSVC_Compiler: msvc2017 + MSVC_Name: Microsoft Visual Studio 14.0 # build platform, i.e. x86, x64, Any CPU. This setting is optional. platform: x86 @@ -44,11 +47,11 @@ install: # MSVC Paths # https://www.appveyor.com/docs/lang/cpp/#visual-studio - - call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86 + - call "C:\Program Files (x86)\%MSVC_Name%\VC\vcvarsall.bat" x86 # QT Paths # https://www.appveyor.com/docs/build-environment/#qt - - set QTDIR=C:\Qt\%QT_Ver%\msvc2015 + - set QTDIR=C:\Qt\%QT_Ver%\%MSVC_Compiler% - set PATH=%PATH%;%QTDIR%\bin # NSIS Paths diff --git a/deploy.pri b/deploy.pri index 5316172d..a962f689 100644 --- a/deploy.pri +++ b/deploy.pri @@ -46,7 +46,8 @@ macx { DEPLOY_COMMAND = macdeployqt - DEPLOY_CLEANUP = $${QMAKE_DEL_FILE} $${DEPLOY_DIR}/sACNView*.dmg + DEPLOY_CLEANUP = codesign --force --deep --verify --verbose --sign \"Thomas Steer\" $${DEPLOY_TARGET} $$escape_expand(\\n\\t) + DEPLOY_CLEANUP += $${QMAKE_DEL_FILE} $${DEPLOY_DIR}/sACNView*.dmg DEPLOY_INSTALLER = $${_PRO_FILE_PWD_}/install/mac/create-dmg --volname "sACNView_Installer" --volicon "$${_PRO_FILE_PWD_}/res/icon.icns" DEPLOY_INSTALLER += --background "$${_PRO_FILE_PWD_}/res/mac_install_bg.png" --window-pos 200 120 --window-size 800 400 --icon-size 100 --icon $${TARGET}$${TARGET_CUSTOM_EXT} 200 190 --hide-extension $${TARGET}$${TARGET_CUSTOM_EXT} --app-drop-link 600 185 diff --git a/docs/index.md b/docs/index.md index a2e764ba..56f6dace 100644 --- a/docs/index.md +++ b/docs/index.md @@ -10,7 +10,7 @@ Use the buttons at the top of this page to download and install the program for # Supported Platforms * Windows 7 or newer * Windows XP (separate build) -* MacOS 10.10 or newer +* MacOS 10.13.4 (High Sierra) or newer * Linux (Debian based e.g. Ubuntu) # How to Use diff --git a/install/mac/sign-mac-executable.sh b/install/mac/sign-mac-executable.sh new file mode 100644 index 00000000..f4dfca9a --- /dev/null +++ b/install/mac/sign-mac-executable.sh @@ -0,0 +1,37 @@ +#!/usr/bin/env sh +# Adapted from https://www.update.rocks/blog/osx-signing-with-travis/ +# Uses a base64 encoded certificate in an environment variable to set up signing +# Exits if the variable isn't set + +KEY_CHAIN=buildtest2.keychain +CERTIFICATE_P12=certificate.p12 + +# Check for the variable +if [ -z ${CERTIFICATE_OSX_P12+x} ]; then + echo "No macos signing setup - output will be unsigned" + exit +else + echo "macos signing is setup - output will be signed" +fi + +# Recreate the certificate from the secure environment variable +echo $CERTIFICATE_OSX_P12 | base64 --decode > $CERTIFICATE_P12 + +#create a keychain +security create-keychain -p travis $KEY_CHAIN + +# Make the keychain the default so identities are found +security default-keychain -s $KEY_CHAIN + +# Unlock the keychain +security unlock-keychain -p travis $KEY_CHAIN + +# Set keychain locking timeout to 1 hour +security set-keychain-settings -t 3600 -u $KEY_CHAIN + +security import $CERTIFICATE_P12 -k $KEY_CHAIN -P $CERTIFICATE_PASSWORD -T /usr/bin/codesign; + +security set-key-partition-list -S apple-tool:,apple: -s -k travis $KEY_CHAIN + +# remove certs +rm -fr *.p12 diff --git a/install/win/install.nsi b/install/win/install.nsi index c11d1c7a..b7ceb816 100644 --- a/install/win/install.nsi +++ b/install/win/install.nsi @@ -47,7 +47,12 @@ SetCompressor /SOLID lzma !define MSVC_OPT "/install /passive /norestart" Name "${PRODUCT_NAME}" -OutFile "${PRODUCT_NAME}_${PRODUCT_VERSION}.exe" +!if ${TARGET_WINXP} + !define OUTFILE "${PRODUCT_NAME}_${PRODUCT_VERSION}-WinXP.exe" +!else + !define OUTFILE "${PRODUCT_NAME}_${PRODUCT_VERSION}.exe" +!endif +OutFile ${OUTFILE} ShowInstDetails show ShowUninstDetails show InstallDir "$PROGRAMFILES\${PRODUCT_NAME}" diff --git a/libs.pri b/libs.pri index 30ba5070..25fb96bc 100644 --- a/libs.pri +++ b/libs.pri @@ -109,9 +109,12 @@ win32 { equals(QT_MAJOR_VERSION, 5):equals(QT_MINOR_VERSION, 11) { #https://wiki.qt.io/Qt_5.11_Tools_and_Versions OPENSSL_VERS = 1.0.2j } + equals(QT_MAJOR_VERSION, 5):equals(QT_MINOR_VERSION, 12) { #https://wiki.qt.io/Qt_5.12_Tools_and_Versions + OPENSSL_VERS = 1.1.1b + } contains(QT_ARCH, i386) { - OPENSSL_PATH = $${_PRO_FILE_PWD_}/libs/openssl-$${OPENSSL_VERS}-i386-win32 + OPENSSL_PATH = $${_PRO_FILE_PWD_}/libs/openssl-$${OPENSSL_VERS}-win32 } else { - OPENSSL_PATH = $${_PRO_FILE_PWD_}/libs/openssl-$${OPENSSL_VERS}-x64_86-win64 + OPENSSL_PATH = $${_PRO_FILE_PWD_}/libs/openssl-$${OPENSSL_VERS}-win64 } } diff --git a/libs/openssl-1.0.2g-i386-win32/HashInfo.txt b/libs/openssl-1.0.2g-win32/HashInfo.txt similarity index 100% rename from libs/openssl-1.0.2g-i386-win32/HashInfo.txt rename to libs/openssl-1.0.2g-win32/HashInfo.txt diff --git a/libs/openssl-1.0.2g-i386-win32/OpenSSL License.txt b/libs/openssl-1.0.2g-win32/OpenSSL License.txt similarity index 100% rename from libs/openssl-1.0.2g-i386-win32/OpenSSL License.txt rename to libs/openssl-1.0.2g-win32/OpenSSL License.txt diff --git a/libs/openssl-1.0.2g-i386-win32/ReadMe.txt b/libs/openssl-1.0.2g-win32/ReadMe.txt similarity index 100% rename from libs/openssl-1.0.2g-i386-win32/ReadMe.txt rename to libs/openssl-1.0.2g-win32/ReadMe.txt diff --git a/libs/openssl-1.0.2g-i386-win32/libeay32.dll b/libs/openssl-1.0.2g-win32/libeay32.dll similarity index 100% rename from libs/openssl-1.0.2g-i386-win32/libeay32.dll rename to libs/openssl-1.0.2g-win32/libeay32.dll diff --git a/libs/openssl-1.0.2g-i386-win32/ssleay32.dll b/libs/openssl-1.0.2g-win32/ssleay32.dll similarity index 100% rename from libs/openssl-1.0.2g-i386-win32/ssleay32.dll rename to libs/openssl-1.0.2g-win32/ssleay32.dll diff --git a/libs/openssl-1.0.2g-x64_86-win64/HashInfo.txt b/libs/openssl-1.0.2g-win64/HashInfo.txt similarity index 100% rename from libs/openssl-1.0.2g-x64_86-win64/HashInfo.txt rename to libs/openssl-1.0.2g-win64/HashInfo.txt diff --git a/libs/openssl-1.0.2g-x64_86-win64/OpenSSL License.txt b/libs/openssl-1.0.2g-win64/OpenSSL License.txt similarity index 100% rename from libs/openssl-1.0.2g-x64_86-win64/OpenSSL License.txt rename to libs/openssl-1.0.2g-win64/OpenSSL License.txt diff --git a/libs/openssl-1.0.2g-x64_86-win64/ReadMe.txt b/libs/openssl-1.0.2g-win64/ReadMe.txt similarity index 100% rename from libs/openssl-1.0.2g-x64_86-win64/ReadMe.txt rename to libs/openssl-1.0.2g-win64/ReadMe.txt diff --git a/libs/openssl-1.0.2g-x64_86-win64/libeay32.dll b/libs/openssl-1.0.2g-win64/libeay32.dll similarity index 100% rename from libs/openssl-1.0.2g-x64_86-win64/libeay32.dll rename to libs/openssl-1.0.2g-win64/libeay32.dll diff --git a/libs/openssl-1.0.2g-x64_86-win64/ssleay32.dll b/libs/openssl-1.0.2g-win64/ssleay32.dll similarity index 100% rename from libs/openssl-1.0.2g-x64_86-win64/ssleay32.dll rename to libs/openssl-1.0.2g-win64/ssleay32.dll diff --git a/libs/openssl-1.0.2j-i386-win32/HashInfo.txt b/libs/openssl-1.0.2j-win32/HashInfo.txt similarity index 100% rename from libs/openssl-1.0.2j-i386-win32/HashInfo.txt rename to libs/openssl-1.0.2j-win32/HashInfo.txt diff --git a/libs/openssl-1.0.2j-i386-win32/OpenSSL License.txt b/libs/openssl-1.0.2j-win32/OpenSSL License.txt similarity index 100% rename from libs/openssl-1.0.2j-i386-win32/OpenSSL License.txt rename to libs/openssl-1.0.2j-win32/OpenSSL License.txt diff --git a/libs/openssl-1.0.2j-i386-win32/ReadMe.txt b/libs/openssl-1.0.2j-win32/ReadMe.txt similarity index 100% rename from libs/openssl-1.0.2j-i386-win32/ReadMe.txt rename to libs/openssl-1.0.2j-win32/ReadMe.txt diff --git a/libs/openssl-1.0.2j-i386-win32/libeay32.dll b/libs/openssl-1.0.2j-win32/libeay32.dll similarity index 100% rename from libs/openssl-1.0.2j-i386-win32/libeay32.dll rename to libs/openssl-1.0.2j-win32/libeay32.dll diff --git a/libs/openssl-1.0.2j-i386-win32/ssleay32.dll b/libs/openssl-1.0.2j-win32/ssleay32.dll similarity index 100% rename from libs/openssl-1.0.2j-i386-win32/ssleay32.dll rename to libs/openssl-1.0.2j-win32/ssleay32.dll diff --git a/libs/openssl-1.0.2j-x64_86-win64/HashInfo.txt b/libs/openssl-1.0.2j-win64/HashInfo.txt similarity index 100% rename from libs/openssl-1.0.2j-x64_86-win64/HashInfo.txt rename to libs/openssl-1.0.2j-win64/HashInfo.txt diff --git a/libs/openssl-1.0.2j-x64_86-win64/OpenSSL License.txt b/libs/openssl-1.0.2j-win64/OpenSSL License.txt similarity index 100% rename from libs/openssl-1.0.2j-x64_86-win64/OpenSSL License.txt rename to libs/openssl-1.0.2j-win64/OpenSSL License.txt diff --git a/libs/openssl-1.0.2j-x64_86-win64/ReadMe.txt b/libs/openssl-1.0.2j-win64/ReadMe.txt similarity index 100% rename from libs/openssl-1.0.2j-x64_86-win64/ReadMe.txt rename to libs/openssl-1.0.2j-win64/ReadMe.txt diff --git a/libs/openssl-1.0.2j-x64_86-win64/libeay32.dll b/libs/openssl-1.0.2j-win64/libeay32.dll similarity index 100% rename from libs/openssl-1.0.2j-x64_86-win64/libeay32.dll rename to libs/openssl-1.0.2j-win64/libeay32.dll diff --git a/libs/openssl-1.0.2j-x64_86-win64/ssleay32.dll b/libs/openssl-1.0.2j-win64/ssleay32.dll similarity index 100% rename from libs/openssl-1.0.2j-x64_86-win64/ssleay32.dll rename to libs/openssl-1.0.2j-win64/ssleay32.dll diff --git a/libs/openssl-1.1.1b-win32/LICENSE b/libs/openssl-1.1.1b-win32/LICENSE new file mode 100644 index 00000000..9601ab43 --- /dev/null +++ b/libs/openssl-1.1.1b-win32/LICENSE @@ -0,0 +1,125 @@ + + LICENSE ISSUES + ============== + + The OpenSSL toolkit stays under a double license, i.e. both the conditions of + the OpenSSL License and the original SSLeay license apply to the toolkit. + See below for the actual license texts. + + OpenSSL License + --------------- + +/* ==================================================================== + * Copyright (c) 1998-2019 The OpenSSL Project. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. All advertising materials mentioning features or use of this + * software must display the following acknowledgment: + * "This product includes software developed by the OpenSSL Project + * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" + * + * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to + * endorse or promote products derived from this software without + * prior written permission. For written permission, please contact + * openssl-core@openssl.org. + * + * 5. Products derived from this software may not be called "OpenSSL" + * nor may "OpenSSL" appear in their names without prior written + * permission of the OpenSSL Project. + * + * 6. Redistributions of any form whatsoever must retain the following + * acknowledgment: + * "This product includes software developed by the OpenSSL Project + * for use in the OpenSSL Toolkit (http://www.openssl.org/)" + * + * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY + * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + * ==================================================================== + * + * This product includes cryptographic software written by Eric Young + * (eay@cryptsoft.com). This product includes software written by Tim + * Hudson (tjh@cryptsoft.com). + * + */ + + Original SSLeay License + ----------------------- + +/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) + * All rights reserved. + * + * This package is an SSL implementation written + * by Eric Young (eay@cryptsoft.com). + * The implementation was written so as to conform with Netscapes SSL. + * + * This library is free for commercial and non-commercial use as long as + * the following conditions are aheared to. The following conditions + * apply to all code found in this distribution, be it the RC4, RSA, + * lhash, DES, etc., code; not just the SSL code. The SSL documentation + * included with this distribution is covered by the same copyright terms + * except that the holder is Tim Hudson (tjh@cryptsoft.com). + * + * Copyright remains Eric Young's, and as such any Copyright notices in + * the code are not to be removed. + * If this package is used in a product, Eric Young should be given attribution + * as the author of the parts of the library used. + * This can be in the form of a textual message at program startup or + * in documentation (online or textual) provided with the package. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * "This product includes cryptographic software written by + * Eric Young (eay@cryptsoft.com)" + * The word 'cryptographic' can be left out if the rouines from the library + * being used are not cryptographic related :-). + * 4. If you include any Windows specific code (or a derivative thereof) from + * the apps directory (application code) you must include an acknowledgement: + * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" + * + * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * The licence and distribution terms for any publically available version or + * derivative of this code cannot be changed. i.e. this code cannot simply be + * copied and put under another distribution licence + * [including the GNU Public Licence.] + */ + diff --git a/libs/openssl-1.1.1b-win32/libcrypto-1_1.dll b/libs/openssl-1.1.1b-win32/libcrypto-1_1.dll new file mode 100644 index 00000000..1184a3e6 Binary files /dev/null and b/libs/openssl-1.1.1b-win32/libcrypto-1_1.dll differ diff --git a/libs/openssl-1.1.1b-win32/libssl-1_1.dll b/libs/openssl-1.1.1b-win32/libssl-1_1.dll new file mode 100644 index 00000000..35081176 Binary files /dev/null and b/libs/openssl-1.1.1b-win32/libssl-1_1.dll differ diff --git a/libs/openssl-1.1.1b-win32/readme.txt b/libs/openssl-1.1.1b-win32/readme.txt new file mode 100644 index 00000000..d9319a96 --- /dev/null +++ b/libs/openssl-1.1.1b-win32/readme.txt @@ -0,0 +1,30 @@ +----------------------------------------------------------------------- +OpenSSL v1.1.1b Win32 for ICS, http://www.overbyte.be +----------------------------------------------------------------------- + +Built with: + Visual Studio Build Tools 2017 + The Netwide Assembler (NASM) v2.11.05 + Strawberry Perl v5.20.3.1 + +Build Commands: + perl configure VC-WIN32-rtt + nmake + +Custom configuration file (.conf file at the "Configurations" folder): + +## -*- mode: perl; -*- +## Personal configuration targets + +%targets = ( + "VC-WIN32-rtt" => { + inherit_from => [ "VC-WIN32" ], + cflags => sub{my $v=pop; $v=~ s/\/MD/\/MT/ig; return $v}, + lflags => "/nologo /release", + }, + "VC-WIN64A-rtt" => { + inherit_from => [ "VC-WIN64A" ], + cflags => sub{my $v=pop; $v=~ s/\/MD/\/MT/ig; return $v}, + lflags => "/nologo /release", + }, +); \ No newline at end of file diff --git a/libs/openssl-1.1.1b-win64/LICENSE b/libs/openssl-1.1.1b-win64/LICENSE new file mode 100644 index 00000000..9601ab43 --- /dev/null +++ b/libs/openssl-1.1.1b-win64/LICENSE @@ -0,0 +1,125 @@ + + LICENSE ISSUES + ============== + + The OpenSSL toolkit stays under a double license, i.e. both the conditions of + the OpenSSL License and the original SSLeay license apply to the toolkit. + See below for the actual license texts. + + OpenSSL License + --------------- + +/* ==================================================================== + * Copyright (c) 1998-2019 The OpenSSL Project. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. All advertising materials mentioning features or use of this + * software must display the following acknowledgment: + * "This product includes software developed by the OpenSSL Project + * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" + * + * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to + * endorse or promote products derived from this software without + * prior written permission. For written permission, please contact + * openssl-core@openssl.org. + * + * 5. Products derived from this software may not be called "OpenSSL" + * nor may "OpenSSL" appear in their names without prior written + * permission of the OpenSSL Project. + * + * 6. Redistributions of any form whatsoever must retain the following + * acknowledgment: + * "This product includes software developed by the OpenSSL Project + * for use in the OpenSSL Toolkit (http://www.openssl.org/)" + * + * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY + * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + * ==================================================================== + * + * This product includes cryptographic software written by Eric Young + * (eay@cryptsoft.com). This product includes software written by Tim + * Hudson (tjh@cryptsoft.com). + * + */ + + Original SSLeay License + ----------------------- + +/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) + * All rights reserved. + * + * This package is an SSL implementation written + * by Eric Young (eay@cryptsoft.com). + * The implementation was written so as to conform with Netscapes SSL. + * + * This library is free for commercial and non-commercial use as long as + * the following conditions are aheared to. The following conditions + * apply to all code found in this distribution, be it the RC4, RSA, + * lhash, DES, etc., code; not just the SSL code. The SSL documentation + * included with this distribution is covered by the same copyright terms + * except that the holder is Tim Hudson (tjh@cryptsoft.com). + * + * Copyright remains Eric Young's, and as such any Copyright notices in + * the code are not to be removed. + * If this package is used in a product, Eric Young should be given attribution + * as the author of the parts of the library used. + * This can be in the form of a textual message at program startup or + * in documentation (online or textual) provided with the package. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * "This product includes cryptographic software written by + * Eric Young (eay@cryptsoft.com)" + * The word 'cryptographic' can be left out if the rouines from the library + * being used are not cryptographic related :-). + * 4. If you include any Windows specific code (or a derivative thereof) from + * the apps directory (application code) you must include an acknowledgement: + * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" + * + * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * The licence and distribution terms for any publically available version or + * derivative of this code cannot be changed. i.e. this code cannot simply be + * copied and put under another distribution licence + * [including the GNU Public Licence.] + */ + diff --git a/libs/openssl-1.1.1b-win64/libcrypto-1_1-x64.dll b/libs/openssl-1.1.1b-win64/libcrypto-1_1-x64.dll new file mode 100644 index 00000000..50546b0e Binary files /dev/null and b/libs/openssl-1.1.1b-win64/libcrypto-1_1-x64.dll differ diff --git a/libs/openssl-1.1.1b-win64/libssl-1_1-x64.dll b/libs/openssl-1.1.1b-win64/libssl-1_1-x64.dll new file mode 100644 index 00000000..5fc3f2bc Binary files /dev/null and b/libs/openssl-1.1.1b-win64/libssl-1_1-x64.dll differ diff --git a/libs/openssl-1.1.1b-win64/readme.txt b/libs/openssl-1.1.1b-win64/readme.txt new file mode 100644 index 00000000..9a8bd5d1 --- /dev/null +++ b/libs/openssl-1.1.1b-win64/readme.txt @@ -0,0 +1,30 @@ +----------------------------------------------------------------------- +OpenSSL v1.1.1b Win64 for ICS, http://www.overbyte.be +----------------------------------------------------------------------- + +Built with: + Visual Studio Build Tools 2017 + The Netwide Assembler (NASM) v2.11.05 + Strawberry Perl v5.20.3.1 + +Build Commands: + perl configure VC-WIN64A-rtt + nmake + +Custom configuration file (.conf file at the "Configurations" folder): + +## -*- mode: perl; -*- +## Personal configuration targets + +%targets = ( + "VC-WIN32-rtt" => { + inherit_from => [ "VC-WIN32" ], + cflags => sub{my $v=pop; $v=~ s/\/MD/\/MT/ig; return $v}, + lflags => "/nologo /release", + }, + "VC-WIN64A-rtt" => { + inherit_from => [ "VC-WIN64A" ], + cflags => sub{my $v=pop; $v=~ s/\/MD/\/MT/ig; return $v}, + lflags => "/nologo /release", + }, +); \ No newline at end of file diff --git a/sACNView.pro b/sACNView.pro index 3fd6cc5b..c9183632 100644 --- a/sACNView.pro +++ b/sACNView.pro @@ -23,7 +23,6 @@ URL = $$shell_quote("https://www.sacnview.org") LICENSE = $$shell_quote("Apache 2.0") macx { - QMAKE_MAC_SDK = macosx10.12 ICON = res/icon.icns } diff --git a/src/main.cpp b/src/main.cpp index 3aceac78..48158fd3 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -98,14 +98,25 @@ int main(int argc, char *argv[]) // Setup interface bool newInterface = false; - if(!Preferences::getInstance()->defaultInterfaceAvailable()) + // Interface not avaliable, or last selection was offline/localhost + if (!Preferences::getInstance()->defaultInterfaceAvailable() + || Preferences::getInstance()->getInstance()->networkInterface().flags().testFlag(QNetworkInterface::IsLoopBack) + ) { NICSelectDialog d; int result = d.exec(); - if(result==QDialog::Accepted) - { - Preferences::getInstance()->setNetworkInterface(d.getSelectedInterface()); + switch (result) { + case QDialog::Accepted: + { + Preferences::getInstance()->setNetworkInterface(d.getSelectedInterface()); + break; + } + case QDialog::Rejected: + { + // Exit application + return -1; + } } newInterface = true; @@ -140,10 +151,12 @@ int main(int argc, char *argv[]) w->showMaximized(); // Show interface name on statusbar - w->statusBar()->showMessage(QObject::tr("Selected interface: %1").arg( - Preferences::getInstance()->networkInterface().humanReadableName()) - ); - + if (Preferences::getInstance()->networkInterface().flags().testFlag(QNetworkInterface::IsLoopBack)) + w->statusBar()->showMessage(QObject::tr(" WORKING OFFLINE")); + else + w->statusBar()->showMessage( + QObject::tr("Selected interface: %1").arg( + Preferences::getInstance()->networkInterface().humanReadableName())); // Check firewall if not newly selected if (!newInterface) { diff --git a/src/nicselectdialog.cpp b/src/nicselectdialog.cpp index 6e0ce70b..8a23b021 100644 --- a/src/nicselectdialog.cpp +++ b/src/nicselectdialog.cpp @@ -17,6 +17,7 @@ #include "ui_nicselectdialog.h" #include "preferences.h" #include +#include NICSelectDialog::NICSelectDialog(QWidget *parent) : QDialog(parent), @@ -47,7 +48,7 @@ NICSelectDialog::NICSelectDialog(QWidget *parent) : } } - ui->btnSelect->setEnabled(false); + on_listWidget_itemSelectionChanged(); } NICSelectDialog::~NICSelectDialog() @@ -57,7 +58,17 @@ NICSelectDialog::~NICSelectDialog() void NICSelectDialog::on_listWidget_itemSelectionChanged() { - ui->btnSelect->setEnabled(true); + // Empty or no selection + if (!ui->listWidget->count() || ui->listWidget->currentRow() == -1) + { + ui->btnSelect->setEnabled(false); + return; + } + + // Show select if not loopback + qDebug() << ui->listWidget->currentRow(); + ui->btnSelect->setEnabled( + !m_interfaceList[ui->listWidget->currentRow()].flags().testFlag(QNetworkInterface::IsLoopBack)); } @@ -69,5 +80,19 @@ void NICSelectDialog::on_btnSelect_pressed() void NICSelectDialog::on_btnWorkOffline_pressed() { + // Select localhost + for (auto interface : m_interfaceList) + { + if (interface.flags().testFlag(QNetworkInterface::IsLoopBack)) + m_selectedInterface = interface; + accept(); + return; + } + + QMessageBox msgBox; + msgBox.setStandardButtons(QMessageBox::Ok); + msgBox.setIcon(QMessageBox::Critical); + msgBox.setText("Work Offline failed\r\nUnable to locate localhost adapter"); + msgBox.exec(); reject(); } diff --git a/src/pcapplayback.cpp b/src/pcapplayback.cpp index 43ba913f..bca3be7f 100644 --- a/src/pcapplayback.cpp +++ b/src/pcapplayback.cpp @@ -34,7 +34,9 @@ void PcapPlayback::openThread() connect(sender, SIGNAL(sendingFinished()), this, SLOT(playbackFinished())); connect(sender, SIGNAL(sendingClosed()), this, SLOT(playbackClosed())); connect(sender, SIGNAL(error(QString)), this, SLOT(error(QString))); - connect(sender, SIGNAL(finished()), sender, SLOT(deleteLater())); + connect(sender, &QThread::finished, [this]() { + sender->deleteLater(); + sender = Q_NULLPTR; }); connect(sender, SIGNAL(finished()), this, SLOT(playbackThreadClosed())); ui->progressBar->reset(); sender->start(); @@ -47,7 +49,6 @@ void PcapPlayback::closeThread() return; sender->quit(); - sender->deleteLater(); sender = Q_NULLPTR; } diff --git a/src/pcapplaybacksender.cpp b/src/pcapplaybacksender.cpp index a52c5a30..b9958864 100644 --- a/src/pcapplaybacksender.cpp +++ b/src/pcapplaybacksender.cpp @@ -197,6 +197,8 @@ void pcapplaybacksender::run() QThread::msleep(100); } } + + exec(); } void pcapplaybacksender::quit() diff --git a/src/preferences.cpp b/src/preferences.cpp index 8c5252fd..29b1ff06 100644 --- a/src/preferences.cpp +++ b/src/preferences.cpp @@ -75,6 +75,7 @@ void Preferences::setNetworkInterface(const QNetworkInterface &value) void Preferences::SetNetworkListenAll(const bool &value) { + if (networkInterface().flags().testFlag(QNetworkInterface::IsLoopBack)) return; m_interfaceListenAll = value; } @@ -83,6 +84,7 @@ bool Preferences::GetNetworkListenAll() #ifdef TARGET_WINXP return false; #else + if (networkInterface().flags().testFlag(QNetworkInterface::IsLoopBack)) return false; return m_interfaceListenAll; #endif } @@ -204,14 +206,23 @@ bool Preferences::defaultInterfaceAvailable() bool Preferences::interfaceSuitable(QNetworkInterface *inter) { - // Up, can multicast, and has IPv4? - if (inter->isValid() - && inter->flags().testFlag(QNetworkInterface::IsRunning) - && inter->flags().testFlag(QNetworkInterface::IsUp) - && inter->flags().testFlag(QNetworkInterface::CanMulticast) - && !inter->flags().testFlag(QNetworkInterface::IsLoopBack) + + if (inter->isValid() && ( + ( + // Up, can multicast... + inter->flags().testFlag(QNetworkInterface::IsRunning) + && inter->flags().testFlag(QNetworkInterface::IsUp) + && inter->flags().testFlag(QNetworkInterface::CanMulticast) + ) || ( + // Up, is loopback... + inter->flags().testFlag(QNetworkInterface::IsRunning) + && inter->flags().testFlag(QNetworkInterface::IsUp) + && inter->flags().testFlag(QNetworkInterface::IsLoopBack) + ) ) + ) { + // ...has IPv4 foreach (QNetworkAddressEntry addr, inter->addressEntries()) { if(addr.ip().protocol() == QAbstractSocket::IPv4Protocol) return true; @@ -235,7 +246,10 @@ void Preferences::savePreferences() QSettings settings; if(m_interface.isValid()) - settings.setValue(S_MAC_ADDRESS, m_interface.hardwareAddress()); + { + settings.setValue(S_INTERFACE_ADDRESS, m_interface.hardwareAddress()); + settings.setValue(S_INTERFACE_NAME, m_interface.name()); + } settings.setValue(S_DISPLAY_FORMAT, QVariant(m_nDisplayFormat)); settings.setValue(S_BLIND_VISUALIZER, QVariant(m_bBlindVisualizer)); settings.setValue(S_DDONLY, QVariant(m_bDisplayDDOnly)); @@ -276,13 +290,19 @@ void Preferences::loadPreferences() { QSettings settings; - if(settings.contains(S_MAC_ADDRESS)) + if(settings.contains(S_INTERFACE_ADDRESS)) { - QString mac = settings.value(S_MAC_ADDRESS).toString(); - QList ifaceList = QNetworkInterface::allInterfaces(); - foreach(QNetworkInterface i, ifaceList) - if(i.hardwareAddress() == mac) - m_interface = i; + QString mac = settings.value(S_INTERFACE_ADDRESS).toString(); + auto interFromName = QNetworkInterface::interfaceFromName(settings.value(S_INTERFACE_NAME).toString()); + if (interFromName.isValid() && (interFromName.hardwareAddress() == mac)) + { + m_interface = interFromName; + } else { + QList ifaceList = QNetworkInterface::allInterfaces(); + for(auto i : ifaceList) + if(i.hardwareAddress() == mac) + m_interface = i; + } } m_interfaceListenAll = settings.value(S_LISTEN_ALL, QVariant(false)).toBool(); diff --git a/src/preferences.h b/src/preferences.h index 332c8e74..23bf86c0 100644 --- a/src/preferences.h +++ b/src/preferences.h @@ -27,7 +27,8 @@ // Strings for storing settings -static const QString S_MAC_ADDRESS("MacAddress"); +static const QString S_INTERFACE_ADDRESS("MacAddress"); +static const QString S_INTERFACE_NAME("InterfaceName"); static const QString S_DISPLAY_FORMAT("Display Format"); static const QString S_BLIND_VISUALIZER("Show Blind"); static const QString S_DDONLY("Show DDOnly"); diff --git a/src/preferencesdialog.cpp b/src/preferencesdialog.cpp index cdc4f144..bf06e0a3 100644 --- a/src/preferencesdialog.cpp +++ b/src/preferencesdialog.cpp @@ -51,7 +51,9 @@ PreferencesDialog::PreferencesDialog(QWidget *parent) : .arg(interface.humanReadableName()) .arg(ipString)); - radio->setChecked(Preferences::getInstance()->networkInterface().hardwareAddress() == interface.hardwareAddress()); + radio->setChecked( + Preferences::getInstance()->networkInterface().hardwareAddress() == interface.hardwareAddress() && + Preferences::getInstance()->networkInterface().name() == interface.name()); ui->verticalLayout_NetworkInterfaces->addWidget(radio); m_interfaceList << interface; @@ -59,6 +61,8 @@ PreferencesDialog::PreferencesDialog(QWidget *parent) : } } ui->cbListenAll->setChecked(Preferences::getInstance()->GetNetworkListenAll()); + if (Preferences::getInstance()->networkInterface().flags().testFlag(QNetworkInterface::IsLoopBack)) + ui->cbListenAll->setEnabled(false); #ifdef TARGET_WINXP ui->cbListenAll->setEnabled(false); #endif diff --git a/src/sacn/sacnlistener.cpp b/src/sacn/sacnlistener.cpp index ce16f436..9340ad5c 100644 --- a/src/sacn/sacnlistener.cpp +++ b/src/sacn/sacnlistener.cpp @@ -243,13 +243,13 @@ void sACNListener::processDatagram(QByteArray data, QHostAddress destination, QH * These only apply to the ratified version of the spec, so we will hardwire * them to be 0 just in case they never get set. */ - quint16 reserved = 0; - quint8 options = 0; + quint16 synchronization = NOT_SYNCHRONIZED_VALUE; + quint8 options = NO_OPTIONS_VALUE; bool preview = false; quint8 *pbuf = (quint8*)data.data(); switch (ValidateStreamHeader((quint8*)data.data(), data.length(), source_cid, source_name, priority, - start_code, reserved, sequence, options, universe, slot_count, pdata)) + start_code, synchronization, sequence, options, universe, slot_count, pdata)) { case e_ValidateStreamHeader::SteamHeader_Invalid: // Recieved a packet but not valid. Log and discard @@ -421,6 +421,7 @@ void sACNListener::processDatagram(QByteArray data, QHostAddress destination, QH ps->name = QString::fromUtf8(source_name); ps->ip = sender; ps->universe = universe; + ps->synchronization = synchronization; ps->active.SetInterval(WAIT_OFFLINE + m_ssHLL); ps->lastseq = sequence; ps->src_cid = source_cid; @@ -500,14 +501,28 @@ void sACNListener::processDatagram(QByteArray data, QHostAddress destination, QH ps->priority = priority; ps->source_params_change = true; } + if(ps->synchronization != synchronization) + { + ps->synchronization = synchronization; + ps->source_params_change = true; + } // This is DMX // Copy the last array back memcpy(ps->last_level_array, ps->level_array, DMX_SLOT_MAX); // Fill in the new array memset(ps->level_array, 0, DMX_SLOT_MAX); memcpy(ps->level_array, pdata, slot_count); - // Set slot count - ps->slot_count = slot_count; + + // Slot count change, re-merge all slots + if(ps->slot_count != slot_count) + { + ps->slot_count = slot_count; + ps->source_params_change = true; + ps->source_levels_change = true; + for(int i=0; idirty_array[i] |= true; + } + // Compare the two for(int i=0; iGetTXRateOverride() ? std::numeric_limits::max() : E1_11::MAX_REFRESH_RATE_HZ; if(m_unicastAddress.isNull()) - streamServer->CreateUniverse(m_cid, qPrintable(m_name), m_priority, 0, options, STARTCODE_DMX, + streamServer->CreateUniverse(m_cid, qPrintable(m_name), m_priority, m_synchronization, options, STARTCODE_DMX, m_universe, m_slotCount, m_slotData, m_handle, SEND_INTERVAL_DMX, max_tx_rate, CIPAddr(), m_version==StreamingACNProtocolVersion::sACNProtocolDraft ); else - streamServer->CreateUniverse(m_cid, qPrintable(m_name), m_priority, 0, options, STARTCODE_DMX, m_universe, + streamServer->CreateUniverse(m_cid, qPrintable(m_name), m_priority, m_synchronization, options, STARTCODE_DMX, m_universe, m_slotCount, m_slotData, m_handle, SEND_INTERVAL_DMX, max_tx_rate, CIPAddr(m_unicastAddress), m_version==StreamingACNProtocolVersion::sACNProtocolDraft ); @@ -86,7 +87,7 @@ void sACNSentUniverse::startSending(bool preview) if(m_priorityMode == pmPER_ADDRESS_PRIORITY) { quint8 *pslots; - streamServer->CreateUniverse(m_cid, qPrintable(m_name), 0, options, 0, STARTCODE_PRIORITY, + streamServer->CreateUniverse(m_cid, qPrintable(m_name), m_priority, NOT_SYNCHRONIZED_VALUE, options, STARTCODE_PRIORITY, m_universe, m_slotCount, pslots, m_priorityHandle, SEND_INTERVAL_PRIORITY, max_tx_rate, CIPAddr(), m_version==StreamingACNProtocolVersion::sACNProtocolDraft ); @@ -255,6 +256,17 @@ void sACNSentUniverse::setUniverse(int universe) emit universeChange(); } +void sACNSentUniverse::setSynchronization(quint16 address) +{ + m_synchronization = address; + if(m_isSending) + { + CStreamServer::getInstance()->setSynchronizationAddress(m_handle, m_synchronization); + } + + emit synchronizationChange(); +} + void sACNSentUniverse::setCID(CID cid) { if(m_cid==cid) return; @@ -465,7 +477,7 @@ void CStreamServer::TickLoop() // send_intervalms intervals (again defaulted for DMX). Note that even if you are not using the // inactivity logic, send_intervalms expiry will trigger a resend of the current universe packet. //Data on this universe will not be initially sent until marked dirty. -bool CStreamServer::CreateUniverse(const CID& source_cid, const char* source_name, quint8 priority, quint16 reserved, quint8 options, quint8 start_code, +bool CStreamServer::CreateUniverse(const CID& source_cid, const char* source_name, quint8 priority, quint16 synchronization, quint8 options, quint8 start_code, quint16 universe, quint16 slot_count, quint8*& pslots, uint& handle, uint send_intervalms, uint send_max_rate, CIPAddr unicastAddress, bool draft) { QMutexLocker locker(&m_writeMutex); @@ -526,9 +538,9 @@ bool CStreamServer::CreateUniverse(const CID& source_cid, const char* source_nam m_multiverse[handle].sendaddr = addr.ToQHostAddress(); if(draft) - InitStreamHeaderForDraft(pbuf, source_cid, source_name, priority, reserved, options, start_code, universe, slot_count); + InitStreamHeaderForDraft(pbuf, source_cid, source_name, priority, synchronization, options, start_code, universe, slot_count); else - InitStreamHeader(pbuf, source_cid, source_name, priority, reserved, options, start_code, universe, slot_count); + InitStreamHeader(pbuf, source_cid, source_name, priority, synchronization, options, start_code, universe, slot_count); m_multiverse[handle].psend = pbuf; m_multiverse[handle].sendsize = sendsize; @@ -637,3 +649,11 @@ void CStreamServer::setUniversePriority(uint handle, quint8 priority) } } +void CStreamServer::setSynchronizationAddress(uint handle, quint16 address) +{ + if(m_multiverse[handle].psend && !m_multiverse[handle].draft) + { + m_multiverse[handle].psend[SYNC_ADDR] = address; + } +} + diff --git a/src/sacn/sacnsender.h b/src/sacn/sacnsender.h index 529ab682..ca5c274e 100644 --- a/src/sacn/sacnsender.h +++ b/src/sacn/sacnsender.h @@ -122,6 +122,13 @@ public slots: void setUniverse(int universe); int universe() { return m_universe; } + /** + * @brief setSynchronizationAddress - set the Synchronization address of this sender. + * @param address - new address. + */ + void setSynchronization(quint16 address); + int synchronization() { return m_synchronization; } + /** * @brief setCID - set the CID of this sender. * If active this will stop and restart the source @@ -150,6 +157,11 @@ public slots: */ void universeChange(); + /** + * @brief synchronizationChange is emitted when the source changes Synchronization address + */ + void synchronizationChange(); + /** * @brief cidChange is emitted when the source changes CID */ @@ -191,6 +203,8 @@ private slots: StreamingACNProtocolVersion m_version; // Timer to shutdown after timeout QTimer *m_checkTimeoutTimer; + // Synchronization Address + quint16 m_synchronization; }; //These definitions are to be used with the send_intervalms parameter of CreateUniverse @@ -225,7 +239,7 @@ class CStreamServer : public QObject // inactivity logic, send_intervalms expiry will trigger a resend of the current universe packet. //Data on this universe will not be initially sent until marked dirty. bool CreateUniverse(const CID& source_cid, const char* source_name, quint8 priority, - quint16 reserved, quint8 options, quint8 start_code, + quint16 synchronization, quint8 options, quint8 start_code, quint16 universe, quint16 slot_count, quint8*& pslots, uint& handle, uint send_intervalms = SEND_INTERVAL_DMX, uint send_max_rate = E1_11::MAX_REFRESH_RATE_HZ, @@ -260,6 +274,7 @@ class CStreamServer : public QObject void setUniverseName(uint handle, const char *name); void setUniversePriority(uint handle, quint8 priority); + void setSynchronizationAddress(uint handle, quint16 address); //Use this to destroy a priority universe. void DEBUG_DESTROY_PRIORITY_UNIVERSE(uint handle); diff --git a/src/sacn/streamcommon.cpp b/src/sacn/streamcommon.cpp index 9a43ad30..e9da65d4 100644 --- a/src/sacn/streamcommon.cpp +++ b/src/sacn/streamcommon.cpp @@ -51,7 +51,7 @@ Implementation of the common streaming ACN packing and parsing functions*/ * cid, etc. The buffer must be at least STREAM_HEADER_SIZE bytes long */ void InitStreamHeader(quint8* pbuf, const CID &source_cid, - const char* source_name, quint8 priority, quint16 reserved, + const char* source_name, quint8 priority, quint16 synchronization, quint8 options, quint8 start_code, quint16 universe, quint16 slot_count) { @@ -106,8 +106,8 @@ void InitStreamHeader(quint8* pbuf, const CID &source_cid, PackBUint8(p, priority); p += 1; - //reserved - PackBUint16(p, reserved); + //Synchronization Address + PackBUint16(p, synchronization); p += 2; //framing sequence number @@ -275,10 +275,10 @@ void SetStreamHeaderSequence(quint8* pbuf, quint8 seq, bool draft) * pdata is the offset into the buffer where the data is stored */ e_ValidateStreamHeader ValidateStreamHeader(quint8* pbuf, uint buflen, CID &source_cid, - char* source_space, quint8 &priority, - quint8 &start_code, quint16 &reserved, - quint8 &sequence, quint8 &options, quint16 &universe, - quint16 &slot_count, quint8* &pdata) + char* source_space, quint8 &priority, + quint8 &start_code, quint16 &synchronization, + quint8 &sequence, quint8 &options, quint16 &universe, + quint16 &slot_count, quint8* &pdata) { if(!pbuf) return e_ValidateStreamHeader::SteamHeader_Invalid; @@ -289,7 +289,7 @@ e_ValidateStreamHeader ValidateStreamHeader(quint8* pbuf, uint buflen, CID &sour { case VECTOR_ROOT_E131_DATA: if (VerifyStreamHeader(pbuf, buflen, source_cid, source_space, - priority, start_code, reserved, sequence, + priority, start_code, synchronization, sequence, options, universe, slot_count, pdata)) return e_ValidateStreamHeader::SteamHeader_Ratified; else @@ -318,7 +318,7 @@ e_ValidateStreamHeader ValidateStreamHeader(quint8* pbuf, uint buflen, CID &sour */ bool VerifyStreamHeader(quint8* pbuf, uint buflen, CID &source_cid, char* source_space, quint8 &priority, - quint8 &start_code, quint16 &reserved, quint8 &sequence, + quint8 &start_code, quint16 &synchronization, quint8 &sequence, quint8 &options, quint16 &universe, quint16 &slot_count, quint8* &pdata) { @@ -345,10 +345,6 @@ bool VerifyStreamHeader(quint8* pbuf, uint buflen, CID &source_cid, { return false; } - if(UpackBUint16(pbuf + RESERVED_ADDR) != RESERVED_VALUE) - { - return false; - } if(UpackBUint8(pbuf + DMP_VECTOR_ADDR) != VECTOR_DMP_SET_PROPERTY) { return false; @@ -375,7 +371,7 @@ bool VerifyStreamHeader(quint8* pbuf, uint buflen, CID &source_cid, source_space[SOURCE_NAME_SIZE-1] = '\0'; priority = UpackBUint8(pbuf + PRIORITY_ADDR); start_code = UpackBUint8(pbuf + START_CODE_ADDR); - reserved = UpackBUint16(pbuf + RESERVED_ADDR); + synchronization = UpackBUint16(pbuf + SYNC_ADDR); sequence = UpackBUint8(pbuf + SEQ_NUM_ADDR); options = UpackBUint8(pbuf + OPTIONS_ADDR); universe = UpackBUint16(pbuf + UNIVERSE_ADDR); diff --git a/src/sacn/streamcommon.h b/src/sacn/streamcommon.h index f02eb55e..19973166 100644 --- a/src/sacn/streamcommon.h +++ b/src/sacn/streamcommon.h @@ -59,7 +59,7 @@ #define FRAMING_VECTOR_ADDR 40 #define SOURCE_NAME_ADDR 44 #define PRIORITY_ADDR 108 -#define RESERVED_ADDR 109 +#define SYNC_ADDR 109 #define SEQ_NUM_ADDR 111 #define OPTIONS_ADDR 112 #define UNIVERSE_ADDR 113 @@ -132,7 +132,8 @@ // Universe Discovery Layer #define VECTOR_UNIVERSE_DISCOVERY_UNIVERSE_LIST 0x00000001 -#define RESERVED_VALUE 0 +#define NOT_SYNCHRONIZED_VALUE 0 +#define NO_OPTIONS_VALUE 0 /* * Options @@ -166,7 +167,7 @@ * cid, etc. The buffer must be at least STREAM_HEADER_SIZE bytes long */ void InitStreamHeader(quint8* pbuf, const CID &source_cid, - const char* source_name, quint8 priority, quint16 reserved, + const char* source_name, quint8 priority, quint16 synchronization, quint8 options, quint8 start_code, quint16 universe, quint16 slot_count); /* @@ -199,7 +200,7 @@ enum e_ValidateStreamHeader }; e_ValidateStreamHeader ValidateStreamHeader(quint8* pbuf, uint buflen, CID &source_cid, char* source_space, quint8 &priority, - quint8 &start_code, quint16 &reserved, quint8 &sequence, + quint8 &start_code, quint16 &synchronization, quint8 &sequence, quint8 &options, quint16 &universe, quint16 &slot_count, quint8* &pdata); @@ -207,11 +208,11 @@ e_ValidateStreamHeader ValidateStreamHeader(quint8* pbuf, uint buflen, CID &sour * helper function that does the actual validation of a header * that carries the post-ratification root vector */ -bool VerifyStreamHeader(quint8* pbuf, uint buflen, CID &source_cid, - char* source_space, quint8 &priority, - quint8 &start_code, quint16 &reserved, quint8 &sequence, - quint8 &options, quint16 &universe, - quint16 &slot_count, quint8* &pdata); +bool VerifyStreamHeader(quint8* pbuf, uint buflen, CID &source_cid, + char* source_space, quint8 &priority, + quint8 &start_code, quint16 &synchronization, quint8 &sequence, + quint8 &options, quint16 &universe, + quint16 &slot_count, quint8* &pdata); /* * helper function that does the actual validation of a header * that carries the early draft's root vector diff --git a/src/sacn/streamingacn.h b/src/sacn/streamingacn.h index 1f1b886d..54571416 100644 --- a/src/sacn/streamingacn.h +++ b/src/sacn/streamingacn.h @@ -76,6 +76,7 @@ class sACNSource : public QObject bool source_levels_change; quint8 priority; + quint16 synchronization; QString name; QString cid_string(); QHostAddress ip; diff --git a/src/transmitwindow.cpp b/src/transmitwindow.cpp index 76fb7277..b2a64cce 100644 --- a/src/transmitwindow.cpp +++ b/src/transmitwindow.cpp @@ -573,8 +573,15 @@ void transmitwindow::on_tabWidget_currentChanged(int index) m_fxEngine,"run"); break; } + + case tabGrid: + { + // Reassert levels + m_sender->setLevel(m_levels.data(),m_levels.size()); + break; } } +} void transmitwindow::on_dlFadeRate_valueChanged(int value) { @@ -689,13 +696,11 @@ void transmitwindow::presetButtonPressed() if(!btn) return; int index = m_presetButtons.indexOf(btn); - quint8 buffer[MAX_DMX_ADDRESS]; if(m_recordMode) { // Record a preset - m_sender->copyLevels(buffer); - Preferences::getInstance()->SetPreset(QByteArray((const char*)buffer, MAX_DMX_ADDRESS), index); + Preferences::getInstance()->SetPreset(QByteArray(reinterpret_cast(m_levels.data()), m_levels.size()), index); m_recordMode = false; foreach(QToolButton *btn, m_presetButtons) @@ -703,7 +708,6 @@ void transmitwindow::presetButtonPressed() btn->setStyleSheet(QString("")); btn->setChecked(false); } - } else { diff --git a/src/transmitwindow.h b/src/transmitwindow.h index 89e93d22..26976152 100644 --- a/src/transmitwindow.h +++ b/src/transmitwindow.h @@ -84,6 +84,7 @@ private slots: tabSliders, tabChannelCheck, tabEffects, + tabGrid }; void setUniverseOptsEnabled(bool enabled); diff --git a/src/universeview.cpp b/src/universeview.cpp index 7943e798..f8e13b95 100644 --- a/src/universeview.cpp +++ b/src/universeview.cpp @@ -146,10 +146,17 @@ void UniverseView::sourceChanged(sACNSource *source) ui->twSources->item(row,COL_NAME)->setBackgroundColor(Preferences::getInstance()->colorForCID(source->src_cid)); ui->twSources->item(row,COL_CID)->setText(source->cid_string()); ui->twSources->item(row,COL_PRIO)->setText(QString::number(source->priority)); + if (source->protocol_version == sACNProtocolDraft) ui->twSources->item(row,COL_PREVIEW)->setText(tr("N/A")); else ui->twSources->item(row,COL_PREVIEW)->setText(source->isPreview ? tr("Yes") : tr("No")); + + if (source->protocol_version == sACNProtocolDraft) + ui->twSources->item(row,COL_SYNC)->setText(tr("N/A")); + else + ui->twSources->item(row,COL_SYNC)->setText(source->synchronization ? tr("Yes") : tr("No")); + ui->twSources->item(row,COL_IP)->setText(source->ip.toString()); ui->twSources->item(row,COL_FPS)->setText(QString("%1Hz").arg(QString::number(source->fpscounter.FPS(), 'f', 2))); { diff --git a/src/universeview.h b/src/universeview.h index 24ff0f0a..338af926 100644 --- a/src/universeview.h +++ b/src/universeview.h @@ -59,6 +59,7 @@ protected slots: COL_NAME, COL_CID, COL_PRIO, + COL_SYNC, COL_PREVIEW, COL_IP, COL_FPS, diff --git a/tools/depot_tools b/tools/depot_tools index f28ef988..71f0da3e 160000 --- a/tools/depot_tools +++ b/tools/depot_tools @@ -1 +1 @@ -Subproject commit f28ef9887ee23597d4a0b89d068f7b8e377fc876 +Subproject commit 71f0da3e9392be24fbfac48a3238ee73a9ba3349 diff --git a/ui/universeview.ui b/ui/universeview.ui index 2f1eafed..cb602fee 100644 --- a/ui/universeview.ui +++ b/ui/universeview.ui @@ -217,7 +217,7 @@ false - 20 + 21 @@ -239,6 +239,11 @@ Priority + + + Sync + + Preview