1
Fork 0
mirror of https://github.com/redstrate/Auracite.git synced 2025-04-19 17:36:50 +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",
"branch": "master",
"runtime": "org.kde.Platform",
"runtime-version": "6.7",
"runtime-version": "6.8",
"sdk": "org.kde.Sdk",
"command": "auracite",
"finish-args": [

732
Cargo.lock generated

File diff suppressed because it is too large Load diff

View file

@ -1,7 +1,7 @@
[package]
name = "auracite"
version = "0.1.0"
edition = "2021"
edition = "2024"
description = "Export your FFXIV character in portable, generic formats"
repository = "https://github.com/redstrate/Auracite"
license = "AGPL-3"
@ -9,12 +9,14 @@ license = "AGPL-3"
[lib]
crate-type = ["cdylib", "rlib"]
[features]
debug = ["dep:console_error_panic_hook"]
[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]
# 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" }
# 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"] }
# 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
reqwest = { version = "0.12" }
@ -39,30 +41,32 @@ physis = { git = "https://github.com/redstrate/Physis" }
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.
ahash = { version = "0.8.0", default-features = false }
ahash = { version = "0.8.1", default-features = false }
# Ditto, but used by the ahash crate.
getrandom = { version = "0.2", features = ["js"], default-features = false }
[target.'cfg(target_family = "wasm")'.dependencies]
# 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 }
# 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"] }
console_error_panic_hook = { version = "0.1.7", optional = true }
[target.'cfg(not(target_family = "wasm"))'.dependencies]
# 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
cxx = { version = "1.0", default-features = false }
cxx-qt = { git = "https://github.com/KDAB/cxx-qt", branch = "main", default-features = false }
cxx-qt-lib = { git = "https://github.com/KDAB/cxx-qt", branch = "main", default-features = false }
cxx-qt-lib-extras = { git = "https://github.com/KDAB/cxx-qt", branch = "main", 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-qt = { version = "0.7", default-features = false }
cxx-qt-lib = { version = "0.7", 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 = "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`.
## 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
Auracite can only collect so much data from the Lodestone, some data can only be collected when logged in. To do this,
@ -57,4 +71,4 @@ Currently, more types of data is planned to be supported in the future.
## License
This project is licensed under the [GNU Affero General Public License 3](LICENSE).
This project is licensed under the [GNU Affero General Public License 3](LICENSE).

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,6 @@
use std::env::args;
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_qt_lib::{QByteArray, QGuiApplication, QList, QQmlApplicationEngine, QQuickStyle, QString, QStringList, QUrl};
use cxx_qt_lib_extras::{QCommandLineOption, QCommandLineParser};
@ -39,13 +39,13 @@ fn main() {
return;
};
about_data.as_mut().add_author(KAuthor {
name: i18n("Joshua Goins"),
task: i18n("Maintainer"),
email_address: QString::from("josh@redstrate.com"),
web_address: QString::from("https://redstrate.com"),
avatar_url: QUrl::from(&QString::from("https://redstrate.com/rss-image.png")),
});
about_data.as_mut().add_author(&KAboutPerson::from(
&i18n("Joshua Goins"),
&i18n("Maintainer"),
&QString::from("josh@redstrate.com"),
&QString::from("https://redstrate.com"),
&QUrl::from(&QString::from("https://redstrate.com/rss-image.png"))
));
KAboutData::set_application_data(&*about_data);
@ -85,4 +85,4 @@ fn main() {
if let Some(app) = app.as_mut() {
app.exec();
}
}
}

View file

@ -279,34 +279,37 @@ pub async fn archive_character(character_name: &str, use_dalamud: bool) -> Resul
let char_dat = physis::chardat::CharacterData {
version: 0,
checksum: 0,
race: Race::Hyur,
gender: Gender::Male,
age: 0,
height: 0,
subrace: Subrace::Midlander,
head: 0,
hair: 0,
enable_highlights: false,
skin_tone: 0,
right_eye_color: 0,
hair_tone: 0,
highlights: 0,
facial_features: 0,
limbal_eyes: 0,
eyebrows: 0,
left_eye_color: 0,
eyes: 0,
nose: 0,
jaw: 0,
mouth: 0,
lips_tone_fur_pattern: 0,
tail: 0,
face_paint: 0,
bust: 0,
face_paint_color: 0,
voice: 0,
timestamp: [0; 4],
customize: physis::chardat::CustomizeData {
race: Race::Hyur,
gender: Gender::Male,
age: 0,
height: 0,
subrace: Subrace::Midlander,
face: 0,
hair: 0,
enable_highlights: false,
skin_tone: 0,
right_eye_color: 0,
hair_tone: 0,
highlights: 0,
facial_features: 0,
facial_feature_color: 0,
eyebrows: 0,
left_eye_color: 0,
eyes: 0,
nose: 0,
jaw: 0,
mouth: 0,
lips_tone_fur_pattern: 0,
race_feature_size: 0,
race_feature_type: 0,
bust: 0,
face_paint: 0,
face_paint_color: 0,
voice: 0,
},
timestamp: 0,
comment: "Generated by Auracite".to_string(),
};
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")]
#[wasm_bindgen]
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))?;
return Ok(format!("data:application/octet-stream;charset=utf-16le;base64,{buf}").into());
}
}