Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
AeEn123 committed Dec 8, 2024
2 parents e621190 + b631bc4 commit 4ca44bd
Show file tree
Hide file tree
Showing 15 changed files with 192 additions and 84 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:

steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
- name: Build
run: cargo build --verbose --release
- name: Upload build
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build_win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:

steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
- name: Build
run: cargo build --verbose --release
- name: Upload build
Expand Down
3 changes: 3 additions & 0 deletions locales/de-DE.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,6 @@ use-alias = Exportiere deine umbenannten Dateien
button-search = Suche <Strg+F>
confirmation-custom-directory-title = Wähle ein anderen Ordner aus
confirmation-custom-directory-description = Willst du ein anderen Cacheordner auswählen?
confirmation-ban-warning-title = Potential ban alert # TODO: Translate
confirmation-ban-warning-description = Editing assets in games can cause your client to behave differently leading to potential game bans! Use at your own risk. Do you understand? # TODO: Translate
2 changes: 2 additions & 0 deletions locales/en-GB.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ confirmation-clear-cache-title = Clearing roblox cache
confirmation-clear-cache-description = Are you sure you want to clear your roblox cache? The files will be regenerated when the roblox client is loaded.
confirmation-custom-directory-title = Choose a different directory
confirmation-custom-directory-description = Do you want to choose a different cache directory?
confirmation-ban-warning-title = Potential ban alert
confirmation-ban-warning-description = Editing assets in games can cause your client to behave differently leading to potential game bans! Use at your own risk. Do you understand?
# Errors
no-files = No files to list.
Expand Down
2 changes: 2 additions & 0 deletions locales/pl-PL.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ button-no = Nie
button-rename = Zmień nazwe <F2>
# Confirmations
confirmation-ban-warning-description = Editing assets in games can cause your client to behave differently leading to potential game bans! Use at your own risk. Do you understand? # TODO: Translate
confirmation-ban-warning-title = Potential ban alert # TODO: Translate
confirmation-generic-confirmation-title = Potwierdzenie
confirmation-delete-confirmation-title = Usuwanie plikow
confirmation-delete-confirmation-description = Czy jesteś pewny(a) czy chcesz usunąc wszystkie pliki w tym katalogu?
Expand Down
30 changes: 30 additions & 0 deletions packages/arch/PKGBUILD.new
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
pkgname=Roblox-assets-extractor
pkgdesc='A safe way to extract assets from your Roblox installation.'
pkgver=0.1.3
pkgrel=1
makedepends=('rust' 'cargo')
arch=('x86_64')
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/AeEn123/Roblox-assets-extractor/archive/refs/tags/v0.1.3.tar.gz")
sha256sums=('1f8fbbf06c71266b81beb863e85de9feff2bdda0f3067397932f3c2c6f4d738f')
license=('MIT')

# Generated in accordance to https://wiki.archlinux.org/title/Rust_package_guidelines.
# Might require further modification depending on the package involved.
prepare() {
mv ${srcdir}/${pkgname}-${pkgver}/* ${srcdir}/
rm -rf ${srcdir}/${pkgname}-${pkgver}
cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
}

build() {
export RUSTUP_TOOLCHAIN=stable
export CARGO_TARGET_DIR=target
cargo build --frozen --release --all-features
}

package() {
install -Dm0755 -t "$pkgdir/usr/bin/" "target/release/$pkgname"
install -Dm644 "assets/icon.svg" "${pkgdir}/usr/share/icons/hicolor/symbolic/apps/$pkgname.svg"
install -Dm644 "packages/arch/$pkgname.desktop" "${pkgdir}/usr/share/applications/$pkgname.desktop"
install -Dm644 "packages/arch/$pkgname-system.json" "${pkgdir}/usr/bin/$pkgname-system.json"
}
4 changes: 4 additions & 0 deletions packages/arch/Roblox-assets-extractor-system.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"config-path": "~/.config/Roblox-assets-extractor-config.json",
"allow-updates": false
}
8 changes: 8 additions & 0 deletions packages/arch/Roblox-assets-extractor.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[Desktop Entry]
Type=Application
Name=Roblox Assets Extractor
Comment=A safe way to extract assets from your Roblox installation.
Categories=Utility
Exec=Roblox-assets-extractor
Icon=Roblox-assets-extractor
Terminal=false
4 changes: 4 additions & 0 deletions packages/windows/Roblox-assets-extractor-system.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"config-path": "%localappdata%\\Roblox-assets-extractor-config.json",
"prefer-installers": true
}
10 changes: 1 addition & 9 deletions src/gui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -320,18 +320,10 @@ impl egui_dock::TabViewer for TabViewer<'_> {
// This is only shown in the settings tab

settings::actions(ui, self.locale);
ui.separator();

settings::cache_dir_management(ui, self.locale);

ui.separator();
settings::behavior(ui, &self.locale);

ui.separator();
settings::behavior(ui, &self.locale);
settings::updates(ui, self.locale);

ui.separator();

if settings::language(ui, self.locale) {
// This returns true if the locales need to be refreshed
*self.locale = logic::get_locale(None);
Expand Down
7 changes: 7 additions & 0 deletions src/gui/settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ use native_dialog::{MessageDialog, FileDialog, MessageType};


pub fn actions(ui: &mut egui::Ui, locale: &FluentBundle<Arc<FluentResource>>) {
ui.separator();
ui.heading(logic::get_message(locale, "actions", None));

// Clear cache description
Expand Down Expand Up @@ -58,6 +59,7 @@ pub fn actions(ui: &mut egui::Ui, locale: &FluentBundle<Arc<FluentResource>>) {
}

pub fn cache_dir_management(ui: &mut egui::Ui, locale: &FluentBundle<Arc<FluentResource>>) {
ui.separator();
ui.label(logic::get_message(locale, "custom-cache-dir-description", None));

let mut args = FluentArgs::new();
Expand Down Expand Up @@ -98,6 +100,10 @@ pub fn cache_dir_management(ui: &mut egui::Ui, locale: &FluentBundle<Arc<FluentR
}

pub fn updates(ui: &mut egui::Ui, locale: &FluentBundle<Arc<FluentResource>>) {
if !logic::get_system_config_bool("allow-updates").unwrap_or(true) {
return
}
ui.separator();
ui.heading(logic::get_message(locale, "updates", None));

// Get check_for_updates and automatically_install_updates into a variable for use for checkboxes
Expand All @@ -113,6 +119,7 @@ pub fn updates(ui: &mut egui::Ui, locale: &FluentBundle<Arc<FluentResource>>) {
}

pub fn behavior(ui: &mut egui::Ui, locale: &FluentBundle<Arc<FluentResource>>) {
ui.separator();
ui.heading(logic::get_message(locale, "behavior", None));

ui.label(logic::get_message(locale, "use-alias-description", None));
Expand Down
8 changes: 0 additions & 8 deletions src/gui/welcome.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,8 @@ impl eframe::App for MyApp {
// This returns true if the locales need to be refreshed
self.locale = logic::get_locale(None);
}

ui.separator();
settings::behavior(ui, &self.locale);

ui.separator();

// Config will be mutated as part of checkbox user interaction.
settings::updates(ui, &self.locale);


if self.first_frame {
logic::set_config_value("welcomed", false.into());
self.first_frame = false
Expand Down
Loading

0 comments on commit 4ca44bd

Please sign in to comment.