Install package from URL + drag and drop support#4724
Install package from URL + drag and drop support#4724Delwing merged 6 commits intoMudlet:developmentfrom
Conversation
|
Hey there! Thanks for helping Mudlet improve. 🌟 Test versionsYou can directly test the changes here:
No need to install anything - just unzip and run. |
src/mudlet-lua/lua/Other.lua
Outdated
|
|
||
| --- Installs package from url | ||
| -- @param url | ||
| function installPackageFromUrl(url) |
There was a problem hiding this comment.
I'd just make installPackage() handle it instead of a separate function, that would be more intuitive to work with for the players. You can override the C++ one in Lua in case the url is an online one. Search for local old in Lua for examples of Lua functions improving on the core C++ ones.
src/mudlet-lua/lua/Other.lua
Outdated
| return | ||
| end | ||
|
|
||
| local destination = string.format("%s/%s.%s", lfs.currentdir(), fileName, suffix) |
|
I remember thinking about something similar about installing package directly from the mudlet package repo website by drag and drop (https://github.com/Mudlet/mudlet-package-repo) This is a very good addition and will simplify installing packages a lot! 👍 |
vadi2
left a comment
There was a problem hiding this comment.
Works well. Do you think you can trim it just to the file name or ideally the package name? You drag and drop a package from the internet and it starts talking about your profile folder, a bit strange :D
Co-authored-by: Vadim Peretokin <vperetokin@gmail.com>
…into download-package-install
|
@vadi2 I've put stripping of |
|
Thanks for going above and beyond! |
* add sysDropUrlEvent * api to download package via drag and drop and url in general * override instal package * Update src/mudlet-lua/lua/Other.lua Co-authored-by: Vadim Peretokin <vperetokin@gmail.com> * strip profile home from file name in verbose package install Co-authored-by: Piotr Wilczynski <piotr.wilczynski@bisnode.com> Co-authored-by: Vadim Peretokin <vperetokin@gmail.com>

Brief overview of PR changes/additions
Easy way to install packages either through Lua api or drag & drop directly from site (drag link representation onto Mudlet).
Motivation for adding to Mudlet
Easier package installs.
Other info (issues closed, discussion etc)