mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-09-22 19:23:37 +00:00
Fixed Windows build for native plugin sharing (#897)
Some checks are pending
Build and Release / Determine run mode (push) Waiting to run
Build and Release / Read metadata (push) Blocked by required conditions
Build and Release / Sync Flatpak repo (push) Blocked by required conditions
Build and Release / Collect Flatpak artifacts (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-apple-darwin, osx-arm64, macos-latest, aarch64-apple-darwin, dmg,app,updater, dmg) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-pc-windows-msvc.exe, win-arm64, windows-latest, aarch64-pc-windows-msvc, nsis,updater, nsis) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-unknown-linux-gnu, linux-arm64, ubuntu-22.04-arm, aarch64-unknown-linux-gnu, appimage,updater, appimage) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-apple-darwin, osx-x64, macos-latest, x86_64-apple-darwin, dmg,app,updater, dmg) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-pc-windows-msvc.exe, win-x64, windows-latest, x86_64-pc-windows-msvc, nsis,updater, nsis) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-unknown-linux-gnu, linux-x64, ubuntu-22.04, x86_64-unknown-linux-gnu, appimage,updater, appimage) (push) Blocked by required conditions
Build and Release / Prepare & create release (push) Blocked by required conditions
Build and Release / Publish release (push) Blocked by required conditions
Some checks are pending
Build and Release / Determine run mode (push) Waiting to run
Build and Release / Read metadata (push) Blocked by required conditions
Build and Release / Sync Flatpak repo (push) Blocked by required conditions
Build and Release / Collect Flatpak artifacts (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-apple-darwin, osx-arm64, macos-latest, aarch64-apple-darwin, dmg,app,updater, dmg) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-pc-windows-msvc.exe, win-arm64, windows-latest, aarch64-pc-windows-msvc, nsis,updater, nsis) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-unknown-linux-gnu, linux-arm64, ubuntu-22.04-arm, aarch64-unknown-linux-gnu, appimage,updater, appimage) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-apple-darwin, osx-x64, macos-latest, x86_64-apple-darwin, dmg,app,updater, dmg) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-pc-windows-msvc.exe, win-x64, windows-latest, x86_64-pc-windows-msvc, nsis,updater, nsis) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-unknown-linux-gnu, linux-x64, ubuntu-22.04, x86_64-unknown-linux-gnu, appimage,updater, appimage) (push) Blocked by required conditions
Build and Release / Prepare & create release (push) Blocked by required conditions
Build and Release / Publish release (push) Blocked by required conditions
This commit is contained in:
parent
8a9e6aeb87
commit
e5f6f7262c
@ -96,7 +96,7 @@ async fn share_file_on_platform(_path: PathBuf) -> Result<(), String> {
|
|||||||
async fn share_file_on_platform(path: PathBuf) -> Result<(), String> {
|
async fn share_file_on_platform(path: PathBuf) -> Result<(), String> {
|
||||||
use std::cell::RefCell;
|
use std::cell::RefCell;
|
||||||
use windows::ApplicationModel::DataTransfer::{DataRequestedEventArgs, DataTransferManager};
|
use windows::ApplicationModel::DataTransfer::{DataRequestedEventArgs, DataTransferManager};
|
||||||
use windows::Foundation::{EventRegistrationToken, TypedEventHandler};
|
use windows::Foundation::TypedEventHandler;
|
||||||
use windows::Storage::{IStorageItem, StorageFile};
|
use windows::Storage::{IStorageItem, StorageFile};
|
||||||
use windows::Win32::UI::Shell::IDataTransferManagerInterop;
|
use windows::Win32::UI::Shell::IDataTransferManagerInterop;
|
||||||
use windows::core::{factory, HSTRING, Interface};
|
use windows::core::{factory, HSTRING, Interface};
|
||||||
@ -108,7 +108,7 @@ async fn share_file_on_platform(path: PathBuf) -> Result<(), String> {
|
|||||||
// and remove the previous handler before adding a new one. We only ever register on the main
|
// and remove the previous handler before adding a new one. We only ever register on the main
|
||||||
// thread, hence a thread-local reference is sufficient:
|
// thread, hence a thread-local reference is sufficient:
|
||||||
thread_local! {
|
thread_local! {
|
||||||
static DATA_REQUESTED_TOKEN: RefCell<Option<EventRegistrationToken>> = const { RefCell::new(None) };
|
static DATA_REQUESTED_TOKEN: RefCell<Option<i64>> = const { RefCell::new(None) };
|
||||||
}
|
}
|
||||||
|
|
||||||
let window = crate::app_window::MAIN_WINDOW.lock().unwrap().clone()
|
let window = crate::app_window::MAIN_WINDOW.lock().unwrap().clone()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user