Skip to content

fix(linux): ensure linux apps can startup#4528

Merged
hm21 merged 2 commits into
mainfrom
fix/linux-build
May 19, 2026
Merged

fix(linux): ensure linux apps can startup#4528
hm21 merged 2 commits into
mainfrom
fix/linux-build

Conversation

@hm21
Copy link
Copy Markdown
Contributor

@hm21 hm21 commented May 18, 2026

Closes #4529

Description

The current Linux build no longer works, even though it has officially been supported since #1766 for Flathub users. This PR ensures that everything works correctly again for Linux builds.

Note the pro_video_editor was update to also support the linux build and DivineVideoPlayerController.disposeAll Linux guard is intentionally deferred — covered by #4487.

Related Issue:

Out of Scope

Verification

Type of Change

  • ✨ New feature (non-breaking change which adds functionality)
  • 🛠️ Bug fix (non-breaking change which fixes an issue)
  • ❌ Breaking change (fix or feature that would cause existing functionality to change)
  • 🧹 Code refactor
  • ✅ Build configuration change
  • 📝 Documentation
  • 🗑️ Chore

@github-actions

This comment has been minimized.

@hm21 hm21 force-pushed the fix/linux-build branch from c495d10 to 0fd3955 Compare May 18, 2026 15:10
@github-actions

This comment has been minimized.

refactor(platform): centralize Linux/Windows guards in platform_support

Extract repeated 'isFirebaseSupported' and 'hasNativeVideoPlayer' checks
into a new web-safe helper (lib/utils/platform_support.dart) so main.dart,
crash_reporting_service.dart, and app_providers.dart share a single source
of truth instead of duplicating defaultTargetPlatform comparisons.

- New helper uses only package:flutter/foundation.dart (no dart:io), so it
  stays safe under the web conditional import in main.dart.
- Renames configureVideoPlayerCacheForStartup parameter 'isWeb' to 'skip'
  so it matches the broader 'no native video plugin' meaning.
- Adds tests for both helpers covering Android/iOS/macOS/Linux/Windows.
- Adds an inline comment to the cryptography_flutter Linux stub
  explaining why the plugin returns NotImplemented (Dart side falls back
  to package:cryptography).

fix(provider): update hash for PushNotificationSyncProvider
@hm21 hm21 force-pushed the fix/linux-build branch from 7bbc36c to bde5eb7 Compare May 18, 2026 15:31
@github-actions

This comment has been minimized.

@hm21 hm21 marked this pull request as ready for review May 18, 2026 23:23
@hm21 hm21 requested a review from NotThatKindOfDrLiz May 18, 2026 23:23
@github-actions

This comment has been minimized.

@NotThatKindOfDrLiz
Copy link
Copy Markdown
Member

I pushed a small follow-up commit on top of this PR to close the remaining unsupported-platform startup gap.

What changed:

  • startup now skips DivineVideoPlayerController.disposeAll() on the same unsupported platforms where it already skips configureCache()
  • that keeps the startup path consistent with hasNativeVideoPlayer and avoids falling through a native-only cleanup call on Windows
  • I also tightened the platform_support.dart helper comment and added focused tests for the new startup-disposal gate

Validation I ran:

  • dart analyze lib/main.dart lib/utils/platform_support.dart test/main_video_cache_startup_test.dart
  • flutter test test/main_video_cache_startup_test.dart test/utils/platform_support_test.dart
  • repo pre-push checks passed before push completed

@github-actions
Copy link
Copy Markdown

Mobile PR Preview

Preview refreshed for c758a2c

Last refresh: c758a2c at 2026-05-19 00:05:16 UTC (preview run)

Property Value
Preview URL https://57daffa1.openvine-app.pages.dev
Pages project openvine-app
Preview branch pr-4528
PR branch fix/linux-build
Commit c758a2c

Copy link
Copy Markdown
Member

@NotThatKindOfDrLiz NotThatKindOfDrLiz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Final pass is clean. The Linux startup fix is sound, the unsupported-platform gating is now consistent for both startup video-player calls, and checks are green.

@hm21 hm21 merged commit fee67a1 into main May 19, 2026
10 checks passed
@hm21 hm21 deleted the fix/linux-build branch May 19, 2026 00:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(linux): ensure linux apps can startup

2 participants