OfficeViewer
This project provides an example using LibreOffice to open documents.
Terms of Use and Participation
The source code of the project is provided under the license, that allows it to be used in third-party applications.
The contributor agreement documents the rights granted by contributors to the Open Mobile Platform.
For information about contributors see AUTHORS.
Code of conduct is a current set of rules of the Open Mobile Platform which informs you how we expect the members of the community will interact while contributing and communicating.
Project Structure
The project has a common structure of an application based on C++ and QML for Aurora OS.
- ru.auroraos.OfficeViewer.pro file describes three subdirs of the project: application, documentprovider and viewer.
-
application directory contains source code of main application.
- icons directory contains application icons for different screen resolutions.
-
qml directory contains the QML source code and the UI
resources.
- cover directory contains the application cover implementations.
- icons directory contains the custom UI icons.
- pages directory contains the application pages.
- OfficeViewer.qml file provides the application window implementation.
-
src directory contains the C++ source code.
- main.cpp file is the application entry point.
- translations directory contains the UI translation files.
- ru.auroraos.OfficeViewer.desktop file defines the display and parameters for launching the application.
- documentprovider directory contains document provider library.
- libs directory contains additional libraries for project building: cairo, libepoxy and liblangtag.
-
rpm directory contains the rpm-package build settings.
- ru.auroraos.OfficeViewer.spec file is used by rpmbuild tool.
- tarballs directory contains dependencies in the form of archives necessary for the LibreOffice build.
- upstream directory contains source code LibreOffice as git submodule.
- viewer directory contains UI components of docviewer.
Compatibility
The project is compatible with all the supported versions of the Aurora OS.
Project Building
Building the application with Qt Creator IDE
To build the application with Qt Creator IDE use the next steps:
- Open the project.
- Open the
Projects
menu, select the target and chooseBuild
section. - Activate the
Shadow build
checkbox. - Enter the absolute project root path in the
Build directory
field.
Building the application with no Qt Creator IDE
To build the application with no Qt Creator IDE use the next steps:
- Open a terminal or command prompt.
- Navigate to the directory that contains your Git repository.
- Execute the command
git lfs pull
to download any files tracked by LFS. - Execute the command
git submodule update --init
to update and initialize any submodules in the repository. - Set the target
sfdk config target=AuroraOS-4.0.2.249-base-armv7hl
. - Execute the command
sfdk build-init
to initialize the build enviropment. - Execute the command
sfdk prepare
to apply the patches needed for the build. - Execute the command
sfdk build
to start building the package. - Execute the command
sfdk device list
to show the avaliable devices to deploy the result. - Execute the command
sfdk config device="INOI P4903 (ARM)"
to set a device to deploy. The INOI P4903 (ARM) is an example of the target device. - Execute the command to sign the rpm-package:
sfdk engine exec rpmsign-external sign \
--key absolute/path/to/key/file.pem \
--cert absolute/path/to/cert/file.pem \
absolute/path/to/rpm/package.rpm
The target rpm-package is in the RPMS directory of the project.
- Execute the command
sfdk deploy --sdk --silent
to deploy the application.
Note: To execute the steps "git lfs pull" and "git submodule update --init", you will need to have Git Large File Storage (LFS) and Git Submodule plugins installed on your system.
Package signature
You can read about package signing in package_signing
Repeated building for another target
The build is run in the same directory as the application sources so it's necessary to delete the previous building results before a new build for another target.
Run the next commands from the project root directory:
rm -fr libs_build
rm -fr upstream/workdir
cd libs/liblangtag && make distclean
Connect to the target, move to the project directory and invoke the command:
make distclean