Compare commits

...

4 Commits
main ... aurora

Author SHA1 Message Date
Марков Сергей Викторович b51743aee2 fix aurora depedencies 1 year ago
Марков Сергей Викторович 2a8f2af691 fix aurora target files 1 year ago
Марков Сергей Викторович 78c0e9d475 fix defaults for TargetPlatform because of new TargetPlatform.aurora 1 year ago
Марков Сергей Викторович aec47c766f Add Aurora OS target 1 year ago
  1. 17
      packages/app/.metadata
  2. 1
      packages/app/aurora/.gitignore
  3. 47
      packages/app/aurora/CMakeLists.txt
  4. 12
      packages/app/aurora/desktop/su.markow.nextcloud-neon.desktop
  5. BIN
      packages/app/aurora/icons/108x108.png
  6. BIN
      packages/app/aurora/icons/128x128.png
  7. BIN
      packages/app/aurora/icons/172x172.png
  8. BIN
      packages/app/aurora/icons/86x86.png
  9. 9
      packages/app/aurora/main.cpp
  10. 32
      packages/app/aurora/rpm/su.markow.nextcloud-neon.spec
  11. 4
      packages/app/linux/CMakeLists.txt
  12. 7
      packages/neon/neon/lib/src/utils/adaptive.dart
  13. 25
      packages/neon/neon/lib/src/widgets/adaptive_widgets/list_tile.dart
  14. 17
      packages/neon/neon/pubspec.yaml

17
packages/app/.metadata

@ -4,8 +4,8 @@
# This file should be version controlled and should not be manually edited.
version:
revision: "ead455963c12b453cdb2358cad34969c76daf180"
channel: "stable"
revision: "2828ddd9a707d09af00b793a42faaa0f0e2b957f"
channel: "master"
project_type: app
@ -13,14 +13,11 @@ project_type: app
migration:
platforms:
- platform: root
create_revision: ead455963c12b453cdb2358cad34969c76daf180
base_revision: ead455963c12b453cdb2358cad34969c76daf180
- platform: android
create_revision: ead455963c12b453cdb2358cad34969c76daf180
base_revision: ead455963c12b453cdb2358cad34969c76daf180
- platform: linux
create_revision: ead455963c12b453cdb2358cad34969c76daf180
base_revision: ead455963c12b453cdb2358cad34969c76daf180
create_revision: 2828ddd9a707d09af00b793a42faaa0f0e2b957f
base_revision: 2828ddd9a707d09af00b793a42faaa0f0e2b957f
- platform: aurora
create_revision: 2828ddd9a707d09af00b793a42faaa0f0e2b957f
base_revision: 2828ddd9a707d09af00b793a42faaa0f0e2b957f
# User provided section

1
packages/app/aurora/.gitignore vendored

@ -0,0 +1 @@
flutter/ephemeral

47
packages/app/aurora/CMakeLists.txt

@ -0,0 +1,47 @@
cmake_minimum_required(VERSION 3.10)
project(su.markow.nextcloud-neon LANGUAGES CXX)
include(GNUInstallDirs)
set(BINARY_NAME ${CMAKE_PROJECT_NAME})
set(FLUTTER_DIR ${CMAKE_CURRENT_SOURCE_DIR}/flutter)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_FLAGS "-Wall -Wextra")
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})
include(flutter/generated_plugins.cmake)
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})
install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
install(FILES desktop/${BINARY_NAME}.desktop DESTINATION ${DESKTOP_INSTALL_DIR})
foreach(ICONS_SIZE 86x86 108x108 128x128 172x172)
install(FILES icons/${ICONS_SIZE}.png
RENAME ${BINARY_NAME}.png
DESTINATION ${ICONS_INSTALL_ROOT_DIR}/${ICONS_SIZE}/apps/)
endforeach(ICONS_SIZE)

12
packages/app/aurora/desktop/su.markow.nextcloud-neon.desktop

@ -0,0 +1,12 @@
[Desktop Entry]
Type=Application
Name=nextcloud-neon
Comment=A new Flutter project.
Icon=su.markow.nextcloud-neon
Exec=/usr/bin/su.markow.nextcloud-neon
X-Nemo-Application-Type=silica-qt5
[X-Application]
Permissions=UserDirs
OrganizationName=su.markow
ApplicationName=nextcloud-neon

BIN
packages/app/aurora/icons/108x108.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

BIN
packages/app/aurora/icons/128x128.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

BIN
packages/app/aurora/icons/172x172.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

BIN
packages/app/aurora/icons/86x86.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

9
packages/app/aurora/main.cpp

@ -0,0 +1,9 @@
#include <flutter/application.h>
#include "generated_plugin_registrant.h"
int main(int argc, char *argv[]) {
Application::Initialize(argc, argv);
RegisterPlugins();
Application::Launch();
return 0;
}

32
packages/app/aurora/rpm/su.markow.nextcloud-neon.spec

@ -0,0 +1,32 @@
%global __provides_exclude_from ^%{_datadir}/%{name}/lib/.*$
%global __requires_exclude ^lib(dconf|flutter-embedder|maliit-glib|.+_platform_plugin)\\.so.*$
Name: su.markow.nextcloud-neon
Summary: A new Flutter project.
Version: 0.1.0
Release: 1
License: Proprietary
Source0: %{name}-%{version}.tar.zst
BuildRequires: cmake
BuildRequires: pkgconfig(flutter-embedder)
BuildRequires: pkgconfig(sqlite3)
%description
%{summary}.
%prep
%autosetup
%build
%cmake -DCMAKE_BUILD_TYPE=%{_flutter_build_type}
%make_build
%install
%make_install
%files
%{_bindir}/%{name}
%{_datadir}/%{name}/*
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/*/apps/%{name}.png

4
packages/app/linux/CMakeLists.txt

@ -95,9 +95,9 @@ include(flutter/generated_plugins.cmake)
# By default, "installing" just makes a relocatable bundle in the build
# directory.
set(BUILD_BUNDLE_DIR "${PROJECT_BINARY_DIR}/bundle")
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
#if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE)
endif()
#endif()
# Start with a clean build bundle directory every time.
install(CODE "

7
packages/neon/neon/lib/src/utils/adaptive.dart

@ -7,13 +7,14 @@ bool isCupertino(final BuildContext context) {
final theme = Theme.of(context);
switch (theme.platform) {
case TargetPlatform.iOS:
case TargetPlatform.macOS:
return true;
case TargetPlatform.android:
case TargetPlatform.fuchsia:
case TargetPlatform.linux:
case TargetPlatform.windows:
default:
return false;
case TargetPlatform.iOS:
case TargetPlatform.macOS:
return true;
}
}

25
packages/neon/neon/lib/src/widgets/adaptive_widgets/list_tile.dart

@ -88,18 +88,6 @@ class AdaptiveListTile extends StatelessWidget {
final theme = Theme.of(context);
switch (theme.platform) {
case TargetPlatform.android:
case TargetPlatform.fuchsia:
case TargetPlatform.linux:
case TargetPlatform.windows:
return ListTile(
title: title,
subtitle: subtitle,
leading: leading,
trailing: trailing,
onTap: onTap,
enabled: enabled,
);
case TargetPlatform.iOS:
case TargetPlatform.macOS:
final tile = CupertinoListTile(
@ -130,6 +118,19 @@ class AdaptiveListTile extends StatelessWidget {
}
return tile;
case TargetPlatform.android:
case TargetPlatform.fuchsia:
case TargetPlatform.linux:
case TargetPlatform.windows:
default:
return ListTile(
title: title,
subtitle: subtitle,
leading: leading,
trailing: trailing,
onTap: onTap,
enabled: enabled,
);
}
}
}

17
packages/neon/neon/pubspec.yaml

@ -37,7 +37,12 @@ dependencies:
path: packages/nextcloud
package_info_plus: ^4.0.0
path: ^1.0.0
path_provider: ^2.1.0
path_provider: ^2.1.1
path_provider_aurora:
git:
url: https://gitlab.com/omprussia/flutter/flutter-plugins.git
ref: master
path: packages/path_provider/path_provider_aurora
permission_handler: ^11.0.0
provider: ^6.0.0
quick_actions: ^1.0.0
@ -48,8 +53,14 @@ dependencies:
git:
url: https://github.com/nextcloud/neon
path: packages/sort_box
sqflite: ^2.0.0
sqflite_common_ffi: ^2.2.8-2
sqflite: ^2.3.0
sqflite_common_ffi: ^2.3.0
sqflite_aurora:
git:
url: https://gitlab.com/omprussia/flutter/flutter-plugins.git
ref: master
path: packages/sqflite/sqflite_aurora
tray_manager: ^0.2.0
unifiedpush: ^5.0.0
unifiedpush_android: ^2.0.0

Loading…
Cancel
Save