Uploaded image for project: 'Qbs ("Cubes")'
  1. Qbs ("Cubes")
  2. QBS-1374

QBS deletes my /home/user folder with certain settings...

    XMLWordPrintable

    Details

    • Type: Suggestion
    • Status: Closed
    • Priority: Not Evaluated
    • Resolution: Incomplete
    • Affects Version/s: 1.10.1
    • Fix Version/s: None
    • Labels:
      None
    • Platform/s:
      Linux/X11

      Description

      Ughh, I feel sick. I was playing around with the cpp module, trying to get my application to install to link with shared objects....

      And on run, it starts to delete my entire home directory, destroying hundreds of hours of work.

      I know this is a user error sort of thing... but there should be a warning, or perhaps better templating to avoid this.

       

      Here was my qbs file that did it. Im not sure exactly what here did it but, ughh

       

       

      import qbs
      CppApplication {
       id: application;
       name: "wikipedia"
       qbs.installPrefix: "usr"
       qbs.installRoot: "/"
      Depends {name: "cpp"}
       Depends {name: "Qt.core" }
       Depends {name: "Qt.webenginewidgets" }
       Depends {name: "Qt.concurrent" }
      consoleApplication: true
       cpp.cxxLanguageVersion: "c++11"
       cpp.defines: [
       // The following define makes your compiler emit warnings if you use
       // any feature of Qt which as been marked deprecated (the exact warnings
       // depend on your compiler). Please consult the documentation of the
       // deprecated API in order to know how to port your code away from it.
       "QT_DEPRECATED_WARNINGS",
      // You can also make your code fail to compile if you use deprecated APIs.
       // In order to do so, uncomment the following line.
       // You can also select to disable deprecated APIs only up to a certain version of Qt.
       //"QT_DISABLE_DEPRECATED_BEFORE=0x060000" // disables all the APIs deprecated before Qt 6.0.0
       ]
       cpp.dynamicLibraries: [
       "/usr/lib/qconsoledesigner/libqnetworktoolkit.so",
       "/usr/lib/qconsoledesigner/libqparsingtoolkit.so",
       "/usr/lib/qconsoledesigner/libqconsoletoolkit.so",
       "/usr/lib/qconsoledesigner/libqunicodetoolkit.so",
       "/usr/lib/qconsoledesigner/libqaudibletoolkit.so",
       ]
      Group {
       qbs.install: true
       qbs.installDir: "share/" + project.name + "/" + application.name
       files: [
       "Civilization/civilization.h",
       "Culture/culture.h",
       "Economics/economics.h",
       "History/history.h",
       "Military/military.h",
       "Music/music.h",
       "Philosophy/philosophy.h",
       "Physics/physics.h",
       "Psychology/psychology.h",
       "Socialism/socialism.h",
       "Theatre/theatre.h",
       ]
       }
       files: [
       "wikipedia.cpp",
       ]
      Group { // Properties for the produced executable
       name: "application"
       fileTagsFilter: "application"
       qbs.install: true
       qbs.installDir: "bin"
       }
      

      }

       

       

        Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            kandeler Christian Kandeler
            Reporter:
            akiva Akiva Avraham
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes