1
Fork 0
mirror of https://github.com/redstrate/Auracite.git synced 2025-04-20 11:47:47 +00:00

Update dependencies, Flatpak, Rust edition and more

Also adds building information to the wiki because I forgot myself!
This commit is contained in:
Joshua Goins 2025-03-10 18:55:52 -04:00
parent 70162d9025
commit be94d9331f
7 changed files with 1257 additions and 1099 deletions

View file

@ -2,7 +2,7 @@
"id": "zone.xiv.auracite", "id": "zone.xiv.auracite",
"branch": "master", "branch": "master",
"runtime": "org.kde.Platform", "runtime": "org.kde.Platform",
"runtime-version": "6.7", "runtime-version": "6.8",
"sdk": "org.kde.Sdk", "sdk": "org.kde.Sdk",
"command": "auracite", "command": "auracite",
"finish-args": [ "finish-args": [

732
Cargo.lock generated

File diff suppressed because it is too large Load diff

View file

@ -1,7 +1,7 @@
[package] [package]
name = "auracite" name = "auracite"
version = "0.1.0" version = "0.1.0"
edition = "2021" edition = "2024"
description = "Export your FFXIV character in portable, generic formats" description = "Export your FFXIV character in portable, generic formats"
repository = "https://github.com/redstrate/Auracite" repository = "https://github.com/redstrate/Auracite"
license = "AGPL-3" license = "AGPL-3"
@ -9,12 +9,14 @@ license = "AGPL-3"
[lib] [lib]
crate-type = ["cdylib", "rlib"] crate-type = ["cdylib", "rlib"]
[features]
debug = ["dep:console_error_panic_hook"]
[build-dependencies] [build-dependencies]
cxx-qt-build = { git = "https://github.com/KDAB/cxx-qt", branch = "main", features = ["link_qt_object_files"], default-features = false } cxx-qt-build = { version = "0.7", features = ["link_qt_object_files"], default-features = false }
[dependencies] [dependencies]
# Used to scrape the Lodestone HTML pages # Used to scrape the Lodestone HTML pages
# NOTE: Do not upgrade to 0.21, as it crashes in WebAssembly for some reason. Report this upstream.
scraper = { version ="0.20" } scraper = { version ="0.20" }
# Used to serialize the JSON data we export # Used to serialize the JSON data we export
@ -24,7 +26,7 @@ serde = { version = "1.0", features = ["derive"], default-features = false }
regex = { version = "1.11", default-features = false, features = ["unicode-perl"] } regex = { version = "1.11", default-features = false, features = ["unicode-perl"] }
# Used to generate the HTML page to easily preview your exported data # Used to generate the HTML page to easily preview your exported data
minijinja = { version = "2.0", default-features = false } minijinja = { version = "2.8", default-features = false }
# Download files # Download files
reqwest = { version = "0.12" } reqwest = { version = "0.12" }
@ -39,30 +41,32 @@ physis = { git = "https://github.com/redstrate/Physis" }
base64 = { version = "0.22", default-features = false } base64 = { version = "0.22", default-features = false }
# Not used directly by us, but to disable the "std" feature and is used by the scraper crate. # Not used directly by us, but to disable the "std" feature and is used by the scraper crate.
ahash = { version = "0.8.0", default-features = false } ahash = { version = "0.8.1", default-features = false }
# Ditto, but used by the ahash crate. # Ditto, but used by the ahash crate.
getrandom = { version = "0.2", features = ["js"], default-features = false } getrandom = { version = "0.2", features = ["js"], default-features = false }
[target.'cfg(target_family = "wasm")'.dependencies] [target.'cfg(target_family = "wasm")'.dependencies]
# Used to generate the WebAssembly version # Used to generate the WebAssembly version
wasm-bindgen = { version = "0.2.95", default-features = false } wasm-bindgen = { version = "0.2", default-features = false }
wasm-bindgen-futures = { version = "0.4", default-features = false } wasm-bindgen-futures = { version = "0.4", default-features = false }
# For async # For async
tokio = { version = "1.41", features = ["rt", "macros"], default-features = false } tokio = { version = "1.44", features = ["rt", "macros"], default-features = false }
serde_json = { version = "1.0", default-features = false, features = ["alloc"] } serde_json = { version = "1.0", default-features = false, features = ["alloc"] }
console_error_panic_hook = { version = "0.1.7", optional = true }
[target.'cfg(not(target_family = "wasm"))'.dependencies] [target.'cfg(not(target_family = "wasm"))'.dependencies]
# For async # For async
tokio = { version = "1.41", features = ["rt", "rt-multi-thread", "macros"], default-features = false } tokio = { version = "1.44", features = ["rt", "rt-multi-thread", "macros"], default-features = false }
# Used for the Qt UI # Used for the Qt UI
cxx = { version = "1.0", default-features = false } cxx = { version = "1.0", default-features = false }
cxx-qt = { git = "https://github.com/KDAB/cxx-qt", branch = "main", default-features = false } cxx-qt = { version = "0.7", default-features = false }
cxx-qt-lib = { git = "https://github.com/KDAB/cxx-qt", branch = "main", default-features = false } cxx-qt-lib = { version = "0.7", default-features = false }
cxx-qt-lib-extras = { git = "https://github.com/KDAB/cxx-qt", branch = "main", default-features = false } cxx-qt-lib-extras = { version = "0.7", default-features = false }
cxx-kde-frameworks = { git = "https://invent.kde.org/libraries/cxx-kde-frameworks", branch = "work/redstrate/kaboutdata-process-cmdline", default-features = false } cxx-kde-frameworks = { git = "https://invent.kde.org/libraries/cxx-kde-frameworks", branch = "master", default-features = false }
serde_json = { version = "1.0", default-features = false, features = ["std"] } serde_json = { version = "1.0", default-features = false, features = ["std"] }

View file

@ -29,6 +29,20 @@ auracite --name "John Doe"
To enable support for the Dalamud plugin, add `--dalamud`. To enable support for the Dalamud plugin, add `--dalamud`.
## Building
### Desktop
To run the desktop client, simply run `cargo run`. You must have Qt6 development packages installed beforehand.
### Flatpak
To build the Flatpak, use `flatpak-builder` or the helper script `scripts/build-flatpak.sh`. An `auracite.flatpak` file will be generated.
### Web
To build the Web version, use `wasm-pack` or the helper script `scripts/build-web.sh`. A folder called `pkg/` will be generated, and the HTML files live in `web/`.
### Dalamud Mode ### Dalamud Mode
Auracite can only collect so much data from the Lodestone, some data can only be collected when logged in. To do this, Auracite can only collect so much data from the Lodestone, some data can only be collected when logged in. To do this,

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,6 @@
use std::env::args; use std::env::args;
use std::fs::write; use std::fs::write;
use cxx_kde_frameworks::kcoreaddons::{KAboutData, KAuthor, License}; use cxx_kde_frameworks::kcoreaddons::{KAboutData, KAboutPerson, License};
use cxx_kde_frameworks::ki18n::{i18n, i18nc, KLocalizedContext, KLocalizedString}; use cxx_kde_frameworks::ki18n::{i18n, i18nc, KLocalizedContext, KLocalizedString};
use cxx_qt_lib::{QByteArray, QGuiApplication, QList, QQmlApplicationEngine, QQuickStyle, QString, QStringList, QUrl}; use cxx_qt_lib::{QByteArray, QGuiApplication, QList, QQmlApplicationEngine, QQuickStyle, QString, QStringList, QUrl};
use cxx_qt_lib_extras::{QCommandLineOption, QCommandLineParser}; use cxx_qt_lib_extras::{QCommandLineOption, QCommandLineParser};
@ -39,13 +39,13 @@ fn main() {
return; return;
}; };
about_data.as_mut().add_author(KAuthor { about_data.as_mut().add_author(&KAboutPerson::from(
name: i18n("Joshua Goins"), &i18n("Joshua Goins"),
task: i18n("Maintainer"), &i18n("Maintainer"),
email_address: QString::from("josh@redstrate.com"), &QString::from("josh@redstrate.com"),
web_address: QString::from("https://redstrate.com"), &QString::from("https://redstrate.com"),
avatar_url: QUrl::from(&QString::from("https://redstrate.com/rss-image.png")), &QUrl::from(&QString::from("https://redstrate.com/rss-image.png"))
}); ));
KAboutData::set_application_data(&*about_data); KAboutData::set_application_data(&*about_data);

View file

@ -279,13 +279,13 @@ pub async fn archive_character(character_name: &str, use_dalamud: bool) -> Resul
let char_dat = physis::chardat::CharacterData { let char_dat = physis::chardat::CharacterData {
version: 0, version: 0,
checksum: 0, customize: physis::chardat::CustomizeData {
race: Race::Hyur, race: Race::Hyur,
gender: Gender::Male, gender: Gender::Male,
age: 0, age: 0,
height: 0, height: 0,
subrace: Subrace::Midlander, subrace: Subrace::Midlander,
head: 0, face: 0,
hair: 0, hair: 0,
enable_highlights: false, enable_highlights: false,
skin_tone: 0, skin_tone: 0,
@ -293,7 +293,7 @@ pub async fn archive_character(character_name: &str, use_dalamud: bool) -> Resul
hair_tone: 0, hair_tone: 0,
highlights: 0, highlights: 0,
facial_features: 0, facial_features: 0,
limbal_eyes: 0, facial_feature_color: 0,
eyebrows: 0, eyebrows: 0,
left_eye_color: 0, left_eye_color: 0,
eyes: 0, eyes: 0,
@ -301,12 +301,15 @@ pub async fn archive_character(character_name: &str, use_dalamud: bool) -> Resul
jaw: 0, jaw: 0,
mouth: 0, mouth: 0,
lips_tone_fur_pattern: 0, lips_tone_fur_pattern: 0,
tail: 0, race_feature_size: 0,
face_paint: 0, race_feature_type: 0,
bust: 0, bust: 0,
face_paint: 0,
face_paint_color: 0, face_paint_color: 0,
voice: 0, voice: 0,
timestamp: [0; 4], },
timestamp: 0,
comment: "Generated by Auracite".to_string(),
}; };
zip.start_file("FFXIV_CHARA_01.dat", options)?; zip.start_file("FFXIV_CHARA_01.dat", options)?;
@ -334,6 +337,9 @@ pub async fn archive_character(character_name: &str, use_dalamud: bool) -> Resul
#[cfg(target_family = "wasm")] #[cfg(target_family = "wasm")]
#[wasm_bindgen] #[wasm_bindgen]
pub async extern fn archive_character_base64(character_name: &str, use_dalamud: bool) -> Result<String, ArchiveError> { pub async extern fn archive_character_base64(character_name: &str, use_dalamud: bool) -> Result<String, ArchiveError> {
#[cfg(feature = "debug")]
console_error_panic_hook::set_once();
let buf: String = archive_character(character_name, use_dalamud).await.map(|x| BASE64_STANDARD.encode(x))?; let buf: String = archive_character(character_name, use_dalamud).await.map(|x| BASE64_STANDARD.encode(x))?;
return Ok(format!("data:application/octet-stream;charset=utf-16le;base64,{buf}").into()); return Ok(format!("data:application/octet-stream;charset=utf-16le;base64,{buf}").into());
} }