WaviestBalloon / ApplejuiceCLI

ApplejuiceCLI is a fast, light-weight Roblox on Linux bootstrapper that runs with Proton written in Rust
GNU General Public License v3.0
28 stars 3 forks source link

Rewriting Applejuice #20

Open WaviestBalloon opened 8 months ago

WaviestBalloon commented 8 months ago

The current code base is a mix and mash of some horrible inconsistent code, this was my first proper Rust project that I smashed my head in without knowing much about Rust myself

Even after some code clean-up commits, it's still a horrible mess to work with and I'm getting tired of maintaining it by myself

Task list in no particular order

See more rant The mess got even worse after I decided to strip away from the idea of having multiple installations of Roblox because at the time I had the idea of switching in between deployment channels, for example, if a deployment contained a fix that wasn't present on the `LIVE` channel, you could just swap over to it and return back to `LIVE` later and you can have different FastFlag configurations etc **This is horrible;** I modified Applejuice for it to not work with multiple installations after the closure of other deployment channels which caused modules to become a jumbled mess of commented out code blocks and unused variables **My plan is to make it much more manageable in the future,** this will allow me to implement the features I really want, for example: The actual UI (which I intend to use Qt) It will take a long time to carry out and I'm unsure if I will have enough time to complete it but it is worth a try as Applejuice is now in a much better stable state, I can work on the rewrite while having piece of mind that no major bugs are present in the `main` branch
apprehensions commented 8 months ago

no brainer

WaviestBalloon commented 8 months ago

^^^

WaviestBalloon commented 8 months ago

I haven't pushed testing changes to main branch yet as I am currently in the process of redesigning most of the modules for the rewrite

Some notable changes are:

Although I am holding back on pushing these changes until refined, you can see progress on the rewrite branch https://github.com/WaviestBalloon/ApplejuiceCLI/tree/rewrite

apprehensions commented 8 months ago

If Applejuice has all of it's desktop files and icons self-contained, there is no reason to have a custom installer other than simply cargo install.

WaviestBalloon commented 8 months ago

If Applejuice has all of it's desktop files and icons self-contained, there is no reason to have a custom installer other than simply cargo install.

By self-contained, do you mean inside of a directory in the repository? Or what init did and automatically generated the desktop files?

init is no longer a command in the rewrite anymore, I'll look into cargo install later

Kladki commented 7 months ago

If Applejuice has all of it's desktop files and icons self-contained

Shouldn't be done, just makes things annoying for distro packagers, who can just deal with that + no syntax highlighting when editing, making it easier to make mistakes.

By self-contained, do you mean inside of a directory in the repository?

Likely means within the binary, since that's all cargo install actually installs.

No more init command, init tasks are now handled by the installer.sh script

Should probably use a task runner like just or make

apprehensions commented 7 months ago

How about you write a bootstrapper that will kill Vinegar and Applejuice @Kladki

WaviestBalloon commented 7 months ago

Likely means within the binary, since that's all cargo install actually installs.

No more init command, init tasks are now handled by the installer.sh script

Should probably use a task runner like just or make

I'll look into this for sure, I'll also consult some friends who have packaged before, my issue is that I've never packaged anything in my life so I have no idea how to really construct my repository to be packager-friendly. My idea was just to have everything in a install script that packagers can look at and re-implement. Thank you for the comment.

WaviestBalloon commented 6 months ago

The rewrite hasn't really moved much recently, I've shifted focus on a different personal project. I'm waiting for time where the possibility that Roblox On Linux might come back, then I'll continue but for now I'm going to do small changes to keep this project stable.

This isn't the end of Applejuice, it just feels like I'm dragging my legs through tar.

WaviestBalloon commented 5 months ago

I have updated this Issue thread with a small list of things I need to implement into the rewrite! More items will be added and updated later.

Progress is still slow because of college and personal issues currently; I have appended this list to make sure people understand that I am trying to make this work. :3

apprehensions commented 5 months ago

If anything, i suggest you to split Applejuice into two libraries (one for bootstrapping roblox, and one for roblox web api handling) as separate rust crates, this way development is much easier focused. I've done this for Vinegar and it made the development scope for Vinegar much simpler. It also means other programs can utilize the roblox bootstrapper or web api libraries for other things.

WaviestBalloon commented 5 months ago

If anything, i suggest you to split Applejuice into two libraries (one for bootstrapping roblox, and one for roblox web api handling) as separate rust crates,

I haven't got that far in planning, but previously when I was talking to pizzaboxer, we agreed that I should probably make Roblox bootstrapping it's own crate and library, use ApplejuiceCLI for it and then allow ApplejuiceCLI to be wrapped into a graphical interface by using a environment variable to disable certain aspects and allow stdout to be parsed easily.

This will allow people to favor the CLI over the UI or UI over the CLI; currently, writing interfaces in Rust seems to be more daunting then I was expecting, I might very well consider using Python for interface creation.

There are two Rust-powered UI libraries I'd like to use if I can and that would be Tauri and Iced, I'm leaning towards Tauri as of now.

apprehensions commented 5 months ago

Please go for the simpler UI solution. I'm suffering with GTK4 for Vinegar which didn't end up very far.

WaviestBalloon commented 5 months ago

GTK4

Tried GTK, compile times were too long and binary sizes were off the charts, definitely won't be choosing it.

Kladki commented 5 months ago

There are two Rust-powered UI libraries I'd like to use if I can and that would be Tauri and Iced, I'm leaning towards Tauri as of now.

Definitely go with iced, since it's not like it needs to be able to run on web or mobile, and then you have a fully native app.

Feel free to shoot me an email or message on matrix if you want help with rust things.

WaviestBalloon commented 3 months ago

Rewrite is on-hold for a while as I try to focus on college more, I haven't made much progress recently as I've decided to not trust my past self with this type of code quality: image

Keep in mind that this was my first proper Rust project lol

Furthermore, I cannot really test the rewrite sufficiently as Roblox is currently crashing when starting in Wine (which is a bug as confirmed by Bitdancer, it's meant to display a Hyperion warning, not ask to generate a crash dump)

bluepilledgreat commented 3 months ago

fortnite burger

WaviestBalloon commented 3 months ago

@Kladki I was just wondering if Qt would be a good option? I've been experimenting with it before in Qt Designer but I've been having issues with getting it into Rust

Kladki commented 3 months ago

I mean it's really up to you. If you really want to use QT with rust, your best bet is likely CXX-Qt. However, there is also Slint, which compiles to the native GUI library of the target platform, that being QT for Linux.

From my (limited) expierence with GUIs in rust (much more of a backend fan), I have had the best experience sofar with iced. And considering System76/PopOS is backing it, I would say it's a safe bet going forwards. I still must say, while their docs have improved quite a bit, it is still seriously lacking: https://book.iced.rs

They still somehow have many apps made using it, so clearly they are doing something right in that regard if that is the case despite the serious lack of documentation (beyond examples that is): https://iced.rs

WaviestBalloon commented 3 months ago

Since the rewrite is taking a long time for me to get around doing, I've decided to maintain the old codebase to fix and improve some long standing issues, check #28 for the changes!

@Kladki thank you for your input with help with choosing a UI framework by the way, I've started to steer towards Slint as I really dig the integration with Rust and the fact I can use the Fluent UI design on Linux which looks really nice, the memory footprint isn't terrible either but could be better. The binary size on the other hand is a bit too big for my liking (200MB) so I'll have to tinker around to reduce the binary size. I may just make the UI interface separate to Applejuice itself which is what I was originally thinking of doing.