diff --git a/OpenBoard.pro b/OpenBoard.pro index 51a3584a..e2bea491 100644 --- a/OpenBoard.pro +++ b/OpenBoard.pro @@ -430,6 +430,9 @@ linux-g++* { LIBS += -lcrypto #LIBS += -lprofiler LIBS += -lX11 + LIBS += -lquazip5 + INCLUDEPATH += "/usr/include/quazip" + LIBS += -lpoppler INCLUDEPATH += "/usr/include/poppler" diff --git a/release_scripts/linux/build.sh b/release_scripts/linux/build.sh index 5158e019..42846aeb 100755 --- a/release_scripts/linux/build.sh +++ b/release_scripts/linux/build.sh @@ -26,7 +26,7 @@ initializeVariables() PRODUCT_PATH="$BUILD_DIR/product" # Qt installation path. This may vary across machines - QT_PATH="/usr/lib/x86_64-linux-gnu/qt5" + QT_PATH="/home/dev/Qt/5.13.2/gcc_64" PLUGINS_PATH="$QT_PATH/plugins" GUI_TRANSLATIONS_DIRECTORY_PATH="/usr/share/qt5/translations" QMAKE_PATH="$QT_PATH/bin/qmake" diff --git a/release_scripts/linux/package.sh b/release_scripts/linux/package.sh index 7837431e..f6adc7c6 100755 --- a/release_scripts/linux/package.sh +++ b/release_scripts/linux/package.sh @@ -85,13 +85,13 @@ initializeVariables() # Include Qt libraries and plugins in the package, or not # (this is necessary if the target system doesn't provide Qt 5.5.1) - BUNDLE_QT=false + BUNDLE_QT=true # Qt installation path. This may vary across machines - QT_PATH="/usr/lib/x86_64-linux-gnu/qt5" + QT_PATH="/home/dev/Qt/5.13.2/gcc_64" QT_PLUGINS_SOURCE_PATH="$QT_PATH/plugins" GUI_TRANSLATIONS_DIRECTORY_PATH="/usr/share/qt5/translations" - QT_LIBRARY_SOURCE_PATH="$QT_PATH/.." + QT_LIBRARY_SOURCE_PATH="$QT_PATH/lib" NOTIFY_CMD=`which notify-send` ZIP_PATH=`which zip` @@ -131,12 +131,11 @@ notifyProgress(){ copyQtLibrary(){ echo -e "\t $1" if ls "$QT_LIBRARY_SOURCE_PATH/$1.so" &> /dev/null; then - cp -P $QT_LIBRARY_SOURCE_PATH/$1.so.? "$QT_LIBRARY_DEST_PATH/" - cp -P $QT_LIBRARY_SOURCE_PATH/$1.so.?.? "$QT_LIBRARY_DEST_PATH/" - cp -P $QT_LIBRARY_SOURCE_PATH/$1.so.?.?.? "$QT_LIBRARY_DEST_PATH/" + cp -P $QT_LIBRARY_SOURCE_PATH/$1.so "$QT_LIBRARY_DEST_PATH/" + cp -P $QT_LIBRARY_SOURCE_PATH/$1.so.* "$QT_LIBRARY_DEST_PATH/" - strip $QT_LIBRARY_DEST_PATH/$1.so.?.?.? - chmod 644 $QT_LIBRARY_DEST_PATH/$1.so.?.?.? # 644 = rw-r-r + strip $QT_LIBRARY_DEST_PATH/$1.so + chmod 644 $QT_LIBRARY_DEST_PATH/$1.so.* # 644 = rw-r-r else notifyError "$1 library not found in path: $QT_LIBRARY_SOURCE_PATH" fi @@ -209,7 +208,7 @@ if $BUNDLE_QT; then copyQtPlugin platformthemes copyQtPlugin position copyQtPlugin printsupport - copyQtPlugin qtwebengine + #copyQtPlugin qtwebengine copyQtPlugin sceneparsers copyQtPlugin xcbglintegrations @@ -219,6 +218,7 @@ if $BUNDLE_QT; then copyQtLibrary libQt5DBus copyQtLibrary libQt5Gui copyQtLibrary libQt5Multimedia + copyQtLibrary libQt5MultimediaGstTools copyQtLibrary libQt5MultimediaWidgets copyQtLibrary libQt5Network copyQtLibrary libQt5OpenGL @@ -238,7 +238,9 @@ if $BUNDLE_QT; then copyQtLibrary libQt5XcbQpa copyQtLibrary libQt5Xml copyQtLibrary libQt5XmlPatterns - copyQtLibrary libqgsttools_p + copyQtLibrary libicuuc + copyQtLibrary libicui18n + copyQtLibrary libicudata fi notifyProgress "Copying Qt translations" @@ -325,8 +327,11 @@ if $BUNDLE_QT; then for lib in `dpkg -S $l | grep -v "libqt5" | grep -v "qt55" | awk -F":" '{ print $1 }'`; do presence=`echo ${tab[*]} | grep -c "$lib"`; if [ "$presence" == "0" ]; then - tab[$count]=$lib; - ((count++)); + if [ "$lib" != "openboard" ]; then + echo "adding $lib to tab" + tab[$count]=$lib; + ((count++)); + fi; fi; done; done; diff --git a/release_scripts/windows/OpenBoard.iss b/release_scripts/windows/OpenBoard.iss index 5f74476a..6eb5da75 100644 --- a/release_scripts/windows/OpenBoard.iss +++ b/release_scripts/windows/OpenBoard.iss @@ -59,8 +59,8 @@ Source: "{#ProjectRoot}\..\OpenBoard-ThirdParty\microsoft\vcredist_x86.exe"; Des Source: "{#ProjectRoot}\build\win32\release\product\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs ;OpenSSL -Source: "{#ProjectRoot}\..\OpenBoard-ThirdParty\openssl\openssl-1.1.0-win32\bin\libssl-1_1.dll"; DestDir:"{app}"; Flags: ignoreversion -Source: "{#ProjectRoot}\..\OpenBoard-ThirdParty\openssl\openssl-1.1.0-win32\bin\libcrypto-1_1.dll"; DestDir:"{app}"; Flags: ignoreversion +Source: "{#ProjectRoot}\..\OpenBoard-ThirdParty\openssl\openssl-1.1.0-win64\bin\libssl-1_1-x64.dll"; DestDir:"{app}"; Flags: ignoreversion +Source: "{#ProjectRoot}\..\OpenBoard-ThirdParty\openssl\openssl-1.1.0-win64\bin\libcrypto-1_1-x64.dll"; DestDir:"{app}"; Flags: ignoreversion Source: "{#ProjectRoot}\..\OpenBoard-ThirdParty\openssl\win32\libeay32.dll"; DestDir:"{app}"; Flags: ignoreversion Source: "{#ProjectRoot}\..\OpenBoard-ThirdParty\openssl\win32\ssleay32.dll"; DestDir:"{app}"; Flags: ignoreversion @@ -91,9 +91,13 @@ Source: "{#QtLibs}\libEGL.dll"; DestDir: "{app}" ;Source: "/etc/freezedWidgetWrapper.html"; DestDir: "{app}" ;Source: "*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs -Source: "{#QtLibs}\icudt54.dll"; DestDir: "{app}" -Source: "{#QtLibs}\icuin54.dll"; DestDir: "{app}" -Source: "{#QtLibs}\icuuc54.dll"; DestDir: "{app}" +Source: "{#ProjectRoot}\..\OpenBoard-ThirdParty\zlib\zlib-1.2.11\bin\zlib.dll"; DestDir:"{app}"; Flags: ignoreversion + +Source: "{#ProjectRoot}\..\OpenBoard-ThirdParty\qtwebkit\bin\icudt64.dll"; DestDir: "{app}" +Source: "{#ProjectRoot}\..\OpenBoard-ThirdParty\qtwebkit\bin\icuin64.dll"; DestDir: "{app}" +Source: "{#ProjectRoot}\..\OpenBoard-ThirdParty\qtwebkit\bin\icuuc64.dll"; DestDir: "{app}" +Source: "{#ProjectRoot}\..\OpenBoard-ThirdParty\qtwebkit\bin\libxml2.dll"; DestDir: "{app}" +Source: "{#ProjectRoot}\..\OpenBoard-ThirdParty\qtwebkit\bin\libxslt.dll"; DestDir: "{app}" ; NOTE: Don't use "Flags: ignoreversion" on any shared system files @@ -103,11 +107,20 @@ Source: "{#QtDir}\plugins\platforms\qoffscreen.dll"; DestDir: "{app}\platforms"; Source: "{#QtDir}\plugins\platforms\qwindows.dll"; DestDir: "{app}\platforms"; Flags: ignoreversion +;ffmpeg +Source: "{#ProjectRoot}\..\OpenBoard-ThirdParty\ffmpeg\bin\avcodec-58.dll"; DestDir: "{app}" +Source: "{#ProjectRoot}\..\OpenBoard-ThirdParty\ffmpeg\bin\avdevice-58.dll"; DestDir: "{app}" +Source: "{#ProjectRoot}\..\OpenBoard-ThirdParty\ffmpeg\bin\avfilter-7.dll"; DestDir: "{app}" +Source: "{#ProjectRoot}\..\OpenBoard-ThirdParty\ffmpeg\bin\avformat-58.dll"; DestDir: "{app}" +Source: "{#ProjectRoot}\..\OpenBoard-ThirdParty\ffmpeg\bin\avutil-56.dll"; DestDir: "{app}" +Source: "{#ProjectRoot}\..\OpenBoard-ThirdParty\ffmpeg\bin\postproc-55.dll"; DestDir: "{app}" +Source: "{#ProjectRoot}\..\OpenBoard-ThirdParty\ffmpeg\bin\swresample-3.dll"; DestDir: "{app}" +Source: "{#ProjectRoot}\..\OpenBoard-ThirdParty\ffmpeg\bin\swscale-5.dll"; DestDir: "{app}" + ;Qt images formats plugins Source: "{#QtDir}\plugins\imageformats\qgif.dll"; DestDir: "{app}\imageformats"; Flags: ignoreversion Source: "{#QtDir}\plugins\imageformats\qico.dll"; DestDir: "{app}\imageformats"; Flags: ignoreversion Source: "{#QtDir}\plugins\imageformats\qjpeg.dll"; DestDir: "{app}\imageformats"; Flags: ignoreversion -Source: "{#QtDir}\plugins\imageformats\qmng.dll"; DestDir: "{app}\imageformats"; Flags: ignoreversion Source: "{#QtDir}\plugins\imageformats\qsvg.dll"; DestDir: "{app}\imageformats"; Flags: ignoreversion Source: "{#QtDir}\plugins\imageformats\qtiff.dll"; DestDir: "{app}\imageformats"; Flags: ignoreversion diff --git a/release_scripts/windows/release.win7.vc9.bat b/release_scripts/windows/release.win7.vc9.bat index e55429d7..47f344d7 100644 --- a/release_scripts/windows/release.win7.vc9.bat +++ b/release_scripts/windows/release.win7.vc9.bat @@ -19,22 +19,22 @@ set SCRIPT_PATH=%~dp0 set PROJECT_ROOT=%SCRIPT_PATH%\..\.. set APPLICATION_NAME=OpenBoard -set QT_DIR=C:\Program Files\Qt\5.5\msvc2010 +set QT_DIR=C:\Qt\5.13.2\msvc2017_64 set QT_BIN=%QT_DIR%\bin set PROGRAMS_FILE_PATH=C:\Program Files (x86) set GIT_BIN=C:\Program Files\Git\bin -set VS_BIN=%PROGRAMS_FILE_PATH%\Microsoft Visual Studio 10.0\VC\bin +set VS_BIN=%PROGRAMS_FILE_PATH%\Microsoft Visual Studio 14.0\VC\bin set WIN_SDK_BIN=%PROGRAMS_FILE_PATH%\Microsoft SDKs\Windows\v6.0A\Bin -set INNO_EXE=%PROGRAMS_FILE_PATH%\Inno Setup 5\iscc.exe +set INNO_EXE=%PROGRAMS_FILE_PATH%\Inno Setup 6\iscc.exe set BUILD_DIR=%PROJECT_ROOT%\build\win32\release set LRELEASE=%QT_DIR%\bin\lrelease.exe set BASE_QT_TRANSLATIONS_DIRECTORY=%QT_DIR%\translations set PATH=%QT_BIN%;%PATH%;%WIN_SDK_BIN%;%GIT_BIN% -call "%VS_BIN%\vcvars32.bat" +REM call "%VS_BIN%\vcvars32.bat" echo %PATH% @@ -88,11 +88,6 @@ xcopy /s resources\customizations %CUSTOMIZATIONS% set I18n=build\win32\release\product\i18n xcopy /s "%BASE_QT_TRANSLATIONS_DIRECTORY%\qt_*.qm" %I18n%\ -del build\win32\release\product\i18n\qt_help* - -del "build\win32\release\product\%APPLICATION_NAME%.pdb" - - call "%INNO_EXE%" "%SCRIPT_PATH%\%APPLICATION_NAME%.iss" /F"%APPLICATION_NAME%_Installer_%VERSION%" GOTO END diff --git a/src/board/UBBoardView.cpp b/src/board/UBBoardView.cpp index d39240cf..ce163d10 100644 --- a/src/board/UBBoardView.cpp +++ b/src/board/UBBoardView.cpp @@ -777,6 +777,7 @@ void UBBoardView::handleItemMousePress(QMouseEvent *event) if ((*it)->pos().x() < 0 || (*it)->pos().y() < 0) (*it)->setPos(0,item->boundingRect().size().height()); } + movingItem = item; } else { diff --git a/src/core/UBDisplayManager.cpp b/src/core/UBDisplayManager.cpp index d0fa2014..86ab38ae 100644 --- a/src/core/UBDisplayManager.cpp +++ b/src/core/UBDisplayManager.cpp @@ -222,17 +222,37 @@ void UBDisplayManager::adjustScreens(int screen) void UBDisplayManager::positionScreens() { - if(mDesktopWidget && mControlScreenIndex > -1) { mDesktopWidget->hide(); - mDesktopWidget->setGeometry(mDesktop->screenGeometry(mControlScreenIndex)); + mDesktopWidget->setGeometry(mDesktop->availableGeometry(mDesktopWidget)); } if (mControlWidget && mControlScreenIndex > -1) { mControlWidget->hide(); - mControlWidget->setGeometry(mDesktop->screenGeometry(mControlScreenIndex)); + mControlWidget->setGeometry(mDesktop->availableGeometry(mControlWidget)); + +#ifdef Q_OS_LINUX + /* + * in Gnome (X11), a very strange behavior randomly happens if this call is done at app start (the transparent drawing view of the desktop mode + * becomes somewhat a screenshot of the gnome desktop, so no interaction is possible through the view, and a second "screenshot" (or a second "thread" of the window ? ...) of the desktpop appears ... + * + * It seems to be already assumed by Qt though, so not sure if a qtbug should be created.. + * + * A known regression is that starting OpenBoard in DesktopMode directly may not handle perfectly until a screen mode change occurs (going to BoardMode and go back to Desktop Mode) + * (left palette closed by default and pen size way too large...) but it is less blocking than the other issue. + * + * Maybe To be able to start in DesktopMode should be reconsidered as it seems to work only on Windows at this time (or available only on Windows) + * + * https://doc.qt.io/qt-5/qwidget.html#showFullScreen + */ + if (qgetenv("XDG_SESSION_TYPE") != "x11") + { + UBPlatformUtils::showFullScreen(mControlWidget); + } +#else UBPlatformUtils::showFullScreen(mControlWidget); +#endif } if (mDisplayWidget && mDisplayScreenIndex > -1) diff --git a/src/pdf-merger/Config.h b/src/pdf-merger/Config.h index a18721c8..de3fe030 100644 --- a/src/pdf-merger/Config.h +++ b/src/pdf-merger/Config.h @@ -37,7 +37,9 @@ Is intended for multiplatform support #ifdef WIN32 #define _CRT_SECURE_NO_WARNINGS +#if _MSC_VER < 1700 #define snprintf _snprintf +#endif #endif diff --git a/src/podcast/UBPodcastController.cpp b/src/podcast/UBPodcastController.cpp index 0a33ab32..35b00563 100644 --- a/src/podcast/UBPodcastController.cpp +++ b/src/podcast/UBPodcastController.cpp @@ -59,8 +59,8 @@ #ifdef Q_OS_WIN - #include "windowsmedia/UBWindowsMediaVideoEncoder.h" - #include "windowsmedia/UBWaveRecorder.h" + #include "ffmpeg/UBFFmpegVideoEncoder.h" + #include "ffmpeg/UBMicrophoneInput.h" #elif defined(Q_OS_OSX) #include "ffmpeg/UBFFmpegVideoEncoder.h" #include "ffmpeg/UBMicrophoneInput.h" @@ -308,13 +308,7 @@ void UBPodcastController::start() applicationMainModeChanged(UBApplication::applicationController->displayMode()); -#ifdef Q_OS_WIN - mVideoEncoder = new UBWindowsMediaVideoEncoder(this); //deleted on stop -#elif defined(Q_OS_OSX) - mVideoEncoder = new UBFFmpegVideoEncoder(this); -#elif defined(Q_OS_LINUX) mVideoEncoder = new UBFFmpegVideoEncoder(this); -#endif if (mVideoEncoder) { @@ -805,13 +799,7 @@ QStringList UBPodcastController::audioRecordingDevices() { QStringList devices; -#ifdef Q_OS_WIN - devices = UBWaveRecorder::waveInDevices(); -#elif defined(Q_OS_OSX) devices = UBMicrophoneInput::availableDevicesNames(); -#elif defined(Q_OS_LINUX) - devices = UBMicrophoneInput::availableDevicesNames(); -#endif return devices; } diff --git a/src/podcast/podcast.pri b/src/podcast/podcast.pri index e96263fa..1e0f0673 100644 --- a/src/podcast/podcast.pri +++ b/src/podcast/podcast.pri @@ -13,13 +13,16 @@ SOURCES += src/podcast/UBPodcastController.cpp \ win32 { - SOURCES += src/podcast/windowsmedia/UBWindowsMediaVideoEncoder.cpp \ - src/podcast/windowsmedia/UBWindowsMediaFile.cpp \ - src/podcast/windowsmedia/UBWaveRecorder.cpp + SOURCES += src/podcast/ffmpeg/UBFFmpegVideoEncoder.cpp \ + src/podcast/ffmpeg/UBMicrophoneInput.cpp + + HEADERS += src/podcast/ffmpeg/UBFFmpegVideoEncoder.h \ + src/podcast/ffmpeg/UBMicrophoneInput.h + + LIBS += -L$$PWD/../OpenBoard-ThirdParty/ffmpeg/lib/ -lavformat -lavcodec -lswscale -lswresample -lavutil - HEADERS += src/podcast/windowsmedia/UBWindowsMediaVideoEncoder.h \ - src/podcast/windowsmedia/UBWindowsMediaFile.h \ - src/podcast/windowsmedia/UBWaveRecorder.h + INCLUDEPATH += $$PWD/../OpenBoard-ThirdParty/ffmpeg/include + DEPENDPATH += $$PWD/../OpenBoard-ThirdParty/ffmpeg/include } macx {