Compare commits

...

68 Commits
main ... 0.23.2

Author SHA1 Message Date
Feodor Fitsner ffa561b4aa Pin versions 2024-10-04 17:33:57 -07:00
Feodor Fitsner ce574bcb8b Remove doNotStrip 2024-07-04 19:45:04 -07:00
Feodor Fitsner 1abbb46a8b Fix packagingOptions. doNotStrip 2024-07-04 19:41:41 -07:00
Feodor Fitsner 0fc8abd3d4 Disable LLVM stripping of libpythonbundle.so 2024-07-04 19:36:28 -07:00
Feodor Fitsner 947a8ff99a Disable impeller 2024-07-04 19:34:03 -07:00
Feodor Fitsner 531fb59d5e Remove torch_light override
It should be fixed with torch_light 1.1.0
2024-07-01 13:54:49 -07:00
TheEthicalBoy efbc28a1ce
MacOS: Add more permissions to `DebugProfile.entitlements` 2024-07-01 14:47:18 +02:00
TheEthicalBoy 61988bf462
MacOS: Add more permissions to `Release.entitlements` 2024-07-01 14:39:52 +02:00
TheEthicalBoy 669efd32fa
Add location permission to `Info.plist` 2024-07-01 14:30:56 +02:00
TheEthicalBoy 373aa0d3fa
Add location permissions to `Info.plist` 2024-07-01 14:27:58 +02:00
TheEthicalBoy a23530e3ad
Add more Permissions to `AndroidManifest.xml` 2024-07-01 14:19:13 +02:00
Feodor Fitsner cb4e510866 Use Flet 0.23.2 2024-06-25 16:07:30 -07:00
Feodor Fitsner 0ab693b566 Add x86_64 arch 2024-06-24 16:15:52 -07:00
Feodor Fitsner b1c6b15da5
Flet 0.23.1 - disable Impeller, enable legacy packaging, serious_python 0.7.1 (#14)
* serious_python 0.7.1

* useLegacyPackaging true

* Disable impeller

* Remove Flutter test
2024-06-21 13:07:25 -07:00
Feodor Fitsner 652bbfa243
Kotlin 1.9.0, Geolocator bump (#13)
* geolocator: ^12.0.0

* geolocator_android: ^4.6.0

* Kotlin 1.9.0

* Kotlin 1.9.24

* AGP 8.5.0

* Rollback AGP 8.3.1

* torch_light from github

* Add pubspec.lock

* Updated pubspec.lock

* conditional dependencies

* Fix ifs
2024-06-19 22:37:08 -07:00
Feodor Fitsner 6067841b81
Merge pull request #12 from flet-dev/0.23.1-kotlin-1.8
Update Kotlin and NDK for 0.23.1
2024-06-19 17:00:34 -07:00
Feodor Fitsner 24d1a7056e flet: ^0.23.1 2024-06-19 16:54:24 -07:00
Feodor Fitsner a58c6ffa92 ndkVersion "25.1.8937393" 2024-06-19 16:38:03 -07:00
Feodor Fitsner 0ca26dd6b5 ndkVersion "26.3.11579264" 2024-06-19 16:27:40 -07:00
Feodor Fitsner 9c399dfaae Override serious_python_platform_interface 2024-06-19 16:04:30 -07:00
Feodor Fitsner f42393a5ae override serious_python_android only 2024-06-19 16:03:08 -07:00
Feodor Fitsner 6377f131b8 Fix path 2024-06-19 16:01:39 -07:00
Feodor Fitsner 5b39497d20 Use serious_python from github 2024-06-19 16:00:16 -07:00
Feodor Fitsner e7ecd3baff Bump gradle 8.3.1 2024-06-19 15:50:46 -07:00
Feodor Fitsner 6da7a3ae8f record: ^5.1.1 2024-06-19 15:47:48 -07:00
Feodor Fitsner 2eb1727362 Rollback Kotlin version 2024-06-19 15:45:08 -07:00
Feodor Fitsner e7a3ede0ee gradle:8.4.1 2024-06-19 14:54:51 -07:00
Feodor Fitsner 516518871e Kotlin 1.8.21 2024-06-19 14:46:32 -07:00
Feodor Fitsner 6e2e7eebc8 Flet 0.23.0 2024-06-19 14:39:58 -07:00
Feodor Fitsner 1f4cb54e9a Fix crash on Linux 2024-06-19 12:35:26 -07:00
Feodor Fitsner 0178bd5f23 Bump Flet 0.23.1 2024-06-19 11:04:46 -07:00
Feodor Fitsner 0eac4d4c5b
Merge pull request #11 from flet-dev/0.23.0-fix1
Fix dependencies
2024-06-19 10:07:55 -07:00
Feodor Fitsner 4447012691 Override wakelock_plus and package_info_plus deps 2024-06-19 10:04:03 -07:00
Feodor Fitsner 3c41d5cb1c kotlin_version = '1.7.22' 2024-06-19 09:48:44 -07:00
Feodor Fitsner 03d7a63609 Flet 0.23 2024-06-19 09:44:43 -07:00
Feodor Fitsner f1c45f90b4
Merge pull request #10 from flet-dev/impeller
Enable impeller on macOS and Android
2024-06-14 10:18:50 -07:00
TheEthicalBoy 1d28e0fbdb
Merge branch '0.22.1' into impeller 2024-06-14 12:18:14 +02:00
ndonkoHenri b69b87efb3 enable impeller 2024-06-14 12:14:14 +02:00
Feodor Fitsner 1cc0c49f29 minSdkVersion 23 for Android app 2024-06-13 11:52:50 -07:00
Feodor Fitsner 326209fdbf Use Flet 0.22.1 2024-04-30 12:05:58 -07:00
Feodor Fitsner a88b3b8e48 Squashed commit of the following:
commit cb9af5b9a64396835120754eb085a62fcc0b558b
Author: Feodor Fitsner <feodor@appveyor.com>
Date:   Mon Apr 29 11:32:15 2024 -0700

    Add NSMicrophoneUsageDescription to Info.plist
2024-04-29 11:36:46 -07:00
Feodor Fitsner 14a925be08 Fix for apps with numpy on macOS
https://github.com/flet-dev/serious-python/issues/85#issuecomment-2065000974
2024-04-18 12:17:32 -07:00
Feodor Fitsner 9496a9b3de Use Flet 0.22.0 2024-04-12 10:13:59 -07:00
Feodor Fitsner 7bc5081b00 Squashed commit of the following:
commit e8217a057a
Author: Feodor Fitsner <feodor@appveyor.com>
Date:   Mon Mar 11 11:11:48 2024 -0700

    Squashed commit of the following:

    commit 7660adc12c
    Author: Feodor Fitsner <feodor@appveyor.com>
    Date:   Mon Mar 11 11:11:30 2024 -0700

        minSdkVersion 21
2024-03-11 11:12:05 -07:00
Feodor Fitsner e2ab18efdd Use Flet 0.21.2 2024-03-07 08:57:54 -08:00
Feodor Fitsner 0b83309df0 Use Flet 0.21.1 2024-03-06 13:24:17 -08:00
Feodor Fitsner 27a2ec266e Use Flet 0.21.0 2024-03-06 11:04:10 -08:00
Feodor Fitsner 4ffc1adf42 android:label="{{ cookiecutter.product_name }}" 2024-02-20 14:12:50 -08:00
Feodor Fitsner 52d86b3bd3 flet: ^0.20.2 2024-02-17 14:47:05 -08:00
Feodor Fitsner 50c7144fca cupertino_icons: ^1.0.6 2024-02-17 09:47:56 -08:00
Feodor Fitsner 26b3c9a244
Merge pull request #7 from flet-dev/0.20.0-fix1
0.20.1 fixes
2024-02-16 17:39:15 -08:00
Feodor Fitsner d96ce5a571 Use Flet 0.20.1 2024-02-16 17:38:57 -08:00
Feodor Fitsner d48614191d Fix settings.gradle 2024-02-16 12:19:14 -08:00
Feodor Fitsner 5e1d40c94c Remove minSdkVersion 21 2024-02-16 12:16:41 -08:00
Feodor Fitsner a233de7547 Fix type of `createControlFactories` 2024-02-15 10:59:07 -08:00
Feodor Fitsner c25fa1db79 Fix `createControlFactories` 2024-02-14 18:51:11 -08:00
Feodor Fitsner b6b6f3426f
Merge pull request #6 from flet-dev/0.20.0-dev
Flet 0.20.0
2024-02-14 18:07:12 -08:00
Feodor Fitsner bd9285b831 Use Flet 0.20.0 2024-02-14 18:06:36 -08:00
Feodor Fitsner 6c78ea8471 Move ensureInitialized 2024-02-09 12:53:58 -08:00
Feodor Fitsner 2546c20766 {{ dep }}.ensureInitialized() 2024-02-09 12:47:09 -08:00
Feodor Fitsner 5a1fc38804 Pyodide v0.25.0 2024-02-04 09:44:50 -08:00
Feodor Fitsner 52ebf16507 var createControlFactories 2024-01-23 11:19:11 -08:00
Feodor Fitsner 4fa29e6f5d flutter_dependencies didn't work 2024-01-23 10:59:23 -08:00
Feodor Fitsner aadcfb3baa Back flutter_dependencies 2024-01-23 10:57:49 -08:00
Feodor Fitsner 31dca2b5e5 "flutter": null 2024-01-23 10:54:27 -08:00
Feodor Fitsner 417ae1c0c7 Remove from cookiecutter.json 2024-01-23 10:52:58 -08:00
Feodor Fitsner 3d3a54c486 Fix cookiecutter.flutter.dependencies 2024-01-23 10:51:54 -08:00
Feodor Fitsner 438daea208 Add flutter_dependencies 2024-01-23 10:47:34 -08:00
22 changed files with 241 additions and 166 deletions

View File

@ -7,6 +7,7 @@
"org_name": "com.flet", "org_name": "com.flet",
"company_name": "Your Company", "company_name": "Your Company",
"copyright": "Copyright (c) 2023 Your Company", "copyright": "Copyright (c) 2023 Your Company",
"flutter": null,
"sep": "/", "sep": "/",
"kotlin_dir": "{{ cookiecutter.org_name.replace('.', cookiecutter.sep) }}{{ cookiecutter.sep }}{{ cookiecutter.project_name }}{{ cookiecutter.sep }}", "kotlin_dir": "{{ cookiecutter.org_name.replace('.', cookiecutter.sep) }}{{ cookiecutter.sep }}{{ cookiecutter.project_name }}{{ cookiecutter.sep }}",
"hide_loading_animation": true, "hide_loading_animation": true,

View File

@ -25,7 +25,13 @@ if (flutterVersionName == null) {
android { android {
namespace "{{ cookiecutter.org_name }}.{{ cookiecutter.project_name }}" namespace "{{ cookiecutter.org_name }}.{{ cookiecutter.project_name }}"
compileSdkVersion flutter.compileSdkVersion compileSdkVersion flutter.compileSdkVersion
ndkVersion flutter.ndkVersion ndkVersion "25.1.8937393"
packagingOptions {
jniLibs {
useLegacyPackaging true
}
}
compileOptions { compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8 sourceCompatibility JavaVersion.VERSION_1_8
@ -41,24 +47,19 @@ android {
} }
defaultConfig { defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "{{ cookiecutter.org_name }}.{{ cookiecutter.project_name }}" applicationId "{{ cookiecutter.org_name }}.{{ cookiecutter.project_name }}"
// You can update the following values to match your application needs. minSdkVersion 23
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
minSdkVersion flutter.minSdkVersion
targetSdkVersion flutter.targetSdkVersion targetSdkVersion flutter.targetSdkVersion
versionCode flutterVersionCode.toInteger() versionCode flutterVersionCode.toInteger()
versionName flutterVersionName versionName flutterVersionName
ndk { ndk {
abiFilters 'arm64-v8a', 'armeabi-v7a' abiFilters 'arm64-v8a', 'armeabi-v7a', 'x86_64'
} }
} }
buildTypes { buildTypes {
release { release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.debug signingConfig signingConfigs.debug
} }
} }

View File

@ -3,5 +3,6 @@
the Flutter tool needs it to communicate with the running application the Flutter tool needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc. to allow setting breakpoints, to provide hot reload, etc.
--> -->
<uses-permission android:name="android.permission.INTERNET"/> <uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
</manifest> </manifest>

View File

@ -1,9 +1,23 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"> <manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.INTERNET"/> <uses-permission android:name="android.permission.INTERNET" />
<!-- Media access permissions.
Android 13 or higher.
https://developer.android.com/about/versions/13/behavior-changes-13#granular-media-permissions -->
<uses-permission android:name="android.permission.READ_MEDIA_AUDIO" />
<uses-permission android:name="android.permission.READ_MEDIA_VIDEO" />
<!-- Storage access permissions. Android 12 or lower. -->
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<application <application
android:label="{{ cookiecutter.project_name }}" android:label="{{ cookiecutter.product_name }}"
android:name="${applicationName}" android:name="${applicationName}"
android:icon="@mipmap/ic_launcher"> android:icon="@mipmap/ic_launcher">
<meta-data
android:name="io.flutter.embedding.android.EnableImpeller"
android:value="false"/>
<activity <activity
android:name=".MainActivity" android:name=".MainActivity"
android:exported="true" android:exported="true"
@ -21,8 +35,8 @@
android:resource="@style/NormalTheme" android:resource="@style/NormalTheme"
/> />
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN"/> <action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER"/> <category android:name="android.intent.category.LAUNCHER" />
</intent-filter> </intent-filter>
</activity> </activity>
<!-- Don't delete the meta-data below. <!-- Don't delete the meta-data below.

View File

@ -3,5 +3,6 @@
the Flutter tool needs it to communicate with the running application the Flutter tool needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc. to allow setting breakpoints, to provide hot reload, etc.
--> -->
<uses-permission android:name="android.permission.INTERNET"/> <uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
</manifest> </manifest>

View File

@ -1,12 +1,11 @@
buildscript { buildscript {
ext.kotlin_version = '1.7.10' ext.kotlin_version = '1.9.24'
repositories { repositories {
google() google()
mavenCentral() mavenCentral()
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:7.4.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
} }
} }

View File

@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip

View File

@ -10,11 +10,20 @@ pluginManagement {
includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle") includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle")
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
plugins { plugins {
id "dev.flutter.flutter-gradle-plugin" version "1.0.0" apply false id "dev.flutter.flutter-gradle-plugin" version "1.0.0" apply false
} }
} }
include ":app" plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version "8.3.1" apply false
}
apply from: "${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle/app_plugin_loader.gradle" include ":app"

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0"> <plist version="1.0">
<dict> <dict>
<key>CFBundleDevelopmentRegion</key> <key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string> <string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key> <key>CFBundleDisplayName</key>
@ -23,7 +23,7 @@
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>$(FLUTTER_BUILD_NUMBER)</string> <string>$(FLUTTER_BUILD_NUMBER)</string>
<key>LSRequiresIPhoneOS</key> <key>LSRequiresIPhoneOS</key>
<true/> <true />
<key>UILaunchStoryboardName</key> <key>UILaunchStoryboardName</key>
<string>LaunchScreen</string> <string>LaunchScreen</string>
<key>UIMainStoryboardFile</key> <key>UIMainStoryboardFile</key>
@ -42,8 +42,17 @@
<string>UIInterfaceOrientationLandscapeRight</string> <string>UIInterfaceOrientationLandscapeRight</string>
</array> </array>
<key>CADisableMinimumFrameDurationOnPhone</key> <key>CADisableMinimumFrameDurationOnPhone</key>
<true/> <true />
<key>UIApplicationSupportsIndirectInputEvents</key> <key>UIApplicationSupportsIndirectInputEvents</key>
<true/> <true />
</dict> <key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true />
</dict>
<key>NSMicrophoneUsageDescription</key>
<string>This app needs access to Audio Recording.</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>This app needs access to location.</string>
</dict>
</plist> </plist>

View File

@ -9,6 +9,10 @@ import 'package:path/path.dart' as path;
import 'package:serious_python/serious_python.dart'; import 'package:serious_python/serious_python.dart';
import 'package:url_strategy/url_strategy.dart'; import 'package:url_strategy/url_strategy.dart';
{% for dep in cookiecutter.flutter.dependencies %}
import 'package:{{ dep }}/{{ dep }}.dart' as {{ dep }};
{% endfor %}
const bool isProduction = bool.fromEnvironment('dart.vm.product'); const bool isProduction = bool.fromEnvironment('dart.vm.product');
const assetPath = "app/app.zip"; const assetPath = "app/app.zip";
@ -19,12 +23,21 @@ final hideLoadingPage =
const outLogFilename = "out.log"; const outLogFilename = "out.log";
const errorExitCode = 100; const errorExitCode = 100;
List<CreateControlFactory> createControlFactories = [
{% for dep in cookiecutter.flutter.dependencies %}
{{ dep }}.createControl,
{% endfor %}
];
const pythonScript = """ const pythonScript = """
import certifi, os, runpy, socket, sys, traceback import certifi, os, runpy, socket, sys, traceback
os.environ["REQUESTS_CA_BUNDLE"] = certifi.where() os.environ["REQUESTS_CA_BUNDLE"] = certifi.where()
os.environ["SSL_CERT_FILE"] = certifi.where() os.environ["SSL_CERT_FILE"] = certifi.where()
# fix for: https://github.com/flet-dev/serious-python/issues/85#issuecomment-2065000974
os.environ["OPENBLAS_NUM_THREADS"] = "1"
if os.getenv("FLET_PLATFORM") == "android": if os.getenv("FLET_PLATFORM") == "android":
import ssl import ssl
@ -79,6 +92,10 @@ void main() async {
debugPrint = (String? message, {int? wrapWidth}) => null; debugPrint = (String? message, {int? wrapWidth}) => null;
} }
{% for dep in cookiecutter.flutter.dependencies %}
{{ dep }}.ensureInitialized();
{% endfor %}
runApp(FutureBuilder( runApp(FutureBuilder(
future: prepareApp(), future: prepareApp(),
builder: (BuildContext context, AsyncSnapshot snapshot) { builder: (BuildContext context, AsyncSnapshot snapshot) {
@ -89,6 +106,7 @@ void main() async {
pageUrl: pageUrl, pageUrl: pageUrl,
assetsDir: assetsDir, assetsDir: assetsDir,
hideLoadingPage: hideLoadingPage, hideLoadingPage: hideLoadingPage,
createControlFactories: createControlFactories
) )
: FutureBuilder( : FutureBuilder(
future: runPythonApp(), future: runPythonApp(),
@ -107,6 +125,7 @@ void main() async {
pageUrl: pageUrl, pageUrl: pageUrl,
assetsDir: assetsDir, assetsDir: assetsDir,
hideLoadingPage: hideLoadingPage, hideLoadingPage: hideLoadingPage,
createControlFactories: createControlFactories
); );
} }
}); });

View File

@ -138,6 +138,12 @@ foreach(plugin ${FLUTTER_PLUGIN_LIST})
endif() endif()
endforeach(plugin) endforeach(plugin)
# Copy the native assets provided by the build.dart from all packages.
set(NATIVE_ASSETS_DIR "${PROJECT_BUILD_DIR}native_assets/linux/")
install(DIRECTORY "${NATIVE_ASSETS_DIR}"
DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
COMPONENT Runtime)
# Fully re-copy the assets directory on each build to avoid having stale files # Fully re-copy the assets directory on each build to avoid having stale files
# from a previous install. # from a previous install.
set(FLUTTER_ASSET_DIR_NAME "flutter_assets") set(FLUTTER_ASSET_DIR_NAME "flutter_assets")

View File

@ -6,7 +6,6 @@
#include "generated_plugin_registrant.h" #include "generated_plugin_registrant.h"
#include <audioplayers_linux/audioplayers_linux_plugin.h>
#include <screen_retriever/screen_retriever_plugin.h> #include <screen_retriever/screen_retriever_plugin.h>
#include <serious_python_linux/serious_python_linux_plugin.h> #include <serious_python_linux/serious_python_linux_plugin.h>
#include <url_launcher_linux/url_launcher_plugin.h> #include <url_launcher_linux/url_launcher_plugin.h>
@ -14,9 +13,6 @@
#include <window_to_front/window_to_front_plugin.h> #include <window_to_front/window_to_front_plugin.h>
void fl_register_plugins(FlPluginRegistry* registry) { void fl_register_plugins(FlPluginRegistry* registry) {
g_autoptr(FlPluginRegistrar) audioplayers_linux_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "AudioplayersLinuxPlugin");
audioplayers_linux_plugin_register_with_registrar(audioplayers_linux_registrar);
g_autoptr(FlPluginRegistrar) screen_retriever_registrar = g_autoptr(FlPluginRegistrar) screen_retriever_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "ScreenRetrieverPlugin"); fl_plugin_registry_get_registrar_for_plugin(registry, "ScreenRetrieverPlugin");
screen_retriever_plugin_register_with_registrar(screen_retriever_registrar); screen_retriever_plugin_register_with_registrar(screen_retriever_registrar);

View File

@ -3,7 +3,6 @@
# #
list(APPEND FLUTTER_PLUGIN_LIST list(APPEND FLUTTER_PLUGIN_LIST
audioplayers_linux
screen_retriever screen_retriever
serious_python_linux serious_python_linux
url_launcher_linux url_launcher_linux

View File

@ -7,19 +7,17 @@
#include "flutter/generated_plugin_registrant.h" #include "flutter/generated_plugin_registrant.h"
struct _MyApplication struct _MyApplication {
{
GtkApplication parent_instance; GtkApplication parent_instance;
char **dart_entrypoint_arguments; char** dart_entrypoint_arguments;
}; };
G_DEFINE_TYPE(MyApplication, my_application, GTK_TYPE_APPLICATION) G_DEFINE_TYPE(MyApplication, my_application, GTK_TYPE_APPLICATION)
// Implements GApplication::activate. // Implements GApplication::activate.
static void my_application_activate(GApplication *application) static void my_application_activate(GApplication* application) {
{ MyApplication* self = MY_APPLICATION(application);
MyApplication *self = MY_APPLICATION(application); GtkWindow* window =
GtkWindow *window =
GTK_WINDOW(gtk_application_window_new(GTK_APPLICATION(application))); GTK_WINDOW(gtk_application_window_new(GTK_APPLICATION(application)));
// Use a header bar when running in GNOME as this is the common style used // Use a header bar when running in GNOME as this is the common style used
@ -31,26 +29,21 @@ static void my_application_activate(GApplication *application)
// if future cases occur). // if future cases occur).
gboolean use_header_bar = TRUE; gboolean use_header_bar = TRUE;
#ifdef GDK_WINDOWING_X11 #ifdef GDK_WINDOWING_X11
GdkScreen *screen = gtk_window_get_screen(window); GdkScreen* screen = gtk_window_get_screen(window);
if (GDK_IS_X11_SCREEN(screen)) if (GDK_IS_X11_SCREEN(screen)) {
{ const gchar* wm_name = gdk_x11_screen_get_window_manager_name(screen);
const gchar *wm_name = gdk_x11_screen_get_window_manager_name(screen); if (g_strcmp0(wm_name, "GNOME Shell") != 0) {
if (g_strcmp0(wm_name, "GNOME Shell") != 0)
{
use_header_bar = FALSE; use_header_bar = FALSE;
} }
} }
#endif #endif
if (use_header_bar) if (use_header_bar) {
{ GtkHeaderBar* header_bar = GTK_HEADER_BAR(gtk_header_bar_new());
GtkHeaderBar *header_bar = GTK_HEADER_BAR(gtk_header_bar_new());
gtk_widget_show(GTK_WIDGET(header_bar)); gtk_widget_show(GTK_WIDGET(header_bar));
gtk_header_bar_set_title(header_bar, "{{ cookiecutter.product_name }}"); gtk_header_bar_set_title(header_bar, "{{ cookiecutter.product_name }}");
gtk_header_bar_set_show_close_button(header_bar, TRUE); gtk_header_bar_set_show_close_button(header_bar, TRUE);
gtk_window_set_titlebar(window, GTK_WIDGET(header_bar)); gtk_window_set_titlebar(window, GTK_WIDGET(header_bar));
} } else {
else
{
gtk_window_set_title(window, "{{ cookiecutter.product_name }}"); gtk_window_set_title(window, "{{ cookiecutter.product_name }}");
} }
@ -60,7 +53,7 @@ static void my_application_activate(GApplication *application)
g_autoptr(FlDartProject) project = fl_dart_project_new(); g_autoptr(FlDartProject) project = fl_dart_project_new();
fl_dart_project_set_dart_entrypoint_arguments(project, self->dart_entrypoint_arguments); fl_dart_project_set_dart_entrypoint_arguments(project, self->dart_entrypoint_arguments);
FlView *view = fl_view_new(project); FlView* view = fl_view_new(project);
gtk_widget_show(GTK_WIDGET(view)); gtk_widget_show(GTK_WIDGET(view));
gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(view)); gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(view));
@ -70,15 +63,13 @@ static void my_application_activate(GApplication *application)
} }
// Implements GApplication::local_command_line. // Implements GApplication::local_command_line.
static gboolean my_application_local_command_line(GApplication *application, gchar ***arguments, int *exit_status) static gboolean my_application_local_command_line(GApplication* application, gchar*** arguments, int* exit_status) {
{ MyApplication* self = MY_APPLICATION(application);
MyApplication *self = MY_APPLICATION(application);
// Strip out the first argument as it is the binary name. // Strip out the first argument as it is the binary name.
self->dart_entrypoint_arguments = g_strdupv(*arguments + 1); self->dart_entrypoint_arguments = g_strdupv(*arguments + 1);
g_autoptr(GError) error = nullptr; g_autoptr(GError) error = nullptr;
if (!g_application_register(application, nullptr, &error)) if (!g_application_register(application, nullptr, &error)) {
{
g_warning("Failed to register: %s", error->message); g_warning("Failed to register: %s", error->message);
*exit_status = 1; *exit_status = 1;
return TRUE; return TRUE;
@ -90,25 +81,42 @@ static gboolean my_application_local_command_line(GApplication *application, gch
return TRUE; return TRUE;
} }
// Implements GApplication::startup.
static void my_application_startup(GApplication* application) {
//MyApplication* self = MY_APPLICATION(object);
// Perform any actions required at application startup.
G_APPLICATION_CLASS(my_application_parent_class)->startup(application);
}
// Implements GApplication::shutdown.
static void my_application_shutdown(GApplication* application) {
//MyApplication* self = MY_APPLICATION(object);
// Perform any actions required at application shutdown.
G_APPLICATION_CLASS(my_application_parent_class)->shutdown(application);
}
// Implements GObject::dispose. // Implements GObject::dispose.
static void my_application_dispose(GObject *object) static void my_application_dispose(GObject* object) {
{ MyApplication* self = MY_APPLICATION(object);
MyApplication *self = MY_APPLICATION(object);
g_clear_pointer(&self->dart_entrypoint_arguments, g_strfreev); g_clear_pointer(&self->dart_entrypoint_arguments, g_strfreev);
G_OBJECT_CLASS(my_application_parent_class)->dispose(object); G_OBJECT_CLASS(my_application_parent_class)->dispose(object);
} }
static void my_application_class_init(MyApplicationClass *klass) static void my_application_class_init(MyApplicationClass* klass) {
{
G_APPLICATION_CLASS(klass)->activate = my_application_activate; G_APPLICATION_CLASS(klass)->activate = my_application_activate;
G_APPLICATION_CLASS(klass)->local_command_line = my_application_local_command_line; G_APPLICATION_CLASS(klass)->local_command_line = my_application_local_command_line;
G_APPLICATION_CLASS(klass)->startup = my_application_startup;
G_APPLICATION_CLASS(klass)->shutdown = my_application_shutdown;
G_OBJECT_CLASS(klass)->dispose = my_application_dispose; G_OBJECT_CLASS(klass)->dispose = my_application_dispose;
} }
static void my_application_init(MyApplication *self) {} static void my_application_init(MyApplication* self) {}
MyApplication *my_application_new() MyApplication* my_application_new() {
{
return MY_APPLICATION(g_object_new(my_application_get_type(), return MY_APPLICATION(g_object_new(my_application_get_type(),
"application-id", APPLICATION_ID, "application-id", APPLICATION_ID,
"flags", G_APPLICATION_NON_UNIQUE, "flags", G_APPLICATION_NON_UNIQUE,

View File

@ -5,24 +5,24 @@
import FlutterMacOS import FlutterMacOS
import Foundation import Foundation
import audioplayers_darwin
import package_info_plus import package_info_plus
import path_provider_foundation import path_provider_foundation
import screen_retriever import screen_retriever
import serious_python_darwin import serious_python_darwin
import shared_preferences_foundation import shared_preferences_foundation
import url_launcher_macos import url_launcher_macos
import wakelock_plus
import window_manager import window_manager
import window_to_front import window_to_front
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
AudioplayersDarwinPlugin.register(with: registry.registrar(forPlugin: "AudioplayersDarwinPlugin"))
FPPPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FPPPackageInfoPlusPlugin")) FPPPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FPPPackageInfoPlusPlugin"))
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
ScreenRetrieverPlugin.register(with: registry.registrar(forPlugin: "ScreenRetrieverPlugin")) ScreenRetrieverPlugin.register(with: registry.registrar(forPlugin: "ScreenRetrieverPlugin"))
SeriousPythonPlugin.register(with: registry.registrar(forPlugin: "SeriousPythonPlugin")) SeriousPythonPlugin.register(with: registry.registrar(forPlugin: "SeriousPythonPlugin"))
SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin")) SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))
UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin")) UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin"))
WakelockPlusMacosPlugin.register(with: registry.registrar(forPlugin: "WakelockPlusMacosPlugin"))
WindowManagerPlugin.register(with: registry.registrar(forPlugin: "WindowManagerPlugin")) WindowManagerPlugin.register(with: registry.registrar(forPlugin: "WindowManagerPlugin"))
WindowToFrontPlugin.register(with: registry.registrar(forPlugin: "WindowToFrontPlugin")) WindowToFrontPlugin.register(with: registry.registrar(forPlugin: "WindowToFrontPlugin"))
} }

View File

@ -8,5 +8,11 @@
<true/> <true/>
<key>com.apple.security.network.server</key> <key>com.apple.security.network.server</key>
<true/> <true/>
<key>com.apple.security.network.client</key>
<true/>
<key>com.apple.security.device.audio-input</key>
<true/>
<key>com.apple.security.personal-information.location</key>
<true/>
</dict> </dict>
</plist> </plist>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0"> <plist version="1.0">
<dict> <dict>
<key>CFBundleDevelopmentRegion</key> <key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string> <string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key> <key>CFBundleExecutable</key>
@ -28,5 +28,9 @@
<string>MainMenu</string> <string>MainMenu</string>
<key>NSPrincipalClass</key> <key>NSPrincipalClass</key>
<string>NSApplication</string> <string>NSApplication</string>
</dict> <key>NSMicrophoneUsageDescription</key>
<string>This app needs access to Audio Recording.</string>
<key>NSLocationUsageDescription</key>
<string>This app needs access to location.</string>
</dict>
</plist> </plist>

View File

@ -4,5 +4,12 @@
<dict> <dict>
<key>com.apple.security.app-sandbox</key> <key>com.apple.security.app-sandbox</key>
<false/> <false/>
<key>com.apple.security.network.client</key>
<true/>
<key>com.apple.security.device.audio-input</key>
<true/>
<key>com.apple.security.personal-information.location</key>
<true/>
</dict> </dict>
</plist> </plist>

View File

@ -11,28 +11,27 @@ dependencies:
flutter: flutter:
sdk: flutter sdk: flutter
serious_python: ^0.7.0 serious_python: 0.7.1
# serious_python: flet: 0.23.2
# git:
# url: https://github.com/flet-dev/serious-python
# path: src/serious_python
# ref: 'd059aef'
flet: ^0.19.0 path: ^1.9.0
# flet:
# git:
# url: https://github.com/flet-dev/flet.git
# path: package
# ref: '37b9581'
path: ^1.8.3
url_strategy: ^0.2.0 url_strategy: ^0.2.0
cupertino_icons: ^1.0.2 cupertino_icons: ^1.0.6
dependency_overrides:
wakelock_plus: ^1.2.5
package_info_plus: ^8.0.0
# {% if 'flet_audio_recorder' in cookiecutter.flutter.dependencies %}
record: ^5.1.1
# {% endif %}
# {% if 'flet_geolocator' in cookiecutter.flutter.dependencies %}
geolocator: ^12.0.0
geolocator_android: ^4.6.0
# {% endif %}
dev_dependencies: dev_dependencies:
flutter_test:
sdk: flutter
flutter_launcher_icons: "^0.13.1" flutter_launcher_icons: "^0.13.1"
flutter_native_splash: ^2.3.6 flutter_native_splash: ^2.3.6
flutter_lints: ^2.0.0 flutter_lints: ^2.0.0

View File

@ -1,4 +1,4 @@
importScripts("https://cdn.jsdelivr.net/pyodide/v0.24.1/full/pyodide.js"); importScripts("https://cdn.jsdelivr.net/pyodide/v0.25.0/full/pyodide.js");
self.pythonModuleName = null; self.pythonModuleName = null;
self.initialized = false; self.initialized = false;

View File

@ -6,7 +6,6 @@
#include "generated_plugin_registrant.h" #include "generated_plugin_registrant.h"
#include <audioplayers_windows/audioplayers_windows_plugin.h>
#include <screen_retriever/screen_retriever_plugin.h> #include <screen_retriever/screen_retriever_plugin.h>
#include <serious_python_windows/serious_python_windows_plugin_c_api.h> #include <serious_python_windows/serious_python_windows_plugin_c_api.h>
#include <url_launcher_windows/url_launcher_windows.h> #include <url_launcher_windows/url_launcher_windows.h>
@ -14,8 +13,6 @@
#include <window_to_front/window_to_front_plugin.h> #include <window_to_front/window_to_front_plugin.h>
void RegisterPlugins(flutter::PluginRegistry* registry) { void RegisterPlugins(flutter::PluginRegistry* registry) {
AudioplayersWindowsPluginRegisterWithRegistrar(
registry->GetRegistrarForPlugin("AudioplayersWindowsPlugin"));
ScreenRetrieverPluginRegisterWithRegistrar( ScreenRetrieverPluginRegisterWithRegistrar(
registry->GetRegistrarForPlugin("ScreenRetrieverPlugin")); registry->GetRegistrarForPlugin("ScreenRetrieverPlugin"));
SeriousPythonWindowsPluginCApiRegisterWithRegistrar( SeriousPythonWindowsPluginCApiRegisterWithRegistrar(

View File

@ -3,7 +3,6 @@
# #
list(APPEND FLUTTER_PLUGIN_LIST list(APPEND FLUTTER_PLUGIN_LIST
audioplayers_windows
screen_retriever screen_retriever
serious_python_windows serious_python_windows
url_launcher_windows url_launcher_windows