Development app builds (#5255)

* Workflow changes

* Propagate app_identifier via State

* Remove old updater stuff

* Remove patch file

* Remove unused binding

* Fix application loading

* Don't sign windows binaries by default

* Remove the damn emojis

* Figure out where windows artifacts are

* Fix windows artifacts
This commit is contained in:
François-Xavier Talbot
2026-02-02 08:10:23 -05:00
committed by GitHub
parent 3552c8280b
commit e3395a7366
10 changed files with 118 additions and 56 deletions

View File

@@ -71,6 +71,9 @@ pub struct State {
/// Process manager
pub process_manager: ProcessManager,
/// App identifier string (like com.modrinth.ModrinthApp)
pub app_identifier: String,
/// Friends socket
pub friends_socket: FriendsSocket,
@@ -80,9 +83,9 @@ pub struct State {
}
impl State {
pub async fn init() -> crate::Result<()> {
pub async fn init(app_identifier: String) -> crate::Result<()> {
let state = LAUNCHER_STATE
.get_or_try_init(Self::initialize_state)
.get_or_try_init(move || Self::initialize_state(app_identifier))
.await?;
tokio::task::spawn(async move {
@@ -132,9 +135,11 @@ impl State {
}
#[tracing::instrument]
async fn initialize_state() -> crate::Result<Arc<Self>> {
async fn initialize_state(
app_identifier: String,
) -> crate::Result<Arc<Self>> {
tracing::info!("Connecting to app database");
let pool = db::connect().await?;
let pool = db::connect(&app_identifier).await?;
legacy_converter::migrate_legacy_data(&pool).await?;
@@ -153,9 +158,12 @@ impl State {
&mut settings,
&pool,
&io_semaphore,
&app_identifier,
)
.await?;
let directories = DirectoryInfo::init(settings.custom_dir).await?;
let directories =
DirectoryInfo::init(settings.custom_dir, &app_identifier).await?;
let discord_rpc = DiscordGuard::init()?;
@@ -177,6 +185,7 @@ impl State {
friends_socket,
pool,
file_watcher,
app_identifier,
}))
}
}