Skip to content

Commit

Permalink
Update to Qt 5.12.12, Visual Studio 2017 Build Tools, simplify and cm…
Browse files Browse the repository at this point in the history
…ake (#239)

Signed-off-by: Alexander Wenzel <[email protected]>
  • Loading branch information
alexmucde authored Jan 11, 2022
1 parent df4087f commit c666375
Show file tree
Hide file tree
Showing 11 changed files with 393 additions and 167 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/BuildPR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ jobs:
- name: Install qt
uses: jurplel/install-qt-action@v2
with:
version: 5.12.10
version: 5.12.12
- name: Build ${{ matrix.task }}
run: $env:WORKSPACE=$env:GITHUB_WORKSPACE; $env:QTDIR=$env:Qt5_DIR.Replace('/','\'); ./build_${{ matrix.task }}_windows_qt5_MSVC.bat
- name: Archive artifact
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/Release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ jobs:
uses: jurplel/install-qt-action@v2
with:
mirror: http://ftp.fau.de/qtproject/
version: 5.12.10
version: 5.12.12
- name: Build ${{ matrix.task }}
run: $env:WORKSPACE=$env:GITHUB_WORKSPACE; $env:QTDIR=$env:Qt5_DIR.Replace('/','\'); ./build_${{ matrix.task }}_windows_qt5_MSVC.bat
- name: Archive artifact
Expand Down
66 changes: 23 additions & 43 deletions INSTALL.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
DLT Viewer - Installation
=========================
# DLT Viewer - Installation

Alexander Wenzel <[email protected]>

Instructions for installing DLT Viewer (GUI)
--------------------------------------------
## Instructions for installing DLT Viewer (GUI)

* Install Qt5 SDK including Qt Creator and MSVC 2015 for 64bit Windows builds
* Tested with QT 5.12.4 (Windows) and Qt 5.9.5 (Ubuntu Linux)
* Install Qt5 SDK including Qt Creator and Microsoft Visual Studio Build Tools 2017
* Tested with QT 5.12.12 (Windows) and Qt 5.9.5 (Ubuntu Linux)
* Open project BuildDltViewer.pro in Qt Creator.
* Ensure that build options point to correct QT and MSVC.
* Build Release in Qt Creator or via CMake (see last).
* Optional Linux: set the library path in Qt Creator: Add variable to Projects/Build Settings/Build Environment: LD_LIBRARY_PATH = .

Instructions for installing DLT Viewer (Linux command line)
----------------------------------------------------------
## Instructions for installing DLT Viewer (Linux command line)

* sudo apt install build-essential
* sudo apt install qtcreator
Expand All @@ -27,45 +25,31 @@ Instructions for installing DLT Viewer (Linux command line)
* sudo ldconfig
* Optional: set the library path: LD_LIBRARY_PATH = .

Create SDK (Windows)
--------------------
## Build DLT Viewer in Windows

Microsoft Visual C++ 2015 (64bit):
* Install Qt5 SDK and MSVC 2015 (you can use the free "Community" version).
* If your Qt installation does not match "C:\Qt\Qt5.12.4\5.12.4\msvc2015_64" (for 64 bit),
you can set the correct path as environment variable "QTDIR" in your system properties.
* Adjust and run build_sdk_windows_qt5_MSVC.bat with optional parameter (the current system's architecture is used by default).
* Install Qt5 SDK and Microsoft Visual Studio Build Tools 2017
* If needed adapt you configuration in build_sdk_windows_qt5_MSVC.bat
* Run build_sdk_windows_qt5_MSVC.bat

The SDK will be installed to C:\Users\%USERNAME%\DltViewerSDK\
The DLT Viewer will be installed by default in C:\DltViewerSDK

Optional: Prepare Installation Qwt (Windows)
--------------------------------------------
## Optional: Prepare Installation Qwt (Windows)

Some DLT Viewer plugins will use the Qwt library for displaying graphs.
The Qwt library must be compiled and installed before it can be used.

(Tested with Qwt 6.1.4)
(Tested with Qwt 6.2.0)

Microsoft Visual C++ 2015 (64bit):
* Install Qt5 SDK for Visual C++ 2015 (you can use the free "Community" version)
* Extract Qwt Zip package
* If you like, you can adjust the installation path by changing the variable "QWT_INSTALL_PREFIX" in qwtconfig.pri
* Start Qt commandline from Start->Qt_5.x.x
* Change into Qwt directory
* Execute "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86_amd64
for 64bit.
* Execute qmake qwt.pro
* Execute "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\nmake.exe"
* Execute "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\nmake.exe" install
* Install Qt5 SDK and Microsoft Visual Studio Build Tools 2017
* Copy Qwt zip package qwt-6.2.0.zip to DLT Viewer folder
* Run build_qwt_windows_qt5_MSVC.bat

Create SDK (Linux)
------------------
## Create SDK (Linux)

* Compile DLT Viewer as described in "Build DLT-viewer Linux"
* Call "sudo make install" to install dlt-viewer including libraries and headers for SDK

Create SDK Documentation (Windows)
----------------------------------
## Create SDK Documentation (Windows)

* Install doxygen and graphviz
* Change into project directory
Expand All @@ -74,8 +58,7 @@ Create SDK Documentation (Windows)
* (Optional) doxygen sdk\doxygen_dlt_viewer_qdlt.cfg
* You will find the documentation in the doc directory

Create SDK Documentation (Linux)
--------------------------------
## Create SDK Documentation (Linux)

* Install doxygen and graphviz
* Change into project directory
Expand All @@ -84,8 +67,7 @@ Create SDK Documentation (Linux)
* (Optional) doxygen sdk/doxygen_dlt_viewer_qdlt.cfg
* You will find the documentation in the doc directory

Create manuals documentation
----------------------------
## Create manuals documentation

The plugins programming manual is generated with asciidoc.
Call
Expand All @@ -103,10 +85,8 @@ sudo apt-get install texlive texlive-latex-extra
To create a pdf format output use:
pdflatex dlt-viewer_user_manual.tex

## Instructions for building DLT Viewer with CMake (Linux and MacOS command line)


Instructions for building DLT Viewer with CMake (Linux and MacOS command line)
----------------------------------------------------------
CMake is a "meta" make system. This means CMake creates a make system
for various make solutions including command line build tools like
"Unix Makefiles", or IDE tools like "Visual Studio".
Expand Down Expand Up @@ -143,8 +123,8 @@ Then give the Qt directory to CMake and build:
The application is built in "bin/DLT Viewer.app", it can be launched from Finder or the command line:
open -a $DLT_BUILD_DIR/bin/DLT\ Viewer.app

Building DLT Viewer release version with Qmake on MacOs
--------------------------------------------------------
## Building DLT Viewer release version with Qmake on MacOs

Sometimes building with Cmake or in Qt Creator leads to Plugins not working in DLT Viewer.
Building with qmake in release version gets rid of this problem.
Steps to follow:
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Diagnostic Log and Trace Viewer

## Overview

The Diagnostic Log and Trace Viewer is an application that can send and receive control messages to the DLT daemon, e.g. to set individual log levels of applications and contexts or get the list of applications and contexts registered in the DLT daemon. DLT viewer is based on Qt for Windows and Linux and can run on the Mac though that is not officially supported.
Expand Down Expand Up @@ -35,15 +36,15 @@ See INSTALL.txt regarding doxygen API documentation generation.
## Software/Hardware

Developed with QT 5 (http://qt-project.org/)
Tested with Windows 10 + Qt 5.12.10 + Microsoft Visual Studio 2015 Community Edition
Tested with Windows 10 + Qt 5.12.12 + Microsoft Visual Studio Build Tools 2017
Tested with Ubuntu Linux 18.04 + Qt 5.9.5
Tested with macOS Sierra + Qt 5.7.0
Dynamically linked open source software

Qt 5.x.x (LGPLv3 - Qt)
GCC (GPL)
(Optional) Mingw (GPL + BSD Variante + Public Domain)
Open Icon Library (http://openiconlibrary.sourceforge.net,Multiple LIcenses)
Open Icon Library (http://openiconlibrary.sourceforge.net,Multiple Licenses)
License

Full information on the license for this software is available in the "LICENSE.txt" file.
Expand Down
55 changes: 25 additions & 30 deletions build_parser_windows_qt5_MSVC.bat
Original file line number Diff line number Diff line change
Expand Up @@ -2,49 +2,48 @@

REM Date Version Author Changes
REM 4.7.19 1.0 Alexander Wenzel Update to Qt 5.12.4 and Visual Studio 2015
REM 25.11.20 1.2 Alexander Wenzel Update to Qt 5.12.10
REM 25.11.20 1.1 Alexander Wenzel Update to Qt 5.12.10
REM 11.1.21 1.2 Alexander Wenzel Update to Qt 5.12.12, Visual Studio 2017 Build Tools and simplify

echo ************************************
echo *** DLT Parser ***
echo ************************************

echo .
echo ************************************
echo *** Configuration ***
echo ************************************

rem setlocal enabledelayedexpansion
echo *** Setting up environment ***

rem parameter of this batch script can be either x86 or x86_amd64
if "%ARCHITECTURE%"=="" (
if "%PROCESSOR_ARCHITECTURE%"=="AMD64" (
set ARCHITECTURE=x86_amd64
) else (
set ARCHITECTURE=x86
)
IF "%QTVER%"=="" (
set QTVER=5.12.12
)

set USE_ARCH_PARAM=false
if "%1" NEQ "" (
if "%1"=="x86" set USE_ARCH_PARAM=true
if "%1"=="x86_amd64" set USE_ARCH_PARAM=true
)
if "!USE_ARCH_PARAM!"=="true" set ARCHITECTURE=%1
IF "%MSVC_VER%"=="" (
if exist "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Auxiliary\Build" (
set MSVC_VER=2017
) else (
set MSVC_VER=2015
)
)

echo Target architecture is !ARCHITECTURE!

echo *** Setting up environment ***
echo Set QT diretory for %QTVER%

if "%QTDIR%"=="" (
if "%ARCHITECTURE%"=="x86_amd64" (
set QTDIR=C:\Qt\Qt5.12.10\5.12.10\msvc2015_64
) else (set QTDIR=C:\Qt\Qt5.12.10\5.12.10\msvc2015)
set QTDIR=C:\Qt\Qt%QTVER%\%QTVER%\msvc%MSVC_VER%_64
)

if "%MSVC_DIR%"=="" set MSVC_DIR=C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC
if "%MSVC_VER%"=="2015" (
if "%MSVC_DIR%"=="" (
set "MSVC_DIR=C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC"
)
) else (
if "%MSVC_DIR%"=="" (
set "MSVC_DIR=C:\Program Files (x86)\Microsoft Visual Studio\%MSVC_VER%\BuildTools\VC\Auxiliary\Build"
)
)

set PATH=%QTDIR%\bin;%MSVC_DIR%;%MSVC_DIR%\bin;%PATH%
set QTSDK=%QTDIR%
set PATH=%QTDIR%\bin;%MSVC_DIR%;%PATH%

if '%WORKSPACE%'=='' (
if '%DLT_PARSER_DIR%'=='' (
Expand All @@ -62,10 +61,8 @@ if '%WORKSPACE%'=='' (
set BUILD_DIR=%WORKSPACE%\build\release
)


echo ************************************
echo * QTDIR = %QTDIR%
echo * QTSDK = %QTSDK%
echo * MSVC_DIR = %MSVC_DIR%
echo * PATH = %PATH%
echo * DLT_PARSER_DIR = %DLT_PARSER_DIR%
Expand Down Expand Up @@ -94,7 +91,7 @@ echo ************************************
echo *** Configure MSVC environment ***
echo ************************************

call vcvarsall.bat %ARCHITECTURE%
call vcvarsall.bat x86_amd64
if %ERRORLEVEL% NEQ 0 goto error
echo configuring was successful

Expand All @@ -120,10 +117,8 @@ echo ************************************

echo *** Create directories %DLT_PARSER_DIR% ***
if not exist %DLT_PARSER_DIR% mkdir %DLT_PARSER_DIR%
rem mkdir %DLT_PARSER_DIR%
IF %ERRORLEVEL% NEQ 0 GOTO ERROR_HANDLER

rem mkdir %DLT_PARSER_DIR%\examples
if not exist %DLT_PARSER_DIR%\examples mkdir %DLT_PARSER_DIR%\examples
IF %ERRORLEVEL% NEQ 0 GOTO ERROR_HANDLER

Expand Down
Loading

0 comments on commit c666375

Please sign in to comment.