Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: tauri branch rewrite #146

Closed
wants to merge 1 commit into from

Conversation

khcrysalis
Copy link

@khcrysalis khcrysalis commented Jan 20, 2025

Info

This pull request provides an almost-finished backend to the tauri rust rewrite branch, while also including a crate containing the CLI (and will also include a GUI in the future)

About libvencord (crate)

The backend of vencord installer will be contained in its own crate that will be hopefully uploaded to crates.io once complete, this crate features abilities to patch with OpenAsar while also seperating miscellaneous tools such as:

  • Retrieving updates
  • Generating an asar file

More about how to use libvencord can be found here.

About vencord-installer (crate)

This crate will provide the CLI and GUI, the GUI will be a seperate feature that you will need to specify when compiling:

cargo run -- --help # Compiling for CLI
cargo run --features gui # Compiling for GUI (yet to be implemented)

When implementing the GUI, it should be using the Tauri framework

TODO

  • Proper GUI for vencord-installer crate, seperated as a feature
    • If implemented, platforms such as Windows and macOS should avoid having operations be performed as a root / administrative user, we don't need extra unneccessary permissions.
    • Linux will need to be ran with extra permissions, for example sudo -E would be sufficient for operations.
  • Code for fixing permissions from using sudo primarily for Linux, due to Discord paths often being R/O
    • Depending on how its implemented it should be seperated as a feature to libvencord.
  • On macOS since bundles can be executed anywhere, theres often times where the user would drag Discord to ~/Desktop due to not particularly understanding that they should put it in a correct location like /Applications or ~/Applications. They should be prompted to put it in an applications directory then drag it back to their desktop.
  • Review code to see if there's any instances of breaking either by user-error or something else.
  • Rename "libvencord" to something that makes more sense for mod installers.
  • CLI should have a rewritten dialog interface when selecting a Discord instance, most preferably one that uses the arrow keys.
  • Test "system electron" functionality, as I couldn't find an instance of it where it should be used since the package on AUR doesn't give the specific requirements for changing the paths where patching is done.
  • Discuss what license this rewrite should be.
  • Add scripts for building the vencord_installer application for macOS and other platforms (preferably makefile).
  • Github action to build and notarise the application.
Optional
  • Add an alternative installation method for the mod (seperated as a feature in libvencord) which allows the mod to be persistent between Discord updates, by changing the url that Discord uses for updates.

Whats already implemented and should be known about

  • Functioning CLI, providing features for custom locations, etc.
    • CLI will be available on all platforms if possible, including macOS which the Go installer doesn't provide for.
  • Environment variables for custom dist locations/developer install
    • Users may already have these variables set from the Go installer, so existing ones should work fine with this one.
  • Flatpak support and adding permissions to access the dist directory

Contributions

  • When creating new functions or implementations within libvencord, it is advised you document how to use it. If its sagnificant enough, it should also have an example on how to use said function inside of README.md
  • libvencord is designed to be flexible for personal usage, so it will often have stuff thats not hardcoded, so bare in mind this fact when reviewing/contributing to it.

CLI Preview

image

@Vendicated told me to make a pull request to tauri-branch.

@khcrysalis khcrysalis closed this Feb 5, 2025
@khcrysalis khcrysalis deleted the rust-rewrite branch February 5, 2025 23:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant