Skip to content
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

Add: Handle telnet links with Mudlet #7117

Open
wants to merge 37 commits into
base: development
Choose a base branch
from
Open

Conversation

guhitb
Copy link
Contributor

@guhitb guhitb commented Jan 30, 2024

Brief overview of PR changes/additions

  • Updated command line arguments to accept any URI or file path (first positional argument)
  • Made MudletInstanceHandler packages generic so any URI can be passed to another Mudlet Instance.
  • Updated mudlet.desktop, registry keys, and Plist (see Associate Mudlet with telnet links installers#115) to handle opening telnet links on each operating system.
  • Reused telnet ui components and profile selection logic from Add telnet:// links support #3131

Motivation for adding to Mudlet

fixes #689
/claim #689

Other info (issues closed, discussion etc)

I'm having trouble testing the linux telnet file association on my machine. I think I have something misconfigured that's not part of the Mudlet repo. I placed MimeType=x-scheme-handler/telnet;application/zip; in mudlet.desktop and ran xdg-mime default mudlet.desktop x-scheme-handler/telnet to set default.

Testing: open http://www.durismud.com and click on on the Play now link.

guhitb and others added 26 commits January 25, 2024 16:33
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)
…t#7108)

#### Brief overview of PR changes/additions
:crown: An automated PR to update the built-in
`3rdparty/kdtoolbox/singleshot_connect/singleshot_connect.h` to its
latest version in upstream. We don't include it as a submodule as we're
using tools from the KDToolBox as we need them.
#### Motivation for adding to Mudlet
Latest version of the Qt utility feature that allows singleshot
connections.
#### Other info (issues closed, discussion etc)
_update triggered by refs/heads/development
1899c427a3a08462d3d29a5d842b669f211ba60b_

Co-authored-by: mudlet-machine-account <mudlet-machine-account@users.noreply.github.com>
…Mudlet#7110)

Bumps
[ZedThree/clang-tidy-review](https://github.com/zedthree/clang-tidy-review)
from 0.17.0 to 0.17.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/zedthree/clang-tidy-review/releases">ZedThree/clang-tidy-review's
releases</a>.</em></p>
<blockquote>
<h2>v0.17.1</h2>
<h2>What's Changed</h2>
<ul>
<li>auth: Allow private key for apps to be base64 by <a
href="https://github.com/bwrsandman"><code>@​bwrsandman</code></a> in <a
href="https://redirect.github.com/ZedThree/clang-tidy-review/pull/112">ZedThree/clang-tidy-review#112</a></li>
<li>Use PyGithub to reuse auth headers to do requests by <a
href="https://github.com/bwrsandman"><code>@​bwrsandman</code></a> in <a
href="https://redirect.github.com/ZedThree/clang-tidy-review/pull/113">ZedThree/clang-tidy-review#113</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/ZedThree/clang-tidy-review/compare/v0.17.0...v0.17.1">https://github.com/ZedThree/clang-tidy-review/compare/v0.17.0...v0.17.1</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/ZedThree/clang-tidy-review/commit/4923dc7cbb13a291cecc8507a89f70ed25ac9ce9"><code>4923dc7</code></a>
Merge pull request <a
href="https://redirect.github.com/zedthree/clang-tidy-review/issues/113">#113</a>
from bwrsandman/authenticated-requests</li>
<li><a
href="https://github.com/ZedThree/clang-tidy-review/commit/baadf424d2af3b418e4c7de25989570fded55e34"><code>baadf42</code></a>
Use set difference to cull comments</li>
<li><a
href="https://github.com/ZedThree/clang-tidy-review/commit/40e754e569e9aad0183712b96b3da37de04a961f"><code>40e754e</code></a>
Reuse auth headers to do requests</li>
<li><a
href="https://github.com/ZedThree/clang-tidy-review/commit/f5273417752b89feb2903b47a72352b5d2ac4b41"><code>f527341</code></a>
Merge pull request <a
href="https://redirect.github.com/zedthree/clang-tidy-review/issues/112">#112</a>
from bwrsandman/base64-private-key</li>
<li><a
href="https://github.com/ZedThree/clang-tidy-review/commit/d51789bde871d26e75c895ef69b3c3b11e39b38e"><code>d51789b</code></a>
auth: Allow private key for apps to be base64</li>
<li>See full diff in <a
href="https://github.com/zedthree/clang-tidy-review/compare/v0.17.0...v0.17.1">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=ZedThree/clang-tidy-review&package-manager=github_actions&previous-version=0.17.0&new-version=0.17.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…t#7111)

Bumps [EndBug/add-and-commit](https://github.com/endbug/add-and-commit)
from 9.1.3 to 9.1.4.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/endbug/add-and-commit/releases">EndBug/add-and-commit's
releases</a>.</em></p>
<blockquote>
<h2>v9.1.4</h2>
<h2>What's Changed</h2>
<ul>
<li>chore(deps): bump string-argv from 0.3.1 to 0.3.2 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/EndBug/add-and-commit/pull/506">EndBug/add-and-commit#506</a></li>
<li>chore(deps-dev): bump all-contributors-cli from 6.25.0 to 6.25.1 by
<a href="https://github.com/dependabot"><code>@​dependabot</code></a> in
<a
href="https://redirect.github.com/EndBug/add-and-commit/pull/507">EndBug/add-and-commit#507</a></li>
<li>chore(deps-dev): bump all-contributors-cli from 6.25.1 to 6.26.0 by
<a href="https://github.com/dependabot"><code>@​dependabot</code></a> in
<a
href="https://redirect.github.com/EndBug/add-and-commit/pull/509">EndBug/add-and-commit#509</a></li>
<li>chore(deps-dev): bump typescript from 5.0.4 to 5.1.3 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/EndBug/add-and-commit/pull/512">EndBug/add-and-commit#512</a></li>
<li>chore(deps-dev): bump typescript from 5.1.3 to 5.1.6 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/EndBug/add-and-commit/pull/515">EndBug/add-and-commit#515</a></li>
<li>docs: add justanotheranonymoususer as a contributor for bug by <a
href="https://github.com/allcontributors"><code>@​allcontributors</code></a>
in <a
href="https://redirect.github.com/EndBug/add-and-commit/pull/517">EndBug/add-and-commit#517</a></li>
<li>chore(deps-dev): bump all-contributors-cli from 6.26.0 to 6.26.1 by
<a href="https://github.com/dependabot"><code>@​dependabot</code></a> in
<a
href="https://redirect.github.com/EndBug/add-and-commit/pull/518">EndBug/add-and-commit#518</a></li>
<li>chore(deps): bump semver from 5.7.1 to 5.7.2 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/EndBug/add-and-commit/pull/520">EndBug/add-and-commit#520</a></li>
<li>chore(deps-dev): bump <code>@​typescript-eslint/parser</code> from
6.0.0 to 6.1.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/EndBug/add-and-commit/pull/522">EndBug/add-and-commit#522</a></li>
<li>chore(deps-dev): bump <code>@​typescript-eslint/eslint-plugin</code>
from 6.0.0 to 6.2.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/EndBug/add-and-commit/pull/524">EndBug/add-and-commit#524</a></li>
<li>chore(deps-dev): bump eslint-config-prettier from 8.8.0 to 8.9.0 by
<a href="https://github.com/dependabot"><code>@​dependabot</code></a> in
<a
href="https://redirect.github.com/EndBug/add-and-commit/pull/525">EndBug/add-and-commit#525</a></li>
<li>chore(deps-dev): bump <code>@​typescript-eslint/parser</code> from
6.1.0 to 6.2.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/EndBug/add-and-commit/pull/526">EndBug/add-and-commit#526</a></li>
<li>chore(deps-dev): bump prettier from 3.0.0 to 3.0.1 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/EndBug/add-and-commit/pull/527">EndBug/add-and-commit#527</a></li>
<li>chore(deps-dev): bump <code>@​typescript-eslint/parser</code> from
6.2.0 to 6.2.1 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/EndBug/add-and-commit/pull/528">EndBug/add-and-commit#528</a></li>
<li>chore(deps-dev): bump <code>@​typescript-eslint/parser</code> from
6.2.1 to 6.3.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/EndBug/add-and-commit/pull/532">EndBug/add-and-commit#532</a></li>
<li>chore(deps-dev): bump <code>@​typescript-eslint/eslint-plugin</code>
from 6.2.0 to 6.4.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/EndBug/add-and-commit/pull/534">EndBug/add-and-commit#534</a></li>
<li>chore(deps-dev): bump prettier from 3.0.1 to 3.0.2 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/EndBug/add-and-commit/pull/536">EndBug/add-and-commit#536</a></li>
<li>chore(deps-dev): bump <code>@​typescript-eslint/parser</code> from
6.3.0 to 6.4.1 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/EndBug/add-and-commit/pull/537">EndBug/add-and-commit#537</a></li>
<li>chore(deps-dev): bump <code>@​typescript-eslint/eslint-plugin</code>
from 6.4.0 to 6.4.1 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/EndBug/add-and-commit/pull/539">EndBug/add-and-commit#539</a></li>
<li>chore(deps-dev): bump typescript from 5.1.6 to 5.2.2 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/EndBug/add-and-commit/pull/538">EndBug/add-and-commit#538</a></li>
<li>chore(deps-dev): bump eslint-config-prettier from 8.9.0 to 9.0.0 by
<a href="https://github.com/dependabot"><code>@​dependabot</code></a> in
<a
href="https://redirect.github.com/EndBug/add-and-commit/pull/530">EndBug/add-and-commit#530</a></li>
<li>chore(deps-dev): bump prettier from 3.0.2 to 3.0.3 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/EndBug/add-and-commit/pull/541">EndBug/add-and-commit#541</a></li>
<li>chore(deps-dev): bump <code>@​typescript-eslint/parser</code> from
6.4.1 to 6.5.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/EndBug/add-and-commit/pull/540">EndBug/add-and-commit#540</a></li>
<li>ci(deps): bump actions/checkout from 3 to 4 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/EndBug/add-and-commit/pull/544">EndBug/add-and-commit#544</a></li>
<li>chore(deps-dev): bump <code>@​vercel/ncc</code> from 0.36.1 to
0.38.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/EndBug/add-and-commit/pull/545">EndBug/add-and-commit#545</a></li>
<li>chore(deps-dev): bump <code>@​typescript-eslint/parser</code> from
6.5.0 to 6.6.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/EndBug/add-and-commit/pull/546">EndBug/add-and-commit#546</a></li>
<li>chore(deps-dev): bump <code>@​typescript-eslint/eslint-plugin</code>
from 6.4.1 to 6.7.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/EndBug/add-and-commit/pull/547">EndBug/add-and-commit#547</a></li>
<li>chore(deps-dev): bump <code>@​types/js-yaml</code> from 4.0.5 to
4.0.6 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/EndBug/add-and-commit/pull/549">EndBug/add-and-commit#549</a></li>
<li>chore(deps-dev): bump <code>@​typescript-eslint/parser</code> from
6.6.0 to 6.7.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/EndBug/add-and-commit/pull/548">EndBug/add-and-commit#548</a></li>
<li>chore(deps): bump <code>@​actions/core</code> from 1.10.0 to 1.10.1
by <a href="https://github.com/dependabot"><code>@​dependabot</code></a>
in <a
href="https://redirect.github.com/EndBug/add-and-commit/pull/550">EndBug/add-and-commit#550</a></li>
<li>chore(deps-dev): bump <code>@​typescript-eslint/parser</code> from
6.7.0 to 6.7.2 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/EndBug/add-and-commit/pull/551">EndBug/add-and-commit#551</a></li>
<li>chore(deps-dev): bump <code>@​typescript-eslint/eslint-plugin</code>
from 6.7.0 to 6.7.2 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/EndBug/add-and-commit/pull/552">EndBug/add-and-commit#552</a></li>
<li>chore(deps-dev): bump <code>@​typescript-eslint/parser</code> from
6.7.2 to 6.7.3 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/EndBug/add-and-commit/pull/553">EndBug/add-and-commit#553</a></li>
<li>chore(deps-dev): bump <code>@​typescript-eslint/eslint-plugin</code>
from 6.7.2 to 6.7.4 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/EndBug/add-and-commit/pull/555">EndBug/add-and-commit#555</a></li>
<li>chore(deps-dev): bump <code>@​typescript-eslint/parser</code> from
6.7.3 to 6.7.4 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/EndBug/add-and-commit/pull/557">EndBug/add-and-commit#557</a></li>
<li>chore(deps-dev): bump eslint-plugin-prettier from 5.0.0 to 5.0.1 by
<a href="https://github.com/dependabot"><code>@​dependabot</code></a> in
<a
href="https://redirect.github.com/EndBug/add-and-commit/pull/558">EndBug/add-and-commit#558</a></li>
<li>chore(deps-dev): bump <code>@​typescript-eslint/parser</code> from
6.7.4 to 6.7.5 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/EndBug/add-and-commit/pull/559">EndBug/add-and-commit#559</a></li>
<li>chore(deps-dev): bump <code>@​types/js-yaml</code> from 4.0.6 to
4.0.7 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/EndBug/add-and-commit/pull/560">EndBug/add-and-commit#560</a></li>
<li>chore(deps-dev): bump <code>@​typescript-eslint/eslint-plugin</code>
from 6.7.4 to 6.8.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/EndBug/add-and-commit/pull/562">EndBug/add-and-commit#562</a></li>
<li>chore(deps-dev): bump <code>@​types/js-yaml</code> from 4.0.7 to
4.0.8 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/EndBug/add-and-commit/pull/563">EndBug/add-and-commit#563</a></li>
<li>chore(deps-dev): bump <code>@​vercel/ncc</code> from 0.38.0 to
0.38.1 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/EndBug/add-and-commit/pull/565">EndBug/add-and-commit#565</a></li>
<li>chore(deps-dev): bump <code>@​typescript-eslint/parser</code> from
6.7.5 to 6.9.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/EndBug/add-and-commit/pull/566">EndBug/add-and-commit#566</a></li>
<li>ci(deps): bump actions/setup-node from 3 to 4 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/EndBug/add-and-commit/pull/567">EndBug/add-and-commit#567</a></li>
<li>chore(deps-dev): bump <code>@​typescript-eslint/eslint-plugin</code>
from 6.8.0 to 6.9.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/EndBug/add-and-commit/pull/568">EndBug/add-and-commit#568</a></li>
<li>chore(deps-dev): bump <code>@​typescript-eslint/parser</code> from
6.9.0 to 6.9.1 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/EndBug/add-and-commit/pull/569">EndBug/add-and-commit#569</a></li>
<li>chore(deps-dev): bump <code>@​typescript-eslint/eslint-plugin</code>
from 6.9.0 to 6.10.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/EndBug/add-and-commit/pull/571">EndBug/add-and-commit#571</a></li>
<li>typo in README git add -&gt; git tag by <a
href="https://github.com/cderv"><code>@​cderv</code></a> in <a
href="https://redirect.github.com/EndBug/add-and-commit/pull/572">EndBug/add-and-commit#572</a></li>
<li>docs: add cderv as a contributor for doc by <a
href="https://github.com/allcontributors"><code>@​allcontributors</code></a>
in <a
href="https://redirect.github.com/EndBug/add-and-commit/pull/573">EndBug/add-and-commit#573</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/EndBug/add-and-commit/commit/a94899bca583c204427a224a7af87c02f9b325d5"><code>a94899b</code></a>
9.1.4</li>
<li><a
href="https://github.com/EndBug/add-and-commit/commit/a622cc1f1428742f8edeccbf1f8d8bb83baaec7b"><code>a622cc1</code></a>
docs: add mdboom as a contributor for maintenance (<a
href="https://redirect.github.com/endbug/add-and-commit/issues/615">#615</a>)</li>
<li><a
href="https://github.com/EndBug/add-and-commit/commit/81610ab50216c2dbe2de92a618469cccfbe899fb"><code>81610ab</code></a>
fix: bump node to v20 (<a
href="https://redirect.github.com/endbug/add-and-commit/issues/614">#614</a>)</li>
<li><a
href="https://github.com/EndBug/add-and-commit/commit/5e702fdb7461453c9c174eb0791f49ce1797ebc9"><code>5e702fd</code></a>
chore(deps-dev): bump <code>@​typescript-eslint/eslint-plugin</code> (<a
href="https://redirect.github.com/endbug/add-and-commit/issues/612">#612</a>)</li>
<li><a
href="https://github.com/EndBug/add-and-commit/commit/f83257cb156803dd8dad0a2bda6f41367dd138e2"><code>f83257c</code></a>
chore(deps-dev): bump prettier from 3.2.2 to 3.2.4 (<a
href="https://redirect.github.com/endbug/add-and-commit/issues/610">#610</a>)</li>
<li><a
href="https://github.com/EndBug/add-and-commit/commit/4ecef32896734d76dccd192994a5abe68b1157b2"><code>4ecef32</code></a>
chore(deps-dev): bump <code>@​typescript-eslint/parser</code> from
6.18.1 to 6.19.0 (<a
href="https://redirect.github.com/endbug/add-and-commit/issues/609">#609</a>)</li>
<li><a
href="https://github.com/EndBug/add-and-commit/commit/2f00a737d8339f2ef526b2e2a56f71e02c044dc6"><code>2f00a73</code></a>
chore(deps-dev): bump <code>@​typescript-eslint/parser</code> from
6.18.0 to 6.18.1 (<a
href="https://redirect.github.com/endbug/add-and-commit/issues/608">#608</a>)</li>
<li><a
href="https://github.com/EndBug/add-and-commit/commit/f494dada56876ae82cea3bb7b73ced6d92ed0de4"><code>f494dad</code></a>
chore(deps-dev): bump prettier from 3.1.1 to 3.2.2 (<a
href="https://redirect.github.com/endbug/add-and-commit/issues/607">#607</a>)</li>
<li><a
href="https://github.com/EndBug/add-and-commit/commit/e80d34740198eb3895ee7fb8ded900f895fe8b18"><code>e80d347</code></a>
chore(deps-dev): bump eslint-plugin-prettier from 5.1.2 to 5.1.3 (<a
href="https://redirect.github.com/endbug/add-and-commit/issues/606">#606</a>)</li>
<li><a
href="https://github.com/EndBug/add-and-commit/commit/e02356542bd952a6afa9027471bf09cbc94922c1"><code>e023565</code></a>
chore(deps-dev): bump <code>@​typescript-eslint/eslint-plugin</code> (<a
href="https://redirect.github.com/endbug/add-and-commit/issues/605">#605</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/endbug/add-and-commit/compare/v9.1.3...v9.1.4">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=EndBug/add-and-commit&package-manager=github_actions&previous-version=9.1.3&new-version=9.1.4)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
<!-- Keep the title short & concise so anyone non-technical can
understand it,
     the title appears in PTB changelogs -->
#### Brief overview of PR changes/additions
Add flatpak support
#### Motivation for adding to Mudlet
AppImage alternative and possibly better Steam Deck support
#### Other info (issues closed, discussion etc)
Sound works!

---------

Co-authored-by: Vadim Peretokin <vadim.peretokin@carasent.com>
@guhitb guhitb requested review from a team as code owners January 30, 2024 18:06
@add-deployment-links
Copy link

add-deployment-links bot commented Jan 30, 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.

Copy link
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.

The link handling didn't work for me on macOS, but that might be because the other PR registering URI's isn't merged yet.


if (openEvent->url().isValid()) {
QUrl url = openEvent->url();
if (url.scheme() == "telnet") {
Copy link
Member

Choose a reason for hiding this comment

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

Could you add qsl() around string literals here and in other places please?

} else {
mudletApp->slot_showConnectionDialog();

QStringList skippedUris;
Copy link
Member

Choose a reason for hiding this comment

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

What does this do?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's unused, I'll will remove it

QStringList skippedUris;

// Process queued URIs until we have to wait for a profile to be selected or loaded
while (!mQueuedUris.isEmpty()) {
Copy link
Member

Choose a reason for hiding this comment

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

Do you think this could be a ranged for instead? Better to avoid while loops if possible.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can change it to something like for (int i = mQueuedUris.length() - 1; i >= 0; i--) to avoid while, but I don't think a ranged for will work since the loop needs to remove items from the list during the loop.

Copy link
Member

Choose a reason for hiding this comment

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

Sure!

src/dlgConnectionProfiles.cpp Show resolved Hide resolved
src/dlgTriggerEditor.cpp Show resolved Hide resolved
src/main.cpp Outdated
@@ -657,7 +653,14 @@ int main(int argc, char* argv[])
}
mudlet::self()->show();

mudlet::self()->startAutoLogin(cliProfiles);
// Do auto login if a no URIs that open profiles are supplied
Copy link
Member

Choose a reason for hiding this comment

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

Hmm, grammar?

src/mudlet.cpp Outdated
if (process.exitStatus() != QProcess::NormalExit || process.exitCode() != 0) {
qWarning() << "Failed to set mudlet.desktop as the default handler for telnet links.";
}
#endif
Copy link
Member

Choose a reason for hiding this comment

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

src/mudlet.cpp Outdated
#endif

#if defined(Q_OS_MACOS)
return true;
Copy link
Member

Choose a reason for hiding this comment

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

Could macOS get a check too?

@ironcross32
Copy link

I'm having trouble with this on Windows. The very first time I did the following:

  1. Downloaded the PR
  2. Extracted the ZIP file
  3. Ran Mudlet.exe, waited for it to load fully, then closed it
  4. Went to [https://www.durismud.com/](this page) and clicked the telnet link
  5. Accepted opening the shortcut DLL
  6. Mudlet opened, but to a blank screen as if no profile were selected
  7. Closed Mudlet and attempted several times
    After the first attempt, which did open Mudlet, successive attempts did not. I chose, upon clicking the link the secont time, to always allow the shortcut to open. It's worth noting that I had another instance (An earlier PR) of Mudlet open and connected to a MUD during this testing session.

@guhitb
Copy link
Contributor Author

guhitb commented Feb 3, 2024

@ironcross32 Thanks for testing this.

From your report, it sounds like the association between Mudlet and telnet is successful, but the wrong version of Mudlet was opened to handle the link. I have the registry keys configured to open the installed version of Mudlet, not the version that was used to set the association.

I can change the file association to use the path of the running executable instead of the installed executable. This should allow the portable .exe to handle telnet links.

I'm not sure why subsequent attempts wouldn't open anything, but could be related to the other version of Mudlet being open. Can you provide a link to the earlier PR?

@ironcross32
Copy link

@ironcross32 Thanks for testing this.

From your report, it sounds like the association between Mudlet and telnet is successful, but the wrong version of Mudlet was opened to handle the link. I have the registry keys configured to open the installed version of Mudlet, not the version that was used to set the association.

I can change the file association to use the path of the running executable instead of the installed executable. This should allow the portable .exe to handle telnet links.

I'm not sure why subsequent attempts wouldn't open anything, but could be related to the other version of Mudlet being open. Can you provide a link to the earlier PR?

Mudlet 4.17.235144c49 My mistake in my earlier post; I meant that I had the PTB running, not another PR.

@Kebap
Copy link
Contributor

Kebap commented Feb 3, 2024

A person often runs both Mudlet release version, and Mudlet PTB on the same machine.

Now during testing, also a Mudlet DEV version is used next to those other two as well.

Which Mudlet version is expected to open the telnet:// links going forward now?

Let's take as example a few days in Mudlet lifecycle, and assume PTB gets updates daily.

Currently.

  • Mudlet 4.17.2 release - does not know telnet links.
  • Mudlet PTB from today - does not know telnet links.
  • Mudlet DEV from here - only this knows how to open telnet links, so it should be used.

Tomorrow, let's say this PR gets merged, all are happy.

The day after tomorrow,

  • Mudlet 4.17.2 release - does not know telnet links.
  • Mudlet PTB from that day - now this also knows how to open telnet links.
  • Mudlet DEV from here - this probably won't be in use anymore
  • Mudlet DEV from another random PR - this also knows how to open telnet links.

When I run this Mudlet release - I don't expect it to open telnet links
When I run this Mudlet PTB - I expect it to open telnet links
When I download the random DEV - ? Should it open telnet links instead?
When I close the random DEV - ? Should PTB open telnet links again? Would be good, as DEV will probably not be used much longer.

The day after the day after tomorrow,

  • Mudlet 4.17.2 release - does not know telnet links.
  • Mudlet PTB from that day - now this received another update, still knows telnet links
  • Mudlet DEV from here - this probably won't be in use anymore
  • Mudlet DEV from another random PR - I was only using yesterday, not today

When I run this Mudlet PTB - I assume this would grab the torch back from previous DEV version, and start to open telnet links again?

The day of 4.18 release

  • Mudlet 4.18 release - update installs, and now it knows how to open telnet links
  • Mudlet PTB from that day - still knows telnet links
  • Mudlet DEV - let's ignore these for now, should probably behave same as before

Which Mudlet would I expect to open telnet links now?
From a technical point, probably Mudlet 4.18 has taken the torch from PTB during update?
Generally speaking, should Mudlet release always open telnet links, and PTB should not?
A person often runs both Mudlet release version, and Mudlet PTB on the same machine.
From a usage point, would they expect PTB to open each telnet link, maybe?

The day after 4.18 release;

  • Mudlet 4.18 release - still knows how to open telnet links
  • Mudlet PTB from that day - still knows telnet links
  • Mudlet DEV - let's ignore these for now, should probably behave same as before

From the same technical point, then PTB has again taken the torch from release again?
Because it was installed the latest, after the latest PTB update?
So then when a person installs a PTB, they can never open telnet links with Mudlet release?
I am not so sure, which is the desired result.

@guhitb
Copy link
Contributor Author

guhitb commented Feb 4, 2024

How about:

  • Mudlet should always use the path of the current executable when setting associations.
  • Any existing association set by another Mudlet version should be overwritten.
  • The "Do you want to associate Mudlet with telnet" popup should be shown if a different version has been associated.
  • For PTB and dev versions, version and executable path should be shown in the association popup.

Using this method:

  • There is no way to associate telnet with versions of Mudlet that do not support it.
  • The user can associate the desired version of Mudlet by running it and clicking yes.
  • If the user has disabled check at launch for the version of Mudlet they want to associate, they would need to reenable it first.

@vadi2
Copy link
Member

vadi2 commented Feb 4, 2024

I think that would be great to try.

@vadi2
Copy link
Member

vadi2 commented Feb 4, 2024

Updating with latest development to trigger a rebuild and see if the Mac changes come through.

vadi2 and others added 2 commits February 4, 2024 10:53
wrapped string literals with qsl()

removed unused variable

bugfix

replaced `while` with `for`

fixed comment typo

added lsregister for mac and mudlet scheme handling for windows
Copy link
Member

@SlySven SlySven left a comment

Choose a reason for hiding this comment

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

Sorry if this seems a bit nit-picky - I'm just trying to polish it up a bit.

Thanks for working on this as it has been something that we wanted doing for a long time. 😌

One further suggestion would have though is that: can you ensure you have left a blank line between successive methods /functions in the source code.

HTH

#include <QFileOpenEvent>
#include <QObject>
Copy link
Member

Choose a reason for hiding this comment

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

QObject is a bit of a special case I think as it is the base class for many, if not all other Qt classes - so it does make sense to have it before the other class headers (though they probably #include it them selves anyhow)... thoughts @vadi2 ? 🤷‍♂️

}

QString file = uriOrFile;
if (file.startsWith("~")) {
Copy link
Member

Choose a reason for hiding this comment

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

That is a bit of a dodgy "bash"-ism (I think) - ~ as the WHOLE of the first directory specifier does indeed mean the "user's" home directory in the bash (and some other) shells - however ~someotherUser/ means the home directory of someOtherUser which is not how the code afterwards will handle it - I think you have to be more discerning than just using file.startsWith("~") here - you may have to check for a directory separator immediately afterwards to be sure...

}
mMutex.unlock();
Copy link
Member

Choose a reason for hiding this comment

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

Careful - I do not think you want to hit this line if you have already unlocked it before by carrying out one of the blocks of code inside the ifs otherwise you could get nasal daemons - the Qt documentation for this method notes that it:

Unlocks the mutex. Attempting to unlock a mutex in a different thread to the one that locked it results in an error. Unlocking a mutex that is not locked results in undefined behavior.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for noticing this! I placed it outside the loop to avoid checking if(i==0) inside the loop, but it seems like that's the correct way to do it.

src/dlgProfilePreferences.cpp Show resolved Hide resolved
src/dlgTriggerEditor.cpp Show resolved Hide resolved
src/mudlet.cpp Outdated

QStringList hostList = QDir(getMudletPath(profilesPath)).entryList(QDir::Dirs | QDir::NoDotAndDotDot, QDir::Name);

int profilesFound{};
Copy link
Member

Choose a reason for hiding this comment

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

🤮 - for complex classes I suppose the default/empty initialisation with {} does look attractive but for plain old data types like this I honestly think this is better:

Suggested change
int profilesFound{};
int profilesFound = 0;

src/mudlet.cpp Outdated

int profilesFound{};
QString lastHostFound;
for (auto& host : hostList) {
Copy link
Member

Choose a reason for hiding this comment

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

Maybe?

Suggested change
for (auto& host : hostList) {
for (const auto& host : hostList) {

src/mudlet.cpp Outdated
Comment on lines 3091 to 3095
mpConnectionDialog->showInformationMessage(tr("%n matching profiles found for %1, which would you like to open?",
"this message is shown when Mudlet is opened from a telnet:// link on a webpage, and more than one profile matches the game server/port - so "
"the user needs to pick which of the available profiles they'd like to play with",
profilesFound)
.arg(url.host()));
Copy link
Member

Choose a reason for hiding this comment

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

We are not using that form of providing information to the translation team (see #5522) - instead try:

Suggested change
mpConnectionDialog->showInformationMessage(tr("%n matching profiles found for %1, which would you like to open?",
"this message is shown when Mudlet is opened from a telnet:// link on a webpage, and more than one profile matches the game server/port - so "
"the user needs to pick which of the available profiles they'd like to play with",
profilesFound)
.arg(url.host()));
/*: This message is shown when Mudlet is opened from a telnet:// link on a webpage, and more than one profile matches the game server/port - so
the user needs to pick which of the available profiles they'd like to play with.*/
mpConnectionDialog->showInformationMessage(tr("%n matching profiles found for %1, which would you like to open?",
"",
profilesFound)
.arg(url.host()));

src/mudlet.qrc Outdated
@@ -217,5 +217,6 @@
<file>ui/package_manager.ui</file>
<file>ui/package_manager_unpack.ui</file>
<file>ui/set_room_area.ui</file>
<file>ui/check_default_client.ui</file>
Copy link
Member

Choose a reason for hiding this comment

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

Please move it up a bit so that it is in the correct alphabetical sort position (after line 210)...

</size>
</property>
<property name="text">
<string>Mudlet is not currently set as your default client. Would you like to make it your default client?</string>
Copy link
Member

Choose a reason for hiding this comment

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

A suggestion to try and avoid repeating the exact "your default client" phrase. Also to explain what it would be the default for! 😀

Suggested change
<string>Mudlet is not currently set as your default client. Would you like to make it your default client?</string>
<string>Mudlet is not currently set as the default client for handling <tt>telnet://</tt> URLs. Would you like to make it your default?</string>

You might need to tweak the <tt>...</tt> - I am trying to get it displayed (almost) like: telnet: appears here (but without any shading).

@guhitb
Copy link
Contributor Author

guhitb commented Feb 7, 2024

Okay, those changes have been made 😄

bugfix for macos compile
@vadi2
Copy link
Member

vadi2 commented Feb 7, 2024

/refresh links

Copy link
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.

Screenshot 2024-02-07 9 25 25 AM

Testing has revealed a problem on Linux 😅 the temporary location the AppImage gets extracted and run from will always change. Do you think this is solvable? We're looking at migrating to flatpak at the same time, so it's not worth too much effort to make it work for AppImages.

Copy link
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.

macOS testing always says "checking default: false". Have you got access to a mac? If no I can do some testing for you.

@guhitb
Copy link
Contributor Author

guhitb commented Feb 7, 2024

I think so. We can check if there's an APPIMAGE env var set and use that instead of the executable path.

I don't have access to a mac, testing would be appreciated. I'm using a swift script to check which executable handles telent, but sounds like it's not working as expected.

Unfortunately it has to be a compiled binary that is linked to Cocoa to work.
@demonnic
Copy link
Member

demonnic commented Feb 10, 2024

Hmm, when I open the test version it does ask to register itself as the handler for telnet links, but then when I click the telnet link to 'play now' it doesn't actually open anything up.
Windows 10

@vadi2
Copy link
Member

vadi2 commented Feb 10, 2024

I've fixed checking which application is responsible for the telnet:// uri, but registration doesn't yet work. One reason might be that lsregister expects a .app path, not the binary path @guhitb.

@mpconley
Copy link
Contributor

Mac with snapshot 746c2092 and after a Chrome restart
Screenshot 2024-02-10 at 9 21 29 AM
Screenshot 2024-02-10 at 9 22 22 AM
Screenshot 2024-02-10 at 9 22 34 AM

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.

Support telnet:// links
8 participants