From f8e57147b08ac3cfe2ca2add8c2cfa348b18cfb0 Mon Sep 17 00:00:00 2001 From: Zion Nimchuk Date: Fri, 21 Jul 2017 12:43:08 -0700 Subject: [PATCH] Linux builds now link LLVM statically, fixed Qt libpng issue, moved to single AppImage --- .travis.yml | 40 +++++++++++------------ qt-installer-noninteractive.qs | 60 ++++++++++++++++++++++++++++++++++ rpcs3/CMakeLists.txt | 21 +++++------- 3 files changed, 88 insertions(+), 33 deletions(-) create mode 100644 qt-installer-noninteractive.qs diff --git a/.travis.yml b/.travis.yml index ff8388e2f2..5262012106 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,10 +29,6 @@ matrix: exclude: - os: osx compiler: gcc - include: - - os: linux - compiler: clang - env: WITHOUT_LLVM="yes" git: @@ -47,10 +43,12 @@ before_install: export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'; fi; - if [ "$TRAVIS_OS_NAME" = "linux" ]; then - sudo add-apt-repository ppa:beineri/opt-qt59-trusty -y; - sudo apt-get update; - sudo apt-get install qt59base -y --allow-unauthenticated; + wget http://download.qt.io/official_releases/online_installers/qt-unified-linux-x64-online.run ; + chmod a+x ./qt-unified-linux-x64-online.run ; + export QT_QPA_PLATFORM=minimal ; + ./qt-unified-linux-x64-online.run --script qt-installer-noninteractive.qs --no-force-installations ; fi; + # Add coverall for C++ so coverall.io could be triggered. Even it should be --coverage and gcov. # Install updated libglew-dev since the version provided by trusty is outdated - if [ "$TRAVIS_OS_NAME" = "linux" ]; then @@ -67,30 +65,30 @@ before_install: before_script: - git submodule update --init asmjit 3rdparty/ffmpeg 3rdparty/pugixml 3rdparty/GSL 3rdparty/libpng Utilities/yaml-cpp 3rdparty/cereal 3rdparty/hidapi Vulkan/glslang Vulkan/Vulkan-LoaderAndValidationLayers - - source /opt/qt59/bin/qt59-env.sh - mkdir build - cd build - - if [ -z "$WITHOUT_LLVM" ]; then - cmake .. -DCMAKE_INSTALL_PREFIX=/usr; - else - cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DWITHOUT_LLVM=ON; - fi; + - export CMAKE_PREFIX_PATH=~/Qt/5.9.1/gcc_64/lib/cmake + - cmake .. -DCMAKE_INSTALL_PREFIX=/usr; - make -j 3 - # AppImage generation - if [ "$TRAVIS_BRANCH" = "master" ] && [ "$CC" = "clang-4.0" ] && [ "$TRAVIS_PULL_REQUEST" = false ]; then - export LD_LIBRARY_PATH=${PWD}/3rdparty/libpng:/opt/qt59/lib/:$LD_LIBRARY_PATH ; + export LD_LIBRARY_PATH=~/Qt/5.9.1/gcc_64/lib; make DESTDIR=appdir install ; find appdir/ ; find ../bin ; wget -c "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage" ; chmod a+x linuxdeployqt*.AppImage ; - unset QTDIR; unset QT_PLUGIN_PATH ; + export PATH=~/Qt/5.9.1/gcc_64/bin/:${PATH} ; + ./linuxdeployqt*.AppImage --appimage-extract ; ./linuxdeployqt*.AppImage ./appdir/usr/share/applications/*.desktop -bundle-non-qt-libs ; - ./linuxdeployqt*.AppImage ./appdir/usr/share/applications/*.desktop -appimage ; + mkdir ./appdir/usr/plugins/xcbglintegrations/ ; + mkdir ./appdir/usr/plugins/imageformats/ ; + cp ~/Qt/5.9.1/gcc_64/plugins/xcbglintegrations/* ./appdir/usr/plugins/xcbglintegrations/ ; + cp ~/Qt/5.9.1/gcc_64/plugins/imageformats/* ./appdir/usr/plugins/imageformats/ ; + cp ~/Qt/5.9.1/gcc_64/plugins/platforms/* ./appdir/usr/plugins/platforms/ ; + export PATH=${TRAVIS_BUILD_DIR}/build/squashfs-root/usr/bin/:${PATH} ; + ./squashfs-root/usr/bin/appimagetool ${TRAVIS_BUILD_DIR}/build/appdir ; find ./appdir -executable -type f -exec ldd {} \; | grep " => /usr" | cut -d " " -f 2-3 | sort | uniq ; - if [ -z "$WITHOUT_LLVM" ]; then - export LLVM="-LLVM"; - fi; - curl ${UPLOAD_URL}${TRAVIS_COMMIT:0:7}-${TRAVIS_BUILD_NUMBER}${LLVM}_linux64 --upload-file ./RPCS3*.AppImage; + curl ${UPLOAD_URL}${TRAVIS_COMMIT:0:7}-${TRAVIS_BUILD_NUMBER}_linux64 --upload-file ./RPCS3*.AppImage; fi; script: @@ -123,7 +121,7 @@ addons: - libstdc++-5-dev - lib32stdc++6 - zlib1g-dev - # We need to install qt 5.8 manually because the version trusty provides is too old. + # We need to install qt 5.9.1 manually because the version trusty provides is too old. #- qtbase5-dev - libudev-dev coverity_scan: diff --git a/qt-installer-noninteractive.qs b/qt-installer-noninteractive.qs new file mode 100644 index 0000000000..5a1b48be48 --- /dev/null +++ b/qt-installer-noninteractive.qs @@ -0,0 +1,60 @@ +// http://stackoverflow.com/a/34032216/78204 + +function Controller() { + installer.autoRejectMessageBoxes(); + installer.setMessageBoxAutomaticAnswer("OverwriteTargetDirectory", QMessageBox.Yes); + installer.installationFinished.connect(function() { + gui.clickButton(buttons.NextButton); + }) +} + +Controller.prototype.WelcomePageCallback = function() { + gui.clickButton(buttons.NextButton); +} + +Controller.prototype.CredentialsPageCallback = function() { + gui.clickButton(buttons.NextButton); +} + +Controller.prototype.IntroductionPageCallback = function() { + gui.clickButton(buttons.NextButton); +} + +Controller.prototype.TargetDirectoryPageCallback = function() +{ + gui.currentPageWidget().TargetDirectoryLineEdit.setText(installer.value("HomeDir") + "/Qt"); + //gui.currentPageWidget().TargetDirectoryLineEdit.setText(installer.value("InstallerDirPath") + "/Qt"); + //gui.currentPageWidget().TargetDirectoryLineEdit.setText("/scratch/Qt"); + gui.clickButton(buttons.NextButton); +} + +Controller.prototype.ComponentSelectionPageCallback = function() { + var widget = gui.currentPageWidget(); + + widget.deselectAll(); + widget.selectComponent("qt.591.gcc_64"); + + gui.clickButton(buttons.NextButton); +} + +Controller.prototype.LicenseAgreementPageCallback = function() { + gui.currentPageWidget().AcceptLicenseRadioButton.setChecked(true); + gui.clickButton(buttons.NextButton); +} + +Controller.prototype.StartMenuDirectoryPageCallback = function() { + gui.clickButton(buttons.NextButton); +} + +Controller.prototype.ReadyForInstallationPageCallback = function() +{ + gui.clickButton(buttons.NextButton); +} + +Controller.prototype.FinishedPageCallback = function() { +var checkBoxForm = gui.currentPageWidget().LaunchQtCreatorCheckBoxForm +if (checkBoxForm && checkBoxForm.launchQtCreatorCheckBox) { + checkBoxForm.launchQtCreatorCheckBox.checked = false; +} + gui.clickButton(buttons.FinishButton); +} diff --git a/rpcs3/CMakeLists.txt b/rpcs3/CMakeLists.txt index 95d5d94e94..4ea1bf8945 100644 --- a/rpcs3/CMakeLists.txt +++ b/rpcs3/CMakeLists.txt @@ -86,6 +86,8 @@ endif() if(NOT MSVC) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fexceptions") + # This hides our LLVM from mesa's LLVM, otherwise we get some unresolvable conflicts. + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,--exclude-libs,ALL") if(WIN32) set(CMAKE_RC_COMPILER_INIT windres) enable_language(RC) @@ -106,9 +108,10 @@ if(NOT MSVC) CHECK_C_COMPILER_FLAG("-no-pie" HAS_NO_PIE) if(HAS_NO_PIE) set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -no-pie") - else() - CHECK_C_COMPILER_FLAG("-nopie" HAS_NO_PIE) - if(HAS_NO_PIE) + endif() + CHECK_C_COMPILER_FLAG("-nopie" HAS_NOPIE) + if(HAS_NOPIE) + if (NOT HAS_NO_PIE) set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -nopie") endif() endif() @@ -211,16 +214,10 @@ if(NOT LLVM_FOUND) else() add_definitions(${LLVM_DEFINITIONS}) add_definitions(-DLLVM_AVAILABLE) - - #Use static linking for windows binary but always dynamic on *nix - if (WIN32) - if (CMAKE_BUILD_TYPE STREQUAL "Release") - llvm_map_components_to_libnames(LLVM_LIBS mcjit vectorize ipo x86codegen x86disassembler) - else() - llvm_map_components_to_libnames(LLVM_LIBS mcjit vectorize ipo x86codegen x86disassembler mcdisassembler) - endif() + if (CMAKE_BUILD_TYPE STREQUAL "Release") + llvm_map_components_to_libnames(LLVM_LIBS mcjit vectorize ipo x86codegen x86disassembler) else() - set(LLVM_LIBS LLVM) + llvm_map_components_to_libnames(LLVM_LIBS mcjit vectorize ipo x86codegen x86disassembler mcdisassembler) endif() if (NOT MSVC)