-
Notifications
You must be signed in to change notification settings - Fork 175
Framework migration/Dual Support #282
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
Comments
If you are okay with it assign me to this issue. |
Hi @TishanV , I'm good with that as long as the project will benefit from it. What do you think @sekwah41 @gillisandrew? |
I'm quite open to looking into Tauri. I've actually been considering doing it for this app as a practice anyway. As we have little to no direct desktop code other than revising and a few other things I don't believe this would be a major change and we can reuse most basically all the front-end stuff. Only reason I've not looked before is being tied up with some other projects or my other projects would require a full redo of the code signing phase. Only thing I think we'd need to look into is how to get Tauri apps on the snap store or automate that. Also it would make other os specific bugs a little less friendly as e.g. Mac uses safari built in if I understand correctly. Another part is Tauri is exploring allowing mobile apps too so we'd be able to publish an Android and iOS version in the future when the framework matures further if we so please. |
Only part is the backend would be in rust which shouldn't be complex anyway as from what I've seen the framework is pretty clean and makes small bundles. And while it would be a first for me in rust I've been looking into the language quite a bit and would be more than happy to use this project as an excuse to properly try to learn it even as a concept as I was considering doing it anyway. |
I've also pinned this issue as it would be quite a major one that would render some of the backlog of bugs redundant. |
In case anyone has not seen Tauri https://github.com/tauri-apps/tauri And an example of how they are progressing, they have an experimental snapshot ready for ios https://github.com/tauri-apps/tauri/tree/feat/ios-build |
This is awesome, I was thinking to learn Flutter before I saw this. |
If you are focusing on mobile first @roldanjr you may also be interested in react-native using expo (speeds up dev and is reccomended by the react site), flutter or ionic. Also for now snap isnt supported by tauri though I will look into how to compile it for snap and either setup some stuff or try to work on adding support to tauri depending on the complexity >.> as there are already linux builders for AppImage and deb. If this project https://www.npmjs.com/package/tauri-snap-packager or something else I find doesn't work. |
Ok ive started looking into rust and honestly, I wish id tried it earlier, once I am happy enough with it ill move onto tauri and start trying a migration. Seems like a pretty good clean language as well as some very powerful libraries e.g. tauri. Luckily I have experience with a fair few languages that seem to structure in similar ways so its not fully jumping into the dark but when I can ill comment here with the branch I am working on in case anyone more experienced with rust would like to point me towards best practices or ways to improve :) |
Are there any news on this? Excited to see it :) |
@sekwah41 is trying to work on the Backend migrating it to Tauri while on my side, I'm trying to target Mobile, Web, and Desktop for the Frontend using React Native + Web. It will take a while before we release a new version of this app especially since we are just doing it in our own spare time but it's worth the effort. |
Thanks for the info 😊 |
@roldanjr one thing you make like is tauri is aiming to allow iOS and android targets too. They have some in dev branches but if u remember correctly it's getting there. |
https://tauri.app/v1/guides/distribution/sign-linux one issue there will be of using tauri is that it doenst have the same amount of linux targets as electron builder. at minimum id like to support AppImage which seems possible and Snap which I will need to also investigate. I will take a look into how close the mobile version platforms of tauri are to being ready but I may delay this until I've made changes to the frontend to support it running on Ionic on mobile devices. |
As long as the calls to the backend are non-implementation specific we can tinker with both at the same time even if it's just a testing branch or using it to cover the targets Tauri can atm. It's already a goal to target multiple backend systems because of the mobile goals. |
Actually, because @roldanjr has used the default snap building mechanism rather than the electron builder output for snap solely hes actually possibly made it a lot easier to modify this to use Tauri for the snapcraft version. |
Luckily it looks like you can also compile the windows binaries on on linux but itll probably be less fiddly to just compile on the correct platforms. Just set up the base project today it seems to render fine at least. I will need to create a lost of all the features and issues that need to be implemented e.g. the fullscreen breaks or minimising to the tray. While making these edits ill try to abstract it in some way so that the mobile version if we dont use Tauri also can hook into these same calls. Though for the mobile version we will want flags to hide UI or alter it in ways. |
|
Will need to update some of the postbuild scripts for stuff like the renderer to stop it from deleting files tauri wants. Also we should be copying from the other projects to here not the other way around. |
Some of the tools only work on Ubuntu. I'll try to take a look at adding new targets for Tauri or adding to the project itself because id like to toy with more Linux things and expand my rust knowledge so once I have some other parts out of the way or hit a wall with this ill take a tinker with more underlying parts. One user on that issue also reported that the compiled versions locally may not have that issue but inside app images it seems to be a problem. |
I am temporarily disabling the main electron test build workflow while I test some tauri stuff just to avoid a lot of unneeded builds. I likely will fork it to my own one and disable it there instead tomorrow. |
The flickering only seems to be in dev mode when resizing so feel free to ignore that on linux at least. The AppImage ive tested that it compiles seems to be fine. |
So here are the tasks that still need to be done with the tauri version
As long as we can get a snap version the windows portable would be the only one we'd lose. |
At least in appimage mode it seems to use a bit less memory as Tauri vs Electron (rough look id estimate electron uses 50% more minimum?). As the platform matures itll gain a lot more benefits, it seems we are losing a lot of key targets for linux, as well as the portable mode on windows. |
I am going to go ahead with making a Tauri version while maintaining the electron version for targets it doesn't currently support. It would also be good to look into adding feature flags or settings for hiding or setting certain settings. |
That sounds cool, I'm planning to learn rust also so I will know what's happening not just on the frontend side of the app. |
While there are still pieces to implement, ill make a list in the coming days, a large portion of it at least has been sorted. Ive uploaded this zip file as a test in case anyone wants to try, though the code is available on the sekwah/tauri-test branch too. Would be cool to also customise the installer with some screenshots or pieces about the app https://tauri.app/v1/api/config/#nsisconfig One example of a missing feature which won't be hard to add but still needs to be done is keeping the app open in the background when you click x. So far, the bundle is 5MB. Also, this can be made a lot smaller, though we lose a lot of debugging capabilities. I also need to fix the selection menu for task titles. |
List of features still needed. May have missed some but these are the main ones at least
|
The downside is the auto-updater can't be hosted purely on GitHub releases as easily. However, we could make it push to an external server. Though I am going to leave this all for another day because I have a lot of other things to sort out today sadly :( |
That's alright @sekwah41 :) You've made a lot of effort on this, really appreciate it. Just take your time :D |
We may also need to take a look at possibly finding a way to get the auto updater to also look at github, though may that have issues with the electron version? Ill check this all out once I've got the rest sorted. |
This page will also help with info on the mobile parts https://beta.tauri.app/blog/tauri-2-0-0-alpha-4/#updating-dependencies Here is also an upgrade guide https://beta.tauri.app/guides/upgrade-migrate/from-tauri-1/ |
For anyone interested, I may have finished the port to Tauri aside from the auto-updater. Test builds will be available here once its finished building https://github.com/zidoro/pomatez/actions/runs/6619351140 So far I've only tested it on windows. I also left out certain global hotkeys as they didn't relate to Tauri. |
I will take a look at how best to do the auto updater at some point, though when I can ill start doing tests on mac and linux. |
So by default it cant handle just pulling the files from releases like electron builder. What ill do is take a look at adding that functionality either into the base updater or our app if we can control that to a more granular level. |
So far, I absolutely love working with Rust. The ability to add extra functionality onto existing classes makes it really clean to make the setup tasks and avoid having to pass objects around anywhere near as much as something like node or java. I am not sure what is considered best practice, though the modular way I am approaching this, I would like to say, is keeping the code maintainable and rather clean. |
Ok, generating the updater file is a bit more complex than on electron-builder. Though I could make it do separate latest files like electron builder done. I will experiment with that first but explore using a final step to upload all the assets at once and create a single combined updater file outlined in the syntax here. I will once I've got past a certain point do some test releases on my own personal fork before publishing this. However I need to switch focus onto an event for the beginning of November so I may not be able to progress this for a few weeks. Though I want to see this working as it feels so close!! :) Another issue is that I'm having a bit of trouble getting it to properly use the keys for signing updates so need to also find why that is. |
I will be testing and messing around with it over here https://github.com/sekwah41/pomatez so that I can do test releases as well as try to target multiple builds. @roldanjr do you remember if anyone is using the 32bit versions of the apps? I see we build ia32 versions though I am not sure if any modern systems really use them anymore. I will target x86_64 and arm64 though will try to set it up so we can expand it to add others easier to future proof it. |
So there are issues currently with AppImage on arm64 and also you cant reliably to portable due to the MSI making sure some of the core windows features with the webview are installed tauri-apps/tauri#3048 |
One other cool thing we can do is compile a universal version for macos which can work on both intel and arm. I will steal a new MacBook from family to test these https://developer.apple.com/documentation/apple-silicon/building-a-universal-macos-binary |
Will need to check on linux at some point properly, though at least in dev mode on my steam deck it crashes or just doesnt load. (if you comment out try_set_min_size to avoid the crash) so something seems to be freezing it so its not processing any commands. |
I agree, I believe it's safe to omit the 32 bit format. |
Looks like I'm almost there. Just need to debug info about the auto updaters and detecting if there is an update or not. I believe it may not be setting headers or something else because it's not detecting updates. If anyone wants to try the builds so far you can see them at https://github.com/sekwah41/pomatez/releases Though I'll be trying to fix the auto updated over the next few days. Due to its reliance on web view 2 there isn't really a reliable way to have a portable version as the installers make sure it's all there. Though imo portable versions are not a priority though as long as we support the electron version that will cover that. As long as the dependencies are installed the portable version will work though on windows. |
Ok so looks like the issues were due to a problem with github rejecting the headers. So I've fixed that and will look at making the pop up happen, but also possibly adding some UI to interact with updating. This should also possibly have a button to ignore this update and remember to ignore that update. |
We can implement this for the electron version too, though I am going to add some new UI which will show on the settings page when an update is available If it wasn't for the fact we can show changelogs due to the way the updater works, I was going to just have it as a smaller widget on the top of the view page. Though as notifications cant have 3 options across platforms as easily, I decided this is probably a less intrusive way that would also help counter issues like #447 too |
I'm good with this @sekwah41 🥇 |
While there is still work to be done, the base app for the tauri version is now working and will be released with the tag tauri-beta next to the file names. |
Is your feature request related to a problem? Please describe.
As I know Electron is a great framework for cross-platform apps but it's downfall is that it uses Chromium which takes lot of RAM and app bundle size. Since Pomatez app is light unlike VSCode try considering migrate to other lightweight frameworks like Tauri or Neutralino.js.
The text was updated successfully, but these errors were encountered: