mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-08-13 16:02:10 +00:00
Fixed AI Studio failing to start on Linux systems
This commit is contained in:
parent
1bdc28097d
commit
1ce4b4f4fb
19
.github/workflows/build-and-release.yml
vendored
19
.github/workflows/build-and-release.yml
vendored
@ -256,6 +256,14 @@ jobs:
|
||||
PDFIUM_CHROMIUM_REVISION: ${{ needs.read_metadata.outputs.pdfium_chromium_revision }}
|
||||
|
||||
steps:
|
||||
- name: Checkout AI Studio release metadata
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ env.AI_STUDIO_COMMIT }}
|
||||
path: ai-studio
|
||||
sparse-checkout: metadata.txt
|
||||
sparse-checkout-cone-mode: false
|
||||
|
||||
- name: Checkout Flatpak repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
@ -315,6 +323,15 @@ jobs:
|
||||
run: |
|
||||
set -euo pipefail
|
||||
|
||||
release_version=$(sed -n '1p' ../ai-studio/metadata.txt)
|
||||
release_timestamp=$(sed -n '2p' ../ai-studio/metadata.txt)
|
||||
release_date=${release_timestamp%% *}
|
||||
|
||||
test "$release_version" = "${AI_STUDIO_TAG#v}"
|
||||
[[ "$release_timestamp" =~ ^[0-9]{4}-[0-9]{2}-[0-9]{2}[[:space:]][0-9]{2}:[0-9]{2}:[0-9]{2}[[:space:]]UTC$ ]]
|
||||
python3 ./update-metainfo.py "$release_version" "$release_date"
|
||||
python3 ./update-metainfo.py --check "$release_version" "$release_date"
|
||||
|
||||
pdfium_base_url="https://github.com/bblanchon/pdfium-binaries/releases/download/chromium%2F${PDFIUM_CHROMIUM_REVISION}"
|
||||
pdfium_x64_url="${pdfium_base_url}/pdfium-linux-x64.tgz"
|
||||
pdfium_arm64_url="${pdfium_base_url}/pdfium-linux-arm64.tgz"
|
||||
@ -368,7 +385,7 @@ jobs:
|
||||
|
||||
branch="sync/ai-studio-${AI_STUDIO_TAG}"
|
||||
git checkout -B "$branch"
|
||||
git add org.MindWorkAI.AIStudio.yml cargo-sources.json dotnet-sources.json tauri-cli-sources.json
|
||||
git add org.MindWorkAI.AIStudio.yml org.MindWorkAI.AIStudio.metainfo.xml cargo-sources.json dotnet-sources.json tauri-cli-sources.json
|
||||
|
||||
if git diff --cached --quiet; then
|
||||
echo "Flatpak repository is already synced for ${AI_STUDIO_TAG}."
|
||||
|
||||
@ -13,6 +13,7 @@
|
||||
- Fixed voice recording and transcription on Linux.
|
||||
- Fixed being able to switch document analysis policies while an analysis or media transcription was still in progress.
|
||||
- Fixed file extension handling so files are recognized correctly regardless of uppercase or lowercase letters in their extensions. Thanks, Paul Schweiß, for reporting this issue.
|
||||
- Fixed AI Studio failing to start on Linux systems & showing an outdated version on the Flatpak page.
|
||||
- Upgraded Rust to v1.97.0.
|
||||
- Upgraded .NET to v9.0.18.
|
||||
- Upgraded Tauri to v2.11.5.
|
||||
|
||||
@ -12,8 +12,21 @@ use mindwork_ai_studio::metadata::MetaData;
|
||||
use mindwork_ai_studio::runtime_api::start_runtime_api;
|
||||
use mindwork_ai_studio::secret::init_secret_store;
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() {
|
||||
// Keep `main` synchronous. Tauri owns the application's Tokio runtime, and Tauri itself as
|
||||
// well as synchronous plugins may internally call `block_on` while they are initialized.
|
||||
// In v26.7.3, `#[tokio::main]` caused the Linux single-instance plugin's synchronous D-Bus
|
||||
// setup to enter `block_on` through zbus/tokio. Cargo feature unification made that path use
|
||||
// Tokio, so startup panicked because a runtime was being started from inside another runtime.
|
||||
//
|
||||
// Run asynchronous background work with `tauri::async_runtime::spawn`. If startup must await
|
||||
// asynchronous work, call `tauri::async_runtime::block_on` from this synchronous function
|
||||
// before Tauri enters its event loop. If a real `#[tokio::main]` ever becomes unavoidable,
|
||||
// first call `tauri::async_runtime::set(tokio::runtime::Handle::current())` before using any
|
||||
// Tauri async function. Then audit every synchronously initialized Tauri plugin and transitive
|
||||
// dependency for internal `block_on` calls. In particular, the Linux single-instance/D-Bus
|
||||
// path must be made async, replaced, or moved to a non-conflicting backend. Such a runtime
|
||||
// change requires explicit Linux startup tests; compiling successfully is not sufficient.
|
||||
fn main() {
|
||||
let metadata = MetaData::init_from_string(include_str!("../../metadata.txt"));
|
||||
|
||||
init_logging();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user