Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
- name: Run tests
working-directory: "src/serious_python/example/flet_example"
run: |
dart run serious_python:main package app/src --platform Darwin --requirements flet
dart run serious_python:main package app/src --platform Darwin --requirements flet==0.28.3
flutter test integration_test --device-id macos

ios:
Expand Down Expand Up @@ -62,7 +62,7 @@ jobs:
- name: Run tests
working-directory: "src/serious_python/example/flet_example"
run: |
dart run serious_python:main package app/src --platform iOS --requirements flet
dart run serious_python:main package app/src --platform iOS --requirements flet==0.28.3
flutter test integration_test --device-id ${{ steps.simulator.outputs.udid }}

android:
Expand Down Expand Up @@ -115,7 +115,7 @@ jobs:
pre-emulator-launch-script: |
sdkmanager --list_installed
script: |
cd src/serious_python/example/flet_example && dart run serious_python:main package app/src --platform Android --requirements flet
cd src/serious_python/example/flet_example && dart run serious_python:main package app/src --platform Android --requirements flet==0.28.3
cd src/serious_python/example/flet_example && flutter test integration_test --device-id emulator-${{ env.EMULATOR_PORT }}

windows:
Expand All @@ -134,7 +134,7 @@ jobs:
- name: Run tests
working-directory: "src/serious_python/example/flet_example"
run: |
dart run serious_python:main package app/src --platform Windows --requirements flet
dart run serious_python:main package app/src --platform Windows --requirements flet==0.28.3
flutter test integration_test -d windows

linux:
Expand Down Expand Up @@ -205,7 +205,7 @@ jobs:
working-directory: src/serious_python/example/flet_example
run: |
flutter pub get
dart run serious_python:main package app/src --platform Linux --requirements flet
dart run serious_python:main package app/src --platform Linux --requirements flet==0.28.3
xvfb-run flutter test integration_test -d linux

publish:
Expand Down
7 changes: 7 additions & 0 deletions src/serious_python/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## 0.9.9

* Add zipDirectoryPosix to create POSIX-compliant app archives on Windows.
* Enforce C++20 standard for `serious_python` plugin build.
* Fix: Normalize `WINDIR` path for bundled DLLs in CMake.
* Fix Logcat logging crash on some Android devices.

## 0.9.8

* Fix logging on Android.
Expand Down
18 changes: 16 additions & 2 deletions src/serious_python/bin/package_command.dart
Original file line number Diff line number Diff line change
Expand Up @@ -432,8 +432,7 @@ class PackageCommand extends Command {
// create archive
stdout.writeln(
"Creating app archive at ${dest.path} from a temp directory");
final encoder = ZipFileEncoder();
await encoder.zipDirectory(tempDir, filename: dest.path);
await zipDirectoryPosix(tempDir, dest);

// create hash file
stdout.writeln("Writing app archive hash to ${dest.path}.hash");
Expand Down Expand Up @@ -517,6 +516,21 @@ class PackageCommand extends Command {
return proc.exitCode;
}

Future<void> zipDirectoryPosix(Directory source, File dest) async {
final encoder = ZipFileEncoder();
encoder.create(dest.path);
await for (final entity
in source.list(recursive: true, followLinks: false)) {
if (entity is! File) {
continue;
}
final relativePath = path.relative(entity.path, from: source.path);
final posixPath = path.posix.joinAll(path.split(relativePath));
await encoder.addFile(entity, posixPath);
}
await encoder.close();
}

Future<int> runPython(List<String> args,
{Map<String, String>? environment}) async {
if (_pythonDir == null) {
Expand Down
40 changes: 24 additions & 16 deletions src/serious_python/example/flask_example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ packages:
dependency: transitive
description:
name: archive
sha256: cb6a278ef2dbb298455e1a713bda08524a175630ec643a242c399c932a0a1f7d
sha256: "2fde1607386ab523f7a36bb3e7edb43bd58e6edaf2ffb29d8a6d578b297fdbbd"
url: "https://pub.dev"
source: hosted
version: "3.6.1"
version: "4.0.7"
args:
dependency: transitive
description:
Expand All @@ -21,10 +21,10 @@ packages:
dependency: transitive
description:
name: async
sha256: "758e6d74e971c3e5aceb4110bfd6698efc7f501675bcfe0c775459a8140750eb"
sha256: d2872f9c19731c2e5f10444b14686eb7cc85c76274bd6c16e1816bff9a3bab63
url: "https://pub.dev"
source: hosted
version: "2.13.0"
version: "2.12.0"
boolean_selector:
dependency: transitive
description:
Expand Down Expand Up @@ -77,10 +77,10 @@ packages:
dependency: transitive
description:
name: fake_async
sha256: "5368f224a74523e8d2e7399ea1638b37aecfca824a3cc4dfdf77bf1fa905ac44"
sha256: "6a95e56b2449df2273fd8c45a662d6947ce1ebb7aafe80e550a3f68297f3cacc"
url: "https://pub.dev"
source: hosted
version: "1.3.3"
version: "1.3.2"
ffi:
dependency: transitive
description:
Expand Down Expand Up @@ -143,10 +143,10 @@ packages:
dependency: transitive
description:
name: leak_tracker
sha256: "6bb818ecbdffe216e81182c2f0714a2e62b593f4a4f13098713ff1685dfb6ab0"
sha256: c35baad643ba394b40aac41080300150a4f08fd0fd6a10378f8f7c6bc161acec
url: "https://pub.dev"
source: hosted
version: "10.0.9"
version: "10.0.8"
leak_tracker_flutter_testing:
dependency: transitive
description:
Expand Down Expand Up @@ -275,48 +275,56 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.1.8"
posix:
dependency: transitive
description:
name: posix
sha256: "6323a5b0fa688b6a010df4905a56b00181479e6d10534cecfecede2aa55add61"
url: "https://pub.dev"
source: hosted
version: "6.0.3"
serious_python:
dependency: "direct main"
description:
path: "../.."
relative: true
source: path
version: "0.9.3"
version: "0.9.9"
serious_python_android:
dependency: transitive
description:
path: "../../../serious_python_android"
relative: true
source: path
version: "0.9.3"
version: "0.9.9"
serious_python_darwin:
dependency: transitive
description:
path: "../../../serious_python_darwin"
relative: true
source: path
version: "0.9.3"
version: "0.9.9"
serious_python_linux:
dependency: transitive
description:
path: "../../../serious_python_linux"
relative: true
source: path
version: "0.9.3"
version: "0.9.9"
serious_python_platform_interface:
dependency: transitive
description:
path: "../../../serious_python_platform_interface"
relative: true
source: path
version: "0.9.3"
version: "0.9.9"
serious_python_windows:
dependency: transitive
description:
path: "../../../serious_python_windows"
relative: true
source: path
version: "0.9.3"
version: "0.9.9"
shelf:
dependency: transitive
description:
Expand Down Expand Up @@ -406,10 +414,10 @@ packages:
dependency: transitive
description:
name: vm_service
sha256: ddfa8d30d89985b96407efce8acbdd124701f96741f2d981ca860662f1c0dc02
sha256: "0968250880a6c5fe7edc067ed0a13d4bae1577fe2771dcf3010d52c4a9d3ca14"
url: "https://pub.dev"
source: hosted
version: "15.0.0"
version: "14.3.1"
web:
dependency: transitive
description:
Expand Down
2 changes: 2 additions & 0 deletions src/serious_python/example/flet_example/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@
*.swp
.DS_Store
.atom/
.build/
.buildlog/
.history
.svn/
.swiftpm/
migrate_working_dir/

# IntelliJ related
Expand Down
2 changes: 1 addition & 1 deletion src/serious_python/example/flet_example/app/app.zip.hash
Original file line number Diff line number Diff line change
@@ -1 +1 @@
43f8a7b00e44a09647dda36299259976950ba7259c5060de20677c449690fc73
2ce2f5ff38bcf342e42fb77b2bc8e4262d90d73d5bc3284055242c6313cbe5c0
38 changes: 25 additions & 13 deletions src/serious_python/example/flet_example/macos/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
PODS:
- device_info_plus (0.0.1):
- FlutterMacOS
- file_picker (0.0.1):
- FlutterMacOS
- FlutterMacOS (1.0.0)
- package_info_plus (0.0.1):
- FlutterMacOS
- path_provider_foundation (0.0.1):
- Flutter
- FlutterMacOS
- screen_retriever (0.0.1):
- screen_retriever_macos (0.0.1):
- FlutterMacOS
- serious_python_darwin (0.8.0):
- serious_python_darwin (0.9.8):
- Flutter
- FlutterMacOS
- shared_preferences_foundation (0.0.1):
Expand All @@ -21,25 +25,31 @@ PODS:
- FlutterMacOS

DEPENDENCIES:
- device_info_plus (from `Flutter/ephemeral/.symlinks/plugins/device_info_plus/macos`)
- file_picker (from `Flutter/ephemeral/.symlinks/plugins/file_picker/macos`)
- FlutterMacOS (from `Flutter/ephemeral`)
- package_info_plus (from `Flutter/ephemeral/.symlinks/plugins/package_info_plus/macos`)
- path_provider_foundation (from `Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin`)
- screen_retriever (from `Flutter/ephemeral/.symlinks/plugins/screen_retriever/macos`)
- screen_retriever_macos (from `Flutter/ephemeral/.symlinks/plugins/screen_retriever_macos/macos`)
- serious_python_darwin (from `Flutter/ephemeral/.symlinks/plugins/serious_python_darwin/darwin`)
- shared_preferences_foundation (from `Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/darwin`)
- url_launcher_macos (from `Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos`)
- window_manager (from `Flutter/ephemeral/.symlinks/plugins/window_manager/macos`)
- window_to_front (from `Flutter/ephemeral/.symlinks/plugins/window_to_front/macos`)

EXTERNAL SOURCES:
device_info_plus:
:path: Flutter/ephemeral/.symlinks/plugins/device_info_plus/macos
file_picker:
:path: Flutter/ephemeral/.symlinks/plugins/file_picker/macos
FlutterMacOS:
:path: Flutter/ephemeral
package_info_plus:
:path: Flutter/ephemeral/.symlinks/plugins/package_info_plus/macos
path_provider_foundation:
:path: Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin
screen_retriever:
:path: Flutter/ephemeral/.symlinks/plugins/screen_retriever/macos
screen_retriever_macos:
:path: Flutter/ephemeral/.symlinks/plugins/screen_retriever_macos/macos
serious_python_darwin:
:path: Flutter/ephemeral/.symlinks/plugins/serious_python_darwin/darwin
shared_preferences_foundation:
Expand All @@ -52,15 +62,17 @@ EXTERNAL SOURCES:
:path: Flutter/ephemeral/.symlinks/plugins/window_to_front/macos

SPEC CHECKSUMS:
device_info_plus: 4fb280989f669696856f8b129e4a5e3cd6c48f76
file_picker: 7584aae6fa07a041af2b36a2655122d42f578c1a
FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24
package_info_plus: fa739dd842b393193c5ca93c26798dff6e3d0e0c
path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46
screen_retriever: 59634572a57080243dd1bf715e55b6c54f241a38
serious_python_darwin: 351e50099cb9e34f344f75af29b1d36d3c0922f2
shared_preferences_foundation: fcdcbc04712aee1108ac7fda236f363274528f78
url_launcher_macos: c82c93949963e55b228a30115bd219499a6fe404
window_manager: 3a1844359a6295ab1e47659b1a777e36773cd6e8
window_to_front: 4cdc24ddd8461ad1a55fa06286d6a79d8b29e8d8
package_info_plus: a8a591e70e87ce97ce5d21b2594f69cea9e0312f
path_provider_foundation: 080d55be775b7414fd5a5ef3ac137b97b097e564
screen_retriever_macos: 452e51764a9e1cdb74b3c541238795849f21557f
serious_python_darwin: d8fa26f4b226e433b51fdb0259c60b3ec9c48527
shared_preferences_foundation: 9e1978ff2562383bd5676f64ec4e9aa8fa06a6f7
url_launcher_macos: 0fba8ddabfc33ce0a9afe7c5fef5aab3d8d2d673
window_manager: 1d01fa7ac65a6e6f83b965471b1a7fdd3f06166c
window_to_front: 9e76fd432e36700a197dac86a0011e49c89abe0a

PODFILE CHECKSUM: 9ebaf0ce3d369aaa26a9ea0e159195ed94724cf3

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
enableGPUValidationMode = "1"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,8 @@ class AppDelegate: FlutterAppDelegate {
override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
return true
}

override func applicationSupportsSecureRestorableState(_ app: NSApplication) -> Bool {
return true
}
}
Loading
Loading