Skip to content
Open
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
51 changes: 26 additions & 25 deletions .github/workflows/build-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,37 +89,37 @@ jobs:
rust_target: 'aarch64-apple-darwin'
dotnet_runtime: 'osx-arm64'
dotnet_name_postfix: '-aarch64-apple-darwin'
tauri_bundle: 'dmg updater'
tauri_bundle: 'dmg'

- platform: 'macos-latest' # for Intel-based macOS
rust_target: 'x86_64-apple-darwin'
dotnet_runtime: 'osx-x64'
dotnet_name_postfix: '-x86_64-apple-darwin'
tauri_bundle: 'dmg updater'
tauri_bundle: 'dmg'

- platform: 'ubuntu-22.04' # for x86-based Linux
rust_target: 'x86_64-unknown-linux-gnu'
dotnet_runtime: 'linux-x64'
dotnet_name_postfix: '-x86_64-unknown-linux-gnu'
tauri_bundle: 'appimage deb updater'
tauri_bundle: 'appimage deb'

- platform: 'ubuntu-22.04-arm' # for ARM-based Linux
rust_target: 'aarch64-unknown-linux-gnu'
dotnet_runtime: 'linux-arm64'
dotnet_name_postfix: '-aarch64-unknown-linux-gnu'
tauri_bundle: 'appimage deb updater'
tauri_bundle: 'appimage deb'

- platform: 'windows-latest' # for x86-based Windows
rust_target: 'x86_64-pc-windows-msvc'
dotnet_runtime: 'win-x64'
dotnet_name_postfix: '-x86_64-pc-windows-msvc.exe'
tauri_bundle: 'nsis updater'
tauri_bundle: 'nsis'

- platform: 'windows-latest' # for ARM-based Windows
rust_target: 'aarch64-pc-windows-msvc'
dotnet_runtime: 'win-arm64'
dotnet_name_postfix: '-aarch64-pc-windows-msvc.exe'
tauri_bundle: 'nsis updater'
tauri_bundle: 'nsis'

runs-on: ${{ matrix.platform }}
steps:
Expand Down Expand Up @@ -567,30 +567,31 @@ jobs:
if: matrix.platform == 'ubuntu-22.04' && contains(matrix.rust_target, 'x86_64')
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf libfuse2
sudo apt-get install -y libwebkit2gtk-4.1-dev libayatana-appindicator3-dev librsvg2-dev patchelf libfuse2

- name: Setup dependencies (Ubuntu-specific, ARM)
if: matrix.platform == 'ubuntu-22.04-arm' && contains(matrix.rust_target, 'aarch64')
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf libfuse2
sudo apt-get install -y libwebkit2gtk-4.1-dev libayatana-appindicator3-dev librsvg2-dev patchelf libfuse2

- name: Setup Tauri (Unix)
if: matrix.platform != 'windows-latest'
run: |
if ! cargo tauri --version > /dev/null 2>&1; then
cargo install --version 1.6.2 tauri-cli
if ! cargo tauri --version 2>/dev/null | grep -Eq '^tauri-cli 2\.'; then
cargo install tauri-cli --version "^2.0.0" --locked --force
else
echo "Tauri is already installed"
echo "Tauri CLI v2 is already installed"
fi

- name: Setup Tauri (Windows)
if: matrix.platform == 'windows-latest'
run: |
if (-not (cargo tauri --version 2>$null)) {
cargo install --version 1.6.2 tauri-cli
$tauriVersion = cargo tauri --version 2>$null
if (-not $tauriVersion -or $tauriVersion -notmatch '^tauri-cli 2\.') {
cargo install tauri-cli --version "^2.0.0" --locked --force
} else {
Write-Output "Tauri is already installed"
Write-Output "Tauri CLI v2 is already installed"
}

- name: Delete previous artifact, which may exist due to caching (macOS)
Expand Down Expand Up @@ -629,8 +630,8 @@ jobs:
PRIVATE_PUBLISH_KEY_PASSWORD: ${{ secrets.PRIVATE_PUBLISH_KEY_PASSWORD }}
run: |
cd runtime
export TAURI_PRIVATE_KEY="$PRIVATE_PUBLISH_KEY"
export TAURI_KEY_PASSWORD="$PRIVATE_PUBLISH_KEY_PASSWORD"
export TAURI_SIGNING_PRIVATE_KEY="$PRIVATE_PUBLISH_KEY"
export TAURI_SIGNING_PRIVATE_KEY_PASSWORD="$PRIVATE_PUBLISH_KEY_PASSWORD"
cargo tauri build --target ${{ matrix.rust_target }} --bundles ${{ matrix.tauri_bundle }}

- name: Build Tauri project (Windows)
Expand All @@ -640,8 +641,8 @@ jobs:
PRIVATE_PUBLISH_KEY_PASSWORD: ${{ secrets.PRIVATE_PUBLISH_KEY_PASSWORD }}
run: |
cd runtime
$env:TAURI_PRIVATE_KEY="$env:PRIVATE_PUBLISH_KEY"
$env:TAURI_KEY_PASSWORD="$env:PRIVATE_PUBLISH_KEY_PASSWORD"
$env:TAURI_SIGNING_PRIVATE_KEY="$env:PRIVATE_PUBLISH_KEY"
$env:TAURI_SIGNING_PRIVATE_KEY_PASSWORD="$env:PRIVATE_PUBLISH_KEY_PASSWORD"
cargo tauri build --target ${{ matrix.rust_target }} --bundles ${{ matrix.tauri_bundle }}

- name: Upload artifact (macOS)
Expand Down Expand Up @@ -729,14 +730,14 @@ jobs:
# Find and process files in the artifacts directory:
find "$GITHUB_WORKSPACE/artifacts" -type f | while read -r FILE; do

if [[ "$FILE" == *"osx-x64"* && "$FILE" == *".tar.gz" ]]; then
TARGET_NAME="MindWork AI Studio_x64.app.tar.gz"
elif [[ "$FILE" == *"osx-x64"* && "$FILE" == *".tar.gz.sig" ]]; then
if [[ "$FILE" == *"osx-x64"* && "$FILE" == *".tar.gz.sig" ]]; then
TARGET_NAME="MindWork AI Studio_x64.app.tar.gz.sig"
elif [[ "$FILE" == *"osx-arm64"* && "$FILE" == *".tar.gz" ]]; then
TARGET_NAME="MindWork AI Studio_aarch64.app.tar.gz"
elif [[ "$FILE" == *"osx-x64"* && "$FILE" == *".tar.gz" ]]; then
TARGET_NAME="MindWork AI Studio_x64.app.tar.gz"
elif [[ "$FILE" == *"osx-arm64"* && "$FILE" == *".tar.gz.sig" ]]; then
TARGET_NAME="MindWork AI Studio_aarch64.app.tar.gz.sig"
elif [[ "$FILE" == *"osx-arm64"* && "$FILE" == *".tar.gz" ]]; then
TARGET_NAME="MindWork AI Studio_aarch64.app.tar.gz"
else
TARGET_NAME="$(basename "$FILE")"
TARGET_NAME=$(echo "$TARGET_NAME" | sed "s/_${VERSION}//")
Expand Down Expand Up @@ -787,9 +788,9 @@ jobs:
platform="linux-x86_64"
elif [[ "$sig_file" == *"aarch64.AppImage"* ]]; then
platform="linux-aarch64"
elif [[ "$sig_file" == *"x64-setup.nsis"* ]]; then
elif [[ "$sig_file" == *"x64-setup"* ]]; then
platform="windows-x86_64"
elif [[ "$sig_file" == *"arm64-setup.nsis"* ]]; then
elif [[ "$sig_file" == *"arm64-setup"* ]]; then
platform="windows-aarch64"
else
echo "Platform not recognized: '$sig_file'"
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -169,3 +169,6 @@ orleans.codegen.cs

# Ignore GitHub Copilot migration files:
**/copilot.data.migration.*.xml

# Tauri generated schemas/manifests
/runtime/gen/
2 changes: 1 addition & 1 deletion app/Build/Commands/UpdateMetadataCommands.cs
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ public async Task Build()
Console.WriteLine("- Start building the Rust runtime ...");

var pathRuntime = Environment.GetRustRuntimeDirectory();
var rustBuildOutput = await this.ReadCommandOutput(pathRuntime, "cargo", "tauri build --bundles none", true);
var rustBuildOutput = await this.ReadCommandOutput(pathRuntime, "cargo", "tauri build --no-bundle", true);
var rustBuildOutputLines = rustBuildOutput.Split([global::System.Environment.NewLine], StringSplitOptions.RemoveEmptyEntries);
var foundRustIssue = false;
foreach (var buildOutputLine in rustBuildOutputLines)
Expand Down
2 changes: 1 addition & 1 deletion metadata.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
9.0.13 (commit 9ecbfd4f3f)
1.93.1 (commit 01f6ddf75)
8.15.0
1.8.1
2.10.3
3eb367d4c9e, release
osx-arm64
144.0.7543.0
Expand Down
16 changes: 12 additions & 4 deletions runtime/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
[package]
name = "mindwork-ai-studio"
version = "26.2.2"
edition = "2021"
edition = "2024"
description = "MindWork AI Studio"
authors = ["Thorsten Sommer"]

[build-dependencies]
tauri-build = { version = "1.5.6", features = [] }
tauri-build = { version = "2.5.6", features = [] }

[dependencies]
tauri = { version = "1.8.3", features = [ "http-all", "updater", "shell-sidecar", "shell-open", "dialog", "global-shortcut"] }
tauri-plugin-window-state = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v1" }
tauri = { version = "2.10.3", features = [] }
tauri-plugin-window-state = { version = "2.4.1" }
serde = { version = "1.0.228", features = ["derive"] }
serde_json = "1.0.149"
keyring = { version = "3.6.2", features = ["apple-native", "windows-native", "sync-secret-service"] }
Expand Down Expand Up @@ -46,6 +46,10 @@ sysinfo = "0.38.0"
# Fixes security vulnerability downstream, where the upstream is not fixed yet:
time = "0.3.47" # -> Rocket
bytes = "1.11.1" # -> almost every dependency
tauri-plugin-fs = "2"
tauri-plugin-http = "2"
tauri-plugin-shell = "2.3.5"
tauri-plugin-dialog = "2.6.0"

[target.'cfg(target_os = "linux")'.dependencies]
# See issue https://github.com/tauri-apps/tauri/issues/4470
Expand All @@ -57,5 +61,9 @@ openssl = "0.10.75"
[target.'cfg(target_os = "windows")'.dependencies]
windows-registry = "0.6.1"

[target.'cfg(not(any(target_os = "android", target_os = "ios")))'.dependencies]
tauri-plugin-global-shortcut = "2"
tauri-plugin-updater = "2.10.0"

[features]
custom-protocol = ["tauri/custom-protocol"]
27 changes: 26 additions & 1 deletion runtime/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,18 @@ fn update_cargo_toml(cargo_path: &str, version: &str) {
let cargo_toml_lines = cargo_toml.lines();
let mut new_cargo_toml = String::new();

// Return early when the version already matches to avoid unnecessary rewrites.
let current_version = cargo_toml.lines().find_map(|line| {
let trimmed = line.trim_start();
let rest = trimmed.strip_prefix("\"version\": ")?;
let quoted = rest.strip_prefix('"')?;
let end_idx = quoted.find('"')?;
Some(&quoted[..end_idx])
});
if current_version == Some(version) {
return;
}

for line in cargo_toml_lines {
if line.starts_with("version = ") {
new_cargo_toml.push_str(&format!("version = \"{version}\""));
Expand All @@ -67,6 +79,19 @@ fn update_cargo_toml(cargo_path: &str, version: &str) {

fn update_tauri_conf(tauri_conf_path: &str, version: &str) {
let tauri_conf = std::fs::read_to_string(tauri_conf_path).unwrap();

// Return early when the version already matches to avoid unnecessary rewrites.
let current_version = tauri_conf.lines().find_map(|line| {
let trimmed = line.trim_start();
let rest = trimmed.strip_prefix("\"version\": ")?;
let quoted = rest.strip_prefix('"')?;
let end_idx = quoted.find('"')?;
Some(&quoted[..end_idx])
});
if current_version == Some(version) {
return;
}

let tauri_conf_lines = tauri_conf.lines();
let mut new_tauri_conf = String::new();

Expand All @@ -75,7 +100,7 @@ fn update_tauri_conf(tauri_conf_path: &str, version: &str) {
// "version": "0.1.0-alpha.0"
// Please notice, that the version number line might have a leading tab, etc.
if line.contains("\"version\": ") {
new_tauri_conf.push_str(&format!("\t\"version\": \"{version}\""));
new_tauri_conf.push_str(&format!(" \"version\": \"{version}\","));
} else {
new_tauri_conf.push_str(line);
}
Expand Down
48 changes: 48 additions & 0 deletions runtime/capabilities/default.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"$schema": "../gen/schemas/desktop-schema.json",
"identifier": "default",
"description": "Default capability for MindWork AI Studio",
"windows": [
"main"
],
"permissions": [
"core:default",
"updater:default",
"shell:allow-open",
{
"identifier": "shell:allow-spawn",
"allow": [
{
"name": "mindworkAIStudioServer",
"sidecar": true,
"args": true
},
{
"name": "qdrant",
"sidecar": true,
"args": true
}
]
},
{
"identifier": "http:default",
"allow": [
{
"url": "http://localhost"
},
{
"url": "http://localhost/*"
}
]
},
"fs:default",
{
"identifier": "fs:scope",
"allow": [
{
"path": "$RESOURCE/resources/**"
}
]
}
]
}
Loading