summaryrefslogtreecommitdiff
path: root/src/main-lib/main.h
Commit message (Collapse)AuthorAgeFilesLines
* Fix memory leaks introduced by adding the PackageInfo mechanismRobert Griebl2022-03-211-1/+1
| | | | | | | | Found by the Linux/gcc/ASAN leak checker. Change-Id: I3c85515b994ad21b8718349baa81f9fc52a20615 Pick-to: 6.3 6.3.0 6.2 6.2.4 5.15 Reviewed-by: Bernd Weimer <bernd.weimer@qt.io>
* Remove the touch emulation featureRobert Griebl2022-03-171-1/+0
| | | | | | | | | This feature was implemented before Qt's pointer handlers were introduced and thanks to those it really isn't needed nowadays. Plus, it was only ever working on X11, limiting its usefulness. Change-Id: Icb03e2e8ede4fc5b62564fc70c20a460fe2d0134 Reviewed-by: Dominik Holland <dominik.holland@qt.io>
* Delay loading packages until a specified partition is mountedRobert Griebl2022-02-021-0/+1
| | | | | | | | | | This adds a new config option applications/installationDirMountPoint. If set, package database loading will be delayed until the specified mount point has been mounted. Change-Id: Icf43128031438f62ba4d0c401bb84bdd2d42701e Pick-to: 5.15 Reviewed-by: Dominik Holland <dominik.holland@qt.io>
* Clazy: fix srcRobert Griebl2021-08-201-1/+1
| | | | | Change-Id: I043882780fac7bed5d9dd75424ede46b54caa187 Reviewed-by: Dominik Holland <dominik.holland@qt.io>
* Remove the old deprecated ApplicationIPCManager IPC mechanismRobert Griebl2021-07-271-1/+0
| | | | | | | | The unit tests that needed an IPC side channel have been updated to use intents instead. Change-Id: Ifbd82728557eadaea08425e9eacf2cbf8a08293e Reviewed-by: Dominik Holland <dominik.holland@qt.io>
* cmake: Nearly full cmake buildRobert Griebl2021-06-181-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Had to rename a lot of things to conform with the standard Qt module layout that the cmake system expects: - all non-manual tests were moved to a sub-dir named auto/ - the benchmark was moved to tests/ - the 3rdparty folder was moved into src/ Other changes: - libyaml was updated to 2.2.5 while fixing a weird build issue that led to crashes on 64bit systems. - fixed build issues with the new 8.1 MingW compiler. - added support for QT_NO_OPENGL builds. The remaining issues are: - examples still don't build with qmake due to a potential bug in module.pri generation. - tests do run, but the test data is not generated yet dynamically. - qml-only tests are not built and run yet. - qml-only examples are not built yet. Fixes: AUTOSUITE-1632 Change-Id: Ic5fe0148e738b05835c73bed78e624b55861b75e Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Dominik Holland <dominik.holland@qt.io>
* Update copyright headers to 2021 an finally switch to the GPLRobert Griebl2021-06-011-25/+13
| | | | | | | | | Also removed all the SPDX tags and -QTAS license extensions. Change-Id: Ibd10fe37afcbba832831d027cf2f1891ca0226c0 Fixes: AUTOSUITE-1648 Fixes: AUTOSUITE-1646 Reviewed-by: Dominik Holland <dominik.holland@qt.io>
* Add a flag to allow installation of unsigned packagesRobert Griebl2021-04-231-2/+1
| | | | | | | | | | Internally this flag was always available, but you could only set it from the outside, by running with --no-security, which disabled all security related checks. Change-Id: I0f09208ad984a19e3b1337715ff00638f791abd1 Pick-to: 5.15 Reviewed-by: Dominik Holland <dominik.holland@qt.io>
* Remove legacy functionality: headless, pssdp and pshellserverRobert Griebl2020-11-281-7/+1
| | | | | Change-Id: Iffeaa944cce5d09d0a1d1af2d85aa5f5034b7f71 Reviewed-by: Robert Griebl <robert.griebl@qt.io>
* Add support for additional Wayland socketsRobert Griebl2020-09-231-1/+1
| | | | | | | | This extension allows the user to specify additional Wayland sockets that are not restricted by the $XDG_RUNTIME_DIR specification. Change-Id: Ia915a3db459af646877a17d6f44758a6e11f2d45 Reviewed-by: Bernd Weimer <bernd.weimer@pelagicore.com>
* Hide the sudo deployment warning if irrelevantRobert Griebl2020-02-041-0/+2
| | | | | | | | Also reworded it to be more specific if it becomes relevant. Change-Id: I60a2f8fca5d41c5e9776148911fada84602426cd Fixes: AUTOSUITE-1195 Reviewed-by: Dominik Holland <dominik.holland@qt.io>
* Do the necessary changes to the locale on startup implicitlyRobert Griebl2020-02-031-0/+1
| | | | | | | | | | Instead of requiring the boilerplate setup call to be copied into each and every system-ui, we do the setup now implicitly in the Main constructor. (Calling it explicitly beforehand doesn't hurt though) Change-Id: I549288397d397330af1733f8982666c54b4724cd Reviewed-by: Dominik Holland <dominik.holland@qt.io>
* Defer logging output until configuration is knownBernd Weimer2020-01-291-1/+3
| | | | | | | | | | | Logging output is deferred until the logging configuration is known to make sure that the content and format is appropriate. This also replaces special handling of deployment warnings. Added option to force instant logging. Task-number: AUTOSUITE-1423 Change-Id: Ieba5fb4ca675c7b7d025fc1847da8ca045c782d8 Reviewed-by: Robert Griebl <robert.griebl@qt.io>
* Fully transparent and generic cache for config and app databaseRobert Griebl2019-11-071-4/+4
| | | | | | | | | | The existing caching mechanism for config files was abstracted and extended, so that it could be re-used to parse and cache the info.yaml files. This results in a much more robust application database and should get rid of 99.9% of all the -r/--recreate-database option usages. Change-Id: Ic37fcd3b0e55d481712d469b6e331b9c433a9c5d Reviewed-by: Dominik Holland <dominik.holland@qt.io>
* Add new package abstraction, part 2Robert Griebl2019-10-281-0/+2
| | | | | | | | | | | | The first commit in this series was b4aee167d3bc6b9f64229317fbc428b3f3b83c0d. This update fixes all the known bugs introduced in the change of the architecture, adds basic documentation and examples. The changes in the intent sub-system are in a separate patch for easier review, although they both depend on each other due to changes in the API. Change-Id: Ia78da7e10e2eb7adfa30625554af275453065a90 Reviewed-by: Dominik Holland <dominik.holland@qt.io>
* Add support for Qt resourcesBernd Weimer2019-08-131-0/+1
| | | | | | | | | Qt resources can be added in the form of resource files or libraries that have resources compiled-in. The resource file system can be accessed with the ":" or "qrc://" prefix. Change-Id: I947d00de964f55cd6f6be173ff2f93d073aadc82 Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
* Rename from Luxoft AM to Qt AMRobert Griebl2019-08-051-1/+1
| | | | | | Change-Id: I84bbd9e7f735ed1864804a9887d3a02b7c925e53 Reviewed-by: Vladimir Minenko <vladimir.minenko@pelagicore.com> Reviewed-by: Bernd Weimer <bernd.weimer@pelagicore.com>
* Remove support for multiple installation locationsRobert Griebl2019-08-021-4/+2
| | | | | | | | | | | We had removed support for SD-Card (removable location) installations in a previous patch. Supporting multiple non-removable locations adds a lot of complexity to the AM's installer that isn't really needed, since modern Linux kernels can support these niche use-cases much more transparently through the device mapper/lvm infrastructure. Change-Id: Iaf10d2eb28b9d61e54c5268bcbdd623005b8508d Reviewed-by: Dominik Holland <dominik.holland@pelagicore.com>
* Add new package abstraction, which allows multiple executables per packageRobert Griebl2019-08-011-15/+10
| | | | | | | | This is part 1 which is missing doc updates and missing the update-builtin- applications functionality. Both will be added in a follow-up commit. Change-Id: I2b493cfb7585143962067674690b02cc132ef78b Reviewed-by: Dominik Holland <dominik.holland@pelagicore.com>
* Revert "Enable hardware OpenGL acceleration for Wayland clients"Robert Griebl2019-06-051-2/+0
| | | | | | | | | | | | This reverts commit 892394670ec2201ce24ee69e371419d98b8eb36e. The idea is sound, but it currently breaks on too many platforms right now: especially older distros (e.g. Ubuntu 16.04) and VMs (e.g. VMWare Player, even with up-to-date Mesa drivers). Change-Id: Ia853886e623781b09a079faa20c65c4feb1e91a8 Reviewed-by: Dominik Holland <dominik.holland@pelagicore.com> Reviewed-by: Egor Nemtsev <enemtsev@luxoft.com>
* Enable hardware OpenGL acceleration for Wayland clientsRobert Griebl2019-05-271-0/+2
| | | | | | | | | | | | | | | When running the AM on an X11 desktop, the Wayland clients will use the LLVM-pipe software renderer. Setting $QT_WAYLAND_CLIENT_BUFFER_INTEGRATION to "linux-dmabuf-unstable-v1" will enable the new buffer integration that will allow full GL acceleration. We need to make sure however to NOT enable this setting when running with the propiertary NVIDIA driver, which does not support the linux-dmabuf interface. See QTBUG-75575 for technical discussion around this. Change-Id: I7e4bb9ec38ee3eefa359535fc12bf38704c30358 Reviewed-by: Dominik Holland <dominik.holland@pelagicore.com>
* Remove the "install to SDCard" functionalityRobert Griebl2019-05-271-1/+1
| | | | | | | | | | | | | | | This was always a nice-to-have extra, but was never actually useful for users in real world projects. In addition, it * makes the installer code and tests and lot more complex * requires a lot of code with root privileges * uses deprecated kernel interfaces A replacement (as long as the SD doesn't have to be hot-swappable), is to either use ext2+encfs to format the SD or create a LUKS container on the SD and mount that before starting the AM. Change-Id: I17d3af79d67e1a2bc4c5be55e188826d3c8b2292 Reviewed-by: Dominik Holland <dominik.holland@pelagicore.com>
* Better automatic dbus setup during developmentRobert Griebl2019-03-141-5/+3
| | | | | | | | | | | | | | | | The default is now to always start a private session bus, unless explicitly configured otherwise. This solves 2 problems: 1) There's no difference between Linux and Mac/Win in regards to configuration default values 2) The 'notifications end up in the desktop environment' problems on Linux desktops cannot happen anymore with a default setup. The --start-session-dbus command line option is now the default and thus obsolete. Change-Id: Ib0487307668ba6d5edfb9c4b0daa5888d1e3b327 Reviewed-by: Kavindra Palaraja <kpalaraja@luxoft.com> Reviewed-by: Dominik Holland <dominik.holland@pelagicore.com>
* Update copyright statementsRobert Griebl2018-12-181-1/+2
| | | | | | | | - added 2019 - everything is (c) Luxoft instead of Pelagicore from now on Change-Id: I82f874f0b0601deae1bb39347821edaf3c4cc6d8 Reviewed-by: Dominik Holland <dominik.holland@pelagicore.com>
* Add options for intent timeouts and disabling intents and installerRobert Griebl2018-11-081-1/+1
| | | | | | | | The documentation for the intents options will be part of the intents documentation commit. Change-Id: I7b4ac11a4c77faedc57b8ea0b1cfa235342d7177 Reviewed-by: Daniel d'Andrada <daniel.dandrada@luxoft.com>
* Add support for Intents for both single- and multi-process modeRobert Griebl2018-10-121-0/+3
| | | | | | | | | | | | | | | | | | | | | | | This commit adds support for Intents, aka. a loosely coupled IPC between arbitrary applications in the AM system. (please read https://wiki.qt.io/QtAppMan-Intents for same background information). The core implementation on both server and client side in this patch is not dependent on the AM itself (apart from the common-lib for convenience sake, but this dependency could easily be removed). There are 2 interfaces that are implemented in the manager-lib and launcher-lib that connect the Intent core to the actual AM and AM's qml runtime launcher. Missing features: - updating the list of intents on app installation and removal - support for background services in the AM itself - support for "file-handles" in the request and reply part - documentation - an example that is better focused on intents themselves Change-Id: Ia7cab2bb569fb2cdb8e5ab7e8167e477cff3068c Reviewed-by: Dominik Holland <dominik.holland@pelagicore.com>
* Make SystemMonitor instantiable from QMLDaniel d'Andrada2018-08-211-1/+0
| | | | | | | | | | | | | Instead of a being a singleton. Advantages: - Cleaner QML code as it's easier to declare bindings on SystemMonitor properties if it's an instance declared in QML. - Better control the object lifecycle - Faster start up times Change-Id: I9f642f5b9bbb26ca2ab2db6c33a088798a9c8acf Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
* Make the application database cache optionalDaniel d'Andrada2018-08-141-3/+6
| | | | | | | And remove the database entry from the examples' config files Change-Id: Ic5fd42f086d32e59ffaab638c92dcf0d5b0ea2fa Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
* Fix store-signed packagesRobert Griebl2018-08-031-0/+1
| | | | | | | | | There were multiple bugs in the way store signatures were created and verified. This patch should fix all issues, plus it adds auto-tests to catch regressions going forward. Change-Id: I903bcc7d2dc485b5ed4ee7448d1f1e1ac8242c29 Reviewed-by: Bernd Weimer <bernd.weimer@pelagicore.com>
* Merge remote-tracking branch 'tqc/5.11' into devRobert Griebl2018-06-071-1/+2
|\ | | | | | | Change-Id: Ifea3d53d9dfcb56dd5f98eb5c8ae4c97348fbe61
| * Add options to specify iconTheme and searchPaths in am-config.yamlDominik Holland2018-06-071-1/+2
| | | | | | | | | | | | | | | | | | | | This makes it easier to use a custom icon theme in the system-ui as well as in the apps. Change-Id: I8490e74541d0d9cb12e7ff542ef05679c2489812 Reviewed-by: Bramastyo Harimukti Santoso <bramastyo.harimukti.santoso@pelagicore.com> Reviewed-by: Lukáš Tinkl <ltinkl@luxoft.com> Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
* | Refactor the Application objectDaniel d'Andrada2018-05-141-6/+6
|/ | | | | | | | | | | | | | | | Split the original Application object into two parts: the dynamic and the static one. The dynamic is called Application and lives in the manager lib The static is called ApplicationInfo and lives in the application lib On top of that make a clear distinction between aliases and real application objects, which solves some inconsistencies. Also removed all deprecated properties from the original Application object Task-number: AUTOSUITE-296 Change-Id: I8354c9d50f14d083cb85c19153dd19c933eae660 Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
* Clang code model fixesRobert Griebl2018-04-171-1/+1
| | | | | Change-Id: I46bb240aa843c297e83278a4f1b29f95be093c83 Reviewed-by: Thomas Senyk <thomas.senyk@pelagicore.com>
* Header cleanup, fixing syncqt warningsRobert Griebl2018-03-161-7/+6
| | | | | Change-Id: Ide43048bd3d5dc9177029ff64e611973d0ee12f4 Reviewed-by: Dominik Holland <dominik.holland@pelagicore.com>
* Simplify the sudo server interfaceRobert Griebl2018-03-161-1/+1
| | | | | | | Also bring it more in line with how the other APIs work in the AM. Change-Id: I5ec1b4c3313c90808411ca374fac1552142c4372 Reviewed-by: Dominik Holland <dominik.holland@pelagicore.com>
* Fix "enable-widgets" optionJacques GUILLOU2018-03-011-5/+7
| | | | | Change-Id: I8bebd419b4c75bc7569fcf6c6aa389906924e307 Reviewed-by: Bernd Weimer <bernd.weimer@pelagicore.com>
* Add new "deployment" logging categoryBernd Weimer2018-02-281-1/+1
| | | | | | | | | This new logging category has been introduced in order to get finer control on warnings at startup. Also logging is delayed until rules are set. Change-Id: I311d8ba929f474120665c96f854bae4a48f9ebb9 Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
* Update Pelagicore copyright headers to 2018Robert Griebl2018-02-071-1/+1
| | | | | Change-Id: I8d9278053ccdef5a57e51753aa6157941ebcee52 Reviewed-by: Dominik Holland <dominik.holland@pelagicore.com>
* Refactor the interface between the AM and runtime launchersRobert Griebl2017-12-151-19/+5
| | | | | | | | | | | | | * A lot of shared code was moved to the new shared-main library, making it easier to write custom runtime launchers * Simplified the qml runtime launcher * The new OpenGL versioning was extended to apps using the QML runtime * Settings are communicated to the apps as plain text YAML documents now, which makes it very easy to verify and extended this interface. Task-number: AUTOSUITE-162 Change-Id: I0c1be3ac2e38ab492e69182058098cf31d34484b Reviewed-by: Dominik Holland <dominik.holland@pelagicore.com>
* Move the MouseTouchAdaptor from neptune to the application-managerRobert Griebl2017-11-291-0/+1
| | | | | | | | This way we can (a) re-use the functionality in other system-uis and (b) easily disable it when e.g. testing with Squish. Change-Id: Icbfb3dfac5283eebe1cf4855386e27c6d1a430dc Reviewed-by: Dominik Holland <dominik.holland@pelagicore.com>
* Add support for OpenGL version and profile selectionRobert Griebl2017-11-141-0/+11
| | | | | | | | | Also cleaned up the pre-QApplication constructor setup functionality by moving a lot of low-level technical details from the main function into the Main class - this helps a lot with keeping e.g. neptune in sync. Change-Id: I869a6d029749b5a994ed09577490beb0ef419178 Reviewed-by: Thomas Senyk <thomas.senyk@pelagicore.com>
* Fix headless buildRobert Griebl2017-11-031-1/+1
| | | | | Change-Id: I415450e454707a0074fbdc32024d3bf1df6a0d79 Reviewed-by: Dominik Holland <dominik.holland@pelagicore.com>
* Add option to enable support for Qt widgets in System UIJacques GUILLOU2017-11-031-0/+3
| | | | | | | | Support for Qt widgets can be useful for some development tools for example. Change-Id: Ie77e42730f692413485899ed63073fd81f709abe Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
* Make the AM quit in single-app mode, if the app quitsRobert Griebl2017-10-101-1/+1
| | | | | Change-Id: Ida57267106ca81cc4bbd6e541d9c74986da67297 Reviewed-by: Dominik Holland <dominik.holland@pelagicore.com>
* Fix handling of main Qml files as Qt resourcesRobert Griebl2017-09-141-2/+4
| | | | | | | | | With this patch, it is now possible to specify the main Qml as either :/Main.qml or qrc:/Main.qml, if Main.qml is living in a Qt resource. Change-Id: Ie7ba3a5d456af9349849fe352a26ab35a4afb645 Task-number: QTAUTO-559 Reviewed-by: Dominik Holland <dominik.holland@pelagicore.com>
* Fix qml autotestDominik Holland2017-07-171-2/+2
| | | | | | | | | | debugApplication is supposed to return an error in the single-process case. This is now tested. Refactored "Main" to properly set the buildConfig for the testrunner. Change-Id: If0af720a85345258246dc9b09182c4fffab894f6 Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
* Setup installation locations before useBernd Weimer2017-07-111-3/+3
| | | | | | | | | | | | Installation locations were initialized after the application databse has been loaded. However, installation locations are used during database laoding to fix the application base directory of installed applications. This had the effect that installed apps would only run directly after installation, but not any more after a restart of appman. Change-Id: I29592a282dc47456e9387be9a0d41dfe3e8b225f Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
* Replace debug-wrapper specifications with more powerful syntaxRobert Griebl2017-07-051-1/+0
| | | | | | | | | | | | Pre-defining the wrappers in a config file turned out to be too inflexible for everyday use, so wrapper specifications are now direct shell commands with placeholders (e.g. "valgrind --tool=helgrind %program%"). In addition, these command also support specifying environment variable, just as you would do on the command line (e.g. "QT_DEBUG_PLUGINS=1 strace") Change-Id: I1509a9fefd01c778e2fb6c5b87f811ec9571a946 Reviewed-by: Dominik Holland <dominik.holland@pelagicore.com>
* Made the external D-Bus interfaces a compile time optionRobert Griebl2017-07-031-1/+3
| | | | | | | | | | | | | | | Running qmake -config disable-external-dbus-interfaces will now compile out the support for all the external interfaces (ApplicationManager, WindowManager, ApplicationInstaller and NotificationManager). This also cleans up the implementation of these singletons, since we are now using a custom "2 step" DBus adaptor to get around the QtDBus limitation that requires the original object to derive from QDBusContext (although this violates every layering rule). In any case, this will not affect the private P2P Bus between the AM and the apps. Change-Id: I53d9c3b6d3a010ed7d65e3a80005bd18a7bb9c23 Reviewed-by: Dominik Holland <dominik.holland@pelagicore.com>
* Refactor the src/manager dir into a sub-moduleRobert Griebl2017-06-021-0/+171
* the appman binary is now built from src/tools/appman * renamed all the main.cpp files to the names of their containing directories (avoids a lot of confusion) * all dependencies between the src modules and the tools are now handled centrally in src.pro * removed the Android deployment, since it doesn't work as-is on newer Android version anymore - we have to come up with a new plan on how to package up the AM plus a system-ui in one APK Change-Id: Ieb4536a7ab2a301488de09db61844da092620859 Reviewed-by: Dominik Holland <dominik.holland@pelagicore.com>