Skip to content

The truly free, open-source, local-first, cross-platform CapCut replacement. Scriptable through a JSON-RPC API & MCP.

feat: the app's identifier is org.standalones.concat, and an update keeps everything the old one had

Jareerb237687c01dc
diff --git a/.github/workflows/build-app.yml b/.github/workflows/build-app.yml
index 35bf7674..df744a04 100644
--- a/.github/workflows/build-app.yml
+++ b/.github/workflows/build-app.yml
@@ -600,7 +600,7 @@ jobs:
<dict>
<key>CFBundleName</key><string>Concat</string>
<key>CFBundleDisplayName</key><string>Concat</string>
- <key>CFBundleIdentifier</key><string>app.concat.editor</string>
+ <key>CFBundleIdentifier</key><string>org.standalones.concat</string>
<key>CFBundleVersion</key><string>${VERSION}</string>
<key>CFBundleShortVersionString</key><string>${VERSION}</string>
<key>CFBundleExecutable</key><string>concat</string>
diff --git a/TRANSLATING.md b/TRANSLATING.md
index d8d3000c..915fb1df 100644
--- a/TRANSLATING.md
+++ b/TRANSLATING.md
@@ -46,9 +46,9 @@ restart the app; the language appears in Settings.
| Platform | Folder |
|---|---|
-| macOS | `~/Library/Application Support/app.concat.editor/locales/` |
-| Linux | `~/.config/app.concat.editor/locales/` |
-| Windows | `%APPDATA%\app.concat.editor\locales\` |
+| macOS | `~/Library/Application Support/org.standalones.concat/locales/` |
+| Linux | `~/.config/org.standalones.concat/locales/` |
+| Windows | `%APPDATA%\org.standalones.concat\locales\` |
A file there with the code of a language Concat ships lays its lines over
the shipped ones, so a correction is a file holding only the lines that
diff --git a/android-native/app/build.gradle.kts b/android-native/app/build.gradle.kts
index df1d2e2f..7302b79a 100644
--- a/android-native/app/build.gradle.kts
+++ b/android-native/app/build.gradle.kts
@@ -5,14 +5,14 @@ plugins {
}
android {
- namespace = "app.concat.editor.spike"
+ namespace = "org.standalones.concat.spike"
compileSdk = 35
// The NDK the engine is built with; AGP strips the .so's symbols with it.
ndkVersion = "28.2.13676358"
defaultConfig {
- // Never app.concat.editor: this installs beside the shipping app.
- applicationId = "app.concat.editor.spike"
+ // Never org.standalones.concat: this installs beside the shipping app.
+ applicationId = "org.standalones.concat.spike"
minSdk = 26
targetSdk = 35
versionCode = 1
diff --git a/android-native/app/src/main/java/app/concat/editor/spike/ConcatNative.kt b/android-native/app/src/main/java/org/standalones/concat/spike/ConcatNative.kt
similarity index 94%
rename from android-native/app/src/main/java/app/concat/editor/spike/ConcatNative.kt
rename to android-native/app/src/main/java/org/standalones/concat/spike/ConcatNative.kt
index fc618fe0..c0027cf1 100644
--- a/android-native/app/src/main/java/app/concat/editor/spike/ConcatNative.kt
+++ b/android-native/app/src/main/java/org/standalones/concat/spike/ConcatNative.kt
@@ -1,4 +1,4 @@
-package app.concat.editor.spike
+package org.standalones.concat.spike
import android.content.Context
import android.view.Surface
diff --git a/android-native/app/src/main/java/app/concat/editor/spike/MainActivity.kt b/android-native/app/src/main/java/org/standalones/concat/spike/MainActivity.kt
similarity index 99%
rename from android-native/app/src/main/java/app/concat/editor/spike/MainActivity.kt
rename to android-native/app/src/main/java/org/standalones/concat/spike/MainActivity.kt
index 93678366..056954b0 100644
--- a/android-native/app/src/main/java/app/concat/editor/spike/MainActivity.kt
+++ b/android-native/app/src/main/java/org/standalones/concat/spike/MainActivity.kt
@@ -1,4 +1,4 @@
-package app.concat.editor.spike
+package org.standalones.concat.spike
import android.net.Uri
import android.os.Bundle
diff --git a/scripts/bundle-cards.sh b/scripts/bundle-cards.sh
index f5938c3e..fd329396 100755
--- a/scripts/bundle-cards.sh
+++ b/scripts/bundle-cards.sh
@@ -14,9 +14,9 @@ set -euo pipefail
root="$(cd "$(dirname "$0")/.." && pwd)"
out="$root/src/crates/concat/cards"
case "$(uname -s)" in
- Darwin) default="$HOME/Library/Application Support/app.concat.editor/cards" ;;
- Linux) default="${XDG_DATA_HOME:-$HOME/.local/share}/app.concat.editor/cards" ;;
- *) default="${LOCALAPPDATA:-}/app.concat.editor/cards" ;;
+ Darwin) default="$HOME/Library/Application Support/org.standalones.concat/cards" ;;
+ Linux) default="${XDG_DATA_HOME:-$HOME/.local/share}/org.standalones.concat/cards" ;;
+ *) default="${LOCALAPPDATA:-}/org.standalones.concat/cards" ;;
esac
from="${1:-$default}"
[ -d "$from" ] || { echo "no card folder at $from" >&2; exit 1; }
diff --git a/scripts/ci/smoke-android.sh b/scripts/ci/smoke-android.sh
index 55489d52..f7eff3c6 100755
--- a/scripts/ci/smoke-android.sh
+++ b/scripts/ci/smoke-android.sh
@@ -44,7 +44,7 @@
# whole logcat from before the launch to the end, the app's lines alone,
# a screenshot of the screen at the end, the window focus, and the
# device's properties. CI uploads that folder. The package is
-# app.concat.editor unless --package names another.
+# org.standalones.concat unless --package names another.
#
# --no-install starts what is already installed, which leaves a device
# somebody is using as it was apart from the restart of the app. Runs in
@@ -56,7 +56,7 @@ out=smoke-android
wait_secs=45
ready=""
install=1
-package=app.concat.editor
+package=org.standalones.concat
usage() {
echo "usage: $0 [--out DIR] [--wait SECS] [--ready REGEX] [--no-install] [--package NAME] APK" >&2
diff --git a/src/crates/concat-android/Cargo.toml b/src/crates/concat-android/Cargo.toml
index 4e6c0e77..e599fe10 100644
--- a/src/crates/concat-android/Cargo.toml
+++ b/src/crates/concat-android/Cargo.toml
@@ -40,7 +40,7 @@ android-build = "0.1"
# sherpa-onnx runtime libraries and the manifest below into an APK. The
# runtime libraries come from scripts/sherpa-mobile.sh.
[package.metadata.android]
-package = "app.concat.editor"
+package = "org.standalones.concat"
apk_name = "Concat"
build_targets = ["aarch64-linux-android"]
runtime_libs = "../../vendor/sherpa-onnx/jniLibs"
diff --git a/src/crates/concat-android/java/ConcatFiles.java b/src/crates/concat-android/java/ConcatFiles.java
index 93824c8f..dfaf38e7 100644
--- a/src/crates/concat-android/java/ConcatFiles.java
+++ b/src/crates/concat-android/java/ConcatFiles.java
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: AGPL-3.0-or-later
// SPDX-FileCopyrightText: 2026 Jareer Abdullah and Concat contributors
-package app.concat.editor;
+package org.standalones.concat;
import android.Manifest;
import android.app.Activity;
diff --git a/src/crates/concat-android/src/lib.rs b/src/crates/concat-android/src/lib.rs
index 7f2bc135..bf7351aa 100644
--- a/src/crates/concat-android/src/lib.rs
+++ b/src/crates/concat-android/src/lib.rs
@@ -112,9 +112,9 @@ mod java {
use jni::{Env, JavaVM, jni_sig, jni_str};
use slint::android::AndroidApp;
- /// The classes build.rs compiled: app.concat.editor.ConcatFiles.
+ /// The classes build.rs compiled: org.standalones.concat.ConcatFiles.
const DEX: &[u8] = include_bytes!(concat!(env!("OUT_DIR"), "/classes.dex"));
- const CLASS_NAME: &str = "app.concat.editor.ConcatFiles";
+ const CLASS_NAME: &str = "org.standalones.concat.ConcatFiles";
/// The fragment class, loaded once and kept.
static CLASS: OnceLock<Global<JClass<'static>>> = OnceLock::new();
diff --git a/src/crates/concat-host/src/dirs.rs b/src/crates/concat-host/src/dirs.rs
index f5760b49..08941133 100644
--- a/src/crates/concat-host/src/dirs.rs
+++ b/src/crates/concat-host/src/dirs.rs
@@ -22,7 +22,11 @@
use std::path::{Path, PathBuf};
/// The app identifier, which is also the folder name everywhere.
-pub const IDENTIFIER: &str = "app.concat.editor";
+pub const IDENTIFIER: &str = "org.standalones.concat";
+
+/// The identifier every build before 2026-10-26 used, whose folders
+/// [`adopt`] moves to [`IDENTIFIER`]'s on first start.
+const FORMER_IDENTIFIER: &str = "app.concat.editor";
/// The app's own directories on this machine.
#[derive(Clone, Debug)]
@@ -43,7 +47,10 @@ impl AppDirs {
}
let convention = convention(std::env::consts::OS);
if convention == Convention::Apple {
- Ok(apple(&home()?, cfg!(target_os = "ios")))
+ let dirs = apple(&home()?, cfg!(target_os = "ios"));
+ adopt(&dirs.config);
+ adopt(&dirs.data);
+ Ok(dirs)
} else if convention == Convention::Windows {
let config = std::env::var_os("APPDATA")
.map(PathBuf::from)
@@ -52,6 +59,8 @@ impl AppDirs {
let data = std::env::var_os("LOCALAPPDATA")
.map(PathBuf::from)
.map_or_else(|| config.clone(), |base| base.join(IDENTIFIER));
+ adopt(&config);
+ adopt(&data);
move_data(&config, &data);
Ok(AppDirs { config, data })
} else {
@@ -71,10 +80,13 @@ impl AppDirs {
Some(path) => path,
None => home()?.join(".local").join("share"),
};
- Ok(AppDirs {
+ let dirs = AppDirs {
config: config_base.join(IDENTIFIER),
data: data_base.join(IDENTIFIER),
- })
+ };
+ adopt(&dirs.config);
+ adopt(&dirs.data);
+ Ok(dirs)
}
}
@@ -135,6 +147,71 @@ fn move_data(from: &Path, to: &Path) {
}
}
+/// Moves the folder the former identifier named, beside `folder`, to
+/// `folder`, once: the settings, recents, models and the user's own sounds
+/// and voices of every build before the rename, so an update does not
+/// open on an empty app and fetch every model again. Nothing happens when
+/// `folder` exists already or there is nothing to move.
+///
+/// A link is left where the old folder was, to the new one: a project
+/// that took a sound from the Audio page or a saved voice holds its path,
+/// under the old name, and finds it through the link. A symbolic link on
+/// a Mac and on Linux, a directory junction on Windows, which needs no
+/// rights a symbolic link would. A folder that will not move - another
+/// volume, something holding it open - is left where it is, and the app
+/// starts afresh beside it rather than not at all.
+fn adopt(folder: &Path) {
+ let (Some(parent), Some(name)) = (folder.parent(), folder.file_name()) else {
+ return;
+ };
+ if name != IDENTIFIER || folder.exists() {
+ return;
+ }
+ let former = parent.join(FORMER_IDENTIFIER);
+ if !former.is_dir() || former.is_symlink() {
+ return;
+ }
+ if let Err(error) = std::fs::rename(&former, folder) {
+ log::warn!(
+ "could not move {} to {}: {error}",
+ former.display(),
+ folder.display()
+ );
+ return;
+ }
+ if let Err(error) = link(folder, &former) {
+ log::warn!("could not leave a link at {}: {error}", former.display());
+ }
+}
+
+#[cfg(unix)]
+fn link(target: &Path, at: &Path) -> std::io::Result<()> {
+ std::os::unix::fs::symlink(target, at)
+}
+
+#[cfg(windows)]
+fn link(target: &Path, at: &Path) -> std::io::Result<()> {
+ use std::os::windows::process::CommandExt;
+ /// No console window flashing up behind the app's for it.
+ const CREATE_NO_WINDOW: u32 = 0x0800_0000;
+ let status = std::process::Command::new("cmd")
+ .args(["/C", "mklink", "/J"])
+ .arg(at)
+ .arg(target)
+ .creation_flags(CREATE_NO_WINDOW)
+ .status()?;
+ if status.success() {
+ Ok(())
+ } else {
+ Err(std::io::Error::other(format!("mklink /J answered {status}")))
+ }
+}
+
+#[cfg(not(any(unix, windows)))]
+fn link(_target: &Path, _at: &Path) -> std::io::Result<()> {
+ Ok(())
+}
+
/// Which platform's rule names the directories.
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
enum Convention {
@@ -235,6 +312,33 @@ mod tests {
);
}
+ /// A folder under the former identifier moves to the new name with
+ /// everything in it, once, and its old path still reaches it.
+ #[test]
+ fn the_former_identifiers_folder_is_adopted() {
+ let root = std::env::temp_dir().join(format!("concat-adopt-{}", std::process::id()));
+ let _ = std::fs::remove_dir_all(&root);
+ let former = root.join(FORMER_IDENTIFIER);
+ std::fs::create_dir_all(former.join("voices")).unwrap();
+ std::fs::write(former.join("settings.json"), b"{}").unwrap();
+ std::fs::write(former.join("voices").join("me.wav"), b"voice").unwrap();
+
+ let folder = root.join(IDENTIFIER);
+ adopt(&folder);
+ assert!(folder.join("settings.json").is_file());
+ assert!(folder.join("voices").join("me.wav").is_file());
+ // A project's path under the old name still finds the file.
+ assert_eq!(
+ std::fs::read(former.join("voices").join("me.wav")).unwrap(),
+ b"voice"
+ );
+
+ // Run again, nothing changes; and a folder already there is left be.
+ adopt(&folder);
+ assert!(folder.join("settings.json").is_file());
+ let _ = std::fs::remove_dir_all(&root);
+ }
+
/// An older layout's models move to the new home once, and the settings
/// beside them stay where they were.
#[test]
diff --git a/src/crates/concat-mobile/src/jni.rs b/src/crates/concat-mobile/src/jni.rs
index ac6eec8b..79e2176d 100644
--- a/src/crates/concat-mobile/src/jni.rs
+++ b/src/crates/concat-mobile/src/jni.rs
@@ -4,7 +4,7 @@
//! The two things UniFFI cannot carry: the app's `Context` (which cpal's
//! AAudio host reads through ndk-context to size its buffers) and a
//! `Surface` (whose ANativeWindow the render thread draws on). Both are
-//! plain JNI functions on `app.concat.editor.spike.ConcatNative`, which the
+//! plain JNI functions on `org.standalones.concat.spike.ConcatNative`, which the
//! Kotlin side reaches after `System.loadLibrary("concat_mobile")`.
use jni_sys::{JNIEnv, jclass, jlong, jobject};
@@ -12,7 +12,7 @@ use jni_sys::{JNIEnv, jclass, jlong, jobject};
/// `ConcatNative.init(context)`: logcat, and the JavaVM and Context for
/// ndk-context. Once per process; later calls do nothing.
#[unsafe(no_mangle)]
-pub unsafe extern "system" fn Java_app_concat_editor_spike_ConcatNative_init(
+pub unsafe extern "system" fn Java_org_standalones_concat_spike_ConcatNative_init(
env: *mut JNIEnv,
_class: jclass,
context: jobject,
@@ -44,7 +44,7 @@ pub unsafe extern "system" fn Java_app_concat_editor_spike_ConcatNative_init(
/// with one reference acquired, as a long, or 0. `Engine.attachSurface`
/// takes that reference over.
#[unsafe(no_mangle)]
-pub unsafe extern "system" fn Java_app_concat_editor_spike_ConcatNative_windowFromSurface(
+pub unsafe extern "system" fn Java_org_standalones_concat_spike_ConcatNative_windowFromSurface(
env: *mut JNIEnv,
_class: jclass,
surface: jobject,
diff --git a/src/scripts/ios-app.sh b/src/scripts/ios-app.sh
index a7f82e6d..48190dc6 100755
--- a/src/scripts/ios-app.sh
+++ b/src/scripts/ios-app.sh
@@ -64,7 +64,7 @@ cat > "$app/Info.plist" <<PLIST
<dict>
<key>CFBundleName</key><string>Concat</string>
<key>CFBundleDisplayName</key><string>Concat</string>
- <key>CFBundleIdentifier</key><string>app.concat.editor</string>
+ <key>CFBundleIdentifier</key><string>org.standalones.concat</string>
<key>CFBundleVersion</key><string>${version}</string>
<key>CFBundleShortVersionString</key><string>${version}</string>
<key>CFBundleExecutable</key><string>Concat</string>