mirror of
https://github.com/Drop-OSS/drop-app.git
synced 2025-11-14 00:31:33 +10:00
Compare commits
3 Commits
v0.3.2
...
52-feature
| Author | SHA1 | Date | |
|---|---|---|---|
| 96df57ac54 | |||
| 8069616f2b | |||
| 5eef2bf60f |
6
.github/workflows/release.yml
vendored
6
.github/workflows/release.yml
vendored
@ -69,9 +69,9 @@ jobs:
|
|||||||
security set-keychain-settings -t 3600 -u build.keychain
|
security set-keychain-settings -t 3600 -u build.keychain
|
||||||
|
|
||||||
curl https://droposs.org/drop.crt --output drop.pem
|
curl https://droposs.org/drop.crt --output drop.pem
|
||||||
sudo security authorizationdb write com.apple.trust-settings.admin allow
|
sudo security authorizationdb write com.apple.trust-settings.user allow
|
||||||
sudo security add-trusted-cert -d -r trustRoot -k build.keychain -p codeSign -u -1 drop.pem
|
security add-trusted-cert -r trustRoot -k build.keychain -p codeSign -u -1 drop.pem
|
||||||
sudo security authorizationdb remove com.apple.trust-settings.admin
|
sudo security authorizationdb remove com.apple.trust-settings.user
|
||||||
|
|
||||||
security import certificate.p12 -k build.keychain -P "$APPLE_CERTIFICATE_PASSWORD" -T /usr/bin/codesign
|
security import certificate.p12 -k build.keychain -P "$APPLE_CERTIFICATE_PASSWORD" -T /usr/bin/codesign
|
||||||
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k "$KEYCHAIN_PASSWORD" build.keychain
|
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k "$KEYCHAIN_PASSWORD" build.keychain
|
||||||
|
|||||||
16
main/pages/community/index.vue
Normal file
16
main/pages/community/index.vue
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
<template>
|
||||||
|
<div class="mx-auto flex flex-col items-center gap-y-4 max-w-2xl py-32 sm:py-48 lg:py-56">
|
||||||
|
<div>
|
||||||
|
<Wordmark />
|
||||||
|
</div>
|
||||||
|
<div class="text-center">
|
||||||
|
<h1 class="text-balance text-4xl font-bold font-display tracking-tight text-zinc-100 sm:text-6xl">
|
||||||
|
Under construction
|
||||||
|
</h1>
|
||||||
|
<p class="mt-6 text-lg leading-8 text-zinc-400">
|
||||||
|
Yes, we know. We're working on it <a class="text-white" target="_blank"
|
||||||
|
href="https://github.com/Drop-OSS/drop-app/issues/52">here.</a>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
16
main/pages/news/index.vue
Normal file
16
main/pages/news/index.vue
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
<template>
|
||||||
|
<div class="mx-auto flex flex-col items-center gap-y-4 max-w-2xl py-32 sm:py-48 lg:py-56">
|
||||||
|
<div>
|
||||||
|
<Wordmark />
|
||||||
|
</div>
|
||||||
|
<div class="text-center">
|
||||||
|
<h1 class="text-balance text-4xl font-bold font-display tracking-tight text-zinc-100 sm:text-6xl">
|
||||||
|
Under construction
|
||||||
|
</h1>
|
||||||
|
<p class="mt-6 text-lg leading-8 text-zinc-400">
|
||||||
|
Yes, we know. We're working on it <a class="text-white" target="_blank"
|
||||||
|
href="https://github.com/Drop-OSS/drop-app/issues/52">here.</a>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
@ -172,7 +172,7 @@ pub fn download_game_bucket(
|
|||||||
let raw_res = response.text().map_err(|e| {
|
let raw_res = response.text().map_err(|e| {
|
||||||
ApplicationDownloadError::Communication(RemoteAccessError::FetchError(e.into()))
|
ApplicationDownloadError::Communication(RemoteAccessError::FetchError(e.into()))
|
||||||
})?;
|
})?;
|
||||||
info!("{}", raw_res);
|
info!("{raw_res}");
|
||||||
if let Ok(err) = serde_json::from_str::<DropServerError>(&raw_res) {
|
if let Ok(err) = serde_json::from_str::<DropServerError>(&raw_res) {
|
||||||
return Err(ApplicationDownloadError::Communication(
|
return Err(ApplicationDownloadError::Communication(
|
||||||
RemoteAccessError::InvalidResponse(err),
|
RemoteAccessError::InvalidResponse(err),
|
||||||
@ -196,8 +196,7 @@ pub fn download_game_bucket(
|
|||||||
let length = raw_length.parse::<usize>().unwrap_or(0);
|
let length = raw_length.parse::<usize>().unwrap_or(0);
|
||||||
let Some(drop) = bucket.drops.get(i) else {
|
let Some(drop) = bucket.drops.get(i) else {
|
||||||
warn!(
|
warn!(
|
||||||
"invalid number of Content-Lengths recieved: {}, {}",
|
"invalid number of Content-Lengths recieved: {i}, {lengths}"
|
||||||
i, lengths
|
|
||||||
);
|
);
|
||||||
return Err(ApplicationDownloadError::DownloadError);
|
return Err(ApplicationDownloadError::DownloadError);
|
||||||
};
|
};
|
||||||
|
|||||||
@ -64,8 +64,7 @@ use serde::{Deserialize, Serialize};
|
|||||||
use std::fs::File;
|
use std::fs::File;
|
||||||
use std::io::Write;
|
use std::io::Write;
|
||||||
use std::panic::PanicHookInfo;
|
use std::panic::PanicHookInfo;
|
||||||
use std::path::Path;
|
use std::path::{Path, PathBuf};
|
||||||
use std::process::{Command, Stdio};
|
|
||||||
use std::str::FromStr;
|
use std::str::FromStr;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use std::time::SystemTime;
|
use std::time::SystemTime;
|
||||||
@ -110,13 +109,7 @@ fn create_new_compat_info() -> Option<CompatInfo> {
|
|||||||
#[cfg(target_os = "windows")]
|
#[cfg(target_os = "windows")]
|
||||||
return None;
|
return None;
|
||||||
|
|
||||||
let has_umu_installed = Command::new(UMU_LAUNCHER_EXECUTABLE)
|
let has_umu_installed = *UMU_LAUNCHER_EXECUTABLE == PathBuf::new();
|
||||||
.stdout(Stdio::null())
|
|
||||||
.spawn();
|
|
||||||
if let Err(umu_error) = &has_umu_installed {
|
|
||||||
warn!("disabling windows support with error: {umu_error}");
|
|
||||||
}
|
|
||||||
let has_umu_installed = has_umu_installed.is_ok();
|
|
||||||
Some(CompatInfo {
|
Some(CompatInfo {
|
||||||
umu_installed: has_umu_installed,
|
umu_installed: has_umu_installed,
|
||||||
})
|
})
|
||||||
|
|||||||
@ -1,3 +1,10 @@
|
|||||||
|
use std::{
|
||||||
|
ffi::OsStr,
|
||||||
|
path::PathBuf,
|
||||||
|
process::{Command, Stdio},
|
||||||
|
sync::LazyLock,
|
||||||
|
};
|
||||||
|
|
||||||
use log::debug;
|
use log::debug;
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
@ -24,7 +31,31 @@ impl ProcessHandler for NativeGameLauncher {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub const UMU_LAUNCHER_EXECUTABLE: &str = "umu-run";
|
pub static UMU_LAUNCHER_EXECUTABLE: LazyLock<PathBuf> = LazyLock::new(|| {
|
||||||
|
let x = get_umu_executable();
|
||||||
|
println!("{:?}", &x);
|
||||||
|
x
|
||||||
|
});
|
||||||
|
const UMU_BASE_LAUNCHER_EXECUTABLE: &str = "umu-run";
|
||||||
|
const UMU_INSTALL_DIRS: [&str; 4] = ["/app/share", "/use/local/share", "/usr/share", "/opt"];
|
||||||
|
|
||||||
|
fn get_umu_executable() -> PathBuf {
|
||||||
|
if check_executable_exists(UMU_BASE_LAUNCHER_EXECUTABLE) {
|
||||||
|
return PathBuf::from(UMU_BASE_LAUNCHER_EXECUTABLE);
|
||||||
|
}
|
||||||
|
|
||||||
|
for dir in UMU_INSTALL_DIRS {
|
||||||
|
let p = PathBuf::from(dir).join(UMU_BASE_LAUNCHER_EXECUTABLE);
|
||||||
|
if check_executable_exists(&p) {
|
||||||
|
return p;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
PathBuf::new()
|
||||||
|
}
|
||||||
|
fn check_executable_exists<P: AsRef<OsStr>>(exec: P) -> bool {
|
||||||
|
let has_umu_installed = Command::new(exec).stdout(Stdio::null()).spawn();
|
||||||
|
has_umu_installed.is_ok()
|
||||||
|
}
|
||||||
pub struct UMULauncher;
|
pub struct UMULauncher;
|
||||||
impl ProcessHandler for UMULauncher {
|
impl ProcessHandler for UMULauncher {
|
||||||
fn create_launch_process(
|
fn create_launch_process(
|
||||||
@ -47,8 +78,8 @@ impl ProcessHandler for UMULauncher {
|
|||||||
None => game_version.game_id.clone(),
|
None => game_version.game_id.clone(),
|
||||||
};
|
};
|
||||||
format!(
|
format!(
|
||||||
"GAMEID={game_id} {umu} \"{launch}\" {args}",
|
"GAMEID={game_id} {umu:?} \"{launch}\" {args}",
|
||||||
umu = UMU_LAUNCHER_EXECUTABLE,
|
umu = &*UMU_LAUNCHER_EXECUTABLE,
|
||||||
launch = launch_command,
|
launch = launch_command,
|
||||||
args = args.join(" ")
|
args = args.join(" ")
|
||||||
)
|
)
|
||||||
@ -80,7 +111,10 @@ impl ProcessHandler for AsahiMuvmLauncher {
|
|||||||
game_version,
|
game_version,
|
||||||
current_dir,
|
current_dir,
|
||||||
);
|
);
|
||||||
let mut args_cmd = umu_string.split("umu-run").collect::<Vec<&str>>().into_iter();
|
let mut args_cmd = umu_string
|
||||||
|
.split("umu-run")
|
||||||
|
.collect::<Vec<&str>>()
|
||||||
|
.into_iter();
|
||||||
let args = args_cmd.next().unwrap().trim();
|
let args = args_cmd.next().unwrap().trim();
|
||||||
let cmd = format!("umu-run{}", args_cmd.next().unwrap());
|
let cmd = format!("umu-run{}", args_cmd.next().unwrap());
|
||||||
|
|
||||||
|
|||||||
@ -347,11 +347,10 @@ impl ProcessManager<'_> {
|
|||||||
|
|
||||||
#[cfg(target_os = "windows")]
|
#[cfg(target_os = "windows")]
|
||||||
use std::os::windows::process::CommandExt;
|
use std::os::windows::process::CommandExt;
|
||||||
|
|
||||||
#[cfg(target_os = "windows")]
|
#[cfg(target_os = "windows")]
|
||||||
let mut command = Command::new("start");
|
let mut command = Command::new("cmd");
|
||||||
#[cfg(target_os = "windows")]
|
#[cfg(target_os = "windows")]
|
||||||
command.raw_arg(format!("/min cmd /C \"{}\"", &launch_string));
|
command.raw_arg(format!("/C \"{}\"", &launch_string));
|
||||||
|
|
||||||
info!("launching (in {install_dir}): {launch_string}",);
|
info!("launching (in {install_dir}): {launch_string}",);
|
||||||
|
|
||||||
|
|||||||
@ -130,7 +130,7 @@ pub fn auth_initiate_code(app: AppHandle) -> Result<String, RemoteAccessError> {
|
|||||||
let code = auth_initiate_logic("code".to_string())?;
|
let code = auth_initiate_logic("code".to_string())?;
|
||||||
let header_code = code.clone();
|
let header_code = code.clone();
|
||||||
|
|
||||||
println!("using code: {} to sign in", code);
|
println!("using code: {code} to sign in");
|
||||||
|
|
||||||
tauri::async_runtime::spawn(async move {
|
tauri::async_runtime::spawn(async move {
|
||||||
let load = async || -> Result<(), RemoteAccessError> {
|
let load = async || -> Result<(), RemoteAccessError> {
|
||||||
|
|||||||
Reference in New Issue
Block a user