Skip to content

Add: open .mpackage files with Mudlet#7065

Merged
vadi2 merged 20 commits intoMudlet:developmentfrom
guhitb:open-mpackage-files
Jan 7, 2024
Merged

Add: open .mpackage files with Mudlet#7065
vadi2 merged 20 commits intoMudlet:developmentfrom
guhitb:open-mpackage-files

Conversation

@guhitb
Copy link
Copy Markdown
Contributor

@guhitb guhitb commented Jan 4, 2024

Brief overview of PR changes/additions

  • Created MudletServer to keep track of Mudlet instances and allow them to communicate.
  • Added cli argument for installing a package.
  • Created FileOpenHandler for installing packages from QEvent::FileOpen events.
  • Updated mudlet.desktop to associate Mudlet with .zip files on Linux.
  • Created Info.plist to associate Mudlet with .mpackage files on MacOS.
  • Added registry keys to associate Mudlet with .mpackage files on Windows.

Motivation for adding to Mudlet

fixes #1083
/claim #1083

Other info (issues closed, discussion etc)

The Info.plist file needs to be copied into the app bundle for MacOS to recognize it. I'm not sure how to do that. I found a reference to mudlet.app in CI/travis.osx.after_success.sh, but I think that's just for the CI build. Does someone know how Mudlet is installed on MacOS? Related docs: https://developer.apple.com/library/archive/documentation/CoreFoundation/Conceptual/CFBundles/BundleTypes/BundleTypes.html#//apple_ref/doc/uid/10000123i-CH101-SW1

Examples

Installing a package on an already running instance of Mudlet

mudlet-.11.mp4

Queueing two packages for install by gui and cli. Displaying connection dialogue to determine which profile the packages should be installed on.

mudlet-.12.mp4

If no other instance of Mudlet is open, open Mudlet and install on first opened profile

mudlet-.13.mp4

@guhitb guhitb requested a review from a team January 4, 2024 11:04
@guhitb guhitb requested a review from a team as a code owner January 4, 2024 11:04
@guhitb guhitb requested a review from a team January 4, 2024 11:04
@add-deployment-links
Copy link
Copy Markdown

add-deployment-links bot commented Jan 4, 2024

Hey there! Thanks for helping Mudlet improve. 🌟

Test versions

You can directly test the changes here:

No need to install anything - just unzip and run.
Let us know if it works well, and if it doesn't, please give details.

@vadi2
Copy link
Copy Markdown
Member

vadi2 commented Jan 4, 2024

Good stuff! Happy to see this :)

I found a reference to mudlet.app in CI/travis.osx.after_success.sh, but I think that's just for the CI build.

It's used by everything, the test, PTB, and release builds.

@guhitb
Copy link
Copy Markdown
Contributor Author

guhitb commented Jan 5, 2024

This should add the file association on MacOS - Mudlet/installers#114. This feature should be finished after the installer update is merged, but I don't have Windows or MacOS available to test it on.

@guhitb guhitb force-pushed the open-mpackage-files branch from e907d57 to bcfac45 Compare January 5, 2024 15:22
Copy link
Copy Markdown
Member

@vadi2 vadi2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, though I am a little unsure how to test this (I'm on a Chromebook). I'll try to get access to a mac later on.

Copy link
Copy Markdown
Member

@vadi2 vadi2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to get this into a PTB to really test this, since test builds do not install.

@vadi2 vadi2 merged commit 144b24e into Mudlet:development Jan 7, 2024
@vadi2
Copy link
Copy Markdown
Member

vadi2 commented Jan 24, 2024

@guhitb the PR triggered this CodeQL warning - mind having a look at it?

image

vadi2 pushed a commit that referenced this pull request Jan 26, 2024
#7107)

<!-- Keep the title short & concise so anyone non-technical can
understand it,
     the title appears in PTB changelogs -->
#### Brief overview of PR changes/additions
- Replaced `Mudlet::registerInstanceCoordinator` with
`Mudlet::takeOwnershipOfInstanceCoordinator`.
- Used unique_ptr and std::move() to transfer ownership rather than
passing a raw pointer of `MudletInstanceCoordinator`.

#### Motivation for adding to Mudlet
CodeQL warning

![image](https://github.com/Mudlet/Mudlet/assets/147658676/3344899f-d24c-4cd7-8cf7-dfac8d180d53)
#7065 (comment)
#### Other info (issues closed, discussion etc)
guhitb added a commit to guhitb/Mudlet that referenced this pull request Jan 30, 2024
Mudlet#7107)

<!-- Keep the title short & concise so anyone non-technical can
understand it,
     the title appears in PTB changelogs -->
- Replaced `Mudlet::registerInstanceCoordinator` with
`Mudlet::takeOwnershipOfInstanceCoordinator`.
- Used unique_ptr and std::move() to transfer ownership rather than
passing a raw pointer of `MudletInstanceCoordinator`.

CodeQL warning

![image](https://github.com/Mudlet/Mudlet/assets/147658676/3344899f-d24c-4cd7-8cf7-dfac8d180d53)
Mudlet#7065 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Open .mpackage files with Mudlet

3 participants