Mudlet
Mudlet copied to clipboard
Prefer mpackages over xml scripts for pre-built packages
Brief summary of issue / Description of requested feature:
Use pre-built mpackages instead of the xml files for the packages shipped with Mudlet. See also #6902
Steps to reproduce the issue / Reasons for adding feature:
- mpackages hold more information about the package; versions, icons, etc
- we should be encouraging their use
Error output / Expected result of feature
Compiling/installation should use the mpackages supplied in /src
These files will then be obsolete and can be removed;
https://github.com/Mudlet/Mudlet/blob/development/src/echo.xml https://github.com/Mudlet/Mudlet/blob/development/src/run-lua-code-v4.xml https://github.com/Mudlet/Mudlet/blob/development/src/deleteOldProfiles.xml https://github.com/Mudlet/Mudlet/blob/development/src/mudlet-lua/lua/enable-accessibility/enable-accessibility.xml https://github.com/Mudlet/Mudlet/blob/development/src/mudlet-lua/lua/generic-mapper/generic_mapper.xml
in favour of the mpackages found in /src
Extra information, such as the Mudlet version, operating system and ideas for how to solve / implement:
-
Check .mpackage files contain the latest code (from memory I think changes have been made to at least generic_mapper.xml, but are not reflected in the mpackage).
-
Confirm mpackages are being picked up by Mudlet per 6902
generic_mapper contains its own updater, will this be problematic? Should it be removed in favour of using the package repository?
Should there be a discussion around which default packages are now shipped with mudlet as others can simply be installed by and maintained in the package repository instead of in mudlet core.
The mpackages still need to be installed by default I think, there was a technical issue blocking them. Right now it is the xmls that are being installed.
generic_mapper contains its own updater, will this be problematic? Should it be removed in favour of using the package repository?
It could be removed once we ironed out the package repo, but it's not the only script to self update. Many would. We need to think on a way to make the repo the preferred way to update while still leaving room for self-updates to work.
Should there be a discussion around which default packages are now shipped with mudlet as others can simply be installed by and maintained in the package repository instead of in mudlet core.
Lets think on it - if we don't ship them with Mudlet, it would mean a slower startup time on the first profile launch, and that would not be a feature.
It could be removed once we ironed out the package repo, but it's not the only script to self update. Many would. We need to think on a way to make the repo the preferred way to update while still leaving room for self-updates to work.
I think once the repo becomes more widely known it would save the developers time in not having to write their own updater, since that's what the repo is all about.
The way I have implemented mpkg is that it can list all local packages, but will only ask to update if the repository has a higher version. If developer wishes to host their packages and self-update I do not think there would be any conflict.
/bounty $50
💎 $50 bounty • Mudlet
🔨 See instructions for compiling Mudlet
Steps to solve:
- Start working: Comment
/attempt #7268 - Submit work: Create a pull request including
/claim #7268in the PR body to claim the bounty - Attach proof: Include a screencast in the PR that fully tests the new functionality
- Receive payment: 100% of the bounty is received 2-5 days post-reward. Make sure you are eligible for payouts
Thank you for contributing to Mudlet/Mudlet!
Add a bounty • Share on socials
| Attempt | Started (GMT+0) | Solution |
|---|---|---|
| 🔴 @mobley-trent | Jun 26, 2024, 3:57:08 PM | WIP |
| 🟢 @vadi2 | #7648 |
/attempt #7268
| Algora profile | Completed bounties | Tech | Active attempts | Options |
|---|---|---|---|---|
| @mobley-trent | 4 bounties from 3 projects | Python, Rust, Jupyter Notebook |
Cancel attempt |
Hello @vadi2 I am new to game dev but I am still very interested in this issue. Is there a specific tool which we are meant to use to convert the .xml files to .mpackage format ?
@mobley-trent hey, .mpackage files can be created by using the Package exporter in Mudlet. We've already in fact created all of them and checked them in, e.g. https://github.com/Mudlet/Mudlet/blob/development/src/deleteOldProfiles.mpackage
What needs to be done now is bundle the .mpackages as a Qt resource file just like we do with .xmls and install them by default into new profiles (step 1, step 2). I gave it a go before but got stuck on extracting the mpackages from the resource file in-memory and then installing them - maybe you find another way here!
@mobley-trent Had any further luck with this? Your PR seemed so close. Looks like libzip is having a problem unzipping the files, but all looks good as far as I can tell.
@ZookaOnGit I'm actually working on a new PR
💡 @vadi2 submitted a pull request that claims the bounty. You can visit your bounty board to reward.