diff --git a/CMakeLists.txt b/CMakeLists.txt index 01ec5363..a00b8bcd 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.10) -project(Bloom LANGUAGES CXX VERSION 0.1) +project(Bloom LANGUAGES CXX VERSION 0.0.1) set(CMAKE_VERBOSE_MAKEFILE off) @@ -26,7 +26,8 @@ find_package(Qt5Xml) find_package(Qt5Svg) find_package(Qt5UiTools) -set(CMAKE_SKIP_BUILD_RPATH true) +# CMAKE_SKIP_BUILD_RPATH needs to be set to true to use Gammaray during development +set(CMAKE_SKIP_BUILD_RPATH false) set(CMAKE_BUILD_RPATH_USE_ORIGIN true) set(CMAKE_INSTALL_RPATH "\$ORIGIN/../lib") set(CMAKE_BUILD_RPATH ${CMAKE_INSTALL_RPATH}) @@ -200,7 +201,6 @@ endif() set(CMAKE_INSTALL_PREFIX "${CMAKE_CURRENT_SOURCE_DIR}/release/") install(TARGETS Bloom DESTINATION bin PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ) -install(FILES build/bin/bloom.json DESTINATION bin PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ) # Remove this install(DIRECTORY build/bin/plugins DESTINATION "bin" DIRECTORY_PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ FILE_PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ) install(DIRECTORY build/bin/platforms DESTINATION "bin" DIRECTORY_PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ FILE_PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ) install(DIRECTORY build/resources DESTINATION "." DIRECTORY_PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ FILE_PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ) @@ -211,7 +211,7 @@ set(CPACK_GENERATOR "DEB") set(CPACK_DEBIAN_PACKAGE_NAME "Bloom") set(CPACK_DEBIAN_PACKAGE_DESCRIPTION "") file(READ ${CMAKE_CURRENT_SOURCE_DIR}/resources/packaging/description.txt CPACK_DEBIAN_PACKAGE_DESCRIPTION) -set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "A Linux-based debug interface for embedded systems development") +set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "A debug interface for embedded systems development on Linux") set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Bloom Support ") set(CPACK_DEBIAN_PACKAGE_HOMEPAGE "https://bloom.oscillate.io") set(CPACK_PACKAGE_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/README.md b/README.md index ac23c6af..9bf69700 100644 --- a/README.md +++ b/README.md @@ -108,7 +108,7 @@ sudo nano /usr/lib/x86_64-linux-gnu/qt-default/qtchooser/default.conf # You may also need to change the path to the compiler # You may also need to supply an absolute path to the source (cmake gets a bit weird about this, sometimes) cd /path/to/Bloom/build/cmake-build-debug/; - cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_COMPILER=/usr/bin/g++-9 ./; + cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_COMPILER=/usr/bin/g++-9 ../../; ``` - To build Bloom (debug): ``` diff --git a/build/scripts/CleanBuild.sh b/build/scripts/CleanBuild.sh index 28aba3d5..86d9e903 100644 --- a/build/scripts/CleanBuild.sh +++ b/build/scripts/CleanBuild.sh @@ -10,8 +10,8 @@ rm -fr "_CPack_Packages"; export CMAKE_PREFIX_PATH=/opt/Qt/5.12.10/gcc_64/ -cd build/cmake-build-debug/ && cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_COMPILER=/usr/bin/g++-9 /home/nav/Projects/Bloom/ -cd /home/nav/Projects/Bloom/ && cmake --build /home/nav/Projects/Bloom/build/cmake-build-debug --target clean +cd build/cmake-build-release/ && cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=/usr/bin/g++-9 ../../ +cd /home/nav/Projects/Bloom/ && cmake --build /home/nav/Projects/Bloom/build/cmake-build-release --target clean -cmake --build /home/nav/Projects/Bloom/build/cmake-build-debug --target Bloom -cmake --install /home/nav/Projects/Bloom/build/cmake-build-debug --target Bloom \ No newline at end of file +cmake --build /home/nav/Projects/Bloom/build/cmake-build-release --target Bloom +cmake --install /home/nav/Projects/Bloom/build/cmake-build-release --target Bloom \ No newline at end of file diff --git a/resources/packaging/description.txt b/resources/packaging/description.txt index 56a8fe25..70b4bc43 100644 --- a/resources/packaging/description.txt +++ b/resources/packaging/description.txt @@ -1 +1 @@ -Bloom is a Linux-based debug interface for embedded systems development. Bloom supports most Microchip AVR8 targets, along with numerous EDBG-based debug tools. \ No newline at end of file +A debug interface for embedded systems development on Linux. Bloom supports most Microchip AVR8 targets, along with numerous EDBG-based debug tools. \ No newline at end of file diff --git a/resources/packaging/postinst b/resources/packaging/postinst index 7d031c65..97d3df3d 100755 --- a/resources/packaging/postinst +++ b/resources/packaging/postinst @@ -2,12 +2,12 @@ BLOOM_UDEV_FILE_PATH=/etc/udev/rules.d/ -if [ ! -f "${BLOOM_UDEV_FILE_PATH}/99-bloom.rules" ]; then +if [ ! -f "${BLOOM_UDEV_FILE_PATH}/99-bloom.rules" ] || [ ! -L "${BLOOM_UDEV_FILE_PATH}/99-bloom.rules" ] || [ ! -e "${BLOOM_UDEV_FILE_PATH}/99-bloom.rules" ]; then sudo ln -s /opt/bloom/resources/UDevRules/99-bloom.rules "$BLOOM_UDEV_FILE_PATH"; fi -if [ -f "/usr/bin/bloom" ]; then +if [ -f "/usr/bin/bloom" ] || [ -L "/usr/bin/bloom" ] || [ -e "/usr/bin/bloom" ]; then sudo rm /usr/bin/bloom; fi diff --git a/resources/packaging/postrm b/resources/packaging/postrm index 20b802e2..6603203d 100755 --- a/resources/packaging/postrm +++ b/resources/packaging/postrm @@ -2,10 +2,10 @@ BLOOM_UDEV_FILE_PATH=/etc/udev/rules.d/ -if [ -f "${BLOOM_UDEV_FILE_PATH}/99-bloom.rules" ]; then +if [ -f "${BLOOM_UDEV_FILE_PATH}/99-bloom.rules" ] || [ -L "${BLOOM_UDEV_FILE_PATH}/99-bloom.rules" ] || [ -e "${BLOOM_UDEV_FILE_PATH}/99-bloom.rules" ]; then sudo rm "$BLOOM_UDEV_FILE_PATH/99-bloom.rules"; fi -if [ -f "/usr/bin/bloom" ]; then +if [ -f "/usr/bin/bloom" ] || [ -L "/usr/bin/bloom" ] || [ -e "/usr/bin/bloom" ]; then sudo rm /usr/bin/bloom; fi diff --git a/src/Insight/Insight.cpp b/src/Insight/Insight.cpp index ae3a3486..6a020917 100644 --- a/src/Insight/Insight.cpp +++ b/src/Insight/Insight.cpp @@ -51,7 +51,7 @@ void Insight::startup() { std::string qtAppName = "Bloom"; char* appArguments[] = {qtAppName.data()}; auto appArgCount = 1; -// QCoreApplication::addLibraryPath(QString::fromStdString(Application::getApplicationDirPath() + "/plugins")); + QCoreApplication::addLibraryPath(QString::fromStdString(Application::getApplicationDirPath() + "/plugins")); QCoreApplication::setAttribute(Qt::AA_ShareOpenGLContexts, true); this->application = new QApplication(appArgCount, appArguments); diff --git a/src/Insight/UserInterfaces/InsightWindow/InsightWindow.cpp b/src/Insight/UserInterfaces/InsightWindow/InsightWindow.cpp index 62e87f32..15bccbeb 100644 --- a/src/Insight/UserInterfaces/InsightWindow/InsightWindow.cpp +++ b/src/Insight/UserInterfaces/InsightWindow/InsightWindow.cpp @@ -127,6 +127,28 @@ void InsightWindow::init( this->ioUnavailableWidget->show(); } + + /* + * Do not delete svgWidget. It seems like it's absolutely pointless, but it's really not. I know this is gross but + * I don't seem to have any other option. + * + * You see, we use Qt's SVG libraries for some icons and other graphics in the Insight window, but because these are + * all loaded via the .ui and .qss file (at runtime, by Qt), and the fact that we don't use QSvgWidget anywhere in + * our C++ code, the linker doesn't link the SVG library to the Bloom binary! This then leads to the failure of + * rendering SVG images at runtime. + * + * I've scowered the internet looking for a solution to this, but I've found nothing! There was one post on the + * Qt forum, where someone had the very same issue: https://forum.qt.io/topic/61875/cmake-is-not-linking but no + * helpful responses. + * + * The easy solution is finding an excuse to use the QSvgWidget class in our code, but we have no real requirement + * of that. + * + * So for now, I'm just going to create an instance to QSvgWidget() here. Doing so will force the linker to link + * the libQt5Svg library. This will need to remain here until I find a better solution, or an actual need for the + * QSVGWidget class in our code. + */ + auto svgWidget = QSvgWidget(); } void InsightWindow::selectVariant(const TargetVariant* variant) {