Сергей Марков
1 year ago
19 changed files with 277 additions and 57 deletions
@ -0,0 +1,47 @@
|
||||
# Miscellaneous |
||||
*.class |
||||
*.log |
||||
*.pyc |
||||
*.swp |
||||
.DS_Store |
||||
.atom/ |
||||
.buildlog/ |
||||
.history |
||||
.svn/ |
||||
migrate_working_dir/ |
||||
|
||||
# IntelliJ related |
||||
*.iml |
||||
*.ipr |
||||
*.iws |
||||
.idea/ |
||||
|
||||
# The .vscode folder contains launch configuration and tasks you configure in |
||||
# VS Code which you may wish to be included in version control, so this line |
||||
# is commented out by default. |
||||
#.vscode/ |
||||
|
||||
# Flutter/Dart/Pub related |
||||
**/doc/api/ |
||||
**/ios/Flutter/.last_build_id |
||||
.dart_tool/ |
||||
.flutter-plugins |
||||
.flutter-plugins-dependencies |
||||
.packages |
||||
.pub-cache/ |
||||
.pub/ |
||||
/build/ |
||||
|
||||
# Symbolication related |
||||
app.*.symbols |
||||
|
||||
# Obfuscation related |
||||
app.*.map.json |
||||
|
||||
# Android Studio will place build artifacts here |
||||
/android/app/debug |
||||
/android/app/profile |
||||
/android/app/release |
||||
|
||||
# Aurora generated |
||||
/aurora/flutter |
@ -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) |
@ -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 |
After Width: | Height: | Size: 5.0 KiB |
After Width: | Height: | Size: 6.1 KiB |
After Width: | Height: | Size: 8.2 KiB |
After Width: | Height: | Size: 4.1 KiB |
@ -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; |
||||
} |
@ -0,0 +1,33 @@
|
||||
%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) |
||||
BuildRequires: pkgconfig(camera) |
||||
|
||||
%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 |
Loading…
Reference in new issue