Skip to content

Commit

Permalink
update branch for arch linux
Browse files Browse the repository at this point in the history
  • Loading branch information
BOUEYA Hethsron committed Jun 28, 2020
1 parent 1092b80 commit 23e28eb
Show file tree
Hide file tree
Showing 7 changed files with 133 additions and 14 deletions.
80 changes: 80 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ function checkDistrib() {
# Define appropriate download manager for Mageia Distribution
DOWN_MANAG="urpmi"
PKG_MANAG="rpm"
elif [[ "$DISTRIB" = "Arch" ]]; then
# Define appropriate download manager for Arch Linux Distribution
DOWN_MANAG="pacman"
PKG_MANAG="pacman"
else
return 1
fi
Expand All @@ -79,6 +83,25 @@ function installMissingPKG() {
fi
}

function installMissingPKGBUILD() {
if [ -z "$1" ]; then
echo "\$PKG is empty"
else
COMMAND=$(${PKG_MANAG} -Qi $1)
if [ -z "$COMMAND" ]; then
${ECHO} "${ERROR} $1 is not installed"
sleep 2
${ECHO} "${DEBUG} Installation of $1 ..."
${PREROGATIVE} ${DOWN_MANAG} -Syy $1 > /dev/null
sleep 2
${ECHO} "${OK} $1 has been installed"
else
${ECHO} "${OK} $1 is installed"
sleep 1
fi
fi
}

function installMissingRPM() {
if [ -z "$1" ]; then
echo "\$PKG is empty"
Expand Down Expand Up @@ -162,6 +185,57 @@ declare -a PKGS_MAGEIA=(
"make"
)

declare -a PKGS_ARCH=(
"cmake"
"gcc"
"make"
"git"
"qt5-3d"
"qt5-base"
"qt5-charts"
"qt5-connectivity"
"qt5-datavis3d"
"qt5-declarative"
"qt5-doc"
"qt5-examples"
"qt5-gamepad"
"qt5-graphicaleffects"
"qt5-imageformats"
"qt5-location"
"qt5-lottie"
"qt5-multimedia"
"qt5-networkauth"
"qt5-purchasing"
"qt5-quick3d"
"qt5-quickcontrols"
"qt5-quickcontrols2"
"qt5-quicktimeline"
"qt5-remoteobjects"
"qt5-script"
"qt5-scxml"
"qt5-sensors"
"qt5-serialbus"
"qt5-serialport"
"qt5-speech"
"qt5-svg"
"qt5-tools"
"qt5-translations"
"qt5-virtualkeyboard"
"qt5-wayland"
"qt5-webchannel"
"qt5-webengine"
"qt5-webglplugin"
"qt5-websockets"
"qt5-webview"
"qt5-x11extras"
"qt5-xmlpatterns"
"doxygen"
"graphviz"
"dot2tex"
"python-graphviz"
"python-pydot"
)

# Display Welcome message
${ECHO} "Vera © Plateform"
${ECHO} "GPLv3+ : GNU GPL version 3 or later"
Expand Down Expand Up @@ -191,6 +265,12 @@ elif [[ "$DISTRIB" = "Kali" ]]; then
# Execute Install missing package function
installMissingPKG ${PKG}
done
elif [[ "$DISTRIB" = "Arch" ]]; then
# Loop list of pakages
for PKG in "${PKGS_ARCH[@]}"; do
# Execute Install missing package function
installMissingPKGBUILD ${PKG}
done
fi

${ECHO} ""
Expand Down
Binary file modified resources/assets/qhc/summary.qch
Binary file not shown.
Binary file modified resources/assets/qhc/summary.qhc
Binary file not shown.
2 changes: 1 addition & 1 deletion tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -96,4 +96,4 @@ elseif(WIN32)
endif()

# Adding target link libraries
target_link_libraries(${BINARY} PRIVATE ${EXTERNAL_LIBS} gtest Qt5::Core Qt5::DBus Qt5::Gui Qt5::Help Qt5::Multimedia Qt5::MultimediaWidgets Qt5::PrintSupport Qt5::UiTools Qt5::Widgets)
target_link_libraries(${BINARY} PRIVATE gtest Qt5::Core Qt5::DBus Qt5::Gui Qt5::Help Qt5::Multimedia Qt5::MultimediaWidgets Qt5::PrintSupport Qt5::UiTools Qt5::Widgets)
61 changes: 50 additions & 11 deletions vera/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,56 @@

# Check operating system
if(UNIX)
# Check Linux distribution
if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
if (EXISTS /etc/arch-release)
set(DEBIAN FALSE)
set(CENTOS FALSE)
set(ARCHLINUX TRUE)
set(LINUX FALSE)
elseif(EXISTS /etc/centos-release)
set(DEBIAN FALSE)
set(CENTOS TRUE)
set(ARCHLINUX FALSE)
set(LINUX FALSE)
elseif(EXISTS /etc/debian_version)
set(DEBIAN TRUE)
set(CENTOS FALSE)
set(ARCHLINUX FALSE)
set(LINUX FALSE)
else()
set(DEBIAN FALSE)
set(CENTOS FALSE)
set(ARCHLINUX FALSE)
set(LINUX TRUE)
endif(EXISTS /etc/arch-release)
endif(${CMAKE_SYSTEM_NAME} MATCHES "Linux")

# Setting build flags
if (CMAKE_COMPILER_IS_GNUCC)
if(CMAKE_BUILD_TYPE MATCHES DEBUG)
message(STATUS "Debug mode")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g")
else(CMAKE_BUILD_TYPE MATCHES DEBUG)
message(STATUS "Release mode")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Ofast")
endif(CMAKE_BUILD_TYPE MATCHES DEBUG)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -pedantic -Werror")
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
if (LINUX OR DEBIAN OR CENTOS)
if(CMAKE_BUILD_TYPE MATCHES DEBUG)
message(STATUS "Debug mode")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g")
else(CMAKE_BUILD_TYPE MATCHES DEBUG)
message(STATUS "Release mode")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Ofast")
endif(CMAKE_BUILD_TYPE MATCHES DEBUG)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -pedantic -Werror")
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
elseif(ARCHLINUX)
if(CMAKE_BUILD_TYPE MATCHES DEBUG)
message(STATUS "Debug mode")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g")
else(CMAKE_BUILD_TYPE MATCHES DEBUG)
message(STATUS "Release mode")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Ofast")
endif(CMAKE_BUILD_TYPE MATCHES DEBUG)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra")
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
endif(LINUX OR DEBIAN OR CENTOS)
endif (CMAKE_COMPILER_IS_GNUCC)
elseif(APPLE)
if (MINGW)
Expand All @@ -33,7 +72,7 @@ elseif(APPLE)
message(STATUS "Release mode")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Ofast")
endif(CMAKE_BUILD_TYPE MATCHES DEBUG)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -pedantic -Werror")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra")
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
endif(MINGW)
Expand Down
2 changes: 1 addition & 1 deletion vera/src/model/playlist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ QVariant PlayList::data(const QModelIndex& index, int role) const {
#if _WIN32
QUrl location = playlist->media(index.row()).request().url();
#else
QUrl location = playlist->media(index.row()).canonicalUrl();
QUrl location = playlist->media(index.row()).request().url();
#endif // _WIN32

return QFileInfo(location.path()).fileName();
Expand Down
2 changes: 1 addition & 1 deletion vera/src/view/mainview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1101,7 +1101,7 @@ void MainView::depthClicked() {
QRegExp reg("[A-Z]:");
QString location = playlist->media(playlist->currentIndex()).request().url().toString().split("file://").at(1).split(".").at(0).split(re).at(0).split(reg).at(1) + QString("Depth");
#else
QString location = playlist->media(playlist->currentIndex()).canonicalUrl().toString().split("file://").at(1).split(".").at(0).split(re).at(0) + QString("Depth");
QString location = playlist->media(playlist->currentIndex()).request().url().toString().split("file://").at(1).split(".").at(0).split(re).at(0) + QString("Depth");
#endif // ! _WIN32

QDir dir(location);
Expand Down

0 comments on commit 23e28eb

Please sign in to comment.