Коммит db88b314 создал по автору Маркевич Даниил Сергеевич's avatar Маркевич Даниил Сергеевич
Просмотр файлов

[feature] Add flutter 3.32.7 support.

владелец 2f68b7f5
# Authors
* Daniil Markevich, <d.markevich@omp.ru>
* Developer, 2025
* Maintainer, 2025
* Vitaliy Zarubin, <v.zarubin@omp.ru>
* Developer, 2025
* Nikita Krasavin, <n.krasavin@omp.ru>
* Reviewer, 2025
* Pavel Eliseev <p.eliseev@omp.ru>
* Reviewer, 2025
* Andrey Begichev <a.begichev@omp.ru>
* Reviewer, 2025
* Sergey Ovchinnikov <s.ovchinnikov@omp.ru>
* Reviewer, 2025
## Updated: 10/10/2024 10:29:19 AM
# Changelog
## Info
## 1.2.0
* Added support for flutter 3.32.7
- Last tag: v1.0.0
- Released: 4
## 1.1.2
* Clear description plugin for publication
## Versions
## 1.1.1
* Clear README
- Version: v1.0.0 (07/07/2021)
- Version: file_manager-1.1.0-aurora (18/09/2024)
- Version: file_manager-1.0.2-aurora (18/09/2024)
- Version: aurora-1.1.1 (04/10/2024)
## 1.0.0
* Basic implementation of the plugin
# Code of Conduct
## What is this code of conduct for?
Code of conduct is a current set of rules of the Open Mobile Platform
which informs you how we expect
the members of the Open Mobile Platform community
will interact while contributing and communicating.
We are committed to providing a friendly, safe and welcoming
environment for all, regardless of gender, gender identity and expression,
sexual orientation, ability, physical appearance, body size, race, age,
socioeconomic status, religion (or lack thereof),
or other marginalized aspect of community members.
We expect all members of the Open Mobile Platform community
to abide by this Code of Conduct whenever interacting
in Open Mobile Platform venues
(merge requests, pull requests, issues, 1-1 or group chat, meetups, conferences, etc.)
## Examples of appropriate behavior
* Using welcoming and inclusive language.
* Being respectful of differing viewpoints and experiences.
* Gracefully accepting constructive criticism.
* Focusing on what is best for the community.
* Showing empathy towards other community members.
## Examples of inappropriate behavior
Because we come from a variety of backgrounds,
we do not want to assume that everyone has the same assumptions
about what is and is not appropriate.
Here are some examples of inappropriate behavior
that are incompatible with our community's ethos:
* spamming, trolling, intentionally disrupting conversations,
or irrelevant solicitation or advertisement;
* making demeaning or discriminatory comments;
* making negative assumptions about someone's background,
abilities, or intentions;
* harassing or stalking individuals (online or in person).
In general: treat others how you would like to be treated,
were you in their place.
Do ask questions.
Do keep conflicts productively focused on technical issues.
Do remember that we are all people, not robots,
and all equally deserving of sensitivity and respect.
## What will organizers do about inappropriate behavior?
If we notice you doing or saying something inappropriate,
an organizer will ask you to stop.
We will not demonize you.
But please do stop the inappropriate behavior
so we can get back to writing and discussing code in a safe environment.
If you have philosophical disagreements about what is actually inappropriate,
please take them to a separate public or private conversation
with an Open Mobile Platform maintainer
so we don't turn pull requests into an ethics debate.
If you keep doing unacceptable things,
we will likely ban you, report you to the administration,
or take other appropriate action.
## What if I see or am subject to what feels like inappropriate behavior?
Let us know.
Please notify a community organizer as soon as possible.
Full contact information is listed in the Contact Info section of this document.
All communications will be kept strictly confidential,
unless otherwise required by law.
No issue will be considered too inconsequential or unimportant for us
to have a conversation about.
## Contact Info
If you need to report an incident,
please contact <community@omp.ru>.
This work is licensed under a Creative Commons Attribution 3.0 Unported License
For attribution requirements:
«Open Mobile Platform Code of Conduct»
Copyright (c) 2024-2025 Open Mobile Platform LLC,
used under a [Creative Commons Attribution Unported license](http://creativecommons.org/licenses/by/3.0/).
# Contributor License Agreements
Thank you for your interest in contributing
to software projects managed by Open Mobile Platform («We» or «Us»).
This contributor agreement («Agreement»)
documents the rights granted by contributors to Us.
To make this document effective,
please sign it and send it to Us by email or electronic submission.
This is a legally binding document,
so please read it carefully before agreeing to it.
The Agreement may cover more than one software project managed by Us.
## 1. Definitions
**«We» or «Us»** means Open Mobile Platform Limited Liability Company
(Open Mobile Platform LLC),
420500, Republic of Tatarstan, Verkhneuslonsky District,
Innopolis, Universitetskaya Street, h. 7, office 59,
OGRN (Primary State Registration Number) 1161690087020.
**«You»** means the individual who Submits a Contribution to Us.
**«Contribution»** means any work of authorship
that is Submitted by You to Us
in which You own or assert ownership of the Copyright.
**«Copyright»** means all rights protecting works of authorship
owned or controlled by You,
including copyright, moral and neighboring rights, as appropriate,
for the full term of their existence including any extensions by You.
**«Material»** means the work of authorship
which is made available by Us to third parties.
When this Agreement covers more than one software project,
the Material means the work of authorship
to which the Contribution was Submitted.
After You Submit the Contribution,
it may be included in the Material.
**«Submit»** means any form of electronic, verbal, or written communication
sent to Us or our representatives,
including but not limited to electronic mailing lists,
source code control systems, and issue tracking systems
that are managed by, or on behalf of, Us
for the purpose of discussing and improving the Material,
but excluding communication that is conspicuously marked
or otherwise designated in writing by You as «Not a Contribution».
**«Submission Date»** means the date
on which You Submit a Contribution to Us.
**«Effective Date»** means the date You execute this Agreement
or the date You first Submit a Contribution to Us,
whichever is earlier.
**«Media»** means any portion of a Contribution which is not software.
## 2. Grant of Rights
### 2.1. Copyright License
(a) You retain ownership of the Copyright in Your Contribution
and have the same rights to use or license the Contribution
which You would have had without entering into the Agreement.
(b) To the maximum extent permitted by the relevant law,
You grant to Us a perpetual, worldwide, non-exclusive,
transferable, royalty-free, irrevocable license
under the Copyright covering the Contribution,
with the right to sublicense
such rights through multiple tiers of sublicensees,
to reproduce, modify, display, perform and distribute
the Contribution as part of the Material;
provided that this license is conditioned upon compliance with Section 2.3.
### 2.2. Patent License
For patent claims including, without limitation,
method, process, and apparatus claims
which You own, control or have the right to grant, now or in the future,
You grant to Us a perpetual, worldwide, non-exclusive,
transferable, royalty-free, irrevocable patent license,
with the right to sublicense these rights to multiple tiers of sublicensees,
to make, have made, use, sell, offer for sale, import
and otherwise transfer the Contribution
and the Contribution in combination with the Material
(and portions of such combination).
This license is granted only to the extent
that the exercise of the licensed rights infringes such patent claims;
and provided that this license is conditioned upon compliance with Section 2.3.
### 2.3. Outbound License
Based on the grant of rights in Sections 2.1 and 2.2,
if We include Your Contribution in a Material,
We may license the Contribution under any license,
including copyleft, permissive, commercial, or proprietary licenses.
As a condition on the exercise of this right,
We agree to also license the Contribution
under the terms of the license or licenses
which We are using for the Material on the Submission Date.
### 2.4. Our Rights
You acknowledge that We are not obligated
to use Your Contribution as part of the Material
and may decide to include any Contribution We consider appropriate.
## 3. Agreement
You confirm that:
(a) You have the legal authority to enter into this Agreement.
(b) You own the Copyright and patent claims
covering the Contribution which are required
to grant the rights under Section 2.
(c) The grant of rights under Section 2
does not violate any grant of rights
which You have made to third parties, including Your employer.
If You are an employee,
You have had Your employer approve this Agreement
or sign the Entity version of this document.
If You are less than eighteen years old,
please have Your parents or guardian sign the Agreement.
## 4. Disclaimer
EXCEPT FOR THE EXPRESS WARRANTIES IN SECTION 3,
THE CONTRIBUTION IS PROVIDED «AS IS».
MORE PARTICULARLY, ALL EXPRESS OR IMPLIED WARRANTIES
INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTY OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE
AND NON-INFRINGEMENT ARE EXPRESSLY DISCLAIMED BY YOU TO US.
TO THE EXTENT THAT ANY SUCH WARRANTIES CANNOT BE DISCLAIMED,
SUCH WARRANTY IS LIMITED IN DURATION TO THE MINIMUM PERIOD PERMITTED BY LAW.
## 5. Miscellaneous
5.1. This Agreement will be governed by and construed
in accordance with the laws of Russian Federation.
5.2. This Agreement sets out the entire agreement between You
and Us for Your Contributions to Us
and overrides all other agreements or understandings.
5.3. If You or We assign the rights or obligations
received through this Agreement to a third party,
as a condition of the assignment,
that third party must agree in writing
to abide by all the rights and obligations in the Agreement.
5.4. The failure of either party to require performance
by the other party of any provision of this Agreement in one situation
shall not affect the right of a party
to require such performance at any time in the future.
A waiver of performance under a provision in one situation
shall not be considered a waiver of the performance
of the provision in the future or a waiver of the provision in its entirety.
5.5. If any provision of this Agreement is found void and unenforceable,
such provision will be replaced to the extent possible with a provision
that comes closest to the meaning of the original provision
and which is enforceable.
The terms and conditions set forth in this Agreement
shall apply notwithstanding any failure of essential purpose
of this Agreement or any limited remedy
to the maximum extent possible under law.
## 6. How to contribute
First of all, thank you for deciding to participate in the development of the project!
Please at the [contribution guidelines](https://developer.auroraos.ru/git/wiki/-/wikis/CONTRIBUTING.ru).
This will make the work easier for project maintainers and provide the most enjoyable experience for all participants.
If you like the project but don't have the opportunity to contribute, that's OK.
There are easy ways to support the project, which we will be happy to do as well:
* give the project a star;
* write about the project on social networks;
* mention the project in your projects;
* talk about the project at events;
* tell your friends or colleagues about the project.
BSD 3-Clause License
(c) Copyright 2021 DevsOnFlutter (Devs On Flutter)
(c) Copyright 2024 Open Mobile Platform LLC <community@omp.ru>
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors
may be used to endorse or promote products derived from this software without
specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# The 3-Clause BSD License
Copyright 2021 DevsOnFlutter (Devs On Flutter)
Copyright 2024-2025 Open Mobile Platform LLC <community@omp.ru>
Redistribution and use in source and binary forms,
with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions of source code must retain
the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce
the above copyright notice, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# File Manager
**EN** | [RU](README.ru.md)
FileManager is a wonderful widget that allows you to manage files and folders, pick files and folders, and do a lot more.
Designed to feel like part of the Flutter framework.
# file_manager
## Compatibility
File Manager is a Flutter widget that provides file system browsing and management functionality for Aurora OS, Android, and Linux devices. The plugin offers a customizable UI for navigating directories, viewing files, and performing file operations with sorting capabilities.
**Usage example:**
```dart
final FileManagerController controller = FileManagerController();
FileManager(
controller: controller,
builder: (context, snapshot) {
return ListView.builder(
itemCount: snapshot.files.length,
itemBuilder: (context, index) {
final file = snapshot.files[index];
return ListTile(
leading: Icon(file.isDirectory ? Icons.folder : Icons.insert_drive_file),
title: Text(file.name),
subtitle: Text(file.sizeFormatted),
onTap: () {
if (file.isDirectory) {
controller.openDirectory(file);
}
},
);
},
);
},
)
```
&nbsp; Android </br>
&nbsp; Linux </br>
&nbsp; Aurora </br>
&nbsp; Windows ([in progress](https://github.com/4-alok/file_manager/tree/windows-support))</br>
&nbsp; MacOS (active issue: [MacOS support](https://github.com/DevsOnFlutter/file_manager/issues/8)) </br>
## Usage
## Contents
- [Installation and build](#installation-and-assembly)
- [Detailed description](#detailed-description)
- [Compatibility](#compatibility)
- [Terms of use and participation in development](#terms-of-use-and-participation)
**pubspec.yaml**
<a name="installation-and-assembly"></a>
## Installation and build
Add the plugin depending on the target application in the `pubspec.yaml` file:
```yaml
dependencies:
file_manager:
git:
url: https://developer.auroraos.ru/git/flutter/flutter-community-plugins/file_manager
ref: aurora-1.1.2
url: https://developer.auroraos.ru/git/flutter/flutter-community-plugins/file_manager.git
```
***.dart**
```dart
FileManager(
controller: controller,
builder: (context, snapshot) {
final List<FileSystemEntity> entities = snapshot;
return ListView.builder(
itemCount: entities.length,
itemBuilder: (context, index) {
return Card(
child: ListTile(
leading: FileManager.isFile(entities[index])
? Icon(Icons.feed_outlined)
: Icon(Icons.folder),
title: Text(FileManager.basename(entities[index])),
onTap: () {
if (FileManager.isDirectory(entities[index])) {
controller.openDirectory(entities[index]); // open directory
} else {
// Perform file-related tasks.
}
},
),
);
},
);
},
),
And update the dependencies:
```bash
flutter pub get
```
*The complete example is available [here](https://github.com/DevsOnFlutter/file_manager/blob/main/example/lib/main.dart).*
<a name="detailed-description"></a>
## Detailed description
The File Manager plugin provides a comprehensive set of features for file system navigation and management:
### Key Features:
- **File System Navigation**: Browse directories and traverse the file system hierarchy
- **Customizable UI**: Builder pattern allows complete control over the file list appearance
- **File Sorting**: Sort files and folders by name, date, type, or size
- **Storage Access**: Access to different storage locations on the device
- **Platform Support**: Works on Aurora OS, Android, and Linux platforms
- **File Information**: Display file sizes, types, and modification dates
- **Hidden Files**: Option to show or hide hidden files and directories
### Main Components:
- **FileManager Widget**: Main UI component for displaying file contents
- **FileManagerController**: Handles navigation state and file operations
- **SortBy Enum**: Defines sorting options (name, date, type, size)
- **FileSystem Extensions**: Utility methods for file operations
### Integration:
The plugin seamlessly integrates with Flutter applications and follows Material Design guidelines. It provides callbacks for file selection, navigation events, and error handling.
<a name="compatibility"></a>
## Compatibility
The plugin has been working correctly since the 5.0.0 version of the Aurora OS.
### Requirements
- **Flutter**: 3.32.7 or higher
- **Aurora OS**: 5.0.0 or higher
<a name="terms-of-use-and-participation"></a>
## Terms of Use and Participation
The source code of the project is provided under
[the license](LICENSE.BSD-3-Clause.md),
that allows it to be used in third-party applications.
To participate in the development of the project, please read the [contributor agreement](CONTRIBUTING.md).
If you plan to contribute your own source code to the project, you will need to accept the [CLA agreement](https://developer.auroraos.ru/git/wiki/-/wikis/CLA.ru).
For information about contributors see [AUTHORS](AUTHORS.md).
[Code of conduct](CODE_OF_CONDUCT.md) 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.
[EN](README.md) | **RU**
# file_manager
File Manager — это виджет Flutter, который предоставляет функциональность просмотра и управления файловой системой на устройствах ОС Аврора, Android и Linux. Плагин предлагает настраиваемый пользовательский интерфейс для навигации по каталогам, просмотра файлов и выполнения файловых операций с возможностями сортировки.
**Пример использования:**
```dart
final FileManagerController controller = FileManagerController();
FileManager(
controller: controller,
builder: (context, snapshot) {
return ListView.builder(
itemCount: snapshot.files.length,
itemBuilder: (context, index) {
final file = snapshot.files[index];
return ListTile(
leading: Icon(file.isDirectory ? Icons.folder : Icons.insert_drive_file),
title: Text(file.name),
subtitle: Text(file.sizeFormatted),
onTap: () {
if (file.isDirectory) {
controller.openDirectory(file);
}
},
);
},
);
},
)
```
## Содержание
- [Установка и сборка](#installation-and-assembly)
- [Подробное описание](#detailed-description)
- [Совместимость](#compatibility)
- [Правила использования и участие в разработке](#terms-of-use-and-participation)
<a name="installation-and-assembly"></a>
## Установка и сборка
Добавить плагин в зависимости целевого приложения в файле `pubspec.yaml`:
```yaml
dependencies:
file_manager:
git:
url: https://developer.auroraos.ru/omprussia/flutter/file_manager.git
```
И обновить зависимости:
```bash
flutter pub get
```
<a name="detailed-description"></a>
## Подробное описание
Плагин File Manager предоставляет полный набор функций для навигации по файловой системе и управления файлами:
### Основные возможности:
- **Навигация по файловой системе**: Просмотр каталогов и перемещение по иерархии файловой системы
- **Настраиваемый интерфейс**: Паттерн Builder позволяет полностью контролировать внешний вид списка файлов
- **Сортировка файлов**: Сортировка файлов и папок по имени, дате, типу или размеру
- **Доступ к хранилищу**: Доступ к различным местам хранения на устройстве
- **Поддержка платформ**: Работает на ОС Аврора, Android и Linux
- **Информация о файлах**: Отображение размеров, типов и дат изменения файлов
- **Скрытые файлы**: Возможность показа или скрытия скрытых файлов и каталогов
### Основные компоненты:
- **Виджет FileManager**: Основной компонент пользовательского интерфейса для отображения содержимого файлов
- **FileManagerController**: Управляет состоянием навигации и файловыми операциями
- **Перечисление SortBy**: Определяет параметры сортировки (имя, дата, тип, размер)
- **Расширения файловой системы**: Вспомогательные методы для файловых операций
### Интеграция:
Плагин seamlessly интегрируется с Flutter-приложениями и следует рекомендациям Material Design. Он предоставляет обратные вызовы для выбора файлов, событий навигации и обработки ошибок.
<a name="compatibility"></a>
## Совместимость
Плагин корректно работает начиная с 5.0.0 версии ОС Авроры.
### Требования
- **Flutter**: 3.32.7 или выше
- **ОС Аврора**: 5.0.0 или выше
<a name="terms-of-use-and-participation"></a>
## Правила использования и участие в разработке
Исходный код проекта предоставляется по [лицензии](LICENSE.BSD-3-Clause.md), которая позволяет использовать его в сторонних приложениях.
Для участия в развитии проекта, пожалуйста, ознакомьтесь с [cоглашением участника](CONTRIBUTING.md).
Если Вы планируете присылать свой исходный код для включения в состав проекта, Вам понадобится принять [условия CLA](https://developer.auroraos.ru/git/wiki/-/wikis/CLA.ru).
Информация об участниках указана в файле [AUTHORS](AUTHORS.md).
[Кодекс поведения](CODE_OF_CONDUCT.md) — это действующий набор правил компании «Открытая Мобильная Платформа», который информирует об ожиданиях по взаимодействию между членами сообщества при общении и работе над проектами.
# SPDX-FileCopyrightText: Copyright 2024 Open Mobile Platform LLC <community@omp.ru>
# SPDX-FileCopyrightText: Copyright 2024-2025 Open Mobile Platform LLC <community@omp.ru>
# SPDX-License-Identifier: BSD-3-Clause
include: package:flutter_lints/flutter.yaml
......@@ -30,6 +30,7 @@
.pub-cache/
.pub/
/build/
/pubspec.lock
# Web related
lib/generated_plugin_registrant.dart
......
# example
# file_manager_example
A new Flutter project.
An example demonstrating the available functions of the file_manager plugin.
## Getting Started
## Description
The example demonstrates:
- how to browse files and directories;
- how to sort files by name, date, type, and size;
- how to navigate through the file system.
This project is a starting point for a Flutter application.
## Features
- **File Navigation**: Browse directories and traverse the file system hierarchy
- **File Sorting**: Sort files and folders by various criteria
- **File Icons**: Contextual icons for different file types
- **Storage Access**: Access to different storage locations on the device
A few resources to get you started if this is your first Flutter project:
## Screenshots
- [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab)
- [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook)
![page 1](screenshots/page_1.png)
![page 2](screenshots/page_2.png)
![page 3](screenshots/page_3.png)
For help getting started with Flutter, view our
[online documentation](https://flutter.dev/docs), which offers tutorials,
samples, guidance on mobile development, and a full API reference.
# file_manager_example
Пример использования плагина file_manager.
## Описание
Данный пример демонстрирует:
- как просматривать файлы и каталоги;
- как сортировать файлы по имени, дате, типу и размеру;
- как перемещаться по файловой системе.
## Возможности
- **Навигация по файлам**: Просмотр каталогов и перемещение по иерархии файловой системы
- **Сортировка файлов**: Сортировка файлов и папок по различным критериям
- **Иконки файлов**: Контекстные иконки для различных типов файлов
- **Доступ к хранилищу**: Доступ к различным местам хранения на устройстве
## Скриншоты
![page 1](screenshots/page_1.png)
![page 2](screenshots/page_2.png)
![page 3](screenshots/page_3.png)
# SPDX-FileCopyrightText: Copyright 2024 Open Mobile Platform LLC <community@omp.ru>
# SPDX-FileCopyrightText: Copyright 2024-2025 Open Mobile Platform LLC <community@omp.ru>
# SPDX-License-Identifier: BSD-3-Clause
include: package:flutter_lints/flutter.yaml
/flutter
/rpm/requires.inc
/rpm/defines.inc
pubspec.lock
\ Нет новой строки в конце файла
# SPDX-FileCopyrightText: Copyright 2024 Open Mobile Platform LLC <community@omp.ru>
# SPDX-License-Identifier: BSD-3-Clause
# This file will be recreated at the next build. To avoid this, delete this line.
# CMAKE_SYSTEM_PROCESSOR - CPU architecture name (armv7l, aarch64, x86_64)
# CMAKE_BUILD_TYPE - Build mode (debug, profile, release)
......@@ -7,7 +6,7 @@
# PSDK_MAJOR - Build psdk major version
cmake_minimum_required(VERSION 3.10)
project(ru.auroraos.file_manager_example LANGUAGES CXX)
project(${FLUTTER_PROJECT_NAME} LANGUAGES CXX)
include(GNUInstallDirs)
......@@ -23,24 +22,16 @@ set(CMAKE_CXX_FLAGS_RELEASE "-O3")
set(CMAKE_SKIP_RPATH OFF)
set(CMAKE_INSTALL_RPATH "\$ORIGIN/../share/${BINARY_NAME}/lib")
find_package(PkgConfig REQUIRED)
pkg_check_modules(FlutterEmbedder REQUIRED IMPORTED_TARGET flutter-embedder)
add_executable(${BINARY_NAME} main.cpp ${FLUTTER_DIR}/generated_plugin_registrant.cpp)
target_link_libraries(${BINARY_NAME} PRIVATE PkgConfig::FlutterEmbedder)
target_include_directories(${BINARY_NAME} PRIVATE ${FLUTTER_DIR})
add_executable(${BINARY_NAME} main.cpp)
include(flutter/generated_plugins.cmake)
target_link_libraries(${BINARY_NAME} PRIVATE aurora_embedder::aurora_embedder)
target_include_directories(${BINARY_NAME} PRIVATE ${FLUTTER_DIR})
set(PACKAGE_INSTALL_DIR ${CMAKE_INSTALL_DATADIR}/${BINARY_NAME})
set(DESKTOP_INSTALL_DIR ${CMAKE_INSTALL_DATADIR}/applications)
set(ICONS_INSTALL_ROOT_DIR ${CMAKE_INSTALL_DATADIR}/icons/hicolor)
add_custom_command(TARGET ${BINARY_NAME} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy
${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/libflutter-embedder.so
${PROJECT_BINARY_DIR}/bundle/lib/libflutter-embedder.so)
install(FILES ${PROJECT_BINARY_DIR}/bundle/icudtl.dat DESTINATION ${PACKAGE_INSTALL_DIR})
install(DIRECTORY ${PROJECT_BINARY_DIR}/bundle/flutter_assets DESTINATION ${PACKAGE_INSTALL_DIR})
install(DIRECTORY ${PROJECT_BINARY_DIR}/bundle/lib DESTINATION ${PACKAGE_INSTALL_DIR})
......
# This file will be recreated at the next build. To avoid this, delete this line.
[Desktop Entry]
Type=Application
Name=file_manager_example
Comment=The Aurora OS example of file_manager_example.
Icon=ru.aurora.file_manager_example
Exec=/usr/bin/ru.aurora.file_manager_example
X-Nemo-Application-Type=silica-qt5
[X-Application]
Permissions=UserDirs
OrganizationName=ru.aurora
ApplicationName=file_manager_example
[Desktop Entry]
Type=Application
Name=File Manager
Comment=The Aurora OS example of file_manager.
Icon=ru.auroraos.file_manager_example
Exec=/usr/bin/ru.auroraos.file_manager_example
X-Nemo-Application-Type=silica-qt5
[X-Application]
Permissions=UserDirs;
OrganizationName=ru.auroraos
ApplicationName=file_manager_example
/**
* SPDX-FileCopyrightText: Copyright 2024 Open Mobile Platform LLC <community@omp.ru>
* SPDX-FileCopyrightText: Copyright 2024-2025 Open Mobile Platform LLC <community@omp.ru>
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <flutter/flutter_aurora.h>
#include "generated_plugin_registrant.h"
int main(int argc, char *argv[]) {
aurora::Initialize(argc, argv);
aurora::RegisterPlugins();
aurora::Launch();
return 0;
aurora::FlutterApp app(argc, argv);
return app.exec();
}
%dnl This file will be recreated at the next build. To avoid this, delete this line.
%include %{_sourcedir}/defines.inc
%global __provides_exclude_from ^%{_datadir}/%{name}/lib/.*$
%global __requires_exclude ^lib(dconf|flutter-embedder|maliit-glib|.+_platform_plugin)\\.so.*$
%global __requires_exclude %{_flutter_excludes}
Name: ru.auroraos.file_manager_example
Summary: Demonstrates how to use the ffile_manager plugin.
Version: 0.1.0
Name: %{orgName}.%{appName}%{?flavor}
Summary: The Aurora OS example of file_manager_example.
Version: %{appVersion}
Release: 1
License: Proprietary
Source0: %{name}-%{version}.tar.zst
BuildRequires: cmake
BuildRequires: ninja
%requires
%dnl Place to add custom BuildRequires.
%description
%{summary}.
......@@ -18,7 +22,7 @@ BuildRequires: ninja
%autosetup
%build
%cmake -GNinja -DCMAKE_BUILD_TYPE=%{_flutter_build_type} -DPSDK_VERSION=%{_flutter_psdk_version} -DPSDK_MAJOR=%{_flutter_psdk_major}
%cmake -GNinja -DCMAKE_BUILD_TYPE=%{_flutter_build_type} -DPSDK_VERSION=%{_flutter_psdk_version} -DPSDK_MAJOR=%{_flutter_psdk_major} -DFLUTTER_PROJECT_NAME=%{name}
%ninja_build
%install
......
// SPDX-FileCopyrightText: Copyright 2024 Open Mobile Platform LLC <community@omp.ru>
// SPDX-FileCopyrightText: Copyright 2024-2025 Open Mobile Platform LLC <community@omp.ru>
// SPDX-License-Identifier: BSD-3-Clause
import 'dart:io';
......
Поддерживает Markdown
0% или .
You are about to add 0 people to the discussion. Proceed with caution.
Сначала завершите редактирование этого сообщения!
Пожалуйста, зарегистрируйтесь или чтобы прокомментировать