Mudlet icon indicating copy to clipboard operation
Mudlet copied to clipboard

Prefer mpackages over xml scripts for pre-built packages

Open ZookaOnGit opened this issue 1 year ago • 11 comments

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:

  1. mpackages hold more information about the package; versions, icons, etc
  2. 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

ZookaOnGit avatar Jun 08 '24 10:06 ZookaOnGit

generic_mapper contains its own updater, will this be problematic? Should it be removed in favour of using the package repository?

ZookaOnGit avatar Jun 08 '24 10:06 ZookaOnGit

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.

ZookaOnGit avatar Jun 08 '24 10:06 ZookaOnGit

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.

vadi2 avatar Jun 08 '24 10:06 vadi2

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.

ZookaOnGit avatar Jun 08 '24 11:06 ZookaOnGit

/bounty $50

vadi2 avatar Jun 24 '24 05:06 vadi2

💎 $50 bounty • Mudlet

🔨 See instructions for compiling Mudlet

Steps to solve:

  1. Start working: Comment /attempt #7268
  2. Submit work: Create a pull request including /claim #7268 in the PR body to claim the bounty
  3. Attach proof: Include a screencast in the PR that fully tests the new functionality
  4. 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 bountyShare on socials

Attempt Started (GMT+0) Solution
🔴 @mobley-trent Jun 26, 2024, 3:57:08 PM WIP
🟢 @vadi2 #7648

algora-pbc[bot] avatar Jun 24 '24 05:06 algora-pbc[bot]

/attempt #7268

Algora profile Completed bounties Tech Active attempts Options
@mobley-trent 4 bounties from 3 projects
Python, Rust,
Jupyter Notebook
Cancel attempt

mobley-trent avatar Jun 26 '24 15:06 mobley-trent

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 avatar Jun 26 '24 16:06 mobley-trent

@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!

vadi2 avatar Jun 27 '24 02:06 vadi2

@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 avatar Aug 24 '24 05:08 ZookaOnGit

@ZookaOnGit I'm actually working on a new PR

mobley-trent avatar Aug 24 '24 06:08 mobley-trent

💡 @vadi2 submitted a pull request that claims the bounty. You can visit your bounty board to reward.

algora-pbc[bot] avatar Jan 13 '25 10:01 algora-pbc[bot]