pumaguard 21.post29__py3-none-any.whl → 21.post83__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (188) hide show
  1. pumaguard/presets.py +1 -0
  2. pumaguard/pumaguard-ui/.last_build_id +1 -1
  3. pumaguard/pumaguard-ui/assets/NOTICES +621 -71
  4. pumaguard/pumaguard-ui/assets/fonts/MaterialIcons-Regular.otf +0 -0
  5. pumaguard/pumaguard-ui/flutter_bootstrap.js +1 -1
  6. pumaguard/pumaguard-ui/main.dart.js +28869 -28787
  7. pumaguard/web_routes/dhcp.py +311 -54
  8. pumaguard/web_routes/diagnostics.py +6 -0
  9. pumaguard/web_routes/settings.py +13 -0
  10. pumaguard/web_ui.py +29 -0
  11. {pumaguard-21.post29.dist-info → pumaguard-21.post83.dist-info}/METADATA +1 -1
  12. pumaguard-21.post83.dist-info/RECORD +254 -0
  13. pumaguard-ui/.gitignore +48 -0
  14. pumaguard-ui/.metadata +45 -0
  15. pumaguard-ui/API_REFERENCE.md +717 -0
  16. pumaguard-ui/LICENSE +201 -0
  17. pumaguard-ui/Makefile +36 -0
  18. pumaguard-ui/README.md +371 -0
  19. pumaguard-ui/UI_DEVELOPMENT_CONTEXT.md +427 -0
  20. pumaguard-ui/analysis_options.yaml +28 -0
  21. pumaguard-ui/android/.gitignore +14 -0
  22. pumaguard-ui/android/app/build.gradle.kts +44 -0
  23. pumaguard-ui/android/app/src/debug/AndroidManifest.xml +7 -0
  24. pumaguard-ui/android/app/src/main/AndroidManifest.xml +45 -0
  25. pumaguard-ui/android/app/src/main/kotlin/com/example/pumaguard_ui/MainActivity.kt +5 -0
  26. pumaguard-ui/android/app/src/main/res/drawable/launch_background.xml +12 -0
  27. pumaguard-ui/android/app/src/main/res/drawable-v21/launch_background.xml +12 -0
  28. pumaguard-ui/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
  29. pumaguard-ui/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
  30. pumaguard-ui/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
  31. pumaguard-ui/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
  32. pumaguard-ui/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
  33. pumaguard-ui/android/app/src/main/res/values/styles.xml +18 -0
  34. pumaguard-ui/android/app/src/main/res/values-night/styles.xml +18 -0
  35. pumaguard-ui/android/app/src/profile/AndroidManifest.xml +7 -0
  36. pumaguard-ui/android/build.gradle.kts +24 -0
  37. pumaguard-ui/android/gradle/wrapper/gradle-wrapper.properties +5 -0
  38. pumaguard-ui/android/gradle.properties +2 -0
  39. pumaguard-ui/android/settings.gradle.kts +26 -0
  40. pumaguard-ui/fonts/README.md +38 -0
  41. pumaguard-ui/fonts/Roboto-Bold.ttf +0 -0
  42. pumaguard-ui/fonts/Roboto-Light.ttf +0 -0
  43. pumaguard-ui/fonts/Roboto-Medium.ttf +0 -0
  44. pumaguard-ui/fonts/Roboto-Regular.ttf +0 -0
  45. pumaguard-ui/fonts/RobotoMono-Bold.ttf +0 -0
  46. pumaguard-ui/fonts/RobotoMono-Medium.ttf +0 -0
  47. pumaguard-ui/fonts/RobotoMono-Regular.ttf +0 -0
  48. pumaguard-ui/fonts/download_fonts.sh +76 -0
  49. pumaguard-ui/ios/.gitignore +34 -0
  50. pumaguard-ui/ios/Flutter/AppFrameworkInfo.plist +26 -0
  51. pumaguard-ui/ios/Flutter/Debug.xcconfig +1 -0
  52. pumaguard-ui/ios/Flutter/Release.xcconfig +1 -0
  53. pumaguard-ui/ios/Runner/AppDelegate.swift +13 -0
  54. pumaguard-ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json +122 -0
  55. pumaguard-ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png +0 -0
  56. pumaguard-ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png +0 -0
  57. pumaguard-ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png +0 -0
  58. pumaguard-ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png +0 -0
  59. pumaguard-ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png +0 -0
  60. pumaguard-ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png +0 -0
  61. pumaguard-ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png +0 -0
  62. pumaguard-ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png +0 -0
  63. pumaguard-ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png +0 -0
  64. pumaguard-ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png +0 -0
  65. pumaguard-ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png +0 -0
  66. pumaguard-ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png +0 -0
  67. pumaguard-ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png +0 -0
  68. pumaguard-ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png +0 -0
  69. pumaguard-ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png +0 -0
  70. pumaguard-ui/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json +23 -0
  71. pumaguard-ui/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png +0 -0
  72. pumaguard-ui/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png +0 -0
  73. pumaguard-ui/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png +0 -0
  74. pumaguard-ui/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md +5 -0
  75. pumaguard-ui/ios/Runner/Base.lproj/LaunchScreen.storyboard +37 -0
  76. pumaguard-ui/ios/Runner/Base.lproj/Main.storyboard +26 -0
  77. pumaguard-ui/ios/Runner/Info.plist +49 -0
  78. pumaguard-ui/ios/Runner/Runner-Bridging-Header.h +1 -0
  79. pumaguard-ui/ios/Runner.xcodeproj/project.pbxproj +616 -0
  80. pumaguard-ui/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
  81. pumaguard-ui/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
  82. pumaguard-ui/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +8 -0
  83. pumaguard-ui/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +101 -0
  84. pumaguard-ui/ios/Runner.xcworkspace/contents.xcworkspacedata +7 -0
  85. pumaguard-ui/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
  86. pumaguard-ui/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +8 -0
  87. pumaguard-ui/ios/RunnerTests/RunnerTests.swift +12 -0
  88. pumaguard-ui/lib/main.dart +56 -0
  89. pumaguard-ui/lib/models/camera.dart +45 -0
  90. pumaguard-ui/lib/models/plug.dart +45 -0
  91. pumaguard-ui/lib/models/settings.dart +112 -0
  92. pumaguard-ui/lib/models/status.dart +58 -0
  93. pumaguard-ui/lib/screens/directories_screen.dart +319 -0
  94. pumaguard-ui/lib/screens/home_screen.dart +545 -0
  95. pumaguard-ui/lib/screens/image_browser_screen.dart +1248 -0
  96. pumaguard-ui/lib/screens/server_discovery_screen.dart +390 -0
  97. pumaguard-ui/lib/screens/settings_screen.dart +1162 -0
  98. pumaguard-ui/lib/screens/wifi_settings_screen.dart +671 -0
  99. pumaguard-ui/lib/services/api_service.dart +717 -0
  100. pumaguard-ui/lib/services/camera_events_service.dart +195 -0
  101. pumaguard-ui/lib/services/mdns_service.dart +4 -0
  102. pumaguard-ui/lib/services/mdns_service_impl.dart +282 -0
  103. pumaguard-ui/lib/services/mdns_service_io.dart +1 -0
  104. pumaguard-ui/lib/services/mdns_service_web.dart +106 -0
  105. pumaguard-ui/lib/utils/download_helper.dart +2 -0
  106. pumaguard-ui/lib/utils/download_helper_stub.dart +6 -0
  107. pumaguard-ui/lib/utils/download_helper_web.dart +14 -0
  108. pumaguard-ui/lib/utils/platform_url.dart +10 -0
  109. pumaguard-ui/lib/utils/platform_url_stub.dart +11 -0
  110. pumaguard-ui/lib/utils/platform_url_web.dart +16 -0
  111. pumaguard-ui/linux/.gitignore +1 -0
  112. pumaguard-ui/linux/CMakeLists.txt +128 -0
  113. pumaguard-ui/linux/flutter/CMakeLists.txt +88 -0
  114. pumaguard-ui/linux/flutter/generated_plugin_registrant.cc +15 -0
  115. pumaguard-ui/linux/flutter/generated_plugin_registrant.h +15 -0
  116. pumaguard-ui/linux/flutter/generated_plugins.cmake +24 -0
  117. pumaguard-ui/linux/runner/CMakeLists.txt +26 -0
  118. pumaguard-ui/linux/runner/main.cc +6 -0
  119. pumaguard-ui/linux/runner/my_application.cc +148 -0
  120. pumaguard-ui/linux/runner/my_application.h +21 -0
  121. pumaguard-ui/macos/.gitignore +7 -0
  122. pumaguard-ui/macos/Flutter/Flutter-Debug.xcconfig +1 -0
  123. pumaguard-ui/macos/Flutter/Flutter-Release.xcconfig +1 -0
  124. pumaguard-ui/macos/Flutter/GeneratedPluginRegistrant.swift +16 -0
  125. pumaguard-ui/macos/Runner/AppDelegate.swift +13 -0
  126. pumaguard-ui/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json +68 -0
  127. pumaguard-ui/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png +0 -0
  128. pumaguard-ui/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png +0 -0
  129. pumaguard-ui/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png +0 -0
  130. pumaguard-ui/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png +0 -0
  131. pumaguard-ui/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png +0 -0
  132. pumaguard-ui/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png +0 -0
  133. pumaguard-ui/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png +0 -0
  134. pumaguard-ui/macos/Runner/Base.lproj/MainMenu.xib +343 -0
  135. pumaguard-ui/macos/Runner/Configs/AppInfo.xcconfig +14 -0
  136. pumaguard-ui/macos/Runner/Configs/Debug.xcconfig +2 -0
  137. pumaguard-ui/macos/Runner/Configs/Release.xcconfig +2 -0
  138. pumaguard-ui/macos/Runner/Configs/Warnings.xcconfig +13 -0
  139. pumaguard-ui/macos/Runner/DebugProfile.entitlements +12 -0
  140. pumaguard-ui/macos/Runner/Info.plist +32 -0
  141. pumaguard-ui/macos/Runner/MainFlutterWindow.swift +15 -0
  142. pumaguard-ui/macos/Runner/Release.entitlements +8 -0
  143. pumaguard-ui/macos/Runner.xcodeproj/project.pbxproj +705 -0
  144. pumaguard-ui/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
  145. pumaguard-ui/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +99 -0
  146. pumaguard-ui/macos/Runner.xcworkspace/contents.xcworkspacedata +7 -0
  147. pumaguard-ui/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
  148. pumaguard-ui/macos/RunnerTests/RunnerTests.swift +12 -0
  149. pumaguard-ui/pubspec.lock +882 -0
  150. pumaguard-ui/pubspec.yaml +125 -0
  151. pumaguard-ui/test/models/camera_test.dart +515 -0
  152. pumaguard-ui/test/models/plug_test.dart +499 -0
  153. pumaguard-ui/test/models/settings_test.dart +903 -0
  154. pumaguard-ui/test/models/status_test.dart +707 -0
  155. pumaguard-ui/test/screens/image_browser_grouping_test.dart +555 -0
  156. pumaguard-ui/test/services/api_service_cameras_test.dart +580 -0
  157. pumaguard-ui/test/services/api_service_image_browser_test.dart +512 -0
  158. pumaguard-ui/test/widget_test.dart.skip +38 -0
  159. pumaguard-ui/web/favicon.png +0 -0
  160. pumaguard-ui/web/icons/Icon-192.png +0 -0
  161. pumaguard-ui/web/icons/Icon-512.png +0 -0
  162. pumaguard-ui/web/icons/Icon-maskable-192.png +0 -0
  163. pumaguard-ui/web/icons/Icon-maskable-512.png +0 -0
  164. pumaguard-ui/web/index.html +38 -0
  165. pumaguard-ui/web/manifest.json +35 -0
  166. pumaguard-ui/windows/.gitignore +17 -0
  167. pumaguard-ui/windows/CMakeLists.txt +108 -0
  168. pumaguard-ui/windows/flutter/CMakeLists.txt +109 -0
  169. pumaguard-ui/windows/flutter/generated_plugin_registrant.cc +14 -0
  170. pumaguard-ui/windows/flutter/generated_plugin_registrant.h +15 -0
  171. pumaguard-ui/windows/flutter/generated_plugins.cmake +24 -0
  172. pumaguard-ui/windows/runner/CMakeLists.txt +40 -0
  173. pumaguard-ui/windows/runner/Runner.rc +121 -0
  174. pumaguard-ui/windows/runner/flutter_window.cpp +71 -0
  175. pumaguard-ui/windows/runner/flutter_window.h +33 -0
  176. pumaguard-ui/windows/runner/main.cpp +43 -0
  177. pumaguard-ui/windows/runner/resource.h +16 -0
  178. pumaguard-ui/windows/runner/resources/app_icon.ico +0 -0
  179. pumaguard-ui/windows/runner/runner.exe.manifest +14 -0
  180. pumaguard-ui/windows/runner/utils.cpp +65 -0
  181. pumaguard-ui/windows/runner/utils.h +19 -0
  182. pumaguard-ui/windows/runner/win32_window.cpp +288 -0
  183. pumaguard-ui/windows/runner/win32_window.h +102 -0
  184. pumaguard-21.post29.dist-info/RECORD +0 -83
  185. {pumaguard-21.post29.dist-info → pumaguard-21.post83.dist-info}/WHEEL +0 -0
  186. {pumaguard-21.post29.dist-info → pumaguard-21.post83.dist-info}/entry_points.txt +0 -0
  187. {pumaguard-21.post29.dist-info → pumaguard-21.post83.dist-info}/licenses/LICENSE +0 -0
  188. {pumaguard-21.post29.dist-info → pumaguard-21.post83.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,128 @@
1
+ # Project-level configuration.
2
+ cmake_minimum_required(VERSION 3.13)
3
+ project(runner LANGUAGES CXX)
4
+
5
+ # The name of the executable created for the application. Change this to change
6
+ # the on-disk name of your application.
7
+ set(BINARY_NAME "pumaguard_ui")
8
+ # The unique GTK application identifier for this application. See:
9
+ # https://wiki.gnome.org/HowDoI/ChooseApplicationID
10
+ set(APPLICATION_ID "com.example.pumaguard_ui")
11
+
12
+ # Explicitly opt in to modern CMake behaviors to avoid warnings with recent
13
+ # versions of CMake.
14
+ cmake_policy(SET CMP0063 NEW)
15
+
16
+ # Load bundled libraries from the lib/ directory relative to the binary.
17
+ set(CMAKE_INSTALL_RPATH "$ORIGIN/lib")
18
+
19
+ # Root filesystem for cross-building.
20
+ if(FLUTTER_TARGET_PLATFORM_SYSROOT)
21
+ set(CMAKE_SYSROOT ${FLUTTER_TARGET_PLATFORM_SYSROOT})
22
+ set(CMAKE_FIND_ROOT_PATH ${CMAKE_SYSROOT})
23
+ set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
24
+ set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
25
+ set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
26
+ set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
27
+ endif()
28
+
29
+ # Define build configuration options.
30
+ if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
31
+ set(CMAKE_BUILD_TYPE "Debug" CACHE
32
+ STRING "Flutter build mode" FORCE)
33
+ set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS
34
+ "Debug" "Profile" "Release")
35
+ endif()
36
+
37
+ # Compilation settings that should be applied to most targets.
38
+ #
39
+ # Be cautious about adding new options here, as plugins use this function by
40
+ # default. In most cases, you should add new options to specific targets instead
41
+ # of modifying this function.
42
+ function(APPLY_STANDARD_SETTINGS TARGET)
43
+ target_compile_features(${TARGET} PUBLIC cxx_std_14)
44
+ target_compile_options(${TARGET} PRIVATE -Wall -Werror)
45
+ target_compile_options(${TARGET} PRIVATE "$<$<NOT:$<CONFIG:Debug>>:-O3>")
46
+ target_compile_definitions(${TARGET} PRIVATE "$<$<NOT:$<CONFIG:Debug>>:NDEBUG>")
47
+ endfunction()
48
+
49
+ # Flutter library and tool build rules.
50
+ set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter")
51
+ add_subdirectory(${FLUTTER_MANAGED_DIR})
52
+
53
+ # System-level dependencies.
54
+ find_package(PkgConfig REQUIRED)
55
+ pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0)
56
+
57
+ # Application build; see runner/CMakeLists.txt.
58
+ add_subdirectory("runner")
59
+
60
+ # Run the Flutter tool portions of the build. This must not be removed.
61
+ add_dependencies(${BINARY_NAME} flutter_assemble)
62
+
63
+ # Only the install-generated bundle's copy of the executable will launch
64
+ # correctly, since the resources must in the right relative locations. To avoid
65
+ # people trying to run the unbundled copy, put it in a subdirectory instead of
66
+ # the default top-level location.
67
+ set_target_properties(${BINARY_NAME}
68
+ PROPERTIES
69
+ RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/intermediates_do_not_run"
70
+ )
71
+
72
+
73
+ # Generated plugin build rules, which manage building the plugins and adding
74
+ # them to the application.
75
+ include(flutter/generated_plugins.cmake)
76
+
77
+
78
+ # === Installation ===
79
+ # By default, "installing" just makes a relocatable bundle in the build
80
+ # directory.
81
+ set(BUILD_BUNDLE_DIR "${PROJECT_BINARY_DIR}/bundle")
82
+ if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
83
+ set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE)
84
+ endif()
85
+
86
+ # Start with a clean build bundle directory every time.
87
+ install(CODE "
88
+ file(REMOVE_RECURSE \"${BUILD_BUNDLE_DIR}/\")
89
+ " COMPONENT Runtime)
90
+
91
+ set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data")
92
+ set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib")
93
+
94
+ install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}"
95
+ COMPONENT Runtime)
96
+
97
+ install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}"
98
+ COMPONENT Runtime)
99
+
100
+ install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
101
+ COMPONENT Runtime)
102
+
103
+ foreach(bundled_library ${PLUGIN_BUNDLED_LIBRARIES})
104
+ install(FILES "${bundled_library}"
105
+ DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
106
+ COMPONENT Runtime)
107
+ endforeach(bundled_library)
108
+
109
+ # Copy the native assets provided by the build.dart from all packages.
110
+ set(NATIVE_ASSETS_DIR "${PROJECT_BUILD_DIR}native_assets/linux/")
111
+ install(DIRECTORY "${NATIVE_ASSETS_DIR}"
112
+ DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
113
+ COMPONENT Runtime)
114
+
115
+ # Fully re-copy the assets directory on each build to avoid having stale files
116
+ # from a previous install.
117
+ set(FLUTTER_ASSET_DIR_NAME "flutter_assets")
118
+ install(CODE "
119
+ file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\")
120
+ " COMPONENT Runtime)
121
+ install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}"
122
+ DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime)
123
+
124
+ # Install the AOT library on non-Debug builds only.
125
+ if(NOT CMAKE_BUILD_TYPE MATCHES "Debug")
126
+ install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
127
+ COMPONENT Runtime)
128
+ endif()
@@ -0,0 +1,88 @@
1
+ # This file controls Flutter-level build steps. It should not be edited.
2
+ cmake_minimum_required(VERSION 3.10)
3
+
4
+ set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral")
5
+
6
+ # Configuration provided via flutter tool.
7
+ include(${EPHEMERAL_DIR}/generated_config.cmake)
8
+
9
+ # TODO: Move the rest of this into files in ephemeral. See
10
+ # https://github.com/flutter/flutter/issues/57146.
11
+
12
+ # Serves the same purpose as list(TRANSFORM ... PREPEND ...),
13
+ # which isn't available in 3.10.
14
+ function(list_prepend LIST_NAME PREFIX)
15
+ set(NEW_LIST "")
16
+ foreach(element ${${LIST_NAME}})
17
+ list(APPEND NEW_LIST "${PREFIX}${element}")
18
+ endforeach(element)
19
+ set(${LIST_NAME} "${NEW_LIST}" PARENT_SCOPE)
20
+ endfunction()
21
+
22
+ # === Flutter Library ===
23
+ # System-level dependencies.
24
+ find_package(PkgConfig REQUIRED)
25
+ pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0)
26
+ pkg_check_modules(GLIB REQUIRED IMPORTED_TARGET glib-2.0)
27
+ pkg_check_modules(GIO REQUIRED IMPORTED_TARGET gio-2.0)
28
+
29
+ set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/libflutter_linux_gtk.so")
30
+
31
+ # Published to parent scope for install step.
32
+ set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE)
33
+ set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE)
34
+ set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE)
35
+ set(AOT_LIBRARY "${PROJECT_DIR}/build/lib/libapp.so" PARENT_SCOPE)
36
+
37
+ list(APPEND FLUTTER_LIBRARY_HEADERS
38
+ "fl_basic_message_channel.h"
39
+ "fl_binary_codec.h"
40
+ "fl_binary_messenger.h"
41
+ "fl_dart_project.h"
42
+ "fl_engine.h"
43
+ "fl_json_message_codec.h"
44
+ "fl_json_method_codec.h"
45
+ "fl_message_codec.h"
46
+ "fl_method_call.h"
47
+ "fl_method_channel.h"
48
+ "fl_method_codec.h"
49
+ "fl_method_response.h"
50
+ "fl_plugin_registrar.h"
51
+ "fl_plugin_registry.h"
52
+ "fl_standard_message_codec.h"
53
+ "fl_standard_method_codec.h"
54
+ "fl_string_codec.h"
55
+ "fl_value.h"
56
+ "fl_view.h"
57
+ "flutter_linux.h"
58
+ )
59
+ list_prepend(FLUTTER_LIBRARY_HEADERS "${EPHEMERAL_DIR}/flutter_linux/")
60
+ add_library(flutter INTERFACE)
61
+ target_include_directories(flutter INTERFACE
62
+ "${EPHEMERAL_DIR}"
63
+ )
64
+ target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}")
65
+ target_link_libraries(flutter INTERFACE
66
+ PkgConfig::GTK
67
+ PkgConfig::GLIB
68
+ PkgConfig::GIO
69
+ )
70
+ add_dependencies(flutter flutter_assemble)
71
+
72
+ # === Flutter tool backend ===
73
+ # _phony_ is a non-existent file to force this command to run every time,
74
+ # since currently there's no way to get a full input/output list from the
75
+ # flutter tool.
76
+ add_custom_command(
77
+ OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS}
78
+ ${CMAKE_CURRENT_BINARY_DIR}/_phony_
79
+ COMMAND ${CMAKE_COMMAND} -E env
80
+ ${FLUTTER_TOOL_ENVIRONMENT}
81
+ "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.sh"
82
+ ${FLUTTER_TARGET_PLATFORM} ${CMAKE_BUILD_TYPE}
83
+ VERBATIM
84
+ )
85
+ add_custom_target(flutter_assemble DEPENDS
86
+ "${FLUTTER_LIBRARY}"
87
+ ${FLUTTER_LIBRARY_HEADERS}
88
+ )
@@ -0,0 +1,15 @@
1
+ //
2
+ // Generated file. Do not edit.
3
+ //
4
+
5
+ // clang-format off
6
+
7
+ #include "generated_plugin_registrant.h"
8
+
9
+ #include <url_launcher_linux/url_launcher_plugin.h>
10
+
11
+ void fl_register_plugins(FlPluginRegistry* registry) {
12
+ g_autoptr(FlPluginRegistrar) url_launcher_linux_registrar =
13
+ fl_plugin_registry_get_registrar_for_plugin(registry, "UrlLauncherPlugin");
14
+ url_launcher_plugin_register_with_registrar(url_launcher_linux_registrar);
15
+ }
@@ -0,0 +1,15 @@
1
+ //
2
+ // Generated file. Do not edit.
3
+ //
4
+
5
+ // clang-format off
6
+
7
+ #ifndef GENERATED_PLUGIN_REGISTRANT_
8
+ #define GENERATED_PLUGIN_REGISTRANT_
9
+
10
+ #include <flutter_linux/flutter_linux.h>
11
+
12
+ // Registers Flutter plugins.
13
+ void fl_register_plugins(FlPluginRegistry* registry);
14
+
15
+ #endif // GENERATED_PLUGIN_REGISTRANT_
@@ -0,0 +1,24 @@
1
+ #
2
+ # Generated file, do not edit.
3
+ #
4
+
5
+ list(APPEND FLUTTER_PLUGIN_LIST
6
+ url_launcher_linux
7
+ )
8
+
9
+ list(APPEND FLUTTER_FFI_PLUGIN_LIST
10
+ )
11
+
12
+ set(PLUGIN_BUNDLED_LIBRARIES)
13
+
14
+ foreach(plugin ${FLUTTER_PLUGIN_LIST})
15
+ add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/linux plugins/${plugin})
16
+ target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin)
17
+ list(APPEND PLUGIN_BUNDLED_LIBRARIES $<TARGET_FILE:${plugin}_plugin>)
18
+ list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries})
19
+ endforeach(plugin)
20
+
21
+ foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST})
22
+ add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/linux plugins/${ffi_plugin})
23
+ list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries})
24
+ endforeach(ffi_plugin)
@@ -0,0 +1,26 @@
1
+ cmake_minimum_required(VERSION 3.13)
2
+ project(runner LANGUAGES CXX)
3
+
4
+ # Define the application target. To change its name, change BINARY_NAME in the
5
+ # top-level CMakeLists.txt, not the value here, or `flutter run` will no longer
6
+ # work.
7
+ #
8
+ # Any new source files that you add to the application should be added here.
9
+ add_executable(${BINARY_NAME}
10
+ "main.cc"
11
+ "my_application.cc"
12
+ "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc"
13
+ )
14
+
15
+ # Apply the standard set of build settings. This can be removed for applications
16
+ # that need different build settings.
17
+ apply_standard_settings(${BINARY_NAME})
18
+
19
+ # Add preprocessor definitions for the application ID.
20
+ add_definitions(-DAPPLICATION_ID="${APPLICATION_ID}")
21
+
22
+ # Add dependency libraries. Add any application-specific dependencies here.
23
+ target_link_libraries(${BINARY_NAME} PRIVATE flutter)
24
+ target_link_libraries(${BINARY_NAME} PRIVATE PkgConfig::GTK)
25
+
26
+ target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}")
@@ -0,0 +1,6 @@
1
+ #include "my_application.h"
2
+
3
+ int main(int argc, char** argv) {
4
+ g_autoptr(MyApplication) app = my_application_new();
5
+ return g_application_run(G_APPLICATION(app), argc, argv);
6
+ }
@@ -0,0 +1,148 @@
1
+ #include "my_application.h"
2
+
3
+ #include <flutter_linux/flutter_linux.h>
4
+ #ifdef GDK_WINDOWING_X11
5
+ #include <gdk/gdkx.h>
6
+ #endif
7
+
8
+ #include "flutter/generated_plugin_registrant.h"
9
+
10
+ struct _MyApplication {
11
+ GtkApplication parent_instance;
12
+ char** dart_entrypoint_arguments;
13
+ };
14
+
15
+ G_DEFINE_TYPE(MyApplication, my_application, GTK_TYPE_APPLICATION)
16
+
17
+ // Called when first Flutter frame received.
18
+ static void first_frame_cb(MyApplication* self, FlView* view) {
19
+ gtk_widget_show(gtk_widget_get_toplevel(GTK_WIDGET(view)));
20
+ }
21
+
22
+ // Implements GApplication::activate.
23
+ static void my_application_activate(GApplication* application) {
24
+ MyApplication* self = MY_APPLICATION(application);
25
+ GtkWindow* window =
26
+ GTK_WINDOW(gtk_application_window_new(GTK_APPLICATION(application)));
27
+
28
+ // Use a header bar when running in GNOME as this is the common style used
29
+ // by applications and is the setup most users will be using (e.g. Ubuntu
30
+ // desktop).
31
+ // If running on X and not using GNOME then just use a traditional title bar
32
+ // in case the window manager does more exotic layout, e.g. tiling.
33
+ // If running on Wayland assume the header bar will work (may need changing
34
+ // if future cases occur).
35
+ gboolean use_header_bar = TRUE;
36
+ #ifdef GDK_WINDOWING_X11
37
+ GdkScreen* screen = gtk_window_get_screen(window);
38
+ if (GDK_IS_X11_SCREEN(screen)) {
39
+ const gchar* wm_name = gdk_x11_screen_get_window_manager_name(screen);
40
+ if (g_strcmp0(wm_name, "GNOME Shell") != 0) {
41
+ use_header_bar = FALSE;
42
+ }
43
+ }
44
+ #endif
45
+ if (use_header_bar) {
46
+ GtkHeaderBar* header_bar = GTK_HEADER_BAR(gtk_header_bar_new());
47
+ gtk_widget_show(GTK_WIDGET(header_bar));
48
+ gtk_header_bar_set_title(header_bar, "pumaguard_ui");
49
+ gtk_header_bar_set_show_close_button(header_bar, TRUE);
50
+ gtk_window_set_titlebar(window, GTK_WIDGET(header_bar));
51
+ } else {
52
+ gtk_window_set_title(window, "pumaguard_ui");
53
+ }
54
+
55
+ gtk_window_set_default_size(window, 1280, 720);
56
+
57
+ g_autoptr(FlDartProject) project = fl_dart_project_new();
58
+ fl_dart_project_set_dart_entrypoint_arguments(
59
+ project, self->dart_entrypoint_arguments);
60
+
61
+ FlView* view = fl_view_new(project);
62
+ GdkRGBA background_color;
63
+ // Background defaults to black, override it here if necessary, e.g. #00000000
64
+ // for transparent.
65
+ gdk_rgba_parse(&background_color, "#000000");
66
+ fl_view_set_background_color(view, &background_color);
67
+ gtk_widget_show(GTK_WIDGET(view));
68
+ gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(view));
69
+
70
+ // Show the window when Flutter renders.
71
+ // Requires the view to be realized so we can start rendering.
72
+ g_signal_connect_swapped(view, "first-frame", G_CALLBACK(first_frame_cb),
73
+ self);
74
+ gtk_widget_realize(GTK_WIDGET(view));
75
+
76
+ fl_register_plugins(FL_PLUGIN_REGISTRY(view));
77
+
78
+ gtk_widget_grab_focus(GTK_WIDGET(view));
79
+ }
80
+
81
+ // Implements GApplication::local_command_line.
82
+ static gboolean my_application_local_command_line(GApplication* application,
83
+ gchar*** arguments,
84
+ int* exit_status) {
85
+ MyApplication* self = MY_APPLICATION(application);
86
+ // Strip out the first argument as it is the binary name.
87
+ self->dart_entrypoint_arguments = g_strdupv(*arguments + 1);
88
+
89
+ g_autoptr(GError) error = nullptr;
90
+ if (!g_application_register(application, nullptr, &error)) {
91
+ g_warning("Failed to register: %s", error->message);
92
+ *exit_status = 1;
93
+ return TRUE;
94
+ }
95
+
96
+ g_application_activate(application);
97
+ *exit_status = 0;
98
+
99
+ return TRUE;
100
+ }
101
+
102
+ // Implements GApplication::startup.
103
+ static void my_application_startup(GApplication* application) {
104
+ // MyApplication* self = MY_APPLICATION(object);
105
+
106
+ // Perform any actions required at application startup.
107
+
108
+ G_APPLICATION_CLASS(my_application_parent_class)->startup(application);
109
+ }
110
+
111
+ // Implements GApplication::shutdown.
112
+ static void my_application_shutdown(GApplication* application) {
113
+ // MyApplication* self = MY_APPLICATION(object);
114
+
115
+ // Perform any actions required at application shutdown.
116
+
117
+ G_APPLICATION_CLASS(my_application_parent_class)->shutdown(application);
118
+ }
119
+
120
+ // Implements GObject::dispose.
121
+ static void my_application_dispose(GObject* object) {
122
+ MyApplication* self = MY_APPLICATION(object);
123
+ g_clear_pointer(&self->dart_entrypoint_arguments, g_strfreev);
124
+ G_OBJECT_CLASS(my_application_parent_class)->dispose(object);
125
+ }
126
+
127
+ static void my_application_class_init(MyApplicationClass* klass) {
128
+ G_APPLICATION_CLASS(klass)->activate = my_application_activate;
129
+ G_APPLICATION_CLASS(klass)->local_command_line =
130
+ my_application_local_command_line;
131
+ G_APPLICATION_CLASS(klass)->startup = my_application_startup;
132
+ G_APPLICATION_CLASS(klass)->shutdown = my_application_shutdown;
133
+ G_OBJECT_CLASS(klass)->dispose = my_application_dispose;
134
+ }
135
+
136
+ static void my_application_init(MyApplication* self) {}
137
+
138
+ MyApplication* my_application_new() {
139
+ // Set the program name to the application ID, which helps various systems
140
+ // like GTK and desktop environments map this running application to its
141
+ // corresponding .desktop file. This ensures better integration by allowing
142
+ // the application to be recognized beyond its binary name.
143
+ g_set_prgname(APPLICATION_ID);
144
+
145
+ return MY_APPLICATION(g_object_new(my_application_get_type(),
146
+ "application-id", APPLICATION_ID, "flags",
147
+ G_APPLICATION_NON_UNIQUE, nullptr));
148
+ }
@@ -0,0 +1,21 @@
1
+ #ifndef FLUTTER_MY_APPLICATION_H_
2
+ #define FLUTTER_MY_APPLICATION_H_
3
+
4
+ #include <gtk/gtk.h>
5
+
6
+ G_DECLARE_FINAL_TYPE(MyApplication,
7
+ my_application,
8
+ MY,
9
+ APPLICATION,
10
+ GtkApplication)
11
+
12
+ /**
13
+ * my_application_new:
14
+ *
15
+ * Creates a new Flutter-based application.
16
+ *
17
+ * Returns: a new #MyApplication.
18
+ */
19
+ MyApplication* my_application_new();
20
+
21
+ #endif // FLUTTER_MY_APPLICATION_H_
@@ -0,0 +1,7 @@
1
+ # Flutter-related
2
+ **/Flutter/ephemeral/
3
+ **/Pods/
4
+
5
+ # Xcode-related
6
+ **/dgph
7
+ **/xcuserdata/
@@ -0,0 +1 @@
1
+ #include "ephemeral/Flutter-Generated.xcconfig"
@@ -0,0 +1 @@
1
+ #include "ephemeral/Flutter-Generated.xcconfig"
@@ -0,0 +1,16 @@
1
+ //
2
+ // Generated file. Do not edit.
3
+ //
4
+
5
+ import FlutterMacOS
6
+ import Foundation
7
+
8
+ import file_picker
9
+ import shared_preferences_foundation
10
+ import url_launcher_macos
11
+
12
+ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
13
+ FilePickerPlugin.register(with: registry.registrar(forPlugin: "FilePickerPlugin"))
14
+ SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))
15
+ UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin"))
16
+ }
@@ -0,0 +1,13 @@
1
+ import Cocoa
2
+ import FlutterMacOS
3
+
4
+ @main
5
+ class AppDelegate: FlutterAppDelegate {
6
+ override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
7
+ return true
8
+ }
9
+
10
+ override func applicationSupportsSecureRestorableState(_ app: NSApplication) -> Bool {
11
+ return true
12
+ }
13
+ }
@@ -0,0 +1,68 @@
1
+ {
2
+ "images" : [
3
+ {
4
+ "size" : "16x16",
5
+ "idiom" : "mac",
6
+ "filename" : "app_icon_16.png",
7
+ "scale" : "1x"
8
+ },
9
+ {
10
+ "size" : "16x16",
11
+ "idiom" : "mac",
12
+ "filename" : "app_icon_32.png",
13
+ "scale" : "2x"
14
+ },
15
+ {
16
+ "size" : "32x32",
17
+ "idiom" : "mac",
18
+ "filename" : "app_icon_32.png",
19
+ "scale" : "1x"
20
+ },
21
+ {
22
+ "size" : "32x32",
23
+ "idiom" : "mac",
24
+ "filename" : "app_icon_64.png",
25
+ "scale" : "2x"
26
+ },
27
+ {
28
+ "size" : "128x128",
29
+ "idiom" : "mac",
30
+ "filename" : "app_icon_128.png",
31
+ "scale" : "1x"
32
+ },
33
+ {
34
+ "size" : "128x128",
35
+ "idiom" : "mac",
36
+ "filename" : "app_icon_256.png",
37
+ "scale" : "2x"
38
+ },
39
+ {
40
+ "size" : "256x256",
41
+ "idiom" : "mac",
42
+ "filename" : "app_icon_256.png",
43
+ "scale" : "1x"
44
+ },
45
+ {
46
+ "size" : "256x256",
47
+ "idiom" : "mac",
48
+ "filename" : "app_icon_512.png",
49
+ "scale" : "2x"
50
+ },
51
+ {
52
+ "size" : "512x512",
53
+ "idiom" : "mac",
54
+ "filename" : "app_icon_512.png",
55
+ "scale" : "1x"
56
+ },
57
+ {
58
+ "size" : "512x512",
59
+ "idiom" : "mac",
60
+ "filename" : "app_icon_1024.png",
61
+ "scale" : "2x"
62
+ }
63
+ ],
64
+ "info" : {
65
+ "version" : 1,
66
+ "author" : "xcode"
67
+ }
68
+ }